:root, :host {
  --top: 56px;
}
* { box-sizing: border-box }
html, body, :host { margin: 0; background: var(--floor); color: var(--ink); font: 400 17px/1.5 var(--font); -webkit-font-smoothing: antialiased }
:host { display: block }
body { min-height: 100vh; overscroll-behavior-x: none }
#app { min-height: calc(100vh - var(--top)) }
.loading { padding: 40px 22px; color: var(--ink-2) }
a { color: var(--ink) }
button { font: 600 15px/1 var(--font); color: var(--ink); background: var(--floor-3); border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; touch-action: manipulation }
button:hover { border-color: var(--ink-2) }
button[aria-pressed="true"] { background: var(--bk-sel-bg); color: var(--bk-sel-ink); border-color: var(--bk-sel-bg) }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px }
/* a label or symbol in the look-here colour: on paper, ink on a yellow highlight */
.tone-look { color: var(--y-ink) !important; background: var(--y-hl); border-radius: 4px; padding: 0 .2em; -webkit-box-decoration-break: clone; box-decoration-break: clone }
.ghost .hand { fill: var(--hand-fill); stroke: var(--hand-edge) }
[hidden] { display: none !important }
.grow { flex: 1 }

/* ---------- top bar ---------- */
.top { height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--floor); z-index: 20 }
.top a.home { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--ink); border-radius: 12px }
.top .ltitle { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw }
.dots { display: flex; gap: 2px; margin-left: 8px }
.dots span { width: 22px; height: 44px; display: inline-flex; align-items: center; justify-content: center }
.dots span::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--floor-3); border: 2px solid var(--line) }
.dots span.seen::after { background: var(--ink-2); border-color: var(--ink-2) }
.dots span.on::after { background: var(--ink); border-color: var(--ink); transform: scale(1.25) }
.icon-btn { width: 44px; padding: 0; border-radius: 12px; background: transparent; border-color: transparent; font-size: 22px }
.icon-btn.cc { font-size: 13px; font-weight: 800; letter-spacing: .04em }
.icon-btn[aria-pressed="true"] { background: var(--floor-3); color: var(--ink); border-color: var(--line) }

/* ---------- cover (R19) ---------- */
.cover { min-height: calc(100vh - var(--top)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center }
.cover-n { font-weight: 800; color: var(--ink-2); font-size: 18px }
.cover h1 { font-size: clamp(38px, 6vw, 72px); line-height: 1; letter-spacing: -0.03em; margin: 0; font-family: var(--display-font); font-weight: var(--display-weight) }
.cover-art { width: min(560px, 86vw); height: min(240px, 30vh); border-radius: 18px; background: var(--floor-2); overflow: hidden }
.cover-art canvas { width: 100%; height: 100%; display: block }
.start { font-size: 20px; min-height: 60px; padding: 0 44px; background: var(--bk-sel-bg); color: var(--bk-sel-ink); border-color: var(--bk-sel-bg); font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; border-radius: 999px }
.start.ghosty { background: transparent; color: var(--ink); border: 1px solid var(--line) }
.cover-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center }
.cover-check { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 15px }
.cover-voice { color: var(--ink-2); font-size: 14px; margin: 0 }
.chip-btn { min-height: 44px; font-size: 14px; padding: 0 14px; background: transparent }
.chip-btn.done { border-color: var(--g) }

