/* HSK 3 lesson page CSS, copied verbatim from /hsk3/lesson-1/ (19 Nov 2026) so HSK 1 lessons look the same. */

:root {
  --bg: #F4F1EC; --rail: #FAF7F2; --surface: #FFFFFF; --ink: #161412; --ink-2: #4D4944; --ink-3: #857C71;
  --cobalt: #2B2724; --cobalt-2: #E07A36; --cobalt-wash: #EFE9DF; --grid: #D8CFC2; --line: #E3DCD1;
  --celadon: #2F8571; --celadon-wash: #E3F2EE; --cinnabar: #D9442B; --cinnabar-wash: #FBEAE6; --amber-wash: #FFF2D9; --amber: #8A5A00;
  --shadow: 0 1px 0 rgba(13,12,11,.05), 0 14px 32px -20px rgba(13,12,11,.45);
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --han: "Noto Serif SC", "Songti SC", "SimSun", serif; --hans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
@media (prefers-color-scheme: dark) and (min-width: 100000px) {
  :root {
    --bg: #0D1330; --rail: #111839; --surface: #151D44; --ink: #E9ECF8; --ink-2: #AEB5D4; --ink-3: #8790B6;
    --cobalt: #9DB0FF; --cobalt-2: #B9C7FF; --cobalt-wash: #1E2858; --grid: #3A4787; --line: #252F60;
    --celadon: #6CC7B0; --celadon-wash: #143A3A; --cinnabar: #FF8A73; --cinnabar-wash: #3A1E2A; --amber-wash: #3A2E14; --amber: #F2C46B;
    --shadow: 0 18px 40px -24px rgba(0,0,0,.8);
  }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--cobalt); }
:focus-visible { outline: 2px solid var(--cobalt-2); outline-offset: 2px; border-radius: 8px; }
.zh { font-family: var(--hans); }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.top { height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.seal { width: 30px; height: 30px; border-radius: 6px; background: #D9442B; color: #fff; display: grid; place-items: center; font-family: var(--han); font-weight: 700; font-size: 17px; line-height: 1; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.brand { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 14px; margin-left: 8px; }
.crumbs b { color: var(--ink); font-weight: 600; } .crumbs .sl { color: var(--line); }
.ring { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.ring svg { width: 34px; height: 34px; transform: rotate(-90deg); }
.ring .trk { stroke: var(--cobalt-wash); } .ring .val { stroke: var(--celadon); transition: stroke-dashoffset .5s ease; }
.ring b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.rail { background: var(--rail); border-right: 1px solid var(--line); padding: 20px 12px 28px; height: calc(100vh - 60px); position: sticky; top: 60px; overflow-y: auto; }
.rail h2 { font-size: 13px; font-weight: 500; color: var(--ink-3); margin: 0 10px 10px; }
.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.toc a:hover { background: var(--cobalt-wash); }
.toc a[aria-current="page"] { background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 6px 16px -10px rgba(13,12,11,.4); }
.toc .k { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--ink-3); box-shadow: inset 0 0 0 1.5px var(--line); }
.toc a[aria-current="page"] .k { background: var(--cobalt); color: #fff; box-shadow: none; }
.toc a.done .k { background: var(--celadon-wash); color: var(--celadon); box-shadow: none; }
.toc a.done[aria-current="page"] .k { background: var(--celadon); color: #fff; }
.toc .sub a { grid-template-columns: 26px 1fr; font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 6px 10px; }
.toc .sub .k { width: 8px; height: 8px; margin: 0 9px; box-shadow: none; background: var(--line); font-size: 0; }
.toc .sub a[aria-current="page"] { background: none; box-shadow: none; color: var(--ink); font-weight: 600; }
.toc .d2 { display: none; }
.toc .sub a[aria-current="page"] .k { background: var(--cobalt); } .toc .sub a.done .k { background: var(--celadon); }
.rail .extras { margin: 22px 10px 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-3); }
.rail .extras a { display: flex; align-items: center; gap: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; padding: 4px 0; }

main { padding: 40px 48px 64px; min-width: 0; }
.view { max-width: 820px; }
.view[hidden] { display: none; }
.vhead { margin-bottom: 26px; }
.vhead .step { font-size: 14px; color: var(--ink-3); }
.vhead h1 { margin: 2px 0 0; font-size: 36px; line-height: 1.15; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.vhead h1 .cn { font-family: var(--han); font-weight: 500; font-size: 24px; color: var(--ink-3); letter-spacing: 0; }
.vhead p { margin: 10px 0 0; color: var(--ink-2); max-width: 64ch; }
h3 { font-size: 20px; letter-spacing: -.01em; margin: 34px 0 12px; }
h4 { font-size: 16px; margin: 0 0 8px; }

/* hero */
.hero { padding: 6px 0 30px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.hero .no { font-size: 15px; font-weight: 600; color: var(--cobalt); }
.hero .title { font-family: var(--han); font-weight: 700; font-size: 54px; line-height: 1.15; letter-spacing: .02em; margin: 8px 0 6px; }
.hero .en { font-size: 20px; color: var(--ink-2); }
.hero .meta { margin-top: 14px; font-size: 14px; color: var(--ink-3); }
.goals { margin: 22px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.goals li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--ink-2); }
.goals li::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--cobalt-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232B2724' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; margin-top: 1px; }

/* panel = the one container style */
.panel { background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--line); padding: 22px; }
.panel + .panel { margin-top: 16px; }

/* warm-up match */
.match-words { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-family: var(--hans); font-size: 18px; }
.chip small { font-family: var(--sans); font-size: 12.5px; color: var(--ink-3); }
.chip[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--cobalt); background: var(--cobalt-wash); }
.chip.used { opacity: .35; pointer-events: none; }
.pics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pic { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line); text-align: left; }
.pic svg { display: block; width: 100%; height: auto; }
.pic img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--cobalt-wash); }
.pic .lt { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 8px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.pic .tag { display: block; padding: 8px 12px; font-family: var(--hans); font-size: 17px; min-height: 42px; color: var(--ink-3); }
.pic.ok { box-shadow: 0 0 0 2px var(--celadon); } .pic.ok .tag { color: var(--celadon); font-weight: 500; }
.pic.no { animation: nope .35s; box-shadow: 0 0 0 2px var(--cinnabar); }
@keyframes nope { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.mstat { margin-top: 12px; font-size: 14px; color: var(--ink-3); }
.talk { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.talk li { padding: 14px 16px; border-radius: 12px; background: var(--rail); box-shadow: inset 0 0 0 1px var(--line); }
.talk .qi { font-family: var(--hans); font-size: 18px; } .talk .qe { font-size: 14px; color: var(--ink-3); }

/* reveal */
.reveal { margin-top: 8px; }
.reveal > button { font-size: 14px; font-weight: 600; color: var(--cobalt); display: inline-flex; align-items: center; gap: 6px; }
.reveal > div { display: none; margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--celadon-wash); font-family: var(--hans); }
.reveal.open > div { display: block; }
.talk .tqp { font-size: 14.5px; color: var(--ink-2); margin-top: 2px; }
.reveal .map { font-family: var(--sans); font-size: 14.5px; color: var(--ink-2); margin-top: 2px; }
.reveal .mae { font-family: var(--sans); font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.ipy { font-family: var(--sans); font-size: 13.5px; font-weight: 400; font-style: normal; color: var(--ink-3); margin-left: .3em; letter-spacing: 0; }
body.no-py .ipy { display: none; }

/* toolbar + toggles */
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 18px; position: sticky; top: 60px; z-index: 5; background: var(--bg); padding: 10px 0; }
.tg { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.tg .sw { width: 34px; height: 20px; border-radius: 10px; background: var(--line); position: relative; transition: background .15s; }
.tg .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.tg[aria-pressed="true"] .sw { background: var(--cobalt); } .tg[aria-pressed="true"] .sw::after { transform: translateX(14px); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--rail); box-shadow: inset 0 0 0 1px var(--line); margin-left: auto; }
.seg button { white-space: nowrap; flex: none; padding: 5px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px -1px rgba(13,12,11,.35); }
/* hidden lines stay tappable (opacity, not visibility, so a tap reaches them) */
body.no-py .py-l:not(.peek), body.no-en .en-l:not(.peek) { opacity: 0; }
.py-l, .en-l { transition: opacity .15s; }
body.no-py .py-l, body.no-en .en-l { cursor: pointer; }
.wcards .py-l, .wcards .en-l { position: relative; }

/* word cards */
.wgroup h3 { display: flex; align-items: baseline; gap: 10px; }
.wgroup h3 small { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.wcards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wcard { background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--line); padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-content: start; }
.wcard > .hz, .wcard > .pyw, .wcard > .en-l { grid-column: 1; }
.wcard .art { grid-column: 2; grid-row: 1 / span 3; width: 104px; border-radius: 10px; overflow: hidden; }
.wcard .art svg { display: block; width: 104px; height: 78px; }
.wcard .art img { display: block; width: 104px; height: 78px; object-fit: cover; background: var(--cobalt-wash); }
.wcard .hz { font-family: var(--han); font-weight: 700; font-size: 34px; line-height: 1.1; display: flex; align-items: baseline; gap: 10px; }
.wcard .hz .num { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--ink-3); }
.wcard .pyw { font-size: 18px; font-weight: 600; color: var(--cobalt); }
.wcard .mean { color: var(--ink); } .wcard .pos { font-size: 13px; color: var(--ink-3); margin-right: 6px; }
.wcard .exm { grid-column: 1 / -1; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.wcard .exm .z { font-family: var(--hans); font-size: 17px; }
.wcard .exm .p { font-size: 13.5px; color: var(--ink-2); } .wcard .exm .e { font-size: 13.5px; color: var(--ink-3); }
.wcard .nt { grid-column: 1 / -1; margin-top: 8px; font-size: 13.5px; color: var(--ink-2); background: var(--rail); border-radius: 8px; padding: 7px 10px; }
.wcard .xt { display: inline-block; font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--amber); background: var(--amber-wash); border-radius: 6px; padding: 1px 7px; }
table.also { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); font-size: 14.5px; }
table.also th { text-align: left; font-weight: 600; font-size: 13px; color: var(--ink-3); padding: 10px 14px; background: var(--rail); }
table.also td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
table.also td:first-child { font-family: var(--hans); font-size: 18px; }

/* texts */
.ttabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ttabs button { padding: 8px 14px; border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); text-align: left; }
.ttabs button b { display: block; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.ttabs button span { font-family: var(--hans); font-size: 17px; }
.ttabs button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--cobalt); }
.ttabs button.done b::after { content: " · checked"; color: var(--celadon); }
.thead { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 20px; align-items: center; margin: 22px 0 18px; }
.thead .tt { font-family: var(--han); font-size: 30px; font-weight: 700; line-height: 1.2; }
.thead .te { color: var(--ink-2); } .thead .ts { margin-top: 8px; font-size: 14.5px; color: var(--ink-3); }
.thead .art svg { width: 150px; height: auto; display: block; border-radius: 12px; }
.dlg { display: grid; gap: 4px; }
.line { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 10px 12px; border-radius: 12px; }
.line:hover { background: var(--surface); }
.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--han); font-weight: 700; font-size: 17px; }
.av.a { background: var(--cobalt-wash); color: var(--cobalt); } .av.m { background: var(--celadon-wash); color: var(--celadon); } .av.w { background: var(--amber-wash); color: var(--amber); }
.line .nm { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.line .z { font-family: var(--hans); font-size: 20px; line-height: 1.6; }
.line .p { font-size: 14.5px; color: var(--ink-2); } .line .e { font-size: 14.5px; color: var(--ink-3); }
.line.nar { grid-template-columns: 1fr; text-align: center; } .line.nar .z { font-size: 16px; color: var(--ink-3); }
.letter { background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--line); padding: 26px 30px; }
.letter .line { grid-template-columns: 1fr; padding: 6px 0; } .letter .line:hover { background: none; }
.letter .line:last-child { text-align: right; }
/* texts as a chat: bubbles, photo avatars, tap a message for pinyin + English */
.dlg { display: flex; flex-direction: column; gap: 14px; margin: 6px 0 28px; }
.msg { display: flex; align-items: flex-end; gap: 10px; max-width: 86%; }
.msg.me { flex-direction: row-reverse; align-self: flex-end; }
.msg .av { flex: none; width: 44px; height: 44px; }
img.av { display: block; border-radius: 50%; object-fit: cover; background: var(--cobalt-wash); box-shadow: 0 0 0 2px var(--surface); }
.bub { background: var(--surface); box-shadow: 0 0 0 1px var(--line); border-radius: 20px 20px 20px 6px; padding: 10px 15px 11px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.msg.me .bub { background: var(--cobalt-wash); box-shadow: none; border-radius: 20px 20px 6px 20px; }
.bub:focus-visible, .letter .tap:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.bub .nm { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 1px; }
.bub .z { font-family: var(--hans); font-size: 20px; line-height: 1.55; }
.bub .p { margin-top: 3px; font-size: 14px; color: var(--ink-2); } .bub .e { font-size: 14px; color: var(--ink-3); }
.msg.nar { align-self: center; max-width: 92%; } .msg.nar .bub { background: none; box-shadow: none; text-align: center; }
.msg.nar .z { font-size: 16px; color: var(--ink-3); }
.hide-py .tap:not(.open) .p, .hide-en .tap:not(.open) .e { display: none; }
.letter .tap { cursor: pointer; }
.thint { display: none; margin: 0 0 12px; font-size: 13.5px; color: var(--ink-3); }
.hide-py .thint, .hide-en .thint { display: block; }
.thead.ph { grid-template-columns: 1fr; margin-bottom: 14px; }
.scene { margin: 0 0 22px; }
.scene img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 12px; background: var(--cobalt-wash); }
.scene figcaption { margin-top: 8px; font-size: 14.5px; color: var(--ink-3); }
.task { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--cobalt-wash); }
.task b { color: var(--cobalt); }

