/* Layout: one phone-width app column (full screen on a phone, a framed column on a computer); one question per screen, big tap targets, a sticky bottom button. Polyglot "Garden" tokens. */
:root {
  --bg: #f7efe2; --surface: #fdf7ee; --ink: #2a1f16; --muted: #6f5f4c; --line: #e6d8c3;
  --accent: #2f6b3a; --accent-ink: #ffffff; --accent-soft: #e2eed7;
  --stamp: #c2452d; --stamp-soft: #f8e0d6;
  --t-tourist: #f8e08e; --t-traveler: #bfdcf2; --t-expat: #f4c9da; --t-native: #f4b9a6; --t-trip: #ffc4b0; --trip-ink: #8a2f1c;
  --desk: #eadcc4; --frame: #2a1f16; --paper: #fffdf8; --paper-ink: #2a1f16;
  --display: "Syne", "Avenir Next", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #2a1d13; --surface: #36271b; --ink: #f6ecdf; --muted: #c2ae96; --line: #4b3828;
  --accent: #9fd68f; --accent-ink: #11200e; --accent-soft: #263321; --stamp: #ff8a6b; --stamp-soft: #3b1f16;
  --t-tourist: #4d3a17; --t-traveler: #1f3b52; --t-expat: #4d2639; --t-native: #542c20; --t-trip: #5a2b22; --trip-ink: #ffb59e;
  --desk: #1c130c; --frame: #0f0a06; --paper: #fffdf8; --paper-ink: #2a1f16; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #2a1d13; --surface: #36271b; --ink: #f6ecdf; --muted: #c2ae96; --line: #4b3828;
  --accent: #9fd68f; --accent-ink: #11200e; --accent-soft: #263321; --stamp: #ff8a6b; --stamp-soft: #3b1f16;
  --t-tourist: #4d3a17; --t-traveler: #1f3b52; --t-expat: #4d2639; --t-native: #542c20; --t-trip: #5a2b22; --trip-ink: #ffb59e;
  --desk: #1c130c; --frame: #0f0a06; --paper: #fffdf8; --paper-ink: #2a1f16; color-scheme: dark }

* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }   /* iOS: no text autosizing anywhere (the trip sheet is measured off screen, then drawn in a copy of the page) */
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
/* No zoom on double-tap or pinch (owner, 24 Oct 2026 #100): the page never zooms, and text fields are at least 16 px so iOS
   doesn't zoom in when one is tapped. Bigger text comes from the phone's own text-size setting. */
html, body { touch-action: manipulation; }
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: max(16px, 1em); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