/* ---------- the scene (R13: one scene fills the screen; picture >= 60% of the height) ---------- */
.scene { height: calc(100vh - var(--top)); height: calc(100dvh - var(--top)); display: flex; flex-direction: column; overflow: hidden }
.stage { position: relative; flex: 1 1 auto; min-height: 0; margin: 10px 14px 0; border-radius: 18px; background: var(--floor-2); overflow: hidden; user-select: none; -webkit-user-select: none }
.stage canvas.layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block }
.ask { position: absolute; left: 22px; right: 22px; top: 14px; z-index: 6; font-weight: 800; font-size: clamp(21px, 2.3vw, 30px); letter-spacing: -0.015em; line-height: 1.15; pointer-events: none; text-wrap: balance }
.lbl { position: absolute; z-index: 5; visibility: hidden; font-weight: 700; font-size: 15px; color: var(--ink); white-space: nowrap; pointer-events: none; text-shadow: 0 1px 3px color-mix(in srgb, var(--shade) 90%, transparent), 0 0 1px var(--shade) }
.lbl.big { font-size: 22px; font-weight: 800 }
.lbl.gated, .sbtn.gated { display: none }
.caption { min-height: 34px; padding: 6px 22px 0; text-align: center; color: var(--ink); font-size: 17px; font-weight: 500; line-height: 1.3 }
.caption:empty { visibility: hidden }
.dock { display: flex; align-items: center; gap: 10px; padding: 8px 14px 12px; min-height: 64px }
.dock .controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
.nav { min-width: 44px; font-size: 22px; padding: 0 14px }
.nav.next { font-size: 17px; padding: 0 22px; background: transparent }
.nav.next.ready { background: var(--bk-sel-bg); color: var(--bk-sel-ink); border-color: var(--bk-sel-bg) }
.mtab { background: transparent; font-weight: 700 }
.mtab[aria-expanded="true"] { background: var(--floor-3) }
.sbtn { white-space: nowrap }
.sbtn.on-stage { position: absolute; z-index: 7 }
.sbtn.round { width: 48px; height: 48px; padding: 0; border-radius: 50% }
.sbtn.round.small { width: 44px; height: 44px }
.sbtn.plus { font-size: 26px; font-weight: 800; background: var(--floor-3) }
.sbtn.onpic { background: color-mix(in srgb, var(--shade) 82%, transparent) }
.sbtn.choice { min-width: 72px }
.sbtn.right { border-color: var(--g); box-shadow: 0 0 0 2px var(--g) inset }
.sbtn.ears { background: var(--y); color: var(--on-y); border-color: var(--y); font-weight: 800 }
.pulse { animation: pulse 1.6s ease-in-out infinite; border-color: var(--y) !important }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--y) 55%, transparent) } 50% { box-shadow: 0 0 0 10px transparent } }
.pulse-once { animation: pulse 1.4s ease-in-out 1; border-color: var(--y) }
.broken { position: absolute; inset: auto 0 40% 0; text-align: center; color: var(--ink-2) }
/* R21: the highlight. A 2 px yellow outline that pulses once; everything else dims to 45%. */
.hl { position: absolute; z-index: 4; border-radius: 10px; outline: 2px solid var(--y); box-shadow: inset 0 0 0 1px var(--casing), 0 0 0 3px var(--casing), 0 0 0 200vmax color-mix(in srgb, var(--shade) 55%, transparent); pointer-events: none; animation: hl .7s ease-out 1 }
@keyframes hl { 0% { outline-offset: 10px; outline-color: transparent } 60% { outline-offset: -2px; outline-color: var(--y) } 100% { outline-offset: 0 } }
.ghost { position: absolute; z-index: 9; left: var(--gx); top: var(--gy); width: 48px; height: 48px; margin: -6px 0 0 -16px; pointer-events: none; opacity: 0 }
.ghost.go { animation: ghost 2.4s ease-in-out 1 }
@keyframes ghost { 0% { opacity: 0; transform: translate(30px, 40px) } 20% { opacity: 1; transform: translate(0, 0) } 35% { transform: translate(0, 0) scale(.86) } 50% { transform: translate(0, 0) scale(1) } 80% { opacity: 1; transform: translate(var(--tx), var(--ty)) } 100% { opacity: 0; transform: translate(var(--tx), var(--ty)) } }
body.await-step .stage::after, :host(.await-step) .stage::after { content: "›"; position: absolute; right: 18px; bottom: 14px; z-index: 8; font-size: 30px; font-weight: 800; color: var(--y); animation: pulse 1.4s infinite; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--y) }

/* ---------- the maths sheet (R25: at most the lower 45%; the picture stays live above it) ---------- */
.sheet { flex: 0 0 auto; height: 45vh; max-height: 45vh; border-top: 2px solid var(--line); background: var(--sheet); padding: 10px 18px 16px; overflow: auto; animation: rise .35s ease-out }
@keyframes rise { from { transform: translateY(40px); opacity: 0 } to { transform: none; opacity: 1 } }
body.sheet-open .caption, :host(.sheet-open) .caption { display: none }
.sheet-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap }
.rungs { display: flex; gap: 6px; flex-wrap: wrap }
.rung-btn { min-height: 40px; font-size: 14px; padding: 0 14px; background: transparent }
.nb-link { font-weight: 700; padding: 10px; text-underline-offset: 3px }
.sheet-body { display: grid; gap: 10px; margin-top: 10px }
.rung { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: baseline }
.rung .rk { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: var(--ink-2) }
.rung .rv { font-size: 19px; line-height: 1.4; font-variant-numeric: tabular-nums }
.r-words .rv { color: var(--ink-2) }
.more-rung { justify-self: start; background: transparent }
.fly { position: fixed; z-index: 60; border: 2px solid; border-radius: 8px; pointer-events: none; overflow: hidden; transform-origin: 0 0 }
.fly canvas { width: 100%; height: 100%; display: block }

