/* ─────────────────────────────────────────────────────────────────────────
   KinPella — APP MOTION STANDARD layer (AR order 2026-11-26 23:00).
   Implements ~/workspace/app-motion-standard.md (Motion Ui Interface
   series, Parts 1–6 + Icons + iPhone polish) on the surfaces that exist.
   Motion + polish ONLY: no layout, colour, content or logic changes.
   Loaded LAST on every page so these rules win over the base sheets.
   prefers-reduced-motion turns the whole layer off (final block).
   ───────────────────────────────────────────────────────────────────────── */

/* ── Move 1 · Press: sink to ~95%, then spring back (~800ms settle) ────── */
.btn,.level-chip,.grade-chip,.subject-tab,.answer,.mode-card,.power-btn,
.nav-burger,.menu-close,.menu-back,.ph-sheet-x,.ph-cat,.ph-mode,.ph-daily,
.ph-review-strip,.ph-pack,.skill-row,.cl-lesson-row,.mem-card,.text-btn,
.speak-btn,.cast-btn,.cl-cert-tab,.ph-seeall,.ph-search-clear{
  transition:transform .8s cubic-bezier(.34,1.45,.64,1),box-shadow .2s ease,background-color .2s ease,border-color .2s ease;
}
.btn:active,.level-chip:active,.grade-chip:active,.subject-tab:active,
.answer:active:not(:disabled),.mode-card:active:not(:disabled),.power-btn:active:not(:disabled),
.nav-burger:active,.menu-close:active,.menu-back:active,.ph-sheet-x:active,
.ph-cat:active,.ph-mode:active,.ph-daily:active,.ph-review-strip:active,
.ph-pack:active,.skill-row:active,.cl-lesson-row:active,.mem-card:active,
.text-btn:active,.speak-btn:active,.cast-btn:active,.cl-cert-tab:active,
.ph-seeall:active,.ph-search-clear:active{
  transform:scale(.95);
  transition-duration:.09s,.2s,.2s,.2s;
}

/* ── Move 15 · List load: cascade, rows staggered ~70ms ────────────────── */
@keyframes kpRise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
.course-grid>*,.pack-grid>*,.guide-grid>*,.level-grid>*,.pillar-grid>*,
.steps-grid>*,.cl-lessons>*,.cl-lang-grid>*,.prog-list>*,.review-cards>*,
.fun-grid>*,.badge-shelf>*,.ph-track>*,.ph-modes>*,.ph-results>*,
.features>*,.mode-grid>*{
  /* fill BACKWARDS only: the end keyframe is the natural state, and a
     forwards fill would pin transform forever and eat press sinks
     (Move 1b) on every cascaded card. */
  animation:kpRise .45s cubic-bezier(.22,.8,.3,1) backwards;
}
.course-grid>*:nth-child(2),.pack-grid>*:nth-child(2),.guide-grid>*:nth-child(2),
.level-grid>*:nth-child(2),.pillar-grid>*:nth-child(2),.steps-grid>*:nth-child(2),
.cl-lessons>*:nth-child(2),.cl-lang-grid>*:nth-child(2),.prog-list>*:nth-child(2),
.review-cards>*:nth-child(2),.fun-grid>*:nth-child(2),.badge-shelf>*:nth-child(2),
.ph-track>*:nth-child(2),.ph-modes>*:nth-child(2),.ph-results>*:nth-child(2),
.features>*:nth-child(2),.mode-grid>*:nth-child(2){animation-delay:.07s}
.course-grid>*:nth-child(3),.pack-grid>*:nth-child(3),.guide-grid>*:nth-child(3),
.level-grid>*:nth-child(3),.pillar-grid>*:nth-child(3),.steps-grid>*:nth-child(3),
.cl-lessons>*:nth-child(3),.cl-lang-grid>*:nth-child(3),.prog-list>*:nth-child(3),
.review-cards>*:nth-child(3),.fun-grid>*:nth-child(3),.badge-shelf>*:nth-child(3),
.ph-track>*:nth-child(3),.ph-modes>*:nth-child(3),.ph-results>*:nth-child(3),
.features>*:nth-child(3),.mode-grid>*:nth-child(3){animation-delay:.14s}
.course-grid>*:nth-child(4),.pack-grid>*:nth-child(4),.guide-grid>*:nth-child(4),
.level-grid>*:nth-child(4),.cl-lessons>*:nth-child(4),.prog-list>*:nth-child(4),
.review-cards>*:nth-child(4),.fun-grid>*:nth-child(4),.badge-shelf>*:nth-child(4),
.ph-track>*:nth-child(4),.ph-results>*:nth-child(4),.features>*:nth-child(4){animation-delay:.21s}
.course-grid>*:nth-child(5),.pack-grid>*:nth-child(5),.cl-lessons>*:nth-child(5),
.prog-list>*:nth-child(5),.fun-grid>*:nth-child(5),.badge-shelf>*:nth-child(5),
.ph-results>*:nth-child(5){animation-delay:.28s}
.course-grid>*:nth-child(6),.pack-grid>*:nth-child(6),.cl-lessons>*:nth-child(6),
.prog-list>*:nth-child(6),.fun-grid>*:nth-child(6),.badge-shelf>*:nth-child(6),
.ph-results>*:nth-child(6){animation-delay:.35s}
.course-grid>*:nth-child(n+7),.pack-grid>*:nth-child(n+7),.cl-lessons>*:nth-child(n+7),
.prog-list>*:nth-child(n+7),.ph-results>*:nth-child(n+7){animation-delay:.42s}

