/* ¡Dale! — visual language: el cuaderno y el patio.
   Terracotta and azulejo cobalt on whitewashed paper, an ochre highlighter, olive leaves; a band of patterned
   tiles across the top, a patio window and an orange tree that talk, ruled notebook paper for the key ideas,
   sticky notes for traps, rubber stamps for feedback. Fraunces for Spanish and headings, Figtree for the interface. */
@font-face { font-family: "Fraunces"; src: url(../fonts/fraunces.woff2) format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(../fonts/fraunces-italic.woff2) format("woff2"); font-weight: 300 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url(../fonts/figtree.woff2) format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }

:root {
  /* accent colour: one light-mode and one dark-mode shade per choice (Progress > Settings) */
  --acc-l: #b5502a; --acc-d: #ff9d76;
  --bg: #f8f3ea; --card: #fffdf8; --ink: #24201c; --muted: #6b6a7a; --line: #e7e0d0; --line2: #d8cfbb;
  --accent: var(--acc-l); --accent-deep: color-mix(in srgb, var(--acc-l) 68%, #000); --accent-ink: #fff; --soft: color-mix(in srgb, var(--acc-l) 11%, #fff);
  --rouge: #2a5bb8; --rouge-soft: #e3ebfa; --pot: #c4683f; --orange: #f08a24; --red: #e0443a; --tile: #2a5bb8; --tilebg: #fffdf8; --sun: #f3b53f; --sun-soft: #fdf0d3; --onsun: #2b2010;
  --good: #1f8155; --good-bg: #e0f2e7; --good2: #5fb98a; --bad: #c8412c; --bad-bg: #fce6e1; --warn: #94650a; --warn-bg: #fdf0d3;
  --awn: var(--acc-l); --awn2: #ffffff;
  --seyes: color-mix(in srgb, var(--acc-l) 13%, transparent); --seyes2: color-mix(in srgb, var(--acc-l) 5.5%, transparent); --margin: rgba(196, 104, 63, .55);
  --shadow: 0 1px 0 rgba(27, 29, 51, .04), 0 10px 28px -18px rgba(27, 29, 51, .35);
  --shadow-lift: 0 2px 0 rgba(27, 29, 51, .05), 0 16px 34px -18px rgba(27, 29, 51, .45);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 18px; --navh: 68px;
  color-scheme: light;
}
:root[data-accent="cobalto"] { --acc-l: #2347a6; --acc-d: #8fb0ff; }
:root[data-accent="olivo"] { --acc-l: #57682a; --acc-d: #c2d27c; }
:root[data-accent="buganvilla"] { --acc-l: #a3245f; --acc-d: #ff8cc0; }
:root[data-accent="anil"] { --acc-l: #3d3f95; --acc-d: #aeb1ff; }
:root[data-accent="carbon"] { --acc-l: #262626; --acc-d: #e6e5e1; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { color-scheme: dark; } }
@media (prefers-color-scheme: dark) {
:root[data-theme="auto"] { --bg: #161616; --card: #212121; --ink: #ecebe8; --muted: #a3a29e; --line: #303030; --line2: #444444;
    --accent: var(--acc-d); --accent-deep: color-mix(in srgb, var(--acc-d) 62%, #000); --accent-ink: #141414; --soft: color-mix(in srgb, var(--acc-d) 17%, #212121);
    --rouge: #8fb0ff; --rouge-soft: #1f2a40; --pot: #b5603a; --orange: #f39a3c; --red: #ec5a4f; --tile: #3a6bc8; --tilebg: #e9e4da; --sun: #f6c35a; --sun-soft: #352d1c; --onsun: #2b2010;
    --good: #6fd7a3; --good-bg: #1b3329; --good2: #3f9c72; --bad: #ff8a73; --bad-bg: #3a2623; --warn: #f6c35a; --warn-bg: #352d1c;
    --awn: var(--acc-l); --awn2: #e4e3df;
    --seyes: color-mix(in srgb, var(--acc-d) 18%, transparent); --seyes2: color-mix(in srgb, var(--acc-d) 7%, transparent); --margin: rgba(255, 138, 115, .5);
    --shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 12px 30px -18px rgba(0, 0, 0, .85);
    --shadow-lift: 0 2px 0 rgba(0, 0, 0, .3), 0 18px 36px -18px rgba(0, 0, 0, .95); }
}
:root[data-theme="dark"] { --bg: #161616; --card: #212121; --ink: #ecebe8; --muted: #a3a29e; --line: #303030; --line2: #444444;
    --accent: var(--acc-d); --accent-deep: color-mix(in srgb, var(--acc-d) 62%, #000); --accent-ink: #141414; --soft: color-mix(in srgb, var(--acc-d) 17%, #212121);
    --rouge: #8fb0ff; --rouge-soft: #1f2a40; --pot: #b5603a; --orange: #f39a3c; --red: #ec5a4f; --tile: #3a6bc8; --tilebg: #e9e4da; --sun: #f6c35a; --sun-soft: #352d1c; --onsun: #2b2010;
    --good: #6fd7a3; --good-bg: #1b3329; --good2: #3f9c72; --bad: #ff8a73; --bad-bg: #3a2623; --warn: #f6c35a; --warn-bg: #352d1c;
    --awn: var(--acc-l); --awn2: #e4e3df;
    --seyes: color-mix(in srgb, var(--acc-d) 18%, transparent); --seyes2: color-mix(in srgb, var(--acc-d) 7%, transparent); --margin: rgba(255, 138, 115, .5);
    --shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 12px 30px -18px rgba(0, 0, 0, .85);
    --shadow-lift: 0 2px 0 rgba(0, 0, 0, .3), 0 18px 36px -18px rgba(0, 0, 0, .95); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); }
body { min-height: 100dvh; padding-bottom: calc(var(--navh) + 18px + env(safe-area-inset-bottom)); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }
::selection { background: color-mix(in srgb, var(--sun) 55%, transparent); }
h1 { font: 650 34px/1.05 var(--serif); margin: 6px 0 16px; letter-spacing: -.02em; font-variation-settings: "SOFT" 100, "WONK" 1; }
h2 { font: 650 27px/1.12 var(--serif); margin: 4px 0 6px; letter-spacing: -.01em; font-variation-settings: "SOFT" 100; }
h3 { font: 700 12px/1.2 var(--sans); margin: 28px 0 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
h3::before { content: ""; width: 14px; height: 3px; border-radius: 3px; background: var(--rouge); flex: none; }
p { margin: 8px 0; }
.page, .session { max-width: 560px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 16px 24px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; justify-content: center; }
.lead { font: 19px/1.45 var(--serif); }
.fr { font-family: var(--serif); font-variation-settings: "SOFT" 50; }
.say, .link { cursor: pointer; }
i.fr { font-style: italic; color: var(--accent); }
.link { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
.row { display: flex; align-items: center; gap: 12px; justify-content: space-between; }

/* motion: things arrive by rising a little; activities slide in */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes slidein { from { opacity: 0; transform: translateX(18px); } }
@keyframes pop { 0% { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.06); } 100% { opacity: 1; transform: none; } }
@keyframes stamp { 0% { opacity: 0; transform: scale(1.5) rotate(var(--rot, -3deg)); } 60% { opacity: 1; transform: scale(.96) rotate(var(--rot, -3deg)); } 100% { transform: scale(1) rotate(var(--rot, -3deg)); } }
.page > * { animation: rise .38s cubic-bezier(.2, .7, .3, 1) both; }
.page > :nth-child(2) { animation-delay: .04s; } .page > :nth-child(3) { animation-delay: .08s; } .page > :nth-child(4) { animation-delay: .12s; }
.page > :nth-child(5) { animation-delay: .16s; } .page > :nth-child(n+6) { animation-delay: .2s; }
.stage > :first-child { animation: slidein .32s cubic-bezier(.2, .7, .3, 1) both; }

/* ── the awning */
.awning { margin: calc(-14px - env(safe-area-inset-top)) -16px 0; padding-top: env(safe-area-inset-top); background: var(--tilebg); box-shadow: 0 4px 10px -6px rgba(36, 32, 28, .3); }
.awning > i { display: block; height: 40px; position: relative; background: var(--tilebg); border-bottom: 4px solid var(--accent); }
.awning > i::before, .awning > i::after { content: ""; position: absolute; inset: 0; background: var(--tile);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23000' stroke-width='2.6'%3E%3Ccircle cx='0' cy='0' r='8'/%3E%3Ccircle cx='40' cy='0' r='8'/%3E%3Ccircle cx='0' cy='40' r='8'/%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3C/g%3E%3Cpath d='M20 5l3.6 11.4L35 20l-11.4 3.6L20 35l-3.6-11.4L5 20l11.4-3.6zM20 0l3 3-3 3-3-3zM20 40l3-3-3-3-3 3zM0 20l3 3 3-3-3-3zM40 20l-3 3-3-3 3-3z'/%3E%3C/svg%3E") 0 0 / 40px 40px repeat-x; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23000' stroke-width='2.6'%3E%3Ccircle cx='0' cy='0' r='8'/%3E%3Ccircle cx='40' cy='0' r='8'/%3E%3Ccircle cx='0' cy='40' r='8'/%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3C/g%3E%3Cpath d='M20 5l3.6 11.4L35 20l-11.4 3.6L20 35l-3.6-11.4L5 20l11.4-3.6zM20 0l3 3-3 3-3-3zM20 40l3-3-3-3-3 3zM0 20l3 3 3-3-3-3zM40 20l-3 3-3-3 3-3z'/%3E%3C/svg%3E") 0 0 / 40px 40px repeat-x; }
.awning > i::after { background: var(--sun);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='3.4'/%3E%3Ccircle cx='0' cy='0' r='3.2'/%3E%3Ccircle cx='40' cy='0' r='3.2'/%3E%3Ccircle cx='0' cy='40' r='3.2'/%3E%3Ccircle cx='40' cy='40' r='3.2'/%3E%3C/svg%3E") 0 0 / 40px 40px repeat-x; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='3.4'/%3E%3Ccircle cx='0' cy='0' r='3.2'/%3E%3Ccircle cx='40' cy='0' r='3.2'/%3E%3Ccircle cx='0' cy='40' r='3.2'/%3E%3Ccircle cx='40' cy='40' r='3.2'/%3E%3C/svg%3E") 0 0 / 40px 40px repeat-x; }
.boot { max-width: 560px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 16px; text-align: center; }
.boot .logo { margin-top: 38vh; }
.logo { font: 700 44px/1 var(--serif); letter-spacing: -.03em; font-variation-settings: "SOFT" 100, "WONK" 1; margin: 0; }
.logo::before { content: "¡"; color: var(--rouge); margin-right: .02em; } .logo::after { content: "!"; color: var(--rouge); }

/* ── home hero */
.hero { margin-bottom: 6px; }
.heroin { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 14px; }
.hello { font: italic 500 18px/1.2 var(--serif); color: var(--rouge); margin: 0 0 4px; }
.heroin .sub2 { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.art { display: block; overflow: visible; }
.art.cafe { width: 168px; flex: none; margin-right: -6px; }
.a-accent { fill: var(--accent); } .a-onaccent { fill: var(--accent-ink); } .a-sun { fill: var(--sun); } .a-onsun { fill: var(--onsun); }
.a-ink { fill: var(--ink); } .a-card { fill: var(--card); } .a-rouge { fill: var(--rouge); } .a-good { fill: var(--good); } .a-good2 { fill: var(--good2); }
.a-nofill { fill: none; } .a-pot { fill: var(--pot); } .a-orange { fill: var(--orange); } .a-red { fill: var(--red); }
.a-stroke-card { stroke: color-mix(in srgb, var(--card) 70%, transparent); stroke-width: 1.6; stroke-linecap: round; }
.sway { animation: sway 5s ease-in-out infinite; } .sway.s2 { animation-duration: 6.5s; animation-delay: -2s; }
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
.a-stroke { stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.a-stroke-soft { stroke: var(--line2); stroke-width: 2; stroke-linecap: round; }
.a-stroke-accent { stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; }
.a-stroke-muted, .a-stroke-muted path { stroke: var(--muted); stroke-width: 2; fill: none; stroke-linecap: round; }
.bt { font: italic 600 14px var(--serif); }
.cafe .bub { transform-box: fill-box; animation: pop .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.cafe .b1 { transform-origin: 30% 100%; } .cafe .b2 { transform-origin: 65% 100%; animation-delay: .35s; }
.cafe.swap .bub { transition: opacity .3s, transform .3s; opacity: 0; transform: scale(.85); }
.steam path { animation: steam 3.2s ease-in-out infinite; opacity: 0; }
.steam path:nth-child(2) { animation-delay: .8s; } .steam path:nth-child(3) { animation-delay: 1.6s; } .steam path:nth-child(4) { animation-delay: 2.4s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(4px); } 40% { opacity: .8; } 100% { opacity: 0; transform: translateY(-8px); } }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.pagehead h1 { margin-bottom: 14px; }
.art.spot { width: 92px; height: 68px; flex: none; margin-bottom: 8px; }
.float { animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }
.dash { stroke-dasharray: 4 5; animation: march 2.4s linear infinite; }
@keyframes march { to { stroke-dashoffset: -36; } }
.pin { animation: bob 2.6s ease-in-out infinite; }
.plant .leaf { transform-box: fill-box; transform-origin: 50% 100%; animation: pop .6s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: var(--d); }

/* ── next-up card */
.nextcard { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px 18px 14px; margin: 14px 0; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.nextcard::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: repeating-linear-gradient(90deg, var(--accent) 0 14px, var(--rouge) 14px 28px, var(--sun) 28px 42px); opacity: .9; }
.nextcard .kicker { display: flex; justify-content: space-between; align-items: center; }
.nextcard .unitname { font: 650 25px/1.15 var(--serif); margin: 2px 0 6px; font-variation-settings: "SOFT" 100; }
.more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.more .btn { flex: 1 1 auto; min-height: 42px; padding: 9px 14px; font-size: 14px; }
.stagechip { font: 700 11px/1 var(--sans); letter-spacing: .06em; padding: 5px 9px; border-radius: 99px; background: var(--soft); color: var(--accent); text-transform: none; }

/* ── nav: a floating bar */
#nav { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); max-width: 536px; margin: 0 auto; height: var(--navh); display: flex; gap: 4px; padding: 6px;
  background: color-mix(in srgb, var(--card) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lift); z-index: 5; }
#nav[hidden] { display: none; }
#nav button { flex: 1; background: none; border: 0; border-radius: 18px; padding: 6px 0 4px; font: 600 11.5px/1.1 var(--sans); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: background .2s, color .2s; }
#nav .ic { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
#nav .ic-dot { stroke-width: 2.6; }
#nav button.on { color: var(--accent); background: var(--soft); }
#nav button.on .ic { fill: color-mix(in srgb, var(--accent) 22%, transparent); transform: translateY(-1px) scale(1.08); }

/* ── surfaces */
.panel, .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin: 14px 0; box-shadow: var(--shadow); }
.panel h3 { margin-top: 0; }
.btn { border: 1.5px solid var(--line2); background: var(--card); border-radius: 14px; padding: 13px 18px; font-weight: 700; min-height: 50px; color: var(--ink);
  transition: transform .08s, box-shadow .08s, background .2s; box-shadow: 0 2px 0 var(--line2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 3px 0 var(--accent-deep); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.wide { display: block; width: 100%; margin-top: 10px; }
.btn.danger { color: var(--bad); }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 transparent; }
.btn:focus-visible, .item:focus-visible, .tile:focus-visible, #nav button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.btn.chipbtn, .chip { border: 1.5px solid var(--line2); background: var(--card); border-radius: 99px; padding: 6px 13px; font-size: 13px; min-height: 0; font-weight: 600; white-space: nowrap; box-shadow: none; color: var(--ink); }
.tile:active, .item:active { transform: scale(.985); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 10px 11px; position: relative; box-shadow: var(--shadow); }
.stat::before { content: ""; position: absolute; left: 12px; top: 0; width: 22px; height: 4px; border-radius: 0 0 4px 4px; background: var(--accent); }
.stat:nth-child(2)::before { background: var(--rouge); } .stat:nth-child(3)::before { background: var(--sun); }
.stat .n { font: 650 25px/1.1 var(--serif); font-variant-numeric: tabular-nums; margin-top: 4px; font-variation-settings: "SOFT" 100; }
.stat .l { font-size: 12px; color: var(--muted); line-height: 1.25; margin-top: 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); color: var(--ink); position: relative; overflow: hidden; }
.tile b { font: 650 20px/1.2 var(--serif); }
.tile span { font-size: 13px; color: var(--muted); }
.tile .art.spot { width: 64px; height: 48px; margin: 0 0 6px -4px; }

.list { display: flex; flex-direction: column; gap: 8px; }
.item { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; width: 100%; color: var(--ink); transition: border-color .2s, transform .1s; }
.item:hover { border-color: var(--line2); }
.item b.fr { font-size: 18px; }
.pill { display: inline-block; font: 700 11px/1 var(--sans); padding: 4px 8px; border-radius: 99px; background: var(--soft); color: var(--accent); vertical-align: middle; text-transform: lowercase; }
.pill.reg-c { background: var(--warn-bg); color: var(--warn); } .pill.reg-f { background: var(--soft); }
.pill.done { background: var(--good-bg); color: var(--good); margin-left: 4px; } .pill.kind { background: transparent; border: 1px solid var(--line2); color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--muted); margin-right: 8px; }
.dot.mid { background: var(--warn); border-color: var(--warn); } .dot.ok { background: var(--good); border-color: var(--good); }
.cov { height: 7px; background: color-mix(in srgb, var(--line) 80%, transparent); border-radius: 9px; overflow: hidden; margin: 8px 0 4px; flex: 1; }
.cov i { display: block; height: 100%; border-radius: 9px; background: var(--accent); transform-origin: left; animation: grow .7s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes grow { from { transform: scaleX(0); } }
.cov i.ok { background: var(--good); } .cov i.mid { background: var(--accent); } .cov i.low { background: var(--sun); }
.bands { display: flex; flex-direction: column; gap: 2px; }
.band { display: grid; grid-template-columns: 118px 1fr 44px; align-items: center; gap: 10px; }
.band .small:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.kv { background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin: 14px 0; box-shadow: var(--shadow); }
.kvrow { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); gap: 10px; }
.kvrow:last-child { border: 0; }
.stepper { display: inline-flex; align-items: center; gap: 12px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line2); background: var(--bg); font-size: 18px; line-height: 1; }
.seg { display: flex; background: color-mix(in srgb, var(--line) 75%, transparent); border-radius: 14px; padding: 4px; margin-bottom: 12px; gap: 2px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted); transition: background .2s, color .2s; }
.seg button.on { background: var(--card); color: var(--accent); box-shadow: 0 1px 0 var(--line2), 0 4px 10px -6px rgba(0, 0, 0, .3); }
.credits { margin-top: 22px; }

/* ── daily goal: a ring and a week of dots */
.goal { margin: 14px 0 4px; display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); }
.goal .gtext { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.goal .gtext b { font: 650 17px/1.2 var(--serif); }
.week { display: flex; gap: 6px; margin-top: 2px; }
.week span { display: flex; flex-direction: column; align-items: center; gap: 3px; font: 600 10px/1 var(--sans); color: var(--muted); }
.week i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line2); display: block; }
.week i.met { background: var(--sun); border-color: var(--sun); }
.week i.part { background: color-mix(in srgb, var(--sun) 30%, transparent); border-color: var(--sun); }
.week span.today { color: var(--ink); } .week span.today i { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--accent); }
.ring { position: relative; width: 64px; height: 64px; flex: none; }
.ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; animation: ringfill 1s .15s cubic-bezier(.2, .7, .3, 1) forwards; }
.ring.done .ring-fg { stroke: var(--good); }
@keyframes ringfill { to { stroke-dashoffset: var(--to); } }
.ring-in { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 14px/1 var(--sans); font-variant-numeric: tabular-nums; }
.ring.done .ring-in { color: var(--good); font-size: 22px; }

/* ── session */
.session { display: flex; flex-direction: column; min-height: 100dvh; padding-bottom: 0; margin-bottom: calc(-1 * (var(--navh) + 18px) - env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.x { border: 0; background: none; font-size: 18px; color: var(--muted); padding: 8px 8px 8px 0; }
.bar { flex: 1; height: 12px; background: color-mix(in srgb, var(--line) 85%, transparent); border-radius: 9px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 9px; transition: width .45s cubic-bezier(.2, .7, .3, 1); position: relative;
  background-image: linear-gradient(rgba(255, 255, 255, .28) 0 35%, transparent 35%); }
.stage { flex: 1; display: flex; flex-direction: column; }
.stage > :first-child { flex: 1; }
.actions { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 26%); z-index: 2; }
.actions .btn { flex: 1; }
.kicker { font: 700 12px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.kicker.link { color: var(--accent); text-transform: none; letter-spacing: 0; font-size: 13px; text-decoration: none; }
.top > .muted.small { display: inline-block; } .top > .muted.small::first-letter { text-transform: uppercase; }
.card { display: flex; flex-direction: column; }
.stage > .card { border: 0; box-shadow: none; background: none; padding: 6px 2px; margin: 4px 0; }
.big { font: 650 40px/1.15 var(--serif); text-align: center; margin: 22px 0 6px; overflow-wrap: anywhere; font-variation-settings: "SOFT" 100, "WONK" 1; }
.big.place { margin: 48px 0; font-size: 46px; }
.ctx { margin-top: 20px; font-size: 19px; text-align: center; color: var(--muted); font-family: var(--serif); }
.ctx b { color: var(--ink); }
.back { border-top: 2px dashed var(--line); margin-top: 20px; padding-top: 16px; text-align: center; }
.gloss { font-size: 20px; font-weight: 700; }
.lit { color: var(--accent); margin-top: 6px; font-family: var(--serif); font-style: italic; }
.note { background: var(--soft); border-radius: 12px; padding: 10px 13px; margin: 10px 0 0; font-size: 14px; text-align: left; }
.bigplay { width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 30px; margin: 26px auto 10px; display: block;
  box-shadow: 0 4px 0 var(--accent-deep), 0 0 0 8px var(--soft); transition: transform .1s; }
.bigplay:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-deep), 0 0 0 8px var(--soft); }
.row.center .bigplay { margin: 18px 0; }

/* finishing: a stamp and falling accents */
.donecard { align-items: center; text-align: center; padding-top: 30px !important; }
.donecard .seal { width: 128px; height: 128px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-direction: column; margin: 8px auto 18px;
  border: 3px solid var(--good); color: var(--good); outline: 1.5px solid var(--good); outline-offset: -9px; font: italic 700 23px/1 var(--serif); --rot: -8deg; padding: 0 10px;
  animation: stamp .55s cubic-bezier(.3, 1.3, .5, 1) both; background: var(--good-bg); }
.donecard .seal small { font: 700 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin-top: 6px; font-style: normal; }
.donecard .seal.meh { border-color: var(--accent); color: var(--accent); outline-color: var(--accent); background: var(--soft); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti i { position: absolute; top: -40px; left: var(--x); font: italic 700 26px/1 var(--serif); color: var(--c); animation: fall var(--t) var(--d) cubic-bezier(.3, .2, .6, 1) forwards; }
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--r)); } }

