/* 📄 Lý thuyết page (theory.js): interactive knowledge + Koala narrator. Loaded after theme-bunny.css; all classes t-*. */
:root { --violet: #6b5bd6; --violet-soft: #ebe8fc; --sky: #2f7fd1; --sky-soft: #e1eefc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --violet: #a99cf5; --violet-soft: #2a2550; --sky: #7db8f2; --sky-soft: #1a2f47; } }
:root[data-theme="dark"] { --violet: #a99cf5; --violet-soft: #2a2550; --sky: #7db8f2; --sky-soft: #1a2f47; }

.t-page { max-width: 1100px; padding-bottom: 140px; }
.t-page h2 { margin: 0; font-weight: 900; color: var(--navy); }
.t-page h3 { font-weight: 800; }
.t-center { text-align: center; }
.t-center-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: center; }
.t-gap { margin-bottom: 14px; }
.t-p { margin: 0 0 10px; }
.t-h { margin: 14px 0 8px; font-size: 1rem; color: var(--navy); }
.t-tag { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.t-tag.a { background: var(--violet-soft); color: var(--violet); }
.t-big { font-size: 1.2rem; min-width: 70px; justify-content: center; }

/* ---------- hero ---------- */
.t-hero { position: relative; overflow: hidden; border-radius: 28px; padding: 28px 30px; color: var(--ink); box-shadow: var(--shadow);
  background: var(--panel); border: 1px solid var(--line); }
/* Koala rises once from the bottom edge, then stays and bobs gently */
.t-hero .peek { position: absolute; right: 170px; bottom: 0; width: 150px; pointer-events: none; transform: translateY(110%); transform-origin: 50% 100%;
  filter: drop-shadow(0 6px 12px rgba(31,58,104,.15));
  animation: tPeekUp 1.1s cubic-bezier(.35,1.4,.5,1) .3s forwards, tBob 4s ease-in-out 1.4s infinite; }
@keyframes tPeekUp { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes tBob { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(3%) rotate(-3deg); } 75% { transform: translateY(3%) rotate(3deg); } }
@keyframes tFloat { 50% { transform: translateY(-14px) rotate(4deg); } }
.t-hero .row-h { position: relative; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.t-hero .txt { flex: 1 1 380px; }
.t-hero h1 { color: var(--navy); font-size: 2.1rem; line-height: 1.15; margin: 10px 0 0; font-weight: 900; }
.t-hero p { margin: 8px 0 0; color: var(--ink-2); max-width: 640px; }
.t-tag.hero { background: var(--panel-2); color: var(--navy); }
.t-hero .stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.t-hero .stats > * { background: var(--panel-2); border-radius: 99px; padding: 5px 12px; font-size: .82rem; font-weight: 700; color: var(--navy); text-decoration: none; border: 0; }
.t-hero .stats a:hover, .t-hero .stats button:hover { background: var(--accent-soft); }
.t-hero .koala-cta { background: var(--accent) !important; color: var(--accent-ink) !important; cursor: pointer; box-shadow: 0 6px 16px rgba(23,145,124,.25); animation: tNudge 2.6s ease-in-out infinite; }
@keyframes tNudge { 0%, 80%, 100% { transform: none; } 88% { transform: rotate(-3deg) scale(1.05); } 94% { transform: rotate(3deg) scale(1.05); } }
.t-ring { position: relative; width: 112px; height: 112px; flex: none; }
.t-ring svg { transform: rotate(-90deg); }
.t-ring circle { fill: none; stroke-width: 10; }
.t-ring .bg { stroke: var(--panel-2); }
.t-ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }
.t-ring b { color: var(--navy); position: absolute; inset: 0; display: grid; place-items: center; align-content: center; font-size: 1.5rem; font-weight: 900; line-height: 1; text-align: center; }
.t-ring b small { display: block; font-size: .7rem; font-weight: 700; opacity: .85; margin-top: 3px; }

/* ---------- chapter bar ---------- */
.t-chapters { position: sticky; top: 0; z-index: 10; margin: 18px 0 0; padding: 10px 2px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.t-chapters a { flex: none; text-decoration: none; color: var(--ink-2); font-weight: 800; font-size: .85rem; padding: 7px 14px; border-radius: 99px;
  background: var(--panel); border: 1px solid var(--line); transition: all .25s; display: flex; gap: 6px; align-items: center; }
.t-chapters a.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.t-chapters a.done::after { content: "✓"; color: var(--ok); }
.t-chapters a.on.done::after { color: inherit; }

/* ---------- parts, cards ---------- */
.t-part { margin-top: 34px; scroll-margin-top: 70px; }
.t-part-head, .t-card, .t-check { scroll-margin-top: 80px; }
.t-part-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; border-radius: 18px; flex-wrap: wrap; }
.t-part-head .no { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; background: var(--panel); box-shadow: var(--shadow); }
.t-part-head p { margin: 2px 0 0; }
.t-part-koala.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.t-card { margin-bottom: 14px; transition: box-shadow .3s, outline-color .3s; outline: 3px solid transparent; outline-offset: 2px; }
.card.t-card + .card.t-card { margin-top: 0; }
.t-card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.t-card-title h3 { margin: 0; font-size: 1.05rem; }
.t-card-title .num { font-size: .78rem; font-weight: 900; color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 2px 8px; }
.t-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.t-row > .t-card { margin-bottom: 0; }
.t-lit { outline: 3px solid var(--accent-2) !important; outline-offset: 3px; box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent-2) 18%, transparent), var(--shadow) !important; }

