/* Timing Decorator shared engine styles. Each game's own style.css sets --td-accent to
   theme it (falls back to the site's primary color if unset). */
.td-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 0;
  --td-accent: var(--color-primary);
}

.td-plan {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.td-plan__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: rgba(255,255,255,0.04);
  border: 2px solid var(--color-border);
  opacity: 0.45;
  transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}
.td-plan__icon--next { opacity: 1; border-color: var(--td-accent); transform: scale(1.1); }
.td-plan__icon--perfect { opacity: 1; border-color: #4ade80; background: rgba(74,222,128,0.18); transform: scale(1); }
.td-plan__icon--good { opacity: 1; border-color: #fbbf24; background: rgba(251,191,36,0.16); transform: scale(1); }
.td-plan__icon--miss { opacity: 0.7; border-color: #f87171; background: rgba(248,113,113,0.14); transform: rotate(-8deg); }

.td-meter { width: 100%; }
.td-meter__track {
  position: relative;
  width: 100%;
  height: 26px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  border: 2px solid var(--color-border);
  overflow: hidden;
}
.td-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--td-accent) 35%, transparent);
  border-left: 2px solid var(--td-accent);
  border-right: 2px solid var(--td-accent);
  transition: box-shadow 0.15s ease;
}
.td-zone--perfect { box-shadow: inset 0 0 0 999px rgba(74,222,128,0.4); }
.td-zone--good { box-shadow: inset 0 0 0 999px rgba(251,191,36,0.35); }
.td-zone--miss { box-shadow: inset 0 0 0 999px rgba(248,113,113,0.35); }

.td-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 6px;
  margin-left: -3px;
  background: var(--color-text);
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
}

.td-decorate-btn {
  font-size: 1.05rem;
  padding: 14px 32px;
}

@media (max-width: 400px) {
  .td-plan__icon { width: 42px; height: 42px; font-size: 1.4rem; }
}