.ex { padding-top: 6px; }
.q { font: 600 22px/1.3 var(--serif); margin: 4px 0 14px; font-variation-settings: "SOFT" 100; }
.cloze { font-size: 23px; line-height: 1.5; margin: 10px 0; }
.blank { display: inline-block; min-width: 64px; border-bottom: 3px solid var(--accent); margin: 0 3px; white-space: pre; border-radius: 1px;
  background: linear-gradient(transparent 70%, color-mix(in srgb, var(--sun) 35%, transparent) 70%); }
/* the answer field is a line of notebook paper: Seyès ruling and the red margin */
.answer, .paste { width: 100%; font-size: 20px; padding: 13px 14px 13px 22px; border-radius: 14px; border: 2px solid var(--line2); color: var(--ink); margin-top: 16px; outline: none;
  background: linear-gradient(90deg, transparent 12px, var(--margin) 12px 13.5px, transparent 13.5px), var(--card); transition: border-color .2s, box-shadow .2s; }
.answer:focus, .paste:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.answer.good { border-color: var(--good); background: linear-gradient(90deg, transparent 12px, var(--good) 12px 13.5px, transparent 13.5px), var(--good-bg); }
.answer.bad { border-color: var(--bad); background: linear-gradient(90deg, transparent 12px, var(--bad) 12px 13.5px, transparent 13.5px), var(--bad-bg); }
.paste { font-size: 17px; resize: vertical; line-height: 28px;
  background: linear-gradient(90deg, transparent 12px, var(--margin) 12px 13.5px, transparent 13.5px), repeating-linear-gradient(transparent 0 13px, var(--seyes) 13px 14px, transparent 14px 27px, var(--seyes) 27px 28px), var(--card);
  background-position: 0 0, 0 13px, 0 0; }