.t-rv { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1), outline-color .3s, box-shadow .3s; transition-delay: calc(var(--i, 0) * 70ms); }
.t-rv.in { opacity: 1; transform: none; }

/* play buttons */
.t-say { border: none; background: var(--accent-soft); color: var(--accent); width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: .8rem; flex: none; transition: transform .15s, background .2s; vertical-align: middle; cursor: pointer; padding: 0; }
.t-say:hover { transform: scale(1.12); }
.t-say.playing, .t-saytext.playing { background: var(--accent); color: var(--accent-ink); animation: tPulse 1s ease-in-out infinite; }
@keyframes tPulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 22%, transparent); } }
.t-saytext { cursor: pointer; font-weight: 800; color: var(--accent); border-bottom: 2px dotted color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 4px; padding: 0 2px; }
.t-saytext:hover { background: var(--accent-soft); }

/* tip */
.t-tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); margin-top: 14px; font-size: .92rem; }
.t-tip b { color: var(--warn); }

/* rules */
.t-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.t-rules li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--panel-2); }
.t-rules .ic { font-size: 1.1rem; line-height: 1.4; }
.t-vs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.t-vs .good, .t-vs .bad { font-size: .85rem; font-weight: 800; padding: 2px 10px; border-radius: 99px; }
.t-vs .good { background: var(--ok-soft); color: var(--ok); }
.t-vs .good .t-saytext { color: inherit; }
.t-vs .bad { background: var(--bad-soft); color: var(--bad); text-decoration: line-through; }

/* examples */
.t-ex { display: grid; gap: 8px; }
.t-ex-row { display: grid; grid-template-columns: minmax(90px, 150px) 24px 1fr auto; gap: 4px 10px; align-items: center; padding: 9px 12px;
  border-radius: 12px; border: 1px solid var(--line); transition: background .2s, transform .2s; cursor: pointer; }
.t-ex-row:hover { background: var(--accent-soft); transform: translateX(3px); }
.t-ex-row .w { font-weight: 900; font-size: 1.1rem; font-variant-numeric: tabular-nums; color: var(--navy); }
.t-ex-row .arrow { color: var(--ink-3); }
.t-ex-row .r { font-weight: 800; color: var(--accent); }
.t-ex-row .note { grid-column: 3 / 5; font-size: .8rem; color: var(--ink-3); margin-top: -4px; }
.t-pair { display: inline-block; padding: 0 3px; border-radius: 5px; margin-right: 1px; }
.t-pair.p0 { background: var(--sky-soft); color: var(--sky); }
.t-pair.p1 { background: var(--violet-soft); color: var(--violet); }