/* ── Moves 5 + 27 · Expand: fast-then-slow grow (~350ms ease-out) ──────── */
@keyframes kpGrow{from{opacity:0;transform:translateY(-8px) scale(.995)}to{opacity:1;transform:translateY(0) scale(1)}}
.skill-detail{animation:kpGrow .35s cubic-bezier(.22,.8,.3,1) both}
.faq-item[open ]>p,.faq-item[open ]>div{animation:kpGrow .35s cubic-bezier(.22,.8,.3,1) both}
details.lesson-content .lesson-details-body{animation:kpGrow .35s cubic-bezier(.22,.8,.3,1) both}
details.lesson-content summary .lesson-toggle-note{transition:opacity .2s ease}

/* ── Move 7 · Sheet: rise, overshoot ~7px, settle ──────────────────────── */
@keyframes kpSheetIn{0%{transform:translateY(26px);opacity:0}70%{transform:translateY(-7px);opacity:1}100%{transform:translateY(0);opacity:1}}
.ph-sheet{animation:kpSheetIn .38s cubic-bezier(.3,1.1,.4,1) both}
/* Site drawer: same family — slide with a spring-settle timing curve. */
.site-menu{transition:transform .38s cubic-bezier(.3,1.12,.4,1),visibility 0s linear .38s}
.site-menu.open{transition:transform .38s cubic-bezier(.3,1.12,.4,1)}
.menu-panel{transition:transform .38s cubic-bezier(.3,1.12,.4,1)}

/* ── Move 10 · Toast: slide in ~64px ───────────────────────────────────── */
@keyframes kpToastIn{from{transform:translate(-50%,64px);opacity:0}to{transform:translate(-50%,0);opacity:1}}
.toast{animation:kpToastIn .45s cubic-bezier(.22,.9,.3,1) both}

/* ── Move 17 · Card flip: 180° with an ~8% lift at the midpoint ────────── */
@keyframes kpFlip{0%{transform:rotateY(88deg) scale(1)}55%{transform:rotateY(0deg) scale(1.08)}100%{transform:rotateY(0deg) scale(1)}}
.mem-card.up,.mem-card.matched{animation:kpFlip .45s cubic-bezier(.22,.8,.3,1) both}

/* ── Move 9 · Waiting dots: wave, never blink (staggered ~100ms) ───────── */
.kp-dots{display:inline-flex;gap:5px;margin-left:8px;vertical-align:baseline}
.kp-dots i{width:7px;height:7px;border-radius:50%;background:currentColor;display:block;animation:kpWave 1.05s ease-in-out infinite}
.kp-dots i:nth-child(2){animation-delay:.1s}
.kp-dots i:nth-child(3){animation-delay:.2s}
@keyframes kpWave{0%,100%{transform:translateY(0);opacity:.55}50%{transform:translateY(-5px);opacity:1}}