/* reused fragments from the print edition */
.frag { color: var(--ink); }
.frag p { max-width: 68ch; }
.frag .formula { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 16px; margin: 18px 0; border-radius: 12px; background: var(--cobalt); }
.frag .formula .slot { padding: 6px 12px; border-radius: 8px; background: rgba(255,255,255,.14); color: #fff; font-size: 14.5px; font-weight: 500; }
.frag .formula .key { font-family: var(--hans); font-size: 22px; font-weight: 700; color: #fff; padding: 0 4px; }
@media (prefers-color-scheme: dark) and (min-width: 100000px) { .frag .formula { background: #24337A; } }
.frag .cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.frag .ex { display: grid; grid-template-columns: 24px 1fr; gap: 0 10px; padding: 8px 0; }
.frag .ex .mark { grid-row: 1 / span 3; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--cobalt-wash); color: var(--cobalt); margin-top: 3px; }
.frag .ex .mark.neg { background: var(--cinnabar-wash); color: var(--cinnabar); } .frag .ex .mark.q { background: var(--amber-wash); color: var(--amber); }
.frag .ex .zh { font-size: 19px; } .frag .ex .py { font-size: 14px; color: var(--ink-2); } .frag .ex .en { font-size: 14px; color: var(--ink-3); }
.frag .ex > span:not(.mark) { display: block; grid-column: 2; }
.frag h3 { font-size: 17px; margin: 0 0 10px; }
.frag ol { padding-left: 20px; margin: 0; } .frag ol li { margin-bottom: 8px; color: var(--ink-2); } .frag ol li b { color: var(--ink); }
.frag .callout { margin: 20px 0 0; padding: 16px 18px; border-radius: 12px; background: var(--rail); box-shadow: inset 0 0 0 1px var(--line); line-height: 1.9; }
.frag .callout .label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 4px; line-height: 1.5; }
.frag .callout.mistake { background: var(--cinnabar-wash); box-shadow: none; } .frag .callout.mistake .label { color: var(--cinnabar); }
.frag .callout.tip { background: var(--cobalt-wash); box-shadow: none; } .frag .callout.tip .label { color: var(--cobalt); }
.frag .wrong { text-decoration: line-through; text-decoration-color: var(--cinnabar); color: var(--ink-3); }
.frag .small { font-size: 13.5px; color: var(--ink-3); }
.frag table { width: 100%; border-collapse: collapse; margin: 14px 0; background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); font-size: 14.5px; }
.frag th { text-align: left; font-weight: 600; font-size: 13px; color: var(--ink-3); padding: 10px 14px; background: var(--rail); }
.frag td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.frag td .zh { font-size: 17px; } .frag td .py, .frag td .en { font-size: 13.5px; color: var(--ink-3); } .frag td .py { color: var(--ink-2); }
.frag .mt-4 { margin-top: 18px; }
.frag .nb { background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--line); padding: 18px 20px; margin-bottom: 14px; }
.frag .tb-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.frag .tb-head b { font-size: 17px; }
.frag .nb p { margin: 4px 0 8px; }
.frag ul.new { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.frag ul.new li { display: grid; grid-template-columns: minmax(150px, auto) 1fr; gap: 14px; padding-top: 8px; border-top: 1px solid var(--line); }
.frag ul.new li .zh { font-size: 17px; } .frag ul.new .ex-x { color: var(--ink-2); font-size: 14.5px; }

/* practice */
.qs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: q; }
.qi { background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--line); padding: 18px 20px; counter-increment: q; }
.qi .qp { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: baseline; }
.qi .qp::before { content: counter(q); width: 26px; height: 26px; border-radius: 50%; background: var(--rail); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.qi.ok .qp::before { content: ""; background: var(--celadon) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat; box-shadow: none; }
.qi .qz { font-family: var(--hans); font-size: 19px; }
.qi .hint { display: block; font-family: var(--sans); font-size: 13.5px; color: var(--ink-3); }
.qi .body { margin: 12px 0 0 38px; }
.tiles, .built { display: flex; flex-wrap: wrap; gap: 6px; }
.built { min-height: 48px; padding: 6px; border-radius: 12px; background: var(--rail); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 10px; align-items: center; }
.built:empty::before { content: "Tap the words in order"; color: var(--ink-3); font-size: 14px; padding: 0 8px; }
.tile { padding: 6px 12px; border-radius: 9px; background: var(--surface); box-shadow: 0 0 0 1px var(--grid), 0 2px 0 var(--grid); font-family: var(--hans); font-size: 18px; }
.tile[disabled] { opacity: .25; cursor: default; box-shadow: 0 0 0 1px var(--line); }
.built .tile { box-shadow: 0 0 0 1px var(--cobalt); color: var(--cobalt); }
textarea { width: 100%; min-height: 52px; resize: vertical; padding: 10px 12px; border-radius: 12px; border: 0; background: var(--rail); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--hans); font-size: 18px; }
textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--cobalt); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn { text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; font-weight: 600; font-size: 15px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); white-space: nowrap; }
.btn:hover { box-shadow: 0 0 0 1px var(--grid); }
.btn.pri { background: var(--cobalt); color: #fff; box-shadow: none; } .btn.pri:hover { background: var(--cobalt-2); }
@media (prefers-color-scheme: dark) and (min-width: 100000px) { .btn.pri, .toc a[aria-current="page"] .k { color: #0D1330; } }
.btn.ghost { box-shadow: none; color: var(--cobalt); padding: 0 6px; }
.fb { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14.5px; display: none; }
.fb.show { display: block; }
.fb.ok { background: var(--celadon-wash); } .fb.ok b { color: var(--celadon); }
.fb.no { background: var(--cinnabar-wash); } .fb.no b { color: var(--cinnabar); }
.fb.info { background: var(--cobalt-wash); }
.fb .z { font-family: var(--hans); font-size: 18px; }
.opts { display: flex; gap: 8px; }
.opt { min-width: 52px; height: 44px; border-radius: 11px; background: var(--surface); box-shadow: 0 0 0 1px var(--grid), 0 2px 0 var(--grid); font-family: var(--hans); font-size: 20px; }
.opt.ok { background: var(--celadon); color: #fff; box-shadow: none; } .opt.no { background: var(--cinnabar-wash); color: var(--cinnabar); box-shadow: none; }
.bankrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bankrow span { font-family: var(--hans); font-size: 17px; padding: 4px 12px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.gapq { display: grid; grid-template-columns: 1fr 140px; gap: 12px; align-items: center; }
select { height: 42px; border-radius: 11px; border: 0; padding: 0 12px; background: var(--rail); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--hans); font-size: 17px; }
.qi.no select { box-shadow: inset 0 0 0 2px var(--cinnabar); } .qi.ok select { box-shadow: inset 0 0 0 2px var(--celadon); }
.watch { margin-top: 30px; }
.vid { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); text-decoration: none; color: var(--ink); }
.vid + .vid { margin-top: 10px; }
.vid:hover { box-shadow: 0 0 0 1px var(--grid), var(--shadow); }
.vid .pl { width: 44px; height: 44px; border-radius: 12px; background: var(--cinnabar-wash); color: var(--cinnabar); display: grid; place-items: center; }
.vid b { display: block; font-weight: 600; font-size: 16px; } .vid .meta2 { font-size: 13.5px; color: var(--ink-3); }

/* flashcards */
.deck { display: grid; justify-items: center; gap: 16px; }
.card3d { width: min(100%, 460px); aspect-ratio: 4 / 3; perspective: 1200px; }
.card3d .in { position: relative; width: 100%; height: 100%; transition: transform .45s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d; }
.card3d.flip .in { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow); display: grid; place-items: center; text-align: center; padding: 24px; }
.face.back { transform: rotateY(180deg); }
.face .big { font-family: var(--han); font-weight: 700; font-size: 76px; line-height: 1.1; }
.face .bigen { font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.face .pyf { font-size: 26px; font-weight: 600; color: var(--cobalt); }
.face .enf { font-size: 18px; color: var(--ink-2); margin-top: 4px; }
.face .exf { font-family: var(--hans); font-size: 16px; color: var(--ink-3); margin-top: 14px; }
.face .tap { position: absolute; bottom: 14px; left: 0; right: 0; font-size: 13px; color: var(--ink-3); }
.deckbar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.deckstat { font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dots3 { display: flex; gap: 3px; width: min(100%, 460px); }
.dots3 i { flex: 1; height: 5px; border-radius: 3px; background: var(--cobalt-wash); } .dots3 i.k { background: var(--celadon); }

/* writing link */
.wlink { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; padding: 22px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow); text-decoration: none; color: var(--ink); }
.wlink .tilep { aspect-ratio: 1; border-radius: 12px; background: #FFFEFB; box-shadow: 0 0 0 1px #DDD5C8; position: relative; }
.wlink b { font-size: 20px; display: block; letter-spacing: -.01em; } .wlink p { margin: 6px 0 12px; color: var(--ink-2); }

/* footer nav */
.next { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.next .btn.pri { height: 46px; padding: 0 20px; }
.next .lbl { font-size: 13px; color: var(--ink-3); text-align: right; margin-bottom: 4px; }
footer { padding: 0 48px 36px 312px; font-size: 12.5px; color: var(--ink-3); }

@media (max-width: 900px) {
  html { scroll-padding-top: 116px; }
  .top { height: 54px; padding: 0 14px; gap: 10px; }
  .brand, .crumbs .sl, .crumbs .c1 { display: none; }
  .crumbs { margin-left: 0; font-size: 15px; }
  .ring svg { width: 28px; height: 28px; } .ring .lbl { display: none; } .ring { font-size: 13px; gap: 8px; }
  .shell { display: block; }
  .rail { position: sticky; top: 54px; z-index: 9; height: auto; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail h2, .rail .extras { display: none; }
  .toc { display: flex; gap: 4px; } .toc li { flex: none; } .toc .sub, .toc li.has-sub { display: contents; }
  .toc a, .toc .sub a { grid-template-columns: auto auto; gap: 7px; padding: 6px 10px; font-size: 14px; white-space: nowrap; }
  .toc .k { width: 22px; height: 22px; font-size: 11px; }
  .toc li.has-sub > a { display: none; }
  .toc .sub .k, .toc .d1 { display: none; } .toc .d2 { display: inline; }
  .toc .sub a { grid-template-columns: auto; }
  .toc .sub a[aria-current="page"] { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
  .toc .sub a.done .d2::after { content: " \2713"; color: var(--celadon); }
  main { padding: 22px 16px 40px; }
  .vhead h1 { font-size: 28px; } .vhead h1 .cn { font-size: 20px; }
  .hero .title { font-size: 38px; } .hero .en { font-size: 17px; }
  .goals { grid-template-columns: 1fr; }
  .pics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tools { top: 112px; }
  .seg { margin-left: 0; overflow-x: auto; max-width: 100%; }
  .wcards { grid-template-columns: 1fr; }
  .wcard .art, .wcard .art svg, .wcard .art img { width: 88px; height: 66px; }
  .thead { grid-template-columns: minmax(0, 1fr) 96px; } .thead .art svg { width: 96px; } .thead .tt { font-size: 24px; }
  .line { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 8px 4px; } .av { width: 34px; height: 34px; font-size: 15px; }
  .line .z { font-size: 18px; }
  .msg { max-width: 94%; gap: 8px; } .msg .av { width: 36px; height: 36px; } .bub { padding: 9px 13px 10px; } .bub .z { font-size: 18px; }
  .letter { padding: 18px; }
  .frag .cols-2 { grid-template-columns: 1fr; }
  .frag ul.new li { grid-template-columns: 1fr; gap: 2px; }
  .frag table, .frag tbody, .frag tr, .frag td { display: block; } .frag tr:first-child { display: none; } .frag td { border-top: 0; padding: 4px 14px; } .frag tr { border-top: 1px solid var(--line); padding: 8px 0; }
  .qi { padding: 16px; } .qi .body { margin-left: 0; }
  .gapq { grid-template-columns: 1fr; }
  .wlink { grid-template-columns: 1fr; } .wlink .tilep { width: 140px; }
  .face .big { font-size: 60px; }
  .next .lbl { display: none; }
  footer { padding: 0 16px 28px; }
}
@media (prefers-reduced-motion: reduce) { .card3d .in, .ring .val, .tg .sw, .tg .sw::after { transition: none; } .pic.no { animation: none; } }

.wlink .tilep.face { overflow: hidden; background: #E9D2BB; }
.wlink .tilep.face img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none; padding: 0; margin: 0; object-fit: cover; display: block; border-radius: inherit; }
.wlink .tilep.face .live { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 99px; background: rgba(13,12,11,.72); color: #fff; font: 600 11px var(--sans); letter-spacing: .04em; }
.wlink .tilep.face .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2FBF71; }
.mission { list-style: none; padding: 0; margin: 4px 0 14px; display: grid; gap: 6px; }
.mission li { display: flex; gap: 10px; align-items: baseline; color: var(--ink-2); }
.mission li b { font-size: 15px; display: inline; font-weight: 600; color: var(--ink); }
.mission li .n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--cobalt-wash); color: var(--cobalt); }
.speaknote { color: var(--ink-3); font-size: 13.5px; margin-top: 14px; }
.av.l { background: #F3E8F6; color: #7A3B8F; } .av.s { background: var(--rail); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
@media (prefers-color-scheme: dark) and (min-width: 100000px) { .av.l { background: #3A2347; color: #E3B6F2; } }
.letter.diary .line:last-child, .letter.message .line:last-child, .letter.talk .line:last-child { text-align: left; }
.av.y { background: #FBE7DA; color: #A4502A; }
@media (prefers-color-scheme: dark) and (min-width: 100000px) { .av.y { background: #4A2A1A; color: #F2BC9A; } }
.frag .formula .or { color: rgba(255,255,255,.7); font-size: 13px; padding: 0 2px; }
.frag .exgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin-bottom: 8px; align-items: start; } .frag .exgrid .ex { align-content: start; }
.frag .keypts { margin-top: 14px; grid-template-columns: 1.2fr 1fr; }
.frag .keypts .callout { margin: 0; }
@media (max-width: 640px) { .frag .keypts { grid-template-columns: 1fr; } }
.frag ul.new li > span:first-child > .ipy { display: block; margin-left: 0; margin-top: 1px; }
.frag .breakdown { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 18px; }
.frag .breakdown span { display: grid; gap: 2px; padding: 8px 12px; border-radius: 10px; background: var(--cobalt-wash); text-align: center; }
.frag .breakdown b { font-size: 19px; font-weight: 500; } .frag .breakdown i { font-style: normal; font-size: 12.5px; color: var(--ink-2); }
.frag .gtable td .en { display: block; }
.opt.txt { font-family: var(--sans); font-size: 15px; padding: 0 14px; text-align: left; }
.opts.col { flex-direction: column; align-items: stretch; }
.dl { display: grid; gap: 10px; margin-top: 12px; }
.dl a { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); text-decoration: none; color: var(--ink); }
.dl a:hover { box-shadow: 0 0 0 1px var(--grid), var(--shadow); }
.dl .ic2 { width: 44px; height: 44px; border-radius: 12px; background: var(--cobalt-wash); color: var(--cobalt); display: grid; place-items: center; }
.dl b { display: block; } .dl span.m { font-size: 13.5px; color: var(--ink-3); }
@media (max-width: 900px) { .frag .exgrid { grid-template-columns: 1fr; } }

.spk { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--cobalt-wash); color: var(--cobalt); cursor: pointer; transition: transform .12s, background .12s; -webkit-tap-highlight-color: transparent; }
.spk .i { width: 17px; height: 17px; }
.spk:hover { transform: scale(1.07); }
.spk:focus-visible { outline: 2px solid var(--accent, var(--cobalt)); outline-offset: 2px; }
.spk.playing { background: var(--accent, var(--cobalt)); color: #fff; }
.spk.playing .i { animation: spkp 0.9s ease-in-out infinite; }
@keyframes spkp { 50% { transform: scale(.82); } }
.wcard .hz .spk { margin-left: auto; align-self: center; }
.wcard:not(:has(.art)) .hz .spk { margin-right: -12px; }
.wcard .exm { position: relative; padding-right: 44px; }
.wcard .exm .spk { position: absolute; right: 0; top: 12px; width: 30px; height: 30px; }
.msg .spk.side { align-self: center; width: 30px; height: 30px; background: none; box-shadow: 0 0 0 1px var(--line); color: var(--ink-2); }
.msg .spk.side.playing { background: var(--accent, var(--cobalt)); box-shadow: none; color: #fff; }
.letter .line { position: relative; padding-right: 44px; }
.letter .line .spk { position: absolute; right: 0; top: 8px; width: 30px; height: 30px; }
.bub.speaking, .line.speaking { box-shadow: 0 0 0 2px var(--accent, var(--cobalt)) !important; }
.letter .line.speaking { background: var(--surface); }
.frag .ex { position: relative; padding-right: 44px; }
.frag .ex .spk { position: absolute; right: 0; top: 8px; width: 30px; height: 30px; }
.frag .gtable td .spk { float: right; width: 30px; height: 30px; margin: 0 0 4px 8px; }
.playall { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.playall .m { font-size: 13.5px; color: var(--ink-3); }
body.no-scene .playall .sc, .shadowing .playall .sc { display: none; }
/* Audio menu (speed + scene sound) */
.aud { position: relative; }
.tg.audb { gap: 6px; padding: 4px 11px; border-radius: 99px; box-shadow: 0 0 0 1px var(--line); white-space: nowrap; }
.tg.audb .i { width: 16px; height: 16px; } .tg.audb .v { color: var(--accent-deep, var(--cobalt)); font-weight: 600; }
.tg.audb[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--ink); }
.audpop { position: absolute; right: -8px; top: calc(100% + 8px); z-index: 40; width: 300px; max-width: calc(100vw - 24px); background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -16px rgba(13,12,11,.45); padding: 14px; display: grid; gap: 14px; }
.audpop[hidden] { display: none; }
.audpop .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.audpop .k { display: grid; font-size: 14.5px; font-weight: 600; color: var(--ink); } .audpop .k small { font-size: 12.5px; font-weight: 400; color: var(--ink-3); }
.audpop .seg { margin-left: 0; flex: none; } .audpop .tg.scn { flex: none; }
.segrow { margin: -4px 0 18px; } .segrow .seg { margin-left: 0; }
/* shadowing: Listen / Repeat / Speak along */
.shbar { display: grid; gap: 8px; margin: 2px 0 12px; justify-items: start; }
.shbar .seg { margin-left: 0; max-width: 100%; }
.shm button { display: inline-flex; align-items: center; gap: 6px; }
.shm button b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--line); font-size: 11px; font-weight: 700; color: var(--ink-2); }
.shm button[aria-pressed="true"] b { background: var(--accent, var(--cobalt)); color: #fff; }
.shhow { margin: 0; font-size: 14px; color: var(--ink-2); max-width: 62ch; }
.rec { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.rec input { width: 18px; height: 18px; accent-color: var(--accent-deep, var(--cobalt)); }
.rec small { font-weight: 400; color: var(--ink-3); } .rec[hidden] { display: none; }
.bub { position: relative; }
.bub.turn, .line.turn { box-shadow: 0 0 0 2px var(--celadon) !important; }
.bub.turn::after, .line.turn::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 3px; border-radius: 2px; background: var(--celadon); transform-origin: left; animation: turnbar var(--gap, 3s) linear forwards; }
.bub.turn::before, .line.turn::before, .bub.mine::before, .line.mine::before { content: "Your turn"; position: absolute; top: -11px; right: 12px; font: 600 11px/1 var(--sans); letter-spacing: .02em; background: var(--celadon); color: #fff; padding: 4px 8px; border-radius: 99px; }
.bub.mine, .line.mine { box-shadow: 0 0 0 2px var(--amber) !important; }
.bub.mine::before, .line.mine::before { content: "You"; background: var(--amber); }
@keyframes turnbar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.playall .rs.myrec { color: var(--accent-deep, var(--cobalt)); } .playall .rs.playing { opacity: .7; }
.optnote { margin: 4px 0 12px; }
.playall .shlink { flex-basis: 100%; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--accent-deep, var(--cobalt)); text-decoration: none; }
.playall .shlink .i { width: 15px; height: 15px; }
.playall .rs.nxt { color: var(--accent-deep, var(--cobalt)); font-weight: 600; } .playall .rs.nxt .i { width: 16px; height: 16px; }
.shtitle { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 4px 0 12px; }
.shtitle b { font-family: var(--han); font-size: 22px; } .shtitle span { color: var(--ink-3); font-size: 14.5px; }
.shtips { margin-top: 26px; } .shtips ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.lfb { margin: 12px 0 0; font-size: 14.5px; } .lfb.y { color: var(--celadon); font-weight: 600; } .lfb.n { color: var(--ink-2); } .lfb.n b { color: var(--celadon); font-family: var(--hans); }
.lqi.miss { box-shadow: 0 0 0 1px var(--cinnabar); } .lqi.miss .lnum { background: var(--cinnabar); color: #fff; box-shadow: none; }
.lopts .opt.no { background: var(--cinnabar); color: #fff; box-shadow: none; } .opt.lo.no .op { color: rgba(255,255,255,.85); } .opt.lo.no b { background: rgba(255,255,255,.25); color: #fff; }
.lopts .opt:disabled:not(.ok):not(.no) { opacity: .45; }
.lopts .opt.sel { box-shadow: 0 0 0 2px var(--ink); background: var(--rail); }
.lopts .opt.ok.given { background: var(--surface); color: var(--celadon); box-shadow: 0 0 0 2px var(--celadon); opacity: 1; }
.opt.lo.ok.given .op { color: var(--ink-3); } .opt.lo.ok.given b { background: var(--celadon-wash); color: var(--celadon); }
.lcheck { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 4px 0 10px; }
.lcheck .lprog { flex-basis: 100%; font-size: 14.5px; color: var(--ink-2); }
.lcheck .lprog b { color: var(--ink); } .lcheck .lfirst { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.lcheck .btn[hidden], .lcheck .rs[hidden] { display: none; }
.lcheck .btn:disabled { opacity: .4; cursor: default; }
.lcheck .rs { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--accent-deep, var(--cobalt)); }
.lcheck .rs .i { width: 15px; height: 15px; }
.lscore .lretry { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; font-size: 14px; font-weight: 600; color: var(--accent-deep, var(--cobalt)); vertical-align: middle; }
.lscore .lretry .i { width: 15px; height: 15px; }
/* listening part */
.lh { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.lh .ln1 { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 700; align-self: center; }
.lh .cn { font-family: var(--hans); font-weight: 400; color: var(--ink-3); font-size: .85em; }
.lhow { margin: -4px 0 14px; color: var(--ink-2); }
.lpics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 0 0 16px; }
.lpics figure { margin: 0; position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--rail); }
.lpics img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lpics figcaption { position: absolute; left: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(13,12,11,.8); color: #fff; display: grid; place-items: center; font: 700 13px var(--sans); }
.lq { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 10px; }
.lqi { background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--line); padding: 14px 16px; }
.lqi.ok { box-shadow: 0 0 0 1px var(--celadon); }
.ltop { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lnum { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--rail); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 13px; flex: none; }
.lqi.ok .lnum { background: var(--celadon); color: #fff; box-shadow: none; }
.lplay { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px 0 14px; border-radius: 99px; background: var(--cobalt); color: #fff; font-weight: 600; font-size: 14.5px; }
.lplay .i { width: 16px; height: 16px; } .lplay.playing, .lplay.wait { background: var(--accent-deep, var(--cobalt)); }
.lplay.wait span::after { content: "ing"; }
.lplay.playing .i { display: none; }
.lplay.playing::before { content: ""; width: 11px; height: 13px; border-left: 3.5px solid currentColor; border-right: 3.5px solid currentColor; box-sizing: border-box; }
.lplay.playing span, .lplay.paused span { display: none; }
.lplay.playing::after { content: "Pause"; } .lplay.paused::after { content: "Continue"; }
.lplay.paused { background: var(--accent-deep, var(--cobalt)); }
.lre { display: none; align-items: center; gap: 6px; height: 40px; padding: 0 13px; border-radius: 99px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-weight: 600; font-size: 13.5px; }
.lre .i { width: 15px; height: 15px; }
.lplay.playing + .lre, .lplay.paused + .lre { display: inline-flex; }
@media (max-width: 430px) { .lre span { display: none; } .lre { padding: 0 11px; } }
.lkind { margin-left: auto; font: 500 11.5px var(--mono, var(--sans)); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); text-align: right; }
.lopts { display: flex; flex-wrap: wrap; gap: 8px; }
.lopts .opt { min-width: 46px; font-family: var(--sans); font-weight: 700; font-size: 17px; }
.lopts.col { flex-direction: column; align-items: stretch; }
.opt.lo { display: flex; align-items: center; gap: 12px; height: auto; min-height: 52px; padding: 8px 14px; text-align: left; font-family: var(--hans); font-size: 18px; font-weight: 500; }
.opt.lo b { font: 700 13px var(--sans); width: 24px; height: 24px; border-radius: 50%; background: var(--rail); display: grid; place-items: center; flex: none; }
.opt.lo .oz, .opt.lo .op { display: block; } .opt.lo .op { font: 400 13px var(--sans); color: var(--ink-3); margin-top: 1px; }
.opt.lo.ok .op { color: rgba(255,255,255,.85); } .opt.lo.ok b { background: rgba(255,255,255,.25); color: #fff; }
.opt:disabled { cursor: default; }
.lscript { display: grid; gap: 2px; }
.lscript .ln { padding: 6px 0; border-bottom: 1px solid rgba(13,12,11,.08); } .lscript .ln:last-child { border-bottom: 0; }
.lscript .z { font-family: var(--hans); font-size: 17px; } .lscript .q .z { color: var(--ink-2); }
.lscript .p { font: 400 13.5px var(--sans); color: var(--ink-2); } .lscript .e { font: 400 13.5px var(--sans); color: var(--ink-3); }
.lscore { font-weight: 600; color: var(--celadon); margin: 4px 0 8px; min-height: 1.2em; }
@media (max-width: 900px) {
  .lpics { grid-template-columns: repeat(3, 1fr); }
  .ttabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; margin-bottom: 14px; }
  .ttabs::-webkit-scrollbar { display: none; }
  .ttabs button { flex: none; }
}
.playall .pa .at { margin-left: 8px; font-weight: 500; opacity: .7; font-size: 13.5px; }
.playall .rs { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 6px 2px; }
.playall .rs[hidden] { display: none; }
.playall .rs .i { width: 15px; height: 15px; }
.bub.held, .line.held { box-shadow: 0 0 0 2px var(--grid) !important; }
.tg.rate { gap: 6px; padding: 4px 10px; border-radius: 99px; box-shadow: 0 0 0 1px var(--line); }
.tg.rate .i { width: 16px; height: 16px; }
/* ===== flashcards (spaced repetition) ===== */
.fc { --nw: #4E7FD1; --ln: var(--accent-deep, #A9501A); --rv: var(--celadon, #2E7A55); max-width: 720px; }
.fcdeck { background: var(--ink, #0D0C0B); color: var(--bg, #F4F1EC); border-radius: 12px; padding: 22px 22px 18px; }
.fctop { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fclab { font: 500 11.5px var(--mono, ui-monospace, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--accent, #F28C45); }
.fcmeta { font-size: 13px; color: rgba(244,241,236,.6); }
.fcnums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 20px; }
.fcn b { display: block; font: 700 46px/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.fcn span { display: block; margin-top: 6px; font-size: 13px; color: rgba(244,241,236,.62); }
.fcn.nw b { color: #F4F1EC; } .fcn.ln b { color: var(--accent, #F28C45); } .fcn.rv b { color: #8CD3AE; }
.fcgo, .fcmore, .fcback2 { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 54px; border-radius: 13px; background: #F4F1EC; color: #0D0C0B; font: 600 16px var(--sans); }
.fcgo .i { width: 18px; height: 18px; }
.fcgo:hover, .fcmore:hover { background: #fff; }
.fcdone { margin: 0 0 14px; color: rgba(244,241,236,.8); font-size: 15px; } .fcdone b { color: #F4F1EC; }
.fcbar { display: flex; height: 6px; border-radius: 99px; background: rgba(244,241,236,.12); overflow: hidden; margin-top: 20px; }
.fcbar i { display: block; height: 100%; } .fcbar .m { background: #8CD3AE; } .fcbar .y { background: rgba(140,211,174,.5); } .fcbar .l { background: var(--accent, #F28C45); }
.fckey { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font: 500 11.5px var(--mono, monospace); letter-spacing: .04em; color: rgba(244,241,236,.6); }
.fckey i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.fckey .m { background: #8CD3AE; } .fckey .y { background: rgba(140,211,174,.5); } .fckey .l { background: var(--accent, #F28C45); } .fckey .n { background: rgba(244,241,236,.25); }
.fcset { margin-top: 12px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.fcset summary { cursor: pointer; list-style: none; padding: 14px 18px; font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; }
.fcset summary::-webkit-details-marker { display: none; }
.fcset summary::after { content: "+"; font-weight: 400; color: var(--ink-3); } .fcset[open] summary::after { content: "–"; }
.fcset .row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 14.5px; }
.fcset .row > span { display: grid; } .fcset .row small { color: var(--ink-3); font-size: 12.5px; }
.fcset .seg { margin-left: 0; flex: none; } .fcset .tg { flex: none; }
.fcset .fcreset { color: var(--cinnabar, #C2402A); font-weight: 600; font-size: 14px; white-space: nowrap; }
.fchow { margin-top: 22px; }
.fclab2 { font: 500 11.5px var(--mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep, #A9501A); }
.fchow ol { list-style: none; counter-reset: s; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.fchow li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; color: var(--ink-2); font-size: 15px; }
.fchow li::before { content: "0" counter(s); font: 500 12.5px/1.9 var(--mono, monospace); color: var(--ink-3); }
.fchow li b { color: var(--ink); font-weight: 600; } .fchow li i { font-style: normal; font-weight: 600; color: var(--ink); }
.fcapps { margin: 18px 0 0; font-size: 14px; color: var(--ink-3); } .fcapps a { color: var(--ink-2); font-weight: 600; }
/* study */
.fcstudy { display: grid; gap: 14px; }
.fchead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.fcback, .fcundo { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 6px 2px; }
.fcundo { justify-self: end; } .fcback .i, .fcundo .i { width: 16px; height: 16px; }
.fccounts { display: inline-flex; gap: 14px; font: 600 15px var(--mono, monospace); font-variant-numeric: tabular-nums; }
.fccounts .nw { color: var(--nw); } .fccounts .ln { color: var(--ln); } .fccounts .rv { color: var(--rv); }
.fccard { position: relative; background: var(--surface); border-radius: 20px; padding: 18px 20px 22px; text-align: center; min-height: 300px; display: flex; flex-direction: column; box-shadow: 0 0 0 1px var(--line), 0 26px 50px -30px rgba(13,12,11,.45); cursor: pointer; }
.fccard.open { cursor: default; }
.fckind { font: 500 11px var(--mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.fcq { flex: 1; display: grid; place-items: center; padding: 26px 0 18px; }
.fchz { font-family: "Noto Serif SC", var(--han), serif; font-weight: 500; line-height: 1.1; color: var(--ink); font-size: 88px; letter-spacing: .02em; }
.fchz.l3 { font-size: 68px; } .fchz.l4, .fchz.l5 { font-size: 54px; }
.fcen { font: 600 26px/1.3 var(--sans); max-width: 22ch; } .fcsay { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.fca { border-top: 1px solid var(--line); padding-top: 18px; display: grid; justify-items: center; gap: 8px; animation: fcin .25s ease-out; }
.fca .fchz { font-size: 60px; margin-bottom: 2px; }
@keyframes fcin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fcpy { display: inline-flex; align-items: center; gap: 10px; font: 600 24px var(--sans); color: var(--accent-deep, #A9501A); }
.fcmean { font-size: 18px; color: var(--ink); max-width: 34ch; }
.fcmean .pos { font: 500 12px var(--mono, monospace); color: var(--ink-3); margin-right: 8px; }
.fcpic { width: 150px; height: 112px; object-fit: cover; border-radius: 12px; margin: 4px 0; }
.fcex { width: 100%; text-align: left; background: var(--rail); border-radius: 12px; padding: 12px 14px; margin-top: 6px; }
.fcex .z { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--hans, var(--han)); font-size: 17px; }
.fcex .p { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; } .fcex .e { font-size: 13.5px; color: var(--ink-3); }
.fcex .spk, .fcpy .spk { width: 32px; height: 32px; flex: none; }
.fcact { position: sticky; bottom: 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(244,241,236,0), var(--bg) 26%); z-index: 4; }
.fcshow { width: 100%; height: 56px; border-radius: 12px; background: var(--ink); color: var(--bg); font: 600 16px var(--sans); }
.fcshow[hidden], .fcrate[hidden], .fca[hidden] { display: none !important; }
.fccounts > span { display: inline-flex; align-items: baseline; gap: 4px; font: 500 11px var(--mono, monospace); letter-spacing: .06em; text-transform: uppercase; }
.fccounts > span b { font: 600 15px var(--mono, monospace); letter-spacing: 0; }
.fcrate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fcrate button { height: 62px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); display: grid; place-content: center; gap: 2px; font: 600 15px var(--sans); color: var(--ink); }
.fcrate .iv { font: 500 12px var(--mono, monospace); color: var(--ink-3); }
.fcrate .g1 { color: var(--cinnabar, #C2402A); } .fcrate .g4 { color: var(--rv); }
.fcrate .g3 { background: var(--ink); color: var(--bg); box-shadow: none; } .fcrate .g3 .iv { color: rgba(244,241,236,.65); }
.fcrate button:hover { box-shadow: 0 0 0 1.5px var(--ink-3); } .fcrate .g3:hover { box-shadow: none; opacity: .92; }
.fckeys { margin: 0; text-align: center; font-size: 12.5px; color: var(--ink-3); }
@media (hover: none) { .fckeys { display: none; } }
.fcend h3 { margin: 10px 0 6px; font: 700 26px/1.25 var(--sans); color: #F4F1EC; }
.fcend p { color: rgba(244,241,236,.75); margin: 0 0 18px; }
.fcendb { display: grid; gap: 8px; } .fcend .fcback2 { background: transparent; color: #F4F1EC; box-shadow: inset 0 0 0 1px rgba(244,241,236,.3); }
@media (max-width: 900px) {
  .fcdeck { padding: 20px 18px 16px; border-radius: 12px; } .fcn b { font-size: 40px; }
  .fchz { font-size: 76px; } .fccard { min-height: 280px; padding: 16px 16px 20px; }
  .fcrate button { height: 58px; font-size: 14.5px; }
}

/* ===== writing part: workbook ===== */
.wb { display: grid; gap: 16px; max-width: 860px; }
.tzg { --s: 96px; position: relative; display: grid; place-items: center; width: var(--s); height: var(--s); flex: none; background: #FFFEFB;
  box-shadow: inset 0 0 0 1.5px rgba(217,68,43,.55); font-family: "Noto Serif SC", serif; font-weight: 500; font-size: calc(var(--s) * .64); line-height: 1; color: #0D0C0B; }
.tzg + .tzg { margin-left: -1.5px; }
.tzg i { position: absolute; inset: 0; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23D9442B' stroke-width='1' vector-effect='non-scaling-stroke' stroke-dasharray='4 4'%3E%3Cpath d='M50 0V100M0 50H100' stroke-opacity='.45'/%3E%3Cpath d='M0 0L100 100M100 0L0 100' stroke-opacity='.18'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100%; }
.tzg.sm { --s: 44px; box-shadow: inset 0 0 0 1px rgba(217,68,43,.45); } .tzg.sm + .tzg.sm { margin-left: -1px; }
.wbnext { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding: 20px; border-radius: 12px; background: var(--ink); color: var(--bg); text-decoration: none; }
.wbnext:hover .wbgo { background: #fff; }
.wbsheet { display: flex; padding: 8px; background: #FFFEFB; border-radius: 6px; box-shadow: 0 10px 30px -14px rgba(0,0,0,.6); }
.wbtxt { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.wblab { font: 500 11.5px var(--mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--accent, #F28C45); }
.wbword { font-family: var(--han); font-size: 32px; font-weight: 700; line-height: 1.2; color: #F4F1EC; }
.wbword em { font: italic 600 18px var(--sans); color: var(--accent, #F28C45); margin-left: 10px; }
.wbmean { color: rgba(244,241,236,.7); font-size: 15px; }
.wbgo { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; height: 42px; padding: 0 16px; border-radius: 99px; background: #F4F1EC; color: #0D0C0B; font: 600 14.5px var(--sans); }
.wbgo .i { width: 16px; height: 16px; }
.wbprog { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; font-size: 14.5px; color: var(--ink-2); }
.wbprog b { color: var(--ink); font-size: 16px; }
.wbbar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; } .wbbar i { display: block; height: 100%; background: var(--celadon, #2E7A55); border-radius: 99px; }
.wbsteps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.wbsteps li { border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.wbsteps span { display: block; font: 500 12px var(--mono, monospace); color: var(--accent-deep, #A9501A); letter-spacing: .08em; }
.wbsteps b { display: block; font-size: 16px; color: var(--ink); margin: 2px 0 2px; }
.wbhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 30px 0 12px; max-width: 860px; }
.wbhead h3 { margin: 0; }
.wbkey { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font: 500 11.5px var(--mono, monospace); letter-spacing: .04em; color: var(--ink-3); }
.wbkey i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 4px; background: var(--ink-3); } .wbkey i.s3 { background: var(--celadon, #2E7A55); }
.wbgrid { display: flex; flex-wrap: wrap; gap: 10px; max-width: 860px; }
.wbw { display: grid; justify-items: center; gap: 6px; padding: 10px 10px 9px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; }
.wbw:hover { box-shadow: 0 0 0 1px var(--ink-3); transform: translateY(-1px); }
.wbw.done { box-shadow: 0 0 0 1.5px var(--celadon, #2E7A55); }
.wbcells { display: flex; } .wbpy { font-size: 12.5px; color: var(--ink-3); }
.wbdots { display: flex; gap: 3px; } .wbdots i { width: 12px; height: 3px; border-radius: 2px; background: var(--line); } .wbdots i.on { background: var(--ink-3); } .wbdots i.on.m { background: var(--celadon, #2E7A55); }
.wbpaper { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; padding: 16px 18px; border-radius: 12px; background: var(--rail); box-shadow: 0 0 0 1px var(--line); max-width: 860px; }
.wbpaper b { display: block; margin-bottom: 2px; } .wbpaper span { font-size: 14px; color: var(--ink-2); }
.wbpaper .btn { flex: none; }
@media (max-width: 900px) {
  .wbnext { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .wbsheet { justify-self: start; } .tzg { --s: 84px; }
  .wbsteps { grid-template-columns: 1fr; gap: 12px; }
  .wbgrid { gap: 8px; } .tzg.sm { --s: 40px; }
  .wbpaper { flex-direction: column; align-items: flex-start; }
}
@media (hover: none) { .fckeys { display: none; } }

/* ===== navigation pass (2026-11-04): one numbering, status in words, focus mode, saved feedback ===== */
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
body .toc a { grid-template-columns: 26px minmax(0, 1fr) auto; align-items: start; }
body .toc a .t { display: grid; gap: 1px; min-width: 0; padding-top: 3px; }
body .toc a .nm { line-height: 1.3; }
body .toc a .t small { font-size: 12px; font-weight: 400; color: var(--ink-3); line-height: 1.35; }
body .toc a .dn { font: 500 10px var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--celadon); padding-top: 8px; }
body .toc a .dn:empty { display: none; }
body .toc li.has-sub { display: block; }
body .toc .grp { display: block; font: 500 10.5px var(--mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 12px 10px 4px 46px; }
body .toc .sub { display: grid; gap: 2px; }
body .toc .sub a { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; padding: 8px 10px; font-size: 15px; font-weight: 500; color: var(--ink); }
body .toc .sub .k { width: 26px; height: 26px; margin: 0; font-size: 12px; font-weight: 600; background: none; color: var(--ink-3); box-shadow: inset 0 0 0 1.5px var(--line); }
body .toc .sub a.done .k { background: var(--celadon-wash); color: var(--celadon); box-shadow: none; }
body .toc .sub a[aria-current="page"] { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
body .toc .sub a[aria-current="page"] .k { background: var(--accent); color: #0D0C0B; box-shadow: none; }
.crumbs .cp { color: var(--ink-2); font-weight: 500; }
.vhead .step { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vhead .stdone { font: 500 10.5px var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--celadon); background: var(--celadon-wash); padding: 3px 9px; border-radius: 999px; }
.vhead .fbtn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 13px; border-radius: 999px; box-shadow: 0 0 0 1px var(--line); background: var(--surface); font: 600 13px var(--sans, inherit); color: var(--ink); text-transform: none; letter-spacing: 0; }
.vhead .fbtn .i { width: 15px; height: 15px; }
.ring { position: relative; cursor: pointer; border-radius: 10px; }
.ring:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.ring .lbl2 { display: none; }
.ringpop { position: absolute; right: 0; top: calc(100% + 12px); width: min(300px, 86vw); background: #FBF9F5; color: #0D0C0B; border-radius: 12px; padding: 14px 16px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.45); font: 400 14px/1.5 var(--sans, inherit); z-index: 60; text-align: left; cursor: default; white-space: normal; }
.ringpop[hidden] { display: none; }
.ringpop b { display: block; font-weight: 700; margin-bottom: 4px; color: #0D0C0B; }
.ringpop p { margin: 0; color: #4D4944; }
.next .lbl { font-size: 13px; }
#toast { position: fixed; left: 50%; top: calc(72px + env(safe-area-inset-top)); transform: translate(-50%, -12px); opacity: 0; pointer-events: none; z-index: 100; max-width: min(92vw, 520px); background: #0D0C0B; color: #F4F1EC; padding: 11px 16px; border-radius: 12px; font: 500 14px/1.4 var(--sans, inherit); box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast::before { content: "\2713\00a0 "; color: #8CD3AE; }
#toast.err { background: #8E2B1B; } #toast.err::before { content: "!\00a0 "; color: #fff; font-weight: 700; }
/* focus mode */
body.focus .top, body.focus .rail, body.focus footer, body.focus .next, body.focus .vhead { display: none !important; }
body.focus .shell { display: block; }
body.focus #main { max-width: 760px; margin: 0 auto; padding-top: 16px; }
body.focus .tools { top: 56px; }
#fbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px max(14px, env(safe-area-inset-right)) 6px max(14px, env(safe-area-inset-left)); background: #0D0C0B; color: #F4F1EC; }
#fbar .fexit { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 12px 0 6px; border-radius: 10px; color: #F4F1EC; background: rgba(244,241,236,.08); font: 600 14px var(--sans, inherit); flex: none; }
#fbar .fexit .i { width: 18px; height: 18px; }
#fbar .ftitle { font: 500 11.5px var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: rgba(244,241,236,.66); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#fbar .fsave { font: 500 11.5px var(--mono, monospace); letter-spacing: .06em; text-transform: uppercase; color: #8CD3AE; opacity: 0; transition: opacity .25s; flex: none; }
#fbar .fsave.ok, #fbar .fsave.err { opacity: 1; } #fbar .fsave.err { color: #F2A08F; }
#fbar .fsave.ok::before { content: "\2713\00a0"; }
#fbar .fslot { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
@media (prefers-reduced-motion: reduce) { #toast, #fbar .fsave { transition: none; } }
@media (max-width: 900px) {
  .ring .lbl2 { display: inline; }
  body .toc li.has-sub, body .toc .sub { display: contents; }
  body .toc .grp, body .toc a .t small, body .toc a .dn { display: none; }
  body .toc a, body .toc .sub a { grid-template-columns: auto auto; gap: 7px; padding: 6px 10px; font-size: 14px; white-space: nowrap; }
  body .toc a .t { padding-top: 0; }
  body .toc .k, body .toc .sub .k { width: 22px; height: 22px; font-size: 11px; display: grid; }
  body .toc a.done .nm::after { content: " \2713"; color: var(--celadon); }
  .crumbs .cp, .crumbs .cps { display: none; }
  body .crumbs .c1, body .crumbs .sl:not(.cps) { display: inline; }
  body .crumbs .c1 { color: rgba(244,241,236,.7) !important; text-decoration: underline !important; text-underline-offset: 3px; text-decoration-color: rgba(244,241,236,.35) !important; }
}
@media (max-width: 700px) { #fbar:has(.fslot:not(:empty)) .ftitle { display: none; } }

/* ===== flashcards v2 ===== */
.fc2 { display: grid; gap: 14px; max-width: 760px; }
.f2load { color: var(--ink-3); margin: 8px 0; }
.f2today { background: #0D0C0B; color: #F4F1EC; border-radius: 12px; padding: 22px 22px 20px; display: grid; gap: 14px; }
.f2lab { font: 500 11.5px var(--mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0; }
.f2row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.f2meta { font-size: 13px; color: rgba(244,241,236,.6); }
.f2today h3 { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 700; color: #F4F1EC; }
.f2today p { margin: 0; color: rgba(244,241,236,.8); font-size: 15px; line-height: 1.5; }
.f2today p b { color: #F4F1EC; }
.f2nums { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.f2nums li { display: flex; align-items: baseline; gap: 12px; }
.f2nums b { font-size: 34px; line-height: 1; font-weight: 700; min-width: 1.4ch; font-variant-numeric: tabular-nums; color: #F4F1EC; }
.f2nums span { font-size: 16px; color: rgba(244,241,236,.84); }
.f2go { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 52px; width: 100%; border-radius: 12px; background: #F4F1EC; color: #0D0C0B; font-size: 16px; font-weight: 700; }
.f2go .i { width: 18px; height: 18px; }
.f2go:focus-visible, .f2show:focus-visible, .f2back:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.f2today .f2sub, .f2today .f2note { font-size: 13.5px; color: rgba(244,241,236,.6); }
.f2err h3 { color: #F2A08F; }
.f2prog { background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--line); padding: 18px; display: grid; gap: 10px; }
.f2prog .f2lab { color: var(--accent-deep); }
.f2bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); }
.f2bar i { display: block; height: 100%; }
.f2bar .rev, .f2key .rev { background: #2E7A55; } .f2bar .learn, .f2key .learn { background: #F28C45; }
.f2bar .attn, .f2key .attn { background: #C2402A; } .f2key .new { background: var(--line); box-shadow: inset 0 0 0 1px #CFC5B6; }
.f2key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink-2); }
.f2key li { display: inline-flex; align-items: center; gap: 6px; } .f2key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.f2key b { color: var(--ink); font-variant-numeric: tabular-nums; }
.f2stats, .f2miss { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }
.f2miss .zh { font-family: var(--han); font-size: 15px; color: var(--ink); }
.f2more-d { background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.f2more-d > summary { list-style: none; cursor: pointer; min-height: 52px; padding: 0 18px; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.f2more-d > summary::-webkit-details-marker { display: none; }
.f2more-d > summary::after { content: "+"; margin-left: auto; color: var(--ink-3); font-weight: 400; font-size: 20px; }
.f2more-d[open] > summary::after { content: "\2013"; }
.f2more-d > summary span { font: 500 12px var(--mono, monospace); color: var(--ink-3); }
.f2more-d > summary:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: -2px; border-radius: 12px; }
.f2words { list-style: none; margin: 0; padding: 0 18px 10px; }
.f2words li { display: grid; grid-template-columns: auto auto 1fr; grid-template-areas: "zh py st" "en en en"; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: baseline; }
.f2words .zh { grid-area: zh; font: 600 18px var(--han); } .f2words .py { grid-area: py; color: var(--accent-deep); font-size: 14px; }
.f2words .en { grid-area: en; color: var(--ink-2); font-size: 14px; }
.f2words .st { grid-area: st; justify-self: end; text-align: right; font: 500 10.5px var(--mono, monospace); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.f2words .st.rev { color: #2E7A55; } .f2words .st.learn { color: #A9501A; } .f2words .st.attn { color: #C2402A; }
.f2set { padding: 0 18px 6px; }
.f2set .row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.f2set .row > span { font-size: 15px; font-weight: 600; display: grid; gap: 3px; }
.f2set small { font-size: 13px; font-weight: 400; line-height: 1.45; color: var(--ink-3); }
.f2set .seg { margin-left: 0; flex: none; }
.f2set .seg button { min-height: 38px; padding: 0 13px; }
.f2set .tg { flex: none; min-height: 44px; }
.f2set .rs, .f2set label.rs { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); background: var(--bg); font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap; }
.f2set .f2reset { color: #C2402A; }
.f2bk { display: flex; gap: 8px; flex: none; }
.f2how { padding: 0 18px 16px; font-size: 15px; line-height: 1.55; color: var(--ink-2); display: grid; gap: 10px; }
.f2how p { margin: 0; } .f2how b { color: var(--ink); }
.f2rates { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.f2rates li { display: grid; grid-template-columns: 70px 1fr; gap: 10px; }
.f2rates .g1 { color: #C2402A; } .f2rates .g4 { color: #2E7A55; }
.f2apps { font-size: 13.5px; line-height: 1.5; color: var(--ink-3); margin: 4px 0 0; }
.f2apps a { color: var(--ink-2); font-weight: 600; }
/* study */
.f2study { display: grid; gap: 12px; }
.f2card { background: var(--surface); border-radius: 20px; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -28px rgba(13,12,11,.45); padding: 20px 20px 24px; min-height: 300px; display: grid; align-content: start; gap: 12px; text-align: center; }
.f2kind { font: 500 11px var(--mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.f2q { display: grid; justify-items: center; gap: 10px; padding: 26px 0 8px; }
.f2hz { font-family: "Noto Serif SC", "Songti SC", "STSong", var(--han); font-weight: 500; font-size: 76px; line-height: 1.12; color: var(--ink); }
.f2hz.l3 { font-size: 64px; } .f2hz.l4, .f2hz.l5 { font-size: 52px; }
.f2ask { margin: 0; font-size: 15px; color: var(--ink-3); }
.f2en { font-size: 26px; line-height: 1.25; font-weight: 700; max-width: 24ch; }
.f2pos { font: 500 12px var(--mono, monospace); color: var(--ink-3); }
.f2ctx { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); font-style: italic; max-width: 40ch; }
.f2play { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 28px; border-radius: 12px; background: #0D0C0B; color: #F4F1EC; font-size: 14px; font-weight: 600; }
.f2play .i { width: 36px; height: 36px; } .f2play.playing { background: #A9501A; }
.f2a:empty { display: none; }
.f2a { border-top: 1px solid var(--line); padding-top: 18px; display: grid; justify-items: center; gap: 12px; }
.f2a .f2hz { font-size: 56px; }
.f2py { display: inline-flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 500; color: var(--accent-deep); }
.f2mean { font-size: 22px; line-height: 1.3; font-weight: 700; max-width: 30ch; }
.f2ex { background: var(--bg); border-radius: 12px; padding: 12px 14px; display: grid; gap: 3px; text-align: left; width: 100%; max-width: 560px; }
.f2ex .z { font-family: var(--han); font-size: 18px; line-height: 1.5; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.f2ex .p { font-size: 13.5px; color: var(--accent-deep); } .f2ex .e { font-size: 14px; color: var(--ink-2); }
.f2det { width: 100%; max-width: 560px; text-align: left; font-size: 14px; }
.f2det summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--ink-2); font-weight: 600; }
.f2det img { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; }
.f2det p { margin: 8px 0 0; color: var(--ink-2); } .f2det a { color: var(--ink); font-weight: 600; }
.f2act { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(244,241,236,0), var(--bg) 22%); z-index: 4; display: grid; gap: 6px; }
.f2show { min-height: 56px; width: 100%; border-radius: 12px; background: #0D0C0B; color: #F4F1EC; font-size: 16px; font-weight: 700; }
.f2rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.f2rate button { min-height: 64px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); display: grid; place-content: center; gap: 3px; font-size: 15px; font-weight: 700; color: var(--ink); }
.f2rate .iv { font: 500 12px var(--mono, monospace); color: var(--ink-3); font-weight: 500; }
.f2rate .g1 { color: #C2402A; } .f2rate .g4 { color: #2E7A55; }
.f2rate .g3 { background: #0D0C0B; color: #F4F1EC; box-shadow: none; } .f2rate .g3 .iv { color: rgba(244,241,236,.72); }
.f2rate button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.f2rate button:disabled { opacity: .55; cursor: default; }
.f2why { font-size: 13px; color: var(--ink-3); }
.f2why summary { cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; font-weight: 600; color: var(--ink-2); }
.f2why p { margin: 2px 0 0; line-height: 1.55; } .f2why b { color: var(--ink); }
.f2keys { font-size: 12.5px; color: var(--ink-3); text-align: center; margin: 0; }
@media (hover: none) { .f2keys { display: none; } }
#fbar .f2c { font: 500 11.5px var(--mono, monospace); letter-spacing: .04em; text-transform: uppercase; color: rgba(244,241,236,.68); white-space: nowrap; }
#fbar .f2c b { color: #F4F1EC; font-size: 14px; margin-right: 3px; font-variant-numeric: tabular-nums; }
#fbar .f2undo { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 0 10px; border-radius: 10px; color: #F4F1EC; background: rgba(244,241,236,.08); font-size: 13px; font-weight: 600; }
#fbar .f2undo .i { width: 16px; height: 16px; }
.f2menu { position: relative; }
.f2menu > summary { list-style: none; min-width: 40px; min-height: 40px; display: grid; place-items: center; border-radius: 10px; background: rgba(244,241,236,.08); color: #F4F1EC; font-size: 20px; line-height: 1; cursor: pointer; }
.f2menu > summary::-webkit-details-marker { display: none; }
.f2pop { position: absolute; right: 0; top: calc(100% + 8px); background: #FBF9F5; border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); padding: 6px; display: grid; min-width: 230px; z-index: 70; }
.f2pop button { text-align: left; min-height: 44px; padding: 0 12px; border-radius: 8px; font-size: 15px; font-weight: 500; color: #0D0C0B; }
.f2pop button:hover, .f2pop button:focus-visible { background: #ECE6DC; outline: none; }
.f2endb { display: grid; gap: 8px; }
.f2back { min-height: 50px; border-radius: 12px; color: #F4F1EC; box-shadow: inset 0 0 0 1px rgba(244,241,236,.3); font-size: 15px; font-weight: 600; }
@media (max-width: 560px) {
  .f2today { padding: 20px 18px 18px; }
  .f2hz { font-size: 64px; } .f2hz.l3 { font-size: 54px; } .f2hz.l4, .f2hz.l5 { font-size: 46px; }
  .f2rate { gap: 6px; } .f2rate button { min-height: 60px; font-size: 14px; }
  .f2set .row { flex-wrap: wrap; } .f2set .row > span { flex: 1 1 200px; }
  #fbar { gap: 6px; } #fbar .f2bp { display: none; }
}
@media (max-width: 420px) { #fbar .f2undo span { display: none; } #fbar .fexit span { font-size: 13px; } }
@media (max-width: 360px) {
  #fbar { gap: 4px; padding-left: 8px; padding-right: 8px; }
  #fbar .fexit { padding: 0 8px 0 4px; }
  #fbar .fexit span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  #fbar .fsave { font-size: 0; } #fbar .fsave.ok::before { font-size: 13px; }
  #fbar .f2c { letter-spacing: 0; font-size: 10.5px; }
  #fbar .fslot { gap: 5px; }
}

/* v20: very narrow phones (≤380 px): the "Mark done and continue" button fits without sideways scroll */
@media (max-width: 380px) {
  .next .btn.pri { padding: 0 14px; font-size: 14px; max-width: 100%; }
  .next > div:last-child { min-width: 0; }
}


/* Chinese with Asilbek — ink + paper theme (same system as studywithasilbek.com) */
:root {
  color-scheme: light;
  --bg: #F4F1EC; --rail: #EFEBE4; --surface: #FBF9F5; --ink: #0D0C0B; --ink-2: #4D4944; --ink-3: #6F6961;
  --cobalt: #0D0C0B; --cobalt-2: #2A2724; --cobalt-wash: #ECE6DC; --grid: #D8CFC2; --line: #E3DCD1;
  --celadon: #2E7A55; --celadon-wash: #E1EEE5; --cinnabar: #C2402A; --cinnabar-wash: #F7E4DE;
  --amber-wash: #FBEFD9; --amber: #8A5A00; --tile: #FFFEFB; --tile-edge: #DDD5C8;
  --shadow: 0 1px 0 rgba(13,12,11,.04), 0 16px 34px -22px rgba(13,12,11,.42);
  --accent: #F28C45; --accent-deep: #A9501A;
  --mono: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --han: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
html, body { background: var(--bg); }
:focus-visible { outline-color: var(--accent-deep); }
/* header bar: ink */
.top { --ink: #F4F1EC; --ink-2: rgba(244,241,236,.74); --ink-3: rgba(244,241,236,.62); --line: rgba(244,241,236,.16);
       --cobalt: #F4F1EC; --cobalt-wash: rgba(244,241,236,.14); --surface: #0D0C0B; --grid: rgba(244,241,236,.22);
       background: #0D0C0B; color: #F4F1EC; border-bottom-color: rgba(244,241,236,.1); }
.top a { color: #F4F1EC; }
.seal { background: #D9442B; }
.ring .val { stroke: var(--accent); }
/* headings and labels */
h1, h2 { font-weight: 700; }
.hero .no { font-family: var(--mono); font-size: 13.2px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); }
.frag .formula .key { color: var(--accent); }
.wcard .pyw, .face .pyf { color: var(--accent-deep); }
h1 .zh { white-space: nowrap; }
/* aligned with the website: dark sidebar, mono labels, tighter corners, dark footer */
.rail { --ink: #F4F1EC; --ink-2: rgba(244,241,236,.76); --ink-3: rgba(244,241,236,.6); --line: rgba(244,241,236,.14);
        --cobalt: #F4F1EC; --cobalt-wash: rgba(244,241,236,.07); --surface: #1C1A17; --rail: #0D0C0B;
        --celadon: #6CC79A; --celadon-wash: rgba(108,199,154,.16);
        background: #0D0C0B; color: #F4F1EC; border-right-color: rgba(244,241,236,.08); color-scheme: dark; }
.rail h2, .rail > p { font-family: var(--mono); font-size: 12.7px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.toc a[aria-current="page"], .w[aria-current="true"] { background: #1C1A17; box-shadow: 0 0 0 1px rgba(244,241,236,.12); }
.toc a[aria-current="page"] .k, .toc .sub a[aria-current="page"] .k { background: var(--accent); color: #0D0C0B; box-shadow: none; }
.toc a.done[aria-current="page"] .k { background: var(--celadon); color: #0D0C0B; }
.vhead .step { font-family: var(--mono); font-size: 13.2px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); }
.vhead h1 { font-weight: 700; letter-spacing: -.03em; }
main h3 { font-weight: 700; letter-spacing: -.015em; }
footer { background: #0D0C0B; color: rgba(244,241,236,.62); font-family: var(--mono); font-size: 12.7px; line-height: 1.7; padding-top: 28px; }
footer a { color: #F4F1EC; }
.site-mark { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #F4F1EC; }
.site-mark .brand { font-weight: 700; letter-spacing: -.015em; }
footer .site-links { display: block; margin-top: 8px; }
footer .site-links a { color: inherit; }
/* lesson goals: numbered hairline rows, like the site's 01/02 lists */
.goals { counter-reset: goal; gap: 0 36px; margin-top: 26px; }
.goals li { counter-increment: goal; grid-template-columns: 26px 1fr; gap: 12px; align-items: baseline; padding: 13px 0; border-top: 1px solid var(--grid); line-height: 1.5; }
.goals li:nth-last-child(-n+2) { border-bottom: 1px solid var(--grid); }
.goals li::before { content: counter(goal, decimal-leading-zero); width: auto; height: auto; border-radius: 0; background: none; font-family: var(--mono); font-size: 13.2px; font-weight: 500; letter-spacing: .06em; color: var(--accent-deep); }
/* keep Chinese words whole (看起来 never splits into 看起 / 来) */
.goals .zh, .hero .en .zh, .vhead p .zh { word-break: keep-all; overflow-wrap: break-word; }
/* step 1 (2026-11-10): no jump while the page builds; bigger tap areas on touch screens; a pressed state */
#main { min-height: 100vh; }
/* step 2 (2026-11-10): legal line in the footer; culture note at the end of Texts */
footer .site-legal { display: block; margin-top: 8px; font-size: 12.5px; opacity: .8; }
.culture-note { margin-top: 28px; max-width: 860px; }
/* step 4 (2026-11-10): link from a lesson's Flashcards to the course review page */
.f2all { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; }
.f2all span { display: grid; gap: 3px; } .f2all b { font-size: 15px; } .f2all small { font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.f2all .i { width: 18px; height: 18px; flex: none; margin-left: auto; color: var(--accent-deep); }
.f2all:hover { box-shadow: 0 0 0 1px var(--accent-deep); }
/* template v2 (2026-11-10) */
.v2plan { margin: 18px 0 6px; max-width: 860px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.v2plan summary { cursor: pointer; list-style: none; padding: 14px 16px; display: grid; gap: 2px; }
.v2plan summary::-webkit-details-marker { display: none; }
.v2plan summary b::after { content: " ▾"; color: var(--ink-3); font-weight: 400; }
.v2plan[open] summary b::after { content: " ▴"; }
.v2plan summary span { font-size: 14px; color: var(--ink-2); }
.v2plan ol { list-style: none; margin: 0; padding: 0 16px; display: grid; gap: 8px; }
.v2plan li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.v2plan .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--cobalt-wash); font-weight: 700; font-size: 13px; }
.v2plan li a, .v2plan p a { color: var(--ink); font-weight: 600; }
.v2plan li small { display: block; color: var(--ink-3); font-size: 13px; }
.v2plan p { margin: 10px 16px 14px; font-size: 14px; color: var(--ink-2); }
.v2add { margin-top: 26px; max-width: 860px; display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; padding: 16px 18px; border-radius: 12px; background: var(--cobalt-wash); }
.v2add b { display: block; } .v2add span { font-size: 14.5px; color: var(--ink-2); }
.v2add > div { flex: 1 1 260px; }
.v2h { margin-top: 30px; } .v2h span { font-family: var(--mono, monospace); font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep, var(--ink-3)); margin-left: 8px; }
.v2sub { margin: -4px 0 12px; color: var(--ink-2); max-width: 64ch; }
.v2l { font-family: var(--mono, monospace); font-size: 11px; letter-spacing: .06em; color: var(--ink-3); margin-left: 6px; }
.v2story { max-width: 860px; }
.v2shead { margin: 10px 0 14px; } .v2shead .tt { font-family: var(--han); font-size: 26px; font-weight: 700; line-height: 1.25; }
.v2shead .te { color: var(--ink-2); } .v2shead .ts { margin-top: 4px; font-size: 14.5px; color: var(--ink-3); }
.v2text { display: grid; gap: 4px; padding: 10px 16px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.v2line { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.v2line:last-child { border-bottom: 0; }
.v2line .z { font-family: var(--hans); font-size: 20px; line-height: 1.6; grid-column: 1; }
.v2line .p { grid-column: 1; font-size: 14px; color: var(--ink-2); } .v2line .e { grid-column: 1; font-size: 14px; color: var(--ink-3); }
.v2line .spk { grid-column: 2; grid-row: 1; align-self: center; }
.v2line.now { background: var(--cobalt-wash); border-radius: 8px; }
.v2recyc { margin-top: 22px; max-width: 860px; } .v2recyc b { display: block; margin-bottom: 8px; }
.v2recyc div { display: flex; flex-wrap: wrap; gap: 6px; }
.v2recyc div > span { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 10px; border-radius: 99px; background: var(--rail); box-shadow: inset 0 0 0 1px var(--line); }
.v2recyc .zh { font-family: var(--hans); } .v2recyc small { font-size: 11px; color: var(--ink-3); }
.v2abc .opt { font-family: var(--hans); font-size: 17px; height: auto; min-height: 44px; padding: 8px 14px; text-align: left; justify-content: flex-start; }
.v2abc .opt b { font-family: var(--sans, inherit); margin-right: 6px; color: var(--ink-3); }
.v2abc .opt.ok b, .v2abc .opt.no b { color: inherit; opacity: .75; }
.v2abc { flex-wrap: wrap; }
.v2opts { list-style: none; margin: 0 0 14px; padding: 12px 16px; display: grid; gap: 6px; border-radius: 12px; background: var(--rail); box-shadow: inset 0 0 0 1px var(--line); max-width: 860px; }
.v2opts li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; } .v2opts .zh { font-family: var(--hans); font-size: 17px; }
.v2pick { display: flex; flex-wrap: wrap; gap: 6px; }
.v2pick .opt.sm { min-width: 44px; height: 40px; font-family: var(--sans, inherit); font-size: 15px; font-weight: 600; }
.v2pick .opt[aria-pressed="true"] { background: var(--cobalt); color: #fff; box-shadow: none; }
.v2res { align-self: center; color: var(--ink-2); font-size: 14.5px; }
.v2row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.v2gap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px; font-family: var(--hans); font-size: 19px; line-height: 1.4; }
.v2slot { display: inline-grid; justify-items: center; }
.v2slot small { font-family: var(--sans, inherit); font-size: 13px; color: var(--accent-deep, var(--ink-2)); }
.v2slot input { width: 52px; height: 42px; text-align: center; font: inherit; font-size: 20px; border: 0; border-radius: 9px; background: var(--rail); box-shadow: inset 0 0 0 1px var(--grid); }
.v2slot input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--cobalt); }
.v2row .btn { height: 42px; }
.v2word { font-size: 24px !important; font-weight: 700; }
.v2check { margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: var(--rail); font-size: 14.5px; }
.v2check b { display: block; margin-bottom: 4px; font-size: 13.5px; color: var(--ink-2); }
.v2check ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.v2check label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.v2check input { width: 18px; height: 18px; accent-color: var(--celadon); }
.v2check li.on span { color: var(--celadon); font-weight: 600; }
.v2check .zh { font-family: var(--hans); }
.v2turn { margin-top: 12px; }
.v2turn .reveal .z { font-size: 18px; line-height: 1.7; }
.v2turn .reveal .p, .v2turn .reveal .e { font-family: var(--sans, inherit); font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.qi .reveal hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.qi .reveal .p, .qi .reveal .e { font-family: var(--sans, inherit); font-size: 14px; color: var(--ink-2); }
@media (pointer: coarse) {
  .spk { position: relative; }
  .spk::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
  .tg { min-height: 44px; }
}
.btn:active, .opt:active, .tile:active, .tg:active { transform: translateY(1px); filter: brightness(.95); }
.spk:active { filter: brightness(.92); }
.wbpaper .wbbtns { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.rd.hide-py .py-l, .rd.hide-en .en-l { display: none; }
.rd li.ok .py-l, .rd li.ok .en-l { display: block; }
@media (max-width: 420px) { table.also th, table.also td { padding-left: 8px; padding-right: 8px; } table.also td { overflow-wrap: anywhere; } }
@media (max-width: 900px) {
  .goals li:nth-last-child(2) { border-bottom: 0; }
  .goals li:last-child { border-bottom: 1px solid var(--grid); }
}

.swa-mark{display:block;width:28px;height:28px;flex:none}.site-mark .brand,.mark{letter-spacing:-.02em}

.upsell { margin-top: 28px; padding: 26px 26px 22px; border-radius: 14px; background: #0D0C0B; color: #F4F1EC; display: grid; gap: 12px; }
.upsell .up-k { font-family: var(--mono); font-size: 12.7px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.upsell h2 { font-size: 24px; line-height: 1.25; letter-spacing: -.02em; margin: 0; }
.upsell h2 .zh { font-family: var(--han); font-weight: 700; word-break: keep-all; }
.upsell .up-en { margin: -6px 0 0; color: rgba(244,241,236,.68); }
.upsell ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.upsell li { position: relative; padding-left: 20px; color: rgba(244,241,236,.86); line-height: 1.45; }
.upsell li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 2px; background: var(--accent); }
.upsell li .zh { font-family: var(--han); }
.upsell .up-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.upsell .btn { height: 46px; padding: 0 18px; text-decoration: none; }
.upsell .btn.pri { background: #F4F1EC; color: #0D0C0B; border-color: #F4F1EC; }
.upsell .up-p { margin: 8px 0 0; padding-top: 14px; border-top: 1px solid rgba(244,241,236,.14); line-height: 1.5; }
.upsell .wl-form { display: flex; flex-wrap: wrap; gap: 8px; }
.upsell .wl-form input { flex: 1 1 180px; min-width: 0; height: 46px; font: inherit; font-size: 16px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(244,241,236,.22); background: #1C1A17; color: #F4F1EC; }
.upsell .wl-form input::placeholder { color: rgba(244,241,236,.5); }
.upsell .wl-form .btn { flex: none; }
.upsell .wl-form[hidden], .upsell .up-small[hidden], .upsell .wl-done[hidden] { display: none; }
.upsell .up-small { margin: 2px 0 0; font-size: 13.5px; color: rgba(244,241,236,.66); line-height: 1.5; }
.upsell .up-small a { color: #F4F1EC; }
.upsell .wl-done p { margin: 0; }
@media (max-width: 560px) { .upsell { padding: 22px 18px 18px; } .upsell .btn, .upsell .wl-form .btn { width: 100%; justify-content: center; } }


#main .vhead .step { font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-3, #6E665D); }
#main .cphow li > b { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
#main .cph::before { content: none; }


@font-face { font-family: 'SWA Display'; font-style: normal; font-weight: 700; font-display: swap; src: url(/hsk3/fonts/swa-display-700.woff2) format('woff2'); unicode-range: U+4e00,U+4e03,U+4e09-4e0a,U+4e0d,U+4e2a,U+4e48,U+4e5d,U+4e60,U+4e66,U+4e86,U+4e8b-4e8c,U+4e94,U+4eac,U+4eba,U+4ec0,U+4eca,U+4ee5,U+4eec,U+4f1a,U+4f60,U+501f,U+516b,U+516d,U+5173,U+518d,U+5199,U+51b3,U+51fa,U+522b,U+529b,U+529e,U+5305,U+5316,U+533a,U+5341,U+534a,U+5356-5357,U+5361,U+53bb,U+53d8,U+53e3,U+53ef,U+5403,U+5411,U+542c,U+56db,U+56fd,U+573a,U+590d,U+5916,U+591a,U+5929,U+597d,U+59cb,U+5b50,U+5b57,U+5b63,U+5b66,U+5bb6,U+5bbe,U+5c0f,U+5c31,U+5c45,U+5f00,U+5f88,U+5feb,U+60f3,U+6210-6211,U+624d,U+6253,U+628a,U+633a,U+63a5,U+6545,U+6559,U+6587,U+65b0,U+660e,U+662f,U+66f4,U+6709,U+672c,U+673a,U+6761,U+6765,U+6837,U+6bd4,U+6c14,U+6c49,U+6ca1,U+6cd5,U+70b9,U+70ed,U+7167,U+718a,U+7247,U+732b,U+751f,U+7684,U+770b,U+771f,U+77ed,U+7a0b,U+7b2c,U+7cfb,U+7ec3,U+7ed9,U+7ee9,U+8003,U+81ea,U+8282,U+82f1,U+88ab,U+88d9,U+88e4,U+8981,U+89e3,U+8ba4,U+8bcd,U+8bd5,U+8bed,U+8bf4,U+8bfb,U+8bfe,U+8d70,U+8ddf,U+8eab,U+8fc7,U+8fd8-8fd9,U+90a3,U+90bb,U+90fd,U+94c1,U+95ee,U+9605,U+9662,U+9898,U+997a,U+9986,U+9ad8; }
/* FIX 1 - Lessons and checkpoints: one ink, one seal.
   Replaces the 11 pastel part colours, icon tiles and colour-cycling numbers
   with ink on paper + one vermilion seal. Paste at the END of <style id="swa-theme">
   (lesson + checkpoint template). Scoped to #main and .toc, so the header bar is untouched. */

:root {
  --seal: #A8321F;                       /* zhu (vermilion seal ink): 5.9:1 on #F4F1EC, 6.4:1 on #FBF9F5 */
  --seal-on: #FBF6EE;                    /* text on the seal: 6.2:1 */
  --seal-line: rgba(168, 50, 31, .42);   /* tianzige frame, same red as the Writing tiles */
  --seal-guide: rgba(168, 50, 31, .2);   /* the dashed cross inside a small box: faint, so 一 stays readable */
  --gold: #E3A43A;                       /* the logo's gold. Only on ink (9:1 on #0D0C0B) */
}

/* 1a. Part header: no pastel card, no icon tile. The Chinese part name becomes a small seal. */
#main .vhead.vh2 {
  --vd: var(--ink) !important; --vc: transparent !important;
  grid-template-columns: minmax(0, 1fr); grid-template-areas: "st" "tt";
  padding: 0 0 18px; margin-bottom: 26px;
  border-radius: 0; background: none; box-shadow: none;
  border-bottom: 1px solid var(--line);
}
#main .vh2 .vhic { display: none; }
#main .vh2 > .step { color: var(--ink-3); }
#main .vh2 > h1 { color: var(--ink); align-items: center; }
#main .vh2 > h1 .cn {
  opacity: 1; color: var(--seal-on); background: var(--seal);
  font-family: "SWA Display", "Noto Serif SC", var(--hans), serif; font-weight: 700; font-size: 15px; line-height: 1.05;
  writing-mode: vertical-rl; letter-spacing: .08em;
  padding: 6px 4px; border-radius: 3px;
  box-shadow: inset 0 0 0 2px var(--seal), inset 0 0 0 3px rgba(251, 246, 238, .6);
  transform: rotate(-2deg);
}
#main .vh2 > p, #main .vh2 .vhpts li { color: var(--ink-2); }
#main .vh2 .vhpts { border-top: 0; padding-top: 4px; }
#main .vh2 .vhpts li::before { background: var(--ink-3); width: 5px; height: 5px; border-radius: 1px; top: .62em; opacity: 1; }

/* 1b. "By the end of this lesson": no rainbow cards. Hairline rows, numbers in a small tianzige box. */
#main .lpgoals ol { gap: 0 28px; }
#main .lpgoals li {
  --c: transparent !important; --d: var(--ink) !important;
  background: none; border-radius: 0; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink);
}
#main .lpgoals li::before {
  content: counter(lpg, cjk-decimal);           /* 一 二 三 四 (falls back to 1 2 3 4) */
  color: var(--ink); border-radius: 2px;
  font-family: "SWA Display", "Noto Serif SC", var(--hans), serif; font-weight: 700; font-size: 18px;
  background:
    linear-gradient(90deg, var(--seal-guide) 50%, transparent 0) center / 6px 1px repeat-x,
    linear-gradient(0deg, var(--seal-guide) 50%, transparent 0) center / 1px 6px repeat-y,
    var(--surface);
  box-shadow: inset 0 0 0 1px var(--seal-line);
}
#main .lpgoals li .zh { color: var(--ink); }

/* 1c. Your plan: one ink style for all four sittings; a finished sitting gets the seal. */
#main .lpplan .lpsit { --c: transparent !important; --d: var(--ink) !important; }
#main .lpplan .lpsit .sn { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
#main .lpplan .lpsit.all .sn { background: var(--seal); color: var(--seal-on); box-shadow: none; border-radius: 4px; }
#main .lpplan .pl a { background: transparent; box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
#main .lpplan .pl a:hover { box-shadow: inset 0 0 0 1px var(--ink-3); filter: none; }
#main .lpplan ol.lpsits { box-shadow: inset 0 0 0 1px var(--line); }

/* 1d. Daily flashcards bar (on ink): logo gold instead of orange. */
#main .lpdaily .ic { background: var(--gold); }
#main .lpdaily .ic svg { stroke: #0D0C0B; }
#main .lpdaily .go { color: var(--gold); }

/* 1e. Talk about it: no blue banner, no mic tile, no colour-cycling numbers or buttons. */
#main .lptk-hd { background: none; padding: 0; grid-template-columns: minmax(0, 1fr); }
#main .lptk-hd .ic { display: none; }
#main .lptk-hd h3 { color: var(--ink); }
#main .lptk-hd h3 span { color: var(--ink-3); }
#main .lptk-hd p { color: var(--ink-2); }
#main .lptalk .talk li { --qd: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
#main .lptalk .talk li::before { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
#main .lptalk .reveal > button { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); }

/* 1f. Lesson hero and sidebar: gold, not orange, on ink. */
#main .lph .k, #main .lph .chips b { color: var(--gold); }
.toc a[aria-current="page"] .k, .toc .sub a[aria-current="page"] .k { background: var(--gold); color: #0D0C0B; }

/* 1g. Checkpoints: no orange glow orb, no pastel tiles, no coloured side tabs. */
#main .cph::before { content: none; }
#main .cph .k, #main .cph .les b, #main .cpt .story .l { color: var(--gold); }
#main .cph .pill { background: none; color: var(--gold); box-shadow: inset 0 0 0 1px rgba(227, 164, 58, .45); }
#main .cpt .test, #main .cpt .speak { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
#main .cpt .chips span { background: none; box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
#main .cphow li > b { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 600; }
#main .score .row::before { content: none; }
#main .score .row .bar i { background: var(--ink); }
#main ul.cpcan li { background: none; border-radius: 0; border-top: 1px solid var(--line); color: var(--ink); }
#main .cpr.mid { --sc: var(--gold); }
#main .cpr .k { color: var(--gold); }

/* 1h. So the header is not "plain text" (the reason the colour cards were added on 11 Nov):
   the part name again as a large, faint serif watermark. Needs data-cn on the header
   (one line in part_look.py, see fix1-watermark.js). Decorative: aria-hidden by being a pseudo-element with no text role. */
#main .vhead.vh2 { position: relative; overflow: hidden; }
#main .vhead.vh2[data-cn]::after {
  content: attr(data-cn); position: absolute; right: -6px; bottom: -22px; z-index: -1;
  font: 700 112px/1 "SWA Display", "Noto Serif SC", var(--hans), serif; color: var(--ink); opacity: .055;
  letter-spacing: -.02em; pointer-events: none; white-space: nowrap;
}
#main .vhead.vh2 { isolation: isolate; }
/* FIX 2 - Drop orange. Gold on ink, vermilion seal on paper, ink for all teaching text.
   Rule: gold (from the logo) only ever sits on ink, like gold characters on a black lacquer board;
   on paper the only colour is the vermilion seal. Pinyin and all lesson text are ink.
   Homepage + /hsk3/: paste at the end of the main <style>. Lessons: end of <style id="swa-theme">. */

:root {
  --accent: #E3A43A;       /* was #F28C45. Logo gold. 9:1 on ink. Never as text on paper (1.9:1) */
  --accent-deep: #A8321F;  /* was #A9501A. Vermilion seal for labels/links on paper: 5.9:1 */
  --seal: #A8321F;
}

/* Headline accent: no orange italics. A brush underline instead (gold on ink, vermilion on paper). */
em.hl {
  font-style: normal; color: inherit;
  background: no-repeat left 0 bottom .02em / 100% .32em
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 24' preserveAspectRatio='none'%3E%3Cpath d='M3 15c60-7 140-11 230-10 60 1 110 4 164 2' fill='none' stroke='%23E3A43A' stroke-width='7' stroke-linecap='round'/%3E%3Cpath d='M18 19c90-6 200-7 300-4' fill='none' stroke='%23E3A43A' stroke-width='2.5' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E");
  padding-bottom: .06em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.light em.hl {
  color: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 24' preserveAspectRatio='none'%3E%3Cpath d='M3 15c60-7 140-11 230-10 60 1 110 4 164 2' fill='none' stroke='%23A8321F' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Hero label: a plain line of text, not an outlined orange chip (on /hsk3/ the chip wraps to 2 lines at 390 px). */
.hero .pill { background: none; border: 0; border-left: 2px solid var(--accent); border-radius: 0; padding: .1rem 0 .1rem .7rem; color: var(--fg-2, rgba(244, 241, 236, .64)); }

/* Lessons: pinyin in ink, not orange. Teaching material carries no brand colour. */
#main .wcard .pyw, #main .face .pyf, #main .py-l { color: var(--ink-2); }
#main .wcard .pyw { color: var(--ink); font-weight: 500; }
#main .ipy { color: var(--ink-3); }

/* Promo banner on ink: gold, not orange. */
#swa-free b, #swa-free strong { color: var(--accent); }
/* FIX 3 - Signature element: every new word sits in a tianzige (田字格) box, set in Noto Serif SC,
   the same box and red guide lines as the Writing part. Display Chinese (lesson title, checkpoint
   number) moves to the serif too; body Chinese stays Noto Sans SC.
   Lesson + checkpoint template, end of <style id="swa-theme">. Noto Serif SC 500/700 is already loaded there. */

/* Word head: one cell per character. Cells are 1em + L wide; letter-spacing makes the gap,
   padding-left centres the first character, clip-path hides the half-cell after the last one. */
#main .wcard .hz > span:first-child {
  --L: .26em;
  font-size: 38px; line-height: 1; color: var(--ink);
  letter-spacing: var(--L);
  padding: calc(var(--L) / 2) 0 calc(var(--L) / 2) calc(var(--L) / 2);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23A8321F' stroke-opacity='.5'%3E%3Cpath d='M0 0V100M0 0H100M0 100H100' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M0 50H100M50 0V100' stroke-width='1' stroke-dasharray='3 3' vector-effect='non-scaling-stroke'/%3E%3C/g%3E%3C/svg%3E")
    0 0 / calc(1em + var(--L)) 100% repeat-x, var(--tile, #FFFEFB);
  clip-path: inset(0 calc(var(--L) / 2 - 1px) 0 0);
}
#main .wcard .hz { align-items: center; gap: 4px; }
#main .wcard .hz .num { font-family: var(--mono); color: var(--ink-3); margin-left: -2px; }
#main .wcard .pyw { margin-top: 6px; }

/* Display Chinese in the serif: lesson title on the photo, checkpoint title, part names. */
#main .lph .t { font-family: "SWA Display", "Noto Serif SC", var(--hans), serif; font-weight: 700; letter-spacing: .04em; }
#main .cph .t { font-family: "SWA Display", "Noto Serif SC", var(--hans), serif; font-weight: 700; letter-spacing: .02em; }

/* Practice inputs: Latin placeholder in the UI font (it was rendering in Noto Sans SC's Latin). */
#main textarea, #main select, #main input[type="text"] {
  font-family: "Instrument Sans", var(--hans), sans-serif;
}


/* ==== swa-motion v1 (2026-11-13) · studywithasilbek motion system ====
   Drop-in. Every rule below is inert unless BOTH are true:
     1. <html> has the class "swa-m" (set by the tiny flag script at the top of <head>, or by motion.js), and
     2. the visitor has not asked for reduced motion (prefers-reduced-motion: no-preference).
   Animates only opacity and the individual transform properties (translate, scale, rotate),
   so existing `transform` rules (.btn:active, .page.p-a rotate, .lsw-sheet slide) still compose.
   Two small SVG exceptions: the score ring and the stroke-drawn character animate
   stroke-dashoffset (paint-only, under 140 x 140 px).
   Fills are "backwards" so nothing keeps a transform after it ends (only the stroke drawing keeps its end state).
   Nothing stays hidden by CSS alone: load intros always end visible, and below-the-fold reveals
   only hide what motion.js marked .swa-rv after the first paint. Big text and photos (LCP) never start
   at opacity 0: they only settle into place (swa-settle-y, swa-zoom). */

:root {
  --swa-t1: 110ms;   /* press */
  --swa-t2: 200ms;   /* hover, small state change */
  --swa-t3: 380ms;   /* part change, card enter, feedback */
  --swa-t4: 640ms;   /* scroll reveal, hero lines */
  --swa-t5: 1100ms;  /* score ring, bars, photo settle */
  --swa-out: cubic-bezier(.22, 1, .36, 1);     /* entrances: fast start, soft landing */
  --swa-inout: cubic-bezier(.65, 0, .35, 1);   /* drawing, state changes */
  --swa-pop: cubic-bezier(.34, 1.56, .64, 1);  /* success: small overshoot */
  --swa-rise: 14px;
}

/* ---------- signature card (built by motion.js; static when motion is off) ---------- */
.swa-sig-host { position: relative; }
.swa-sig { position: absolute; z-index: 3; width: 124px; padding: 9px 9px 8px; border-radius: 14px; background: #FBF9F5; color: #0D0C0B;
  box-shadow: 0 0 0 1px rgba(13,12,11,.06), 0 26px 44px -20px rgba(0,0,0,.7); rotate: -4deg; -webkit-tap-highlight-color: transparent; }
.swa-sig svg { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 6px; background: #fff; }
.swa-sig .swa-grid { fill: none; stroke: #E6DED2; stroke-width: 5; stroke-dasharray: 20 16; }
.swa-sig .swa-box { fill: none; stroke: #D8CFC2; stroke-width: 10; }
.swa-sig .swa-gh path { fill: #EEE8DE; }
.swa-sig .swa-st { fill: none; stroke: #161412; stroke-width: 150; stroke-linecap: round; stroke-linejoin: round; }
.swa-sig .swa-lab { display: block; margin-top: 6px; text-align: center; font: 500 11px/1.25 "Instrument Sans", "Helvetica Neue", Arial, sans-serif; letter-spacing: .05em; color: #6B635A; white-space: nowrap; }
.swa-sig .swa-lab b { color: #A9501A; font-weight: 600; }
.swa-sig.home { left: -30px; bottom: 54px; }
.swa-sig.course { left: -22px; top: -78px; }
@media (max-width: 860px) {
  .swa-sig.home { left: 12px; bottom: 44px; width: 100px; }
  .swa-sig.course { left: auto; right: -6px; top: -30px; width: 100px; }
}
@media (max-width: 600px) { .swa-sig.course { right: 6px; top: -22px; width: 92px; } }
@media print { .swa-sig { display: none !important; } }

@media (prefers-reduced-motion: no-preference) {

  /* ---------- keyframes ---------- */
  @keyframes swa-rise   { from { opacity: 0; translate: 0 var(--swa-rise); } }
  @keyframes swa-rise-s { from { opacity: 0; translate: 0 8px; } }
  @keyframes swa-fade   { from { opacity: 0; } }
  @keyframes swa-down   { from { opacity: 0; translate: 0 -8px; } }
  @keyframes swa-in-l   { from { opacity: 0; translate: -12px 0; } }
  @keyframes swa-in-r   { from { opacity: 0; translate: 12px 0; } }
  @keyframes swa-card   { from { opacity: 0; translate: 18px 0; } }
  @keyframes swa-pop    { 0% { opacity: 0; scale: .55; } 60% { opacity: 1; scale: 1.08; } 100% { scale: 1; } }
  @keyframes swa-pop-s  { from { opacity: 0; scale: .9; } }
  @keyframes swa-pulse  { 0% { scale: 1; } 40% { scale: 1.07; } 100% { scale: 1; } }
  @keyframes swa-bump   { 0% { scale: 1; } 35% { scale: 1.18; } 100% { scale: 1; } }
  @keyframes swa-halo   { from { opacity: .7; scale: .85; } to { opacity: 0; scale: 1.7; } }
  @keyframes swa-shake  { 20% { translate: -5px 0; } 40% { translate: 4px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }
  @keyframes swa-ok     { from { opacity: 0; translate: 0 -4px; scale: .98; } }
  @keyframes swa-no     { 0% { opacity: 0; } 25% { opacity: 1; translate: -5px 0; } 50% { translate: 4px 0; } 75% { translate: -2px 0; } }
  @keyframes swa-kb     { from { scale: 1.09; } }
  @keyframes swa-zoom   { from { scale: .965; } }
  @keyframes swa-settle-y { from { translate: 0 var(--swa-rise); } }   /* no fade: for big text and photos (LCP) */
  @keyframes swa-settle { from { opacity: 0; rotate: -14deg; translate: 0 22px; scale: .9; } }
  @keyframes swa-fan    { from { opacity: 0; translate: 0 26px; rotate: -6deg; } }
  @keyframes swa-grow-x { from { scale: 0 1; } }
  @keyframes swa-grow-y { from { scale: 1 0; } }
  @keyframes swa-ring   { from { stroke-dashoffset: 326.73; } }   /* 2 * PI * 52, the result ring */
  @keyframes swa-dash   { from { stroke-dashoffset: 100; } }      /* lines with pathLength="100" */
  @keyframes swa-draw   { from { stroke-dashoffset: 102; } to { stroke-dashoffset: 0; } }

  /* ---------- 1. load: hero (home + course). Off when motion.js arrived after first paint (.swa-late) ---------- */
  html.swa-m:not(.swa-late) .hero-copy > .pill { animation: swa-down 500ms var(--swa-out) backwards; }
  html.swa-m:not(.swa-late) .hero-copy > h1 { animation: swa-settle-y var(--swa-t4) var(--swa-out) backwards; --swa-rise: 16px; }
  html.swa-m:not(.swa-late) .hero-copy > .lede { animation: swa-settle-y var(--swa-t4) var(--swa-out) backwards; --swa-rise: 10px; }
  html.swa-m:not(.swa-late) .hero-copy > .hero-buy { animation: swa-rise var(--swa-t4) var(--swa-out) 160ms backwards; }
  html.swa-m:not(.swa-late) .hero-copy > .hero-alt, html.swa-m:not(.swa-late) .hero-copy > .made-by, html.swa-m:not(.swa-late) .hero-copy > .exam-date { animation: swa-rise var(--swa-t4) var(--swa-out) 260ms backwards; }
  html.swa-m:not(.swa-late) .hero .photo > picture { animation: swa-zoom var(--swa-t5) var(--swa-out) backwards; }
  html.swa-m:not(.swa-late) .hero .photo > figcaption { animation: swa-fade var(--swa-t4) ease-out 500ms backwards; }
  html.swa-m:not(.swa-late) .course-hero .shots > .shot-desk { animation: swa-settle-y var(--swa-t5) var(--swa-out) backwards; }
  html.swa-m:not(.swa-late) .course-hero .shots > .shot-phone { --swa-rise: 34px; animation: swa-rise var(--swa-t5) var(--swa-out) 260ms backwards; }
  html.swa-m:not(.swa-late) .course-hero .shots > .shot-phone.p2 { animation-delay: 400ms; }
  html.swa-m:not(.swa-late) .course-hero .shots > figcaption { animation: swa-fade var(--swa-t4) ease-out 700ms backwards; }

  /* signature card: settles in, then the character writes itself (motion.js adds .swa-go when it is on screen) */
  html.swa-m .swa-sig { animation: swa-settle 800ms var(--swa-out) 420ms backwards; }
  html.swa-m .swa-sig .swa-st { stroke-dasharray: 100 200; stroke-dashoffset: 102; }
  html.swa-m .swa-sig.swa-go .swa-st { animation-name: swa-draw; animation-timing-function: cubic-bezier(.4, .1, .45, 1); animation-fill-mode: both; }
  html.swa-m .swa-sig .swa-lab { opacity: 0; }
  html.swa-m .swa-sig.swa-go .swa-lab { opacity: 1; animation: swa-fade 500ms ease-out var(--swa-t, 2.4s) backwards; }

  /* ---------- 2. scroll into view (motion.js marks only elements that start below the fold) ---------- */
  html.swa-m .swa-rv:not(.swa-in) { opacity: 0; translate: 0 var(--swa-rise); }
  html.swa-m .swa-rv.swa-in { animation: swa-rise 560ms var(--swa-out) var(--swa-d, 0ms) backwards; }
  html.swa-m .swa-rv:not(.swa-in):focus-within { opacity: 1; translate: none; }   /* keyboard focus never lands on something invisible */
  html.swa-m .page.swa-rv:not(.swa-in) { translate: 0 26px; }
  html.swa-m .page.swa-rv.swa-in { animation-name: swa-fan; animation-duration: 900ms; }
  /* tone contours draw themselves (homepage "ma" card) */
  html.swa-m .tones.swa-in .tone-svg line, html.swa-m .tones.swa-in .tone-svg path { stroke-dasharray: 100; animation: swa-dash 900ms var(--swa-inout) var(--swa-k, 0ms) backwards; }
  html.swa-m .tones.swa-in .tone-han { animation: swa-pop 520ms var(--swa-pop) var(--swa-k, 0ms) backwards; }
  html.swa-m .tones .tone-row:nth-child(2) { --swa-k: 250ms; }
  html.swa-m .tones .tone-row:nth-child(3) { --swa-k: 420ms; }
  html.swa-m .tones .tone-row:nth-child(4) { --swa-k: 590ms; }
  html.swa-m .tones .tone-row:nth-child(5) { --swa-k: 760ms; }
  /* bars grow when their row arrives: course list progress, checkpoint score rows, warm-up plan line */
  html.swa-m .swa-in .prog i, html.swa-m #main .score .row.swa-in .bar i { transform-origin: left center; animation: swa-grow-x var(--swa-t5) var(--swa-out) calc(var(--swa-d, 0ms) + 180ms) backwards; }
  html.swa-m #main .lpplan .lpsits.swa-in .lpsit:not(:last-child)::before { transform-origin: top center; animation: swa-grow-y 600ms var(--swa-out) calc(var(--swa-d, 0ms) + var(--swa-k, 0ms) + 260ms) backwards; }
  html.swa-m #main .lpplan .lpsits.swa-in .lpsit .sn { animation: swa-pop 500ms var(--swa-pop) calc(var(--swa-d, 0ms) + var(--swa-k, 0ms) + 120ms) backwards; }
  html.swa-m #main .lpplan .lpsits .lpsit:nth-child(2) { --swa-k: 140ms; }
  html.swa-m #main .lpplan .lpsits .lpsit:nth-child(3) { --swa-k: 280ms; }
  html.swa-m #main .lpplan .lpsits .lpsit:nth-child(4) { --swa-k: 420ms; }

  /* ---------- 3. part change: the new part rises in (lessons, checkpoints, review). Pure CSS: runs on insertion.
     .swa-ready comes from motion.js, which first marks the part the page opened with (data-swa-first): that one is not animated. ---------- */
  html.swa-m.swa-ready #main > .view:not([data-swa-skip]):not([data-swa-first]) { animation: swa-rise var(--swa-t3) var(--swa-out) backwards; --swa-rise: 10px; }
  html.swa-m.swa-ready #main > .view:not([data-swa-skip]):not([data-swa-first]) .vh2 .vhic { animation: swa-pop 560ms var(--swa-pop) 140ms backwards; }

  /* lesson warm-up header: photo settles, title, subtitle, chips, cast */
  html.swa-m #main > .view:not([data-swa-skip]) .lph::before { animation: swa-kb 1600ms var(--swa-out) backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .lph > .k { animation: swa-down 500ms var(--swa-out) 80ms backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .lph > .t { animation: swa-rise 760ms var(--swa-out) 120ms backwards; --swa-rise: 18px; }
  html.swa-m #main > .view:not([data-swa-skip]) .lph > .en { animation: swa-rise 640ms var(--swa-out) 220ms backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .lph .chips > span { animation: swa-pop-s 460ms var(--swa-out) 320ms backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .lph .chips > span:nth-child(2) { animation-delay: 380ms; }
  html.swa-m #main > .view:not([data-swa-skip]) .lph .chips > span:nth-child(3) { animation-delay: 440ms; }
  html.swa-m #main > .view:not([data-swa-skip]) .lph .chips > span:nth-child(4) { animation-delay: 500ms; }
  html.swa-m #main > .view:not([data-swa-skip]) .lph .cast { animation: swa-fade 500ms ease-out 560ms backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .lph .avs i { animation: swa-pop 520ms var(--swa-pop) 600ms backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .lph .avs i:nth-child(2) { animation-delay: 670ms; }
  html.swa-m #main > .view:not([data-swa-skip]) .lph .avs i:nth-child(3) { animation-delay: 740ms; }
  html.swa-m #main > .view:not([data-swa-skip]) .lph .avs i:nth-child(n+4) { animation-delay: 810ms; }
  html.swa-m #main > .view:not([data-swa-skip]) .lpgoals .lpsh { animation: swa-rise var(--swa-t4) var(--swa-out) 300ms backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .lpgoals li { animation: swa-rise var(--swa-t4) var(--swa-out) 360ms backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .lpgoals li:nth-child(2) { animation-delay: 420ms; }
  html.swa-m #main > .view:not([data-swa-skip]) .lpgoals li:nth-child(3) { animation-delay: 480ms; }
  html.swa-m #main > .view:not([data-swa-skip]) .lpgoals li:nth-child(n+4) { animation-delay: 540ms; }

  /* checkpoint start header: same family as the lesson header */
  html.swa-m #main > .view:not([data-swa-skip]) .cph::before { animation: swa-pop-s 1400ms var(--swa-out) backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .cph > .k { animation: swa-down 500ms var(--swa-out) 60ms backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .cph > .t { animation: swa-settle-y 760ms var(--swa-out) backwards; --swa-rise: 18px; }
  html.swa-m #main > .view:not([data-swa-skip]) .cph > .sub { animation: swa-settle-y var(--swa-t4) var(--swa-out) backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .cph > .pill { animation: swa-pop-s 460ms var(--swa-out) 300ms backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .cph .les > a { animation: swa-rise var(--swa-t4) var(--swa-out) 360ms backwards; --swa-rise: 20px; }
  html.swa-m #main > .view:not([data-swa-skip]) .cph .les > a:nth-child(2) { animation-delay: 440ms; }
  html.swa-m #main > .view:not([data-swa-skip]) .cph .les > a:nth-child(3) { animation-delay: 520ms; }
  html.swa-m #main > .view:not([data-swa-skip]) .cpt > .test { animation: swa-rise var(--swa-t4) var(--swa-out) 420ms backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .cpt > .speak { animation: swa-rise var(--swa-t4) var(--swa-out) 500ms backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .cpt > .story { animation: swa-rise var(--swa-t4) var(--swa-out) 580ms backwards; }

  /* checkpoint result: ring fills, number counts (motion.js), halo for a strong result */
  html.swa-m #main > .view:not([data-swa-skip]) .cpr .vl { animation: swa-ring var(--swa-t5) var(--swa-out) 150ms backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .cpr .hd { animation: swa-settle-y var(--swa-t4) var(--swa-out) backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .cpr .tx { animation: swa-settle-y var(--swa-t4) var(--swa-out) 60ms backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .cpr .chips > span { animation: swa-pop-s 420ms var(--swa-out) 420ms backwards; }
  html.swa-m #main > .view:not([data-swa-skip]) .cpr .chips > span:nth-child(2) { animation-delay: 490ms; }
  html.swa-m #main > .view:not([data-swa-skip]) .cpr .chips > span:nth-child(3) { animation-delay: 560ms; }
  html.swa-m #main > .view:not([data-swa-skip]) .cpr.good .dn::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 4px var(--sc); opacity: 0; pointer-events: none;
    animation: swa-halo 1000ms var(--swa-out) 1150ms backwards; }

  /* texts: the chat arrives message by message (first 8) */
  html.swa-m #main .dlg > .msg:nth-child(-n+8) { animation: swa-in-l 420ms var(--swa-out) backwards; }
  html.swa-m #main .dlg > .msg.me:nth-child(-n+8) { animation-name: swa-in-r; }
  html.swa-m #main .dlg > .msg:nth-child(1) { animation-delay: 120ms; }
  html.swa-m #main .dlg > .msg:nth-child(2) { animation-delay: 170ms; }
  html.swa-m #main .dlg > .msg:nth-child(3) { animation-delay: 220ms; }
  html.swa-m #main .dlg > .msg:nth-child(4) { animation-delay: 270ms; }
  html.swa-m #main .dlg > .msg:nth-child(5) { animation-delay: 320ms; }
  html.swa-m #main .dlg > .msg:nth-child(6) { animation-delay: 370ms; }
  html.swa-m #main .dlg > .msg:nth-child(7) { animation-delay: 420ms; }
  html.swa-m #main .dlg > .msg:nth-child(8) { animation-delay: 470ms; }

  /* ---------- 4. success and feedback (pure CSS: each starts when the page adds its class) ---------- */
  html.swa-m #main .fb.show.ok { animation: swa-ok var(--swa-t3) var(--swa-out); }
  html.swa-m #main .fb.show.no { animation: swa-no 420ms ease-out; }
  html.swa-m #main .qi.ok .qp::before { animation: swa-pop 520ms var(--swa-pop); }
  html.swa-m #main .opt.ok { animation: swa-pulse 420ms var(--swa-pop); }
  html.swa-m #main .opt.no { animation: swa-shake 380ms ease-out; }
  html.swa-m #main .pic.ok { animation: swa-pulse 460ms var(--swa-pop); }
  html.swa-m #main .pic.ok .tag { animation: swa-rise-s 360ms var(--swa-out) 80ms backwards; }
  html.swa-m #main .chip[aria-pressed="true"] { animation: swa-pulse 300ms var(--swa-out); }
  html.swa-m #main .chip.used { transition: opacity var(--swa-t2) ease-out; }
  html.swa-m #main .built .tile { animation: swa-pop-s 220ms var(--swa-out); }
  html.swa-m #main .reveal.open > div, html.swa-m #main .lptalk .reveal.open > div { animation: swa-rise-s var(--swa-t3) var(--swa-out); }
  /* the part's bubble in the contents pops when it becomes done; the header ring bumps (motion.js adds the classes) */
  html.swa-m #toc a.swa-pop .k { animation: swa-pop 560ms var(--swa-pop); }
  html.swa-m .ring.swa-bump svg { animation: swa-bump 520ms var(--swa-pop); }
  html.swa-m .ring.swa-full { position: relative; }
  html.swa-m .ring.swa-full::before { content: ""; position: absolute; left: 0; top: 50%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%;
    box-shadow: 0 0 0 3px var(--celadon, #2F8571); pointer-events: none; opacity: 0; animation: swa-halo 1100ms var(--swa-out) 200ms backwards; }

  /* flashcards (lesson part and /hsk3/review/): each card slides in, the answer unfolds, ratings pop */
  html.swa-m #main .f2card { animation: swa-card var(--swa-t3) var(--swa-out) backwards; }
  html.swa-m #main .f2card.open .f2a > div, html.swa-m #main .f2card.open .f2a > details { animation: swa-rise-s var(--swa-t3) var(--swa-out) backwards; }
  html.swa-m #main .f2card.open .f2a > .f2mean { animation-delay: 50ms; }
  html.swa-m #main .f2card.open .f2a > .f2ex { animation-delay: 100ms; }
  html.swa-m #main .f2card.open .f2a > .f2det { animation-delay: 150ms; }
  html.swa-m #main .f2rate button { animation: swa-pop-s 300ms var(--swa-out) backwards; }
  html.swa-m #main .f2rate button:nth-child(2) { animation-delay: 40ms; }
  html.swa-m #main .f2rate button:nth-child(3) { animation-delay: 80ms; }
  html.swa-m #main .f2rate button:nth-child(4) { animation-delay: 120ms; }
  html.swa-m #main .f2sum > .f2lab { animation: swa-down 420ms var(--swa-out) backwards; }
  html.swa-m #main .f2sum > h3 { animation: swa-rise var(--swa-t4) var(--swa-out) 60ms backwards; }
  html.swa-m #main .f2sum > .f2nums { animation: swa-rise var(--swa-t4) var(--swa-out) 140ms backwards; }
  html.swa-m #main .rvls li { animation: swa-rise-s var(--swa-t3) var(--swa-out) backwards; }
  html.swa-m #main .rvls li:nth-child(2) { animation-delay: 30ms; } html.swa-m #main .rvls li:nth-child(3) { animation-delay: 60ms; }
  html.swa-m #main .rvls li:nth-child(4) { animation-delay: 90ms; } html.swa-m #main .rvls li:nth-child(n+5) { animation-delay: 120ms; }

  /* ---------- 5. tabs and the lesson switcher ---------- */
  html.swa-m:not(.swa-late) .tour-panel:not([hidden]), html.swa-m:not(.swa-late) .tabs > .panel:not([hidden]) { animation: swa-rise-s var(--swa-t3) var(--swa-out); }
  html.swa-m .lsw-sheet.on .lsw-list > li { animation: swa-rise-s 320ms var(--swa-out) backwards; animation-delay: 150ms; }
  html.swa-m .lsw-sheet.on .lsw-list > li:nth-child(1) { animation-delay: 40ms; }
  html.swa-m .lsw-sheet.on .lsw-list > li:nth-child(2) { animation-delay: 55ms; }
  html.swa-m .lsw-sheet.on .lsw-list > li:nth-child(3) { animation-delay: 70ms; }
  html.swa-m .lsw-sheet.on .lsw-list > li:nth-child(4) { animation-delay: 85ms; }
  html.swa-m .lsw-sheet.on .lsw-list > li:nth-child(5) { animation-delay: 100ms; }
  html.swa-m .lsw-sheet.on .lsw-list > li:nth-child(6) { animation-delay: 115ms; }
  html.swa-m .lsw-sheet.on .lsw-list > li:nth-child(7) { animation-delay: 130ms; }
  html.swa-m .lsw-sheet.on .lsw-list a.cur .lsw-n { animation: swa-pop 520ms var(--swa-pop) 220ms backwards; }

  /* ---------- 6. press (all pointers) and hover (mouse only) ---------- */
  html.swa-m .btn, html.swa-m .f2go, html.swa-m .f2show, html.swa-m .f2rate button, html.swa-m .chip, html.swa-m .pic, html.swa-m .opt, html.swa-m .tile, html.swa-m .lpplan .pl a, html.swa-m .lsw, html.swa-m .rvls .rs, html.swa-m .tg, html.swa-m .ttabs button, html.swa-m .tour-tab, html.swa-m .tab {
    transition-property: scale, translate, transform, background-color, border-color, color, box-shadow, opacity, filter; transition-duration: var(--swa-t1); transition-timing-function: ease-out; }
  html.swa-m .btn:active:not(:disabled), html.swa-m .f2go:active:not(:disabled), html.swa-m .f2show:active:not(:disabled), html.swa-m .f2rate button:active:not(:disabled), html.swa-m .chip:active:not(:disabled), html.swa-m .pic:active:not(:disabled), html.swa-m .opt:active:not(:disabled), html.swa-m .tile:active:not(:disabled), html.swa-m .lpplan .pl a:active:not(:disabled), html.swa-m .lsw:active:not(:disabled), html.swa-m .rvls .rs:active:not(:disabled) { scale: .97; }
  html.swa-m .cpr .nm b { font-variant-numeric: tabular-nums; }
  @media (hover: hover) and (pointer: fine) {
    html.swa-m .way, html.swa-m .plan, html.swa-m .rv-box, html.swa-m .lpdaily, html.swa-m .cpt > .story, html.swa-m .wl-card { transition: translate var(--swa-t2) var(--swa-out), box-shadow var(--swa-t2) ease-out; }
    html.swa-m .way:hover, html.swa-m .plan:hover, html.swa-m .rv-box:hover, html.swa-m .lpdaily:hover, html.swa-m .cpt > .story:hover, html.swa-m .wl-card:hover { translate: 0 -3px; }
    html.swa-m .lesson-row .s::after, html.swa-m .lpdaily .go, html.swa-m .lesson-row .n { transition: translate var(--swa-t2) var(--swa-out); }
    html.swa-m .lesson-row:hover .s::after, html.swa-m .lpdaily:hover .go { translate: 4px 0; }
    html.swa-m .lesson-row:hover .n { translate: 3px 0; }
    html.swa-m .lsw-list a { transition: translate var(--swa-t2) var(--swa-out), background-color var(--swa-t2); }
    html.swa-m .lsw-list a:hover { translate: 3px 0; }
  }
}

/* fix for existing site motion that ignored reduced motion (not gated by .swa-m: applies even when motion is switched off)
   - the speaker icon pulses forever while audio plays, the flashcard answer fades in, the speaker grows on hover.
   The shadowing "your turn" bar is kept: it shows how much time is left to speak. */
@media (prefers-reduced-motion: reduce) {
  .spk.playing .i, .fca { animation: none; }
  .spk { transition: none; }
}

/* nothing stays hidden on paper */
@media print {
  .swa-rv { opacity: 1 !important; translate: none !important; animation: none !important; }
}
/* ==== /swa-motion ==== */


/* ===== lesson look v1: warm-up (2026-11-10) ===== */
.lph { container-type: inline-size; position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 360px; margin: 2px 0 30px; padding: 74px 22px 20px;
  border-radius: 22px; overflow: hidden; background: #0D0C0B; color: #F4F1EC; box-shadow: 0 22px 44px -28px rgba(13,12,11,.75); isolation: isolate; }
.lph::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(13,12,11,.55) 0%, rgba(13,12,11,.25) 20%, rgba(13,12,11,.45) 42%, rgba(13,12,11,.93) 80%), var(--ph) center 35% / cover no-repeat; }
.lph .k { position: absolute; top: 18px; left: 22px; right: 22px; font-family: var(--mono); font-size: 12.7px; letter-spacing: .1em; text-transform: uppercase; color: #F2B66B; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.lph .k span { color: rgba(244,241,236,.78); }
.lph .t { margin: 0; font-family: var(--han); font-weight: 700; font-size: clamp(30px, calc((100vw - 92px) / (var(--n, 8) + .4)), 64px); font-size: clamp(30px, calc(100cqw / (var(--n, 8) + .4)), 64px); line-height: 1.14; letter-spacing: .01em; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.45); text-wrap: balance; }
.lph .t .ln { display: inline-block; white-space: nowrap; }
.lph .en { margin: 6px 0 0; font-size: 17.5px; line-height: 1.4; color: rgba(244,241,236,.92); text-shadow: 0 1px 2px rgba(13,12,11,.75), 0 0 10px rgba(13,12,11,.55); }
.lph .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.lph .chips span { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 11px; border-radius: 999px; font-size: 13.5px; color: rgba(244,241,236,.9);
  background: rgba(244,241,236,.12); border: 1px solid rgba(244,241,236,.2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lph .chips b { color: #F2B66B; font-weight: 700; font-size: 14.5px; }
.lph .cast { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(244,241,236,.16); font-size: 14px; color: rgba(244,241,236,.8); }
.lph .avs { display: flex; flex: none; }
.lph .avs i { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #0D0C0B; background: #3A3430 center / cover no-repeat; margin-left: -9px; display: grid; place-items: center;
  font-style: normal; font-family: var(--hans); font-weight: 700; font-size: 14px; color: #F4F1EC; }
.lph .avs i:first-child { margin-left: 0; }
.lph .cast b { color: #F4F1EC; font-weight: 600; }

.lpsh { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 12px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.lpsh small { font-size: 13.5px; font-weight: 500; color: var(--ink-3); }
.lpsh small[lang] { font-family: var(--hans); }

.lpgoals { margin: 0 0 30px; }
.lpgoals ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 8px; counter-reset: lpg; }
.lpgoals li { counter-increment: lpg; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: center; padding: 13px 15px 13px 13px;
  border-radius: 16px; background: var(--c); color: #2A2420; font-size: 15.5px; line-height: 1.45; }
.lpgoals li::before { content: counter(lpg); width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--d); color: #fff;
  font-family: var(--mono); font-weight: 600; font-size: 15.4px; }
.lpgoals li .zh { font-family: var(--hans); font-weight: 600; color: var(--d2, #1F1A16); word-break: keep-all; }

.lpplan.v2plan { margin: 0 0 34px; max-width: none; border-radius: 0; background: none; box-shadow: none; }
.lpplan ol.lpsits { list-style: none; margin: 0; padding: 16px 16px 4px; display: grid; gap: 0; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 12px 26px -24px rgba(13,12,11,.55); }
.lpplan .lpsit { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; padding: 0 0 16px; }
.lpplan .lpsit:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 38px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--line); }
.lpplan .lpsit .sn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--d); color: #fff; font-family: var(--mono); font-weight: 600; font-size: 15.4px; }
.lpplan .lpsit.all .sn { background: var(--celadon); }
.lpplan .lpsit .sh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 5px 0 8px; }
.lpplan .lpsit .sh b { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.lpplan .lpsit .sm { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.lpplan .lpsit.all .sm { color: var(--celadon); font-weight: 600; }
.lpplan .pl { display: flex; flex-wrap: wrap; gap: 6px; }
.lpplan .pl a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--ink); background: var(--c); }
.lpplan .pl a.dn { background: var(--celadon-wash); color: var(--celadon); }
.lpplan .pl a.dn::before { content: "\2713"; font-weight: 700; }
.lpplan .pl a:hover { filter: brightness(.96); }
.lpplan .lpsit small { display: block; margin-top: 7px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.lpdaily { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-top: 10px; padding: 12px 14px; border-radius: 16px; text-decoration: none; color: #F4F1EC;
  background: #1F1C19; box-shadow: 0 12px 26px -20px rgba(13,12,11,.8); }
.lpdaily .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #E07A36; }
.lpdaily .ic svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lpdaily b { display: block; font-size: 15px; font-weight: 600; }
.lpdaily small { display: block; font-size: 13px; color: rgba(244,241,236,.68); line-height: 1.4; }
.lpdaily .go { font-size: 13.5px; font-weight: 600; color: #F2B66B; white-space: nowrap; }

.lptalk { margin-top: 34px; }
.lptk-hd { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; align-items: center; padding: 16px 16px; border-radius: 18px; background: #DDE9F6; margin-bottom: 12px; }
.lptk-hd .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #24476B; }
.lptk-hd .ic svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lptk-hd h3 { margin: 0; font-size: 19px; font-weight: 700; color: #16304A; }
.lptk-hd h3 span { font-family: var(--hans); font-weight: 500; font-size: 15px; color: #4F6E8E; margin-left: 6px; }
.lptk-hd p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: #34506D; }
.lptalk .tools { margin-bottom: 12px; }
.lptalk .talk { gap: 12px; counter-reset: lpq; }
.lptalk .talk li { counter-increment: lpq; position: relative; padding: 16px 16px 14px 60px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 12px 26px -24px rgba(13,12,11,.55); }
.lptalk .talk li::before { content: counter(lpq); position: absolute; left: 14px; top: 15px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 600; font-size: 15.4px; color: #fff; background: var(--qd, #24476B); }
.lptalk .talk li:nth-child(3n+2) { --qd: #B85A1E; } .lptalk .talk li:nth-child(3n) { --qd: #2F8571; }
.lptalk .talk .q { font-family: var(--hans); font-size: 19px; font-weight: 600; line-height: 1.5; color: var(--ink); }
.lptalk .talk .tqp { font-size: 14.5px; color: var(--ink-2); margin-top: 2px; }
.lptalk .talk .qe { font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.lptalk .reveal { margin: 12px 0 0; }
.lptalk .reveal > button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 15px 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--qd, #24476B); background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.lptalk .reveal > button svg { width: 18px; height: 18px; }
.lptalk .reveal.open > button { color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.lptalk .reveal > div { position: relative; margin-top: 12px; padding: 12px 14px 12px; border-radius: 4px 16px 16px 16px; background: #FFF2D9; color: #2A2420; }
.lptalk .reveal > div::before { content: "Model answer"; display: block; margin-bottom: 4px; font-family: var(--mono); font-size: 11.6px; letter-spacing: .1em; text-transform: uppercase; color: #8A5A00; }
.lptalk .reveal .maz { font-family: var(--hans); font-size: 17px; font-weight: 500; line-height: 1.55; }
.lptalk .reveal .map { font-size: 14px; color: #6B5A3C; margin-top: 2px; }
.lptalk .reveal .mae { font-size: 14px; color: #857C71; margin-top: 2px; }

@media (min-width: 700px) {
  .lph { min-height: 400px; padding: 80px 32px 26px; }
  .lph .k { left: 32px; top: 22px; }
  .lpgoals ol { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) { .lph { padding-left: 18px; padding-right: 18px; } .lph .k { left: 18px; } .lptalk .talk li { padding-left: 54px; } .lptalk .talk li::before { left: 12px; } }
/* ===== fix 2026-11-11: "Which one is right?" answers are whole sentences; let the buttons grow and wrap instead of spilling out ===== */
#main .opts:not(.letters) { flex-wrap: wrap; }
#main .opts:not(.letters) .opt:not(.sm) { height: auto; min-height: 44px; padding: 7px 14px; line-height: 1.45; text-align: left; max-width: 100%; }
/* ===== fix v51: on phones the "Also in this lesson" table split pinyin and words mid-syllable; keep words whole (break only at spaces) ===== */
@media (max-width: 420px) { #main table.also td:nth-child(1), #main table.also td:nth-child(2) { overflow-wrap: normal; word-break: keep-all; } }


.swa-free { background: #1F1B17; color: #F4F1EC; font: 500 13.5px/1.45 "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif; text-align: center; padding: 8px 16px; }
.swa-free[hidden] { display: none; }
.swa-free b { color: #F2C46B; font-weight: 700; }
.swa-free a { color: #F4F1EC; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; margin-left: 4px; }
.swa-free .sf-s { display: none; }
@media (max-width: 600px) { .swa-free { font-size: 13px; padding: 7px 12px; } .swa-free .sf-l { display: none; } .swa-free .sf-s { display: inline; } }


.swa-inapp { background: #FBF3D9; color: #2B2724; border-bottom: 1px solid #E8D9A8; font: 400 14px/1.45 "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; text-align: center; }
.swa-inapp[hidden] { display: none; }
.swa-inapp p { margin: 0; max-width: 640px; }
.swa-inapp b { font-weight: 700; }
.swa-inapp .ia-copy { min-height: 40px; padding: 0 16px; border: 1px solid #2B2724; border-radius: 999px; background: #fff; color: #2B2724; font-size: 14px; font-weight: 600; line-height: 1; font-family: inherit; cursor: pointer; }


.swa-kbd { margin: 10px 0 4px; padding: 12px 14px; border: 1px solid var(--line, #E3DCD1); border-radius: 12px; background: var(--surface, #fff); color: var(--ink, #161412); font-size: 14.5px; line-height: 1.5; }
.swa-kbd b { font-weight: 700; }
.swa-kbd ul { margin: 6px 0 8px; padding-left: 18px; }
.swa-kbd li { margin: 3px 0; }
.swa-kbd .kb-ok { min-height: 40px; padding: 0 16px; border: 1px solid var(--ink, #161412); border-radius: 999px; background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }


#vh:focus { outline: none; }
.f2imp { position: relative; }
.f2imp input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.f2imp:focus-within { outline: 2px solid var(--ink, #161412); outline-offset: 2px; }


.swa-rep { margin: 14px 0 0; text-align: center; }
.swa-rep > button { min-height: 40px; padding: 0 6px; border: 0; background: none; color: var(--ink-2, #4D4944); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.swa-rep form { margin: 10px auto 0; max-width: 520px; text-align: left; }
.swa-rep textarea { display: block; width: 100%; box-sizing: border-box; min-height: 76px; padding: 10px 12px; border: 1px solid var(--grid, #D8CFC2); border-radius: 10px; background: var(--surface, #fff); color: var(--ink, #161412); font: 16px/1.45 var(--sans, system-ui, sans-serif); }
.swa-rep .rp-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.swa-rep .rp-msg { font-size: 14px; color: var(--ink-2, #4D4944); }


.swa-fb { margin: 28px 0 10px; padding: 20px 18px 18px; border: 1px solid var(--line, #E3DCD1); border-radius: 16px; background: var(--surface, #fff); box-shadow: var(--shadow, none); color: var(--ink, #161412); font-family: var(--sans, system-ui, sans-serif); }
.swa-fb .fb-k { font: 600 11.5px/1.3 "Instrument Sans", "Helvetica Neue", Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3, #857C71); }
.swa-fb h3 { margin: 6px 0 8px; font-size: 21px; line-height: 1.25; font-weight: 700; }
.swa-fb p { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: var(--ink-2, #4D4944); }
.swa-fb form { margin: 0; }
.swa-fb fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.swa-fb legend, .swa-fb .fb-f { display: block; padding: 0; margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--ink, #161412); }
.swa-fb .fb-f { margin-bottom: 16px; }
.swa-fb small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--ink-3, #857C71); }
.swa-fb .fb-ch { display: flex; flex-wrap: wrap; gap: 8px; }
.swa-fb .fb-ch label { position: relative; }
.swa-fb .fb-ch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.swa-fb .fb-ch span { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 14px; border: 1px solid var(--grid, #D8CFC2); border-radius: 999px; background: var(--bg, #F4F1EC); font-size: 15px; cursor: pointer; box-sizing: border-box; }
.swa-fb .fb-rate span { min-width: 48px; padding: 0; font-weight: 600; }
.swa-fb .fb-ch input:checked + span { background: var(--cobalt, #2B2724); border-color: var(--cobalt, #2B2724); color: var(--surface, #fff); }
.swa-fb .fb-ch input:focus-visible + span { outline: 2px solid var(--ink, #161412); outline-offset: 2px; }
.swa-fb .fb-ends { display: flex; justify-content: space-between; max-width: 272px; margin-top: 5px; font-size: 12.5px; color: var(--ink-3, #857C71); }
.swa-fb textarea, .swa-fb .fb-t { display: block; width: 100%; box-sizing: border-box; margin-top: 7px; padding: 10px 12px; border: 1px solid var(--grid, #D8CFC2); border-radius: 10px; background: var(--bg, #F4F1EC); color: var(--ink, #161412); font: 16px/1.45 var(--sans, system-ui, sans-serif); }
.swa-fb textarea { min-height: 84px; resize: vertical; }
.swa-fb textarea:focus, .swa-fb .fb-t:focus { outline: 2px solid var(--ink, #161412); outline-offset: 1px; }
.swa-fb .fb-st label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; cursor: pointer; }
.swa-fb .fb-st input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--cobalt, #2B2724); }
.swa-fb .fb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.swa-fb .fb-two[hidden] { display: none; }
@media (max-width: 440px) { .swa-fb .fb-two { grid-template-columns: 1fr; } .swa-fb { padding: 18px 14px 16px; } }
.swa-fb .fb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.swa-fb .fb-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.swa-fb .fb-act .btn { min-height: 46px; }
.swa-fb .fb-msg { font-size: 14px; line-height: 1.45; color: var(--ink-2, #4D4944); }
.swa-fb .fb-msg.err { color: var(--cinnabar, #D9442B); }
.swa-fb .fb-msg a { color: inherit; }
.swa-fb .fb-pv { margin: 14px 0 0; font-size: 13px; color: var(--ink-3, #857C71); }
.swa-fb .fb-pv a { color: inherit; }
.swa-fb .fb-more { border: 0; background: none; padding: 0; font: inherit; color: var(--ink, #161412); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; min-height: 44px; }
.swa-fb.done { border-color: var(--celadon, #2F8571); background: var(--celadon-wash, #E3F2EE); }


.vhead.vh2 { position: relative; display: grid; grid-template-columns: 50px minmax(0, 1fr); grid-template-areas: "ic st" "ic tt"; column-gap: 14px; row-gap: 2px; align-items: center;
  margin-bottom: 22px; padding: 16px 16px 16px; border-radius: 20px; background: var(--vc); box-shadow: inset 0 0 0 1px rgba(13,12,11,.04); }
.vh2 .vhic { grid-area: ic; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--vd); box-shadow: 0 8px 18px -10px var(--vd); }
.vh2 .vhic svg { width: 25px; height: 25px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.vh2 > .step { grid-area: st; margin: 0; color: var(--vd); align-self: end; }
.vh2 > h1 { grid-area: tt; margin: 0; align-self: start; color: #1A1714; }
.vh2 > h1 .cn { color: var(--vd); opacity: .8; }
#main .vhead.vh2 > h1.vhg { flex-wrap: wrap; row-gap: 0; }
#main .vhead.vh2 > h1.vhg::after { content: ""; flex-basis: 100%; height: 0; order: 1; }
#main .vhead.vh2 > h1.vhg > .vhgp { order: 2; } #main .vhead.vh2 > h1.vhg > .cn { order: 3; }
#main .vhead.vh2 > h1 .vhgp { display: block; width: fit-content; margin-top: 2px; font-family: var(--hans); font-size: .82em; line-height: 1.3; }
.vh2 > h1 .vhgp + .cn { vertical-align: baseline; }
.vh2 > :not(.vhic):not(.step):not(h1) { grid-column: 1 / -1; }
.vh2 > p { margin: 12px 0 0; color: #3B342E; }
.vh2 > p + p { margin-top: 6px; }
.vh2 .vhpts { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid rgba(13,12,11,.09); display: grid; gap: 7px; }
.vh2 .vhpts li { position: relative; margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.45; color: #3B342E; }
.vh2 .vhpts li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--vd); opacity: .85; }
.vh2 .vhpts li .zh, .vh2 .vhpts li [lang] { word-break: keep-all; }
.vh2 > .focus-btn, .vh2 > button { justify-self: start; }
@media (min-width: 700px) { .vhead.vh2 { grid-template-columns: 58px minmax(0, 1fr); padding: 20px 22px; } .vh2 .vhic { width: 58px; height: 58px; border-radius: 17px; } .vh2 .vhic svg { width: 28px; height: 28px; } }


.crumbs .lsw { display: inline-flex; align-items: center; gap: 6px; margin: -6px -4px; padding: 6px 10px 6px 12px; border-radius: 999px;
  background: rgba(244,241,236,.1); border: 1px solid rgba(244,241,236,.18); color: #F4F1EC; font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap;
  min-height: 36px; transition: background .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.crumbs .lsw:hover, .crumbs .lsw[aria-expanded="true"] { background: rgba(244,241,236,.18); border-color: rgba(244,241,236,.32); }
.crumbs .lsw svg { width: 12px; height: 12px; flex: none; fill: none; stroke: #F2B66B; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.crumbs .lsw[aria-expanded="true"] svg { transform: rotate(180deg); }
.lsw-bg { position: fixed; inset: 0; z-index: 80; background: rgba(13,12,11,.5); opacity: 0; transition: opacity .2s; }
.lsw-bg.on { opacity: 1; }
.lsw-sheet { position: fixed; z-index: 81; left: 0; right: 0; bottom: 0; max-height: 84vh; max-height: 84dvh; display: flex; flex-direction: column;
  background: #F4F1EC; color: #161412; border-radius: 20px 20px 0 0; box-shadow: 0 -18px 50px -20px rgba(13,12,11,.55);
  transform: translateY(104%); transition: transform .26s cubic-bezier(.2,.8,.2,1); font-family: var(--sans); padding-bottom: env(safe-area-inset-bottom); }
.lsw-sheet.on { transform: none; }
.lsw-sheet[hidden], .lsw-bg[hidden] { display: none; }
.lsw-hd { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 20px; border-bottom: 1px solid #E3DCD1; position: relative; }
.lsw-hd::before { content: ""; position: absolute; top: 6px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: #D8CFC2; }
.lsw-hd h2 { margin: 12px 0 2px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; flex: 1; }
.lsw-hd h2 small { font-family: var(--hans); font-weight: 500; font-size: 14px; color: #857C71; margin-left: 6px; }
.lsw-x { width: 40px; height: 40px; margin-top: 8px; border-radius: 50%; display: grid; place-items: center; color: #4D4944; background: #EFE9DF; }
.lsw-x svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lsw-list { list-style: none; margin: 0; padding: 8px 10px 6px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; flex: 1; }
.lsw-list li { margin: 0; }
.lsw-list a, .lsw-list .soon { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 12px;
  color: inherit; text-decoration: none; position: relative; }
.lsw-list a:hover { background: #EFE9DF; }
.lsw-list a.cur { background: #fff; box-shadow: 0 1px 0 rgba(13,12,11,.04), 0 8px 22px -16px rgba(13,12,11,.5); }
.lsw-list a.cur::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: #E07A36; }
.lsw-n { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-family: var(--mono); font-size: 14.3px; font-weight: 600; background: #EFE9DF; color: #4D4944; }
.lsw-list a.cur .lsw-n { background: #E07A36; color: #fff; }
.lsw-list a.done .lsw-n { background: #E3F2EE; color: #2F8571; }
.lsw-list .cp .lsw-n { background: #0D0C0B; color: #F2B66B; font-family: var(--hans); font-size: 15px; }
.lsw-t { min-width: 0; display: grid; gap: 1px; }
.lsw-t b { font-family: var(--hans); font-weight: 600; font-size: 16px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsw-t i { font-style: normal; font-size: 13px; color: #857C71; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsw-s { font-size: 12.5px; color: #857C71; white-space: nowrap; text-align: right; display: grid; justify-items: end; gap: 5px; }
.lsw-s .here { font-size: 11.5px; font-weight: 600; color: #fff; background: #E07A36; border-radius: 999px; padding: 3px 9px; }
.lsw-s .ok { color: #2F8571; font-weight: 600; }
.lsw-bar { width: 44px; height: 4px; border-radius: 4px; background: #E3DCD1; overflow: hidden; }
.lsw-bar i { display: block; height: 100%; background: #2F8571; border-radius: 4px; }
.lsw-list .soon { padding-top: 6px; padding-bottom: 6px; color: #A39A8E; }
.lsw-list .soon .lsw-n { background: transparent; border: 1px dashed #D8CFC2; color: #A39A8E; height: 32px; }
.lsw-list .soon .lsw-t b { font-size: 15px; font-weight: 500; }
.lsw-sep { margin: 10px 10px 4px; font-family: var(--mono); font-size: 12.1px; letter-spacing: .1em; text-transform: uppercase; color: #A39A8E; }
.lsw-ft { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid #E3DCD1; }
.lsw-ft a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 12px; font-weight: 600; font-size: 14.5px; text-decoration: none; color: #161412; background: #fff; border: 1px solid #E3DCD1; }
.lsw-ft a.cur { border-color: #E07A36; color: #B85A1E; }
.lsw-ft a small { font-family: var(--hans); font-weight: 500; color: #857C71; }
@media (min-width: 700px) {
  .lsw-sheet { left: var(--lsw-x, 24px); right: auto; bottom: auto; top: 64px; width: 420px; max-height: min(640px, calc(100vh - 84px)); border-radius: 16px;
    transform: translateY(-8px); opacity: 0; transition: transform .18s, opacity .18s; box-shadow: 0 24px 60px -24px rgba(13,12,11,.55); border: 1px solid #E3DCD1; }
  .lsw-sheet.on { transform: none; opacity: 1; }
  .lsw-hd::before { display: none; }
  .lsw-hd h2 { margin-top: 4px; }
  .lsw-x { margin-top: 0; width: 34px; height: 34px; }
  .lsw-bg { background: rgba(13,12,11,.18); }
}
@media (prefers-reduced-motion: reduce) { .lsw-sheet, .lsw-bg, .crumbs .lsw svg { transition: none; } }