/* ---------- typeset maths (tex.js) ---------- */
.tx { font-family: var(--math); font-size: 1.1em; white-space: nowrap; line-height: 1.2 }
.tx-d { display: block; font-size: 25px; overflow-x: auto; overflow-y: hidden; padding: 6px 0 10px; white-space: nowrap }
.tx i { font-style: italic }
.tx .tx-f, .tx .tx-tx { font-style: normal }
.tx .tx-f { margin: 0 .1em }
.tx .tx-r { margin: 0 .28em }
.tx .tx-b { margin: 0 .22em }
.tx .tx-p { margin-right: .17em }
.tx sup, .tx sub { font-size: .7em; line-height: 0 }
.tx-ss { display: inline-flex; flex-direction: column; vertical-align: -0.45em; font-size: .7em; line-height: 1.05; margin-left: .05em }
.tx-lim { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 .12em; line-height: 1 }
.tx-lim .tx-lu, .tx-lim .tx-ld { font-size: .62em; line-height: 1.1; min-height: .3em }
.tx-op { font-size: 1.45em; line-height: 1 }
.tx-fr { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 .12em; line-height: 1.15 }
.tx-fr.tx-t { font-size: .82em }
.tx-nu { padding: 0 .15em .05em }
.tx-de { border-top: 1.5px solid currentColor; padding: .08em .15em 0; align-self: stretch; text-align: center }
.tx-sq { white-space: nowrap }
.tx-sqi { border-top: 1.5px solid currentColor; padding: 0 .1em; margin-left: .02em }
.tx-ov { border-top: 1.5px solid currentColor }
.tx-dl.tx-big, .tx-dl.tx-lr { font-size: 1.25em }
.tx-dl.tx-Big { font-size: 1.5em }
.tx-ub, .tx-ob { display: inline-flex; flex-direction: column; align-items: center; vertical-align: top }
.tx-ubb { border-bottom: 2px solid currentColor; border-radius: 0 0 6px 6px; padding: 0 .1em .15em }
.tx-obb { border-top: 2px solid currentColor; border-radius: 6px 6px 0 0 }
.tx-ubl { font-size: .62em; margin-top: .25em; font-family: var(--font); font-style: normal }
.tx-xa { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 .3em }
.tx-xt { font-size: .7em; line-height: 1 }
.tx-xr { line-height: .8 }
.tx-box { border: 1.5px solid currentColor; padding: .1em .3em; border-radius: 4px }
.tx-pt { border-radius: 6px; padding: 0 .06em; cursor: pointer; transition: opacity .3s }
.tx-pt:hover { background: color-mix(in srgb, var(--glow) 6%, transparent) }
.arriving > :not(.tx-pt):not(:has(.tx-pt)) { opacity: 0 }
.tx-pt.waiting { opacity: 0 }
.tx-d:not(.arriving) > * { transition: opacity .5s }
.tx-pt.pulse-once { animation: sym 1s ease-out 1 }
@keyframes sym { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--y) 90%, transparent) } 100% { box-shadow: 0 0 0 12px transparent } }