#app { height: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; background: var(--bg); }
@media (min-width: 640px) {
  body { background: var(--desk); padding-block: 28px; }
  #app { height: min(860px, calc(100% - 0px)); border-radius: 36px; border: 10px solid var(--frame); overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
}
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 14px 20px 6px; min-height: 52px; }
.bar-l { justify-self: start; min-width: 0; } .bar-c { justify-self: center; } .bar-r { justify-self: end; min-width: 0; display: flex; }   /* Back · Language Trip (centred, #331) · Your Profile */
.brand-logo { display: none; }
.back { border: 0; background: none; padding: 8px 4px; font: 500 .8rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.brand { font: 800 1.05rem var(--display); letter-spacing: -.01em; white-space: nowrap; flex: none; }   /* never wraps; the profile link beside it shrinks instead */
.dots { display: flex; gap: 5px; }
.dots i { width: 16px; height: 4px; border-radius: 2px; background: var(--line); }
.dots i.on { background: var(--accent); }
main { flex: 1; overflow-y: auto; padding: 8px 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.foot { padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--bg); display: grid; gap: 8px; }
.foot:empty { display: none; }

h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.1; text-wrap: balance; }
h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
.sub { color: var(--muted); }
.eyebrow { font: 500 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.small { font-size: .85rem; }

.big { display: grid; gap: 12px; }
.choice { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; text-align: start; width: 100%; padding: 18px; border-radius: 22px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.choice .ic { grid-row: span 2; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; }
.choice .ic svg { width: 28px; height: 28px; }
.choice b { font: 700 1.15rem var(--display); }
.choice span { color: var(--muted); font-size: .9rem; }
.choice.trip .ic { background: linear-gradient(135deg, var(--t-trip), var(--t-native)); color: var(--trip-ink); }
.choice.learn .ic { background: var(--t-traveler); }

.opts { display: grid; gap: 8px; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opt { text-align: start; width: 100%; padding: 13px 14px; border-radius: 14px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); display: flex; gap: 10px; align-items: center; min-height: 52px; }
.opt small { display: block; color: var(--muted); font-size: .8rem; }
.opt .tx { flex: 1; min-width: 0; }
.opt[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.opt .ck { flex: none; width: 20px; height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; place-items: center; }
.opt[aria-pressed="true"] .ck { background: var(--accent); box-shadow: none; color: var(--accent-ink); }
.opt.radio .ck { border-radius: 50%; }
.label { font: 600 .9rem var(--body); margin-top: 4px; }

.search { position: relative; }
.search input { width: 100%; padding: 14px 16px; border-radius: 14px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 1rem; }
.search input:focus { box-shadow: inset 0 0 0 2px var(--accent); outline: none; }
.results { display: grid; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 0; padding: 8px 12px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font-size: .9rem; }
.chip[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); font-weight: 600; }
.tag { display: inline-block; font: 500 .68rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 4px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.tag.warn { background: var(--stamp-soft); color: var(--stamp); }

.btn { border: 0; border-radius: 16px; padding: 15px 18px; font: 700 1rem var(--body); background: var(--accent); color: var(--accent-ink); width: 100%; text-align: center; text-decoration: none; display: block; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: .9rem; padding: 6px; }

.hero { border-radius: 22px; padding: 18px; display: grid; gap: 8px; }
.hero.tourist { background: var(--t-tourist); } .hero.traveler { background: var(--t-traveler); }
.hero.expat { background: var(--t-expat); } .hero.native { background: var(--t-native); }
.hero .lv { font: 800 1.7rem var(--display); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--surface); border-radius: 16px; padding: 12px 14px; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; gap: 2px; min-width: 0; }
.stat .n { font: 500 1.35rem/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.note { border-radius: 14px; padding: 12px 14px; background: var(--stamp-soft); font-size: .9rem; }
.note.ok { background: var(--accent-soft); }
.weeks { display: grid; gap: 0; }
.wk { display: grid; grid-template-columns: 72px 1fr 22px; gap: 10px; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); background: none; font-size: .92rem; text-align: start; width: 100%; align-items: center; }
.wk .ck { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; place-items: center; color: var(--accent-ink); }
.wk.done .ck { background: var(--accent); box-shadow: none; } .wk.done > span:nth-child(2) { color: var(--muted); text-decoration: line-through; }
.wk .ck svg { width: 14px; height: 14px; }
.wk .w { font: 500 .78rem var(--mono); color: var(--muted); padding-top: 2px; }
.sw { position: relative; flex: none; width: 42px; height: 26px; border-radius: 99px; background: var(--line); transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); transition: transform .15s; }
.opt[aria-pressed="true"] .sw { background: var(--accent); }
.opt[aria-pressed="true"] .sw::after { transform: translateX(16px); }
@media (prefers-reduced-motion: reduce) { .sw, .sw::after { transition: none; } }

/* book reader */
.book { display: grid; gap: 16px; }
.page { background: var(--paper); color: var(--paper-ink); border-radius: 6px; padding: 22px 18px; box-shadow: 0 2px 10px rgba(0,0,0,.15); display: grid; gap: 12px; min-width: 0; }
.page h2 { font-size: 1.35rem; }
.page .eyebrow { color: #6f5f4c; }
.cover { background: var(--t-tourist); color: #2a1f16; min-height: 360px; align-content: space-between; padding: 26px 22px; }
.cover h1 { font-size: 2.3rem; }
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; color: inherit; }   /* app.html has no doctype (quirks mode): tables don't inherit the text colour there, so in dark mode the kit's phrase table was light-on-paper (19 Oct) */
td, th { text-align: start; padding: 7px 6px; border-bottom: 1px solid #e6d8c3; vertical-align: top; }
th { font: 500 .66rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #6f5f4c; }
td.t { font-weight: 600; font-size: 1rem; }
td.r { color: #6f5f4c; font-style: italic; }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: .9rem; max-width: calc(100% - 40px); }
/* No signal: a map link shows the address + coordinates instead (mapFallback() in app.js) */
.mapfb { position: fixed; inset: 0; z-index: 60; display: grid; place-items: end center; padding: 16px; background: rgba(0,0,0,.35); }
.mapfb-box { width: 100%; max-width: 480px; display: grid; gap: 10px; padding: 18px; border-radius: 18px; background: var(--bg); color: var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.mapfb-box h3 { text-transform: capitalize; }
.mapfb-addr { font-size: 1.35rem; font-weight: 700; line-height: 1.25; overflow-wrap: normal; }
.mapfb-gps { font: 500 1.05rem var(--mono); }
.mapfb-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mapfb-row a.chip { color: inherit; text-decoration: none; }
.field { display: grid; gap: 6px; }
.field input, .field select { padding: 12px 14px; border-radius: 12px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); width: 100%; }
.spin { color: var(--muted); font-size: .9rem; }
.kit { display: grid; gap: 10px; }
.sheet-view { display: block; min-width: 0; }   /* the Two-Page Sheet tab: the pages are drawn in its shadow root */
.sec { background: var(--surface); border-radius: 18px; box-shadow: inset 0 0 0 1.5px var(--line); padding: 14px 16px; display: grid; gap: 8px; min-width: 0; }
details.sec > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 700 1.05rem var(--display); }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary::after { content: "+"; font: 500 1.2rem var(--mono); color: var(--muted); }
details.sec[open] > summary::after { content: "–"; }
.sec h3 { font-size: 1.05rem; }
.visa { border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; }
.visa.ok { background: var(--accent-soft); } .visa.warn { background: var(--t-tourist); } .visa.stop { background: var(--stamp-soft); }
.visa b { font: 700 1.05rem var(--display); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .92rem; }
.kv dt { color: var(--muted); font: 500 .72rem/1.9 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.kv dd { margin: 0; min-width: 0; }
.sos { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.sos div { background: var(--stamp-soft); border-radius: 12px; padding: 8px 10px; display: grid; }
.sos b { font: 500 1.3rem var(--mono); }
.items { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: .92rem; }
.items li { display: grid; gap: 2px; }
.items .h { font-weight: 700; }
.items .m { color: var(--muted); font-size: .85rem; }
.sec a { color: var(--accent); }
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line), 0 0 0 8px var(--bg), 0 10px 12px -4px var(--bg); position: sticky; top: 0; z-index: 2; }   /* the ring of page colour hides what scrolls under the stuck bar */
.tabs button { border: 0; background: none; padding: 10px 6px; border-radius: 10px; font: 600 .9rem var(--body); color: var(--muted); white-space: nowrap; }
/* Four tabs (trip + lessons): labels stay on one line; on a narrow phone the text gets smaller and, if still too wide, the bar scrolls sideways. */
.tabs { grid-auto-columns: minmax(max-content, 1fr); overflow-x: auto; scrollbar-width: none; flex: none; }   /* flex: none: a scrolling box would otherwise shrink to nothing in main's column */
.tabs::-webkit-scrollbar { display: none; }
@media (max-width: 440px) { .tabs button { font-size: .8rem; padding: 9px 8px; } }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.addlearn { border-radius: 18px; padding: 18px; background: var(--t-traveler); display: grid; gap: 10px; }
.plugs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.plug { margin: 0; display: flex; gap: 10px; align-items: center; background: var(--bg); border-radius: 12px; padding: 8px 10px; box-shadow: inset 0 0 0 1px var(--line); }
.plug-art { flex: none; width: 72px; height: 72px; }
.plug-svg { display: block; width: 100%; height: 100%; }
.plug-face { fill: var(--surface); stroke: var(--muted); stroke-width: 1.5; }
.plug-pin { fill: var(--ink); }
.plug-hole { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.plug figcaption { display: flex; flex-direction: column; font-size: 12px; line-height: 1.35; color: var(--muted); }
.plug figcaption strong { font-size: 14px; color: var(--ink); }

/* textbook: higher levels (level dividers, theme headings, conjugation tables) */
.page h3 { font-size: 1.05rem; margin-top: 6px; }
.page h4 { font: 700 .98rem var(--body); margin: 8px 0 0; }
.page .nat { font-weight: 400; color: #6f5f4c; font-size: .85em; }
.page .ex { font-style: italic; }
.page .sub { color: #6f5f4c; }
table.conj th[scope="row"], table.irr th[scope="row"] { font: 600 .8rem var(--body); text-transform: none; letter-spacing: 0; color: var(--paper-ink); width: 30%; }
table.conj td, table.irr td { font-size: .9rem; }
.divider { min-height: 360px; align-content: center; gap: 10px; color: #2a1f16; }
.divider.tourist { background: #f8e08e; } .divider.traveler { background: #bfdcf2; } .divider.expat { background: #f4c9da; } .divider.native { background: #f4b9a6; }
.divider h1 { font-size: 2.4rem; }
.divider .lvl { font: 500 .78rem var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.toc { margin: 4px 0 0; padding-inline-start: 1.4em; display: grid; gap: 2px; font-size: .92rem; }
table.conj tr:first-child th { text-transform: none; letter-spacing: 0; font: 600 .85rem var(--body); color: var(--paper-ink); }
/* "How Good Do You Want To Get?" (CEFR list with hours, time at the chosen pace, exam hint) */
.opt.cefr { align-items: flex-start; }
.opt.cefr .ck { margin-top: 2px; }
.opt.cefr .tx { display: grid; gap: 3px; }
.cf-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-weight: 600; }
.cf { font: 500 1rem var(--mono); }
.cf-lv { font: 500 .72rem var(--body); color: var(--muted); padding: 1px 7px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.opt.cefr small.est { color: var(--ink, inherit); }
.opt.cefr small.est b { font-weight: 700; }
.opt.cefr small.exam { font-style: italic; }
.opt.cefr small.miss { color: var(--stamp, var(--muted)); }
/* One level block (owner, 8 Oct): "Choose By:" stay | Polyglot level | CEFR, a sliding pill, panels that glide in height, a live summary. */
.lvblock { display: grid; gap: 10px; min-width: 0; }
.lv-by { display: grid; gap: 6px; }
.lv-by .label { margin: 0; }
.seg { --n: 3; position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); padding: 4px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.seg::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 10px; background: var(--accent); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .26s cubic-bezier(.2,.7,.2,1); }
.seg button { position: relative; z-index: 1; border: 0; background: none; padding: 9px 4px; border-radius: 10px; font: 600 .82rem/1.2 var(--body); color: var(--muted); min-height: 44px; transition: color .2s; }
.seg button[aria-selected="true"] { color: var(--accent-ink); }
.lv-panels { min-width: 0; }
.lv-panel { display: grid; gap: 8px; }
.lv-panel[hidden] { display: none; }
.lv-label { font-weight: 500; color: var(--muted); }
.lv-aim { display: grid; gap: 6px; }
.lv-aim .label { margin: 0; font-weight: 500; font-size: .85rem; }
.lv-sum { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--accent-soft); font-size: .92rem; }
.lv-sum b { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .seg::before, .seg button { transition: none; } }

/* Opening splash (owner, 7 Oct; Sky since 28 Oct, owner #184 + Master's audit: the same as the iPhone launch image): the
   logo + "Language Trip" in green on sky blue, then a fade to the start screen. Shown only when <html> has .splash-on. */
:root { --splash-bg: #bfe3f5; --splash-ink: #2f6b3a; }
#splash { display: none; }
.splash-on #splash { display: grid; place-items: center; position: fixed; inset: 0; z-index: 1000; background: var(--splash-bg); transition: opacity .5s ease; cursor: pointer; }
.splash-on body { overflow: hidden; }
.splash-mark { display: grid; justify-items: center; gap: 14px; font: 800 clamp(24px, 7vw, 30px)/1.1 "Plus Jakarta Sans", var(--display); letter-spacing: -.01em; color: var(--splash-ink); opacity: 0; transition: opacity .25s ease; }
.splash-logo { width: 64px; height: 78px; background: var(--splash-ink); -webkit-mask: var(--logo-svg) center / contain no-repeat; mask: var(--logo-svg) center / contain no-repeat; }
#splash.ready .splash-mark { opacity: 1; }
.splash-mark span { display: inline-block; transition: opacity .45s ease, filter .45s ease, transform .45s ease; }
#splash.letters-out .splash-mark span { opacity: 0; filter: blur(3px); transform: translateY(-4px); }
#splash.out { opacity: 0; transition-duration: .4s; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #splash, .splash-mark, .splash-mark span { transition: none; } }

/* textbook: writing system chapter (owner, 8 Oct): letter charts and character tiles */
table.ws-tiles td { width: 25%; text-align: center; padding: 6px 3px; vertical-align: top; }
table.ws-chart { table-layout: fixed; }
table.ws-chart td { text-align: center; padding: 4px 2px; }
table.ws-chart tr:first-child th { font: 600 .66rem var(--body); text-transform: none; letter-spacing: 0; text-align: center; padding: 4px 2px; }
table.ws-chart tr:first-child th:first-child { width: 22%; }
table.ws-chart th[scope="row"] { font: 600 .75rem var(--body); text-transform: none; letter-spacing: 0; color: var(--paper-ink); }
.page .wc { display: block; font-size: 1.35rem; font-weight: 600; line-height: 1.3; color: var(--paper-ink); }
.page .wc.sm { font-size: .9rem; }
.page .wr { display: block; font-size: .8rem; color: #6f5f4c; font-style: italic; }
.page .wh { display: block; font-size: .7rem; color: #6f5f4c; line-height: 1.25; overflow-wrap: normal; }

/* Your profile (owner, 8 Oct): the one-time welcome screen and the small link that reopens it. */
.profile-link { border: 0; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 999px; padding: 6px 12px; font: 500 .82rem var(--body); color: var(--ink); min-width: 0; flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: start; }
.profile-link .eyebrow { margin-inline-end: 4px; }
.profile-link:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.web-profile { display: flex; justify-content: flex-end; }
.web-profile .profile-link { max-width: 100%; }
.pf-rows { display: grid; gap: 8px; }
.pf-row { display: flex; gap: 8px; align-items: center; }
.pf-row select { flex: 1; min-width: 0; }
.pf-more summary { cursor: pointer; color: var(--muted); font-size: .9rem; padding: 4px 0; }
.pf-all { max-height: 320px; overflow-y: auto; padding: 4px 2px; margin-top: 6px; }
.pf-foot { display: flex; gap: 10px; }
.pf-foot .btn { flex: 1; }
.link.inline { padding: 0; font-size: inherit; }
.pp-note { margin: 0; }
.pf-row select { -webkit-appearance: none; appearance: none; padding: 12px 38px 12px 14px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; color: var(--ink); font: inherit; }

/* Right-to-left interface (Arabic, Urdu, Persian, Hebrew, Pashto…; owner, 9 Oct): mirror what CSS can't flip by itself. */
[dir="rtl"] .seg::before { left: auto; right: 4px; transform: translateX(calc(var(--i, 0) * -100%)); }
[dir="rtl"] .sw::after { left: auto; right: 3px; }
[dir="rtl"] .opt[aria-pressed="true"] .sw::after { transform: translateX(-16px); }
[dir="rtl"] .pf-row select { padding: 12px 14px 12px 38px; background-position: left 14px center; }
.ui-note { font-style: italic; }
.nols, .nols * { letter-spacing: 0 !important; }
html.nols, .nols { --mono: var(--body); }   /* the mono face has no Arabic, Devanagari… letters */
/* Trip Kit leads (it is the app's main promise): bigger, coral-tinted card. */
.choice.trip.lead { background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--t-trip) 45%, var(--surface))); box-shadow: inset 0 0 0 2px var(--t-trip); padding: 24px 18px; }
.choice.trip.lead b { font-size: 1.35rem; }
/* Home (owner, 19 Oct): the Trip Kit and Textbook cards are the same size (padding, title, icon, equal heights). */
.big:has(> .choice.lead) { grid-auto-rows: 1fr; }
.choice.learn.lead { padding: 24px 18px; } .choice.learn.lead b { font-size: 1.35rem; }
/* Listen button beside survival phrases (phone app only). */
button.listen { border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 999px; width: 28px; height: 28px; margin-left: 8px; vertical-align: middle; display: inline-grid; place-items: center; cursor: pointer; }
.stale { color: var(--stamp); font-weight: 600; }

/* Where I'm staying (owner, 13 Oct): address field + one-tap map links */
.lodging .near-row { display: flex; flex-wrap: wrap; gap: 8px; }
.lodging a.chip { color: var(--ink); text-decoration: none; }
.lodging .near-lists { display: grid; gap: 12px; margin-bottom: 8px; }
.lodging .near-list { display: grid; gap: 4px; } .lodging .near-list h4 { margin: 0; font-size: .95rem; text-transform: capitalize; }
.lodging a.near-place { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 12px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); text-decoration: none; }
.lodging a.near-place small { color: var(--muted); white-space: nowrap; }
.lodging .sug-box { gap: 6px; }
.lodging .privacy, .lodging:focus-within .hint { display: none; }   /* the privacy line only while typing (when text goes out), the hint otherwise */
.lodging:focus-within .privacy { display: block; }
.lodging .near-head { margin-top: 6px; }
/* Trip kit screen (owner, 19 Oct: the kit almost right away): country, the address field (its placeholder is the question,
   Title Case like a main instruction), one row of two buttons (+ Add Language Learning, Medical Card), the pages; the rest below. */
.lodging input::placeholder { text-transform: capitalize; }
.kit-top-btns { display: grid; gap: 8px; }
.kit-top-btns .kit-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .kit-top-btns .kit-cards .chip { justify-self: stretch !important; text-align: center; justify-content: center; }
.arr-pill .eyebrow, .arr-pill .sub { text-transform: capitalize; letter-spacing: .02em; }   /* "Arriving (Optional)": Title Case label (owner, 19 Oct) */   /* "Arriving": a small Title Case label (owner, 19 Oct) */
.stay-more { display: grid; gap: 6px; }
.kit-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 12px; }
.kit-head > div { display: grid; gap: 4px; min-width: 0; }
.pp { display: grid; gap: 4px; max-width: 100%; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px 7px 12px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); max-width: 100%; cursor: pointer; }
.pill .eyebrow { white-space: nowrap; }
.pill select { -webkit-appearance: none; appearance: none; border: 0; padding: 0 18px 0 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right center; font: 600 .9rem var(--body); color: var(--ink); max-width: min(230px, 56vw); text-overflow: ellipsis; cursor: pointer; }
[dir="rtl"] .pill select { padding: 0 0 0 18px; background-position: left center; }
.pill input { border: 0; background: transparent; padding: 0; font: 600 .9rem var(--body); color: var(--ink); min-width: 0; }
.pill input.empty { width: 1.2em; opacity: 0; }   /* iOS draws an empty date field as nothing: the "(optional)" hint stands in; a tap on the pill still opens the picker */
.stay-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; } .lodging .sug-box[hidden] { display: none; } .lodging .sug { padding: 10px 14px; }
.choice.small { padding: 12px 14px; border-radius: 16px; } .choice.small .ic { width: 38px; height: 38px; border-radius: 12px; } .choice.small .ic svg { width: 20px; height: 20px; } .choice.small b { font-size: .98rem; } .choice.small span { font-size: .82rem; }
/* Title Case trial (owner, 13 Oct): every word capitalised on buttons, tabs, headings/titles and level names, in every
   interface language (CSS follows <html lang>, set to the interface language, so Turkish i/İ and Dutch IJ come out right).
   Not on field labels, hints, sentences or lesson content. */
.btn, .tabs button, .chip, .choice b, h1, h2, h3, details.sec > summary, .hero .lv, .divider h1, .lvl { text-transform: capitalize; }
.chip.lang-chip, .opt .tx, td, th { text-transform: none; }

/* Weather in the expanded trip kit (owner, 13 Oct; ops/app-store/weather-patch.py): the 12-month strip. */
.wxm { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; text-align: center; font-size: .78rem; line-height: 1.25; margin: 6px 0; }
.wxm div { background: var(--bg, #f7efe2); border-radius: 8px; padding: 4px 0 5px; }
.wxm .now { box-shadow: inset 0 0 0 1.5px var(--ink, #2a1f16); }
.wxm .m { display: block; font: 500 .68rem var(--mono); text-transform: uppercase; color: var(--muted); }
.wxm b { display: block; font-size: .74rem; }
/* One visa box per saved passport (owner, 14 Oct) */
.visa-for { font-size: .95rem; margin: 10px 0 4px; text-transform: capitalize; }
.visa-for:first-child { margin-top: 0; }
/* Profile: "I hold a valid visa or residence permit from" (owner, 14 Oct 2026). */
.pf-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.pf-checks label { display: inline-flex; align-items: center; gap: 6px; }
.unchecked { font-style: italic; }
.pf-checks input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; flex: none; padding: 0; margin: 0; border: 0; appearance: auto; -webkit-appearance: checkbox; accent-color: var(--accent, currentColor); }
.pf-checks label { white-space: nowrap; }

/* Emergency numbers: tap to call (owner, 14 Oct); looks like the number, not a link */
.sos a.tel { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }

/* Numbers 0–10 under the sheet's phrase table (owner, 14 Oct) */
.sheet .nums { font-size: 8.5pt; line-height: 1.35; margin: 4px 0 0; }
.sheet .nums i { color: var(--muted, #6f5f4c); font-style: normal; }

/* Study-time slider (owner, 18 Oct 2026): 5 minutes to 3 hours; the chosen time sits beside it. */
.min-slider { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.min-slider input[type="range"] { flex: 1; min-width: 0; height: 36px; accent-color: #2f6b3a; touch-action: pan-y; }
.min-slider output { min-width: 5.5em; text-align: end; font-weight: 700; color: #2f6b3a; font-variant-numeric: tabular-nums; }
.min-ends { display: flex; justify-content: space-between; margin-inline-end: calc(5.5em + 14px); font-size: .8rem; color: #6f5f4c; }
/* Owner, 19 Oct: first letters capitalized on main instructions and choices (labels, option buttons), every language;
   hints after the label (.sub, small) stay as written. */
.label, .opt .tx { text-transform: capitalize; }
.label .sub, .label small, .opt .tx small { text-transform: none; }

/* Official travel advice (advisory-hook.py, 19 Oct 2026): a calm banner when the UK / Canada / US advice changed after the
   kit was saved (accent-soft, not red: it says THAT the advice changed, not that it is dangerous), and the expanded kit's rows. */
.adv-banner { border-radius: 14px; padding: 12px 14px; background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); display: grid; gap: 4px; font-size: .92rem; }
[dir="rtl"] .adv-banner { box-shadow: inset -4px 0 0 var(--accent); }
.adv-banner b { font: 700 1rem var(--display); text-transform: capitalize; }
.adv-banner p { margin: 0; }
.adv-banner a { color: var(--accent); font-weight: 600; }
.adv-saved { margin: 0; }
.adv-credits { margin: 4px 0 0; font-size: .74rem; color: var(--muted); }
.adv-credits a { color: inherit; }
.adv-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.adv-list li { display: grid; gap: 3px; justify-items: start; }
.adv-lv { border-radius: 999px; padding: 3px 10px; font-size: .85rem; font-weight: 600; }
.adv-lv.ok { background: var(--accent-soft); } .adv-lv.warn { background: var(--t-tourist); } .adv-lv.stop { background: var(--stamp-soft); }
/* Romanizations: capital I gets serifs so "Iie" (Japanese "no") never reads as "lie" (Figtree's I and l are both plain
   bars and it has no alternate I). Only U+0049 comes from a serif face already on the device; nothing is downloaded. */
@font-face { font-family: "Rom I"; src: local("Georgia"), local("NotoSerif-Regular"), local("Noto Serif"), local("Times New Roman"), local("DejaVu Serif"); unicode-range: U+0049; }
@font-face { font-family: "Rom I"; font-style: italic; src: local("Georgia Italic"), local("Georgia-Italic"), local("NotoSerif-Italic"), local("Noto Serif Italic"), local("Times New Roman Italic"), local("DejaVu Serif Italic"); unicode-range: U+0049; }
.r, td.r, .fc-rom, .au-r, .si-r, .mi-prompt .r { font-family: "Rom I", var(--body); }
/* "Sounds Like: ee-eh" under a romanization in lesson and phrase tables (slLine() in cards.js) */
.sl { display: block; font-size: .78em; font-style: normal; color: var(--muted); }
.sl .sl-k { font-weight: 600; text-transform: capitalize; } .sl .sl-k::after { content: ":"; }
.fc-sl { color: var(--muted); font-size: .9rem; }   /* the same line on a flashcard (cards.js) */
.fc-sl .sl-k { font-weight: 600; text-transform: capitalize; } .fc-sl .sl-k::after { content: ":"; }

/* Home (owner, 20 Oct, OWNER-DUMP #2): headline + promise, two cards of one design filling the screen; icon beside its title,
   the text under both at full width. */
.profile-link { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.profile-link svg { flex: none; }
main:has(> .home-cards) { min-height: 0; }
.home-head { display: grid; gap: 8px; padding-top: 4px; }
.home-head h1 { font-size: 1.75rem; }
.promise { font: 500 .78rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.big.home-cards:has(> .choice.lead), .home-cards { flex: 1; grid-auto-rows: auto; align-content: center; padding-bottom: 8vh; }   /* cards fit their text; the pair sits in the middle of the space left (Master, 20 Oct) */
.home-cards .choice.lead { grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 14px; padding: 22px 20px; background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--t-trip) 30%, var(--surface))); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--t-trip) 70%, var(--line)); }
.home-cards .choice.learn.lead { background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--t-traveler) 40%, var(--surface))); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--t-traveler) 80%, var(--line)); }
.home-cards .choice .ic { grid-row: auto; }
.home-cards .choice b { font-size: 1.3rem; line-height: 1.15; }
.home-cards .choice .tx { grid-column: 1 / -1; font-size: .95rem; line-height: 1.45; }
.home-cards .choice.hosts { grid-template-columns: auto 1fr; gap: 2px 14px; padding: 14px 18px; text-decoration: none; color: var(--ink); }   /* For Hosts as a card (owner #136, 26 Oct) */
.home-cards .choice.hosts .ic { grid-row: span 2; width: 42px; height: 42px; border-radius: 13px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); }
.home-cards .choice.hosts .ic svg { width: 22px; height: 22px; }
.home-cards .choice.hosts b { font-size: 1.05rem; }
.home-cards .choice.hosts .tx { grid-column: 2; font-size: .86rem; line-height: 1.4; }
.home-hosts { margin: 0; padding-bottom: 10px; text-align: center; display: grid; gap: 2px; justify-items: center; }   /* For Hosts: Host Mode inside the app (owner, 22 Oct, #37) */

/* Under the kit (owner, 20 Oct, OWNER-DUMP #3): Expand + Share side by side, then the small "More" row. */
.kit-btns { display: flex; flex-wrap: wrap; gap: 8px; }   /* owner #528 (24 Nov): compact, one line each, normal height */
.kit-more { display: grid; gap: 8px; }
.kit-more .chips { gap: 6px; }
.kit-more .chip { font-size: .82rem; padding: 7px 12px; }
.kit-more a.chip { color: var(--ink); text-decoration: none; }   /* For Hosts (a link to host.html) looks like the other chips */
.kx-pick { display: grid; gap: 10px; }
.kx-pick .btn { display: grid; gap: 2px; text-align: start; justify-items: start; padding: 12px 14px; height: auto; }
.kx-pick .btn .sub { text-transform: none; font-weight: 400; }
.mapfb .kx-pick .btn { border-radius: 16px; padding: 14px 16px; min-height: 0; white-space: normal; line-height: 1.3; }   /* two-line choices: a rounded box, not a pill the text spills out of (#335) */
.kit-btns .btn { flex: 1 1 auto; width: auto; min-height: 44px; padding: 9px 16px; font-size: .92rem; line-height: 1.2; white-space: nowrap; }

/* "Most Learned" (owner, 20 Oct, OWNER-DUMP #33): 20 languages in a fixed 4-column grid = 5 even rows in every interface language. */
.chips.grid4 { display: flex; flex-wrap: wrap; gap: 6px; }   /* 4 to a row when the words fit, fewer when not: never a word broken in two (Master's audit, 28 Oct: "Intermediat/e") */
.chips.grid4 .chip { flex: 1 0 calc(25% - 6px); min-width: min-content; display: grid; place-items: center; padding: 8px 6px; font-size: .74rem; text-align: center; line-height: 1.15; overflow-wrap: normal; word-break: normal; hyphens: manual; white-space: nowrap; }   /* names on ONE line ("United Arab Emirates"): fewer to a row instead (owner #215) */

/* Text inside fields in Title Case too (owner, 20 Oct "CAPS"): placeholders and a select still on its empty prompt
   ("Choose A Country…"). capitalize follows <html lang> (Turkish i → İ, Dutch ij → IJ); options in the open list stay as written. */
input::placeholder, textarea::placeholder { text-transform: capitalize; }
select:has(option[value=""]:checked) { text-transform: capitalize; }
select option { text-transform: none; }
.tester { display: grid; gap: 8px; justify-items: center; padding: 8px 0 4px; } .tester-ver { -webkit-user-select: none; user-select: none; cursor: pointer; -webkit-tap-highlight-color: transparent; } .tester-box { display: flex; gap: 8px; width: 100%; } .tester-box input { flex: 1; }   /* #134 tester code (tester.js) */
.bar-home { border: 0; background: none; padding: 6px 0 6px 6px; color: inherit; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; }   /* logo = home (#179) */
.bar-home .brand { font-size: .95rem; }
.save-row { display: flex; justify-content: flex-end; margin: -6px 0 -6px; } .save-chip { font-size: .82rem; }   /* small save button above the book (audit 28 Oct) */
.bp-jump .chips.grid4 { gap: 4px; } .bp-jump .chips.grid4 .chip { flex-basis: 0; padding: 8px 3px; font-size: .7rem; letter-spacing: -.01em; }   /* the 4 books on one row inside the plan card at 390 px */
.book .page.cover { background: #f8e08e; }   /* book pages are paper in dark mode too: the cover keeps its light colour (dark text on it) */
/* Sideways on the Verbs tab (owner #197; orient.js sets data-land, the iPhone allows landscape only there): the whole
   width for the chart, a slimmer top bar, clear of the notch */
@media (orientation: landscape) and (max-height: 500px) {
  :root[data-land] #app { max-width: none; padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  :root[data-land] .bar { padding-top: 6px; min-height: 40px; }
  :root[data-land] .tabs { position: static; }   /* the tab row scrolls away: the chart gets the height */
  /* #258 (1 Nov 2026): a phone on its side is wider than 640 px, which drew the desktop phone frame (black edge) around
     the app: no frame, the whole screen */
  body { padding-block: 0; background: var(--bg); }
  #app { height: 100%; border: 0; border-radius: 0; box-shadow: none; }
}
/* 31 Oct 2026 (shell-night, owner #232 #233 #234 #241) */
.tag.warn { white-space: normal; line-height: 1.3; max-width: 100%; overflow-wrap: normal; }   /* "Early Draft: Not Yet Checked By Native Speakers" wraps inside the card at 390 px */
.kit-head .get-app { font-size: .78rem; min-height: 32px; padding: 6px 12px; align-self: flex-start; text-decoration: none; }   /* host-link guests: small, not pushy */
:root[data-theme="light"] { color-scheme: light; }
:root[data-bw] { filter: grayscale(1); }   /* Your Profile → Black And White: the whole app, flags and pictures too */
.theme-pick { display: flex; gap: 6px; } .theme-pick .chip { flex: 1; justify-content: center; }
.look-pick .bw-pick { margin-top: 6px; }
/* #5 / #253: the tab row sticks inside a band of page colour, full width, so nothing shows above, beside or under it
   (Sky's edge-fade mask on .tabs used to erase the old ring around the row and let the line under it show through) */
.tabs-band { position: sticky; top: -8px; z-index: 2; flex: none; margin: -8px -20px 0; padding: 8px 20px 6px; background: var(--bg); box-shadow: 0 8px 8px -6px var(--bg); }
.tabs-band > .tabs { position: static; box-shadow: inset 0 0 0 1.5px var(--line); }
:root[data-land] .tabs-band { position: static; }
.ch-study { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 12px; }   /* Flashcards / Listen under each Textbook chapter (#293, app.js chStudyMark) */
.ch-study .chip { min-height: 32px; padding: 4px 14px; font-size: .85rem; background: #fff; color: #2f6b3a; box-shadow: inset 0 0 0 1.5px #c9d9c6; font-weight: 600; }   /* book pages stay paper in dark mode too */
@media print { .ch-study { display: none; } }
/* today.js (owner ideas 3 Nov): home progress line + Today button, Textbook word search */
.td-box { display: grid; gap: 8px; }
.td-line { margin: 0; text-align: center; font-size: .95rem; color: var(--muted); }
.td-line strong { color: var(--accent); }
/* Today's Study at the top of the Textbook (owner #339, 4 Nov) */
/* Your Profile: Coming Soon · Polyglot + Voice Packs (pro.js, 4 Nov) */
.pro-soon { display: grid; gap: 4px; margin: 6px 0 0; padding: 16px; border-radius: 20px; background: var(--accent-soft); box-shadow: none; }
.pro-soon .eyebrow { margin: 0; }
.pro-soon h3 { margin: 0; color: var(--accent); }
.pro-soon p { margin: 0; }
.td-bar { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 12px; padding: 12px 14px; border: 0; border-radius: 18px; background: var(--accent-soft); color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.td-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 1.1rem; font-weight: 700; }
.td-tx { display: grid; gap: 2px; }
.td-tx b { font-weight: 700; color: var(--accent); text-transform: capitalize; }
.td-tx .small { color: var(--muted); }
.bk-search .search { margin-top: 10px; }
.ws-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; }
.ws-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.ws-row .pl-dot { margin-top: 7px; }
.ws-w { flex: 1; min-width: 0; overflow-wrap: normal; }
.ws-row .mw-add { flex: none; }
.fcp-hide { display: none !important; }   /* today.js fewer packs */
.chip.fcp-more { font-weight: 700; color: var(--accent); }
/* worldmap.js: the map card on the picker + "Find A Language By Country" (owner #334, mockup approved 3 Nov) */
.wm-card { display: grid; gap: 10px; width: 100%; margin: 18px 0 6px; padding: 14px; border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); text-align: start; cursor: pointer; box-shadow: 0 6px 18px -14px rgba(29,79,107,.5); font: inherit; }
.wm-card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wm-card-h b { font: 700 1.05rem/1.2 var(--display); color: var(--accent); }
.wm-open { font-size: .9rem; color: var(--accent); white-space: nowrap; }
.wm-mini { display: block; width: 100%; height: auto; border-radius: 12px; background: #e4f1f8; }
.wm-mini path { stroke: #fff; stroke-width: .5; }
.wm-wait { aspect-ratio: 900 / 400; }
.wm-sheet { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); max-width: 480px; margin: 0 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
[data-look] .wm-sheet .bar, .wm-sheet .bar { position: sticky; top: 0; z-index: 2; flex: none; padding-top: max(14px, env(safe-area-inset-top, 0px)); }   /* #342: Back always on screen */
.wm-top { display: grid; gap: 10px; padding: 4px 20px 0; }
.wm-top h2 { margin: 0; }
.wm-regs { display: flex; flex-wrap: wrap; gap: 6px; }
.wm-box { position: relative; margin: 12px 20px 0; height: min(42vh, 300px); flex: none; border-radius: 20px; background: #e4f1f8; overflow: hidden; touch-action: none; }
.wm-svg { width: 100%; height: 100%; display: block; cursor: grab; }
.wm-svg path { stroke: #fff; stroke-width: .4; vector-effect: non-scaling-stroke; cursor: pointer; }
.wm-zoom { position: absolute; right: 10px; bottom: 10px; display: grid; gap: 6px; }
.wm-zoom button { width: 40px; height: 40px; border: 0; border-radius: 12px; background: #fff; color: #16302a; font: 600 1.35rem/1 var(--body); box-shadow: 0 2px 6px rgba(22,48,42,.15); cursor: pointer; }
.wm-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px 20px 0; }
.wm-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.wm-key { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.wm-panel { flex: 1 0 auto; margin-top: 12px; padding: 18px 20px calc(24px + env(safe-area-inset-bottom, 0px)); scroll-margin-top: 80px; background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: 0 -8px 24px -16px rgba(29,79,107,.4); }
.wm-panel p { margin: 0 0 6px; }
.wm-h { font: 700 1.3rem/1.2 var(--display); color: var(--accent); }
.wm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.wm-list { list-style: none; margin: 6px 0 0; padding: 0; }
.wm-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--line); }
.wm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.wm-tick { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); font-weight: 700; }
.wm-row[aria-pressed="true"] .wm-tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wm-row[aria-pressed="true"] .wm-l { color: var(--accent); }
.wm-off { opacity: .55; }
.wm-off .wm-l { font-weight: 500; }
.wm-l { font-weight: 600; font-size: 1.05rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wm-mini, :root:not([data-theme="light"]) .wm-box { background: #17323d; } :root:not([data-theme="light"]) .wm-svg path, :root:not([data-theme="light"]) .wm-mini path { stroke: #0f1d22; } }
:root[data-theme="dark"] .wm-mini, :root[data-theme="dark"] .wm-box { background: #17323d; }
:root[data-theme="dark"] .wm-svg path, :root[data-theme="dark"] .wm-mini path { stroke: #0f1d22; }
.wm-sheet ~ .toast, .toast { z-index: 80; }   /* above the world map (z 70) */
:root { --wm-land: #cfdcd3; --wm-c0: #f4a58a; --wm-c1: #f7d070; --wm-c2: #a8d98f; --wm-c3: #7fd1c7; --wm-c4: #b3a6ec; --wm-c5: #f2a6c9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --wm-land: #3d5049; --wm-c0: #b5694f; --wm-c1: #b3923f; --wm-c2: #6c9a58; --wm-c3: #3f948b; --wm-c4: #7b6cb8; --wm-c5: #ae6a8f; } }
:root[data-theme="dark"] { --wm-land: #3d5049; --wm-c0: #b5694f; --wm-c1: #b3923f; --wm-c2: #6c9a58; --wm-c3: #3f948b; --wm-c4: #7b6cb8; --wm-c5: #ae6a8f; }

/* The page itself never scrolls in the app: only <main> does, so the header can't slide under the iPhone status bar (owner #377, 9 Nov 2026) */
@media screen { html:has(> body > #app), html:has(> body > #app) > body { overflow: hidden; } }
/* the Unlock sheet + Your Profile (iap.js) */
.iap-body { display: grid; gap: 10px; overflow-y: auto; }
.iap-body p { margin: 0; }
.iap-opt { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: start; }
.iap-opt b { flex: none; }
.iap-restore { margin: 2px 0 0; text-align: center; }

/* "Your Book" (yourbook.js, #397): the chapter list, the book, or Adjust */
.bk-wrap { display: flex; flex-direction: column; gap: 10px; }
.bk-head { order: 0; display: grid; gap: 6px; }
.bk-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bk-title h2, .bk-adj-title { margin: 0; color: var(--head, var(--accent)); }
.bk-back { justify-self: start; padding: 6px 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; }
.adj-chip { flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); font: inherit; font-weight: 700; font-size: .92rem; text-transform: capitalize; cursor: pointer; }
.bk-rows { order: 2; display: grid; gap: 8px; }
.bk-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 54px; padding: 8px 16px; border: 0; border-radius: 16px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-align: start; cursor: pointer; }
.bk-row .n { flex: none; font-weight: 400; color: var(--muted); }
.bk-row.next .n { font-weight: 700; color: var(--accent); }
.bk-wrap > .td-bar { order: 1; margin: 0; background: var(--surface); }
.bk-wrap[data-view="list"] > :not(.bk-head):not(.bk-rows):not(.td-bar) { display: none; }
.bk-wrap[data-view="list"] .bk-back, .bk-wrap[data-view="list"] .bk-adj-title { display: none; }
.bk-wrap[data-view="book"] > :not(.bk-head):not(.book) { display: none; }
.bk-wrap[data-view="book"] .bk-title, .bk-wrap[data-view="book"] .bk-adj-title { display: none; }
.bk-wrap[data-view="adj"] > .book, .bk-wrap[data-view="adj"] > .bk-rows, .bk-wrap[data-view="adj"] > .td-bar { display: none; }
.bk-wrap[data-view="adj"] .bk-title { display: none; }
.bk-wrap .book section.page.cover { display: none; }
/* Speed (owner #414/#441, 16 Nov 2026): a long book (3 languages, Advanced ≈ 54,000 elements) lays out only the chapters near the screen.
   Nothing may read the position of every chapter heading (that forces them all: today.js rsChapter did, removed 15 Nov with #427a). */
.bk-wrap .book section.page { content-visibility: auto; contain-intrinsic-size: auto 1200px; }
/* Your Book: the Adjust note (#403), Back To Contents (#407) */
.bk-adj-note { display: none; margin: 0; }
.bk-wrap[data-view="adj"] .bk-adj-note { display: block; }
.bk-top { position: fixed; right: 14px; bottom: calc(var(--tabbar, 64px) + env(safe-area-inset-bottom, 0px) + 12px); z-index: 60; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 .95rem/1 var(--body); box-shadow: 0 4px 12px rgba(22, 48, 42, .3); cursor: pointer; }
:root[data-study] .bk-top { display: none; }

.pl-switch-hint.top { margin: 0 0 6px; }   /* #516: above the bubbles, until the first tap */

/* Customize questionnaire (questionnaire.js, owner #419 #450, 23 Nov 2026): one question per screen */
.qz { display: flex; flex-direction: column; gap: 12px; }
.qz-top { display: flex; justify-content: flex-end; color: var(--sky-ink, var(--muted)); font-weight: 600; }
.qz-prog { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; margin-bottom: 6px; }
.qz-prog i { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--surface) 75%, transparent); }
.qz-prog i.on { background: var(--accent); }
.qz-h { margin: 0; }
.qz-sub { margin: -4px 0 0; color: var(--muted); font-size: .95rem; }
.qz-opts .opt { border-radius: 16px; }
.qz-opts .opt[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.qz-tip { padding: 12px 14px; border-radius: 14px; background: var(--accent-soft, #e0f0e3); color: var(--ink); font-size: .92rem; line-height: 1.4; }
.qz-tip b { color: var(--accent); }
.qz-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qz-drop { border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); }
.qz-drop > summary { min-height: 50px; padding: 0 16px; display: flex; align-items: center; font-weight: 600; cursor: pointer; list-style: none; }
.qz-drop > summary::-webkit-details-marker { display: none; }
.qz-drop-list { max-height: 46vh; overflow: auto; padding: 4px 10px 12px; border-top: 1px solid var(--line); }
.qz-sum { padding: 14px 16px; border-radius: 16px; background: var(--surface); }
.qz-tips { list-style: none; counter-reset: qz; margin: 0; padding: 0; display: grid; gap: 8px; }
.qz-tips li { counter-increment: qz; display: grid; grid-template-columns: 30px 1fr; gap: 2px 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); font-size: .92rem; }
.qz-tips li::before { content: counter(qz); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft, #e0f0e3); color: var(--accent); font-weight: 700; }

/* Kit top in one family and weight, same height as the address field (owner #540, 24 Nov 2026): "Arriving" + date, the two card
   buttons, the "Trip Kit" label and the "Page 1" labels over the paper (the #pdf-stage rule reaches them inside the sheet view). */
.kit-head .eyebrow, .kit-more > .eyebrow { font: 600 .8rem/1.2 var(--body); letter-spacing: .01em; text-transform: none; }
.arr-pill { min-height: 48px; padding: 6px 16px; box-sizing: border-box; }
.arr-pill .eyebrow, .arr-pill .sub, .arr-pill input { font: 600 .92rem/1.2 var(--body); letter-spacing: 0; color: var(--ink); }
.arr-pill .sub { font-weight: 400; color: var(--muted); }
.kit-top-btns .kit-cards .chip, .kit-top-btns .kit-learn { min-height: 48px; font: 600 .92rem/1.2 var(--body); }
#app .kit-top-btns .kit-learn { padding: 10px 16px; border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }   /* like its two neighbours */
#pdf-stage.sheets .sv-lab { font: 600 12px/1 var(--body, system-ui, sans-serif); letter-spacing: .01em; text-transform: none; }
