/* =========================================================
   MoveWell — sesi interaktif 5 menit
   Memo memakai design system style.css (token base + tema).
   ========================================================= */

/* ---------- stage switcher ---------- */
.sesi-main {
  position: relative;
  overflow: clip;
  min-height: calc(100dvh - 76px);
  padding: clamp(40px, 6vw, 84px) 0 clamp(56px, 8vw, 110px);
}

.sesi-stage {
  display: none;
  position: relative;
}

.sesi-stage.is-active {
  display: block;
  animation: gdFadeIn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes gdFadeIn {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ---------- intro: dua kolom seperti hero ---------- */
.sesi-intro-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.intro-title {
  margin: 16px 0 20px;
  font-size: clamp(2.5rem, 5.4vw, 4.2rem);
  line-height: 0.98;
}

.intro-sub {
  margin-bottom: 30px;
}

.intro-cta {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.intro-cta .btn {
  min-height: 54px;
  padding-inline: 30px;
  font-size: 15px;
}

.intro-safety {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* preview kartu sesi: komponen asli .session-preview */
.sesi-intro-aside .session-preview {
  transform: rotate(-2deg);
}

.sesi-intro-aside .sp-list {
  max-height: 236px;
  overflow: auto;
}

/* ---------- countdown ---------- */
.countdown-wrap {
  display: grid;
  justify-items: center;
  gap: 20px;
  width: min(520px, calc(100% - 40px));
  margin-inline: auto;
  padding: clamp(40px, 7vw, 64px) 24px;
  border: 1.5px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--on-panel);
  box-shadow: 12px 14px 0 rgba(var(--shadow-rgb), 0.2);
  text-align: center;
}

.countdown-eyebrow {
  margin: 0;
  color: rgba(244, 248, 238, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.countdown-wrap .timer-ring {
  width: min(180px, 70%);
}

.countdown-wrap .timer-ring__track {
  stroke: rgba(244, 248, 238, 0.14);
}

.countdown-wrap .timer-ring__bar {
  stroke: var(--lime);
  transition: stroke-dashoffset 1s linear;
}

.countdown-wrap .timer-ring__center strong {
  color: var(--lime);
  font-size: clamp(2.6rem, 7vw, 3.6rem);
}

.countdown-wrap .timer-ring__center span {
  color: rgba(244, 248, 238, 0.6);
}

.countdown-hint {
  margin: 0;
  color: rgba(244, 248, 238, 0.6);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- play stage ---------- */
.play-head {
  margin-bottom: 22px;
  text-align: center;
}

.play-gema {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.play-title {
  margin: 14px 0 8px;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  letter-spacing: -0.04em;
}

.play-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.play-ground {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  padding: clamp(18px, 3vw, 28px);
  border: 1.5px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 10px 12px 0 rgba(var(--shadow-rgb), 0.14);
}

/* ---------- play-stage-visual & play-gif ---------- */
.play-stage-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 24px;
  border: 1.5px solid var(--stroke);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.play-gif {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 320px;
  max-height: 310px;
  object-fit: contain;
  mix-blend-mode: normal;
  filter: none;
}

html[data-theme='dark'] .play-stage-visual {
  background: #ffffff;
  border: 2px solid rgba(201, 246, 90, 0.45);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

html[data-theme='dark'] .play-gif {
  mix-blend-mode: normal;
  filter: none;
}

.play-pulse {
  position: absolute;
  z-index: 1;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(201, 246, 90, 0.35);
  filter: blur(44px);
  animation: gdPulse 1.6s ease-in-out infinite;
}

@keyframes gdPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.55; }
  50% { transform: scale(1.25); opacity: 0.9; }
}

.play-right {
  display: grid;
  gap: 16px;
  align-content: start;
}

.timer-box {
  padding: 18px 22px;
  border: 1.5px solid var(--stroke);
  border-radius: 18px;
  background: var(--panel);
  color: var(--on-panel);
  box-shadow: 4px 4px 0 var(--shadow-hard-color);
}

.timer-remain {
  display: block;
  font-size: clamp(2.4rem, 5.5vw, 3.3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}

.timer-remain-label {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 248, 238, 0.62);
}

.bar-wrap {
  height: 8px;
  margin-top: 14px;
  border: 1px solid rgba(244, 248, 238, 0.28);
  border-radius: 999px;
  background: rgba(244, 248, 238, 0.12);
  overflow: hidden;
}

.bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--lime);
  transition: width 0.9s linear;
}

.bar-track {
  display: flex;
  gap: 5px;
  margin-top: 12px;
}

.bar-track span {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(244, 248, 238, 0.16);
  transition: background 0.3s ease;
}

.bar-track span.is-done {
  background: var(--lime-deep);
}

.bar-track span.is-current {
  background: var(--lime);
  animation: gdBlink 1.2s ease-in-out infinite;
}

@keyframes gdBlink {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.play-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  counter-reset: gdstep;
  list-style: none;
}

.play-steps li {
  position: relative;
  padding: 10px 14px 10px 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-size: 13px;
  line-height: 1.55;
  counter-increment: gdstep;
}

.play-steps li::before {
  content: counter(gdstep);
  position: absolute;
  left: 12px;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--stroke);
  border-radius: 50%;
  background: var(--lime-soft);
  font-size: 11px;
  font-weight: 800;
}

.play-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.play-controls .btn {
  flex: 1;
  min-width: 108px;
}

/* ---------- finish ---------- */
.konfeti {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.finish-card {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
  border: 1.5px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 12px 14px 0 rgba(var(--shadow-rgb), 0.2);
  text-align: center;
}

.finish-title {
  margin: 12px auto 18px;
  max-width: 16ch;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.finish-sub {
  max-width: 52ch;
  margin: 0 auto 28px;
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.7;
}

.finish-burst {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.celebration-art {
  width: min(220px, 80%);
  height: auto;
  animation: gdPop 0.75s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.confetti-3d-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

@keyframes gdPop {
  0% { transform: scale(0.4) rotate(-14deg); opacity: 0; }
  60% { transform: scale(1.18) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.finish-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.stat-pill {
  display: grid;
  gap: 2px;
  min-width: 132px;
  padding: 14px 18px;
  border: 1.5px solid var(--stroke);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--shadow-hard-color);
}

.stat-pill strong {
  font-size: 1.7rem;
  line-height: 1.1;
}

.stat-pill span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.finish-cta {
  display: grid;
  gap: 10px;
  max-width: 380px;
  margin: 0 auto;
}

.finish-cta .btn {
  width: 100%;
  justify-content: center;
}

.sound-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.sound-toggle-btn .ico {
  width: 16px;
  height: 16px;
}

/* ---------- responsif ---------- */
@media (max-width: 999px) {
  .sesi-intro-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .sesi-intro-aside {
    max-width: 420px;
    margin-inline: auto;
    width: 100%;
  }

  .play-ground {
    grid-template-columns: 1fr;
  }

  .play-stage-visual {
    min-height: 240px;
  }
}

@media (max-width: 480px) {
  .play-controls .btn {
    min-width: calc(50% - 4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sesi-stage,
  .countdown-wrap .timer-ring__bar,
  .play-pulse,
  .bar-track span.is-current {
    animation: none;
  }

  .bar,
  .countdown-wrap .timer-ring__bar {
    transition: none;
  }
}