/* ---------- home ---------- */
.home-top { border-bottom: 0 }
.journey { padding: 6px 22px 0; max-width: 1500px; margin: 0 auto }
.journey h1 { font-size: clamp(30px, 4.2vw, 56px); font-family: var(--display-font); font-weight: var(--display-weight); letter-spacing: -0.03em; line-height: 1.02; margin: 4px 0 8px }
.chart-wrap { display: flex; align-items: center; gap: 14px; position: relative }
.bigplay { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 50%; padding: 0; background: var(--bk-key-bg); color: var(--bk-key-ink); border: 0; box-shadow: 0 0 0 0 color-mix(in srgb, var(--y) 50%, transparent); animation: pulse 2.4s ease-in-out infinite }
.bigplay svg { width: 40px; height: 40px; margin-left: 6px }
.bigplay.on { background: var(--y); animation: none }
.chart-scroll { flex: 1; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: var(--line) transparent }
.chart { display: block; overflow: visible }
.chart text { font-family: var(--font) }
.chart .tick { stroke: var(--line) } .chart .tick-t { fill: var(--ink-2); font-size: 13px }
.chart .grid { stroke: color-mix(in srgb, var(--tn-dim) 12%, transparent) }
.chart .rec { stroke: var(--t); stroke-width: 3 }
.chart .goal { stroke: var(--tn-plain); stroke-width: 2; stroke-dasharray: 7 6 }
.chart .shelf { stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round }
.chart .score { fill: none; stroke: var(--b); stroke-width: 4; stroke-linejoin: round }
.chart .rpt { fill: var(--b) } .chart .rpt.float { fill: var(--floor); stroke: var(--b); stroke-width: 3 }
.chart .drop { stroke: var(--c); stroke-width: 2; stroke-dasharray: 3 3 }
.chart .lab-rec { fill: var(--t-ink); font-weight: 700; font-size: 15px } .chart .lab-goal { fill: var(--ink); font-weight: 700; font-size: 15px }
.chart .lab-shelf { fill: var(--ink-2); font-weight: 600; font-size: 14px } .chart .lab-r8 { fill: var(--ink); font-size: 13px; font-weight: 600 }
.chart .legend text { fill: var(--ink-2); font-size: 14px; font-weight: 600 }
.chart .hide { display: none }
.chart .st { cursor: pointer; outline: none }
.chart .st .hit { fill: transparent } .chart .st .base { fill: var(--floor); stroke: var(--line); stroke-width: 5 } .chart .st .core { fill: var(--ink-2) }
.chart .st-lab { fill: var(--ink); font-size: 14px; font-weight: 700; paint-order: stroke; stroke: var(--floor); stroke-width: 4px }
.chart .st.on .core, .chart .st:focus-visible .core { fill: var(--y); stroke: var(--casing); stroke-width: 1 }
.chart .st.on .base { stroke: var(--y) }
.chart .st.swell { transform-box: fill-box; transform-origin: center; animation: swell 2.4s ease-in-out 1 }
@keyframes swell { 0%, 100% { transform: scale(1) } 30% { transform: scale(1.5) } }
.chart .st.latest:not(.on) .base { animation: latest 2.2s ease-in-out infinite }
@keyframes latest { 50% { stroke: var(--ink-2) } }
.chart .ph-line { stroke: var(--y); stroke-width: 2 } .chart .ph-ring { fill: none; stroke: var(--y); stroke-width: 3 }
/* on paper, yellow wears the site's charcoal casing (as its now marks do); on a dark page the casing is clear */
.chart .ph-case { stroke: var(--casing); stroke-width: 4; fill: none } .chart .ph-case.ring { stroke-width: 5 }
.chart .st .case { fill: none; stroke: var(--casing); stroke-width: 1; display: none } .chart .st.on .case { display: inline }
.home-cap { min-height: 30px }
/* station */
.station { max-width: 1500px; margin: 0 auto; padding: 0 22px; scroll-margin-top: 64px }
.station:empty { display: none }
.st-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line) }
.st-date { color: var(--ink-2); font-weight: 700; font-size: 15px }
.st-head h2 { font-size: clamp(26px, 3vw, 40px); margin: 0; letter-spacing: -0.02em; font-family: var(--display-font); font-weight: var(--display-weight) }
.st-hero { position: relative; margin: 12px 0 }
.st-hero.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
.clip-pic { position: relative; height: 180px; border-radius: 14px; overflow: hidden; background: var(--floor-2) }
.clip-pic canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: ew-resize }
.clip-pic .sbtn.onpic { position: absolute; left: 12px; top: 12px }
.dots-pic { position: relative; height: 150px; border-radius: 14px; background: var(--floor-2); overflow: hidden }
.dots-pic.big { height: clamp(240px, 34vh, 340px) }
.dots-pic canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block }
.dots-pic .lbl { font-size: 14px } .dots-pic .big-lbl { font-size: 18px; font-weight: 800 }
.onpic-row { position: absolute; right: 12px; top: 10px; display: flex; gap: 8px; z-index: 6 }
.onpic-row .sbtn { background: color-mix(in srgb, var(--shade) 85%, transparent) }
.cards-wrap { display: flex; align-items: center; gap: 8px; margin: 6px 0 24px }
.cards { flex: 1; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px calc(50% - 220px); scrollbar-width: none; overscroll-behavior-x: contain }
.cards::-webkit-scrollbar { display: none }
.card { flex: 0 0 440px; scroll-snap-align: center; background: var(--floor-2); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-height: 340px; transition: opacity .25s, transform .25s }
.card:not(.on) { opacity: .4; transform: scale(.94) }
.card:not(.on) .taught, .card:not(.on) .pic, .card:not(.on) .card-foot { visibility: hidden }
.card-top { display: flex; justify-content: space-between; align-items: center }
.card-n { color: var(--ink-2); font-weight: 700 }
.stamp { font-weight: 900; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: 8px; border: 2.5px solid currentColor; transform: rotate(-3deg); color: var(--ink-2) }
.stamp.v-better { color: var(--g) } .stamp.v-worse { color: var(--c) } .stamp.v-plain { color: var(--ink) }
.stamp.running::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 1.2s linear infinite; vertical-align: -1px }
@keyframes spin { to { transform: rotate(360deg) } }
.card .q { font-size: 22px; line-height: 1.2; margin: 0; letter-spacing: -0.01em; font-weight: 800; text-wrap: balance }
.card .taught { color: var(--ink-2); margin: 0; font-size: 17px; line-height: 1.35 }
.card .pic { min-height: 120px }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: auto }
.lesson-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink-2); font-size: 14px; font-weight: 600; min-height: 44px }
.lesson-link canvas { width: 44px; height: 44px; border-radius: 10px; background: var(--floor-3) }
.cpic { width: 100%; height: 140px; display: block }
.cpic .axis { stroke: var(--ink-2); stroke-width: 1.5 } .cpic .dash { stroke: var(--ink); stroke-dasharray: 5 4; stroke-width: 1.5 }
.cpic .cn { fill: var(--ink); font-size: 14.5px; font-weight: 700 } .cpic .cl { fill: var(--ink-2); font-size: 14.5px; font-weight: 600 }
.cpic .arrow { fill: none; stroke: var(--c); stroke-width: 2; stroke-dasharray: 4 3 }
.ab { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 30px }
.ab .sbtn { border-width: 2px }
.recipe { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 22px }
.recipe .blk { padding: 10px 12px; border-radius: 10px; background: var(--floor-3); font-weight: 700; font-size: 15px } .recipe .blk.into { border: 2px solid var(--ink) }
.recipe .plus { color: var(--ink-2); font-weight: 800; font-size: 20px }
.running-pic { display: flex; align-items: center; gap: 14px; padding-top: 30px }
.running-pic .ring { width: 46px; height: 46px; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--ink); animation: spin 1.4s linear infinite }
.running-pic .rt { font-size: 22px; font-weight: 800 }
.notes-dlg { position: fixed; inset: 0; z-index: 80; background: var(--veil); display: flex; align-items: center; justify-content: center; padding: 16px }
.notes-in { width: min(760px, 100%); max-height: 86vh; overflow: auto; background: var(--floor-2); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px }
.notes-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 10px }
.note-row .k { color: var(--ink-2); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em }
.note-row p { margin: 2px 0 12px; font-size: 16px; line-height: 1.5 }
/* below the fold */
.below { max-width: 1500px; margin: 0 auto; padding: 10px 22px 26px }
.row-h { font-size: 24px; font-family: var(--display-font); font-weight: var(--display-weight); margin: 12px 0 12px }
.row-when { margin-left: 12px; font: 500 14px var(--font); color: var(--ink-2) }
.now-row { display: flex; gap: 12px; flex-wrap: wrap }
.now-cell { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; max-width: 420px }
.now { display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px; border-radius: 16px; background: var(--floor-2); border: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 84px }
.now b { font-size: 17px } .now .now-t { grid-column: 2; color: var(--ink-2); font-weight: 700 }
.now.you { background: var(--y); color: var(--on-y); border-color: var(--y) } .now.you .now-t { color: var(--on-y) }
.now-icon { grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 50% }
.now-icon.ring { border: 5px solid var(--line); border-top-color: var(--ink); animation: spin 1.4s linear infinite }
.now-icon.glass { border-radius: 0; background: linear-gradient(var(--ink-2), var(--ink-2)) top/100% 3px no-repeat, linear-gradient(var(--ink-2), var(--ink-2)) bottom/100% 3px no-repeat; clip-path: polygon(10% 0, 90% 0, 50% 50%, 90% 100%, 10% 100%, 50% 50%); background-color: color-mix(in srgb, var(--tn-dim) 45%, transparent) }
.now-icon.ear { background: var(--floor); -webkit-mask: radial-gradient(circle at 50% 50%, transparent 7px, currentColor 8px); }
.more-btn { align-self: flex-start; min-height: 40px }
.now-more { background: var(--floor-2); border-radius: 12px; padding: 4px 14px; color: var(--ink-2); font-size: 15px }
.now-more .small { font-size: 13px }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px }
.tile { aspect-ratio: 1; border-radius: 16px; background: var(--floor-2); border: 1px solid var(--line); display: flex; flex-direction: column; padding: 10px; gap: 6px; text-decoration: none; color: var(--ink); position: relative; overflow: hidden }
.tile:hover { border-color: var(--ink-2) }
.tile .tile-art { flex: 1; width: 100%; min-height: 0; display: block; border-radius: 10px }
.tile b { font-size: 16px; line-height: 1.15 }
.tile .seen-dots { display: flex; gap: 4px } .tile .seen-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--floor-3); border: 1.5px solid var(--line) } .tile .seen-dots i.on { background: var(--ink-2) }
.tile.coming { opacity: .55 } .tile .soon { color: var(--ink-2); font-size: 13px; font-weight: 700 }

