/* Alpenwort: the sales screen (lock) and the app. Light = a Bavarian morning (blue and white Rauten, Bavarian blue);
   dark = an Austrian evening (red-white-red, Austrian red, deep forest). Approved designs: apps/Alpenwort/design/.
   Fonts are stored with the app (OFL): UnifrakturMaguntia for the logo only, Playfair Display for headings, Inter for text. */
@font-face { font-family: "UnifrakturMaguntia"; src: url(fonts/unifrakturmaguntia.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url(fonts/playfair-display.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url(fonts/playfair-display-italic.woff2) format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
/* Playfair's figures are old-style (A1 reads as "A₁"); headings that name a level take their digits from Inter */
@font-face { font-family: "Lining Digits"; src: url(fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0030-0039; }

:root, html[data-theme="light"] {
  --bg: #F7F1E3; --paper: #FFFCF4; --ink: #2B2118; --muted: #6E5B48; --wood: #6B4423; --wood-soft: rgba(107,68,35,.28);
  --line: rgba(107,68,35,.18); --green: #3E6B48; --red: #C8102E; --blue: #0066B3;
  --accent: #0066B3; --accent-fill: #0066B3; --accent-tint: rgba(0,102,179,.10); --cta: #0066B3; --cta-shadow: #004A82;
  --hi: #0066B3; --hi-2: #C8102E; --logo: #0066B3; --backup-ink: #FFFFFF; --sign-text: #FFFCF4;
  --der: #2F6FB0; --die: #C0392B; --das: #3E8E41; --ok: #2E7D3A; --ok-bg: rgba(62,142,65,.12); --bad: #B3261E; --bad-bg: rgba(192,57,43,.10);
  --almost: #9A6512; --almost-bg: #FBF0D9; --ridge-far: rgba(0,102,179,.10); --ridge-near: rgba(62,107,72,.16);
  --band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='14'%3E%3Crect width='22' height='14' fill='%23fff'/%3E%3Cpath d='M11 0 22 7 11 14 0 7Z' fill='%230066B3'/%3E%3C/svg%3E") repeat-x left top / 22px 14px;
  --shadow: 0 1px 0 rgba(107,68,35,.08); color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #1F2A24; --paper: #27342D; --ink: #F3EBD8; --muted: #B9AE98; --wood: #B08560; --wood-soft: rgba(176,133,96,.35);
  --line: rgba(243,235,216,.12); --green: #86B892; --red: #C8102E; --blue: #5AA5E8;
  --accent: #F07A88; --accent-fill: #C8102E; --accent-tint: rgba(240,122,136,.14); --cta: #C8102E; --cta-shadow: #6E0918;
  --hi: #E23A50; --hi-2: #F3EBD8; --logo: #F3EBD8; --backup-ink: #1F2A24; --sign-text: #1F2A24;
  --der: #6FAEEA; --die: #F08273; --das: #7CC47F; --ok: #8FD08F; --ok-bg: rgba(124,196,127,.14); --bad: #FF9C90; --bad-bg: rgba(240,130,115,.14);
  --almost: #E7B65A; --almost-bg: rgba(231,182,90,.12); --ridge-far: rgba(90,165,232,.10); --ridge-near: rgba(134,184,146,.12);
  --band: linear-gradient(#C8102E 0 34%, #FFFFFF 34% 66%, #C8102E 66% 100%) left top / 100% 14px no-repeat;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 16px/1.5 "Inter", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex: none; display: block; }

/* ---------------- sales screen (lock) ---------------- */
.lock { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 0 20px 40px; }
.lock-band { align-self: stretch; height: 14px; margin: 0 -20px 36px; background: var(--band); }
.lock-card { width: min(680px, 100%); padding: 40px; border-radius: 20px; background: var(--paper); border: 1.5px solid var(--wood-soft); box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px var(--line), 0 24px 60px -30px rgba(43,33,24,.35); }
.lock-brand { display: flex; align-items: center; gap: 14px; }
.lock-brand img { border-radius: 13px; }
.lock-name { font-family: "UnifrakturMaguntia", serif; font-size: 36px; line-height: 1; color: var(--logo); }
.lock-by { color: var(--muted); font-weight: 600; font-size: 14px; margin-top: 4px; }
.lock h1 { margin: 26px 0 8px; font: 600 40px/1.12 "Lining Digits", "Playfair Display", Georgia, serif; }
.lock-lead { margin: 0; color: var(--muted); font-size: 17px; }
/* the dark-and-light picture by the price and the three previews (as on Atlas's and Athena's pages) */
.lock-duo { position: relative; margin-top: 22px; border-radius: 12px; overflow: hidden; border: 1.5px solid var(--line); }
.lock-duo img { display: block; width: 100%; height: auto; }
.lock-duo .duo-light { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: left top; clip-path: polygon(60% 0, 100% 0, 100% 100%, 40% 100%); }
.duo-tag { position: absolute; bottom: 10px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; }
.duo-tag-dark { left: 10px; background: rgba(31,42,36,.85); color: #F7F1E3; }
.duo-tag-light { right: 10px; background: rgba(255,252,244,.94); color: #0066B3; }
.lock-shots { margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lock-shots a { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.lock-shots img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1.5px solid var(--line); }
.lock-shots a:hover img { border-color: var(--accent); }
.lock-shots a:hover span { color: var(--accent); }
.lock-buy { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.lock-price { display: grid; }
.lock-price b { font: 600 42px/1 "Playfair Display", Georgia, serif; }
.lock-price span { color: var(--muted); font-size: 14px; margin-top: 6px; }
.lock-price em { color: var(--accent); font-style: normal; font-weight: 600; margin-top: 2px; }
.lock-btns { display: flex; flex-direction: column; gap: 10px; }
.store-badge { display: inline-flex; flex-direction: column; padding: 12px 20px; border-radius: 12px; border: 1.5px solid var(--wood-soft); font-weight: 700; line-height: 1.2; color: var(--muted); }
.store-badge small { font-weight: 500; font-size: 12.5px; }
a.store-badge { background: var(--cta); border-color: var(--cta); color: #fff; text-decoration: none; }
a.store-badge small { color: rgba(255,255,255,.85); }
a.store-badge:hover { filter: brightness(1.1); }
.lock-devices { margin: 14px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }   /* which devices it is for (his wording, 2026-10-15) */
.lock-points { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.lock-points li { position: relative; padding-left: 28px; }
.lock-points li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 13px; height: 7px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }
.lock-note { margin: 20px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--almost-bg); border: 1.5px solid var(--almost); font-size: 14px; }
.lock-code { margin-top: 26px; }
.lock-code label { display: block; font-weight: 600; margin-bottom: 8px; }
.lock-row { display: flex; gap: 10px; }
.lock-row input { flex: 1; min-width: 0; height: 50px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--wood-soft); background: var(--bg); font: 600 18px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.lock-row input::placeholder { color: var(--muted); opacity: .6; }
.lock-row button { height: 50px; padding: 0 24px; border: 0; border-radius: 12px; background: var(--cta); color: #fff; font-weight: 700; }
.lock-err { margin: 10px 0 0; color: var(--bad); font-weight: 600; }
.lock-foot { margin: 26px 0 0; color: var(--muted); font-size: 14px; }
.lock-disc { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------------- app shell ---------------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.top { position: relative; flex: none; }
.band { height: 14px; background: var(--band); }
.top-row { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 32px 0 40px; }
.ridge { display: block; width: 100%; height: 46px; margin-top: -8px; }
.ridge-far { fill: var(--ridge-far); } .ridge-near { fill: var(--ridge-near); }
.logo { display: flex; flex-direction: column; background: none; border: 0; padding: 0; text-align: left; }
.logo-w { font-family: "UnifrakturMaguntia", serif; font-size: 40px; line-height: 1; color: var(--logo); }
.logo-s { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.top-tools { display: flex; align-items: center; gap: 12px; }
.clocks { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--wood-soft); border-radius: 14px; padding: 7px 16px; }
.clock { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.clock > span { display: flex; flex-direction: column; line-height: 1.25; }
.clock small { font-size: 11px; letter-spacing: .04em; }
.clock b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.clock-sep { width: 1px; height: 28px; background: var(--wood-soft); }
.flag { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.seg { display: inline-flex; border: 1px solid var(--wood-soft); border-radius: 12px; overflow: hidden; background: var(--paper); }
.seg button { border: 0; background: none; padding: 9px 14px; font-size: 14px; font-weight: 600; color: var(--muted); min-height: 40px; }
.seg button[aria-pressed="true"] { background: var(--accent-fill); color: #fff; }
.round-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--wood-soft); background: var(--paper); display: flex; align-items: center; justify-content: center; color: var(--wood); }
.shell { flex: 1; display: flex; min-height: 0; }
.side { width: 240px; flex: none; position: relative; padding: 22px 0 0 18px; display: flex; flex-direction: column; gap: 14px; }
.post { position: absolute; left: 28px; top: 0; bottom: 0; width: 10px; background: var(--wood); border-radius: 3px; opacity: .85; }
.sign { position: relative; width: 196px; height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 0 0 20px; border: 0; background: none; color: var(--wood); text-align: left; }
.sign .board { position: absolute; inset: 0; }
.sign .board path { fill: var(--paper); stroke: var(--wood); stroke-width: 1.5; }
.sign:hover .board path { fill: var(--bg); }
.sign[aria-current="page"] .board path { fill: var(--wood); }
.sign[aria-current="page"] { color: var(--sign-text); }
.sign-ic, .sign-t { position: relative; }
.sign-t { display: flex; flex-direction: column; line-height: 1.15; }
.sign-t b { font-size: 16px; font-weight: 600; }
.sign-t small { font-size: 12px; font-style: italic; opacity: .85; }
.sign:focus-visible { outline: none; } .sign:focus-visible .board path { stroke-width: 3; stroke: var(--accent); }
.main { flex: 1; min-width: 0; padding: 18px 40px 40px 24px; display: flex; flex-direction: column; gap: 18px; }
.tabs { display: none; }

/* backup box (every screen) and banner (Home) */
.backup-box { margin: 26px 16px 22px 30px; position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 12.5px; line-height: 1.35; }
.backup-box > div { display: flex; flex-direction: column; gap: 3px; }
.backup-box b { font-size: 14px; }
.backup-box.due { background: var(--almost-bg); border: 2px solid var(--almost); color: var(--almost); }
.backup-box.due span { color: var(--ink); }
.backup-box.ok { background: var(--paper); border: 1.5px solid rgba(62,107,72,.45); color: var(--green); }
.backup-box.ok span { color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.backup-banner { display: flex; align-items: center; gap: 20px; padding: 18px 22px; border-radius: 18px; background: var(--almost-bg); border: 2px solid var(--almost); }
.bb-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--almost); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.bb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bb-text b { font-family: "Playfair Display", serif; font-size: 22px; }
.bb-when { font-size: 13px; font-weight: 700; color: var(--almost); }
.bb-text p { font-size: 14px; margin: 4px 0 0; max-width: 720px; }
.bb-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bb-actions small { font-size: 12px; color: var(--muted); }

/* ---------------- building blocks ---------------- */
.card { position: relative; background: var(--paper); border: 1.5px solid var(--wood-soft); border-radius: 18px; padding: 22px 24px; box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px var(--line), var(--shadow); }
.card-h { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-h > div { flex: 1; min-width: 0; }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.eyebrow i { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); }
h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 600; margin: 0; }
h1 { font-size: 52px; line-height: 1.05; margin: 6px 0 4px; }
h2 { font-size: 38px; line-height: 1.1; }
h3 { font-size: 22px; line-height: 1.2; }
h2 small, h3 small { font-style: italic; font-weight: 500; color: var(--muted); font-size: .7em; }
h4 { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
p { margin: 0; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 14px; padding: 12px 18px; font-weight: 600; font-size: 15px; border: 1.5px solid var(--wood-soft); color: var(--wood); background: var(--paper); min-height: 44px; text-decoration: none; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--cta); border-color: var(--cta); color: #fff; box-shadow: 0 2px 0 var(--cta-shadow); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.backup { background: var(--wood); border-color: var(--wood); color: var(--backup-ink); }
.btn.backup:hover { filter: brightness(1.08); }
.btn.big { padding: 16px 26px; font-size: 17px; min-height: 56px; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 10px; min-height: 36px; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn-row.end { justify-content: flex-end; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--wood-soft); color: var(--wood); background: var(--paper); }
.chip.skill { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.chip.soft { color: var(--muted); }
.chip.tint { background: var(--accent-tint); border-color: transparent; color: var(--accent); }
button.chip[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.lvl { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 7px; background: var(--accent-tint); color: var(--accent); }
.speak { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--paper); padding: 0; }
.speak:hover { background: var(--accent-tint); }
.speak.lg { width: 64px; height: 64px; } .speak.xl { width: 96px; height: 96px; } .speak.sm { width: 32px; height: 32px; border-width: 1px; }
.speak[disabled] { opacity: .35; cursor: default; }
.wd { font-family: "Playfair Display", serif; font-weight: 600; font-size: 34px; line-height: 1.1; }
.squeezed { overflow-wrap: anywhere; }   /* only if a word still doesn't fit at the smallest size (app.js fitWords) */
.big-word > div { min-width: 0; flex: 1; }
.wd.xl { font-size: 60px; }
.notation { color: var(--muted); font-weight: 500; font-size: max(12.5px, .55em); white-space: nowrap; }   /* ", -en" never splits */
.forms-line { color: var(--muted); font-size: 15px; margin-top: 2px; }
.art { font-weight: 600; }
.art.der { color: var(--der); } .art.die { color: var(--die); } .art.das { color: var(--das); } .art.derdie { color: var(--der); }
.gloss { font-size: 16px; color: var(--muted); margin-top: 4px; }
.ex { font-size: 16px; } .ex-en { font-size: 14px; color: var(--muted); font-style: italic; margin-top: 2px; }
.bar { height: 10px; border-radius: 8px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--hi); border-radius: 8px; transition: width .4s; }
.badge-ic { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; background: var(--accent-tint); color: var(--accent); }
.badge-ic.green { background: rgba(62,107,72,.12); }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* ---------------- Home ---------------- */
.grid-home { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.span2 { grid-column: span 2; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.hero-sub { color: var(--muted); max-width: 440px; }
.today { display: flex; gap: 28px; margin: 18px 0; }
.today div { display: flex; flex-direction: column; }
.today b { font-family: "Playfair Display", serif; font-size: 36px; font-weight: 600; line-height: 1.1; }
.today span { font-size: 13px; color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); margin-top: 12px; }
.hero-art { flex: none; }
.hero-art .sunfill { fill: rgba(200,16,46,.12); }
.hero-art .mtn-back { fill: rgba(0,102,179,.12); stroke: var(--blue); stroke-width: 1.5; }
.hero-art .mtn-front { fill: rgba(62,107,72,.16); stroke: var(--green); stroke-width: 1.5; }
.hero-art .snow { fill: #fff; stroke: var(--blue); stroke-width: 1; }
.hero-art .trail { fill: none; stroke: var(--red); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.hero-art .flagline { stroke: var(--red); stroke-width: 2; fill: var(--red); }
.hero-art .hut { stroke: var(--wood); stroke-width: 1.5; fill: var(--paper); }
.week { display: flex; justify-content: space-between; gap: 6px; }
.day { flex: 1; max-width: 44px; height: 58px; border-radius: 12px; border: 1px dashed var(--wood-soft); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 6px 0; gap: 4px; }
.day small { font-size: 11px; color: var(--muted); }
.day.done { border-style: solid; background: rgba(62,107,72,.10); }
.day.today { border: 2px solid var(--hi); }
.wotd { display: flex; gap: 16px; align-items: center; }
.lvl-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.lvl-row b { width: 26px; }
.lvl-row .bar { flex: 1; height: 8px; }
.lvl-row small { width: 92px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.tick { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--wood-soft); display: flex; align-items: center; justify-content: center; color: #fff; background: var(--paper); padding: 0; flex: none; }
.tick[aria-checked="true"] { background: var(--accent-fill); border-color: var(--accent-fill); }

/* ---------------- Hike ---------------- */
.trail-wrap { display: flex; flex-direction: column; gap: 2px; }
.trail-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }
.trail-top b { color: var(--ink); }
.trail-svg { width: 100%; height: 44px; display: block; }
.trail-line { stroke: var(--wood-soft); stroke-width: 2; stroke-dasharray: 3 6; fill: none; }
.tp { fill: var(--paper); stroke: var(--wood-soft); stroke-width: 1.5; }
.tp.done { fill: var(--hi); stroke: var(--hi); }
.hiker { stroke: var(--accent); stroke-width: 2; fill: none; stroke-linecap: round; }
.hiker circle { fill: var(--accent); }
.summit path:first-child { fill: rgba(0,102,179,.15); stroke: var(--blue); stroke-width: 1.5; }
.summit path:last-child { stroke: var(--red); stroke-width: 1.5; fill: var(--red); }
.drill { width: min(820px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.instr { font-size: 17px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.word-card { padding: 30px 34px; }
.big-word { display: flex; gap: 18px; align-items: center; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.options.three { grid-template-columns: repeat(3, 1fr); }
.opt { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 20px; border-radius: 16px; background: var(--paper); border: 1.5px solid var(--wood-soft); font-size: 19px; font-weight: 500; text-align: left; }
.opt:hover:not([disabled]) { border-color: var(--accent); }
.opt[disabled] { cursor: default; }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt.art-opt { justify-content: center; font-family: "Playfair Display", serif; font-size: 30px; font-weight: 600; }
.key { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--wood-soft); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); flex: none; font-family: "Inter", sans-serif; font-weight: 500; }
.hint { font-size: 14px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.prompt { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-family: "Playfair Display", serif; font-size: 42px; font-weight: 600; }
.prompt .ic { color: var(--muted); }
.prompt-en { font-family: "Inter", sans-serif; font-size: 15px; font-weight: 400; color: var(--muted); margin-left: auto; }
.gap-sentence { font-size: 24px; line-height: 1.5; }
.gap-blank { display: inline-block; min-width: 110px; border-bottom: 3px solid var(--accent); margin: 0 4px; text-align: center; color: var(--accent); font-weight: 600; }
.answer { width: 100%; height: 66px; border-radius: 16px; border: 2px solid var(--wood-soft); background: var(--paper); padding: 0 22px; font-size: 24px; font-weight: 500; }
.answer:focus { outline: none; border-color: var(--accent); }
.answer.ok { border-color: var(--ok); } .answer.almost { border-color: var(--almost); } .answer.bad { border-color: var(--bad); }
.umlauts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: -4px; }
.uk { min-width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--wood-soft); background: var(--paper); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; padding: 0 12px; }
.uk:hover { border-color: var(--accent); }
.uk.shift { font-size: 14px; color: var(--muted); }
.uk.shift[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.umlauts small { font-size: 13px; color: var(--muted); }
.feedback { border-radius: 16px; padding: 16px 20px; border: 1.5px solid; }
.feedback.ok { border-color: var(--ok); background: var(--ok-bg); }
.feedback.almost { border-color: var(--almost); background: var(--almost-bg); }
.feedback.bad { border-color: var(--bad); background: var(--bad-bg); }
.fb-h { display: flex; gap: 10px; align-items: center; font-size: 17px; font-weight: 700; }
.feedback.ok .fb-h { color: var(--ok); } .feedback.almost .fb-h { color: var(--almost); } .feedback.bad .fb-h { color: var(--bad); }
.fb-ans { font-family: "Playfair Display", serif; font-size: 34px; font-weight: 600; margin: 6px 0 2px; }
.fb-ans u { text-decoration-color: var(--almost); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.ex-row { display: flex; gap: 16px; align-items: center; }
.ex-card { padding: 16px 20px; }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grades.three { grid-template-columns: repeat(3, 1fr); }
.grade { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 14px; border: 1.5px solid var(--wood-soft); background: var(--paper); font-weight: 600; }
.grade small { font-weight: 400; color: var(--muted); font-size: 12px; text-align: center; }
.grade:hover { border-color: var(--accent); }
.gloss-hidden { width: min(14em, 100%); height: 1.5em; margin-top: 6px; border-radius: 8px; background: var(--line); }
.chip.again { margin-left: 8px; padding: 2px 8px; font-size: 12px; }
.listen { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.note-box textarea { width: 100%; min-height: 64px; border-radius: 12px; border: 1.5px solid var(--wood-soft); background: var(--bg); padding: 10px 12px; }
.summit-card { text-align: center; padding: 40px 30px; }
.summit-card h2 { font-size: 46px; margin-top: 10px; }
.summit-art { display: flex; justify-content: center; gap: 18px; color: var(--accent); }
.summit-art .ic { animation: pop .7s cubic-bezier(.3,1.6,.6,1) both; }
.summit-art .ic:nth-child(2) { animation-delay: .12s; } .summit-art .ic:nth-child(3) { animation-delay: .24s; }
@keyframes pop { from { transform: scale(.2) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.summit-stats { display: flex; justify-content: center; gap: 34px; margin: 22px 0; }
.summit-stats div { display: flex; flex-direction: column; }
.summit-stats b { font-family: "Playfair Display", serif; font-size: 34px; }
.summit-stats span { font-size: 13px; color: var(--muted); }

/* ---------------- Journal ---------------- */
.page-h { display: flex; flex-direction: column; gap: 4px; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tile { background: var(--paper); border: 1.5px solid var(--wood-soft); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; }
.tile b { font-family: "Playfair Display", serif; font-size: 34px; font-weight: 600; line-height: 1.15; }
.tile span { font-size: 13px; color: var(--muted); }
.tile.hi { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.tile.hi span { color: rgba(255,255,255,.88); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chart { width: 100%; height: 120px; display: block; }
.chart .b { fill: var(--accent-fill); opacity: .55; } .chart .b.today { fill: var(--hi-2); opacity: 1; }
.chart text { fill: var(--muted); font-size: 11px; }
.climb { display: block; width: 100%; height: auto; }
.climb-fill { fill: var(--ridge-near); } .climb-line { stroke: var(--green); stroke-width: 2; fill: none; }
.st { fill: var(--paper); stroke: var(--wood); stroke-width: 2; }
.st.done { fill: var(--green); stroke: var(--green); }
.st.here { fill: var(--hi); stroke: #fff; stroke-width: 3; }
.ranks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 4px; }
.rank { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; }
.rank b { font-family: "Playfair Display", serif; font-size: 19px; }
.rank span, .rank small { font-size: 13px; color: var(--muted); }
.rank em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent); margin-top: 4px; }
.rank.here { background: var(--accent-tint); outline: 1.5px solid var(--accent); }

/* ---------------- Words ---------------- */
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search { flex: 1 1 260px; display: flex; gap: 10px; align-items: center; height: 48px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--wood-soft); background: var(--paper); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: none; height: 100%; color: var(--ink); }
.search input:focus { outline: none; }
.select { height: 48px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--wood-soft); background: var(--paper); font-size: 14px; font-weight: 600; color: var(--wood); max-width: 100%; text-overflow: ellipsis; }
.table { background: var(--paper); border: 1.5px solid var(--wood-soft); border-radius: 18px; overflow: hidden; }
.tr { display: grid; grid-template-columns: 52px 2.2fr 1.5fr .6fr 1.3fr 1.1fr 1.1fr; align-items: center; gap: 8px; min-height: 52px; padding: 6px 16px; border-top: 1px solid var(--line); font-size: 15px; }
.tr.th { border-top: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; min-height: 42px; background: var(--bg); }
.tr.row { cursor: pointer; } .tr.row:hover { background: var(--bg); }
.wcell { display: flex; align-items: baseline; gap: 0; font-size: 17px; flex-wrap: wrap; }
.wcell .art { margin-right: 6px; }
.wcell small { color: var(--muted); font-size: 13px; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.solid { background: rgba(62,107,72,.14); color: var(--green); }
.pill.learning { background: var(--accent-tint); color: var(--accent); }
.pill.new { background: var(--line); color: var(--muted); }
.pill.tricky { background: var(--bad-bg); color: var(--bad); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------------- Settings ---------------- */
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.settings .card > p + p { margin-top: 6px; }
.settings .card > p + .btn-row { margin-top: 14px; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.set-row:first-of-type { border-top: 0; }
.set-row > div:first-child { flex: 1 1 200px; }
.set-row label, .set-row .lbl { font-weight: 600; display: block; }
.set-row p { font-size: 13px; color: var(--muted); }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
input[type="range"] { accent-color: var(--accent-fill); width: 180px; }
.credits { font-size: 13px; color: var(--muted); }
.credits p + p { margin-top: 8px; }
.credits + h4 { margin-top: 24px; }   /* space between the Privacy link and "Progress" */
.linkish:disabled { opacity: .45; cursor: default; text-decoration: none; }

/* ---------------- dialogs and toasts ---------------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(20,16,10,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.dialog { width: min(640px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--paper); border: 1.5px solid var(--wood-soft); border-radius: 20px; padding: 28px 30px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.dialog h2 { font-size: 32px; margin-bottom: 8px; }
.dialog .btn-row { margin-top: 20px; }
.steps-dots { display: flex; gap: 6px; margin-bottom: 14px; }
.steps-dots span { width: 26px; height: 6px; border-radius: 3px; background: var(--line); }
.steps-dots span.on { background: var(--accent-fill); }
.choice-grid { display: grid; gap: 10px; margin-top: 14px; }
.choice-grid.cols4 { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.choice-grid.cols4 .choice { flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.choice { display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--wood-soft); background: var(--paper); }
.choice[aria-pressed="true"], .choice[aria-checked="true"] { border-color: var(--accent-fill); background: var(--accent-tint); }
.choice[aria-checked="true"] .tick { background: var(--accent-fill); border-color: var(--accent-fill); }
.choice b { display: block; }
.choice small { color: var(--muted); }
.help-list { padding-left: 20px; margin: 10px 0 0; } .help-list li { margin: 6px 0; }
kbd { font: 12px ui-monospace, Consolas, monospace; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--wood-soft); background: var(--bg); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.3); max-width: calc(100vw - 32px); }

/* ---------------- smaller screens ---------------- */
@media (max-width: 1180px) {
  .grid-home { grid-template-columns: 1fr 1fr; }
  .span2 { grid-column: 1 / -1; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tr { grid-template-columns: 44px 2fr 1.5fr .6fr 1fr 1fr; }
  .tr > :nth-child(5) { display: none; }
}
@media (max-width: 980px) {
  .side { width: 210px; } .sign { width: 180px; }
  .hero-art { display: none; }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .clock small { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  /* phone header: logo, language and theme on the first row; both clocks get the full second row */
  .top-row { padding: 10px 16px 0; gap: 8px; flex-wrap: wrap; }
  .logo { margin-right: auto; }
  .logo-w { font-size: 30px; } .logo-s { display: none; }
  .top-tools { display: contents; }
  .clocks { order: 5; flex: 1 1 100%; justify-content: center; padding: 6px 12px; gap: 12px; }
  .clock { gap: 6px; } .clock small { display: inline; } .clock > span { flex-direction: row; align-items: baseline; gap: 6px; }
  .clock b { font-size: 15px; } .clock-sep { height: 20px; }
  .seg button { padding: 6px 9px; min-height: 34px; font-size: 13px; }
  .round-btn { width: 36px; height: 36px; }
  .round-btn.help { display: none; }
  .ridge { height: 26px; margin-top: -4px; }
  .side { display: none; }
  .main { padding: 12px 16px 96px; gap: 14px; }
  .tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around; border-top: 1.5px solid var(--wood-soft); background: var(--paper); padding: 6px 0 calc(10px + env(safe-area-inset-bottom)); }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; color: var(--muted); min-width: 60px; padding: 4px; }
  .tab small { font-size: 11px; font-weight: 600; }
  .tab[aria-current="page"] { color: var(--accent); }
  .tab .dot { position: absolute; top: 2px; right: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--almost); }
  .grid-home, .grid-2, .settings { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px; }
  h1 { font-size: 40px; } h2 { font-size: 30px; }
  .today { gap: 20px; } .today b { font-size: 28px; }
  .backup-banner { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px 12px; padding: 14px; align-items: start; }
  .bb-ic { width: 44px; height: 44px; }
  .bb-text b { font-size: 18px; }
  .bb-actions { grid-column: 1 / -1; align-items: stretch; }
  .options { grid-template-columns: 1fr; }
  .opt { min-height: 56px; font-size: 18px; }
  .wd.xl { font-size: 44px; } .prompt { font-size: 32px; } .gap-sentence { font-size: 20px; }
  .word-card { padding: 22px; }
  .grades { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .ranks { grid-template-columns: 1fr 1fr; }
  .tr { grid-template-columns: 40px 1fr auto; }
  .tr > :nth-child(4), .tr > :nth-child(5), .tr > :nth-child(7) { display: none; }
  .tr.th { display: none; }
  .lock-card { padding: 24px; } .lock h1 { font-size: 30px; } .lock-row { flex-direction: column; } .lock-row input { flex: none; }
}
@media (max-width: 359px) {
  .clock small { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.dialog .big-word .wd { padding-right: 4px; }   /* the word stops short of the pop-up's edge */
@media (max-width: 480px) { .dialog .big-word { gap: 12px; } .dialog .big-word .speak.lg { width: 48px; height: 48px; } }
.lock-price span.lock-sale { justify-self: start; margin: 0 0 8px; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.lock-was { font-size: 24px; font-weight: 600; color: var(--muted); text-decoration-thickness: 2px; margin-right: 6px; }
.lock-price span.lock-vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