/* ── Move 6 · Success: draw the win (circle ~300ms, tick ~170ms) ───────── */
.kp-check{flex-shrink:0;display:inline-block;vertical-align:-5px;margin-right:9px}
.kp-check circle{fill:none;stroke:#1d9e77;stroke-width:2.6;stroke-linecap:round;stroke-dasharray:76;stroke-dashoffset:76;animation:kpDraw .3s ease-out forwards}
.kp-check path{fill:none;stroke:#1d9e77;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:24;stroke-dashoffset:24;animation:kpDraw .17s ease-out .28s forwards}
@keyframes kpDraw{to{stroke-dashoffset:0}}

/* ── Move 14 · Submit: morph into a spinner while the form works ───────── */
.kp-busy{position:relative;pointer-events:none;opacity:.92}
.kp-busy::after{content:"";width:16px;height:16px;margin-left:9px;border-radius:50%;border:2.5px solid currentColor;border-top-color:transparent;display:inline-block;animation:kpSpin .7s linear infinite;vertical-align:-3px}
@keyframes kpSpin{to{transform:rotate(360deg)}}

/* ── Move 31 · Copy: morph, don't swap ─────────────────────────────────── */
.kp-copied{background:#e3faf3!important;border-color:#55bba5!important;color:#14604a!important}

/* ── Move 25 · Star rating display: fill in turn, bounce, ~100ms apart ─── */
.sm2-stars span{display:inline-block;animation:kpStar .45s cubic-bezier(.34,1.6,.64,1) both}
.sm2-stars span:nth-child(2){animation-delay:.1s}
.sm2-stars span:nth-child(3){animation-delay:.2s}
.sm2-stars span:nth-child(4){animation-delay:.3s}
.ph-stars{display:inline-block;animation:kpStar .45s cubic-bezier(.34,1.6,.64,1) both}
@keyframes kpStar{from{transform:scale(.3);opacity:0}to{transform:scale(1);opacity:1}}

/* ── Move 3 · Rolling numbers: digit columns (built by motion.js) ──────── */
.kp-roll{display:inline-flex;overflow:hidden;vertical-align:bottom;line-height:1}
.kp-roll .kp-col{display:inline-flex;flex-direction:column;transition:transform .55s cubic-bezier(.25,.9,.3,1)}
.kp-roll .kp-col i{font-style:normal;line-height:1;height:1em;display:block}
.kp-roll .kp-static{display:inline-block}

/* ── Move 12 · Celebration burst canvas ────────────────────────────────── */
.kp-confetti{position:fixed;inset:0;pointer-events:none;z-index:200}

/* ── P1 · Frosted glass bars (~30px blur, labels stay clean) ───────────── */
.cl-sticky-bar{backdrop-filter:none;-webkit-backdrop-filter:none}
.ph-sheet-head{background:rgba(255,255,255,.86);backdrop-filter:blur(30px) saturate(1.35);-webkit-backdrop-filter:blur(30px) saturate(1.35)}
.toast.ok{background:rgba(224,251,237,.92);backdrop-filter:blur(30px);-webkit-backdrop-filter:blur(30px)}
.toast.bad{background:rgba(255,231,233,.92);backdrop-filter:blur(30px);-webkit-backdrop-filter:blur(30px)}

/* ── P2 · Concentric corners: inner radius = outer − frame width ───────── */
.tv-frame img{border-radius:16px}

/* ── P4 · Tight big type: large display numbers read as one shape ──────── */
.score-chip strong,.fun-final-score,.fun-final-score b,.team-head strong,
.leader-row strong,.tv-clock,.countdown,.cl-stats{letter-spacing:-.02em}

/* ── P5 · Matched icon weight: stroke icons sit at 2.4px by 700–900 text ── */
.nav-burger svg,.menu-close svg{stroke-width:2.4}

/* ── Move 1b · Press HIGHLIGHT: a soft brand wash sweeps over whatever
   the finger lands on while it sinks (AR order 2026-11-28, from the same
   Motion Ui Interface reel: "when you press, that highlight"). Before
   this block, presses only sank — nothing lit up — and menu rows, site
   cards and hub cards gave no press feedback at all. The wash is a
   translucent white→brand-blue gradient laid over the element's own
   colour, so every surface highlights inside its own colour family.
   Fires from :active AND from the .kp-pressing class motion.js adds on
   real pointer presses (so div-cards and rows light up too). Desktop
   hover gets the same wash at lower intensity. ─────────────────────── */
.btn,.press,.menu-list a,.menu-list .menu-row,.kh-mrow,
.level-card,.pack-card,.guide-card,.cl-lang-card,.pg-card,.pg-chip,
.rd-story-card,.rd-tile,.rd-mode,.rd-chip,.rd-btn,
.ph-pack,.ph-fcard,.ph-result,.ph-mode,.ph-cat,.ph-daily,.ph-review-strip,.ph-seeall,.ph-sheet-x,.ph-search-clear,
.level-chip,.grade-chip,.subject-tab,.answer,.mode-card,.skill-row,.cl-lesson-row,
.mem-card,.text-btn,.speak-btn,.cast-btn,.power-btn,.cl-cert-tab,
.nav-burger,.menu-close,.menu-back,
.viewnav-btn,.tool-btn,.run-btn,.stop-btn,.complete-btn,.inline-btn,.clear-btn,.reset-code-btn,.ctl-btn{
  position:relative;
}
.btn::after,.press::after,.menu-list a::after,.menu-list .menu-row::after,.kh-mrow::after,
.level-card::after,.pack-card::after,.guide-card::after,.cl-lang-card::after,.pg-card::after,.pg-chip::after,
.rd-story-card::after,.rd-tile::after,.rd-mode::after,.rd-chip::after,.rd-btn::after,
.ph-pack::after,.ph-fcard::after,.ph-result::after,.ph-mode::after,.ph-cat::after,.ph-daily::after,.ph-review-strip::after,.ph-seeall::after,.ph-sheet-x::after,.ph-search-clear::after,
.level-chip::after,.grade-chip::after,.subject-tab::after,.answer::after,.mode-card::after,.skill-row::after,.cl-lesson-row::after,
.mem-card::after,.text-btn::after,.speak-btn::after,.cast-btn::after,.power-btn::after,.cl-cert-tab::after,
.nav-burger::after,.menu-close::after,.menu-back::after,
.viewnav-btn::after,.tool-btn::after,.run-btn::after,.stop-btn::after,.complete-btn::after,.inline-btn::after,.clear-btn::after,.reset-code-btn::after,.ctl-btn::after{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:linear-gradient(155deg,rgba(255,255,255,.50) 0%,rgba(168,199,255,.34) 52%,rgba(108,87,216,.24) 100%);
  opacity:0;transition:opacity .5s cubic-bezier(.22,.8,.3,1);
}
.btn:active::after,.press:active::after,.menu-list a:active::after,.menu-list .menu-row:active::after,.kh-mrow:active::after,
.level-card:active::after,.pack-card:active::after,.guide-card:active::after,.cl-lang-card:active::after,.pg-card:active::after,.pg-chip:active::after,
.rd-story-card:active::after,.rd-tile:active::after,.rd-mode:active::after,.rd-chip:active::after,.rd-btn:active::after,
.ph-pack:active::after,.ph-fcard:active::after,.ph-result:active::after,.ph-mode:active::after,.ph-cat:active::after,.ph-daily:active::after,.ph-review-strip:active::after,.ph-seeall:active::after,.ph-sheet-x:active::after,.ph-search-clear:active::after,
.level-chip:active::after,.grade-chip:active::after,.subject-tab:active::after,.answer:active::after,.mode-card:active::after,.skill-row:active::after,.cl-lesson-row:active::after,
.mem-card:active::after,.text-btn:active::after,.speak-btn:active::after,.cast-btn:active::after,.power-btn:active::after,.cl-cert-tab:active::after,
.nav-burger:active::after,.menu-close:active::after,.menu-back:active::after,
.viewnav-btn:active::after,.tool-btn:active::after,.run-btn:active::after,.stop-btn:active::after,.complete-btn:active::after,.inline-btn:active::after,.clear-btn:active::after,.reset-code-btn:active::after,.ctl-btn:active::after,
.btn.kp-pressing::after,.press.kp-pressing::after,.menu-list a.kp-pressing::after,.menu-list .menu-row.kp-pressing::after,.kh-mrow.kp-pressing::after,
.level-card.kp-pressing::after,.pack-card.kp-pressing::after,.guide-card.kp-pressing::after,.cl-lang-card.kp-pressing::after,.pg-card.kp-pressing::after,.pg-chip.kp-pressing::after,
.rd-story-card.kp-pressing::after,.rd-tile.kp-pressing::after,.rd-mode.kp-pressing::after,.rd-chip.kp-pressing::after,.rd-btn.kp-pressing::after,
.ph-pack.kp-pressing::after,.ph-fcard.kp-pressing::after,.ph-result.kp-pressing::after,.ph-mode.kp-pressing::after,.ph-cat.kp-pressing::after,.ph-daily.kp-pressing::after,.ph-review-strip.kp-pressing::after,.ph-seeall.kp-pressing::after,.ph-sheet-x.kp-pressing::after,.ph-search-clear.kp-pressing::after,
.level-chip.kp-pressing::after,.grade-chip.kp-pressing::after,.subject-tab.kp-pressing::after,.answer.kp-pressing::after,.mode-card.kp-pressing::after,.skill-row.kp-pressing::after,.cl-lesson-row.kp-pressing::after,
.mem-card.kp-pressing::after,.text-btn.kp-pressing::after,.speak-btn.kp-pressing::after,.cast-btn.kp-pressing::after,.power-btn.kp-pressing::after,.cl-cert-tab.kp-pressing::after,
.nav-burger.kp-pressing::after,.menu-close.kp-pressing::after,.menu-back.kp-pressing::after,
.viewnav-btn.kp-pressing::after,.tool-btn.kp-pressing::after,.run-btn.kp-pressing::after,.stop-btn.kp-pressing::after,.complete-btn.kp-pressing::after,.inline-btn.kp-pressing::after,.clear-btn.kp-pressing::after,.reset-code-btn.kp-pressing::after,.ctl-btn.kp-pressing::after{
  opacity:1;transition-duration:.07s;
}
/* The busy submit keeps its spinner — no wash while it works. */
.btn.is-loading:active::after,.btn.is-loading.kp-pressing::after{opacity:0}
/* Navy menu rows: while pressed, the row fills with the Play-now GOLD
   and its text + chevron turn WHITE (AR order 2026-11-28 03:18, defined
   by his two screenshots: the navy menu + the gold "▶ Play now — it's
   free" button). #ffc94d is that button's exact gold — .btn-amber's
   background, var(--amber) — sampled from site.css, not approximated.
   The pale-blue pill stays the RESTING current-page state; gold is the
   PRESS state only, and the row springs back on release. Covers both
   headers' menus: site .menu-list rows + sign-in row, /play .kh-mrow. */
.menu-list a:active,.menu-list .menu-row:active,.kh-mrow:active,
.menu-list a.kp-pressing,.menu-list .menu-row.kp-pressing,.kh-mrow.kp-pressing{
  background-color:#ffc94d;color:#fff;
}
.menu-list a:active .menu-chev,.menu-list .menu-row:active .menu-chev,.kh-mrow:active .kh-mchev,
.menu-list a.kp-pressing .menu-chev,.menu-list .menu-row.kp-pressing .menu-chev,.kh-mrow.kp-pressing .kh-mchev{
  color:#fff;
}
.menu-list a:active::before,.menu-list a.kp-pressing::before,
.kh-mrow:active::before,.kh-mrow.kp-pressing::before{
  background:#fff;
}
/* On the menu rows the gold IS the highlight — the pale wash stands
   down there so the pressed fill reads as the exact button gold. */
.menu-list a:active::after,.menu-list .menu-row:active::after,.kh-mrow:active::after,
.menu-list a.kp-pressing::after,.menu-list .menu-row.kp-pressing::after,.kh-mrow.kp-pressing::after{
  opacity:0;
}
/* The menu's sign-in row gets the same press treatment. */
.menu-signin{position:relative;transition:transform .8s cubic-bezier(.34,1.45,.64,1),background-color .2s ease,color .2s ease}
.menu-signin::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(155deg,rgba(255,255,255,.50) 0%,rgba(168,199,255,.34) 52%,rgba(108,87,216,.24) 100%);opacity:0;transition:opacity .5s cubic-bezier(.22,.8,.3,1)}
.menu-signin:active,.menu-signin.kp-pressing{transform:scale(.96);transition-duration:.09s,.12s,.12s;background-color:#ffc94d;color:#fff}
@media (hover:hover) and (pointer:fine){.menu-signin:hover::after{opacity:.38}}
@media (prefers-reduced-motion: reduce){.menu-signin::after{content:none!important}.menu-signin.kp-pressing{transform:none!important}}
/* Sink for the surfaces that had no press motion at all: fast sink on
   the way down (.09s, as Move 1), spring settle on release (.8s). */
.menu-list a,.menu-list .menu-row,.kh-mrow,
.level-card,.pack-card,.guide-card,.cl-lang-card,.pg-card,.pg-chip,
.ph-fcard,.ph-result,
.viewnav-btn,.tool-btn,.run-btn,.stop-btn,.complete-btn,.inline-btn,.clear-btn,.reset-code-btn,.ctl-btn{
  transition:transform .8s cubic-bezier(.34,1.45,.64,1),box-shadow .2s ease,background-color .2s ease,border-color .2s ease,color .2s ease;
}
.menu-list a:active,.menu-list .menu-row:active,.kh-mrow:active,
.level-card:active,.pack-card:active,.guide-card:active,.cl-lang-card:active,.pg-card:active,.pg-chip:active,
.ph-fcard:active,.ph-result:active,
.viewnav-btn:active,.tool-btn:active,.run-btn:active,.stop-btn:active,.complete-btn:active,.inline-btn:active,.clear-btn:active,.reset-code-btn:active,.ctl-btn:active,
.menu-list a.kp-pressing,.menu-list .menu-row.kp-pressing,.kh-mrow.kp-pressing,
.level-card.kp-pressing,.pack-card.kp-pressing,.guide-card.kp-pressing,.cl-lang-card.kp-pressing,.pg-card.kp-pressing,.pg-chip.kp-pressing,
.ph-fcard.kp-pressing,.ph-result.kp-pressing,
.viewnav-btn.kp-pressing,.tool-btn.kp-pressing,.run-btn.kp-pressing,.stop-btn.kp-pressing,.complete-btn.kp-pressing,.inline-btn.kp-pressing,.clear-btn.kp-pressing,.reset-code-btn.kp-pressing,.ctl-btn.kp-pressing{
  transform:scale(.96);
  transition-duration:.09s,.2s,.12s,.2s,.12s;
}
/* Every other pressable sinks via .kp-pressing too, so a real pointer
   press reads even where :active does not land. Move 1's :active rules
   still win while both apply (higher specificity). */
.btn.kp-pressing,.press.kp-pressing,
.rd-story-card.kp-pressing,.rd-tile.kp-pressing,.rd-mode.kp-pressing,.rd-chip.kp-pressing,.rd-btn.kp-pressing,
.ph-pack.kp-pressing,.ph-mode.kp-pressing,.ph-cat.kp-pressing,.ph-daily.kp-pressing,.ph-review-strip.kp-pressing,.ph-seeall.kp-pressing,.ph-sheet-x.kp-pressing,.ph-search-clear.kp-pressing,
.level-chip.kp-pressing,.grade-chip.kp-pressing,.subject-tab.kp-pressing,.answer.kp-pressing,.mode-card.kp-pressing,.skill-row.kp-pressing,.cl-lesson-row.kp-pressing,
.mem-card.kp-pressing,.text-btn.kp-pressing,.speak-btn.kp-pressing,.cast-btn.kp-pressing,.power-btn.kp-pressing,.cl-cert-tab.kp-pressing,
.nav-burger.kp-pressing,.menu-close.kp-pressing,.menu-back.kp-pressing{
  transform:scale(.96);
}
/* Desktop: the same highlight at lower intensity on hover. */
@media (hover:hover) and (pointer:fine){
  .btn:hover::after,.press:hover::after,.menu-list a:hover::after,.menu-list .menu-row:hover::after,.kh-mrow:hover::after,
  .level-card:hover::after,.pack-card:hover::after,.guide-card:hover::after,.cl-lang-card:hover::after,.pg-card:hover::after,.pg-chip:hover::after,
  .rd-story-card:hover::after,.rd-tile:hover::after,.rd-mode:hover::after,.rd-chip:hover::after,.rd-btn:hover::after,
  .ph-pack:hover::after,.ph-fcard:hover::after,.ph-result:hover::after,.ph-mode:hover::after,.ph-cat:hover::after,.ph-daily:hover::after,.ph-review-strip:hover::after,.ph-seeall:hover::after,.ph-sheet-x:hover::after,.ph-search-clear:hover::after,
  .level-chip:hover::after,.grade-chip:hover::after,.subject-tab:hover::after,.answer:hover::after,.mode-card:hover::after,.skill-row:hover::after,.cl-lesson-row:hover::after,
  .mem-card:hover::after,.text-btn:hover::after,.speak-btn:hover::after,.cast-btn:hover::after,.power-btn:hover::after,.cl-cert-tab:hover::after,
  .nav-burger:hover::after,.menu-close:hover::after,.menu-back:hover::after,
  .viewnav-btn:hover::after,.tool-btn:hover::after,.run-btn:hover::after,.stop-btn:hover::after,.complete-btn:hover::after,.inline-btn:hover::after,.clear-btn:hover::after,.reset-code-btn:hover::after,.ctl-btn:hover::after{
    opacity:.38;
  }
}

/* ── Reduced motion: the whole layer stands down ───────────────────────── */
@media (prefers-reduced-motion: reduce){
  *,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
  .kp-roll .kp-col{transition:none!important}
  /* Move 1b stands down too: no wash, no sink from the press class. */
  .btn::after,.press::after,.menu-list a::after,.menu-list .menu-row::after,.kh-mrow::after,
  .level-card::after,.pack-card::after,.guide-card::after,.cl-lang-card::after,.pg-card::after,.pg-chip::after,
  .rd-story-card::after,.rd-tile::after,.rd-mode::after,.rd-chip::after,.rd-btn::after,
  .ph-pack::after,.ph-fcard::after,.ph-result::after,.ph-mode::after,.ph-cat::after,.ph-daily::after,.ph-review-strip::after,.ph-seeall::after,.ph-sheet-x::after,.ph-search-clear::after,
  .level-chip::after,.grade-chip::after,.subject-tab::after,.answer::after,.mode-card::after,.skill-row::after,.cl-lesson-row::after,
  .mem-card::after,.text-btn::after,.speak-btn::after,.cast-btn::after,.power-btn::after,.cl-cert-tab::after,
  .nav-burger::after,.menu-close::after,.menu-back::after,
  .viewnav-btn::after,.tool-btn::after,.run-btn::after,.stop-btn::after,.complete-btn::after,.inline-btn::after,.clear-btn::after,.reset-code-btn::after,.ctl-btn::after{content:none!important}
  .kp-pressing{transform:none!important}
}

/* ═════════════════════════════════════════════════════════════════════════
   POLISH PROGRAMME (owner GO 2026-11-28 ~21:10) — Bell's motion dialect,
   measured in kinpella-work/bell-motion-20261128/BELL-MOTION-NOTES.md,
   spoken in the App Motion Standard's words. MEASUREMENTS ONLY cross
   over (durations, easing curves, choreography patterns) — no Bell
   code, assets, copy or design; no KinPella brand colour changes.
   ═════════════════════════════════════════════════════════════════════════ */

/* ── Mappings 3 + 16 · House motion tokens ────────────────────────────────
   Bell runs on ONE signature curve and a 200/250/300/500 ms duration
   family. KinPella adopts both as tokens beside the standard's springs:
   presses keep Move 1's spring (Bell has no press physics — ours is
   better for touch); colour changes, expansions and panel choreography
   take the signature curve. Reduced motion ZEROES the tokens (Bell's
   own mechanism, mapping 16) on top of the blanket stand-down above. */
:root{
  --kp-ease:cubic-bezier(.55,0,.1,1);
  --kp-ease-fill:cubic-bezier(.2,.8,.4,1);
  --kp-dur-1:200ms;
  --kp-dur-2:250ms;
  --kp-dur-3:300ms;
  --kp-dur-5:500ms;
  --kp-stagger:80ms;
}
@media (prefers-reduced-motion: reduce){
  :root{--kp-dur-1:0s;--kp-dur-2:0s;--kp-dur-3:0s;--kp-dur-5:0s;--kp-stagger:0s}
}

/* ── Mapping 3 · Colour-led feedback on the signature curve ───────────────
   The Move 1 pressables keep their spring transform; their colour and
   shadow legs move from generic ease to the signature curve + tokens. */
.btn,.level-chip,.grade-chip,.subject-tab,.answer,.mode-card,.power-btn,
.nav-burger,.menu-close,.menu-back,.ph-sheet-x,.ph-cat,.ph-mode,.ph-daily,
.ph-review-strip,.ph-pack,.skill-row,.cl-lesson-row,.mem-card,.text-btn,
.speak-btn,.cast-btn,.cl-cert-tab,.ph-seeall,.ph-search-clear{
  transition:transform .8s cubic-bezier(.34,1.45,.64,1),box-shadow var(--kp-dur-1) var(--kp-ease),background-color var(--kp-dur-1) var(--kp-ease),border-color var(--kp-dur-1) var(--kp-ease);
}
/* Chips, pills and picker tiles had NO state transition — selections
   snapped instantly. They now commit over 200–250 ms on the curve. */
.sm2-g,.sm2-s,.ph-cat,.kh-drow,.fam-tile,.fam-tl-chip,.fam-pip{
  transition:background-color var(--kp-dur-2) var(--kp-ease),color var(--kp-dur-1) var(--kp-ease),border-color var(--kp-dur-2) var(--kp-ease);
}
/* Family Games controls shipped with no press motion at all (the motion
   layer never listed them). They take Move 1 like everything else:
   fast sink on the way down (.09s), spring settle on release, colour
   legs on the signature curve. */
.fam-btn,.fam-tile,.fam-answer,.fam-card,.fam-buzz,.fam-tl-chip,.fam-pip,.fam-chipbtn{
  transition:transform .8s cubic-bezier(.34,1.45,.64,1),background-color var(--kp-dur-1) var(--kp-ease),color var(--kp-dur-1) var(--kp-ease),border-color var(--kp-dur-1) var(--kp-ease),box-shadow var(--kp-dur-1) var(--kp-ease);
}
.fam-btn:active:not(:disabled),.fam-tile:active,.fam-answer:active:not(:disabled),
.fam-card:active,.fam-buzz:active:not(:disabled),.fam-tl-chip:active,.fam-pip:active,.fam-chipbtn:active{
  transform:scale(.96);
  transition-duration:.09s,var(--kp-dur-1),var(--kp-dur-1),var(--kp-dur-1),var(--kp-dur-1);
}

/* ── Mapping 1 · One-layer panel open ───────────────────────────────────
   The menus are single panels that slide on the house spring (Move 7
   family, the same curve as .site-menu above): shell and content move
   as ONE layer, content solid from the first frame.
   REMOVED 2026-12-02 (owner recording): the old second layer — heads
   and rows cascading in with kpRise at an 80 ms stagger — read on the
   phone as ghosting: every row hung half-faded, offset 14px under its
   final place, while the panel was already up, so the menu looked
   double-rendered for ~0.6 s on every open. No cascade inside menus. */
.kh-menu{transition:transform .38s cubic-bezier(.3,1.12,.4,1),visibility 0s linear .38s}
.kh-menu.open{transition:transform .38s cubic-bezier(.3,1.12,.4,1)}

/* ── Mapping 2 · The entrance cascade, Bell's choreography ────────────────
   On the FIRST view of a session (html.kp-first, set by motion.js)
   the two hero bands compose themselves the way Bell's home page
   does: 500 ms base delay, regions staggered at the 80 ms unit
   (headline ×1, search ×3), content fading while it rises 32 px.
   Repeat visits skip it — the quick house cascade stays the everyday
   entrance, because KinPella views re-render in place where Bell
   loads a fresh page. */
@keyframes kpBellRise{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:translateY(0)}}
html.kp-first .ph-band .ph-eyebrow,html.kp-first .sm2-band .sm2-eyebrow{animation:kpBellRise var(--kp-dur-5) var(--kp-ease) .5s backwards}
html.kp-first .ph-band h1,html.kp-first .sm2-band h1{animation:kpBellRise var(--kp-dur-5) var(--kp-ease) .58s backwards}
html.kp-first .ph-band .ph-search,html.kp-first .sm2-band .sm2-search{animation:kpBellRise var(--kp-dur-5) var(--kp-ease) .74s backwards}
/* Adventure world banners are painted canvases — the picture settles
   from 1.14 into its frame (Bell's bento-image leg) inside the card's
   clipped frame while the card itself rises with the cascade. */
@keyframes kpBellSettle{from{transform:scale(1.14)}to{transform:scale(1)}}
.adv-card .adv-banner{animation:kpBellSettle var(--kp-dur-5) var(--kp-ease) backwards}
/* Everyday entrances for two mount-driven grids the house cascade
   never reached — same kpRise, staggered at Bell's 80 ms unit.
   (The skill trail and the family board/tiles are deliberately NOT
   cascaded: they re-render on every tap, so a cascade would replay
   under the reader's finger — see the programme report.) */
.fam-grid>*,.adv-cards>*{animation:kpRise .45s var(--kp-ease) backwards}
.fam-grid>*:nth-child(2),.adv-cards>*:nth-child(2){animation-delay:calc(var(--kp-stagger)*1)}
.fam-grid>*:nth-child(3),.adv-cards>*:nth-child(3){animation-delay:calc(var(--kp-stagger)*2)}
.fam-grid>*:nth-child(4),.adv-cards>*:nth-child(4){animation-delay:calc(var(--kp-stagger)*3)}
.fam-grid>*:nth-child(5),.adv-cards>*:nth-child(5){animation-delay:calc(var(--kp-stagger)*4)}
.fam-grid>*:nth-child(n+6),.adv-cards>*:nth-child(n+6){animation-delay:calc(var(--kp-stagger)*4)}

/* ── Mappings 4 + 5 · Search: the soft swap + cascading results ───────────
   Bell's search layer fades in over 500 ms and its suggestions
   cascade (opacity + transform, 80 ms family stagger). KinPella's
   search lives in place: the results region fades-and-rises as it
   swaps in (300 ms), and result rows take the full 500 ms cascade.
   NO autofocus is added anywhere — the keyboard still belongs to a
   deliberate tap into the field (KEYBOARD LAW). */
.ph-results{animation:kpRise var(--kp-dur-3) var(--kp-ease) backwards}
.ph-results>*{animation-duration:var(--kp-dur-5);animation-timing-function:var(--kp-ease)}
.sm2-results-head + .sm2-path>*{animation:kpRise var(--kp-dur-5) var(--kp-ease) backwards}
.ph-results>*:nth-child(2),.sm2-results-head + .sm2-path>*:nth-child(2){animation-delay:calc(var(--kp-stagger)*1)}
.ph-results>*:nth-child(3),.sm2-results-head + .sm2-path>*:nth-child(3){animation-delay:calc(var(--kp-stagger)*2)}
.ph-results>*:nth-child(4),.sm2-results-head + .sm2-path>*:nth-child(4){animation-delay:calc(var(--kp-stagger)*3)}
.ph-results>*:nth-child(5),.sm2-results-head + .sm2-path>*:nth-child(5){animation-delay:calc(var(--kp-stagger)*4)}
.ph-results>*:nth-child(6),.sm2-results-head + .sm2-path>*:nth-child(6){animation-delay:calc(var(--kp-stagger)*5)}
.ph-results>*:nth-child(n+7),.sm2-results-head + .sm2-path>*:nth-child(n+7){animation-delay:calc(var(--kp-stagger)*6)}

/* ── Mapping 6 · Nav indicator: a drawn line ──────────────────────────────
   Bell's nav underline grows (opacity 200 ms). The desktop nav rows
   keep their pale active pill (the resting state) and gain the drawn
   line under the label on hover and on the active row — currentColor,
   so no new colour enters the palette. */
@media (min-width:1024px){
  .kh-dnav .kh-drow{position:relative}
  .kh-dnav .kh-drow::after{content:"";position:absolute;left:13px;right:13px;bottom:5px;height:2px;border-radius:2px;background:currentColor;opacity:0;transform:scaleX(.35);transition:opacity var(--kp-dur-1) var(--kp-ease),transform var(--kp-dur-2) var(--kp-ease)}
  .kh-dnav .kh-drow:hover::after,.kh-dnav .kh-drow.active::after{opacity:.8;transform:scaleX(1)}
}

/* ── Mapping 7 · Accordions: grow to make room, arrow turns ───────────────
   Bell's shop accordion grows over 500 ms on the signature curve and
   its icon rotates over 300 ms (Move 27 exactly, animated to the real
   content — never an oversized max-height). KinPella's expanding
   bodies move from the house 350 ms grow to the 500 ms signature
   grow, and the FAQ summary gains the turning chevron it never had
   (drawn from borders in currentColor — no new colour, no asset). */
.faq-item[open ]>p,.faq-item[open ]>div,.skill-detail,
details.lesson-content .lesson-details-body{animation-duration:var(--kp-dur-5);animation-timing-function:var(--kp-ease)}
.faq-item summary{list-style:none;position:relative;padding-right:36px}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{content:"";position:absolute;right:6px;top:50%;width:10px;height:10px;margin-top:-8px;border-right:2.4px solid currentColor;border-bottom:2.4px solid currentColor;transform:rotate(45deg);transition:transform var(--kp-dur-3) var(--kp-ease)}
.faq-item[open ] summary::after{transform:rotate(225deg);margin-top:-2px}

/* ── Mapping 9 · Sheets: fade + rise, Bell's modal politeness ─────────────
   The desktop dialect of Move 7: the dialog fades in while rising a
   short distance (~300 ms class). Applied to the Adventure Sources
   sheet (the TV sheet's own timing is aligned in tv-sheet.css; the
   mobile bottom-sheet pattern elsewhere is unchanged). */
@keyframes kpFadeIn{from{opacity:0}to{opacity:1}}
@keyframes kpSheetRise{from{opacity:0;transform:translateY(15%)}to{opacity:1;transform:translateY(0)}}
.adv-sheet-backdrop{animation:kpFadeIn var(--kp-dur-1) var(--kp-ease) both}
.adv-sheet{animation:kpSheetRise var(--kp-dur-3) var(--kp-ease) both}

/* ── Mapping 10 · Dropdowns: grow from the point (Move 8) ─────────────────
   The language menus scale up from the pill that summoned them
   instead of popping in — 250 ms, signature curve, anchored at the
   menu's top inline-end corner where the pill sits. */
@keyframes kpPop{from{opacity:0;transform:scale(.55) translateY(-4px)}to{opacity:1;transform:scale(1) translateY(0)}}
.kh-langmenu{transform-origin:top right}
.kh-langmenu:not([hidden]){animation:kpPop var(--kp-dur-2) var(--kp-ease) both}
.lang-menu{transform-origin:top right}
html[dir="rtl"] .lang-menu{transform-origin:top left}
.lang-menu:not([hidden]){animation:kpPop var(--kp-dur-2) var(--kp-ease) both}

/* ── Mapping 13 · Waiting: shimmer, the surface preparing ─────────────────
   Bell's placeholders sweep a shimmer instead of spinning a wheel of
   apology. The skill map's searching/loading line gains a shimmer
   bar in the existing track tones (a loading loop — linear is the
   one place a constant speed is honest). */
@keyframes kpShimmer{from{background-position:200% 0}to{background-position:-200% 0}}
.sm2-loading::after{content:"";display:block;height:12px;max-width:420px;margin:16px auto 0;border-radius:99px;background:linear-gradient(100deg,#eceef7 40%,#ffffff 50%,#eceef7 60%);background-size:200% 100%;animation:kpShimmer 1.4s linear infinite}

/* ── Mapping 15 · One chase sweep on the featured offer ───────────────────
   Bell's featured card gets ONE celebratory sweep on arrival, then
   stillness (Move 12's discipline). KinPella's featured offer is the
   Premium strip on the account view: a single soft sheen crosses it
   once per mount, 1500 ms on Bell's chase curve. Pointer-transparent,
   layout-neutral — the auth switch beside it is untouched. */
.premium-strip{position:relative;overflow:hidden}
.premium-strip::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(105deg,transparent 32%,rgba(255,255,255,.16) 50%,transparent 68%);transform:translateX(-130%);animation:kpChase 1.5s cubic-bezier(.2,.58,1) .3s both}
@keyframes kpChase{from{transform:translateX(-130%)}to{transform:translateX(130%)}}

/* ── Mapping 15b · The credits card earns the same single sweep ──────────
   Fancy pass (owner, 2026-11-30): the Premium credits card is the second
   featured offer on the account view, so it takes the identical
   discipline — ONE soft sheen on mount (kpChase, the chase curve), then
   stillness. No other surface gains a sweep; the blanket reduced-motion
   stand-down in styles.css stills it with everything else. */
.credits-card::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(105deg,transparent 32%,rgba(255,255,255,.16) 50%,transparent 68%);transform:translateX(-130%);animation:kpChase 1.5s cubic-bezier(.2,.58,1) .3s both}