/* ---------- notebook (R28) ---------- */
.notebook { max-width: 860px; margin: 0 auto; padding: 22px 22px 80px; font-size: 18px; line-height: 1.6 }
.notebook h1 { font-size: 40px; letter-spacing: -0.02em; margin: 10px 0 18px; line-height: 1.05; font-family: var(--display-font); font-weight: var(--display-weight) }
.notebook h2 { font-size: 26px; margin: 30px 0 8px; font-family: var(--display-font); font-weight: var(--display-weight) } .notebook h3 { font-size: 20px; margin: 18px 0 6px; color: var(--ink-2) }
.notebook .back-link { font-weight: 700; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center }
.notebook .tx-d { font-size: 22px; padding: 10px 0 }
.notebook .kicker { display: none }
.notebook .maths h4, .notebook .ours h4 { font-size: 18px; margin: 18px 0 4px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em }
.notebook table { border-collapse: collapse; font-size: 15px } .notebook td, .notebook th { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left }
.notebook .tablewrap { overflow-x: auto }
.nb-note { color: var(--ink-2) }
.notebook .clips { display: grid; gap: 8px; margin: 10px 0 18px } .notebook .clip { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px }
.notebook .clip span { color: var(--ink-2); margin-left: 8px; font-size: 15px } .nb-clip { min-height: 40px }
.end h1 { margin-bottom: 10px }