.accents { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.accents button { flex: 0 0 auto; min-width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line2); background: var(--card); font: 17px var(--serif); box-shadow: 0 2px 0 var(--line2); }
.accents button:active { transform: translateY(2px); box-shadow: none; }
.fb { margin-top: 16px; }
/* feedback is stamped */
.fbmsg { display: inline-flex; align-items: center; gap: 8px; font: 700 15px/1.2 var(--sans); padding: 8px 14px; border-radius: 10px; border: 2px solid; --rot: -2deg; animation: stamp .4s cubic-bezier(.3, 1.3, .5, 1) both; }
.fbmsg::before { font: 700 16px/1 var(--sans); }
.fbmsg.good { background: var(--good-bg); color: var(--good); } .fbmsg.good::before { content: "✓"; }
.fbmsg.bad { background: var(--bad-bg); color: var(--bad); --rot: 1.5deg; } .fbmsg.bad::before { content: "✗"; }
.fbmsg.warn { background: var(--warn-bg); color: var(--warn); font-weight: 600; border-style: dashed; --rot: 0deg; animation: rise .3s both; }
.fbmsg.warn::before { content: "✎"; }
.reveal { font-size: 22px; margin-top: 12px; cursor: pointer; }
.diff { margin-top: 10px; font-size: 17px; } .diffrow { display: grid; grid-template-columns: 62px 1fr; gap: 6px; align-items: baseline; }
.diff .bad { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 2px; } .diff .warn { color: var(--warn); border-bottom: 2px dotted; } .diff .good { color: var(--good); font-weight: 700; }
.variants { margin-top: 12px; } .variants .fr { font-size: 17px; cursor: pointer; padding: 2px 0; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* concept */
.concept h2 { font-size: 34px; cursor: pointer; }
.concept .sub { color: var(--muted); font-size: 17px; margin-bottom: 12px; }
.concept .gist { font: 19px/1.5 var(--serif); }
.concept details { border-top: 1px solid var(--line); padding: 12px 0; }
.concept summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.concept summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
.concept details[open] summary::after { content: "–"; }
.concept summary::-webkit-details-marker { display: none; }
.concept ul { padding-left: 20px; margin: 8px 0; } .concept li { margin: 7px 0; }

/* reader */
.readwrap { padding-bottom: 8px; }
.rline { padding: 12px 0; border-bottom: 1px solid var(--line); }
.rl { font-size: 21px; line-height: 1.6; font-family: var(--serif); }
.w { cursor: pointer; border-radius: 4px; padding: 1px 0; transition: background .15s; }
.w.unk { border-bottom: 2px dotted var(--sun); }
.w.tapped { background: var(--sun-soft); box-shadow: 0 0 0 2px var(--sun-soft); }
.rtools { display: flex; gap: 6px; margin-top: 8px; }
.mini { border: 1.5px solid var(--line2); background: transparent; border-radius: 99px; padding: 3px 12px; font-size: 12px; color: var(--muted); font-weight: 600; }
.ren { color: var(--muted); margin-top: 8px; font-size: 15px; }
.xray { margin-top: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.xrow { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.xcol { text-align: center; } .xcol .fr { font-size: 18px; } .xg { font-size: 12px; color: var(--accent); max-width: 110px; line-height: 1.2; }
.xcons { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 14px; }

/* sheet + toast */
.sheet-back { position: fixed; inset: 0; background: rgba(16, 19, 42, .4); z-index: 20; display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.sheet-back.open { opacity: 1; }
.sheet { background: var(--card); width: 100%; max-width: 560px; max-height: 82dvh; overflow: auto; border-radius: 26px 26px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(30px); transition: transform .28s cubic-bezier(.2, .8, .3, 1); box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, .3); }
.sheet-back.open .sheet { transform: none; }
.grip { width: 42px; height: 5px; border-radius: 5px; background: var(--line2); margin: 0 auto 14px; }
.wsheet .big { text-align: left; margin: 0; font-size: 32px; cursor: pointer; } .wsheet .gloss { margin: 12px 0; }
.toast { position: fixed; left: 50%; bottom: calc(var(--navh) + 30px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 99px; font-size: 14px; font-weight: 600; z-index: 30; max-width: 90vw; text-align: center; animation: pop .3s both; box-shadow: var(--shadow-lift); }

/* marking: words, forms, phrases */
.w.ftapped { background: var(--soft); border-bottom: 2px solid var(--accent); }
.w.ptapped { background: var(--good-bg); border-bottom: 2px solid var(--good); border-radius: 0; }
.w.rstart { outline: 2px dashed var(--accent); outline-offset: 2px; }
.rline.sp0, .rline.sp1 { border-left: 3px solid var(--accent); padding-left: 12px; }
.rline.sp1 { border-left-color: var(--rouge); margin-left: 18px; }
.rline.sp1 .rl { color: color-mix(in srgb, var(--rouge) 35%, var(--ink)); }
.rline.sp0 .rl { color: color-mix(in srgb, var(--accent) 30%, var(--ink)); }
.btn.slim { padding: 9px 13px; min-height: 40px; font-size: 14px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.marks { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; margin: 12px 0; }
.markmsg { font-size: 14px; color: var(--warn); font-weight: 600; }
.phrow { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; }
.phrow.on { border-color: var(--good); background: var(--good-bg); }
.phrow b.fr { font-size: 18px; cursor: pointer; }
.linkbtn { display: block; border: 0; background: none; color: var(--accent); padding: 12px 0 0; font-size: 14px; font-weight: 600; text-align: left; }
.formnote { color: var(--muted); } .formnote.irr { color: var(--warn); }
.sec { margin: 14px 0; } .sec .kicker { margin-bottom: 4px; }
.exline { padding: 6px 0; cursor: pointer; } .exline .fr { font-size: 17px; }
.answer.small { font-size: 16px; padding: 10px 12px 10px 22px; margin-top: 8px; font-family: var(--sans); }
.col { display: flex; flex-direction: column; gap: 8px; }
.clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }

/* verbs, gender, diagnosis */
.vgrid { display: grid; gap: 6px 5px; align-items: center; margin: 14px 0; }
.vh { font-size: 10.5px; color: var(--muted); text-align: center; font-weight: 600; }
.vf { font-size: 14.5px; line-height: 1.2; }
.vc { width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid var(--line2); background: transparent; padding: 0; display: inline-block; justify-self: center; transition: transform .1s; }
.vc:active { transform: scale(.9); }
.vc.none { border-style: dashed; opacity: .35; }
.vc.new { background: var(--card); }
.vc.low { background: var(--bad-bg); border-color: var(--bad); }
.vc.mid { background: var(--sun-soft); border-color: var(--sun); }
.vc.ok { background: var(--good); border-color: var(--good); }
.vlegend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vlegend .vc { width: 16px; height: 16px; border-radius: 5px; margin-left: 8px; }
.conj { margin-top: 12px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.conj .fr { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 16px; margin-top: 4px; }
.conj .hit { color: var(--good); font-weight: 700; }
.conjbox summary { font-weight: 700; cursor: pointer; }
.conjline { padding: 5px 0; } .conjline .fr { font-size: 16px; cursor: pointer; }
.dx { margin-top: 14px; padding: 10px 12px; border-left: 3px solid var(--rouge); background: var(--rouge-soft); border-radius: 0 12px 12px 0; }
.dx .kicker { margin-bottom: 4px; color: var(--rouge); }
.dxrow { font-size: 14.5px; padding: 3px 0; }
.note.slip { margin: 0 0 14px; background: var(--warn-bg); color: var(--warn); }
.btn.fr { font-size: 20px; font-weight: 600; }

/* guided lessons */
.lesson { padding-bottom: 8px; }
.lhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.lhead .kicker { margin: 0; }
.ldots { display: flex; gap: 5px; } .ldots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); transition: width .3s, background .3s; }
.ldots i.done { background: var(--muted); } .ldots i.on { background: var(--accent); width: 22px; border-radius: 6px; }
.lesson h2 { font-size: 34px; cursor: pointer; } .lesson .sub { color: var(--muted); font-size: 17px; margin-bottom: 14px; }
.lead2 { font-size: 18px; line-height: 1.6; }
/* the key idea is written in the notebook; the trap is a sticky note */
.gistbox, .trap { border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 16px 16px 16px 30px; margin-top: 18px; position: relative; }
.gistbox { background: linear-gradient(90deg, transparent 16px, var(--margin) 16px 17.5px, transparent 17.5px),
  repeating-linear-gradient(transparent 0 6px, var(--seyes2) 6px 7px, transparent 7px 13px, var(--seyes2) 13px 14px, transparent 14px 20px, var(--seyes2) 20px 21px, transparent 21px 27px, var(--seyes) 27px 28.5px), var(--card);
  background-position: 0 0, 0 12px, 0 0; }
.gistbox p, .trap p { margin: 0; font: 17px/28px var(--serif); } .gistbox .kicker, .trap .kicker { margin-bottom: 4px; line-height: 28px; }
.gistbox .kicker { color: var(--accent); }
.trap { border: 0; background: var(--sun-soft); padding-left: 18px; border-radius: 4px 4px 18px 4px; transform: rotate(-.6deg); box-shadow: 0 10px 18px -14px rgba(0, 0, 0, .5); margin-top: 26px; }
.trap::before { content: ""; position: absolute; top: -10px; left: 50%; width: 74px; height: 20px; margin-left: -37px; background: color-mix(in srgb, var(--card) 60%, transparent); border: 1px solid var(--line); transform: rotate(-2.5deg); }
.trap .kicker { color: var(--warn); }
.trap .kicker::before { content: "⚠ "; }
.steps { list-style: none; padding: 0; margin: 10px 0; counter-reset: st; }
.steps li { position: relative; padding: 11px 0 11px 38px; border-bottom: 1px solid var(--line); font-size: 16.5px; line-height: 1.5; counter-increment: st; }
.steps li::before { content: counter(st); position: absolute; left: 0; top: 11px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: italic 700 14px/26px var(--serif); text-align: center; }
.check { margin-top: 10px; } .opts { display: flex; flex-direction: column; gap: 10px; }
.btn.opt { text-align: left; font-size: 19px; font-weight: 500; }
.btn.opt.right { border-color: var(--good); background: var(--good-bg); color: var(--good); font-weight: 700; box-shadow: 0 2px 0 var(--good); animation: pop .35s both; }
.btn.opt.wrong { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); box-shadow: 0 2px 0 var(--bad); } .btn.opt.dim { opacity: .45; }
.vtable { margin: 4px 0 14px; } .vtgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vt { text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 9px 12px; font-size: 18px; }
.seebox { border-left: 3px solid var(--rouge); padding-left: 12px; margin: 10px 0; }
.rl { white-space: pre-line; }
/* concept map */
.seg.mini2 { margin: 0; flex: 0 0 auto; } .seg.mini2 button { padding: 6px 14px; }
.tchips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 6px; }
.tchip { text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--tc); background: var(--card); border-radius: 12px; padding: 8px 10px; font-size: 13px; }
.tchip .cov { margin: 6px 0 0; height: 4px; } .tchip .cov i { background: var(--tc); }
.track { --tc: var(--accent); margin-top: 26px; scroll-margin-top: 12px; }
.t-sound { --tc: #b0569c; } .t-core { --tc: #2f6fd8; } .t-verbs { --tc: #1f9d6b; } .t-past { --tc: #d08a2a; } .t-pron { --tc: #7a62d6; } .t-mood { --tc: #e0503a; } .t-real { --tc: #3c9aab; }
.thead { display: flex; justify-content: space-between; align-items: baseline; font-size: 20px; font-family: var(--serif); font-weight: 600; }
.stations { margin-top: 10px; border-left: 3px dotted var(--tc); margin-left: 9px; }
.station { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; padding: 9px 0; margin-left: -11px; color: var(--ink); border-radius: 12px; transition: background .15s; }
.station:hover { background: color-mix(in srgb, var(--tc, var(--accent)) 7%, transparent); }
.node { flex: 0 0 auto; width: 19px; height: 19px; border-radius: 50%; border: 3px solid var(--tc, var(--muted)); background: var(--bg); display: inline-block; }
.station.ok .node, .node.ok { background: var(--tc, var(--good)); }
.station.mid .node, .node.mid { background: color-mix(in srgb, var(--tc, var(--warn)) 45%, var(--bg)); }
.station.ready .node, .node.ready { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc, var(--accent)) 30%, transparent); animation: beacon 2.2s ease-in-out infinite; }
@keyframes beacon { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--tc, var(--accent)) 12%, transparent); } }
.station.later .node, .node.later { border-color: var(--line2); } .station.later .stext b { color: var(--muted); }
.stext { display: flex; flex-direction: column; flex: 1; } .stext b { font: 600 18px/1.25 var(--serif); } .needs { color: var(--warn); }
.vlegend .node { width: 13px; height: 13px; margin-left: 8px; --tc: var(--accent); }
.nextup .item { margin-top: 8px; background: var(--bg); }
/* dictionary */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 4px; } .ipa { color: var(--muted); margin-right: 4px; }
.pill.gm { background: #dfe7ff; color: #1f45b0; } .pill.gf { background: #fde2e3; color: #b0324a; }
@media (prefers-color-scheme: dark) {
:root[data-theme="auto"] .pill.gm { background: #23304f; color: #a3b8ff; }
:root[data-theme="auto"] .pill.gf { background: #46202e; color: #ffa3b4; }
}
:root[data-theme="dark"] .pill.gm { background: #23304f; color: #a3b8ff; }
:root[data-theme="dark"] .pill.gf { background: #46202e; color: #ffa3b4; }
.senses { margin: 12px 0; padding-left: 22px; } .senses li { font-size: 18px; font-weight: 700; padding: 2px 0; } .senses li:nth-child(n+2) { font-weight: 400; }
.etym { font-size: 14.5px; line-height: 1.5; color: var(--muted); font-style: italic; font-family: var(--serif); }
.wsheet .sec { border-top: 1px solid var(--line); padding-top: 12px; } .wsheet .foot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 12px; }
.drow { display: flex; align-items: baseline; gap: 8px; }
.tchip { display: block; } .tchip b { display: block; } .tchip .cov { display: block; }

/* learning map */
.stagebar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 16px 0 4px; }
.stagebtn { border: 1.5px solid var(--line2); background: var(--card); border-radius: 14px; padding: 9px 6px 8px; display: block; color: var(--ink); }
.stagebtn b { display: block; font: 700 17px/1.1 var(--serif); } .stagebtn .cov { display: block; height: 4px; margin: 6px 0 0; }
.stagebtn.on { border-color: var(--accent); background: var(--soft); color: var(--accent); box-shadow: 0 2px 0 var(--accent); }
.stagehead h2 { font-size: 26px; margin-top: 14px; }
.t-S { --tc: #b0569c; } .t-B { --tc: #2f6fd8; } .t-P { --tc: #7a62d6; } .t-R { --tc: #3c9aab; } .t-V { --tc: #1f9d6b; }
.t-T { --tc: #d08a2a; } .t-W { --tc: #8a8f3a; } .t-F { --tc: #e0503a; } .t-C { --tc: #d0719a; } .t-L { --tc: #6b7280; }
@media (prefers-color-scheme: dark) {
:root[data-theme="auto"] .t-S, :root[data-theme="auto"] .t-sound { --tc: #e08acb; }
:root[data-theme="auto"] .t-B, :root[data-theme="auto"] .t-core { --tc: #7fa6ff; }
:root[data-theme="auto"] .t-P, :root[data-theme="auto"] .t-pron { --tc: #a995ff; }
:root[data-theme="auto"] .t-R, :root[data-theme="auto"] .t-real { --tc: #6cc7d6; }
:root[data-theme="auto"] .t-V, :root[data-theme="auto"] .t-verbs { --tc: #5fd3a0; }
:root[data-theme="auto"] .t-T, :root[data-theme="auto"] .t-past { --tc: #f0b35a; }
:root[data-theme="auto"] .t-W { --tc: #c3c86a; }
:root[data-theme="auto"] .t-F, :root[data-theme="auto"] .t-mood { --tc: #ff8a73; }
:root[data-theme="auto"] .t-C { --tc: #f0a0c0; }
:root[data-theme="auto"] .t-L { --tc: #a0a6b8; }
}
:root[data-theme="dark"] .t-S, :root[data-theme="dark"] .t-sound { --tc: #e08acb; }
:root[data-theme="dark"] .t-B, :root[data-theme="dark"] .t-core { --tc: #7fa6ff; }
:root[data-theme="dark"] .t-P, :root[data-theme="dark"] .t-pron { --tc: #a995ff; }
:root[data-theme="dark"] .t-R, :root[data-theme="dark"] .t-real { --tc: #6cc7d6; }
:root[data-theme="dark"] .t-V, :root[data-theme="dark"] .t-verbs { --tc: #5fd3a0; }
:root[data-theme="dark"] .t-T, :root[data-theme="dark"] .t-past { --tc: #f0b35a; }
:root[data-theme="dark"] .t-W { --tc: #c3c86a; }
:root[data-theme="dark"] .t-F, :root[data-theme="dark"] .t-mood { --tc: #ff8a73; }
:root[data-theme="dark"] .t-C { --tc: #f0a0c0; }
:root[data-theme="dark"] .t-L { --tc: #a0a6b8; }
.station.solid .node, .node.solid { background: var(--tc, var(--good)); }
.station.shaky .node, .node.shaky { background: color-mix(in srgb, var(--tc, var(--warn)) 45%, var(--bg)); }
.station.weak .node, .node.weak { border-color: var(--sun); background: var(--sun-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sun) 30%, transparent); }
.station.outline .node, .node.outline { border-style: dotted; border-color: var(--line2); }
.station.outline .stext b { color: var(--muted); font-weight: 500; }
.stations.flat { border: 0; margin: 4px 0 0 10px; }
.vlegend .node { --tc: var(--accent); }

.hearbox { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; } .hearbox .chip { font-size: 17px; padding: 8px 14px; font-family: var(--serif); }
.station > .muted.small:last-child { flex: 0 0 auto; max-width: 92px; text-align: right; line-height: 1.2; }
.lhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.lhead .kicker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linkbtn.skip { padding: 0; font-size: 13px; grid-column: 1 / -1; justify-self: end; }
.seg.levels { flex-wrap: wrap; } .seg.levels button { flex: 1 0 auto; padding: 7px 9px; font-size: 13px; }
.pill.lvl { background: transparent; border: 1.5px solid var(--accent); color: var(--accent); text-transform: none; }
/* word-order tiles are cut-out words */
.orderline { min-height: 62px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0 12px; margin: 12px 0;
  background: repeating-linear-gradient(transparent 0 58px, var(--line2) 58px 60px); }
.orderbank { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip.tilew { font: 500 18px/1.2 var(--serif); padding: 9px 14px; border-radius: 10px; box-shadow: 0 3px 0 var(--line2); animation: pop .25s both; }
.chip.tilew:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line2); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 70px; margin: 6px 0 2px; border-bottom: 1.5px solid var(--line2); }
.chart i { flex: 1; border-radius: 4px 4px 0 0; background: var(--accent); min-height: 2px; cursor: pointer; transform-origin: bottom; animation: growy .6s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes growy { from { transform: scaleY(0); } }
.chart i.mid { background: var(--good); } .chart i.none { background: var(--line); }
.chartaxis { display: flex; justify-content: space-between; } .chartread { min-height: 18px; margin-bottom: 10px; }
.reviewcard { border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 12px 14px; margin: 10px 0; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.reviewcard .actions { margin-top: 6px; position: static; background: none; padding: 6px 0 0; }
.report { margin-top: 14px; text-align: center; } .report .actions { margin-top: 8px; }
.reportbox { width: 100%; border: 1.5px solid var(--line2); background: var(--card); color: var(--ink); border-radius: 12px; padding: 10px; font: inherit; }
.search { margin: 0 0 12px; font-size: 16px; padding-left: 40px;
  background: no-repeat 14px 50% / 17px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a87a0' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 20 20'/%3E%3C/svg%3E"), var(--card); }
.pbgroup { margin: 14px 0; } .pbhead { display: flex; justify-content: space-between; align-items: baseline; width: 100%; background: none; border: 0; border-bottom: 1.5px solid var(--line2); padding: 6px 2px; font: 600 16px/1.3 var(--serif); text-align: left; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ring-fg { stroke-dashoffset: var(--to); }
}

:root.calm *, :root.calm *::before, :root.calm *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
:root.calm .ring-fg { stroke-dashoffset: var(--to); }
/* reading text size (Progress > Settings) */
.rl { font-size: calc(21px * var(--rs, 1)); }
.cloze { font-size: calc(23px * var(--rs, 1)); }
.q { font-size: calc(22px * var(--rs, 1)); } .answer { font-size: calc(20px * var(--rs, 1)); }
.seg.opt3 { margin: 0; padding: 3px; } .seg.opt3 button { padding: 5px 10px; font-size: 13px; white-space: nowrap; }

/* accent swatches */
.swatches { display: flex; gap: 8px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; background: var(--sw); box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px transparent; transition: box-shadow .2s, transform .15s; }
.swatch.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--sw); transform: scale(1.08); }
:root[data-theme="dark"] .swatch { background: var(--swd); } :root[data-theme="dark"] .swatch.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--swd); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .swatch { background: var(--swd); } :root[data-theme="auto"] .swatch.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--swd); } }
.kvrow.stack { flex-direction: column; align-items: stretch; gap: 10px; } .kvrow.stack > span:first-child { display: flex; justify-content: space-between; }

/* inside the Android app: no scroll bars anywhere, no double-tap zoom */
:root.native, :root.native * { scrollbar-width: none; }
:root.native ::-webkit-scrollbar { display: none; width: 0; height: 0; }
:root.native body { touch-action: pan-x pan-y; }

/* multiple choice: numbered options (keys 1–4), and what is shown once answered */
.mc .opts { margin-top: 14px; }
.btn.opt { display: flex; align-items: center; gap: 12px; }
.optkey { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line2); font: 700 12px/21px var(--sans); text-align: center; color: var(--muted); }
.btn.opt.right .optkey { border-color: var(--good); color: var(--good); } .btn.opt.wrong .optkey { border-color: var(--bad); color: var(--bad); }
.mc .big { margin: 12px 0 4px; }
.mcafter { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.mcafter .reveal { margin-top: 0; } .ctx.left { text-align: left; margin-top: 4px; font-size: 18px; color: var(--ink); }
.teach .gloss { margin-top: 6px; }