/* choices */
.t-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.t-choice { position: relative; border-radius: 18px; padding: 18px; border: 2px solid var(--line); overflow: hidden; }
.t-choice:hover { border-color: var(--accent-2); }
.t-choice.in:hover { transform: translateY(-4px); }
.t-choice .big { font-size: 2rem; font-weight: 900; color: var(--accent); }
.t-choice .wm { position: absolute; right: -16px; top: -26px; font-size: 7rem; font-weight: 900; opacity: .06; pointer-events: none; }
.t-choice .when { font-size: .88rem; color: var(--ink-2); margin: 4px 0 10px; min-height: 2.6em; }

/* pairs (stress) */
.t-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.t-side { border-radius: 18px; padding: 18px; text-align: center; background: var(--panel-2); cursor: pointer; transition: transform .2s; }
.t-side:hover { transform: scale(1.02); }
.t-side .n { font-size: 3rem; font-weight: 900; line-height: 1.1; color: var(--navy); margin-top: 6px; }
.t-side .syl { display: flex; justify-content: center; align-items: flex-end; gap: 4px; height: 64px; margin: 10px 0 6px; }
.t-side .syl span { font-weight: 800; color: var(--ink-3); font-size: 1.1rem; padding: 2px 6px; border-radius: 8px; }
.t-side .syl span.s { font-size: 2rem; color: var(--accent); background: var(--accent-soft); }
.t-side.a .syl span.s { color: var(--violet); background: var(--violet-soft); }
.t-side.go .syl span.s { animation: tStress .6s ease-out 2; }
@keyframes tStress { 40% { transform: scale(1.3); } }
.t-side .bars { display: flex; justify-content: center; gap: 4px; align-items: flex-end; height: 26px; }
.t-side .bars i { display: block; width: 26px; border-radius: 6px 6px 2px 2px; background: var(--line); }
.t-side .bars i.s { background: var(--accent); }
.t-side.a .bars i.s { background: var(--violet); }
.t-game { margin-top: 14px; padding: 14px; border-radius: 14px; border: 2px dashed var(--line); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.t-res { font-weight: 800; }

/* split */
.t-split { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 16px 0 6px; }
.t-split .dig { display: flex; flex-direction: column; align-items: center; gap: 6px; transition: margin .5s cubic-bezier(.3,1.4,.5,1); }
.t-split .d { font-size: 2.8rem; font-weight: 900; color: var(--navy); line-height: 1; }
.t-split .d.drop { opacity: .3; text-decoration: line-through; }
.t-split .pt .d { color: var(--bad); }
.t-split .lbl { font-size: .9rem; font-weight: 800; color: var(--accent); opacity: 0; transform: translateY(-8px); transition: all .35s; transition-delay: calc(var(--k) * 180ms); white-space: nowrap; }
.t-split.on .dig { margin: 0 10px; }
.t-split.on .lbl { opacity: 1; transform: none; }

/* variants */
.t-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.t-mode { border: 2px solid var(--line); background: var(--panel); border-radius: 14px; padding: 10px; text-align: left; cursor: pointer; transition: all .2s; }
.t-mode b { display: block; }
.t-mode small { color: var(--ink-3); }
.t-mode.on { border-color: var(--accent); background: var(--accent-soft); }
.t-vnum { display: flex; justify-content: center; gap: 4px; margin: 18px 0; min-height: 80px; align-items: center; flex-wrap: wrap; }
.t-vnum .g { display: flex; gap: 3px; padding: 6px 8px; border-radius: 14px; margin: 0 2px; }
.t-vnum .g span { font-size: 3rem; font-weight: 900; line-height: 1; }
.t-vnum .g.pre { color: var(--ink-3); }
.t-vnum .c0 { background: var(--sky-soft); color: var(--sky); }
.t-vnum .c1 { background: var(--violet-soft); color: var(--violet); }
.t-vnum .c2 { background: var(--accent-soft); color: var(--accent); }
.t-vnum .c3 { background: var(--warn-soft); color: var(--warn); }
.t-vread { text-align: center; font-size: 1.5rem; font-weight: 900; color: var(--navy); min-height: 2.2em; }
.t-vread .w { display: inline-block; animation: tPop .4s both; animation-delay: calc(var(--k) * 60ms); margin: 0 3px; }

/* flip */
.t-flips { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.t-flip { perspective: 800px; height: 104px; cursor: pointer; }
.t-flip .in { position: relative; width: 100%; height: 100%; transition: transform .55s cubic-bezier(.3,1.2,.5,1); transform-style: preserve-3d; }
.t-flip.f .in { transform: rotateY(180deg); }
.t-flip .fr, .t-flip .bk { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 16px; display: grid; place-items: center; text-align: center; padding: 8px; }
.t-flip .fr { background: var(--panel-2); border: 1px solid var(--line); }
.t-flip .fr b { font-size: 1.6rem; font-weight: 900; color: var(--navy); }
.t-flip .fr small { display: block; color: var(--ink-3); font-size: .72rem; }
.t-flip .bk { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; transform: rotateY(180deg); font-weight: 800; }
.t-flip .bk small { display: block; opacity: .85; font-weight: 600; font-size: .75rem; }

/* tiles */
.t-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.t-tiles.mono { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.t-tile { border-radius: 16px; padding: 14px; background: var(--panel-2); cursor: pointer; }
.t-tile.in:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: var(--shadow); }
.t-tile.playing { background: var(--accent-soft); }
.t-tile .s { font-size: 2.2rem; font-weight: 900; color: var(--accent); line-height: 1.1; }
.t-tiles.mono .s { font-size: 1.4rem; font-family: Consolas, monospace; color: var(--navy); }
.t-tile .n { font-weight: 900; margin-top: 4px; }
.t-tiles.mono .n { font-weight: 600; font-size: .8rem; color: var(--ink-3); }
.t-tile .e { font-size: .82rem; color: var(--ink-2); margin-top: 4px; }
.t-tile .e.r { font-weight: 800; color: var(--accent); font-size: .92rem; }

/* compare */
.t-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.t-cmp { border-radius: 18px; padding: 16px; background: var(--panel-2); text-align: center; }
.t-cmp.c0 { color: var(--sky); } .t-cmp.c1 { color: var(--violet); }
.t-cmp > * { color: var(--ink); }
.t-cmp .muted { color: var(--ink-2); }
.t-cmp svg, .t-cmp .t-ramp { color: inherit; }
.t-cmp > div:has(svg) { color: inherit; }
.t-cmp .big { font-size: 1.8rem; font-weight: 900; color: var(--navy); }
.t-cmp .word { display: inline-block; font-size: 1.1rem; font-weight: 900; padding: 2px 12px; border-radius: 99px; margin: 4px 0 10px; }
.t-cmp.c0 .word { background: var(--sky-soft); color: var(--sky); }
.t-cmp.c1 .word { background: var(--violet-soft); color: var(--violet); }
.t-cmp .chips { justify-content: center; margin-top: 8px; }

/* reorder */
.t-reorder { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.t-cal { width: 130px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); text-align: center; background: var(--panel); flex: none; }
.t-cal .top { background: var(--bad); color: #fff; font-weight: 900; padding: 6px; letter-spacing: .08em; }
.t-cal .day { font-size: 3rem; font-weight: 900; color: var(--navy); line-height: 1.2; }
.t-cal .yr { color: var(--ink-3); font-weight: 800; padding-bottom: 8px; }
.t-order { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.t-order span { padding: 6px 12px; border-radius: 10px; font-weight: 900; }
.t-order .d { background: var(--accent-soft); color: var(--accent); }
.t-order .m { background: var(--violet-soft); color: var(--violet); }
.t-order .y { background: var(--panel-2); color: var(--ink-2); }

/* letters */
.t-abc { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.t-lt { position: relative; aspect-ratio: 1; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; text-align: center;
  cursor: pointer; transition: transform .2s, background .2s; padding: 4px; }
.t-lt:hover { transform: translateY(-3px); }
.t-lt.hard { border: 2px solid var(--warn); background: var(--warn-soft); }
.t-lt.hard::after { content: "!"; position: absolute; top: 4px; right: 7px; font-weight: 900; color: var(--warn); font-size: .8rem; }
.t-lt.playing { background: var(--accent-soft); }
.t-lt .L { font-size: 1.7rem; font-weight: 900; color: var(--navy); line-height: 1; }
.t-lt .ipa { font-size: .72rem; color: var(--ink-2); font-family: "Segoe UI", sans-serif; }
.t-lt .vn { font-size: .75rem; font-weight: 800; color: var(--accent); }
.t-lt .alt { font-size: .82rem; font-weight: 900; color: var(--violet); display: none; }
.t-abc.alt .t-lt .alt { display: block; }
.t-abc.alt .t-lt .ipa, .t-abc.alt .t-lt .vn { display: none; }
.t-confuse { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }

/* chat */
.t-chat { display: grid; gap: 10px; }
.t-bub { max-width: 640px; display: flex; gap: 10px; align-items: flex-start; }
.t-bub:nth-child(even) { margin-left: auto; flex-direction: row-reverse; }
.t-bub .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); flex: none; font-size: 1.1rem; }
.t-bub .b { background: var(--panel-2); border-radius: 18px 18px 18px 4px; padding: 10px 14px; cursor: pointer; transition: transform .2s; }
.t-bub:nth-child(even) .b { background: var(--accent-soft); border-radius: 18px 18px 4px 18px; }
.t-bub .b:hover { transform: scale(1.02); }
.t-bub .ctx { font-size: .72rem; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.t-bub .t { font-weight: 700; }
.t-bub mark { background: none; color: var(--accent); font-weight: 900; }

/* steps */
.t-steps { counter-reset: s; display: grid; gap: 10px; }
.t-step { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--panel-2); }
.t-step::before { counter-increment: s; content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 900; }

/* checkpoint */
.t-check { border-radius: var(--r); padding: 18px 20px; background: linear-gradient(135deg, var(--accent-soft), var(--panel)); margin-bottom: 14px; outline: 3px solid transparent; outline-offset: 2px; }
.t-check-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.t-done-btn { margin-left: auto; }
.t-done-btn.ok { background: var(--ok) !important; }
.t-qs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.t-q { border-radius: 14px; background: var(--panel); border: 1px solid var(--line); padding: 12px 14px; cursor: pointer; transition: all .25s; }
.t-q .w { font-size: 1.3rem; font-weight: 900; color: var(--navy); }
.t-q .ctx { font-size: .75rem; color: var(--ink-3); font-weight: 700; }
.t-q .a { max-height: 0; overflow: hidden; opacity: 0; transition: all .4s; font-weight: 800; color: var(--accent); }
.t-q.open .a { max-height: 80px; opacity: 1; margin-top: 6px; }
.t-q:not(.open) .hint::after { content: "Chạm để xem cách đọc →"; font-size: .75rem; color: var(--ink-3); }

.t-finish { text-align: center; padding: 30px 20px; }
.t-finish .big { font-size: 3rem; display: inline-block; animation: tFloat 3s ease-in-out infinite; }

/* ---------- Koala narrator (fixed, bottom right) ---------- */
.t-koala { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: flex; align-items: flex-end; gap: 10px; flex-direction: row-reverse; }
.t-k-av { position: relative; width: 84px; height: 84px; border-radius: 50%; border: 0; padding: 8px; cursor: pointer; flex: none;
  background: radial-gradient(circle at 50% 40%, #fff, var(--accent-soft)); box-shadow: 0 10px 28px rgba(31,58,104,.22); }
.t-k-av img { width: 100%; height: 100%; animation: tBob 3.2s ease-in-out infinite; }
@keyframes tBob { 50% { transform: translateY(-4px); } }
.t-koala.talk .t-k-av img { animation: tTalk .42s ease-in-out infinite alternate; }
@keyframes tTalk { from { transform: translateY(0) rotate(-3deg) scale(1); } to { transform: translateY(-5px) rotate(3deg) scale(1.06); } }
.t-koala.talk .t-k-av::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--accent-2); animation: tRing 1.2s ease-out infinite; }
@keyframes tRing { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.t-k-hint { position: absolute; right: 90px; bottom: 26px; white-space: nowrap; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: .82rem;
  padding: 6px 12px; border-radius: 99px 99px 4px 99px; box-shadow: var(--shadow); animation: tNudge 2.6s ease-in-out infinite; }
.t-koala.open .t-k-hint { display: none; }
.t-k-box { display: none; width: min(430px, calc(100vw - 130px)); background: var(--panel); border-radius: 22px 22px 6px 22px; box-shadow: 0 16px 40px rgba(31,58,104,.22);
  padding: 14px 16px 12px; border: 1px solid var(--line); transform-origin: bottom right; }
.t-koala.open .t-k-box { display: block; animation: tPop .35s cubic-bezier(.3,1.4,.5,1); }
.t-k-top { display: flex; gap: 8px; align-items: baseline; }
.t-k-top b { color: var(--navy); }
.t-k-x { margin-left: auto; border: 0; background: var(--panel-2); border-radius: 50%; width: 26px; height: 26px; cursor: pointer; font-weight: 900; color: var(--ink-2); }
.t-k-sub { margin: 10px 0; font-size: 1rem; line-height: 1.5; min-height: 3em; max-height: 9em; overflow-y: auto; }
.t-k-sub .sg { transition: color .2s, background .2s; border-radius: 5px; color: var(--ink-3); }
.t-k-sub .sg.en { font-weight: 800; }
.t-k-sub .sg.now { color: var(--ink); background: var(--accent-soft); }
.t-k-sub .sg.en.now { color: var(--accent); }
.t-k-track { position: relative; height: 8px; border-radius: 4px; background: var(--panel-2); margin-bottom: 10px; cursor: pointer; touch-action: none; }
.t-k-track > span { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--line); pointer-events: none; }
.t-k-bar { border-radius: 4px; pointer-events: none; }
.t-k-bar { height: 100%; background: var(--accent); width: 0; transition: width .4s; }
.t-k-ctl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.t-k-btn, .t-k-play { border: 0; cursor: pointer; border-radius: 50%; display: grid; place-items: center; }
.t-k-btn { width: 34px; height: 34px; background: var(--panel-2); color: var(--ink); }
.t-k-play { width: 44px; height: 44px; background: var(--accent); color: var(--accent-ink); font-size: 1.1rem; box-shadow: 0 6px 14px rgba(47,179,156,.3); }
.t-k-speed { display: flex; gap: 4px; margin-left: 4px; }
.t-k-ctl .chip { padding: 4px 9px; font-size: .78rem; }

/* shared motion */
.t-pop { animation: tPop .45s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes tPop { 0% { transform: scale(.6); opacity: 0; } }
.t-shake { animation: tShake .4s; }
@keyframes tShake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.t-confetti { position: fixed; top: -10px; width: 9px; height: 14px; border-radius: 2px; z-index: 60; pointer-events: none; animation: tFall 1.8s ease-in forwards; }
@keyframes tFall { to { transform: translateY(105vh) rotate(720deg); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .t-rv { opacity: 1; transform: none; transition: none; } .t-page *, .t-koala * { animation: none !important; } .t-hero .peek { transform: none; } }

@media (max-width: 760px) {
  .t-hero { padding: 22px 18px; } .t-hero .peek { right: 12px; width: 96px; } .t-hero h1 { font-size: 1.6rem; }
  .t-pairs { grid-template-columns: 1fr; }
  .t-ex-row { grid-template-columns: 80px 16px 1fr auto; }
  .t-vnum .g span, .t-split .d { font-size: 2.2rem; }
  .t-koala { right: 12px; bottom: 12px; } .t-k-av { width: 64px; height: 64px; } .t-k-hint { right: 70px; bottom: 16px; }
}