/* ---------- phone (R35-R38) ---------- */
@media (max-width: 760px) {
  :root, :host { --top: 52px }
  body, :host { font-size: 16px }
  .top { padding: 0 6px; gap: 2px }
  .top .ltitle { display: none }
  .dots { margin-left: 0 }
  .dots span { width: 20px }
  body.sheet-open .stage { min-height: 0 }
  .dots-pic .onpic-row { top: 44px }
  .stage { margin: 6px 6px 0; border-radius: 14px; min-height: 55vh }
  .ask { left: 14px; right: 14px; top: 10px; font-size: 20px }
  .lbl { font-size: 14px }
  .caption { font-size: 15px; padding: 6px 12px 0; min-height: 30px }
  .dock { flex-wrap: wrap; padding: 8px 8px 10px; row-gap: 8px }
  .dock .controls { order: -1; width: 100%; justify-content: center }
  .sheet { height: 45vh; padding: 8px 12px 14px }
  .tx-d { font-size: 20px }
  .rung .rv { font-size: 17px }
  .journey { padding: 4px 12px 0 }
  .chart-wrap { gap: 8px }
  .bigplay { width: 64px; height: 64px; position: sticky; left: 0 }
  .bigplay svg { width: 28px; height: 28px }
  .chart-scroll { scroll-snap-type: x proximity }
  .station, .below { padding-left: 12px; padding-right: 12px }
  .cards { padding: 8px 7vw }
  .card { flex-basis: 86vw; min-height: 330px }
  .card .q { font-size: 20px }
  .cards-wrap .nav { display: none }
  .st-hero.two { grid-template-columns: 1fr }
  .tiles { grid-template-columns: repeat(2, 1fr) }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition: none !important } }
