/* Norsk med Bjørn — a calm, editorial look: paper, ink, forest green from Bjørn's scarf. */
:root {
  --paper: #f5f1e8;
  --paper-2: #ece6d9;
  --card: #fffdf8;
  --ink: #1f2826;
  --ink-2: #5a6560;
  --ink-3: #8a938e;
  --line: #e2dbcc;
  --forest: #2f5f4c;
  --forest-2: #3e7d62;
  --forest-soft: #e3eee7;
  --fjord: #2d5f86;
  --fjord-soft: #e4edf5;
  --clay: #b8703f;
  --clay-soft: #f6e8dc;
  --berry: #b3423c;
  --berry-soft: #f8e4e1;
  --hl: #f3dd9c;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 14px;
  --shadow: 0 1px 2px rgba(31, 40, 38, .05), 0 6px 20px rgba(31, 40, 38, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151b19; --paper-2: #1c2421; --card: #1e2724; --ink: #ece8df; --ink-2: #a9b3ad; --ink-3: #7d8882; --line: #2e3a35;
    --forest: #8cc7a8; --forest-2: #7dbd9c; --forest-soft: #1f3129; --fjord: #8db8de; --fjord-soft: #1c2a36;
    --clay: #e0a070; --clay-soft: #33271e; --berry: #f08a80; --berry-soft: #3a2220; --hl: #5d4d1c;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #151b19; --paper-2: #1c2421; --card: #1e2724; --ink: #ece8df; --ink-2: #a9b3ad; --ink-3: #7d8882; --line: #2e3a35;
  --forest: #8cc7a8; --forest-2: #7dbd9c; --forest-soft: #1f3129; --fjord: #8db8de; --fjord-soft: #1c2a36;
  --clay: #e0a070; --clay-soft: #33271e; --berry: #f08a80; --berry-soft: #3a2220; --hl: #5d4d1c; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 102px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); min-height: 100vh; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 .9em; }
a { color: var(--fjord); }
em[lang="nb"] { font-style: italic; color: var(--forest); font-weight: 500; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--fjord); outline-offset: 2px; border-radius: 6px; }
.kicker { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--forest-2); margin-bottom: .6em; }
.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-2); }
.small { font-size: .87rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; }
.done-line { color: var(--forest); font-weight: 600; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px;
  padding: 10px 18px; font-weight: 600; font-size: .96rem; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--forest); border-color: var(--forest); color: #fff; }
.btn.primary:hover { background: var(--forest-2); border-color: var(--forest-2); }
:root[data-theme="dark"] .btn.primary { color: #10231b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #10231b; } }
.btn.big { padding: 13px 24px; font-size: 1.02rem; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.danger { color: var(--berry); }
.link { background: none; border: 0; padding: 4px 2px; color: var(--fjord); text-decoration: underline; text-underline-offset: 3px; font-size: .92rem; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.play {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--fjord); vertical-align: middle; flex: none; padding: 0; transition: background .15s;
}
.play:hover { background: var(--fjord-soft); }
.play.tts { display: none; }
.has-voice .play.tts { display: inline-grid; }
.d-fb.close { background: var(--clay-soft); border-radius: 10px; padding: 12px 14px; }
.ex-fb.close { background: var(--clay-soft); border-radius: 10px; padding: 10px 12px; color: var(--ink); }
/* On small fields the æ ø å buttons only show while you type in that field. */
.field.inline .letters { display: none; }
.field.inline:focus-within .letters { display: inline-flex; }
@media (max-width: 760px) { .field.full .letters { display: none; } .field.full:focus-within .letters { display: inline-flex; } }
/* On phones Bjørn steps aside while you type, so he never covers an exercise. */
@media (max-width: 980px) { body:has(.field:focus-within) .ch-side, body:has(.field:focus-within) #dock { opacity: 0; pointer-events: none; transition: opacity .2s; } }
.play svg { width: 17px; height: 17px; fill: currentColor; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.play.small { width: 30px; height: 30px; }
.play.tiny { width: 24px; height: 24px; }
.play.tiny svg { width: 12px; height: 12px; }
.play.big { width: 52px; height: 52px; }
.play.big svg { width: 24px; height: 24px; }
.play.slow { font-weight: 700; font-size: .95rem; }
.flag-no {
  width: 22px; height: 16px; border-radius: 3px; display: inline-block; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 16'%3E%3Crect width='22' height='16' fill='%23ba0c2f'/%3E%3Cpath d='M6 0h4v16H6zM0 6h22v4H0z' fill='%23fff'/%3E%3Cpath d='M7 0h2v16H7zM0 7h22v2H0z' fill='%2300205b'/%3E%3C/svg%3E") center / cover;
}

/* header */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 20px;
  padding: 10px max(20px, env(safe-area-inset-left)); background: var(--paper); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 40px; height: 34px; object-fit: contain; }
.brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; }
.brand-name em { font-weight: 500; color: var(--forest-2); font-style: italic; }
.tabs { display: flex; gap: 2px; margin: 0 auto; }
.tabs a {
  position: relative; display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px;
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.tabs a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Each tab has its own soft colour, like the first version. */
.tabs a[data-tab="route"] { --tc: #2f7a58; }
.tabs a[data-tab="vocab"] { --tc: #2b7c86; }
.tabs a[data-tab="grammar"] { --tc: #6a55a8; }
.tabs a[data-tab="review"] { --tc: #c06a24; }
.tabs a[data-tab="cabin"] { --tc: #b27b12; }
.tabs a[data-tab="me"] { --tc: #2f6fa8; }
.tabs { gap: 6px; }
.tabs a {
  color: color-mix(in srgb, var(--tc) 85%, var(--ink)); background: color-mix(in srgb, var(--tc) 9%, var(--card));
  border: 1px solid color-mix(in srgb, var(--tc) 22%, var(--card));
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, transform .2s ease, color .25s ease;
}
.tabs a svg { color: var(--tc); }
.tabs a:hover { background: color-mix(in srgb, var(--tc) 16%, var(--card)); border-color: color-mix(in srgb, var(--tc) 40%, var(--card)); transform: translateY(-1px); color: var(--ink); }
.tabs a.active { background: color-mix(in srgb, var(--tc) 20%, var(--card)); border-color: color-mix(in srgb, var(--tc) 65%, var(--card)); box-shadow: 0 2px 8px color-mix(in srgb, var(--tc) 22%, transparent); color: var(--ink); font-weight: 600; }
:root[data-theme="dark"] .tabs a svg { color: color-mix(in srgb, var(--tc) 60%, white); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs a svg { color: color-mix(in srgb, var(--tc) 60%, white); } }
.guide-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-weight: 700; color: var(--ink-2); font-size: 1rem; padding: 0; transition: background .2s; }
.guide-btn:hover { background: var(--paper-2); color: var(--ink); }
.badge { background: var(--clay); color: #fff; font-size: .7rem; min-width: 19px; height: 19px; border-radius: 99px; display: inline-grid; place-items: center; padding: 0 5px; }
.lang-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 13px; font-weight: 600; font-size: .9rem; }

main { max-width: 1120px; margin: 0 auto; padding: 36px 20px 120px; outline: none; }

/* Bjørn */
.bjorn { display: block; line-height: 0; cursor: pointer; }
/* The painted body is a canvas; the face and outfits are an SVG laid exactly on top. */
.bj-move { position: relative; aspect-ratio: 1145 / 1374; transform-origin: 50% 97%; will-change: transform; }
.bj-move canvas, .bj-move svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bjorn.hero { width: 230px; }
.bjorn.side { width: 150px; }
.bjorn.medium { width: 120px; }
.bubble {
  display: inline-flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-radius: 16px 16px 16px 4px; padding: 10px 14px; line-height: 1.3; max-width: 260px;
}
.bubble strong { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: var(--forest); }
.bubble small { color: var(--ink-2); font-size: .85rem; margin-top: 2px; }
.bubble.big strong { font-size: 1.2rem; }

/* peeking Bjørn: a little head and two paws over the top edge of a hovered card */
.peek-host { position: relative; isolation: isolate; }
.peek {
  position: absolute; left: 50%; bottom: calc(100% - 7px); width: 94px; height: 60px; pointer-events: none; z-index: 3;
  opacity: 0; transform: translate3d(-50%, 10px, 0); transition: opacity .3s ease, transform .4s cubic-bezier(.22, .72, .25, 1);
}
.peek-host:hover > .peek, .peek-host:focus-visible > .peek { opacity: 1; transform: translate3d(-50%, 0, 0); }
/* Sizes from the approved design of the first version: small paws resting against the lower cheeks. */
.peek-inner { position: absolute; inset: 0; transform: rotate(var(--lean, 0deg)); transform-origin: 50% 85%; transition: transform .18s ease-out; }
.peek-head { position: absolute; left: 17px; bottom: 2px; width: 60px; height: 51px; object-fit: contain; filter: var(--skin, none) drop-shadow(0 2px 1px #5931191a); }
.peek-paw { position: absolute; bottom: 2px; width: 13.64px; height: 10.91px; overflow: visible; z-index: 2; filter: drop-shadow(0 1px 1px #60371c25); }
.peek-paw.l { left: 20.41px; transform: rotate(-12deg); }
.peek-paw.r { right: 20.41px; transform: rotate(12deg); }
/* A mini Bjørn peeks over a menu tab while you point at it (not on touch screens: no hover there).
   Same proportions as the big peek, at half size. */
.tabs .peek { width: 46px; height: 30px; bottom: calc(100% - 5px); }
.tabs .peek-head { left: 8px; bottom: 1px; width: 30px; height: 25.5px; }
.tabs .peek-paw { width: 6.82px; height: 5.45px; bottom: 1px; }
.tabs .peek-paw.l { left: 9.7px; }
.tabs .peek-paw.r { right: 9.7px; }
.topbar { padding-top: 22px; }
@media (hover: none) { .tabs .peek { display: none; } }
.brand-head { width: 40px; height: 34px; object-fit: contain; filter: var(--skin, none); }

/* Bjørn talking */
.bjorn { position: relative; outline: none; }
.bjorn:focus-visible svg { outline: 2px solid var(--fjord); outline-offset: 4px; border-radius: 12px; }
.bubble.float { position: absolute; left: 50%; bottom: 96%; transform: translateX(-50%); width: max-content; max-width: 230px; z-index: 6; line-height: 1.3; text-align: left; border-radius: 16px; pointer-events: none; }
.bubble.float::after, .dock-bubble::after { content: ''; position: absolute; width: 12px; height: 12px; background: var(--card); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); left: 50%; bottom: -7px; transform: translateX(-50%) rotate(45deg); }
.bubble.pop { animation: pop .3s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes pop { from { opacity: 0; transform: translateX(var(--tx, 0)) scale(.85); } }
.bubble.float.pop { --tx: -50%; }
.dock { position: fixed; right: 16px; bottom: 16px; z-index: 35; display: flex; align-items: flex-end; gap: 6px; }
.bjorn.dock-bear { width: 64px; }
.dock-bubble { position: relative; max-width: 220px; border-radius: 16px 16px 4px 16px; margin-bottom: 30px; }
.dock-bubble::after { left: auto; right: -7px; bottom: 12px; transform: rotate(-45deg); }

/* honey */
.top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.honey-chip { position: relative; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; color: var(--ink); background: #fbeecb; border: 1px solid #ecd28f; border-radius: 99px; padding: 5px 12px 5px 8px; font-weight: 700; font-size: .92rem; }
:root[data-theme="dark"] .honey-chip { background: #3a2f16; border-color: #5c4a20; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .honey-chip { background: #3a2f16; border-color: #5c4a20; } }
.jar { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.jar.big { width: 34px; height: 34px; }
.honey-chip.bump { animation: bump .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 40% { transform: scale(1.15); } }
.honey-float { position: absolute; right: 6px; top: 100%; font-weight: 800; color: #b27b12; font-size: .9rem; pointer-events: none; animation: floatUp 1.2s ease-out forwards; }
@keyframes floatUp { from { opacity: 0; transform: translateY(8px); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-2px); } }

/* ---------- route (home) ---------- */
.welcome { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; margin-bottom: 36px; }
.welcome-bear { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.welcome-bear .bubble { align-self: flex-start; }
.welcome-text h1 { max-width: 18ch; }
.continue {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin-top: 22px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); max-width: 620px;
  transition: border-color .15s;
}
.continue:hover { border-color: var(--forest-2); }
.c-num { width: 46px; height: 46px; border-radius: 50%; background: var(--forest); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.c-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.c-body small { color: var(--forest-2); font-weight: 600; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.c-body b { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.c-body > span { color: var(--ink-2); font-size: .92rem; }
.c-go { font-weight: 600; color: var(--forest); white-space: nowrap; }
.thin-bar { display: block; height: 4px; background: var(--paper-2); border-radius: 99px; margin-top: 8px; overflow: hidden; max-width: 260px; }
.thin-bar i { display: block; height: 100%; background: var(--forest-2); }

.side-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 48px; }
.honey-link { background: linear-gradient(160deg, var(--card), #fbf0d4); }
:root[data-theme="dark"] .honey-link { background: linear-gradient(160deg, var(--card), #33291a); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .honey-link { background: linear-gradient(160deg, var(--card), #33291a); } }
.btn.small { padding: 6px 12px; font-size: .88rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* vocabulary lessons */
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.lesson-card { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.lesson-card:hover { border-color: var(--forest-2); }
.lesson-card.done { border-color: var(--forest-soft); background: linear-gradient(160deg, var(--card), var(--forest-soft)); }
.l-top { display: flex; justify-content: space-between; align-items: baseline; }
.l-top b { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; }
.l-state { font-size: .8rem; color: var(--ink-3); }
.lesson-card.done .l-state { color: var(--forest); font-weight: 600; }
.l-words { color: var(--forest); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.all-words { margin-top: 44px; }
.filters.small .filter { font-size: .85rem; padding: 4px 12px; }

/* grammar lessons */
.g-lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.g-lesson { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 18px; }
.g-lesson.done .s-num { background: var(--forest); color: #fff; }
.g-lesson.started .s-num { background: var(--clay); color: #fff; }
.g-actions { display: flex; gap: 10px; align-items: center; }
.g-finish { margin: 10px 0 30px; }

/* cabin */
.cabin { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; margin-bottom: 30px; }
.scene-wrap { position: relative; aspect-ratio: 2 / 1; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.scene-slot, .scene-slot .scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene-bear { position: absolute; left: 50%; bottom: 3%; width: 21%; transform: translateX(-50%); }
.bjorn.cabin-bear { width: 100%; filter: drop-shadow(0 8px 5px rgba(40, 50, 40, .18)); }
.scene-col { min-width: 0; }
/* Bjørn's words and the try-on bar sit under the picture, never on top of it. */
.cabin .scene-bubble { position: relative; left: auto; top: auto; display: flex; margin: 14px auto 0; width: fit-content; max-width: 90%; border-radius: 16px; z-index: 3; }
.cabin .scene-bubble::before { content: ''; position: absolute; left: 50%; top: -8px; width: 16px; height: 16px; background: inherit; border-left: inherit; border-top: inherit; transform: translateX(-50%) rotate(45deg); }
.scene-hint { position: absolute; right: 12px; bottom: 10px; margin: 0; font-size: .75rem; padding: 3px 10px; border-radius: 99px; background: rgba(255, 253, 248, .85); color: #44504b; pointer-events: none; animation: hintFade 6s ease forwards 2s; }
@keyframes hintFade { 80% { opacity: 1; } to { opacity: 0; } }
.honey-panel { position: absolute; left: 14px; top: 14px; display: flex; align-items: center; gap: 8px; background: rgba(255, 253, 248, .92); border-radius: 14px; padding: 6px 14px 6px 8px; color: #1f2826; }
.honey-panel b { display: block; font-family: var(--serif); font-size: 1.4rem; line-height: 1; }
.honey-panel small { color: #5a6560; }
.try-bar { position: relative; width: fit-content; max-width: 100%; margin: 12px auto 0; flex-wrap: wrap; justify-content: center; display: flex; gap: 10px; align-items: center; background: rgba(255, 253, 248, .95); color: #1f2826; border-radius: 12px; padding: 8px 12px; box-shadow: var(--shadow); white-space: nowrap; font-size: .92rem; z-index: 4; }
.honey-card h2 { display: flex; align-items: center; gap: 8px; }
.honey-panel, .honey-card { transition: box-shadow .4s ease, transform .4s ease; }
.honey-panel.glow, .honey-card.glow { box-shadow: 0 0 0 3px #f2c14e, 0 0 28px 6px rgba(242, 177, 52, .55); animation: honeyGlow 1s ease-in-out 3; }
.honey-panel.glow { transform: scale(1.06); }
@keyframes honeyGlow { 50% { box-shadow: 0 0 0 5px #f2c14e, 0 0 42px 14px rgba(242, 177, 52, .7); } }

/* verb forms */
.conj { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.conj span { display: flex; flex-direction: column; line-height: 1.2; background: color-mix(in srgb, #6a55a8 9%, var(--card)); border: 1px solid color-mix(in srgb, #6a55a8 20%, var(--card)); border-radius: 8px; padding: 4px 9px; }
.conj small { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.conj b { font-weight: 600; color: var(--forest); font-size: .95rem; }
.conj-full { margin: 16px 0 6px; }
.conj-table { width: 100%; }
.g-table.conj-table th { width: 36%; background: none; vertical-align: middle; }
.conj-table th small { display: block; font-weight: 400; color: var(--ink-3); font-size: .78rem; }
.conj-table td { font-size: 1.05rem; }
.wr-forms { display: block; font-size: .82rem; color: var(--ink-3); margin-top: 1px; }
.sub-head { margin: 8px 0 12px; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* guide */
.guide { text-align: center; }
.guide-bear { height: 150px; display: flex; justify-content: center; margin-bottom: 6px; }
.guide-bear svg { height: 100%; width: auto; }
.guide p { max-width: 46ch; margin-left: auto; margin-right: auto; }
.guide-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.dots { display: flex; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: width .25s, background .25s; }
.dots i.on { width: 22px; background: var(--forest-2); }
.honey-big { font-size: 1.05rem; }
.honey-big b { font-family: var(--serif); font-size: 1.6rem; }
.thin-bar.big { height: 8px; max-width: none; }
.thin-bar.big i { background: #d99b2b; }
.earn { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.earn li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.earn b { color: #b27b12; }
.shop-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.shop-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 14px; display: flex; flex-direction: column; }
.shop-item.on { border-color: var(--forest-2); box-shadow: 0 0 0 2px var(--forest-soft); }
.shop-item h3 { font-size: 1.05rem; margin: 10px 0 2px; }
.shop-item p { margin: 0 0 10px; flex: 1; }
.thumb-wrap { aspect-ratio: 2 / 1; border-radius: 10px; overflow: hidden; background: linear-gradient(#e9f0e6, #f6f2e6); display: grid; place-items: center; }
.thumb-wrap svg { width: 100%; height: 100%; display: block; }
.thumb-wrap .portrait { width: auto; height: 100%; }
.thumb-wrap .thumb-decor { width: auto; height: 86%; }
.shop-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.shop-actions .btn { gap: 5px; }
.in-use { color: var(--forest); font-weight: 600; font-size: .9rem; }
/* The shop: a counter, rarity labels by price, and cards that lift a little. */
.shop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.shop-head .shop-tabs { margin-bottom: 0; }
.shop-tabs .filter small { opacity: .6; font-weight: 600; margin-left: 3px; }
.shop-count { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shop-count b { color: var(--ink); }
.shop-count .thin-bar { width: 110px; }
.shop-item { position: relative; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.shop-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.thumb-wrap { position: relative; }
.tier-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 0 !important; flex: 0 !important; }
.tier-line + h3 { margin-top: 4px !important; }
.tier-badge { font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); }
.owned-badge { font-size: .72rem; font-weight: 700; color: var(--forest); }
.tier-common .tier-badge { background: color-mix(in srgb, #6fae7f 18%, var(--card)); color: #3f7d52; }
.tier-rare .tier-badge { background: #dcebf8; color: #2d6fa3; }
.tier-epic .tier-badge { background: #ece0f8; color: #7a43b0; }
.tier-legend .tier-badge { background: linear-gradient(90deg, #f7d77a, #f2b84b); color: #6b4300; }
.tier-epic { border-color: color-mix(in srgb, #9b6bd0 40%, var(--line)); }
.tier-legend { border-color: color-mix(in srgb, #e0a32e 55%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, #f7d77a 10%, var(--card)), var(--card) 40%); }
.tier-legend .thumb-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .45) 45%, transparent 60%); transform: translateX(-100%); animation: shine 4s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.smoke circle { animation: smoke 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.smoke circle:nth-child(2) { animation-delay: .6s; } .smoke circle:nth-child(3) { animation-delay: 1.2s; }
@keyframes smoke { 0%, 100% { opacity: .9; transform: translateY(0) scale(1); } 50% { opacity: .35; transform: translateY(-6px) scale(1.15); } }
.twinkle { animation: twinkle 2.2s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .55; } }
.bob { animation: bob 5s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(8px); } }
.rain { animation: rain .9s linear infinite; }
@keyframes rain { from { transform: translateY(-16px); } to { transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) { .tier-legend .thumb-wrap::after { display: none; } }
/* Tapping things in the cabin picture. */
.scene-slot .deco { cursor: pointer; transform-box: fill-box; transform-origin: 50% 100%; transition: filter .2s; }
.scene-slot .deco:hover { filter: brightness(1.08) drop-shadow(0 0 5px rgba(255, 255, 255, .9)); }
.poke-common { animation: pokeWiggle .6s ease; }
.poke-rare { animation: pokeBounce .8s cubic-bezier(.3, 1.6, .5, 1); }
.poke-epic { animation: pokeJump 1s cubic-bezier(.3, 1.5, .5, 1); }
.poke-legend { animation: pokeLegend 1.6s ease; }
@keyframes pokeWiggle { 25% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } 75% { transform: rotate(-2deg); } }
@keyframes pokeBounce { 30% { transform: scale(1.12, .9); } 55% { transform: translateY(-10px) scale(.95, 1.08); } 80% { transform: scale(1.03, .97); } }
@keyframes pokeJump { 25% { transform: scale(1.1, .88); } 50% { transform: translateY(-26px) rotate(-6deg) scale(1.06); } 75% { transform: translateY(0) rotate(3deg) scale(1.04, .96); } }
@keyframes pokeLegend { 15% { transform: scale(1.12); filter: drop-shadow(0 0 12px #ffd36e); } 40% { transform: translateY(-14px) scale(1.18); filter: drop-shadow(0 0 22px #ffd36e) brightness(1.2); } 70% { transform: scale(1.06); filter: drop-shadow(0 0 14px #fff); } }
/* Natural movements: things move the way they would, not just bounce. */
.flower { transform-box: view-box; animation: breeze 3.2s ease-in-out infinite alternate; }
@keyframes breeze { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
.deco.rustle .flower { animation: rustle 1.8s ease-in-out; }
@keyframes rustle { 15% { transform: rotate(9deg); } 35% { transform: rotate(-7deg); } 55% { transform: rotate(5deg); } 75% { transform: rotate(-3deg); } }
.gull { transform-box: view-box; animation: glide 5s ease-in-out infinite alternate; }
@keyframes glide { to { transform: translate(14px, -5px); } }
.gull .wing { transform-box: view-box; }
.gull .wing.l { animation: wingL 1.8s ease-in-out infinite alternate; }
.gull .wing.r { animation: wingR 1.8s ease-in-out infinite alternate; }
@keyframes wingL { from { transform: rotate(-6deg); } to { transform: rotate(10deg); } }
@keyframes wingR { from { transform: rotate(6deg); } to { transform: rotate(-10deg); } }
.deco.flap .wing.l { animation: flapL .18s ease-in-out 10 alternate; }
.deco.flap .wing.r { animation: flapR .18s ease-in-out 10 alternate; }
.deco.flap .gull { animation: rise 1.8s ease-in-out; }
@keyframes flapL { from { transform: rotate(-28deg); } to { transform: rotate(34deg); } }
@keyframes flapR { from { transform: rotate(28deg); } to { transform: rotate(-34deg); } }
@keyframes rise { 50% { transform: translate(6px, -16px); } }
.deco.nudge { animation: nudge .7s ease-in-out; }
@keyframes nudge { 30% { transform: rotate(-2.5deg); } 65% { transform: rotate(1.5deg); } }
.deco.gust .flag-cloth { animation: flutter .18s ease-in-out 10 alternate; }
.deco.windy { transform-origin: 50% 100%; animation: windy 2s ease-in-out; }
@keyframes windy { 25% { transform: rotate(10deg) translate(10px, -6px); } 55% { transform: rotate(-7deg) translate(-6px, 4px); } 80% { transform: rotate(4deg); } }
.deco.flare .flame { animation: flareUp 1.6s ease-in-out; }
@keyframes flareUp { 30% { transform: scale(1.35, 1.6); } 60% { transform: scale(1.15, 1.3); } }
.deco.wobble { animation: wobble 1.2s ease-in-out; }
@keyframes wobble { 20% { transform: rotate(-4deg); } 45% { transform: rotate(3deg); } 70% { transform: rotate(-1.5deg); } }
.deco.hop { animation: hop .9s ease-out; }
@keyframes hop { 20% { transform: scale(1.04, .94); } 45% { transform: translateY(-12px); } 70% { transform: translateY(0) scale(1.03, .97); } }
.deco.pounce { animation: pounce 1.1s ease-in-out; }
@keyframes pounce { 25% { transform: scale(1.06, .9); } 50% { transform: translate(-14px, -18px) rotate(-8deg); } 75% { transform: translate(-16px, 0); } 100% { transform: translate(0, 0); } }
.deco.nod { animation: nod 1.4s ease-in-out; transform-origin: 30% 100%; }
@keyframes nod { 25% { transform: rotate(-2deg) translateY(2px); } 50% { transform: rotate(1deg); } 75% { transform: rotate(-1.5deg) translateY(1px); } }
.deco.float-up { animation: floatUp 2.6s ease-in-out; }
@keyframes floatUp { 45% { transform: translateY(-34px) rotate(2deg); } 70% { transform: translateY(-22px) rotate(-1deg); } }
.deco.tier-legend { filter: drop-shadow(0 0 12px rgba(255, 214, 110, .8)); }
.deco.tier-epic { filter: drop-shadow(0 0 7px rgba(200, 170, 255, .7)); }
/* The scenery: an echo from the mountains, the sun's rays, rain, ripples, a jumping fish, cabin lights. */
.scene-slot .part { cursor: pointer; }
.scene-slot .part[data-part="tree"].touched { animation: treeSway 1.5s ease-in-out; }
@keyframes treeSway { 20% { transform: rotate(4deg); } 45% { transform: rotate(-3deg); } 70% { transform: rotate(1.5deg); } }
.scene-slot .part[data-part="sun"].touched { animation: sunPulse 1.6s ease; transform-box: fill-box; transform-origin: center; }
@keyframes sunPulse { 35% { transform: scale(1.12); filter: brightness(1.15); } }
.scene-slot .part[data-part="cloud"].touched { animation: cloudDarken 1.6s ease; }
@keyframes cloudDarken { 20%, 70% { filter: brightness(.8); } }
.scene-slot .part[data-part="house"].touched { animation: nudge .5s ease-in-out; transform-box: fill-box; transform-origin: 50% 100%; }
.lights-off rect[fill="#ffe39a"], .lights-off rect[fill="#ffd36e"], .lights-off circle[fill="#ffe7a0"] { fill: #4d5a63; transition: fill .4s; }
.lights-off .glow { opacity: 0; }
.echo { animation: echo 1.8s ease-out forwards; }
@keyframes echo { from { opacity: 0; transform: translateY(6px); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-14px); } }
.rays { animation: rays 2.2s ease-out forwards; }
@keyframes rays { from { opacity: 0; transform: rotate(0) scale(.8); } 30% { opacity: .9; } to { opacity: 0; transform: rotate(40deg) scale(1.1); } }
.scene-wrap.sunny .scene-slot { animation: sunny 2s ease; }
@keyframes sunny { 40% { filter: brightness(1.12) saturate(1.1); } }
.drop { animation: drop 1s linear forwards; }
@keyframes drop { to { transform: translate(-6px, 70px); opacity: 0; } }
.ripple { transform-box: fill-box; transform-origin: center; animation: ripple 1.4s ease-out forwards; }
@keyframes ripple { to { transform: scale(7); opacity: 0; } }
.fish { animation: fish 1.3s ease-in-out forwards; }
@keyframes fish { 0% { transform: translate(0, 0) rotate(-40deg); opacity: 0; } 15% { opacity: 1; } 50% { transform: translate(18px, -34px) rotate(10deg); } 100% { transform: translate(36px, 0) rotate(60deg); opacity: 0; } }
.puff { transform-box: fill-box; transform-origin: center; animation: puff 2.2s ease-out forwards; }
@keyframes puff { to { transform: translate(18px, -80px) scale(2); opacity: 0; } }
.pfx.rise { animation-duration: 2s; animation-timing-function: ease-out; }
.pfx.fall { animation-duration: 1.8s; animation-timing-function: ease-in; }
.deco.party { animation: party 1.4s steps(7); }
@keyframes party { 0%, 100% { filter: none; } 14% { filter: hue-rotate(90deg) brightness(1.3); } 42% { filter: hue-rotate(200deg) brightness(1.4); } 70% { filter: hue-rotate(300deg) brightness(1.3); } }
.deco.bright { animation: bright 1.4s ease; }
@keyframes bright { 40% { filter: brightness(1.6) drop-shadow(0 0 18px #ffd36e); } }
.deco.hide { animation: trollHide 2s ease; }
@keyframes trollHide { 20% { transform: scale(1.1, .8); } 35%, 70% { transform: scale(0); opacity: 0; } 90% { transform: scale(1.1); opacity: 1; } }
.deco.splash { animation: splash 2.4s ease; }
@keyframes splash { 10%, 30%, 50% { transform: scale(1.05, .95); } 20%, 40% { transform: scale(.97, 1.05) translateY(-4px); } 60% { filter: drop-shadow(0 0 18px #9cc9ff) brightness(1.15); } }
.pfx { pointer-events: none; animation: pfx 1.5s ease-out forwards; transform-box: fill-box; transform-origin: center; }
@keyframes pfx { from { transform: translate(0, 0) scale(.4); opacity: 1; } 70% { opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(1.1); opacity: 0; } }
.scene-wrap.legend-flash::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 60%, rgba(255, 236, 170, .55), transparent 65%); animation: legendFlash 1.4s ease forwards; pointer-events: none; }
@keyframes legendFlash { from { opacity: 0; } 25% { opacity: 1; } to { opacity: 0; } }
/* Special fur: Aurora shifts through the northern-light colours, Golden and Ember glow, Midnight and Polar get a soft halo. */
.skin-thumb { display: contents; }
[data-skin="aurora-fur"] .bjorn, [data-skin="aurora-fur"] .portrait { animation: auroraFur 6s ease-in-out infinite alternate; }
@keyframes auroraFur { from { filter: hue-rotate(0deg) drop-shadow(0 0 10px rgba(95, 224, 168, .7)); } to { filter: hue-rotate(70deg) drop-shadow(0 0 16px rgba(176, 140, 240, .8)); } }
[data-skin="golden"] .bjorn, [data-skin="golden"] .portrait { animation: goldenFur 2.6s ease-in-out infinite alternate; }
@keyframes goldenFur { from { filter: drop-shadow(0 0 6px rgba(255, 214, 102, .6)) brightness(1); } to { filter: drop-shadow(0 0 16px rgba(255, 214, 102, .95)) brightness(1.08); } }
[data-skin="ember"] .bjorn, [data-skin="ember"] .portrait { animation: emberFur 1.2s ease-in-out infinite alternate; }
@keyframes emberFur { from { filter: drop-shadow(0 0 6px rgba(255, 120, 60, .6)); } to { filter: drop-shadow(0 0 14px rgba(255, 90, 40, .9)) brightness(1.05); } }
[data-skin="midnight"] .bjorn, [data-skin="midnight"] .portrait { filter: drop-shadow(0 0 10px rgba(120, 150, 255, .55)); }
[data-skin="polar"] .bjorn, [data-skin="polar"] .portrait { filter: drop-shadow(0 0 8px rgba(190, 225, 255, .8)); }
.drift { animation: drift 60s linear infinite alternate; }
@keyframes drift { to { transform: translateX(60px); } }
.swing { transform-box: fill-box; transform-origin: 50% 0; animation: swingIt 3s ease-in-out infinite alternate; }
@keyframes swingIt { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.aurora-band { animation: aurora 9s ease-in-out infinite alternate; transform-origin: center; }
@keyframes aurora { from { transform: translateY(0) skewX(0); opacity: .9; } to { transform: translateY(12px) skewX(-6deg); opacity: .6; } }
.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker .5s ease-in-out infinite alternate; }
@keyframes flicker { from { transform: scale(1, 1); } to { transform: scale(.92, 1.1); } }
.glow { animation: glow 2.5s ease-in-out infinite alternate; }
@keyframes glow { to { opacity: .1; } }
.flag-cloth { transform-box: fill-box; transform-origin: 0 50%; animation: flutter 1.6s ease-in-out infinite alternate; }
@keyframes flutter { to { transform: skewY(4deg) scaleX(.95); } }
.link-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.link-card:hover { border-color: var(--forest-2); }
.link-card small { color: var(--forest-2); font-weight: 600; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.link-card b { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.link-card span { color: var(--ink-2); font-size: .92rem; }

.route-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.route-head p { color: var(--ink-2); margin: 0; }
.stops { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; display: grid; gap: 12px; }
.stops::before { content: ''; position: absolute; left: 22px; top: 20px; bottom: 20px; border-left: 2px dashed var(--line); }
.stop-card {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; margin-left: -22px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; transition: border-color .15s, transform .15s;
}
.stop-card:hover { border-color: var(--forest-2); }
.s-num {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 1.1rem;
  background: var(--paper-2); color: var(--ink-2); position: relative; z-index: 1;
}
.stop.done .s-num { background: var(--forest); color: #fff; }
.stop.next .s-num, .stop.started .s-num { background: var(--clay); color: #fff; }
.stop.next .stop-card { border-color: var(--clay); }
.s-main { display: flex; flex-direction: column; min-width: 0; }
.s-main b { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.s-main span { color: var(--ink-2); font-size: .92rem; }
.s-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.s-culture { font-size: .85rem; color: var(--ink-2); font-style: italic; font-family: var(--serif); }
.s-state { font-size: .78rem; font-weight: 600; color: var(--forest-2); }
.stop.next .s-state, .stop.started .s-state { color: var(--clay); }

/* ---------- the route map: an old travel map of Norway ---------- */
.route-map {
  --m-sea-a: #e4eeec; --m-sea-b: #cfdfdf; --m-wave: #9dbcbc; --m-land: #f5ebcf; --m-coast: #8c7a58; --m-neigh: #e5e3db; --m-neigh-line: #b9ae95;
  --m-ink: #5d5140; --m-soft: #8b7f69; --m-road: #b3432c; --m-mtn: #9a9a86; --m-tree: #6f8f6e; --m-frame: #cdbf9f; --m-pin: #fffaf0;
  display: grid; grid-template-columns: minmax(0, 700px) minmax(240px, 1fr); gap: 24px; align-items: start;
}
:root[data-theme="dark"] .route-map {
  --m-sea-a: #1d2c33; --m-sea-b: #16222a; --m-wave: #3c5a63; --m-land: #34372d; --m-coast: #a4936b; --m-neigh: #272a25; --m-neigh-line: #4c4a3c;
  --m-ink: #e7dcc4; --m-soft: #b5aa92; --m-road: #ef8a6d; --m-mtn: #8f8f7c; --m-tree: #85ab84; --m-frame: #4d4636; --m-pin: #2a2b25;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .route-map {
  --m-sea-a: #1d2c33; --m-sea-b: #16222a; --m-wave: #3c5a63; --m-land: #34372d; --m-coast: #a4936b; --m-neigh: #272a25; --m-neigh-line: #4c4a3c;
  --m-ink: #e7dcc4; --m-soft: #b5aa92; --m-road: #ef8a6d; --m-mtn: #8f8f7c; --m-tree: #85ab84; --m-frame: #4d4636; --m-pin: #2a2b25;
} }
.map-frame {
  position: relative; border-radius: 14px; padding: 10px; background: var(--m-land);
  border: 1px solid var(--m-frame); box-shadow: var(--shadow), inset 0 0 0 5px var(--card), inset 0 0 0 6px var(--m-frame);
}
.map-svg { display: block; width: 100%; height: auto; border-radius: 8px; font-family: var(--serif); }
.map-svg .sea-a { stop-color: var(--m-sea-a); } .map-svg .sea-b { stop-color: var(--m-sea-b); }
.m-wave { fill: none; stroke: var(--m-wave); stroke-width: 1.4; stroke-linecap: round; opacity: .8; }
.m-neighbour path { fill: var(--m-neigh); stroke: var(--m-neigh-line); stroke-width: 1; stroke-dasharray: 1 3; stroke-linecap: round; }
.m-norway path, .m-norway-s { fill: var(--m-land); stroke: var(--m-coast); stroke-width: 1.3; stroke-linejoin: round; }
.m-norway path { filter: drop-shadow(0 1.5px 0 color-mix(in srgb, var(--m-coast) 35%, transparent)); }
.m-grain { pointer-events: none; mix-blend-mode: multiply; }
.m-mtn path { fill: var(--m-mtn); opacity: .55; } .m-mtn .snow { fill: #fff; opacity: .9; }
.m-tree path { fill: var(--m-tree); opacity: .55; }
.m-arctic { stroke: var(--m-soft); stroke-width: 1.2; stroke-dasharray: 2 5; stroke-linecap: round; }
.m-note { fill: var(--m-soft); font-size: 11px; font-style: italic; }
.m-sea-name { fill: var(--m-wave); font-size: 15px; font-style: italic; letter-spacing: .12em; filter: brightness(.8); }
.m-sea-name.small { font-size: 12px; }
.m-country { fill: var(--m-soft); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; opacity: .8; }
.m-compass circle { fill: var(--m-pin); stroke: var(--m-soft); stroke-width: 1; opacity: .9; }
.m-compass .c-ns { fill: var(--m-soft); } .m-compass .c-n { fill: var(--m-road); } .m-compass .c-ew { fill: var(--m-soft); opacity: .5; }
.m-compass .c-label { fill: var(--m-road); font-size: 12px; font-weight: 700; }
.m-whale path { fill: #5b7582; } .m-whale .drop { fill: #8fb2c0; } .m-whale .m-wave { fill: none; } .m-boat .hull { fill: #2d3f4a; } .m-boat .deck { fill: #f7f1e3; stroke: #2d3f4a; stroke-width: 1; }
.m-boat .stack { fill: #c0392b; }
.m-ship path { fill: #6b5a42; } .m-ship .sail { fill: #f7f1e3; stroke: #6b5a42; stroke-width: .8; }
.m-inset rect { fill: color-mix(in srgb, var(--m-sea-b) 80%, white); stroke: var(--m-frame); stroke-width: 1.5; stroke-dasharray: 5 4; }
.m-inset-name { fill: var(--m-soft); font-size: 12px; font-style: italic; letter-spacing: .15em; }
.m-aurora { opacity: .7; }
.m-road { fill: none; stroke: var(--m-road); stroke-width: 2.2; stroke-dasharray: 1 7; stroke-linecap: round; opacity: .75; }
.m-road-done { fill: none; stroke: var(--m-road); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.m-seaway { fill: none; stroke: #4f7f93; stroke-width: 2; stroke-dasharray: 7 6; stroke-linecap: round; opacity: .7; }
.m-seaway.done { stroke: var(--m-road); opacity: .9; }
.m-leader { stroke: var(--m-soft); stroke-width: 1; } .m-dot { fill: var(--m-ink); }
.m-stop { cursor: pointer; outline: none; }
.m-hit { fill: transparent; }
.m-pin { fill: var(--m-pin); stroke: var(--m-ink); stroke-width: 1.6; transition: transform .2s ease; }
.m-num { fill: var(--m-ink); font-size: 11px; font-weight: 700; font-family: var(--sans, system-ui); }
.m-stop.done .m-pin { fill: var(--forest); stroke: var(--forest); }
.m-stop.done .m-ring { fill: none; stroke: var(--forest); stroke-width: 1; stroke-dasharray: 2 2.4; opacity: .7; }
.m-check { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.m-stop.next .m-pin, .m-stop.started .m-pin { fill: var(--clay); stroke: var(--clay); }
.m-stop.next .m-num, .m-stop.started .m-num { fill: #fff; }
.m-label { fill: var(--m-ink); font-size: 13px; font-weight: 600; paint-order: stroke; stroke: var(--m-land); stroke-width: 3.5px; stroke-linejoin: round; }
.m-stop g { transform-box: fill-box; }
.m-stop:hover .m-pin, .m-stop:focus-visible .m-pin, .m-stop.sel .m-pin { stroke: var(--m-road); stroke-width: 2.6; }
.m-stop:focus-visible .m-hit { stroke: var(--fjord); stroke-width: 2.5; }
.m-stop.sel .m-label, .m-stop:hover .m-label { fill: var(--m-road); }
.m-stop.here .m-pin { animation: pinPulse 2.4s ease-in-out infinite; }
@keyframes pinPulse { 0%, 100% { stroke-width: 1.6; } 50% { stroke-width: 5; stroke: color-mix(in srgb, var(--clay) 45%, transparent); } }
.m-bear { pointer-events: none; }
.m-bear image { filter: var(--skin, none) drop-shadow(0 2px 1.5px rgba(60, 35, 15, .3)); }
.m-bear-bob { animation: bearBob 2.6s ease-in-out infinite; }
@keyframes bearBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.m-boat-bob { animation: boatBob 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes boatBob { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-1.5px); } }
.m-aurora path { animation: aurora 7s ease-in-out infinite alternate; }
@keyframes aurora { from { opacity: .45; transform: translateX(-6px); } to { opacity: 1; transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .m-stop.here .m-pin, .m-bear-bob, .m-boat-bob, .m-aurora path { animation: none; } }
.no-motion .m-stop.here .m-pin, .no-motion .m-bear-bob, .no-motion .m-boat-bob, .no-motion .m-aurora path { animation: none; }

.map-side { position: sticky; top: 102px; display: grid; gap: 16px; }
.map-card {
  background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--m-soft); border-radius: var(--r); padding: 18px 20px;
  box-shadow: var(--shadow); position: relative;
}
.map-card.done { border-top-color: var(--forest); } .map-card.next, .map-card.started { border-top-color: var(--clay); }
.map-card small { color: var(--ink-3); font-weight: 600; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.map-card h3 { font-family: var(--serif); font-size: 1.6rem; margin: 4px 0 2px; }
.map-card p { margin: 0 0 4px; }
.mc-title { font-family: var(--serif); font-size: 1.1rem; }
.mc-topic { color: var(--ink-2); font-size: .92rem; }
.mc-culture { color: var(--ink-2); font-size: .88rem; font-style: italic; font-family: var(--serif); }
.mc-status { font-size: .82rem; font-weight: 600; color: var(--forest-2); margin: 10px 0 14px !important; }
.map-card.next .mc-status, .map-card.started .mc-status { color: var(--clay); }
.map-legend { list-style: none; margin: 0; padding: 0 4px; display: grid; gap: 7px; font-size: .85rem; color: var(--ink-2); }
.map-legend li { display: flex; align-items: center; gap: 10px; }
.lg { width: 16px; height: 16px; border-radius: 50%; flex: none; border: 1.6px solid var(--m-ink); background: var(--m-pin); }
.lg.done { background: var(--forest); border-color: var(--forest); } .lg.next { background: var(--clay); border-color: var(--clay); }
.lg.road { border: 0; border-radius: 0; height: 3px; background: var(--m-road); }
.route-list { margin-top: 22px; }
.route-list summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: 8px 0; }
.route-list[open] summary { margin-bottom: 12px; }
@media (max-width: 900px) {
  .route-map { grid-template-columns: 1fr; }
  .map-side { position: static; }
}
@media (max-width: 560px) {
  .map-frame { padding: 5px; border-radius: 10px; }
  .m-label { display: none; }
  .m-stop.sel .m-label, .m-stop.here .m-label { display: inline; font-size: 20px; stroke-width: 5px; }
  .m-pin { r: 14px; } .m-num { font-size: 14px; }
  .m-sea-name, .m-country, .m-note { opacity: .6; }
}

/* ---------- chapter ---------- */
.chapter-layout { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 40px; align-items: start; }
.chapter { max-width: 760px; min-width: 0; }
.back { display: inline-block; color: var(--ink-2); text-decoration: none; font-size: .92rem; margin-bottom: 18px; }
.back:hover { color: var(--ink); }
.ch-head h1 { margin-bottom: .3em; }
.ch-topic { color: var(--ink-2); }
.ch-topic b { color: var(--ink); font-weight: 600; }
.ch-steps {
  position: sticky; top: 73px; z-index: 5; display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 0; margin: 10px 0 18px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.ch-steps .step { border: 0; background: none; font: inherit; cursor: pointer; display: flex; align-items: center; gap: 7px; padding: 5px 12px 5px 6px; border-radius: 99px; font-size: .88rem; color: var(--ink-3); text-decoration: none; }
.ch-steps .step span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; background: var(--paper-2); }
.ch-steps .step.now { color: var(--ink); font-weight: 600; background: var(--card); border: 1px solid var(--line); }
.ch-steps .step.now span { background: var(--clay); color: #fff; }
.ch-steps .step.done { color: var(--forest); }
.ch-steps .step.done span { background: var(--forest); color: #fff; }
.ch-steps .step.later { pointer-events: none; }
/* Where you are: the current tab glows softly, its part gets a marker, and "Continue here" brings you back. */
/* The box you're working on right now (an exercise, a sentence, the word cards) glows softly. */
.working { animation: boxGlow 2.8s ease-in-out infinite; border-color: color-mix(in srgb, var(--forest-2) 70%, var(--line)) !important; }
@keyframes boxGlow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--forest-2) 0%, transparent), 0 0 8px color-mix(in srgb, var(--forest-2) 12%, transparent); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--forest-2) 20%, transparent), 0 0 24px color-mix(in srgb, var(--forest-2) 28%, transparent); } }
.p-item.working { border: 1px solid; border-radius: 14px; padding: 12px 14px; }
/* The habit plan, step by step: done boxes get a ✓, the ones still to come wait a little quieter. */
.plan-step { transition: opacity .3s ease; }
.plan-step.step-done > .kicker::before { content: '✓ '; color: var(--forest); font-weight: 800; }
.plan-step.step-later { opacity: .72; }
.plan-step.step-later:hover, .plan-step.step-later:focus-within { opacity: 1; }
.plan-go { margin-top: 16px; justify-content: flex-end; }
.plan-step.step-done .plan-go, .plan-step.step-later .plan-go { display: none; }
.today-steps .t-step.now { animation: stepGlowCard 2.8s ease-in-out infinite; }
@keyframes stepGlowCard { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--forest-2) 0%, transparent); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--forest-2) 22%, transparent), 0 0 22px color-mix(in srgb, var(--forest-2) 30%, transparent); } }
/* Without animations (Windows "animation effects" off, or Motion off in Settings): a steady glow instead. */
@media (prefers-reduced-motion: reduce) {
  .today-steps .t-step.now { animation: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest-2) 25%, transparent), 0 0 16px color-mix(in srgb, var(--forest-2) 25%, transparent); }
  .working { box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest-2) 22%, transparent), 0 0 16px color-mix(in srgb, var(--forest-2) 25%, transparent); }
}
html.no-motion .today-steps .t-step.now { animation: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest-2) 25%, transparent), 0 0 16px color-mix(in srgb, var(--forest-2) 25%, transparent); }
html.no-motion .working { animation: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest-2) 22%, transparent), 0 0 16px color-mix(in srgb, var(--forest-2) 25%, transparent); }
.ch-sec.current { position: relative; }
.ch-sec.current::before { content: ''; position: absolute; left: -14px; top: 26px; bottom: 16px; width: 3px; border-radius: 3px; background: linear-gradient(var(--clay), color-mix(in srgb, var(--clay) 10%, transparent)); }
.ch-continue { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--clay) 50%, var(--line)); background: var(--card); color: var(--ink); font: inherit; font-size: .92rem; cursor: pointer; box-shadow: 0 6px 22px rgba(0,0,0,.14); animation: contIn .3s ease; }
.ch-continue span { color: var(--clay); font-weight: 800; }
.ch-continue:hover { border-color: var(--clay); }
@keyframes contIn { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (prefers-reduced-motion: reduce) { .ch-continue { animation: none; } }
html.no-motion .ch-continue { animation: none; }
@media (max-width: 700px) { .ch-sec.current::before { left: -8px; } .ch-continue { bottom: 76px; } }
.ch-sec { padding: 26px 0 16px; border-bottom: 1px solid var(--line); animation: fadeUp .4s ease; }
.ch-sec:last-child { border-bottom: 0; }
.ch-sec > h2 { display: flex; align-items: center; gap: 12px; font-size: 1.7rem; }
.ch-sec > h2 .num { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--forest); color: var(--forest); display: grid; place-items: center; font-size: 1rem; font-family: var(--sans); font-weight: 600; flex: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.ch-side { position: sticky; top: 142px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ch-side .bubble { order: -1; border-radius: 16px 16px 4px 16px; align-self: stretch; max-width: none; }

/* word cards */
.word-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 18px 0 22px; }
.word-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; transition: border-color .15s; }
.word-card:hover { border-color: var(--forest-2); }
.wc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wc-top b { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--forest); }
.wc-top.big h2 { color: var(--forest); margin: 0; font-size: 2rem; }
.wc-top.big { justify-content: flex-start; }
.wc-pron { font-size: .82rem; color: var(--ink-3); letter-spacing: .03em; margin: 2px 0 6px; }
.wc-pron span { letter-spacing: 0; }
.wc-en { font-weight: 600; margin-bottom: 8px; }
.wc-en small { color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.wc-ex { margin: 0; font-size: .95rem; }
.wc-ex-en { margin: 0; font-size: .85rem; color: var(--ink-2); }

/* tappable words */
.tok { cursor: help; border-radius: 3px; transition: background .12s, box-shadow .12s; }
.tok:hover, .tok.tok-on { background: var(--fjord-soft); box-shadow: 0 0 0 2px var(--fjord-soft); }
.tok.auto { cursor: help; }
.tok.hl { background: var(--hl); padding: 0 2px; font-weight: 600; }
/* the word pop-up: a small dictionary entry */
.gloss-pop {
  position: absolute; z-index: 80; width: min(300px, calc(100vw - 16px)); background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 40px rgba(20, 30, 25, .18); padding: 12px 16px 12px; font-size: .92rem; line-height: 1.45;
}
.gloss-pop.in { animation: popIn .16s ease-out; }
@keyframes popIn { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.gloss-pop.above.in { animation-name: popInUp; }
@keyframes popInUp { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .gloss-pop.in, .gloss-pop.above.in { animation: none; } }
.gp-head { display: flex; align-items: center; gap: 8px; }
.gp-head b { font-family: var(--serif); font-size: 1.2rem; color: var(--forest); }
.gp-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 6px; font-size: .8rem; color: var(--ink-3); }
.gp-pron { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; background: var(--paper-2); border-radius: 6px; padding: 0 6px; color: var(--ink-2); }
.gp-form { margin: 0 0 6px; padding: 6px 10px; background: var(--fjord-soft); border-radius: 8px; font-size: .86rem; }
.gp-form b { font-family: inherit; font-size: inherit; color: var(--ink); }
.gp-mean { margin: 0 0 6px; padding-left: 1.2em; }
.gp-mean li { margin: 1px 0; }
.gp-mean.muted { padding: 0; }
.gloss-pop .conj { margin: 4px 0 8px; }
.gp-ex { display: flex; flex-direction: column; margin: 0 0 6px; padding-left: 10px; border-left: 3px solid var(--line); font-size: .86rem; }
.gp-ex span[lang] { font-style: italic; }
.gloss-pop .gp-more { padding: 0; font-size: .84rem; }

/* "Why is it like this?" — the explanation of a sentence */
.why-btn {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 10px 3px 7px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--card); color: var(--fjord); font-size: .82rem; font-weight: 600; transition: background .15s, border-color .15s;
}
.why-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.why-btn:hover { background: var(--fjord-soft); border-color: var(--fjord); }
.why-btn[aria-expanded="true"] { background: var(--fjord-soft); border-color: var(--fjord); }
.ex-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ex-tools .why-btn { margin-top: 0; }
.why-box {
  margin: 8px 0 4px; padding: 12px 14px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px;
  font-size: .92rem; color: var(--ink); animation: fadeUp .25s ease; max-width: 70ch;
}
.why-en { margin: 0 0 8px; font-style: italic; }
.why-en .muted { font-style: normal; margin-right: 6px; text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
.why-h { margin: 10px 0 6px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); }
.why-h:first-child { margin-top: 0; }
.wb-row { display: flex; flex-wrap: wrap; gap: 6px; }
.wb { display: flex; flex-direction: column; align-items: flex-start; min-width: 56px; padding: 6px 9px 7px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.wb-no { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--forest); }
.wb-en { font-size: .8rem; color: var(--ink-2); }
.wb-tag { margin-top: 3px; font-size: .7rem; color: var(--fjord); background: var(--fjord-soft); border-radius: 6px; padding: 1px 6px; max-width: 22ch; }
.why-box ul.why-list { margin: 0; padding: 0 0 0 1.15em; display: grid; gap: 6px; background: none; border: 0; border-radius: 0; list-style: disc; }
.why-box .why-list li { display: list-item; padding: 0; border: 0; line-height: 1.5; }
.why-list li b { color: var(--forest); }
.why-own { list-style: none; margin-left: -1.15em; padding: 6px 10px; background: var(--hl); border-radius: 8px; }
.why-foot { margin: 10px 0 0; }
.wc-ex + .wc-ex-en + .why-btn, .d-ex-en + .why-btn { margin-top: 4px; }
.word-card .why-box { font-size: .86rem; }

/* grammar */
.g-group { animation: fadeUp .4s ease; }
.g-explain { margin: 22px 0 14px; }
.g-explain p { font-size: 1.05rem; max-width: 66ch; }
.examples { margin: 14px 0 20px; }
.ex-label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); margin-bottom: 8px; }
.ex-label span { text-transform: none; letter-spacing: 0; font-weight: 400; }
.examples ul { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.examples li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; }
.examples li + li { border-top: 1px solid var(--line); }
.examples.plain { list-style: none; padding: 0; }
.examples.plain li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.ex-no { font-size: 1.12rem; margin: 3px 0 0; font-weight: 500; }
.reveal { background: none; border: 0; padding: 0; font-size: .82rem; color: var(--fjord); text-decoration: underline; text-underline-offset: 3px; }
.ex-en { margin: 2px 0 0; color: var(--ink-2); font-size: .95rem; }
.g-table-wrap { margin: 16px 0 20px; }
.scroll-x { overflow-x: auto; }
.g-table { border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; min-width: 60%; }
.g-table th, .g-table td { padding: 8px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.g-table th { font-size: .82rem; color: var(--ink-2); font-weight: 600; background: var(--paper-2); }
.g-table td[lang], .g-table td > [lang] { font-weight: 600; color: var(--forest); }
/* Word pictures (courses/no/pics): big on the word card, smaller in questions and lists. */
.pic { display: block; object-fit: cover; border-radius: 16px; background: var(--paper-2); }
.pic-card { width: 160px; height: 160px; margin: 4px 0 10px; animation: picPop .35s cubic-bezier(.3,1.5,.5,1); }
.pic-sheet { width: 140px; height: 140px; margin: 4px 0 8px; }
.pic-q { width: 120px; height: 120px; margin: 0 auto 8px; }
.pic-mini { display: inline-block; width: 28px; height: 28px; border-radius: 6px; margin-right: 6px; vertical-align: middle; }
.pic-wc { display: inline-block; width: 30px; height: 30px; border-radius: 7px; margin-right: 6px; vertical-align: middle; }
@keyframes picPop { from { transform: scale(.6); opacity: 0; } }
.ln-say { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 10px 0; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c-vocab) 10%, var(--card)); border: 1px dashed color-mix(in srgb, var(--c-vocab) 40%, var(--line)); font-size: .9rem; color: var(--ink-2); }
.ln-say b { color: var(--ink); }
.ln-say.done { border-style: solid; border-color: color-mix(in srgb, var(--forest-2) 45%, var(--line)); background: color-mix(in srgb, var(--forest-2) 10%, var(--card)); }
.ln-say .said { color: var(--forest); opacity: 1; }
.own { margin-top: 22px; padding: 16px 18px; border-radius: var(--r); border: 1px dashed color-mix(in srgb, var(--c-grammar) 45%, var(--line)); background: color-mix(in srgb, var(--c-grammar) 6%, var(--card)); }
.own h3 { margin: 2px 0 4px; font-size: 1.05rem; }
.own .chips { margin: 8px 0; }
.own.done { border-style: solid; }
.rv-gram { margin: 18px 0; }
.rv-gram.due { border-color: color-mix(in srgb, var(--c-grammar) 45%, var(--line)); }
.rv-gram-top { display: flex; gap: 14px; align-items: flex-start; }
.rv-gram-top h3 { margin: 0 0 2px; }
.rv-gram-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c-grammar) 14%, var(--card)); color: var(--c-grammar); }
.rv-gram-ico svg { width: 22px; height: 22px; }
.gram-host:not(:empty) { margin-top: 14px; }
.rv-mine { margin-top: 18px; }
.rv-mine ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.rv-mine li { padding: 8px 10px; border-radius: 10px; background: var(--paper-2); }
/* Linguark: the ark on Home, with Captain Bjørn and his crew. */
.brand-name em { font-style: normal; color: var(--forest-2); }
.ark { margin: 34px 0 10px; padding: 22px 22px 18px; border-radius: var(--r); border: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, #8fc3d4 18%, var(--card)), var(--card) 70%); overflow: hidden; }
.ark-head h2 { margin: 2px 0 6px; }
.ark-head .muted { max-width: 62ch; margin: 0; }
.ark-svg { display: block; width: 100%; max-width: 760px; height: auto; margin: 10px auto 4px; }
.ark-boat { animation: arkRock 6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 90%; }
@keyframes arkRock { from { transform: rotate(-1.2deg) translateY(0); } to { transform: rotate(1.2deg) translateY(3px); } }
.ark-wave { animation: arkWave 5s ease-in-out infinite alternate; }
.ark-wave.two { animation-duration: 3.6s; animation-direction: alternate-reverse; }
@keyframes arkWave { to { transform: translateX(-26px); } }
.crew { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.crew-card { display: grid; grid-template-columns: 52px 1fr; gap: 4px 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); position: relative; }
.crew-card.live { border-color: color-mix(in srgb, var(--forest-2) 60%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest-2) 14%, transparent); }
.crew-card.soon { opacity: .82; }
.crew-face { width: 52px; height: 52px; grid-row: span 2; display: grid; place-items: center; border-radius: 50%; background: var(--paper-2); overflow: hidden; }
.crew-face svg { width: 48px; height: 48px; }
.crew-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.crew-text b { font-family: var(--serif); font-size: 1.05rem; }
.crew-text small { color: var(--ink-2); text-transform: capitalize; font-size: .78rem; }
.crew-text span { font-size: .85rem; color: var(--ink-2); }
.crew-tag { grid-column: 2; justify-self: start; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); }
.crew-tag.on { background: color-mix(in srgb, var(--forest-2) 18%, var(--card)); color: var(--forest); }
@media (prefers-reduced-motion: reduce) { .ark-boat, .ark-wave { animation: none; } }
html.no-motion .ark-boat, html.no-motion .ark-wave { animation: none; }
/* The landing page (#welcome). */
.landing { max-width: 1040px; margin: 0 auto; }
.landing > section { margin: 0 0 34px; }
.ld-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: center; padding: 26px 0 6px; }
.ld-hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.08; margin: 6px 0 12px; }
.ld-hero .lead { max-width: 46ch; }
.ld-hero .row-btns { margin-top: 18px; }
.ld-ark .ark-svg { margin: 0; }
.ld-promise { display: flex; gap: 18px; align-items: center; padding: 20px 24px; border-radius: var(--r); background: color-mix(in srgb, var(--forest-2) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--forest-2) 40%, var(--line)); }
.ld-promise h2 { margin: 0 0 4px; font-size: 1.35rem; }
.ld-promise p { margin: 0; color: var(--ink-2); }
.ld-heart { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: var(--forest-2); box-shadow: 0 0 0 6px color-mix(in srgb, var(--forest-2) 18%, transparent); }
.ld-h { margin: 0 0 12px; }
.ld-langs { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ld-langs .crew-text small { text-transform: none; }
.ld-langs .crew-go { grid-column: 2; justify-self: start; }
.ld-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.ld-step { padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.ld-step b { display: block; margin: 8px 0 4px; font-family: var(--serif); font-size: 1.05rem; }
.ld-step p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.ld-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--paper-2); color: var(--forest); }
.ld-icon svg { width: 22px; height: 22px; }
.ld-icon svg:not(.jar) { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ld-account { padding: 20px 24px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.ld-account h2 { margin: 0 0 6px; }
.ld-account p { color: var(--ink-2); max-width: 70ch; }
.ld-foot { text-align: center; color: var(--ink-2); font-size: .88rem; padding-bottom: 20px; }
@media (max-width: 800px) { .ld-hero { grid-template-columns: 1fr; } .ld-ark { order: -1; } .ld-promise { flex-direction: column; align-items: flex-start; } }
/* Account and privacy. */
.acc-card { max-width: 620px; }
.acc-who { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.acc-who b { display: block; font-size: 1.1rem; }
.acc-who small { display: block; color: var(--ink-2); }
.acc-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--forest-2); color: #fff; font-weight: 800; font-size: 1.3rem; flex: none; }
.acc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acc-status { display: block; font-size: .86rem; margin-top: 2px; color: var(--ink-2); }
.acc-status.synced { color: var(--forest); }
.acc-status.error { color: var(--berry); }
.acc-google { display: inline-flex; align-items: center; gap: 10px; }
.acc-google svg { width: 22px; height: 22px; background: #fff; border-radius: 50%; padding: 2px; }
.acc-or { display: flex; align-items: center; gap: 10px; color: var(--ink-2); margin: 16px 0; }
.acc-or::before, .acc-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.acc-email label { display: block; font-weight: 600; margin-bottom: 6px; }
.acc-row { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-row input { flex: 1; min-width: 200px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; }
.acc-msg { min-height: 1.4em; margin: 12px 0 0; }
.acc-danger { margin-top: 16px; }
.acc-danger summary { cursor: pointer; color: var(--berry); font-weight: 600; }
.btn.danger { background: var(--berry); color: #fff; border-color: var(--berry); }
.acc-foot { margin-top: 14px; }
.privacy .card { max-width: 760px; margin-bottom: 14px; }
.privacy .card h2 { margin-top: 0; font-size: 1.2rem; }
.privacy li + li { margin-top: 6px; }
.p-tip { margin: 4px 0 10px; font-size: .92rem; }
.p-tip summary { cursor: pointer; color: var(--ink-2); font-weight: 600; width: fit-content; }
.p-tip summary:hover { color: var(--forest); }
.p-tip ul { margin: 8px 0 0; padding: 10px 14px 10px 30px; background: var(--fjord-soft); border-radius: 10px; }
.p-tip li + li { margin-top: 6px; }
.g-table .g-en { display: block; font-size: .8rem; color: var(--ink-2); font-weight: 400; margin-top: 2px; }
.g-table tr:last-child td { border-bottom: 0; }
.g-table.forms th { background: none; width: 110px; }
.g-note { background: var(--clay-soft); border-left: 3px solid var(--clay); border-radius: 4px var(--r) var(--r) 4px; padding: 16px 20px; margin: 20px 0; }
.g-note .tag { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--clay); }
.g-note h4 { margin: 4px 0 6px; }
.g-note p { margin: 0; }

/* exercises */
.exercise { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--forest-2); border-radius: var(--r); padding: 18px 22px; margin: 20px 0 26px; }
.ex-title { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; margin-bottom: 12px; }
.ex-item { padding: 12px 0; }
.ex-item + .ex-item { border-top: 1px dashed var(--line); }
.ex-sent { font-size: 1.2rem; margin: 0; line-height: 2; }
.ex-meta { margin: 0; color: var(--ink-2); font-size: .92rem; }
.hint { color: var(--ink-3); font-style: italic; }
.ex-from { font-size: 1.1rem; margin: 0 0 6px; color: var(--ink-2); }
.ex-from::before { content: '→ '; color: var(--ink-3); }
.filled, .solved-line { color: var(--forest); font-weight: 600; }
.ex-fb { font-size: .95rem; margin-top: 6px; }
.ex-fb:empty { display: none; }
.ex-fb.ok { color: var(--forest); }
.ex-fb.bad { color: var(--ink); background: var(--berry-soft); border-radius: 10px; padding: 10px 12px; }
.ex-fb.info { background: var(--fjord-soft); border-radius: 10px; padding: 10px 12px; }
.why { color: var(--ink-2); }
.ex-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

/* answer fields */
.field { display: inline-flex; align-items: center; gap: 4px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: 3px 4px 3px 12px; vertical-align: middle; transition: border-color .15s; }
.field:focus-within { border-color: var(--fjord); background: var(--card); }
.field input { border: 0; background: transparent; font: inherit; color: var(--ink); outline: none; padding: 6px 0; min-width: 0; }
.field.inline { margin: 0 4px; }
.field.inline input { width: 8ch; font-size: 1.1rem; font-weight: 600; color: var(--forest); }
.field.full, .field.big { display: flex; width: 100%; margin-top: 4px; }
.field.full input, .field.big input { flex: 1; font-size: 1.1rem; }
.field.big input { font-size: 1.3rem; padding: 10px 0; }
.letters { display: inline-flex; gap: 2px; }
.letter { border: 0; background: var(--paper-2); border-radius: 6px; width: 28px; height: 28px; font-size: .95rem; padding: 0; color: var(--ink-2); }
.letter:hover { background: var(--line); color: var(--ink); }
.field:has(input.right) { border-color: var(--forest-2); background: var(--forest-soft); }
.field:has(input[readonly]) .letters { display: none; }
input.wrong, input.shake { animation: shake .35s; }
.field:has(input.wrong) { border-color: var(--berry); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.diff { font-size: 1.08rem; }
.d-ok { color: var(--forest); font-weight: 600; }
.d-miss { color: var(--berry); font-weight: 600; text-decoration: underline wavy; text-underline-offset: 4px; }
.d-extra-line { display: block; font-size: .88rem; color: var(--ink-2); margin-top: 2px; }

/* drill */
.drill-host { margin: 10px 0 6px; }
.drill { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--clay); border-radius: var(--r); padding: 20px 24px; max-width: 640px; }
.drill-top { display: flex; align-items: center; gap: 14px; font-size: .82rem; color: var(--ink-3); margin-bottom: 14px; }
.bar { flex: 1; height: 4px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--clay); transition: width .3s; }
.d-label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 4px; }
.d-prompt { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.d-prompt.nb { font-size: 1.35rem; }
.d-sub { color: var(--ink-2); margin-top: -2px; }
.d-fb { margin-top: 12px; }
.d-fb:empty { display: none; }
.d-fb.ok { background: var(--forest-soft); border-radius: 10px; padding: 12px 14px; }
.d-fb.bad { background: var(--berry-soft); border-radius: 10px; padding: 12px 14px; }
.d-say { margin: 0 0 4px; }
.d-say b[lang] { font-family: var(--serif); }
.d-say span { color: var(--ink-2); }
.big-answer { font-size: 1.3rem; color: var(--forest); }
.d-word { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.d-word b { font-family: var(--serif); font-size: 1.15rem; color: var(--forest); }
.d-word span { color: var(--ink-2); }
.d-ex { margin: 6px 0 0; }
.d-ex-en { margin: 0; color: var(--ink-2); font-size: .9rem; }
.d-actions { display: flex; gap: 16px; align-items: center; margin-top: 14px; }
.note { font-size: .9rem; color: var(--ink-2); margin: 4px 0; }

/* your sentences */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 16px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 2px 11px; font-size: .9rem; }
.produce { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.p-item { counter-increment: p; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px 16px 56px; margin-bottom: 12px; position: relative; animation: fadeUp .35s ease; }
.p-item::before { content: counter(p); position: absolute; left: 18px; top: 16px; width: 26px; height: 26px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.p-item.solved::before { content: '✓'; background: var(--forest); color: #fff; }
.p-en { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; margin-bottom: 6px; }
.p-no { margin: 0; color: var(--forest); font-size: 1.1rem; font-weight: 500; }
.p-mine { margin: 0 0 2px; font-size: 1.05rem; }
.store-warn { position: sticky; top: 0; z-index: 70; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 20px; background: var(--berry-soft); color: var(--ink); border-bottom: 1px solid var(--berry); font-size: .92rem; }
.p-hint { margin-top: 6px; }

/* culture & postcard */
.culture { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 26px; margin: 16px 0 24px; }
.culture p { font-size: 1.04rem; max-width: 66ch; }
.phrases { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.phrases li { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: center; }
.phrases li > span[lang] { font-weight: 600; color: var(--forest); }
.phrases .muted { font-size: .92rem; }
.postcard { margin: 0 0 22px; display: grid; grid-template-columns: 1fr 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 30px rgba(31,40,38,.12); overflow: hidden; max-width: 680px; transform: rotate(-.6deg); transition: filter .6s, transform .6s; }
.postcard.sealed { filter: grayscale(.9) blur(1px) opacity(.6); transform: rotate(0); }
.pc-front { position: relative; min-height: 220px; padding: 26px; color: #fff; background: linear-gradient(170deg, #27496b 0%, #3b6f8f 45%, #6f9c8d 100%); overflow: hidden; }
.pc-mountains { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 45%; fill: rgba(255,255,255,.18); }
.pc-greet { font-family: var(--serif); font-style: italic; margin: 0; opacity: .9; }
.pc-place { font-family: var(--serif); font-size: 2.3rem; font-weight: 700; line-height: 1.05; margin: 2px 0 0; position: relative; }
.pc-stamp { position: absolute; top: 16px; right: 16px; width: 54px; height: 64px; background: #fdf8ee; border-radius: 3px; display: grid; place-items: center; align-content: center; gap: 4px; outline: 2px dashed #fdf8ee; outline-offset: 3px; }
.pc-stamp small { color: #7a4a2a; font-weight: 700; font-size: .7rem; }
.pc-back { padding: 22px 24px; border-left: 1px dashed var(--line); font-size: .95rem; }
.pc-no { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--forest); margin: 0 0 2px; }
.pc-fact { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.finish { margin-bottom: 20px; }

/* ---------- other pages ---------- */
.page-head { margin-bottom: 24px; }
.page-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.review-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.review-stats > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 20px; min-width: 150px; display: flex; flex-direction: column; }
.review-stats b { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.review-stats b small { font-size: 1rem; color: var(--ink-3); }
.review-stats span { color: var(--ink-2); font-size: .88rem; }
.review-box { margin-bottom: 20px; }
input[type="search"] { font: inherit; padding: 11px 16px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); width: min(100%, 340px); }
input[type="search"]:focus { outline: none; border-color: var(--fjord); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 15px; font-weight: 500; font-size: .92rem; color: var(--ink-2); }
.filter.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.word-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.word-row { width: 100%; display: grid; grid-template-columns: minmax(130px, 1fr) 2fr auto; gap: 16px; align-items: center; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 11px 18px; }
.word-list li:last-child .word-row { border-bottom: 0; }
.word-row:hover { background: var(--paper); }
.wr-no { font-family: var(--serif); font-weight: 600; color: var(--forest); font-size: 1.05rem; }
.wr-en { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lvl { font-size: .78rem; font-weight: 600; border-radius: 99px; padding: 1px 9px; }
.lvl.learning { background: var(--clay-soft); color: var(--clay); }
.lvl.solid { background: var(--forest-soft); color: var(--forest); }
.empty { padding: 26px; text-align: center; color: var(--ink-2); }
.more-wrap { text-align: center; margin-top: 16px; }

.notes-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
.notes-toc { position: sticky; top: 102px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 110px); overflow: auto; }
.notes-toc a { display: flex; gap: 10px; padding: 5px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .9rem; }
.notes-toc a:hover { background: var(--paper-2); color: var(--ink); }
.notes-toc a span { color: var(--ink-3); min-width: 18px; }
.notes { min-width: 0; }
.note-ch { padding-bottom: 30px; margin-bottom: 30px; border-bottom: 1px solid var(--line); max-width: 760px; }

.progress-top { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 8px; }
main > section.card { margin-bottom: 18px; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.heat i { width: 13px; height: 13px; border-radius: 3px; }
.h0 { background: var(--paper-2); } .h1 { background: #c9dfd2; } .h2 { background: #7fb398; } .h3 { background: var(--forest); } .heat .f { background: transparent; }
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pc-mini { aspect-ratio: 3 / 2; border-radius: 4px; border: 0; padding: 0; overflow: hidden; }
.pc-mini-front { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; padding: 10px; color: #fff; text-align: left; font-family: var(--serif); font-weight: 700; font-size: 1.05rem; background: linear-gradient(170deg, #27496b, #3b6f8f 50%, #6f9c8d); }
.pc-mini-front small { font-weight: 400; font-style: italic; font-size: .75rem; opacity: .9; }
.pc-mini.empty { border: 1.5px dashed var(--line); display: grid; place-items: center; color: var(--ink-3); font-family: var(--serif); }
.settings h3 { margin-top: 18px; }
.switch { display: flex; align-items: center; gap: 12px; margin: 12px 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 42px; height: 24px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: .2s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 2px #0003; }
.switch input:checked + span { background: var(--forest-2); }
.switch input:checked + span::after { left: 21px; }
.switch input:focus-visible + span { outline: 2px solid var(--fjord); outline-offset: 2px; }

/* sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(20, 26, 24, .45); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .2s; }
.sheet-wrap.open { opacity: 1; }
.sheet { background: var(--card); border-radius: 18px; width: min(600px, 100%); max-height: min(88vh, 780px); overflow: auto; padding: 28px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.sheet.pc-sheet { width: min(720px, 100%); background: transparent; box-shadow: none; padding: 40px 0 0; }
.sheet.pc-sheet .postcard { margin: 0 auto; }
.sheet-x { position: absolute; top: 12px; right: 12px; border: 0; background: var(--paper-2); width: 36px; height: 36px; border-radius: 50%; z-index: 2; }
.meaning { font-weight: 600; font-size: 1.05rem; }
.status-line { display: inline-block; font-size: .85rem; color: var(--ink-2); background: var(--paper-2); border-radius: 8px; padding: 3px 10px; }
.sense { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.sense h4 { font-family: var(--sans); font-size: .9rem; color: var(--ink-2); margin-bottom: 4px; }
.sense p { margin: 0; }
.sense p[lang] { font-weight: 500; }
.dict { margin-top: 14px; }
.langs { list-style: none; padding: 0; display: grid; gap: 8px; }
.langs li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; opacity: .6; }
.langs li.on { opacity: 1; border-color: var(--forest-2); }
.langs span { color: var(--ink-2); font-size: .9rem; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 10px; font-weight: 500; }

/* ---------- small screens ---------- */
@media (max-width: 1280px) {
  /* (the whole name stays visible: Lingu + ark) */
  .lang-chip span:last-child { display: none; }
  .topbar { gap: 12px; }
}
@media (max-width: 1100px) {
  .tabs a { padding: 7px 9px; gap: 5px; }
  .side-cards { grid-template-columns: repeat(2, 1fr); }
  .cabin { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  /* (the whole name stays visible: Lingu + ark) */
  .chapter-layout { grid-template-columns: 1fr; }
  .ch-side { position: fixed; right: 10px; bottom: 76px; z-index: 20; flex-direction: row; align-items: flex-end; pointer-events: none; }
  .ch-side .bubble { order: 0; max-width: 200px; font-size: .9rem; pointer-events: auto; }
  .ch-side .bjorn.side { width: 74px; order: 1; pointer-events: auto; }
  .notes-layout { grid-template-columns: minmax(0, 1fr); }
  .notes-toc { display: none; }
}
/* Six tabs don't fit next to the logo below ~960px: move them to a bottom bar. */
@media (max-width: 960px) {
  .topbar { gap: 10px; padding: 8px 14px; }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; margin: 0; justify-content: space-around; z-index: 40;
    background: var(--card); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .tabs a { flex-direction: column; gap: 1px; font-size: .68rem; padding: 5px 2px; flex: 1; min-width: 0; max-width: 130px; }
  .tabs a span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabs a { background: transparent; border-color: transparent; }
  .tabs a:hover { transform: none; }
  .tabs a.active { box-shadow: none; }
  .topbar { padding-top: 8px; }
  .tabs .peek { bottom: calc(100% - 1px); }
  .tabs .badge { position: absolute; top: 0; right: 18%; }
  .top-right { margin-left: auto; }
  main { padding-bottom: 130px; }
  .dock { bottom: 74px; right: 10px; }
  .ch-steps { top: 53px; }
  .toast { bottom: 84px; }
}
@media (max-width: 760px) {
  .tabs a { font-size: .62rem; }
  .lang-chip span:last-child { display: none; }
  .bjorn.dock-bear { width: 52px; }
  .g-lesson { grid-template-columns: 40px 1fr; }
  .g-actions { grid-column: 2; }
  .scene-wrap { aspect-ratio: 4 / 3; }
  .scene-bear { width: 30%; }
  .cabin .scene-bubble { font-size: .85rem; }
  .try-bar { white-space: normal; width: 100%; }
  main { padding: 22px 16px 120px; }
  .welcome { grid-template-columns: 1fr; gap: 10px; }
  .welcome-bear { flex-direction: row; align-items: flex-end; justify-content: center; }
  .welcome-bear .bjorn.hero { width: 120px; }
  .welcome-bear .bubble { align-self: center; }
  .continue { grid-template-columns: auto 1fr; }
  .c-go { grid-column: 1 / -1; justify-self: end; }
  .side-cards { grid-template-columns: 1fr; }
  .stop-card { grid-template-columns: 40px 1fr; }
  .s-side { grid-column: 2; align-items: flex-start; text-align: left; }
  .s-num { width: 40px; height: 40px; }
  .stops::before { left: 20px; }
  .ch-steps { top: 53px; font-size: .8rem; }
  .ch-steps .step { padding: 4px 8px 4px 4px; }
  .ch-steps .step:not(.now) { font-size: 0; gap: 0; padding: 4px; }
  .ch-side { bottom: 70px; }
  .ch-side .bubble { display: none; }
  .postcard { grid-template-columns: 1fr; transform: none; }
  .pc-back { border-left: 0; border-top: 1px dashed var(--line); }
  .word-row { grid-template-columns: 1fr auto; }
  .wr-en { grid-column: 1; grid-row: 2; font-size: .9rem; }
  .lvl { grid-row: 1 / 3; grid-column: 2; }
  .field.inline input { width: 6ch; }
  .drill { padding: 16px; }
  .p-item { padding: 14px 14px 14px 48px; }
  .p-item::before { left: 12px; }
  .toast { bottom: 84px; }
}
/* ---------- vocabulary path ---------- */
:root { --dot-core: #3e7d62; --dot-peek: #d9a521; --dot-challenge: #c4483f; --t1: #3e7d62; --t2: #2d6f9e; --t3: #c0782f; --t4: #7a55b0; --t5: #3f8f8a; --t6: #2d4f86; --t7: #a3486a; --t8: #b8902a; --t9: #4a7fa8; --t10: #8a5a2b; }
.vocab-next { margin: 4px 0 22px; }

.medals { display: flex; align-items: center; gap: 6px; margin: 0 0 16px; flex-wrap: wrap; }
.medal-line { flex: 0 1 40px; height: 2px; background: var(--line); }
.medal-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--ink-3); font-size: .78rem; min-width: 74px; }
.medal-wrap.won { color: var(--ink); font-weight: 600; }
.medals.big { gap: 18px; }
.medals.big .medal { width: 56px; height: 56px; }
.medal { width: 40px; height: 40px; display: inline-block; flex: none; }
.medal svg { width: 100%; height: 100%; display: block; }
.medal circle { fill: var(--paper-2); stroke: var(--line); stroke-width: 2; }
.medal path { fill: var(--line); }
.medal.on circle { fill: var(--tc); stroke: color-mix(in srgb, var(--tc) 70%, black); }
.medal.on path { fill: #fff6d8; }
.t1 { --tc: var(--t1); } .t2 { --tc: var(--t2); } .t3 { --tc: var(--t3); } .t4 { --tc: var(--t4); } .t5 { --tc: var(--t5); } .t6 { --tc: var(--t6); } .t7 { --tc: var(--t7); } .t8 { --tc: var(--t8); } .t9 { --tc: var(--t9); } .t10 { --tc: var(--t10); }

.path { display: grid; gap: 12px; margin-bottom: 40px; }
.tier { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 0 20px; border-left: 5px solid color-mix(in srgb, var(--tc) 45%, var(--line)); }
.tier.current { border-left-color: var(--tc); box-shadow: var(--shadow); }
.tier.complete { border-left-color: var(--tc); background: linear-gradient(160deg, var(--card), color-mix(in srgb, var(--tc) 9%, var(--card))); }
.tier > summary { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 16px 0; cursor: pointer; list-style: none; }
.tier > summary::-webkit-details-marker { display: none; }
.tier > summary::after { content: '▾'; grid-column: 4; color: var(--ink-3); transition: transform .2s; }
.tier[open] > summary::after { transform: rotate(180deg); }
.tier-name { display: flex; flex-direction: column; line-height: 1.25; }
.tier-name small { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--tc); font-weight: 700; }
.tier-name b { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.tier-name span { color: var(--ink-2); font-size: .9rem; }
.tier-count { text-align: right; font-size: .9rem; color: var(--ink-2); display: flex; flex-direction: column; }
.tier-count b { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); }
.tier-count small { color: var(--ink-3); }
.tier.complete .medal { width: 52px; height: 52px; }
.ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--tc) calc(var(--p) * 360deg), var(--paper-2) 0); }
.ring > span { width: 40px; height: 40px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: .74rem; font-weight: 700; color: var(--ink-2); }
.tier-blurb { color: var(--ink-2); max-width: 70ch; margin: -4px 0 14px; }
.block { margin-bottom: 18px; }
.block-head { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
.block-head span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.path-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.path-tile { display: flex; flex-direction: column; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; text-decoration: none; color: var(--ink); min-width: 0; transition: border-color .15s, transform .15s; }
.path-tile:hover { border-color: var(--tc); transform: translateY(-1px); }
.path-tile.done { background: color-mix(in srgb, var(--tc) 8%, var(--card)); border-color: color-mix(in srgb, var(--tc) 30%, var(--line)); }
.path-tile.next { border: 2px solid var(--tc); background: var(--card); box-shadow: var(--shadow); padding: 10px 11px; }
.pt-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pt-top b { font-family: var(--serif); font-weight: 600; font-size: 1rem; white-space: nowrap; }
.pt-next { font-size: .7rem; font-weight: 700; color: #fff; background: var(--tc); border-radius: 99px; padding: 1px 8px; }
.pt-words { font-size: .84rem; color: var(--ink-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.path-tile.check { border-style: dashed; background: transparent; }
.path-tile.check.next { border-style: solid; border-color: var(--dot-peek); background: color-mix(in srgb, var(--dot-peek) 10%, var(--card)); }
.path-tile.check.done { border-style: solid; }
.pt-bolt { font-size: 1rem; }

.drill .bar:has(.notch) { position: relative; overflow: visible; }
.drill .bar:has(.notch) i { border-radius: 99px; }
.notch { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); transition: background .3s, border-color .3s, transform .3s; }
.notch.on { background: var(--dot-peek); border-color: #b9870d; transform: scale(1.15); }
.d-cheer { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; background: color-mix(in srgb, var(--dot-peek) 14%, var(--card)); border-radius: 10px; padding: 6px 12px; margin: -6px 0 12px; font-size: .92rem; animation: popIn .35s; }
.d-cheer b { font-family: var(--serif); color: var(--forest); }
.d-cheer span { color: var(--ink-2); }

.tier-won { text-align: center; padding: 10px 6px 0; }
.tier-won .medal { width: 96px; height: 96px; margin-bottom: 8px; animation: medalIn .8s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes medalIn { from { transform: scale(.2) rotate(-40deg); opacity: 0; } }
.tier-won .row-btns { justify-content: center; }

.blitz-cards { margin-bottom: 30px; }
.bc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bc-card { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.bc-card:hover { border-color: var(--dot-peek); }
.bc-card small { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: #a77a0c; }
.bc-card b { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.bc-card span { color: var(--ink-2); font-size: .88rem; }
.bc-card.locked { opacity: .75; }
.bc-card.locked small { color: var(--ink-3); }
.by-type { margin-bottom: 10px; }
.by-type > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.by-type > summary::-webkit-details-marker { display: none; }
.by-type > summary h2 { margin: 0; }
.by-type > summary::before { content: '▸'; color: var(--ink-3); transition: transform .2s; }
.by-type[open] > summary::before { transform: rotate(90deg); }

/* ---------- blitz ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.blitz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: start; }
.blitz { position: relative; }
.bz-top { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; font-size: .88rem; color: var(--ink-2); margin-bottom: 12px; }
.bz-score { font-weight: 700; color: var(--ink); margin-left: auto; }
.bz-clock { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; }
.bz-clock i { --p: 1; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--dot-peek) calc(var(--p) * 360deg), var(--paper-2) 0); transition: --p 1s linear; }
.bz-clock i::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--card); }
.bz-clock b { position: relative; font-family: var(--serif); font-size: 1.05rem; }
.bz-clock.hurry i { background: conic-gradient(var(--dot-challenge) calc(var(--p) * 360deg), var(--paper-2) 0); }
.bz-clock.hurry b { color: var(--dot-challenge); }
.bz-prompt { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 6px 0 0; line-height: 1.2; }
.bz-gap { display: inline-block; min-width: 3ch; border-bottom: 3px solid var(--dot-peek); color: var(--forest); }
.bz-gap.pop { animation: popIn .3s; }
.bz-en { color: var(--ink-3); margin: 4px 0 14px; }
.bz-fb { min-height: 1.6em; margin: 10px 0 6px; }
.bz-fb.ok { color: var(--forest); font-weight: 600; }
.bz-fb.close { color: #8a6409; }
.bz-fb.bad { color: var(--berry); }
.bz-fb .muted { font-weight: 400; }
.bz-new { font-size: .75rem; background: var(--dot-peek); color: #3b2c05; border-radius: 99px; padding: 1px 8px; font-weight: 700; }
.bz-log { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bz-log li { background: var(--forest-soft); color: var(--forest); border-radius: 99px; padding: 2px 12px; font-size: .9rem; font-weight: 600; animation: popIn .25s; }
.bz-log li.close { background: color-mix(in srgb, var(--dot-peek) 18%, var(--card)); color: #8a6409; }
.bz-log li.funny { box-shadow: 0 0 0 2px var(--dot-peek) inset; }
.bz-start { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: color-mix(in srgb, var(--card) 88%, transparent); border-radius: var(--r); backdrop-filter: blur(2px); }
.btn.big { font-size: 1.1rem; padding: 14px 26px; }
.blitz-side { display: flex; flex-direction: column; align-items: center; gap: 8px; position: sticky; top: 120px; }
.blitz-side .bubble { border-radius: 16px 16px 16px 4px; align-self: stretch; }
.bz-end h2 { font-size: 2rem; }
.bz-record { font-size: .9rem; background: var(--dot-peek); color: #3b2c05; border-radius: 99px; padding: 2px 12px; vertical-align: middle; font-family: var(--sans); }
.bz-recap { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 4px; max-height: 320px; overflow: auto; }
.bz-recap li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.bz-recap li.close b { color: #8a6409; }
.bz-recap li.ok b { color: var(--forest); }
.bz-said { color: var(--ink-2); font-size: .88rem; font-style: italic; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pt-stretch.sneak, :root:not([data-theme="light"]) .wc-kind.sneak, :root:not([data-theme="light"]) .kind-name.sneak, :root:not([data-theme="light"]) .bc-card small, :root:not([data-theme="light"]) .bz-fb.close, :root:not([data-theme="light"]) .bz-log li.close, :root:not([data-theme="light"]) .bz-recap li.close b { color: #e8bd4f; } }
:root[data-theme="dark"] :is(.pt-stretch.sneak, .wc-kind.sneak, .kind-name.sneak, .bc-card small, .bz-fb.close, .bz-log li.close, .bz-recap li.close b) { color: #e8bd4f; }
@media (max-width: 900px) {
  .path-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .blitz-layout { grid-template-columns: minmax(0, 1fr); }
  .blitz-side { position: static; flex-direction: row; order: -1; }
  .blitz-side .bjorn.side { width: 80px; flex: none; }
}
@media (max-width: 600px) {
  .path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier { padding: 0 14px; }
  .tier > summary { grid-template-columns: auto 1fr; gap: 12px; }
  .tier > summary::after { display: none; }
  .tier-count { grid-column: 2; text-align: left; flex-direction: row; gap: 8px; align-items: baseline; flex-wrap: wrap; }
  .bc-grid { grid-template-columns: 1fr; }
  .medal-line { display: none; }
  .medals { justify-content: space-between; }
  .medal-wrap { min-width: 0; flex: 1; }
}
/* ---------- learning words: cards, overview, questions ---------- */
:root { --hard: #d9822b; --hard-soft: #fbeedd; }
:root[data-theme="dark"] { --hard: #f0a457; --hard-soft: #3a2a18; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hard: #f0a457; --hard-soft: #3a2a18; } }
.page-head.slim { margin-bottom: 14px; }
.page-head.slim h1 { margin-bottom: .2em; }
.learn { max-width: 720px; margin: 0 auto 40px; }
.ln-top { display: flex; align-items: center; gap: 14px; font-size: .84rem; color: var(--ink-3); margin-bottom: 14px; }
.ln-steps { display: flex; gap: 5px; flex: 1; }
.ln-steps i { flex: 1; height: 5px; border-radius: 99px; background: var(--paper-2); transition: background .25s; }
.ln-steps i.seen { background: var(--forest-2); }
.ln-steps i.now { background: var(--forest); box-shadow: 0 0 0 2px var(--forest-soft); }
.ln-steps i.hard.seen, .ln-steps i.hard.now { background: var(--hard); }
.ln-bar { position: relative; overflow: visible; height: 6px; }
.ln-bar i { border-radius: 99px; background: var(--forest-2); }
.ln-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px 30px; box-shadow: var(--shadow); animation: lnIn .3s ease-out; }
@keyframes lnIn { from { opacity: 0; transform: translateX(14px); } }
.ln-card.hard { border-color: color-mix(in srgb, var(--hard) 55%, var(--line)); }
.hard-tag { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--hard); margin-bottom: 10px; }
.hard-tag i, .hard-chip i, .hard-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--hard); display: inline-block; flex: none; }
.hard-dot.big { width: 14px; height: 14px; }
.hard-tag span { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-2); font-size: .9rem; }
.hard-chip { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; color: var(--hard); background: var(--hard-soft); border-radius: 99px; padding: 1px 9px 1px 7px; white-space: nowrap; vertical-align: middle; }
.ln-pos { font-size: .8rem; color: var(--ink-3); margin-bottom: 4px; }
.ln-word { display: flex; align-items: center; gap: 14px; }
.ln-word h2 { font-size: clamp(2.2rem, 6vw, 3.2rem); margin: 0; color: var(--forest); }
.ln-pron { color: var(--ink-3); margin: 4px 0 6px; }
.ln-pron span { font-family: ui-monospace, monospace; font-size: .85rem; }
.ln-en { font-size: 1.25rem; font-weight: 600; margin-bottom: 14px; }
.ln-ex { border-left: 3px solid var(--forest-soft); padding: 2px 0 2px 14px; margin: 10px 0; }
.ln-ex p { margin: 0; }
.ln-ex p[lang="nb"] { font-size: 1.08rem; }
.ln-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
.ln-overview { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 26px; }
.ln-all { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ln-all li { display: flex; align-items: center; gap: 8px; background: var(--paper); border-radius: 12px; padding: 6px 10px; }
.ln-all li.hard { box-shadow: inset 3px 0 0 var(--hard); }
.ln-mini { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; background: none; border: 0; padding: 4px 2px; text-align: left; color: var(--ink); }
button.ln-mini:hover b { text-decoration: underline; }
.ln-mini b { font-family: var(--serif); font-size: 1.1rem; color: var(--forest); font-weight: 600; }
.ln-mini span { color: var(--ink-2); font-size: .9rem; }
.ln-res { font-weight: 700; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ln-res.ok { background: var(--forest-soft); color: var(--forest); }
.ln-res.again { background: var(--clay-soft); color: var(--clay); }
.learn.quiz .ln-q { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px 28px; animation: lnIn .25s ease-out; }
.ln-q-word { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.ln-q-word b { font-family: var(--serif); font-size: 2.2rem; color: var(--forest); font-weight: 600; }
.ln-q-en { font-family: var(--serif); font-size: 1.8rem; margin: 4px 0 16px; }
.ln-q-en.nb { font-size: 1.4rem; margin-bottom: 4px; }
.ln-q .field { margin: 12px 0 0; }
.ln-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 1.02rem; color: var(--ink); transition: border-color .15s, background .15s, transform .1s; }
.choice:hover:not(:disabled) { border-color: var(--fjord); background: var(--card); }
.choice:active:not(:disabled) { transform: scale(.98); }
.choice kbd { font: 600 .72rem var(--sans); color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; background: var(--card); }
.choice[lang="nb"] { font-family: var(--serif); font-size: 1.15rem; }
.choice.right { border-color: var(--forest-2); background: var(--forest-soft); color: var(--forest); font-weight: 600; }
.choice.wrong { border-color: var(--berry); background: var(--berry-soft); animation: shake .35s; }
.choice:disabled { cursor: default; }
.ln-fb { margin-top: 14px; }
.ln-fb:empty { display: none; }
.ln-fb.ok, .ln-fb.bad, .ln-fb.close { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; animation: popIn .25s; }
.ln-fb.ok { border-color: color-mix(in srgb, var(--forest-2) 50%, var(--line)); }
.ln-fb.bad { border-color: color-mix(in srgb, var(--berry) 45%, var(--line)); }
.ln-fb.close { border-color: color-mix(in srgb, var(--fjord) 45%, var(--line)); background: var(--fjord-soft); }
.lesson-done { max-width: 720px; margin: 0 auto 40px; }
.lesson-done h2 .muted { font-family: var(--sans); font-size: 1rem; font-weight: 400; display: block; margin-top: 4px; }
.nut-win { display: flex; gap: 10px; align-items: center; background: var(--hard-soft); border-radius: 12px; padding: 10px 14px; margin: 14px 0 8px; }
.pt-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.pt-foot .thin-bar { flex: 1; margin: 0; }
.vocab-stats { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 18px; }
.vocab-stats .medals { margin: 0; }
.nut-strip { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 16px; text-align: left; color: var(--ink); flex: 1 1 340px; max-width: 520px; transition: border-color .15s; }
.nut-strip:hover { border-color: var(--hard); }
.nut-count { display: flex; align-items: center; gap: 6px; }
.nut-count b { font-family: var(--serif); font-size: 1.6rem; }
.nut-count small { color: var(--ink-3); }
.nut-text { display: flex; flex-direction: column; font-size: .88rem; color: var(--ink-2); flex: 1; line-height: 1.35; }
.nut-text b { color: var(--ink); font-size: .95rem; }
.nut-go { color: var(--hard); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.card .nut-strip { margin: 6px 0 14px; max-width: none; }
.nut-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 50vh; overflow: auto; }
.nut-list li { display: flex; flex-direction: column; background: var(--paper); border-radius: 10px; padding: 8px 10px; font-size: .86rem; }
.nut-list li.got { background: var(--hard-soft); }
.nut-list li.got .link { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; text-align: left; padding: 0; }
.nut-list li small { color: var(--ink-2); margin-top: 2px; line-height: 1.3; }
.nut-locked { font-family: var(--serif); font-size: 1.1rem; color: var(--ink-3); }
@media (max-width: 600px) {
  .ln-card, .learn.quiz .ln-q, .ln-overview { padding: 18px 16px; }
  .ln-all, .ln-choices { grid-template-columns: minmax(0, 1fr); }
  .ln-nav .btn.big { padding: 12px 18px; }
  .nut-go { display: none; }
}
/* ---------- round 3: guide, medals, word cards, chat, grammar ---------- */
/* The guide keeps the same height on every step, so Next never jumps. */
.guide { display: flex; flex-direction: column; align-items: center; }
.guide-sheet { width: min(460px, 100%); padding: 26px 26px 20px; overflow: hidden; }
.guide-bear { height: 120px; margin-bottom: 4px; }
.guide h2 { margin-bottom: .35em; }
.guide-text { min-height: 4.8em; margin-bottom: 10px; color: var(--ink-2); }
.guide-link { min-height: 36px; }
@media (max-width: 480px) { .guide-text { min-height: 6.4em; } }
.guide-nav { align-self: stretch; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.guide-nav > .btn:first-child { justify-self: start; }
.guide-nav > .btn:last-child { justify-self: end; }
.guide-nav .btn { white-space: nowrap; }

/* Four levels on one line. */
.medals { flex-wrap: nowrap; gap: 4px; }
.medal-line { flex: 0 1 18px; min-width: 6px; }
.medal-wrap { min-width: 0; }
.vocab-stats .medal-wrap small { white-space: nowrap; }
/* Forms of describing words and verbs: one calm line. */
.ln-forms { color: var(--ink-2); margin: -4px 0 14px; }
.ln-forms span[lang] { color: var(--forest); font-weight: 600; }
.ln-forms small { color: var(--ink-3); }
.ln-conj { margin: -4px 0 14px; }
.ln-conj > summary { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; cursor: pointer; list-style: none; color: var(--ink-2); }
.ln-conj > summary::-webkit-details-marker { display: none; }
.ln-conj > summary small { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.ln-conj > summary span[lang] { color: var(--forest); font-weight: 600; white-space: nowrap; }
.ln-conj-more { font-size: .82rem; color: var(--fjord); margin-left: auto; }
.ln-conj-more::after { content: ' ▾'; }
.ln-conj[open] .ln-conj-more::after { content: ' ▴'; }
.ln-conj .conj-full { margin-top: 10px; }
/* "Don't mix it up": one line; examples on request. */
.ln-diff { margin-top: 14px; border-left: 3px solid var(--fjord); background: var(--fjord-soft); border-radius: 0 10px 10px 0; padding: 8px 12px; font-size: .92rem; }
.ln-diff > summary { cursor: pointer; list-style: none; line-height: 1.45; }
.ln-diff > summary::-webkit-details-marker { display: none; }
.ln-diff-head { color: var(--fjord); margin-right: 4px; }
.ln-diff-head b { font-weight: 700; }
.ln-diff-tip { color: var(--ink-2); }
.ln-diff > summary::after { content: ' Examples ▾'; color: var(--fjord); font-size: .8rem; white-space: nowrap; }
.ln-diff[open] > summary::after { content: ' ▴'; }
.ln-diff ul { list-style: none; padding: 0; margin: 8px 0 2px; display: grid; gap: 6px; }
.ln-diff li b { color: var(--forest); margin-right: 4px; }

/* Bjørn in the corner, and his chat. */
.dock-head { display: none; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 4px 14px 4px 6px; box-shadow: var(--shadow); font-weight: 600; color: var(--ink); }
.dock-head img { width: 34px; height: auto; }
.dock.compact .bjorn.dock-bear, .dock.compact .dock-bubble { display: none; }
.dock.compact .dock-head { display: inline-flex; }
.dock.compact { right: 16px; left: auto; }
.dock .bjorn.dock-bear { cursor: pointer; }
body.chat-open .dock-bubble { display: none; }
.chat { position: fixed; right: 16px; bottom: 96px; z-index: 60; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 150px)); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 40px rgba(0,0,0,.25); overflow: hidden; animation: popIn .2s; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--forest-soft); }
.chat-head div { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.chat-head b { font-family: var(--serif); font-size: 1.1rem; }
.chat-head small { color: var(--ink-2); }
.chat-x { border: 0; background: none; font-size: 1.1rem; color: var(--ink-2); width: 32px; height: 32px; border-radius: 50%; }
.chat-x:hover { background: var(--card); }
.chat-log { list-style: none; margin: 0; padding: 14px; flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.cm { max-width: 85%; border-radius: 14px; padding: 8px 12px; line-height: 1.4; }
.cm p { margin: 0; }
.cm small { display: block; color: var(--ink-2); margin-top: 3px; font-size: .84rem; }
.cm.bj { background: var(--paper); align-self: flex-start; border-bottom-left-radius: 4px; }
.cm.bj p { font-weight: 500; }
.cm.me { background: var(--forest); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
:root[data-theme="dark"] .cm.me { color: #10231b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cm.me { color: #10231b; } }
.typing p { display: flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }
.chat-suggest { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 10px; }
.chat-suggest button { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 4px 11px; font-size: .84rem; color: var(--ink); }
.chat-suggest button:hover { border-color: var(--forest-2); }
.chat-form { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; background: var(--paper); color: var(--ink); }
.chat-form input:focus { outline: none; border-color: var(--fjord); }
.chat-foot { margin: 0; padding: 0 14px 10px; font-size: .76rem; color: var(--ink-3); }
.chat-foot .link { font-size: .76rem; }
@media (max-width: 760px) { .chat { bottom: 140px; right: 12px; height: min(520px, calc(100vh - 220px)); } }

/* Grammar: one lesson per page, all lessons on the left. */
.gr-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.gr-side { position: sticky; top: 96px; }
.gr-toggle { display: none; }
.gr-search { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; background: var(--card); color: var(--ink); margin-bottom: 10px; }
.gr-search:focus { outline: none; border-color: var(--fjord); }
.gr-list { list-style: none; margin: 0; padding: 0; max-height: calc(100vh - 230px); overflow: auto; display: grid; gap: 2px; }
.gr-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-size: .92rem; }
.gr-item:hover { background: var(--paper-2); color: var(--ink); }
.gr-item.on { background: var(--forest-soft); color: var(--ink); }
.gr-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--paper-2); font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.gr-item.on .gr-num { background: var(--forest); color: #fff; }
.gr-item.done .gr-num { background: var(--forest-2); color: #fff; }
.gr-item.started .gr-num { box-shadow: inset 0 0 0 2px var(--clay); }
.gr-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.gr-name b { font-weight: 600; }
.gr-name small { color: var(--fjord); font-size: .78rem; }
.gr-none { padding: 8px 10px; }
.gr-notes { display: block; margin-top: 12px; font-size: .88rem; }
.gr-main { min-width: 0; max-width: 760px; }
.gr-head h1 { margin-bottom: .3em; }
.gr-head .btn { margin-bottom: 10px; }
.gr-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 34px 0 20px; }
.gr-page { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.gr-page:hover { border-color: var(--forest-2); transform: translateY(-1px); }
.gr-page small { color: var(--ink-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.gr-page b { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; }
.gr-page.next { text-align: right; grid-column: 2; }
.gr-fold { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 10px; padding: 6px 12px; margin-bottom: 10px; font-size: .86rem; transition: border-color .15s; }
.gr-fold:hover { border-color: var(--forest-2); color: var(--ink); }
.gr-fold span { font-size: 1rem; line-height: 1; }
.gr-fold b { font-weight: 600; }
/* Folding: the list slides and fades away, leaving a slim rail with the ☰ button. */
.gr-layout { transition: grid-template-columns .35s cubic-bezier(.4, 0, .2, 1), gap .35s; }
.gr-side { min-width: 0; }
.gr-panel { width: 220px; transition: opacity .2s ease, transform .35s cubic-bezier(.4, 0, .2, 1), visibility 0s; }
.gr-fold { transition: border-color .15s, padding .35s; white-space: nowrap; }
.gr-layout.folded { grid-template-columns: 44px minmax(0, 1fr); gap: 20px; }
.gr-layout.folded .gr-panel { opacity: 0; transform: translateX(-30px); visibility: hidden; pointer-events: none; transition: opacity .2s ease, transform .35s cubic-bezier(.4, 0, .2, 1), visibility 0s .35s; }
.gr-layout.folded .gr-fold { padding: 8px 12px; }
.gr-layout.folded .gr-fold b { display: none; }
.gr-item { padding: 6px 8px; font-size: .88rem; gap: 8px; }
.gr-num { width: 24px; height: 24px; font-size: .76rem; }
.gr-actions { margin-top: 4px; }@media (max-width: 900px) {
  .gr-layout, .gr-layout.folded { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .gr-fold { display: none; }
  .gr-layout.folded .gr-panel { display: none; opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
  .gr-layout.folded .gr-side.open .gr-panel { display: block; }
  .gr-panel { width: auto; }
  .gr-layout.folded .gr-side { width: auto; }
  .gr-side { position: static; }
  .gr-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; color: var(--ink); }
  .gr-toggle b { color: var(--fjord); font-weight: 600; }
  .gr-panel { display: none; margin-top: 8px; }
  .gr-side.open .gr-panel { display: block; }
  .gr-list { max-height: 50vh; }
  .gr-page b { font-size: 1rem; }
}
/* ---------- the Vocabulary page: dictionary, learn, blitz ---------- */
.v-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.v-head h1 { margin: 0; }
.help-q { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); color: var(--ink-2); font-weight: 700; padding: 0; flex: none; }
.help-q:hover { border-color: var(--fjord); color: var(--fjord); }
.v-sec { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 24px; margin-bottom: 18px; }
.v-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; margin-bottom: 14px; }
.v-sec-head h2 { margin: 0; font-size: 1.35rem; }
.v-dict .v-sec-head { align-items: center; margin-bottom: 0; }
.v-search { flex: 1 1 280px; max-width: 460px; display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--paper); color: var(--ink-3); }
.v-search:focus-within { border-color: var(--fjord); background: var(--card); }
.v-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: var(--ink); padding: 10px 0; outline: none; }
.dict-body { margin-top: 14px; }
.dict-browse { margin-top: 10px; font-size: .9rem; }
.v-dict .word-list { max-height: 420px; overflow: auto; }
.vl-modes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.vl-go { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; }
.vl-info { color: var(--ink-2); font-size: .92rem; }
.vl-bar { max-width: none; margin-top: 16px; height: 5px; }
.vl-due { margin: 12px 0 0; font-size: .9rem; }
.v-sec.blitz-cards .bc-card { background: var(--paper); }
.help-list { display: grid; gap: 14px; }
.help-list h3 { font-size: 1.05rem; margin-bottom: .25em; display: flex; align-items: center; gap: 8px; }
.help-list p { margin: 0; color: var(--ink-2); }
.path-card .vocab-stats { margin-top: 6px; }
.path-card .medal { width: 34px; height: 34px; }
.path-card .medal-wrap small { font-size: .7rem; }
@media (max-width: 600px) { .path-card .medals { flex-wrap: wrap; justify-content: flex-start; } .path-card .medal-wrap { flex: 0 0 22%; } .path-card .medal-line { display: none; } }
.path-card .path { margin-bottom: 0; }
@media (max-width: 600px) {
  .v-sec { padding: 16px; }
  .vl-go .btn.big { width: 100%; }
}
/* ---------- conjugation button + pop-up ---------- */
.conj-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--paper); color: var(--fjord); border-radius: 99px; padding: 4px 12px 4px 10px; font-size: .84rem; font-weight: 600; transition: border-color .15s; }
.conj-btn:hover { border-color: var(--fjord); }
.conj-btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; }
.wc-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 6px; }
.wc-tools:empty { display: none; }
.wc-tools .why-btn { margin: 0; }
.word-card { display: flex; flex-direction: column; }
.ln-forms .conj-btn { margin-top: 2px; }
.gloss-pop .conj-btn { margin-top: 6px; }
.conj-sheet { width: min(520px, 100%); }
.conj-sheet .conj-table { width: 100%; }
.conj-sheet .conj-table th { width: 46%; }
.conj-sheet .conj-table th small { display: block; font-weight: 400; color: var(--ink-3); font-size: .76rem; }
.conj-persons { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 6px; }
.conj-persons span { background: var(--paper); border-radius: 99px; padding: 2px 10px; font-size: .9rem; color: var(--ink-2); }
.conj-persons b { color: var(--forest); }
/* ---------- Vocabulary: three big buttons ---------- */
.v-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.v-tile { --vc: var(--forest-2); position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 18px; text-decoration: none; color: var(--ink); min-height: 220px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.v-tile:hover { border-color: var(--vc); transform: translateY(-2px); box-shadow: var(--shadow); }
.v-tile.t-dict { --vc: var(--fjord); }
.v-tile.t-learn { --vc: var(--forest-2); }
.v-tile.t-blitz { --vc: #c0782f; }
.vt-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--vc) 14%, var(--card)); color: var(--vc); margin-bottom: 6px; }
.vt-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.v-tile b { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.v-tile > span:not(.vt-icon):not(.vt-go):not(.thin-bar) { color: var(--ink-2); font-size: .94rem; line-height: 1.45; }
.v-tile .thin-bar { max-width: none; margin-top: 4px; }
.v-tile .thin-bar i { background: var(--vc); }
.vt-go { margin-top: auto; padding-top: 10px; font-weight: 600; color: var(--vc); }
.v-search.big { max-width: none; margin-bottom: 12px; }
.v-search.big input { font-size: 1.1rem; padding: 12px 0; }
.vl-path { margin: 16px 0 0; }
@media (max-width: 760px) {
  .v-tiles { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .v-tile { min-height: 0; display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; row-gap: 2px; padding: 16px; }
  .v-tile .vt-icon { grid-row: span 3; margin: 0; }
  .v-tile .thin-bar, .v-tile .vt-go { grid-column: 2; }
  .v-tile .vt-go { padding-top: 4px; }
}
/* ---------- idioms, dictionary types, wrong-word notes ---------- */
.v-tiles { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.v-tile.t-idioms { --vc: #7a55b0; }
.idiom-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 30px; }
.idiom-sets .path-tile { --tc: #7a55b0; }
.ln-word h2.long { font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.2; }
.ln-lit { color: var(--ink-3); margin: -8px 0 14px; font-size: .95rem; }
.type-filters { flex-wrap: wrap; margin-top: -2px; }
.type-filters .filter span { color: var(--ink-3); font-size: .78em; margin-left: 2px; }
.type-filters .filter.on span { color: inherit; opacity: .8; }
.wrong-note { background: var(--clay-soft); border-radius: 8px; padding: 6px 10px; }
@media (max-width: 760px) { .v-tiles { grid-template-columns: minmax(0, 1fr); } .type-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } .type-filters .filter { flex: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- round 5: answer mode, theme toggle, buttons instead of blue links, map animations ---------- */
/* "Choose | Type" switch in the vocabulary lessons */
.ans-mode { display: inline-flex; background: var(--paper-2); border: 1px solid var(--line); border-radius: 99px; padding: 3px; gap: 2px; flex: none; }
.ans-mode button { border: 0; background: transparent; color: var(--ink-2); font-size: .8rem; font-weight: 600; padding: 4px 12px; border-radius: 99px; transition: background .2s, color .2s, box-shadow .2s; }
.ans-mode button.on { background: var(--card); color: var(--forest); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ans-mode button:not(.on):hover { color: var(--ink); }
.learn.quiz .ln-top { gap: 12px; }
.ans-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 18px; padding: 12px 16px; border-radius: 12px; background: var(--paper-2); }
.ans-pick > span:first-child { font-weight: 600; }
.ans-pick .muted { font-size: .88rem; flex-basis: 100%; }
.ln-fb s { color: var(--berry); text-decoration-thickness: 2px; }
@media (max-width: 560px) { .learn.quiz .ln-top { flex-wrap: wrap; } .learn.quiz .ln-top .ans-mode { order: -1; margin-left: auto; } }

/* Sun / moon button */
.theme-btn { display: inline-grid; place-items: center; }
.theme-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; grid-area: 1 / 1; transition: transform .45s cubic-bezier(.3,1.4,.5,1), opacity .3s; }
.theme-btn .i-sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
.theme-btn.dark .i-moon { opacity: 0; transform: rotate(90deg) scale(.4); }
.theme-btn.dark .i-sun { opacity: 1; transform: none; color: #f0c45a; }
.theme-btn:hover { background: var(--paper-2); }
.theme-fade, .theme-fade * { transition: background-color .4s ease, border-color .4s ease, color .4s ease, fill .4s ease !important; }

/* Links become soft buttons */
.link { display: inline-flex; align-items: center; gap: 6px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .86rem; line-height: 1.4; vertical-align: middle; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.link:hover { background: var(--forest-soft); border-color: var(--forest-2); color: var(--forest); }
.link:active { transform: scale(.97); }
.back { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px 6px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--ink-2); font-weight: 600; font-size: .86rem; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.back:hover { color: var(--forest); border-color: var(--forest-2); background: var(--forest-soft); transform: translateX(-2px); }
main :is(p, li, h3, small) > a:not([class]) { display: inline-block; padding: 0 10px; border-radius: 99px; background: var(--forest-soft); color: var(--forest); text-decoration: none; font-weight: 600; line-height: 1.6; transition: background .15s, color .15s; }
main :is(p, li, h3, small) > a:not([class]):hover { background: var(--forest); color: var(--card); }
.ex-actions, .d-actions { align-items: center; }

/* Map: things react when you click them */
.m-grain, .m-arctic { pointer-events: none; }
.m-whale, .m-boat, .m-compass, .m-aurora, .m-mtn, .m-tree, .m-ship { cursor: pointer; }
.m-fx { pointer-events: none; }
.fx-ripple { fill: none; stroke: #fff; stroke-width: 1.6; opacity: 0; animation: fxRipple 1s ease-out forwards; }
:root[data-theme="dark"] .fx-ripple { stroke: #9fd0ea; }
.fx-ring { fill: none; stroke: var(--clay); stroke-width: 3; animation: fxRing .7s ease-out forwards; }
.fx-ring.two { stroke: #f3d36b; animation-delay: .12s; opacity: 0; }
.fx-spark, .fx-star, .fx-snow, .fx-leaf, .fx-spout { animation: fxFly .9s cubic-bezier(.2,.7,.3,1) forwards; opacity: 0; }
.fx-spark { fill: #f3c548; }
.fx-star { fill: #c9f5e4; }
.fx-snow { fill: #fff; stroke: #b9cad4; stroke-width: .4; }
.fx-leaf { fill: var(--forest-2); }
.fx-spout { fill: #9cc7da; animation: fxSpout 1s ease-out forwards; }
.fx-pop > * { transform-box: view-box; transform-origin: 0 0; animation: fxPop .55s cubic-bezier(.3,1.6,.5,1); }
.fx-dive > * { transform-box: view-box; transform-origin: 0 0; animation: fxDive 1.5s ease-in-out; }
.fx-rock .m-boat-bob > *, .m-ship.fx-rock > * { transform-box: view-box; transform-origin: 0 0; animation: fxRock 1.3s ease-in-out; }
.fx-spin > * { transform-box: view-box; transform-origin: 0 0; animation: fxSpin 1.2s cubic-bezier(.3,1.2,.4,1); }
.fx-shake > * { transform-box: view-box; transform-origin: 0 0; animation: fxShake .5s ease-in-out; }
.fx-sway > * { transform-box: view-box; transform-origin: 0 5px; animation: fxSway .9s ease-in-out; }
.fx-aurora .m-aurora { animation: fxAurora 2.1s ease-in-out; }
.map-frame { transition: transform .34s cubic-bezier(.4,0,.6,1), opacity .26s ease .08s; }
.map-frame.fx-zoom { transform: scale(1.32); opacity: 0; }
@keyframes fxRipple { 0% { r: 3; opacity: .9; } 100% { r: 30; opacity: 0; stroke-width: .3; } }
@keyframes fxRing { 0% { r: 8; opacity: 1; } 100% { r: 42; opacity: 0; stroke-width: .5; } }
@keyframes fxFly { 0% { transform: translate(0, 0) scale(.3) rotate(0); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.2) rotate(140deg); opacity: 0; } }
@keyframes fxSpout { 0% { transform: translate(0, 0); opacity: 1; } 60% { opacity: 1; } 100% { transform: translate(var(--dx), -26px); opacity: 0; } }
@keyframes fxPop { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }
@keyframes fxDive { 0% { transform: none; } 30% { transform: translateY(-5px) rotate(-12deg); } 65% { transform: translateY(10px) rotate(20deg); opacity: 0; } 85% { transform: translateY(4px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes fxRock { 0%, 100% { transform: none; } 20% { transform: rotate(-14deg); } 45% { transform: rotate(11deg); } 70% { transform: rotate(-6deg); } 88% { transform: rotate(3deg); } }
@keyframes fxSpin { 0% { transform: rotate(0); } 100% { transform: rotate(720deg); } }
@keyframes fxShake { 0%, 100% { transform: none; } 25% { transform: translateX(-2px); } 50% { transform: translateX(2px); } 75% { transform: translateX(-1px); } }
@keyframes fxSway { 0%, 100% { transform: none; } 25% { transform: rotate(-14deg); } 55% { transform: rotate(10deg); } 80% { transform: rotate(-4deg); } }
@keyframes fxAurora { 0%, 100% { opacity: .7; filter: none; } 40% { opacity: 1; filter: brightness(1.6) saturate(1.5); } }
/* ---------- round 6: home, map-first route, today's session, speaking, the guide ---------- */
.tabs a[data-tab="home"] { --tc: #a3486a; }

/* Home */
.home-hero { display: grid; grid-template-columns: 280px 1fr; gap: 36px; align-items: center; margin-bottom: 34px; }
.home-today { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px 28px; box-shadow: var(--shadow); }
.home-today h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin-bottom: .3em; }
.home-today .lead { margin-bottom: 14px; }
.today-mini { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 18px; }
.today-mini li { display: flex; align-items: center; gap: 7px; padding: 5px 13px 5px 6px; border-radius: 99px; background: var(--paper-2); font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.today-mini li i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1.5px solid var(--line); font-style: normal; font-size: .7rem; }
.today-mini li.done { background: var(--forest-soft); color: var(--forest); }
.today-mini li.done i { background: var(--forest-2); border-color: var(--forest-2); color: #fff; }
.home-group { margin-bottom: 26px; }
.hg-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.hg-head h2 { margin: 0; font-size: 1.35rem; }
.hg-head p { margin: 0; color: var(--ink-2); font-size: .94rem; }
.home-group .v-tiles { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 0; }
.h-tile { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.h-tile b { font-size: 1.22rem; }
.v-tile.t-today { --vc: #a3486a; } .v-tile.t-route { --vc: #2f7a58; } .v-tile.t-how { --vc: #c0782f; }
.v-tile.t-grammar { --vc: #6a55a8; } .v-tile.t-review { --vc: #c06a24; } .v-tile.t-chat { --vc: #2d6f9e; } .v-tile.t-cabin { --vc: #b27b12; }
@media (max-width: 760px) {
  .home-hero { grid-template-columns: 1fr; gap: 8px; }
  .home-hero .welcome-bear { flex-direction: row; align-items: flex-end; justify-content: center; }
  .home-hero .welcome-bear .bjorn.hero { width: 110px; }
  .home-today { padding: 20px; }
}

/* The route: the map fills the page */
.route-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.route-top h1 { margin: 0; }
.route-top p { margin: 0; }
.part-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--paper-2); border: 1px solid var(--line); }
.part-switch button { border: 0; background: transparent; border-radius: 10px; padding: 7px 14px; text-align: left; display: grid; line-height: 1.25; color: var(--ink-2); transition: background .2s, color .2s, box-shadow .2s; }
.part-switch button b { font-size: .9rem; color: inherit; }
.part-switch button span { font-size: .76rem; }
.part-switch button.on { background: var(--card); color: var(--forest); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.route-page .route-map { grid-template-columns: auto minmax(250px, 330px); justify-content: center; }
.route-page .map-svg { height: calc(100vh - 210px); min-height: 460px; width: auto; max-width: 100%; }
.route-page .route-list { margin-top: 22px; }
@media (max-width: 900px) {
  .route-page .route-map { grid-template-columns: 1fr; }
  .route-page .map-svg { height: auto; min-height: 0; width: 100%; }
}

/* Today */
.today-head h1 { margin-bottom: .15em; }
.today-bar { height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; margin-top: 10px; max-width: 420px; }
.today-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--forest-2), #a3486a); border-radius: 99px; transition: width .6s; }
.today-steps { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.t-step { display: grid; grid-template-columns: 34px 44px 1fr auto auto; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; transition: border-color .2s, box-shadow .2s, opacity .2s; }
.t-step.now { border-color: var(--forest-2); box-shadow: var(--shadow); }
.t-step.open { border-color: var(--forest); }
.t-step.done { opacity: .8; }
.ts-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; background: var(--paper-2); color: var(--ink-2); }
.t-step.done .ts-num { background: var(--forest-2); color: #fff; }
.t-step.now .ts-num { background: var(--forest); color: #fff; }
.ts-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--forest-soft); color: var(--forest); }
.ts-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ts-main { display: grid; line-height: 1.35; }
.ts-main b { font-size: 1.05rem; }
.ts-main span { color: var(--ink-2); font-size: .9rem; }
.ts-time { color: var(--ink-3); font-size: .82rem; white-space: nowrap; }
.today-card { margin-bottom: 18px; }
.today-card > .kicker { margin-bottom: 10px; }
.t-route h2 { margin-bottom: .4em; }
.today-end { margin-top: 10px; }
@media (max-width: 640px) {
  .t-step { grid-template-columns: 30px 1fr auto; gap: 10px; padding: 12px; }
  .ts-icon, .ts-time { display: none; }
}

/* Speak */
.sp-top { display: flex; justify-content: space-between; align-items: center; color: var(--ink-2); font-size: .88rem; margin-bottom: 12px; }
.sp-dots { display: flex; gap: 5px; }
.sp-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--paper-2); border: 1px solid var(--line); }
.sp-dots i.on { background: var(--forest-2); border-color: var(--forest-2); }
.sp-dots i.now { background: var(--clay); border-color: var(--clay); }
.sp-say { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp-no { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; margin: 0; }
.sp-result { min-height: 30px; margin: 10px 0; }
.sp-heard { color: var(--ink-2); font-style: italic; }
.sp-words { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 6px; }
.sp-words .ok { color: var(--forest); }
.sp-words .miss { color: var(--ink-3); text-decoration: underline wavy var(--clay); text-underline-offset: 5px; }
.sp-mic .mic-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; opacity: .7; }
.sp-mic.on { background: var(--berry); border-color: var(--berry); }
.sp-mic.on .mic-dot { animation: micPulse 1s ease-in-out infinite; opacity: 1; }
@keyframes micPulse { 50% { transform: scale(1.6); opacity: .4; } }

/* The guide: how do I learn a language? */
.how { max-width: 820px; margin: 0 auto; }
.how-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.how-toc a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .88rem; transition: border-color .15s, background .15s; }
.how-toc a span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--forest-soft); color: var(--forest); font-size: .78rem; }
.how-toc a:hover { border-color: var(--forest-2); background: var(--forest-soft); }
.how-sec { padding: 26px 0; border-top: 1px solid var(--line); }
.how-sec h2 { font-size: 1.7rem; }
.how-sec p, .how-list li { font-size: 1.03rem; line-height: 1.7; }
.how-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.how-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.how-grid > * { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; color: var(--ink); text-decoration: none; }
.how-grid > a { transition: border-color .15s, transform .15s; }
.how-grid > a:hover { border-color: var(--forest-2); transform: translateY(-2px); }
.how-grid b { font-family: var(--serif); font-size: 1.12rem; }
.how-grid p { margin: 6px 0 0; font-size: .95rem; color: var(--ink-2); line-height: 1.55; }
.how-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.how-numbers div { background: var(--forest-soft); border-radius: 14px; padding: 14px 16px; display: grid; gap: 2px; }
.how-numbers b { font-family: var(--serif); font-size: 2rem; color: var(--forest); line-height: 1.1; }
.how-numbers span { font-size: .9rem; color: var(--ink-2); }
.how-list { padding-left: 1.2em; display: grid; gap: 10px; }
.how-tip { background: var(--paper-2); border-left: 4px solid var(--forest-2); border-radius: 0 12px 12px 0; padding: 12px 16px; }
.how-end { text-align: center; margin: 20px 0 40px; }
.how-end .row-btns { justify-content: center; }
@media (max-width: 640px) { .how-grid, .how-grid.three, .how-numbers { grid-template-columns: 1fr; } }

/* Grammar list: a heading per part of the route */
.gr-part { list-style: none; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--forest-2); padding: 12px 8px 4px; }
.gr-part small { font-weight: 600; color: var(--ink-3); letter-spacing: .04em; }
/* Short tab names on phones */
@media (max-width: 520px) { .tabs a span[data-s] { font-size: 0; } .tabs a span[data-s]::after { content: attr(data-s); font-size: .68rem; } .tabs a { padding-left: 0; padding-right: 0; } }

/* Very narrow phones: make room in the header for the theme button */
@media (max-width: 400px) { .topbar { gap: 6px; padding-left: 10px; padding-right: 10px; } .top-right { gap: 5px; } .brand-name { display: none; } .lang-chip { padding: 6px 9px; } .lang-chip span:not(.flag-no) { display: none; } }

/* Page changes: a quick soft fade; from the map, the chapter settles in from the zoom */
.route-page > :not(.route-map), .route-page .map-side { transition: opacity .22s ease; }
.route-page.fx-leave > :not(.route-map), .route-page.fx-leave .map-side { opacity: 0; }
#view.page-in { animation: pageIn .2s ease-out; }
#view.page-zoom { animation: pageZoom .3s cubic-bezier(.2,.7,.3,1); transform-origin: 50% 30vh; }
@keyframes pageIn { from { opacity: 0; } }
@keyframes pageZoom { from { opacity: 0; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { #view.page-in, #view.page-zoom { animation: none; } }

/* Your journey: a strip of the stops in your part of the route, with Bjørn at your stop */
.journey { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 14px; margin: 0 0 18px; padding: 12px 14px; border-radius: 14px; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s; }
a.journey:hover { border-color: #2f7a58; background: color-mix(in srgb, #2f7a58 7%, var(--paper-2)); }
.j-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: .9rem; }
.j-head span:not(.j-part) { color: var(--ink-2); }
.j-part { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #2f7a58; width: 100%; }
.j-line { list-style: none; margin: 4px 0 0; padding: 0; display: flex; align-items: center; min-width: 0; }
.j-stop { position: relative; flex: 1; display: grid; place-items: center; height: 26px; font-size: .62rem; font-weight: 700; color: #fff; }
.j-stop::before { content: ''; position: absolute; left: 0; right: 50%; top: 50%; height: 2px; background: var(--line); transform: translateY(-50%); }
.j-stop:first-child::before { display: none; }
.j-stop.done::before, .j-stop.next::before { background: #c0563d; }
.j-stop::after { content: ''; position: absolute; left: 50%; right: 0; top: 50%; height: 2px; background: var(--line); transform: translateY(-50%); }
.j-stop:last-child::after { display: none; }
.j-stop.done::after { background: #c0563d; }
.j-stop > img { position: relative; z-index: 1; width: 24px; height: auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.j-go { font-weight: 600; color: #2f7a58; font-size: .9rem; white-space: nowrap; }
.today-card .journey { margin: 4px 0 14px; }
:root[data-theme="dark"] .j-part, :root[data-theme="dark"] .j-go { color: #7dbd9c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .j-part, :root:not([data-theme="light"]) .j-go { color: #7dbd9c; } }
/* Today: speaking switch and the end-of-day summary */
.today-speak { margin-top: 12px; font-size: .88rem; color: var(--ink-2); }
.today-speak small { color: var(--ink-3); }
.today-sum { margin-bottom: 18px; }
.today-sum h3 { margin: 18px 0 10px; font-size: 1.1rem; }
.ts-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ts-stat { background: var(--paper-2); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; align-content: start; }
.ts-stat > b { font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; color: var(--forest); display: flex; align-items: center; gap: 6px; }
.ts-stat > b .jar { width: 24px; height: 24px; }
.ts-stat > span { font-size: .88rem; color: var(--ink-2); }
.ts-stat p { margin: 6px 0 0; }
.ts-stat:first-child { grid-column: 1 / -1; }
.ts-words { display: flex; flex-wrap: wrap; gap: 5px; }
.ts-words span { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 1px 9px; font-size: .85rem; font-weight: 600; }
.ts-cards { margin: 0 0 12px; }
.today-steps.small .t-step { padding: 8px 14px; }
.today-steps.small .ts-icon { display: none; }
.word-card.known { opacity: .75; }
.wc-known { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--forest-2); color: #fff; font-size: .75rem; font-weight: 700; }
.wc-fold > summary { cursor: pointer; font-weight: 600; color: var(--forest); margin: 4px 0 12px; }
.wc-fold[open] > summary { margin-bottom: 14px; }

/* Correction: your sentence (wrong words red) over the correct one (all green) */
.diff2 { display: grid; gap: 6px; margin: 8px 0 6px; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.d-row { display: grid; grid-template-columns: 78px 1fr; gap: 10px; align-items: baseline; }
.d-tag { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.d-mine, .d-right { font-size: 1.06rem; line-height: 1.5; }
.d-mine .d-same { color: var(--ink-2); }
.d-mine .d-bad { color: var(--berry); font-weight: 700; text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--berry) 55%, transparent); }
.d-right { color: var(--forest); font-weight: 600; }
.d-right .d-add { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
@media (max-width: 480px) { .d-row { grid-template-columns: 1fr; gap: 0; } }
/* Journey stops: real circles on top of the line, so the line never crosses a tick */
.j-stop > i { position: relative; z-index: 1; width: 12px; height: 12px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: 0 0 0 1.5px var(--line); font-style: normal; font-size: .58rem; font-weight: 800; line-height: 1; color: #fff; }
.j-stop.done > i { width: 15px; height: 15px; background: #2f7a58; box-shadow: 0 0 0 2px var(--paper-2); }
.j-stop.started > i { background: var(--clay); box-shadow: 0 0 0 2px var(--paper-2); }
.j-stop::before, .j-stop::after { z-index: 0; }
@media (max-width: 520px) { .j-stop.done > i { width: 11px; height: 11px; font-size: 0; } .j-stop > i { width: 9px; height: 9px; } .j-stop > img { width: 20px; } }
/* ---------- postcards: their own skies, the prize moment, the collection ---------- */
.pc-front { background: linear-gradient(170deg, var(--pc-a, #27496b) 0%, var(--pc-b, #3b6f8f) 45%, var(--pc-c, #6f9c8d) 100%); }
.pc-mini { display: block; text-decoration: none; }
.pc-mini-front { background: linear-gradient(170deg, var(--pc-a, #27496b), var(--pc-b, #3b6f8f) 50%, var(--pc-c, #6f9c8d)); }
.card > h2 .btn.small { margin-left: 10px; vertical-align: middle; font-family: var(--sans); }
.v-tile.t-postcards { --vc: #2d6f9e; }
.culture-next { text-align: center; padding: 8px 0 4px; }
.culture-next .btn span { font-weight: 500; opacity: .85; margin-left: 4px; }
.culture-next p { margin-top: 8px; }

.pc-reveal { max-width: 760px; margin: 0 auto; text-align: center; padding-bottom: 30px; }
.pcr-head h1 { margin-bottom: .25em; }
.pcr-head .lead { margin: 0 auto 22px; }
.pcr-stage { position: relative; perspective: 1200px; margin: 0 auto 18px; }
.pc-reveal .postcard { margin: 0 auto; text-align: left; }
.pcr-prize { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 99px; background: var(--hl); color: var(--ink); font-size: .95rem; }
.pcr-prize .jar { width: 22px; height: 22px; }
.pcr-actions { justify-content: center; margin-top: 18px; }
.pcr-confetti { position: absolute; left: 50%; top: 45%; width: 0; height: 0; z-index: 2; pointer-events: none; }
.pcr-confetti i { position: absolute; width: 8px; height: 12px; border-radius: 2px; opacity: 0; animation: pcConfetti 1.1s cubic-bezier(.15,.7,.3,1) both; }
/* The prize moment: the card flies in face-down, turns over, the stamp lands, confetti. */
.pc-reveal.fresh .pcr-head { animation: pcFade .4s ease both; }
.pc-reveal.fresh .postcard { animation: pcArrive .95s cubic-bezier(.2,.8,.25,1.12) .15s both; }
.pc-reveal.fresh .pc-stamp { animation: pcStamp .32s cubic-bezier(.3,1.6,.5,1) .95s both; }
.pc-reveal.fresh .pcr-prize, .pc-reveal.fresh .pcr-actions { animation: pcFade .35s ease 1.1s both; }
@keyframes pcArrive { 0% { opacity: 0; transform: translateY(70px) rotateX(75deg) rotateZ(-6deg) scale(.82); } 55% { opacity: 1; } 100% { opacity: 1; transform: rotate(-.6deg); } }
@keyframes pcStamp { 0% { opacity: 0; transform: scale(2.4) rotate(-14deg); } 100% { opacity: 1; transform: none; } }
@keyframes pcFade { from { opacity: 0; transform: translateY(8px); } }
@keyframes pcConfetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 60px)) rotate(var(--r)); } }
@media (prefers-reduced-motion: reduce) { .pc-reveal.fresh *, .pc-reveal.fresh .postcard { animation: none !important; } .pcr-confetti { display: none; } }
.no-motion .pc-reveal.fresh *, .no-motion .pc-reveal.fresh .postcard { animation: none !important; }
.no-motion .pcr-confetti { display: none; }
@media (max-width: 640px) { .pc-reveal .postcard { grid-template-columns: 1fr; } }

/* The collection */
.pcc-part { margin-bottom: 26px; }
.pcc-part h2 { font-size: 1.2rem; }
.pcc-part h2 small { font-family: var(--sans); font-size: .85rem; color: var(--ink-3); font-weight: 600; margin-left: 6px; }
.pcc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pcc { position: relative; aspect-ratio: 3 / 2; border-radius: 6px; padding: 12px; display: flex; flex-direction: column; justify-content: flex-end; text-decoration: none; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.pcc.got { color: #fff; background: linear-gradient(170deg, var(--pc-a), var(--pc-b) 50%, var(--pc-c)); box-shadow: 0 4px 14px rgba(0,0,0,.14); transform: rotate(-.8deg); }
.pcc.got:nth-child(even) { transform: rotate(.7deg); }
.pcc.got:hover { transform: rotate(0) translateY(-3px) scale(1.03); box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.pcc.got::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: rgba(255,255,255,.14); clip-path: polygon(0 100%, 0 55%, 15% 25%, 24% 45%, 42% 5%, 57% 50%, 67% 30%, 85% 70%, 100% 40%, 100% 100%); }
.pcc b { font-family: var(--serif); font-size: 1.15rem; line-height: 1.1; position: relative; z-index: 1; }
.pcc small { font-family: var(--serif); font-style: italic; font-size: .78rem; opacity: .9; position: relative; z-index: 1; }
.pcc.todo { border: 1.5px dashed var(--line); color: var(--ink-3); background: var(--paper-2); }
.pcc.todo b { font-size: 1rem; }
.pcc.todo small { font-family: var(--sans); font-style: normal; }
.pcc.todo:hover { border-color: var(--ink-3); color: var(--ink-2); }
.pcc-num { position: absolute; top: 8px; right: 8px; min-width: 26px; height: 30px; padding: 0 4px; border-radius: 2px; display: grid; place-items: center; font-size: .72rem; font-weight: 700; z-index: 1; }
.pcc.got .pcc-num { background: #fdf8ee; color: #7a4a2a; outline: 1.5px dashed #fdf8ee; outline-offset: 2px; }
.pcc.todo .pcc-num { border: 1.5px dashed var(--line); }
/* The chat button lives bottom-right, next to where the chat opens. On phones a chapter's own Bjørn
   stands there too, so the button sits just above him. */
@media (max-width: 980px) { body:has(.ch-side) .dock.compact { bottom: 168px; right: 12px; } }
@media (max-width: 760px) { .dock.compact { right: 10px; } }

/* Extra practice rounds at the end of a grammar lesson */
.g-more:not(:empty) { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.g-more .kicker { margin-bottom: 8px; }
.g-more-end { margin-top: 12px; }

/* Grammar: the parts of a lesson (6.1, 6.2…) in the side list and at the top */
.gr-row { display: flex; align-items: center; gap: 2px; }
.gr-row .gr-item { flex: 1; min-width: 0; }
.gr-exp { flex: none; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3); font-size: .8rem; display: grid; place-items: center; transition: transform .2s, background .15s, color .15s; }
.gr-exp:hover { background: var(--paper-2); color: var(--ink); }
.gr-exp[aria-expanded="true"] { transform: rotate(90deg); color: var(--forest); }
.gr-subs { list-style: none; margin: 2px 0 6px 22px; padding: 0 0 0 12px; border-left: 2px solid var(--line); display: grid; gap: 1px; }
.gr-sub { display: flex; gap: 8px; align-items: baseline; padding: 5px 8px; border-radius: 8px; font-size: .84rem; line-height: 1.3; color: var(--ink-2); text-decoration: none; }
.gr-sub > span { flex: none; font-weight: 700; font-size: .76rem; color: var(--forest-2); min-width: 30px; }
a.gr-sub:hover { background: var(--paper-2); color: var(--ink); }
.gr-sub.locked { color: var(--ink-3); cursor: default; }
.gr-sub.locked > span { color: var(--ink-3); }
.gr-sub i { font-style: normal; font-size: .7rem; opacity: .7; }
.gr-subnav { position: sticky; top: var(--sticky-top, 70px); z-index: 5; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px 0 10px; margin: 0 0 8px; background: linear-gradient(var(--paper) 80%, transparent); }
.gr-subnav::-webkit-scrollbar { display: none; }
.gr-chip { flex: none; display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: .84rem; font-weight: 500; white-space: nowrap; text-decoration: none; transition: border-color .15s, background .15s, color .15s; }
.gr-chip b { color: var(--forest); font-weight: 700; }
button.gr-chip:hover, .gr-chip.on { border-color: var(--forest-2); background: var(--forest-soft); color: var(--ink); }
.gr-chip.locked { opacity: .6; cursor: default; }
.gr-chip.locked b { color: var(--ink-3); }
.g-sublabel { display: inline-block; margin: 6px 0 6px; padding: 2px 10px; border-radius: 99px; background: var(--forest-soft); color: var(--forest); font-size: .78rem; font-weight: 700; letter-spacing: .04em; }
.g-group { scroll-margin-top: 36px; }@media (max-width: 960px) { .gr-subnav { top: 51px; } }

/* Parts you haven't reached yet: open, with a gentle warning */
.gr-sub.ahead > span { color: var(--ink-3); }
.gr-sub.ahead i, .gr-chip.ahead i { font-style: normal; color: var(--clay); font-size: .8rem; }
.gr-chip.ahead b { color: var(--ink-3); }
.g-ahead { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--clay-soft); border: 1px solid color-mix(in srgb, var(--clay) 35%, transparent); color: var(--ink); font-size: .92rem; line-height: 1.45; }
.g-ahead > span { color: var(--clay); font-size: 1.05rem; line-height: 1.2; }
/* Dictionary: a searched form explained; pop-up: the meaning that fits here */
.wr-form-note { list-style: none; padding: 10px 14px; margin-bottom: 8px; border-radius: 12px; background: var(--forest-soft); color: var(--ink); font-size: .95rem; }
.wr-form-note b { color: var(--forest); }
.wr-form-note .link { margin-left: 6px; }
.gp-mean li.gp-here { font-weight: 700; color: var(--forest); }

/* Welcome guide: Skip / Back get a soft fill between the sheet and the bright Next button */
.guide-nav .btn.ghost { background: color-mix(in srgb, var(--forest-2) 22%, var(--card)); border-color: color-mix(in srgb, var(--forest-2) 40%, var(--card)); color: var(--ink); }
.guide-nav .btn.ghost:hover { background: color-mix(in srgb, var(--forest-2) 34%, var(--card)); }
.guide-link .btn.small { background: color-mix(in srgb, var(--forest-2) 14%, var(--card)); border-color: color-mix(in srgb, var(--forest-2) 35%, var(--card)); }

/* Dictionary filters: choose what to filter by, then one row of options */
.dict-filters { display: grid; gap: 8px; margin: 12px 0 6px; }
.df-tabs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.df-label { font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-right: 6px; }
.df-tabs button { border: 0; background: transparent; padding: 5px 12px; border-radius: 99px; font-weight: 600; font-size: .88rem; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); transition: background .15s, color .15s, box-shadow .15s; }
.df-tabs button.on { background: var(--ink); color: var(--paper); box-shadow: none; }
.df-tabs button:not(.on):hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); }
.df-chips .filters { margin: 0; }
.df-summary { margin: 4px 0 10px; font-size: .9rem; color: var(--ink-2); }
.df-summary b { color: var(--ink); }
.df-clear { border: 0; background: var(--paper-2); color: var(--ink-2); border-radius: 99px; padding: 2px 10px; margin-left: 6px; font-size: .8rem; font-weight: 600; }
.df-clear:hover { color: var(--ink); background: var(--line); }
.wr-form-note.as-p { display: block; }
/* "What you're learning" box at the top of a grammar lesson */
.g-intro { margin: 4px 0 18px; padding: 16px 18px; border-radius: 16px; background: linear-gradient(160deg, var(--fjord-soft), var(--card)); border: 1px solid color-mix(in srgb, var(--fjord) 25%, var(--line)); }
.g-intro .kicker { color: var(--fjord); margin-bottom: 6px; }
.g-what { margin: 0 0 6px; font-size: 1.02rem; line-height: 1.6; }
.g-why { margin: 0 0 10px; color: var(--ink-2); font-size: .94rem; }
.g-terms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: .86rem; }
.g-terms > span { color: var(--ink-3); font-weight: 600; margin-right: 2px; }
.term-chip { border: 1px solid color-mix(in srgb, var(--fjord) 40%, var(--line)); background: var(--card); color: var(--fjord); border-radius: 99px; padding: 3px 11px; font-size: .84rem; font-weight: 600; transition: background .15s; }
.term-chip:hover { background: var(--fjord-soft); }
.term-all { margin-left: 4px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.term-all:hover { color: var(--fjord); }

/* Grammar words page */
.term-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.term-toc a { padding: 5px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .88rem; }
.term-toc a:hover { border-color: var(--fjord); }
.term-group { margin-bottom: 26px; }
.term-group h2 { font-size: 1.3rem; }
.term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.term { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 6px; align-content: start; scroll-margin-top: 120px; transition: box-shadow .4s, border-color .4s; }
.term.flash { border-color: var(--fjord); box-shadow: 0 0 0 4px var(--fjord-soft); }
.term h3 { margin: 0; font-size: 1.12rem; }
.term p { margin: 0; line-height: 1.55; }
.term-ex { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 2px 0 0; font-size: .92rem; }
.term-ex dt { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.term-ex dd { margin: 0; }
.term-ex em { color: var(--forest); font-style: normal; font-weight: 600; }
.term-go { font-size: .86rem; font-weight: 600; color: var(--fjord); text-decoration: none; }
.term-go:hover { text-decoration: underline; }
.term.in-sheet { border: 0; padding: 0; background: none; }
.term.in-sheet h2 { margin-bottom: 4px; }
.g-intro i, .term i { font-style: italic; color: var(--ink); font-weight: 600; }
.term-ex dd[lang='nb'] em { color: var(--forest); }

/* Dictionary filters, round 2: tabs on a thin line, options as chips below it */
.dict-filters { gap: 10px; }
.df-tabs { gap: 2px; border-bottom: 1px solid var(--line); padding-bottom: 0; }
.df-label { text-transform: none; letter-spacing: 0; font-size: .88rem; font-weight: 600; color: var(--ink-3); margin-right: 10px; padding-bottom: 7px; }
.df-tabs button { border-radius: 0; box-shadow: none; padding: 6px 12px 8px; margin-bottom: -1px; border-bottom: 2px solid transparent; background: transparent; color: var(--ink-2); font-size: .92rem; }
.df-tabs button.on { background: transparent; color: var(--ink); border-bottom-color: var(--forest-2); box-shadow: none; }
.df-tabs button:not(.on):hover { color: var(--ink); box-shadow: none; border-bottom-color: var(--line); }
.dict-filters { grid-template-columns: minmax(0, 1fr); }
.df-chips { min-width: 0; }
.df-chips .type-filters { scrollbar-width: thin; padding-bottom: 4px; }

/* ---------- home: three ways to learn, three shapes ---------- */
.hg-head { align-items: center; gap: 12px; flex-wrap: nowrap; }
.hg-head > div { display: flex; align-items: baseline; gap: 4px 14px; flex-wrap: wrap; }
.hg-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--hgc-soft); color: var(--hgc); }
.hg-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hg-guided { --hgc: #2f7a58; --hgc-soft: color-mix(in srgb, #2f7a58 16%, var(--card)); }
.hg-steps { --hgc: #6a55a8; --hgc-soft: color-mix(in srgb, #6a55a8 16%, var(--card)); }
.hg-free { --hgc: #c0782f; --hgc-soft: color-mix(in srgb, #c0782f 16%, var(--card)); }
:root[data-theme="dark"] .hg-guided { --hgc: #7dbd9c; } :root[data-theme="dark"] .hg-steps { --hgc: #a996e0; } :root[data-theme="dark"] .hg-free { --hgc: #e0a070; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hg-guided { --hgc: #7dbd9c; } :root:not([data-theme="light"]) .hg-steps { --hgc: #a996e0; } :root:not([data-theme="light"]) .hg-free { --hgc: #e0a070; } }
.home-group { margin-bottom: 34px; }

/* Guided: arrow-shaped signposts along a dashed trail */
.trail { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 18px 16px; border-radius: 18px; background: var(--hgc-soft); }
.trail::before { content: ''; position: absolute; left: 24px; right: 24px; top: 50%; border-top: 2px dashed color-mix(in srgb, var(--hgc) 45%, transparent); }
.sign { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 34px 14px 14px; min-height: 76px; background: var(--card); color: var(--ink); text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%); border-radius: 10px 0 0 10px; box-shadow: inset 4px 0 0 var(--hgc); transition: transform .2s, background .2s; }
.sign:hover { transform: translateX(4px); background: color-mix(in srgb, var(--hgc) 8%, var(--card)); }
.sign-icon { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--hgc-soft); color: var(--hgc); }
.sign-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sign-body { display: grid; line-height: 1.3; min-width: 0; }
.sign-body b { font-family: var(--serif); font-size: 1.1rem; }
.sign-body span { color: var(--ink-2); font-size: .86rem; }

/* Step by step: a staircase — each step a little higher than the one before */
.stairs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; align-items: end; }
.stair-li { padding-top: calc((3 - var(--i)) * 22px); }
.stair { position: relative; display: grid; gap: 4px; padding: 16px 16px 18px; height: 100%; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-right: 0; border-bottom: 4px solid var(--hgc); border-radius: 0; transition: background .2s, transform .2s; }
.stair-li:first-child .stair { border-radius: 14px 0 0 0; }
.stair-li:last-child .stair { border-right: 1px solid var(--line); border-radius: 0 14px 0 0; }
.stair:hover { background: var(--hgc-soft); transform: translateY(-3px); }
.stair-num { position: absolute; top: -13px; left: 14px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--hgc); color: var(--card); font-weight: 800; font-size: .8rem; box-shadow: 0 0 0 3px var(--paper); }
.stair .vt-icon { width: 40px; height: 40px; border-radius: 12px; margin: 6px 0 2px; --vc: var(--hgc); }
.stair b { font-family: var(--serif); font-size: 1.15rem; }
.stair-text { color: var(--ink-2); font-size: .86rem; line-height: 1.35; }

/* Your own way: smaller cards scattered loosely, like things on a table */
.free-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 6px 4px; }
.free-card { display: grid; justify-items: start; gap: 2px; padding: 14px; text-align: left; font: inherit; color: var(--ink); text-decoration: none; cursor: pointer; background: var(--card); border: 1px dashed color-mix(in srgb, var(--hgc) 45%, var(--line)); border-radius: 14px; transform: rotate(var(--r, 0deg)); transition: transform .25s cubic-bezier(.3,1.4,.5,1), box-shadow .2s; }
.free-card:nth-child(1) { --r: -1.6deg; } .free-card:nth-child(2) { --r: 1.2deg; translate: 0 6px; } .free-card:nth-child(3) { --r: -.8deg; } .free-card:nth-child(4) { --r: 1.8deg; translate: 0 4px; }
.free-card:hover { transform: rotate(0) scale(1.03); box-shadow: var(--shadow); }
.free-card .vt-icon { width: 34px; height: 34px; border-radius: 10px; margin-bottom: 4px; --vc: var(--hgc); }
.free-card .vt-icon svg { width: 18px; height: 18px; }
.free-card b { font-size: 1rem; }
.free-card > span:last-child { color: var(--ink-2); font-size: .82rem; display: inline-flex; align-items: center; gap: 4px; }
.free-card .jar { width: 16px; height: 16px; }

@media (max-width: 760px) {
  .trail { grid-template-columns: 1fr; gap: 10px; }
  .trail::before { left: 34px; right: auto; top: 18px; bottom: 18px; border-top: 0; border-left: 2px dashed color-mix(in srgb, var(--hgc) 45%, transparent); }
  .stairs { grid-template-columns: 1fr; gap: 14px; padding-left: 14px; border-left: 3px solid var(--hgc-soft); }
  .stair-li { padding-top: 0; }
  .stair, .stair-li:first-child .stair, .stair-li:last-child .stair { border: 1px solid var(--line); border-left: 4px solid var(--hgc); border-radius: 12px; grid-template-columns: 40px 1fr; column-gap: 12px; align-items: center; padding: 12px 14px; }
  .stair .vt-icon { grid-row: span 2; margin: 0; }
  .stair-num { top: 50%; left: -29px; transform: translateY(-50%); }
  .free-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Real stairs: every step stands on the same floor and the next one is taller */
@media (min-width: 761px) { .stairs { align-items: stretch; } .stair-li { display: flex; } .stair-li .stair { flex: 1; align-content: start; } }

/* The part switch never jumps: a fixed spot at the top right (below the title on phones) */
.route-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.route-top > div:first-child { min-width: 0; }
@media (max-width: 760px) { .route-top { grid-template-columns: minmax(0, 1fr); } .part-switch { justify-self: start; } }
.route-top { align-items: start; }
.route-top .part-switch { margin-top: 4px; }

/* Settings page */
.settings-btn { display: inline-grid; place-items: center; text-decoration: none; color: var(--ink-2); }
.settings-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s; }
.settings-btn:hover svg { transform: rotate(60deg); }
.settings-btn.on { background: var(--forest-soft); color: var(--forest); border-color: var(--forest-2); }
.set-group { margin-bottom: 16px; }
.set-group h2 { font-size: 1.2rem; margin-bottom: 4px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.set-group h2 + .set-row { border-top: 0; }
.set-text { display: grid; gap: 2px; min-width: 0; }
.set-text b { font-weight: 600; }
.set-text span { color: var(--ink-2); font-size: .88rem; line-height: 1.4; }
.set-row .switch { flex: none; margin: 0; }
.seg { display: inline-flex; flex: none; padding: 3px; gap: 2px; border-radius: 99px; background: var(--paper-2); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; border-radius: 99px; padding: 5px 12px; font-weight: 600; font-size: .86rem; color: var(--ink-2); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.settings-link b { font-size: 1.1rem; }
@media (max-width: 560px) { .set-row { align-items: flex-start; } .set-row:has(.seg) { flex-direction: column; align-items: stretch; } }
/* In-between widths: the top bar stays on one line */
@media (min-width: 961px) and (max-width: 1200px) { .topbar { gap: 10px; } .tabs { gap: 4px; } .tabs a { padding-left: 9px; padding-right: 9px; gap: 5px; } .lang-chip span:not(.flag-no) { display: none; } .lang-chip { padding: 6px 9px; } .top-right { gap: 6px; } }
@media (min-width: 961px) and (max-width: 1060px) { .tabs a svg { display: none; } /* (the whole name stays visible: Lingu + ark) */ }

/* Grammar sidebar: Grammar words + Notebook as two small cards at the top */
.gr-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.gr-tool { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 9px 10px; border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--tc-soft); border: 1px solid color-mix(in srgb, var(--tc) 30%, var(--line)); transition: transform .15s, border-color .15s; }
.gr-tool:hover { transform: translateY(-2px); border-color: var(--tc); }
.gr-tool > span { grid-row: span 2; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--card); color: var(--tc); font-family: var(--serif); font-weight: 700; font-size: .95rem; }
.gr-tool b { font-size: .86rem; line-height: 1.2; }
.gr-tool small { font-size: .72rem; color: var(--ink-2); line-height: 1.25; }
.gr-tool.t-terms { --tc: var(--fjord); --tc-soft: var(--fjord-soft); }
.gr-tool.t-notes { --tc: #6a55a8; --tc-soft: color-mix(in srgb, #6a55a8 12%, var(--card)); }
.gr-list { max-height: calc(100vh - 310px); }
.gr-layout.folded .gr-tools { display: none; }
@media (max-width: 980px) { .gr-tools { grid-template-columns: 1fr 1fr; } .gr-list { max-height: 50vh; } }@media (min-width: 981px) { .gr-tools { grid-template-columns: 1fr; gap: 6px; } .gr-tool { padding: 7px 10px; } .gr-list { max-height: calc(100vh - 360px); } }

/* Page title with a "?" that explains the page */
.title-q { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.title-q h1 { margin: 0 0 .1em; }
.title-q .help-q { width: 30px; height: 30px; font-size: .95rem; }
.page-head .title-q + .lead, .page-head .title-q + p { margin-top: 8px; }
.help-intro { color: var(--ink-2); margin-bottom: 14px; }
.help-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.help-tools .gr-tool { padding: 12px; }
.help-tools .gr-tool b { font-size: .95rem; }
.help-tools .gr-tool small { font-size: .8rem; }
@media (max-width: 520px) { .help-tools { grid-template-columns: 1fr; } }
/* Settings: word question options (tick boxes and choices with a "Recommended" label) */
.set-sub { padding: 12px 0 4px; border-top: 1px solid var(--line); }
.set-sub-h { margin: 0 0 10px; display: grid; gap: 2px; }
.set-sub-h span { color: var(--ink-2); font-size: .86rem; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; margin-bottom: 8px; }
.opt { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--ink-3); }
.opt.on { border-color: var(--forest-2); background: var(--forest-soft); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-box { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 2px solid var(--ink-3); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.opt.radio .opt-box { border-radius: 50%; }
.opt.on .opt-box { background: var(--forest-2); border-color: var(--forest-2); }
.opt.on .opt-box::after { content: '✓'; color: #fff; font-size: .72rem; font-weight: 800; }
.opt.radio.on .opt-box::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.opt input:focus-visible + .opt-box { outline: 2px solid var(--fjord); outline-offset: 2px; }
.opt-text { display: grid; gap: 2px; min-width: 0; }
.opt-text b { font-weight: 600; font-size: .95rem; }
.opt-text > span { color: var(--ink-2); font-size: .84rem; line-height: 1.35; }
.rec { font-style: normal; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--forest); background: color-mix(in srgb, var(--forest-2) 18%, var(--card)); border-radius: 99px; padding: 2px 7px; margin-left: 4px; vertical-align: 1px; white-space: nowrap; }
.ans-pick .muted a { color: var(--forest); font-weight: 600; text-decoration: none; white-space: nowrap; }
/* Lessons: the main button stays in one spot — Check under the answer, Continue in its place,
   feedback below it */
.ln-act { margin-top: 14px; min-height: 46px; }
.ln-act:empty { min-height: 0; margin: 0; }
.ln-q .ln-choices + .ln-act:empty { display: none; }
.ln-fb:not(:empty) { margin-top: 12px; }
.drill .d-actions { margin-top: 12px; }
.drill .d-fb:not(:empty) { margin-top: 12px; }

/* Chapter words: all together or one by one */
.wc-view { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; font-size: .9rem; color: var(--ink-2); }
.word-cards.one { display: block; max-width: 520px; }
.word-cards.one .word-card { display: none; }
.word-cards.one .word-card.cur { display: block; }
.word-cards.one .word-card.slide { animation: wcSlide .3s cubic-bezier(.2,.7,.3,1); }
@keyframes wcSlide { from { opacity: 0; transform: translateX(18px); } }
.wc-step { display: flex; align-items: center; gap: 12px; margin: 12px 0 16px; max-width: 520px; }
.wc-step .wc-count { flex: 1; text-align: center; color: var(--ink-2); font-weight: 600; font-size: .9rem; }

/* Writing the words: resistance when you scroll back up to the cards */
.drill-host { position: relative; will-change: transform; }
.drill-host.springing { transition: transform .38s cubic-bezier(.3,1.5,.5,1); }
.wc-back-bar { --p: 0; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 0 0 12px; padding: 8px 12px; border: 1px dashed color-mix(in srgb, var(--forest-2) calc(30% + var(--p) * 70%), var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--forest-soft) calc(var(--p) * 100%), transparent); color: var(--ink-2); font-size: .88rem; font-weight: 600; opacity: calc(.55 + var(--p) * .45); transition: opacity .2s, background .2s; }
.wc-back-bar span { display: inline-block; transform: translateY(calc(var(--p) * -4px)); color: var(--forest); }
.wc-back-bar:hover, .wc-back-bar.live { opacity: 1; color: var(--ink); }
/* Fill-the-gap difficulty: hard hides the (word) until a wrong try */
.ex-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ex-head .ex-title { margin: 0; }
.ex-level button { padding: 4px 11px; font-size: .82rem; }
.exercise.hard .ex-item:not(.ex-peek):not(.solved) .ex-meta .hint { display: none; }
.exercise.hard .ex-item.ex-peek .ex-meta .hint { animation: wcSlide .3s ease; }
/* "Continue, I got this!" — the way back down to the questions */
.wc-back-bar.down { margin: 18px 0 4px; }
#sec-0.springing { transition: transform .38s cubic-bezier(.2,.9,.3,1.2); }
#sec-0 { will-change: transform; }
.drill-host.resting > :not(.wc-back-bar) { opacity: .55; transition: opacity .3s; }
.drill-host > :not(.wc-back-bar) { transition: opacity .3s; }.wc-back-bar.down span { transform: translateY(calc(var(--p) * 4px)); }

/* Me: the hub for your journey, postcards, cabin and settings */
.v-tile.t-cards { --vc: #2d6f9e; } .v-tile.t-set { --vc: #6b6f76; }
.me-tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.me-sub { font-size: 1.15rem; margin: 26px 0 12px; }.gr-links { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 6px; padding: 6px 0 8px; border-bottom: 1px solid var(--line); }
.gr-links a { display: flex; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; color: var(--ink-2); font-size: .86rem; font-weight: 600; text-decoration: none; }
.gr-links a:hover { background: var(--paper-2); color: var(--ink); }
.gr-links span { width: 1.4em; text-align: center; color: var(--forest); font-weight: 700; }@media (max-width: 560px) {
  .v-tiles.me-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .me-tiles .v-tile { padding: 14px; gap: 4px; }
  .me-tiles .v-tile > span:not(.vt-icon):not(.vt-go) { display: none; }
  .me-tiles .v-tile b { font-size: 1.02rem; }
}@media (max-width: 560px) {
  .me-tiles .v-tile { display: flex; flex-direction: column; align-items: flex-start; }
  .me-tiles .v-tile .vt-go { display: none; }
  .me-tiles .v-tile b { margin-top: 6px; }
}.w-compare { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--line); }
.w-compare .kicker { margin: 0 0 4px; }
.w-compare p { margin: 4px 0; font-size: .92rem; }
.w-cmp-words { font-size: 1.05rem !important; }
.w-cmp-ex { color: var(--ink); }
/* Levels 11–20 of the vocabulary path */
:root { --t11: #2f7a6e; --t12: #5a6fb0; --t13: #9a5a3a; --t14: #3d8a5a; --t15: #2a6a8a; --t16: #8a4f8a; --t17: #a8642a; --t18: #4f6f3a; --t19: #6a4fa8; --t20: #b0802a; }
.t11 { --tc: var(--t11); } .t12 { --tc: var(--t12); } .t13 { --tc: var(--t13); } .t14 { --tc: var(--t14); } .t15 { --tc: var(--t15); } .t16 { --tc: var(--t16); } .t17 { --tc: var(--t17); } .t18 { --tc: var(--t18); } .t19 { --tc: var(--t19); } .t20 { --tc: var(--t20); }
/* 20 level medals: a wrapping grid instead of one squeezed row */
.card .medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px 6px; }
.card .medals .medal-line { display: none; }
.card .medals .medal-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.card .medals .medal-wrap small { font-size: .72rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* Vocab lesson cards: the Next button keeps one place on the screen */
.learn.cards { display: flex; flex-direction: column; min-height: calc(100svh - 190px); }
.learn.cards .ln-nav { margin-top: auto; padding-top: 16px; position: sticky; bottom: 0; background: linear-gradient(transparent, var(--paper) 35%); padding-bottom: 10px; z-index: 2; }
@media (max-width: 760px) { .learn.cards { min-height: calc(100svh - 240px); } .learn.cards .ln-nav { bottom: 62px; } }
.ln-new { color: var(--forest); font-size: .95rem; letter-spacing: .02em; }
.ln-diff > summary::after { content: none; }
.ln-diff-more { color: var(--fjord); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.ln-diff[open] .ln-diff-more { display: none; }
.ln-diff-note { margin: 8px 0 4px; color: var(--ink); line-height: 1.5; }
.ln-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; padding: 12px 16px; border-radius: 12px; background: var(--paper-2); }
.ln-opt { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.ln-opt input { margin-top: 3px; accent-color: var(--forest); width: 17px; height: 17px; }
.ln-opt span { display: flex; flex-direction: column; font-size: .9rem; }
.ln-opt small { color: var(--ink-3); font-size: .78rem; }
.ln-opt em { font-style: normal; font-size: .7rem; font-weight: 700; color: var(--forest); background: var(--forest-soft); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.ln-opt.soon { opacity: .6; cursor: default; }
.ln-opt-more { margin-left: auto; color: var(--forest); font-weight: 600; font-size: .86rem; text-decoration: none; }
.ln-toov { display: inline-block; margin-bottom: 8px; font-size: .86rem; }
/* Me: the cabin, front and centre */
.me-cabin { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: stretch; margin: 6px 0 16px; border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid color-mix(in srgb, #b27b12 35%, var(--line)); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.me-cabin:hover { transform: translateY(-2px); }
.me-cabin-scene { position: relative; min-height: 190px; display: block; }
.me-cabin-scene .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.me-cabin-bear { position: absolute; left: 50%; bottom: 4%; width: 34%; max-width: 150px; transform: translateX(-50%); }
.me-cabin-bear svg { width: 100%; height: auto; display: block; }
.me-cabin-text { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.me-cabin-text small { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: #b27b12; }
.me-cabin-text > b { font-family: var(--serif); font-size: 1.45rem; }
.me-cabin-text > span:not(.me-cabin-honey):not(.vt-go) { color: var(--ink-2); font-size: .92rem; }
.me-cabin-honey { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin-top: 4px; }
.me-cabin-honey .jar { width: 34px; height: 34px; }
.me-cabin-honey b { font-size: 1.5rem; font-family: var(--serif); color: #b27b12; }
.me-cabin .vt-go { margin-top: auto; color: #b27b12; font-weight: 700; }
@media (max-width: 560px) { .me-cabin { grid-template-columns: minmax(0, 1fr); } .me-cabin-scene { min-height: 170px; } }
/* Top bar: a "Map" pill next to the honey, and a little more room between the buttons. */
.top-right { gap: 12px; }
.map-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px 0 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; transition: background .2s, color .2s, border-color .2s; }
.map-btn:hover { background: var(--paper-2); color: var(--ink); }
.map-btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.map-btn.on { background: var(--forest-soft); color: var(--forest); border-color: var(--forest-2); }
@media (min-width: 961px) and (max-width: 1200px) { .top-right { gap: 8px; } .map-btn span { display: none; } .map-btn { width: 34px; padding: 0; justify-content: center; } }
@media (max-width: 520px) { .top-right { gap: 7px; } .map-btn span { display: none; } .map-btn { width: 34px; padding: 0; justify-content: center; } }
/* Slang & idioms pages */
.v-tile.t-slang { --vc: #c4553a; }
.prio-note { margin: 10px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--paper-2); border-left: 3px solid #c0782f; font-size: .92rem; color: var(--ink-2); }
.prio-note.good { border-left-color: var(--forest); }
.prio-note a { color: var(--forest); font-weight: 600; }
.ln-slang { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, #c4553a 10%, var(--card)); font-size: .9rem; color: var(--ink-2); }
.ln-slang .ln-slang-tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #c4553a; margin-right: 6px; }@media (max-width: 760px) { .learn .ln-nav { padding-right: 70px; } }
/* ---- Lesson questions: the answer field / choices always sit in the same place ---- */
.learn, .lesson-done { max-width: 820px; }
.learn.quiz { position: relative; }
.ln-prompt { min-height: 172px; display: flex; flex-direction: column; justify-content: center; }
.ln-prompt > :last-child { margin-bottom: 0; }
.ln-prompt .ln-q-word { margin-bottom: 0; }
.ln-answer { padding-top: 6px; }
.ln-choices .choice { min-height: 58px; }
/* The "Godt i gang!" cheer floats over the top instead of pushing the question down. */
.learn.quiz > .d-cheer { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); z-index: 4; margin: 0; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.14); border: 1px solid color-mix(in srgb, var(--forest-2) 35%, var(--line)); animation: cheerFloat 2.6s ease forwards; pointer-events: none; }
@keyframes cheerFloat { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.9); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -6px); } }
@media (max-width: 760px) { .ln-prompt { min-height: 150px; } .learn.quiz > .d-cheer { white-space: normal; width: max-content; max-width: calc(100% - 20px); } }

/* ---- Picked up where you left off ---- */
.ln-resumed { max-width: 820px; margin: 0 auto 10px; display: flex; gap: 10px; align-items: center; font-size: .88rem; color: var(--ink-2); }
.ln-resumed span { background: var(--fjord-soft); color: var(--fjord); padding: 3px 10px; border-radius: 99px; font-weight: 600; }
.resume-card { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; padding: 14px 18px; border-radius: 16px; text-decoration: none; color: var(--ink); background: var(--card); border: 1.5px solid color-mix(in srgb, var(--fjord) 45%, var(--line)); box-shadow: 0 4px 16px color-mix(in srgb, var(--fjord) 12%, transparent); transition: transform .2s, box-shadow .2s; }
.resume-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px color-mix(in srgb, var(--fjord) 20%, transparent); }
.rc-icon { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--fjord); color: #fff; font-size: 1.3rem; font-weight: 700; }
.rc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-text b { font-size: 1.02rem; }
.rc-text span { color: var(--ink-2); font-size: .88rem; }
.rc-go { margin-left: auto; color: var(--fjord); font-weight: 700; white-space: nowrap; }
@media (max-width: 520px) { .rc-go { display: none; } }

/* ---- End of a lesson: the bar that fills up ---- */
.lesson-done { text-align: left; }
.lesson-done > .kicker { color: var(--forest); }
.grow { margin: 16px 0 18px; padding: 14px 16px 16px; border-radius: 14px; background: var(--paper-2); border: 1px solid var(--line); transition: box-shadow .35s, border-color .35s, background .35s; }
.grow-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: .92rem; }
.grow-plus { font-weight: 800; color: #fff; background: var(--forest); padding: 1px 9px; border-radius: 99px; font-size: .8rem; opacity: 0; transform: scale(.6); transition: opacity .3s 1.2s, transform .4s cubic-bezier(.3,1.6,.5,1) 1.2s; }
.grow.go .grow-plus { opacity: 1; transform: none; }
.grow-num { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.grow-num b { color: var(--ink); font-size: 1.05rem; }
.grow-bar { position: relative; height: 14px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 9%, transparent); overflow: hidden; }
.grow-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.grow-old { width: var(--from); background: var(--forest); }
.grow-new { width: var(--from); background: linear-gradient(90deg, #5fbf6e, #9be07a); transition: width 1.1s cubic-bezier(.25,.8,.3,1) .35s; }
.grow.go .grow-new { width: var(--to); }
.grow-new::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.65) 50%, transparent 80%); transform: translateX(-100%); }
.grow.go .grow-new::after { animation: growShine 1s ease-out 1.4s; }
.grow-more { width: var(--to); background: repeating-linear-gradient(-45deg, color-mix(in srgb, #f0b429 55%, transparent) 0 6px, color-mix(in srgb, #f0b429 30%, transparent) 6px 12px); opacity: 0; transition: width .5s cubic-bezier(.3,1.3,.5,1), opacity .3s; }
@keyframes growShine { to { transform: translateX(100%); } }
/* Pointing at "Learn 10 more!": the bar lights up and shows where ten more would take you. */
.lesson-done:has(.learn-more:hover, .learn-more:focus-visible) .grow,
.grow.boost { border-color: #f0b429; background: color-mix(in srgb, #f0b429 12%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, #f0b429 25%, transparent), 0 0 24px color-mix(in srgb, #f0b429 35%, transparent); }
.lesson-done:has(.learn-more:hover, .learn-more:focus-visible) .grow-more,
.grow.boost .grow-more { width: var(--more); opacity: 1; animation: moreMarch .8s linear infinite; }
.lesson-done:has(.learn-more:hover, .learn-more:focus-visible) .grow-new::after { animation: growShine 1.1s ease-in-out infinite; }
@keyframes moreMarch { to { background-position: 17px 0; } }
.grow.boost .grow-bar { animation: growPulse .42s ease; }
@keyframes growPulse { 50% { transform: scaleY(1.35); } }
.btn.learn-more { position: relative; overflow: hidden; }
.btn.learn-more::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%); transform: translateX(-100%); }
.btn.learn-more:hover::after { animation: growShine .9s ease-out; }
.g-grow:empty { display: none; }
.g-grow .grow { margin: 6px 0 14px; }
@media (prefers-reduced-motion: reduce) { .grow-new { transition: none; } .grow.go .grow-new::after, .grow-more { animation: none !important; } }

/* ---- Top bar: theme lives in Settings now ---- */
#themeBtn { display: none; }

/* ---- "Don't mix up" / "Same meaning": one clear card per word ---- */
.w-compare { padding: 14px 16px 12px; background: var(--card); border: 1.5px solid color-mix(in srgb, #c0782f 45%, var(--line)); }
.w-compare.same { border-color: color-mix(in srgb, var(--forest-2) 50%, var(--line)); }
.cmp-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px !important; font-size: 1rem !important; }
.cmp-badge { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: #c0782f; font-size: 1rem; line-height: 1; }
.w-compare.same .cmp-badge { background: var(--forest); }
.cmp-cards { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.cmp-sep { align-self: center; font-weight: 800; color: #c0782f; font-size: 1.1rem; }
.w-compare.same .cmp-sep { color: var(--forest); }
.cmp-card { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); font: inherit; cursor: pointer; transition: border-color .2s, transform .2s; position: relative; }
button.cmp-card:hover { border-color: var(--forest-2); transform: translateY(-1px); }
.cmp-card.me { cursor: default; background: var(--forest-soft); border-color: var(--forest-2); }
.cmp-no { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--forest); line-height: 1.2; }
.cmp-en { font-weight: 600; font-size: .92rem; color: var(--ink); }
.cmp-ex { display: flex; flex-direction: column; margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: .86rem; color: var(--ink); }
.cmp-ex small { color: var(--ink-3); font-size: .8rem; }
.cmp-me { position: absolute; top: 8px; right: 10px; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--forest); }
.cmp-note { margin: 10px 0 0 !important; color: var(--ink-2); }
@media (max-width: 560px) { .cmp-cards { flex-direction: column; } .cmp-sep { display: none; } .cmp-card { flex-basis: auto; } }
/* The tip inside a lesson card: each word with its meaning. */
.ln-diff li { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-top: 1px solid color-mix(in srgb, var(--fjord) 20%, transparent); }
.ln-diff li:first-child { border-top: 0; }
.ln-diff-w { display: flex; align-items: baseline; gap: 8px; }
.ln-diff-w b { font-size: 1.05rem; }
.ln-diff-en { font-weight: 600; color: var(--ink); }
.ln-diff-en::before { content: '= '; color: var(--ink-3); font-weight: 400; }
.ld-btns { margin: 4px 0 22px; }
.ld-words { margin: 0 0 8px; }
.grow-plus { color: #10301c; background: #9be07a; }

/* ---- Grammar page, tidied: "Grammar ?" on top, the lesson between its neighbours ---- */
.gr-page-title { margin-bottom: 14px; }
.gr-head { margin-top: 4px; }
.gr-head .kicker a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
.gr-head .kicker a:hover { text-decoration-color: currentColor; }
.gr-topic { font-family: var(--serif); font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.15; margin: 0 0 .25em; }
.gr-head .title-q { margin-bottom: 10px; }
.gr-near { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px dashed var(--line); transition: border-color .2s, background .2s, transform .2s; }
.gr-near:hover { border-style: solid; border-color: var(--forest-2); background: var(--paper-2); }
.gr-near.prev { margin: 0 0 18px; opacity: .85; }
.gr-near.prev:hover { opacity: 1; transform: translateY(-1px); }
.gr-near.next { margin: 26px 0 8px; padding: 14px 18px; border-style: solid; border-color: color-mix(in srgb, var(--forest-2) 45%, var(--line)); }
.gr-near.next:hover { transform: translateY(1px); }
.gr-near-arrow { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); font-weight: 700; }
.gr-near.next .gr-near-arrow { background: var(--forest); color: #fff; }
.gr-near-text { display: flex; flex-direction: column; min-width: 0; }
.gr-near-text small { color: var(--ink-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.gr-near-text b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-near.next .gr-near-text b { font-family: var(--serif); font-size: 1.15rem; }
.gr-near-go { margin-left: auto; font-size: .85rem; font-weight: 700; color: var(--forest); white-space: nowrap; }
.gr-near.prev .gr-near-go { color: var(--ink-3); font-weight: 600; }
@media (max-width: 520px) { .gr-near-go { display: none; } }
/* "What you're learning" lights up softly when you tap the lesson's "?". */
.g-intro { scroll-margin-top: 90px; }
.g-intro.glow { animation: introGlow 1.6s ease-out; }
@keyframes introGlow {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fjord) 0%, transparent); }
  25% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--fjord) 35%, transparent), 0 0 22px color-mix(in srgb, var(--fjord) 30%, transparent); border-color: var(--fjord); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .g-intro.glow { animation: none; outline: 2px solid var(--fjord); } }/* A plain ampersand, not the curly serif one. */
.amp { font-family: var(--sans); font-weight: 500; font-style: normal; font-size: .82em; color: var(--ink-2); }

/* ---- Slang sets: their own tiles (long titles wrap, the tag never covers them) ---- */
.slang-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 14px; border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); transition: transform .2s, border-color .2s; min-width: 0; }
.slang-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, #c4553a 55%, var(--line)); }
.slang-tile.next { border: 1.5px solid #c4553a; box-shadow: 0 4px 14px color-mix(in srgb, #c4553a 15%, transparent); }
.st-top { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.st-top small { font-size: .74rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.st-tag { margin-left: auto; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: #c4553a; color: #fff; white-space: nowrap; }
.st-tag.done { background: var(--forest-soft); color: var(--forest); }
.st-title { font-family: var(--serif); font-size: 1.12rem; line-height: 1.25; overflow-wrap: anywhere; }
.st-words { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 4px; }
.st-words span { font-size: .8rem; padding: 2px 8px; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); }
.slang-tile .thin-bar { margin-top: auto; }

/* ---- Grammar: small previous / next buttons, left and right ---- */
.gr-nearrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gr-nearrow.top { margin: 0 0 14px; }
.gr-nearrow.bottom { margin: 26px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.gr-near, .gr-near.prev, .gr-near.next { display: inline-flex; align-items: center; gap: 8px; max-width: 48%; margin: 0; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); border-style: solid; background: var(--card); opacity: 1; font-size: .85rem; box-shadow: none; }
.gr-near.next { margin-left: auto; text-align: right; }
.gr-near:hover, .gr-near.prev:hover, .gr-near.next:hover { transform: none; border-color: var(--forest-2); background: var(--paper-2); }
.gr-near.next:hover .gr-near-arrow { transform: translateX(2px); }
.gr-near.prev:hover .gr-near-arrow { transform: translateX(-2px); }
.gr-near-arrow, .gr-near.next .gr-near-arrow { width: auto; height: auto; border-radius: 0; background: none; color: var(--forest); font-weight: 700; transition: transform .2s; }
.gr-near-text small { font-size: .66rem; }
.gr-near-text b, .gr-near.next .gr-near-text b { font-family: var(--sans); font-size: .85rem; font-weight: 600; }
@media (max-width: 520px) { .gr-near-text b { max-width: 34vw; } }
/* The slide between lessons. */
.gr-main.gr-leave-next { animation: grOutL .17s ease-in forwards; }
.gr-main.gr-leave-prev { animation: grOutR .17s ease-in forwards; }
.gr-main.gr-enter-next { animation: grInR .28s cubic-bezier(.2,.8,.3,1); }
.gr-main.gr-enter-prev { animation: grInL .28s cubic-bezier(.2,.8,.3,1); }
@keyframes grOutL { to { opacity: 0; transform: translateX(-28px); } }
@keyframes grOutR { to { opacity: 0; transform: translateX(28px); } }
@keyframes grInR { from { opacity: 0; transform: translateX(28px); } }
@keyframes grInL { from { opacity: 0; transform: translateX(-28px); } }
.gr-main { overflow-x: clip; }

/* ---- "Grammar words, explained": a big tile in lesson 1, a small one in the "?" ---- */
.terms-tile { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; padding: 18px 20px; border-radius: 16px; text-decoration: none; color: var(--ink); background: linear-gradient(135deg, var(--fjord-soft), var(--card)); border: 1.5px solid color-mix(in srgb, var(--fjord) 40%, var(--line)); transition: transform .2s, box-shadow .2s; }
.terms-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 22px color-mix(in srgb, var(--fjord) 18%, transparent); }
.tt-icon { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--fjord); color: #fff; }
.tt-icon svg, .gr-tool > span svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tt-icon svg { width: 30px; height: 30px; }
.tt-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tt-text b { font-family: var(--serif); font-size: 1.25rem; }
.tt-text small { font-size: .9rem; color: var(--ink-2); line-height: 1.45; }
.tt-go { margin-left: auto; font-weight: 700; color: var(--fjord); white-space: nowrap; }
@media (max-width: 520px) { .terms-tile { flex-wrap: wrap; } .tt-go { margin-left: 68px; } }
.help-tools { grid-template-columns: minmax(0, 320px); }
.help-tools .gr-tool { padding: 8px 12px; }
.help-tools .gr-tool b { font-size: .88rem; }
.help-tools .gr-tool small { font-size: .74rem; }
.gr-tool > span svg { width: 18px; height: 18px; }.gr-near, .gr-near.prev, .gr-near.next { border-radius: 12px; }
.tt-text small b { font-family: var(--sans); font-size: 1em; }

/* ---- Top bar spacing: the main tabs further apart, the buttons on the right closer together ---- */
@media (min-width: 1201px) { .tabs { gap: 14px; } }
@media (min-width: 961px) and (max-width: 1200px) { .tabs { gap: 9px; } }
@media (min-width: 761px) and (max-width: 960px) { .tabs { gap: 8px; } }
.top-right { gap: 6px; }
@media (max-width: 520px) { .top-right { gap: 5px; } }

/* ---- Bjørn's "Kjør!" after a lesson ---- */
.dock-bubble.hype { animation: hypePop .5s cubic-bezier(.3,1.6,.5,1); }
.dock-bubble.hype strong { font-size: 1.15em; color: var(--forest); }
@keyframes hypePop { from { opacity: 0; transform: translateY(8px) scale(.8); } }

/* ---- Grammar rules you can see: a sentence cut into slots ---- */
.g-note.has-vis h4 { margin-bottom: 8px; }
.gv { margin: 10px 0 4px; }
.gv + .gv { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.gv-say { margin: 0 0 10px; line-height: 1.5; }
.gv-grid { display: grid; grid-template-columns: repeat(var(--cols), max-content); gap: 6px 6px; align-items: stretch; }
.gv-h { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 0 4px 2px; align-self: end; white-space: nowrap; }
.gv-h i, .gv-h em { text-transform: none; }
.gv-c { padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: .98rem; background: color-mix(in srgb, var(--gc) 13%, var(--card)); border: 1px solid color-mix(in srgb, var(--gc) 32%, var(--line)); color: var(--ink); white-space: nowrap; }
.gv-c.empty { background: transparent; border-style: dashed; color: var(--ink-3); text-align: center; font-weight: 400; }
.gv-en { grid-column: 1 / -1; margin: -2px 0 8px 4px; font-size: .82rem; color: var(--ink-3); font-style: italic; }
.gv-grid .c0 { --gc: #2b7c86; } .gv-grid .c1 { --gc: #2f8a52; } .gv-grid .c2 { --gc: #c06a24; } .gv-grid .c3 { --gc: #6a55a8; } .gv-grid .c4 { --gc: #8a7a5c; }
.gv-h.hl { color: var(--gc); }
.gv-c.hl { background: color-mix(in srgb, var(--gc) 26%, var(--card)); border: 2px solid var(--gc); }.gv-c { padding: 6px 11px; }
.gv-grid .gv-c:not(.hl) { background: color-mix(in srgb, var(--gc) 18%, var(--card)); }
@media (max-width: 600px) {
  .gv-grid { grid-template-columns: repeat(var(--cols), minmax(0, auto)); gap: 4px; }
  .gv-c { white-space: normal; overflow-wrap: anywhere; padding: 5px 7px; font-size: .86rem; }
  .gv-h { white-space: normal; font-size: .6rem; padding: 0 2px 2px; }
}@media (max-width: 600px) { .gv-c { overflow-wrap: break-word; hyphens: auto; } }

/* ================= COLOUR SYSTEM (see COLOURS.md) =================
   One colour per AREA — the same as its tab — and a few STATUS colours that mean the same everywhere.
   Areas:  home rose · vocabulary teal · grammar purple · review orange · me blue · journey green · honey amber
   Status: right/progress = forest green · wrong = berry red · almost/hint = fjord blue · watch out = caution amber */
:root {
  --c-home: #a3486a; --c-vocab: #2b7c86; --c-grammar: #6a55a8; --c-review: #c06a24;
  --c-me: #2f6fa8; --c-journey: #2f7a58; --c-honey: #b27b12; --c-caution: #b8702c;
}
:root[data-theme="dark"] { --c-home: #e08aab; --c-vocab: #6fc0c9; --c-grammar: #b3a2e6; --c-review: #e9a06a; --c-me: #8db8de; --c-journey: #8cc7a8; --c-honey: #e6b84a; --c-caution: #e6a46a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c-home: #e08aab; --c-vocab: #6fc0c9; --c-grammar: #b3a2e6; --c-review: #e9a06a; --c-me: #8db8de; --c-journey: #8cc7a8; --c-honey: #e6b84a; --c-caution: #e6a46a; } }

/* Tiles take the colour of the area they lead to. */
.v-tile.t-dict, .v-tile.t-learn, .v-tile.t-slang, .v-tile.t-idioms, .v-tile.t-blitz, .v-tile.t-survival { --vc: var(--c-vocab); }
.v-tile.t-grammar { --vc: var(--c-grammar); }
.v-tile.t-review { --vc: var(--c-review); }
.v-tile.t-today, .v-tile.t-how, .v-tile.t-chat { --vc: var(--c-home); }
.v-tile.t-route, .v-tile.t-cards, .v-tile.t-postcards { --vc: var(--c-journey); }
.v-tile.t-cabin { --vc: var(--c-honey); }
.v-tile.t-set { --vc: var(--c-me); }

/* Words (vocabulary): new words, word lessons, slang, picking up a word lesson. */
.ln-new { color: var(--c-vocab); }
.resume-card { border-color: color-mix(in srgb, var(--c-vocab) 45%, var(--line)); box-shadow: 0 4px 16px color-mix(in srgb, var(--c-vocab) 12%, transparent); }
.resume-card:hover { box-shadow: 0 8px 22px color-mix(in srgb, var(--c-vocab) 20%, transparent); }
.rc-icon { background: var(--c-vocab); }
.rc-go { color: var(--c-vocab); }
.ln-resumed span { background: color-mix(in srgb, var(--c-vocab) 14%, var(--card)); color: var(--c-vocab); }
.slang-tile:hover { border-color: color-mix(in srgb, var(--c-vocab) 55%, var(--line)); }
.slang-tile.next { border-color: var(--c-vocab); box-shadow: 0 4px 14px color-mix(in srgb, var(--c-vocab) 15%, transparent); }
.st-tag { background: var(--c-vocab); color: var(--card); }
.ln-slang { background: color-mix(in srgb, var(--c-vocab) 10%, var(--card)); }
.ln-slang .ln-slang-tag { color: var(--c-vocab); }
.w-compare.same { border-color: color-mix(in srgb, var(--c-vocab) 50%, var(--line)); }
.w-compare.same .cmp-badge { background: var(--c-vocab); }
.w-compare.same .cmp-sep { color: var(--c-vocab); }
/* Words you might mix up: "watch out". */
.w-compare.mix { border-color: color-mix(in srgb, var(--c-caution) 45%, var(--line)); }
.w-compare.mix .cmp-badge { background: var(--c-caution); }
.w-compare.mix .cmp-sep { color: var(--c-caution); }
.ln-diff { border-left-color: var(--c-caution); background: color-mix(in srgb, var(--c-caution) 9%, var(--card)); }
.ln-diff-head, .ln-diff-more { color: var(--c-caution); }
.ln-diff li { border-top-color: color-mix(in srgb, var(--c-caution) 22%, transparent); }

/* Grammar: rules, "what you're learning", grammar words. */
.g-intro { background: linear-gradient(160deg, color-mix(in srgb, var(--c-grammar) 11%, var(--card)), var(--card)); border-color: color-mix(in srgb, var(--c-grammar) 28%, var(--line)); }
.g-intro .kicker { color: var(--c-grammar); }
.term-chip { border-color: color-mix(in srgb, var(--c-grammar) 40%, var(--line)); color: var(--c-grammar); }
.term-chip:hover { background: color-mix(in srgb, var(--c-grammar) 10%, var(--card)); }
@keyframes introGlow {
  0% { box-shadow: 0 0 0 0 transparent; }
  25% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-grammar) 35%, transparent), 0 0 22px color-mix(in srgb, var(--c-grammar) 30%, transparent); border-color: var(--c-grammar); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.g-note { background: color-mix(in srgb, var(--c-grammar) 8%, var(--card)); border-left-color: var(--c-grammar); }
.g-note .tag { color: var(--c-grammar); }
.terms-tile { background: linear-gradient(135deg, color-mix(in srgb, var(--c-grammar) 12%, var(--card)), var(--card)); border-color: color-mix(in srgb, var(--c-grammar) 40%, var(--line)); }
.terms-tile:hover { box-shadow: 0 8px 22px color-mix(in srgb, var(--c-grammar) 18%, transparent); }
.tt-icon { background: var(--c-grammar); color: var(--card); }
.tt-go { color: var(--c-grammar); }
.gr-tool.t-terms { --tc: var(--c-grammar); --tc-soft: color-mix(in srgb, var(--c-grammar) 12%, var(--card)); }
.gv-h.hl { color: var(--c-grammar); }
.gv-c.hl { border-color: var(--c-grammar); background: color-mix(in srgb, var(--c-grammar) 20%, var(--card)); }
/* The other slots stay quiet, so only the slot the rule is about stands out. */
.gv-grid .gv-c:not(.hl) { background: var(--paper-2); border-color: var(--line); }
.gv-grid .gv-c.empty { background: transparent; }

/* ---- Norwegian in 1 hour ---- */
.surv-hero { display: flex; align-items: center; gap: 16px; margin: 6px 0 8px; }
.surv-hero h1 { margin: 0; }
.surv-hero .kicker { color: var(--c-vocab); margin: 0 0 4px; }
.surv-clock { position: relative; width: 72px; height: 72px; flex: none; display: grid; place-items: center; }
.surv-clock svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.surv-clock .sc-bg { fill: color-mix(in srgb, var(--c-vocab) 10%, var(--card)); stroke: color-mix(in srgb, var(--c-vocab) 20%, var(--line)); stroke-width: 6; }
.surv-clock .sc-fg { fill: none; stroke: var(--c-vocab); stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray .8s; }
.surv-clock b { position: relative; font-family: var(--serif); font-size: 1.35rem; line-height: 1; color: var(--c-vocab); margin-top: -6px; }
.surv-clock small { position: absolute; bottom: 17px; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.v-tile.t-survival { min-height: 0; border: 1.5px solid color-mix(in srgb, var(--c-vocab) 45%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--c-vocab) 10%, var(--card)), var(--card) 70%); }
.v-tile.t-survival .surv-clock { width: 60px; height: 60px; }
.v-tile.t-survival .surv-clock b { font-size: 1.1rem; }
.v-tile.t-survival .surv-clock small { bottom: 13px; font-size: .55rem; }
.surv-tile-text { display: flex; flex-direction: column; gap: 4px; }
.surv-tile-text b { font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; }
.surv-tile-text span { color: var(--ink-2); font-size: .92rem; }
@media (min-width: 761px) { .v-tile.t-survival { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 18px; } .v-tile.t-survival .vt-go { margin: 0; } }
/* ---- A "Your turn" exercise solved: glow, stamp, confetti ---- */
.exercise { position: relative; }
.exercise.ex-won { animation: exWon 1.2s ease-out; border-color: color-mix(in srgb, var(--forest-2) 60%, var(--line)); }
@keyframes exWon {
  0% { box-shadow: 0 0 0 0 transparent; }
  20% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--forest-2) 35%, transparent), 0 0 26px color-mix(in srgb, var(--forest-2) 30%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.ex-stamp { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--forest-2) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--forest-2) 40%, var(--line)); position: relative; animation: stampIn .45s cubic-bezier(.3,1.6,.5,1); }
.ex-stamp-tick { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--forest-2); color: var(--card); font-weight: 800; animation: tickSpin .6s cubic-bezier(.3,1.6,.5,1) .1s both; }
.ex-stamp b { font-family: var(--serif); font-size: 1.15rem; color: var(--forest); }
.ex-stamp small { margin-left: auto; font-weight: 700; color: var(--c-honey); font-size: .85rem; animation: stampIn .4s .35s both; }
@keyframes stampIn { from { opacity: 0; transform: translateY(8px) scale(.92); } }
@keyframes tickSpin { from { transform: scale(0) rotate(-120deg); } }
.ex-burst { position: absolute; left: 29px; top: 50%; width: 0; height: 0; pointer-events: none; }
.ex-burst i { position: absolute; width: 8px; height: 8px; margin: -4px; border-radius: 2px; background: var(--c); transform: rotate(var(--a)) translateX(0) scale(var(--s)); opacity: 0; animation: burst 1s cubic-bezier(.2,.7,.3,1) forwards; }
.ex-burst i:nth-child(odd) { border-radius: 50%; }
@keyframes burst {
  0% { opacity: 1; transform: rotate(var(--a)) translateX(4px) scale(var(--s)); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateX(var(--d)) translateY(14px) scale(calc(var(--s) * .6)) rotate(200deg); }
}
@media (prefers-reduced-motion: reduce) { .exercise.ex-won, .ex-stamp, .ex-stamp-tick, .ex-stamp small { animation: none; } }
/* ---- Dictionary: noun forms, and æ ø å in the search bar ---- */
.v-search .letters { flex: none; }
.v-search .letter { width: 30px; height: 30px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.v-search .letter:hover, .field .letter:hover { background: color-mix(in srgb, var(--c-vocab) 16%, var(--card)); color: var(--c-vocab); }
.nf-table { width: 100%; }
.nf-table thead th { text-align: left; font-size: .8rem; }
.nf-table thead th small, .nf-table tbody th small { display: block; font-weight: 400; color: var(--ink-3); font-size: .74rem; text-transform: none; letter-spacing: 0; }
.nf-table td b { font-size: 1.05rem; color: var(--c-vocab); }
.nf-table td small { display: block; color: var(--ink-3); font-size: .78rem; }
.noun-forms p.small { margin-top: 10px; line-height: 1.5; }
.ln-forms > span[lang] { color: var(--ink-2); margin-right: 8px; }
/* ---- Home: look up any word, right at the top ---- */
.home-search { position: relative; max-width: 760px; margin: 4px auto 26px; }
.home-search .hs-box { max-width: none; margin: 0; background: var(--card); border: 2px solid color-mix(in srgb, var(--c-vocab) 40%, var(--line)); border-radius: 16px; padding: 0 16px; box-shadow: 0 6px 22px color-mix(in srgb, var(--c-vocab) 10%, transparent); transition: border-color .2s, box-shadow .2s; }
.home-search .hs-box:focus-within { border-color: var(--c-vocab); box-shadow: 0 8px 28px color-mix(in srgb, var(--c-vocab) 22%, transparent); }
.home-search .hs-box > svg { width: 22px; height: 22px; color: var(--c-vocab); }
.home-search .hs-box input { font-size: 1.15rem; padding: 16px 0; }
.hs-try { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 4px 0; font-size: .86rem; color: var(--ink-3); }
.hs-try button { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 99px; padding: 3px 11px; font-size: .84rem; cursor: pointer; }
.hs-try button:hover { border-color: var(--c-vocab); color: var(--c-vocab); }
.hs-try a { margin-left: auto; color: var(--c-vocab); font-weight: 600; text-decoration: none; }
.hs-results { list-style: none; margin: 8px 0 0; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.14); }
.hs-results li + li { border-top: 1px solid var(--line); }
.hs-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); column-gap: 14px; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 10px; font: inherit; color: var(--ink); cursor: pointer; }
.hs-row:hover, .hs-row:focus-visible { background: color-mix(in srgb, var(--c-vocab) 9%, var(--card)); }
.hs-row b { font-family: var(--serif); font-size: 1.08rem; color: var(--c-vocab); }
.hs-row span { color: var(--ink-2); }
.hs-row small { grid-column: 2; color: var(--ink-3); font-size: .8rem; }
.hs-form { padding: 10px 12px; font-size: .92rem; background: color-mix(in srgb, var(--c-vocab) 8%, var(--card)); border-radius: 10px; }
.hs-none { padding: 12px; color: var(--ink-3); }
.hs-all { width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; font: inherit; font-weight: 600; color: var(--c-vocab); cursor: pointer; border-radius: 10px; }
.hs-all:hover { background: color-mix(in srgb, var(--c-vocab) 9%, var(--card)); }
@media (max-width: 560px) { .hs-row { grid-template-columns: minmax(0, 1fr); } .hs-row small { grid-column: 1; } .hs-try a { margin-left: 0; width: 100%; } .home-search { margin-bottom: 18px; } }
/* The search button in the top bar (an icon on small screens). */
.search-btn.on { background: color-mix(in srgb, var(--c-vocab) 14%, var(--card)); color: var(--c-vocab); border-color: var(--c-vocab); }
@media (max-width: 1200px) { .search-btn span { display: none; } .search-btn { width: 34px; padding: 0; justify-content: center; } }


/* ---- The tour: the welcome in the middle; then each part lit up (the rest dimmed) with a small
   card right beside it, pointing at it — never on top of it ---- */
.sheet-wrap.tour { background: rgba(14, 20, 18, .55); align-items: center; padding: 16px; }
.sheet-wrap.tour.lit { background: transparent; pointer-events: none; display: block; padding: 0; transition: opacity .2s, background-color .18s; }
.sheet-wrap.tour .sheet { pointer-events: auto; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.sheet-wrap.tour .guide-sheet { width: min(400px, calc(100vw - 24px)); padding: 22px 22px 16px; height: auto; overflow: visible; }
.sheet-wrap.tour.lit .guide-sheet { position: fixed; margin: 0; width: min(340px, calc(100vw - 24px)); padding: 16px 18px 14px; transition: opacity .18s ease, transform .18s ease; }
.sheet-wrap.tour .guide { display: flex; flex-direction: column; align-items: center; text-align: center; }
.sheet-wrap.tour .guide-bear { height: 110px; margin: 0 0 4px; }
.sheet-wrap.tour.lit .guide { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; text-align: left; align-items: start; }
.sheet-wrap.tour.lit .guide-bear { grid-row: span 3; height: 58px; width: 58px; margin: 2px 0 0; }
.sheet-wrap.tour .guide h2 { font-size: 1.45rem; margin: 0 0 .3em; }
.sheet-wrap.tour.lit .guide h2 { font-size: 1.15rem; }
.sheet-wrap.tour .kicker { margin: 0 0 2px; }
.sheet-wrap.tour .guide-text { min-height: 0; margin: 0 0 4px; font-size: .95rem; color: var(--ink-2); }
.sheet-wrap.tour.lit .guide-text { font-size: .9rem; }
.sheet-wrap.tour .guide-link { min-height: 0; grid-column: 1 / -1; }
.sheet-wrap.tour .guide-link:empty { display: none; }
.sheet-wrap.tour .guide-nav { grid-column: 1 / -1; align-self: stretch; margin-top: 12px; padding-top: 12px; }
.sheet-wrap.tour .sheet-x { top: 8px; right: 8px; }
/* The little arrow from the card to the lit part. */
.guide-sheet .tour-arrow { display: none; }
.sheet-wrap.tour.lit .tour-arrow { display: block; position: absolute; left: var(--ax, 50%); width: 16px; height: 16px; margin-left: -8px; background: var(--card); transform: rotate(45deg); border: 1px solid var(--line); }
.sheet-wrap.tour.lit .guide-sheet.below .tour-arrow { top: -9px; border-right: 0; border-bottom: 0; }
.sheet-wrap.tour.lit .guide-sheet.above .tour-arrow { bottom: -9px; border-left: 0; border-top: 0; }
.tour-hole { position: fixed; z-index: 59; border-radius: 16px; pointer-events: none;
  box-shadow: 0 0 0 3px var(--c-honey), 0 0 26px 6px color-mix(in srgb, var(--c-honey) 55%, transparent), 0 0 0 200vmax rgba(14, 20, 18, .58);
  transition: opacity .18s ease; animation: holeGlow 1.8s ease-in-out infinite; }
@keyframes holeGlow { 50% { box-shadow: 0 0 0 4px var(--c-honey), 0 0 40px 12px color-mix(in srgb, var(--c-honey) 70%, transparent), 0 0 0 200vmax rgba(14, 20, 18, .58); } }
@media (prefers-reduced-motion: reduce) { .tour-hole { animation: none; transition: none; } .sheet-wrap.tour.lit .guide-sheet { transition: none; } }
/* ---- Home on a computer: search, Bjørn and today's session all fit on the first screen ---- */
@media (min-width: 961px) {
  #view:has(> .home-search) { padding-top: 22px; }
  .home-search { margin: 0 auto 18px; }
  .home-search .hs-box input { padding: 12px 0; }
  .hs-try { margin-top: 7px; }
  .home-hero { grid-template-columns: 230px 1fr; gap: 28px; margin-bottom: 30px; }
  .home-hero .bjorn.hero { width: 180px; }
  .home-hero .bubble.big strong { font-size: 1.08rem; }
  .home-today { padding: 20px 24px; }
  .home-today h1 { font-size: clamp(1.55rem, 2.6vw, 2.05rem); margin-bottom: .2em; }
  .home-today .lead { margin-bottom: 10px; }
  .home-today .today-mini { margin-bottom: 12px; }
  .home-today .journey { margin-bottom: 14px; padding: 9px 14px; }
  .home-today .j-part { width: auto; margin-right: 4px; }
}
/* Short laptop screens: a little tighter still. */
@media (min-width: 961px) and (max-height: 700px) {
  #view:has(> .home-search) { padding-top: 14px; }
  .home-search { margin-bottom: 12px; }
  .home-search .hs-box input { padding: 10px 0; font-size: 1.05rem; }
  .home-hero .bjorn.hero { width: 150px; }
  .home-today { padding: 16px 22px; }
  .home-today .btn.big { padding-top: 10px; padding-bottom: 10px; }
}
/* ---- Bjørn peeking over the Home buttons: never clipped ---- */
.home-group .sign, .home-group .stair, .home-group .free-card { overflow: visible; }
.home-group .peek { z-index: 4; }
.brand-head { width: 40px; height: 36px; object-fit: contain; }

/* ---- Habit plan: a line on Home, a card on "How to learn" ---- */
.plan-line { display: inline-flex; align-items: center; gap: 8px; margin: -2px 0 10px; padding: 4px 12px 4px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c-home) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--c-home) 30%, var(--line)); color: var(--ink-2); font-size: .86rem; text-decoration: none; max-width: 100%; }
.plan-line span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-line b { color: var(--c-home); }
.plan-cta { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 18px; border-radius: 16px; text-decoration: none; color: var(--ink); background: linear-gradient(135deg, color-mix(in srgb, var(--c-home) 12%, var(--card)), var(--card)); border: 1.5px solid color-mix(in srgb, var(--c-home) 40%, var(--line)); transition: transform .2s, box-shadow .2s; }
.plan-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 22px color-mix(in srgb, var(--c-home) 16%, transparent); }
.pc-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background: var(--card); border: 1px solid var(--line); }
.pc-text { display: flex; flex-direction: column; gap: 2px; }
.pc-text b { font-family: var(--serif); font-size: 1.15rem; }
.pc-text span { color: var(--ink-2); font-size: .92rem; }
.pc-go { margin-left: auto; font-weight: 700; color: var(--c-home); white-space: nowrap; }
@media (max-width: 560px) { .pc-go { display: none; } }

/* ---- The planner page ---- */
.plan { max-width: 860px; margin: 0 auto; }
.plan-laws { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.plan-laws li { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); }
.plan-laws b { color: var(--ink); font-size: .92rem; }
.pl-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--lc) 16%, var(--card)); color: var(--lc); }
.pl-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.law-obvious { --lc: #2d6f9e; } .law-attractive { --lc: #c4553a; } .law-easy { --lc: #2f8a52; } .law-satisfying { --lc: #b27b12; }
@media (max-width: 760px) { .plan-laws { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan-step { margin-top: 18px; padding: 22px 24px; }
.plan-step[class*="law-"] { border-top: 4px solid var(--lc); }
.plan-step[class*="law-"] > .kicker { color: var(--lc); }
.plan-step h2 { margin: 2px 0 6px; }
.plan-step h3 { font-size: .95rem; margin: 18px 0 8px; }
.plan-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 8px 13px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.plan-chip small { font-weight: 400; color: var(--ink-3); font-size: .76rem; }
.plan-chip:hover { border-color: color-mix(in srgb, var(--forest-2) 60%, var(--line)); }
.plan-chip.on { border-color: var(--forest-2); background: var(--forest-soft); color: var(--forest); }
.plan-own { margin-top: 8px; width: min(420px, 100%); padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; }
.plan-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin-top: 16px; }
.plan-row label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
.plan-row-label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.plan-time { padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 1.05rem; }
.plan-sentence { margin: 18px 0 4px; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--lc) 9%, var(--card)); border-left: 4px solid var(--lc); font-size: 1.05rem; }
.plan-sentence b { color: var(--lc); }
.plan-tips, .plan-ideas { margin: 12px 0 0; padding-left: 20px; color: var(--ink-2); font-size: .92rem; display: grid; gap: 6px; }
.plan-ideas:empty { display: none; }
.plan-note { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--paper-2); font-size: .92rem; color: var(--ink-2); }
.plan-forecast { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.plan-forecast div { padding: 12px; border-radius: 12px; background: var(--paper-2); display: flex; flex-direction: column; gap: 2px; }
.plan-forecast b { font-family: var(--serif); font-size: 1.4rem; color: var(--forest); }
.plan-forecast span { font-size: .82rem; color: var(--ink-2); }
.plan-track { display: flex; gap: 8px; margin: 10px 0 4px; flex-wrap: wrap; }
.plan-track span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .78rem; color: var(--ink-3); }
.plan-track i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); border: 1.5px dashed var(--line); font-style: normal; font-weight: 800; }
.plan-track .on i { background: var(--forest-2); border: 0; color: var(--card); }
.plan-week { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.plan-week li { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 12px; background: var(--paper-2); font-size: .82rem; color: var(--ink-2); }
.plan-week li.weekend { background: color-mix(in srgb, var(--c-home) 9%, var(--card)); }
.plan-week b { color: var(--ink); font-size: .86rem; }
.plan-week small { color: var(--forest); font-weight: 600; }
@media (max-width: 860px) { .plan-week { grid-template-columns: minmax(0, 1fr); } .plan-week li { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; } .plan-week b { min-width: 90px; } .plan-forecast { grid-template-columns: minmax(0, 1fr); } }
.plan-card { margin: 22px 0 10px; padding: 24px; border-radius: 20px; background: linear-gradient(140deg, color-mix(in srgb, var(--forest-2) 16%, var(--card)), var(--card)); border: 1.5px solid color-mix(in srgb, var(--forest-2) 45%, var(--line)); }
.plan-card .kicker { color: var(--forest); }
.plan-big { font-family: var(--serif); font-size: 1.35rem; line-height: 1.4; margin: 6px 0 14px; }
.plan-big b { color: var(--forest); }
.plan-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 0 0 16px; }
.plan-dl div { padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.plan-dl dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.plan-dl dd { margin: 2px 0 0; font-weight: 600; }
.plan-saved { margin: 10px 0 0; }.sign-wrap { position: relative; display: grid; }
.sign-wrap:hover { z-index: 5; }

/* ---- Bjørn's face (the real one, looking at you): logo, chat button, chat window ---- */
.brand-head, .dock-face, .chat-face { display: inline-block; flex: none; line-height: 0; }
.brand-head { width: 46px; height: 40px; }
.dock-face { width: 40px; height: 35px; }
.chat-face { width: 50px; height: 44px; }
.brand-head svg, .dock-face svg, .chat-face svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 1px 1px rgba(60, 35, 15, .18)); }
.brand:hover .brand-head svg { transform: rotate(-6deg) scale(1.06); transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.brand-head svg { transition: transform .25s ease; }/* The mascot bust is square. */
.brand-head { width: 44px; height: 44px; }
.dock-face { width: 38px; height: 38px; }
.chat-face { width: 50px; height: 50px; }
/* Bjørn's face marks where you are on the journey bar. */
.j-face { position: relative; z-index: 1; width: 28px; height: 28px; line-height: 0; }
.j-face svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
@media (max-width: 520px) { .j-face { width: 22px; height: 22px; } }
.m-bear svg { overflow: visible; filter: drop-shadow(0 2px 2px rgba(0,0,0,.28)); }

/* ---- Review / Today / route drill: the question has a fixed height, so the answer box and the
   Check / Continue button are always in the same place; the cheer floats over the top ---- */
.drill { position: relative; }
.drill .d-q { min-height: 124px; display: flex; flex-direction: column; justify-content: center; }
.drill .d-q > :last-child { margin-bottom: 0; }
.drill > .d-cheer { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); z-index: 4; margin: 0; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.14); animation: cheerFloat 2.6s ease forwards; pointer-events: none; }
@media (max-width: 760px) { .drill .d-q { min-height: 150px; } .drill > .d-cheer { white-space: normal; width: max-content; max-width: calc(100% - 20px); } }

/* ---- Route word cards, one by one: the card area keeps the height of the tallest card ---- */
.word-cards.one { align-content: start; }
/* Phones: compact dots, so Back, the dots and Next always fit in one row. */
.guide-nav .dots { min-width: 0; flex-wrap: nowrap; }
@media (max-width: 560px) { .guide-nav { gap: 8px; } .guide-nav .dots { gap: 3px; } .guide-nav .dots i { width: 5px; height: 5px; } .guide-nav .dots i.on { width: 12px; } }

/* ---- Beginner Home: the other ways to learn, folded until the first full session ---- */
.more-ways { margin: 6px 0 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.more-ways > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 16px 20px; border-radius: 18px; }
.more-ways > summary::-webkit-details-marker { display: none; }
.more-ways > summary:hover { background: var(--paper-2); }
.mw-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.mw-sub { grid-column: 1; color: var(--ink-2); font-size: .9rem; }
.mw-chev { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 1.1rem; color: var(--ink-3); transition: transform .25s; }
.more-ways[open] .mw-chev { transform: rotate(180deg); }
.more-ways[open] { padding: 0 16px 6px; }
.more-ways[open] > summary { margin: 0 -16px 10px; }

/* ---- A tip from Bjørn, once per page ---- */
.page-tip { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 10px 12px 10px 10px; border-radius: 14px; background: color-mix(in srgb, var(--c-home) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--c-home) 28%, var(--line)); animation: popIn .35s; }
.pt-face { width: 40px; height: 40px; flex: none; line-height: 0; }
.pt-face svg { width: 100%; height: 100%; overflow: visible; }
.page-tip p { margin: 0; flex: 1; font-size: .93rem; line-height: 1.45; }
.pt-ok { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.pt-ok:hover { color: var(--ink); border-color: var(--ink-3); }

/* ---- "Bjørn approves": ready tags and the one-time note ---- */
.ready-tag { display: inline-block; align-self: flex-start; margin-top: 2px; font-size: .74rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
.ready-tag.wait { background: var(--paper-2); color: var(--ink-3); }
.ready-tag.ok { background: var(--forest-soft); color: var(--forest); }
.approve-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 12px 16px 12px 12px; border-radius: 16px; text-decoration: none; color: var(--ink); background: linear-gradient(135deg, color-mix(in srgb, var(--forest-2) 16%, var(--card)), var(--card)); border: 1.5px solid color-mix(in srgb, var(--forest-2) 50%, var(--line)); animation: popIn .4s; }
.ab-face { width: 46px; height: 46px; flex: none; line-height: 0; }
.ab-face svg { width: 100%; height: 100%; overflow: visible; }
.ab-text { flex: 1; font-size: .95rem; }
.ab-text b:first-child { color: var(--forest); }
.ab-go { font-weight: 700; color: var(--forest); white-space: nowrap; }
@media (max-width: 520px) { .ab-go { display: none; } }

/* ---- Every page: title + "?", then one clear main button ---- */
.page-main { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.page-head .title-q + .muted, .page-head .title-q + .lead { margin-top: 6px; }
.surv-hero .title-q h1 { margin: 0; }

/* ---- Less text up front ---- */
.how-short { margin: 12px 0 4px; padding: 14px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.how-short .kicker { margin: 0 0 6px; }
.how-short ol { margin: 0 0 6px; padding-left: 22px; display: grid; gap: 4px; font-size: 1.02rem; }
.how-short p { margin: 0; }
.g-readmore { margin-top: 2px; font-weight: 600; }
/* While the tour runs, short pages get room to scroll the lit part (and its card) into view. */
body.touring { padding-bottom: 60vh; }

/* ---- The corner is always the small "Chat" button; Bjørn's bubble (hello, "Kjør!") sits above it ---- */
.dock.compact { flex-direction: column; align-items: flex-end; }
.dock.compact .dock-bubble:not([hidden]) { display: block; position: absolute; right: 0; bottom: calc(100% + 10px); margin: 0; width: max-content; max-width: 240px; border-radius: 16px 16px 4px 16px; }
.dock.compact .dock-bubble::after { right: 22px; bottom: -6px; transform: rotate(45deg); }.dock.compact .dock-bubble strong, .dock.compact .dock-bubble small { display: block; }
.dock.compact .dock-bubble { padding: 10px 14px; }
/* Bjørn's site guide: an answer can take you there. */
.chat-go { display: inline-block; margin-top: 8px; padding: 5px 12px; border-radius: 99px; background: var(--forest-2); color: var(--card); font-weight: 700; font-size: .84rem; text-decoration: none; }
.chat-go:hover { filter: brightness(1.08); }

/* ---- Lesson 0 and the help line in Bjørn's tips ---- */
.why-grammar { margin: 14px 0 10px; padding: 16px 18px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--c-grammar) 11%, var(--card)), var(--card)); border: 1px solid color-mix(in srgb, var(--c-grammar) 30%, var(--line)); }
.why-grammar .kicker { color: var(--c-grammar); margin: 0 0 6px; }
.why-grammar ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.why-grammar .page-main { margin-top: 14px; }
.gr-item.gr-zero .gr-num { background: var(--c-grammar); color: var(--card); }
.pt-help { display: block; margin-top: 4px; font-size: .84rem; color: var(--ink-2); }
.pt-help .link { font-size: inherit; font-weight: 700; }/* "Did you mean …?" — a few buttons under Bjørn's answer. */
.chat-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chat-choices .chat-go { margin: 0; }
.chat-go.alt { background: var(--card); color: var(--forest); border: 1.5px solid var(--forest-2); cursor: pointer; font: inherit; font-weight: 700; font-size: .84rem; }

/* Grammar lessons: one part at a time, a compact head, "2.1:" in front of the part's heading. */
.gr-titlebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin-bottom: 10px; }
.gr-titlebar .title-q { margin-bottom: 0; }
.gr-titlebar .gr-actions { margin: 0; }
.gr-titlebar .gr-actions .btn { margin-bottom: 0; }
.gr-main .g-intro { margin-bottom: 12px; }
.gr-main .g-intro .g-what { margin-bottom: 6px; }
.gr-main .g-why { margin-bottom: 8px; }
.gr-main .ch-body > .ch-sec { padding-top: 0; margin-top: 0; border-top: 0; }
.gr-main .gr-subnav { margin-bottom: 0; }
.g-group > :first-child { margin-top: 6px; }
.g-group > .g-ahead + * { margin-top: 10px; }
.g-num { color: var(--c-grammar, var(--forest)); font-variant-numeric: tabular-nums; margin-right: .1em; }
.g-parttitle { margin: 6px 0 10px; }
.g-whylist { margin: 4px 0 2px; padding-left: 1.2em; color: var(--ink-2); font-size: .94rem; }
.g-whylist li { margin: 3px 0; }
.g-whylist b { color: var(--ink); }
.g-group .term-grid { margin-top: 8px; }
/* All parts of a lesson on one page: a clear break between 2.1 and 2.2. */
.g-group + .g-group { margin-top: 30px; padding-top: 18px; border-top: 1px dashed var(--line); }

/* ---------- From the Gemini remix: the 2-minute version, the 14-day rhythm, cognates ---------- */
.quick-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: .9rem; font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; cursor: pointer; }
.quick-link:hover, .quick-link.on { color: var(--ink); text-decoration-color: currentColor; }
.quick-done { margin: 10px 0 0; font-size: .9rem; color: var(--ink-2); }
.quick-card { margin-top: 12px; padding: 16px 18px; border-radius: 16px; border: 1.5px solid color-mix(in srgb, var(--c-honey, #d99b2b) 55%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--c-honey, #d99b2b) 10%, var(--card)), var(--card)); }
.quick-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.quick-head .kicker { margin: 0; }
.quick-timer { font: 700 1rem var(--serif); padding: 2px 12px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--c-honey, #d99b2b) 55%, var(--line)); background: var(--card); font-variant-numeric: tabular-nums; }

.rhythm { margin: 4px 0 14px; }
.rh-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; margin: 0 0 6px; font-size: .82rem; }
.rh-head b { color: var(--ink); }
.rh-head span { color: var(--ink-3); }
.rh-days { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.rh-days li { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .62rem; color: var(--ink-3); }
.rh-days i { width: 100%; max-width: 26px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 7px; font-style: normal; font-weight: 800; font-size: .7rem; border: 1.5px solid var(--line); background: var(--card); color: #fff; }
.rh-days .full i { background: var(--forest-2); border-color: var(--forest); color: var(--card); }
.rh-days .quick i { background: var(--c-honey, #d99b2b); border-color: color-mix(in srgb, var(--c-honey, #d99b2b) 70%, #000); color: var(--card); }
.rh-days .some i { background: color-mix(in srgb, var(--forest-2) 22%, var(--card)); }
.rh-days .rh-back i { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c-honey, #d99b2b) 70%, transparent); }
.rh-days .today i { border-style: dashed; border-color: var(--fjord); }
.rh-days .today.full i, .rh-days .today.quick i { border-style: solid; }
@media (max-width: 420px) { .rh-days { gap: 3px; } .rh-days span { display: none; } }

.cognate { position: relative; margin: 0 0 22px; padding: 20px 22px; border-radius: 20px; border: 1.5px solid color-mix(in srgb, var(--forest-2) 40%, var(--line)); background: linear-gradient(155deg, color-mix(in srgb, var(--forest) 8%, var(--card)), var(--card)); }
.cognate h2 { margin: 2px 0 6px; padding-right: 30px; }
.cog-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; }
.cog-x:hover { background: var(--paper-2); color: var(--ink); }
.cog-words { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; margin: 14px 0 6px; }
.cog-w { display: inline-flex; flex-direction: column; align-items: center; min-width: 54px; padding: 7px 11px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
.cog-w:hover { transform: translateY(-2px); border-color: var(--forest-2); }
.cog-w b { font: 700 1.25rem var(--serif); color: var(--forest); }
.cog-w small { font-size: .78rem; color: var(--ink-3); }
.cog-w.on { border-color: var(--forest-2); background: var(--forest-soft); }
.cog-w.on small { color: var(--ink); font-weight: 600; }
.cog-dot { font: 700 1.25rem var(--serif); color: var(--forest); padding-bottom: 22px; }
.cog-note { min-height: 1.4em; margin: 4px 0 12px; }


.quick-btn { border-color: color-mix(in srgb, var(--c-honey) 55%, var(--line)); color: var(--ink); }
.quick-btn:hover, .quick-btn.on { border-color: var(--c-honey); background: color-mix(in srgb, var(--c-honey) 12%, var(--card)); }
.today-head .row-btns { margin-top: 10px; }
.today-head .rhythm { margin: 12px 0 4px; }
.quick-gram .qg-s { font: 600 1.2rem var(--serif); margin: 6px 0 2px; }
.qg-in { font: inherit; width: auto; min-width: 4ch; margin: 0 4px; padding: 2px 8px; border: 0; border-bottom: 2px solid var(--line); border-radius: 6px 6px 0 0; background: var(--paper-2); color: var(--ink); text-align: center; }
.qg-in:focus { outline: none; border-bottom-color: var(--c-grammar); }
.qg-in.right { border-bottom-color: var(--forest-2); color: var(--forest); }
.qg-in.wrong { border-bottom-color: var(--berry, #c0504a); }
.qg-fb { margin: 8px 0 0; min-height: 1.2em; }
/* The frame and the card are pinned to the page (not the screen): they scroll along with the lit
   part as if they were part of it. A new step fades them in softly at their new place. */
.sheet-wrap.tour.lit.docpos { position: absolute; top: 0; left: 0; right: auto; bottom: auto; width: 100%; height: 0; overflow: visible; }
.sheet-wrap.tour.lit.docpos .guide-sheet { position: absolute; }
.tour-hole.docpos { position: absolute; }
.tour-hole.tour-in { animation: tourHoleIn .35s ease-out, holeGlow 1.8s ease-in-out .35s infinite; }
.sheet-wrap.tour.lit .guide-sheet.tour-in { animation: tourCardIn .3s ease-out; }
@keyframes tourHoleIn { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
@keyframes tourCardIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tour-hole.tour-in, .sheet-wrap.tour.lit .guide-sheet.tour-in { animation: none; } }
/* ---------- Home in three layers: 1 today's session (the heart), 2 your lessons, 3 everything else ---------- */
/* 1 · Today: the biggest, boldest block — with a small "start here" label. */
.home-today { position: relative; border: 2px solid color-mix(in srgb, var(--forest-2) 55%, var(--line)); box-shadow: 0 10px 34px color-mix(in srgb, var(--forest) 16%, transparent); }
.tier-tag { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 99px; background: var(--forest-soft); color: var(--forest); font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* 2 · Your lessons: two medium cards, side by side. */
.home-lessons { margin: 0 0 30px; }
.tier-head { margin: 0 0 12px; }
.tier-head h2 { margin: 0 0 2px; font-size: 1.35rem; }
.tier-head p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.lesson-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lesson-card { --lc: var(--forest); position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px 22px 18px; border-radius: 18px; border: 1.5px solid color-mix(in srgb, var(--lc) 35%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--lc) 9%, var(--card)), var(--card) 70%); color: var(--ink); text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .15s; }
.lesson-card:hover { transform: translateY(-2px); border-color: var(--lc); box-shadow: 0 8px 24px color-mix(in srgb, var(--lc) 18%, transparent); }
.lesson-card.lc-words { --lc: var(--c-vocab); }
.lesson-card.lc-grammar { --lc: var(--c-grammar); }
.lc-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--lc) 15%, var(--card)); color: var(--lc); margin-bottom: 4px; }
.lc-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lc-kicker { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lc); }
.lesson-card b { font: 600 1.3rem var(--serif); }
.lc-text { color: var(--ink-2); font-size: .93rem; }
.lc-prog { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 4px; }
.lc-prog small { color: var(--ink-3); font-size: .8rem; }
.lc-bar { display: block; height: 7px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.lc-bar i { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: var(--lc); }
.lc-go { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--lc); }
@media (max-width: 640px) { .lesson-cards { grid-template-columns: 1fr; gap: 12px; } }

/* 3 · More ways to learn: open by default, small and quiet tiles. */
.more-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; padding: 0 0 12px; }
.more-tile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s; }
.more-tile:hover { border-color: var(--forest-2); background: var(--forest-soft); }
.mt-icon { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--paper-2); color: var(--ink-2); }
.mt-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mt-text { display: flex; flex-direction: column; min-width: 0; }
.mt-text b { font-size: .92rem; font-weight: 600; }
.mt-text small { color: var(--ink-3); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .more-tiles { grid-template-columns: 1fr 1fr; } .mt-icon { display: none; } }
@media (max-width: 640px) { .lesson-card { padding: 14px 16px 12px; gap: 2px; } .lc-icon { display: none; } .lesson-card b { font-size: 1.15rem; } .lc-prog { margin: 6px 0 2px; } .tier-head h2 { font-size: 1.2rem; } }

/* ---------- The last step of the welcome: how much Norwegian do you know? ---------- */
.level-pick { align-self: stretch; display: grid; gap: 8px; margin: 10px 0 2px; text-align: left; }
.lvl { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.lvl:hover, .lvl:focus-visible { border-color: var(--forest-2); background: var(--forest-soft); transform: translateX(2px); }
.lvl b { font-size: 1rem; }
.lvl small { grid-column: 1; color: var(--ink-3); font-size: .82rem; }
.lvl-go { grid-row: 1 / 3; grid-column: 2; color: var(--forest); font-weight: 700; }
/* After the first lesson: "Nå gjør vi det til en vane!" */
.habit-invite .hi-en { margin: -4px 0 8px; color: var(--forest); font-weight: 600; }
.habit-invite .hi-btns { justify-content: center; margin-top: 8px; }

/* ---------- The habit plan: an orange "!" until it's finished ---------- */
.todo-mark { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--c-caution, #b8702c); color: #fff; font: 800 .78rem/1 var(--sans); vertical-align: middle; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-caution, #b8702c) 22%, transparent); }
.plan-line.todo { border-color: color-mix(in srgb, var(--c-caution, #b8702c) 45%, var(--line)); background: color-mix(in srgb, var(--c-caution, #b8702c) 8%, var(--card)); }
.plan-line.todo .todo-mark { margin-right: 2px; }
.plan-status { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; font-size: .92rem; }
.plan-status.todo { background: color-mix(in srgb, var(--c-caution, #b8702c) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--c-caution, #b8702c) 40%, var(--line)); }
.plan-status.ok { background: var(--forest-soft); color: var(--forest); font-weight: 600; }
.plan-cta { position: relative; }
.plan-cta.todo { border-color: color-mix(in srgb, var(--c-caution, #b8702c) 45%, var(--line)); }
.plan-cta > .todo-mark { position: absolute; top: -8px; left: -8px; }
.me-tiles .t-plan.todo { border-color: color-mix(in srgb, var(--c-caution, #b8702c) 45%, var(--line)); }
.me-tiles .t-plan b .todo-mark { margin-left: 4px; }

/* ---------- The welcome tour, getting to know you: advice and your daily moment ---------- */
.lvl.on { border-color: var(--forest-2); background: var(--forest-soft); }
.advice { align-self: stretch; margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; text-align: left; }
.advice li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); }
.advice li.first { border-color: color-mix(in srgb, var(--forest-2) 55%, var(--line)); background: var(--forest-soft); }
.adv-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--card); color: var(--forest); }
.adv-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.advice b { display: block; font-size: .95rem; }
.advice small { display: block; color: var(--ink-2); font-size: .83rem; line-height: 1.4; }
.adv-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 99px; background: var(--forest-2); color: var(--card); font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.tour-habit { align-self: stretch; text-align: left; margin-top: 4px; }
.th-label { margin: 10px 0 6px; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.th-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.th-chip { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 6px 11px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: .86rem; cursor: pointer; }
.th-chip small { color: var(--ink-3); font-size: .72rem; }
.th-chip:hover { border-color: var(--forest-2); }
.th-chip.on { border-color: var(--forest-2); background: var(--forest-soft); font-weight: 600; }
.th-skip { display: block; margin: 10px auto 0; font-size: .85rem; }
/* 📍 The grammar lesson of your current stop. */
.gr-here { margin-left: 5px; font-size: .9em; }
/* The "about you" steps of the tour have more to show: a smaller Bjørn, so they fit on a laptop screen. */
.sheet-wrap.tour .guide-sheet.compact { padding-top: 16px; }
.sheet-wrap.tour .guide-sheet.compact .guide-bear { height: 64px; margin-bottom: 0; }
.sheet-wrap.tour .guide-sheet.compact .guide h2 { font-size: 1.3rem; }

/* ---------- Grammar list: progress, foldable parts, a topic tag on every lesson ---------- */
.gr-progress { list-style: none; display: flex; flex-direction: column; gap: 5px; padding: 4px 8px 10px; font-size: .82rem; color: var(--ink-2); }
.gr-progress b { color: var(--ink); }
.gr-progress i { display: block; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--c-grammar) var(--p), var(--paper-2) var(--p)); }
.gr-part { padding: 10px 0 2px; }
.gr-part-btn { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 8px; padding: 7px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--forest-2); font: inherit; text-align: left; cursor: pointer; }
.gr-part-btn:hover { background: var(--paper-2); }
.gr-part-btn span { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gr-part-btn small { grid-column: 1; color: var(--ink-3); font-size: .74rem; font-weight: 600; text-transform: none; letter-spacing: 0; }
.gr-part-btn i { grid-row: 1 / 3; grid-column: 2; font-style: normal; color: var(--ink-3); transition: transform .2s; }
.gr-part-btn[aria-expanded="false"] i { transform: rotate(-90deg); }
.gr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.gr-tag { display: inline-block; padding: 0 6px; border-radius: 99px; font-size: .68rem; font-weight: 700; letter-spacing: .02em; line-height: 1.6; background: var(--paper-2); color: var(--ink-3); }
.gr-tag.tg-nouns { color: var(--c-vocab); background: color-mix(in srgb, var(--c-vocab) 12%, var(--card)); }
.gr-tag.tg-verbs { color: var(--c-grammar); background: color-mix(in srgb, var(--c-grammar) 12%, var(--card)); }
.gr-tag.tg-pron { color: var(--fjord); background: color-mix(in srgb, var(--fjord) 12%, var(--card)); }
.gr-tag.tg-adj { color: var(--clay); background: color-mix(in srgb, var(--clay) 12%, var(--card)); }
.gr-tag.tg-sent { color: var(--forest); background: color-mix(in srgb, var(--forest) 12%, var(--card)); }
.gr-tag.tg-small { color: var(--c-honey); background: color-mix(in srgb, var(--c-honey) 12%, var(--card)); }
.gr-tag.tg-time { color: var(--c-home); background: color-mix(in srgb, var(--c-home) 12%, var(--card)); }
.gr-item.gr-basics .gr-num { background: color-mix(in srgb, var(--clay) 18%, var(--card)); font-size: .9rem; }
.gr-chip.done b { color: var(--forest-2); }
.gc-done { font-style: normal; color: var(--forest-2); font-weight: 700; }

/* ---------- The basics, rock solid (#basics) ---------- */
.bx-overall { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); max-width: 560px; }
.bx-overall small { grid-column: 1 / -1; color: var(--ink-3); }
.bx-bar { display: block; height: 7px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.bx-bar i { display: block; height: 100%; border-radius: inherit; background: var(--clay); transition: width .5s ease; }
.bx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 8px 0 30px; }
.bx-card { display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.bx-card:hover { transform: translateY(-2px); border-color: var(--clay); box-shadow: 0 8px 22px color-mix(in srgb, var(--clay) 15%, transparent); }
.bx-card.solid { border-color: color-mix(in srgb, var(--forest-2) 55%, var(--line)); }
.bx-icon { align-self: flex-start; margin-bottom: 4px; padding: 3px 9px; border-radius: 8px; background: color-mix(in srgb, var(--clay) 14%, var(--card)); color: var(--clay); font: 700 .8rem var(--sans); }
.bx-card b { font: 600 1.15rem var(--serif); }
.bx-sub { color: var(--ink-2); font-size: .88rem; }
.bx-ex { color: var(--ink-3); font-size: .82rem; font-style: italic; }
.bx-meter { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 2px; }
.bx-meter small { color: var(--ink-3); font-size: .78rem; }
.bx-card.solid .bx-bar i, .bx-meter.solid .bx-bar i { background: var(--forest-2); }
.bx-card.close .bx-bar i, .bx-meter.close .bx-bar i { background: var(--c-honey); }
.bx-go { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--clay); }
.bx-q { max-width: 640px; margin: 8px 0 30px; padding: 20px 22px; }
.bx-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; font-size: .86rem; }
.bx-count { color: var(--ink-3); }
.bx-dots { display: flex; gap: 4px; margin-bottom: 18px; }
.bx-dots i { flex: 1; height: 5px; border-radius: 99px; background: var(--paper-2); }
.bx-dots i.past { background: var(--clay); }
.bx-dots i.now { background: color-mix(in srgb, var(--clay) 45%, var(--paper-2)); }
.bx-ask { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.bx-word { font: 700 1.6rem var(--serif); }
.bx-en { color: var(--ink-3); font-size: .9rem; font-weight: 400; }
.bx-task { font-size: 1rem; color: var(--ink-2); }
.bx-frame { margin-top: 6px; font: 600 1.25rem var(--serif); }
.bx-gap { display: inline-block; min-width: 3.5em; border-bottom: 2px solid var(--clay); color: transparent; }
.bx-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.bx-choices.wide { flex-direction: column; }
.bx-choice { min-width: 80px; padding: 12px 18px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: 600 1.1rem var(--serif); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.bx-choice:hover:not(:disabled) { border-color: var(--clay); }
.bx-choice.right { border-color: var(--forest-2); background: var(--forest-soft); }
.bx-choice.wrong { border-color: var(--berry, #c0504a); background: color-mix(in srgb, var(--berry, #c0504a) 10%, var(--card)); }
.bx-answer .field { max-width: 360px; }
.bx-fb { min-height: 1.4em; margin: 12px 0 0; }
.bx-fb.ok { color: var(--forest); font-weight: 600; }
.bx-rule { display: block; margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--paper-2); color: var(--ink-2); font-size: .9rem; font-weight: 400; }
.bx-btns { margin-top: 12px; }
.bx-done h2 { margin: 2px 0 12px; }
.bx-meter.big { margin: 0 0 12px; }
.bx-meter.big .bx-bar { height: 10px; }
/* Home: the basics trainer as a slim strip under the two lesson cards. */
.basics-strip { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--clay) 35%, var(--line)); background: color-mix(in srgb, var(--clay) 6%, var(--card)); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.basics-strip:hover { border-color: var(--clay); transform: translateY(-1px); }
.bs-icon { font-size: 1.3rem; }
.bs-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.bs-text small { color: var(--ink-2); font-size: .84rem; }
.bs-score { flex: none; padding: 3px 10px; border-radius: 99px; background: var(--card); color: var(--clay); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.bs-go { color: var(--clay); font-weight: 700; }
@media (max-width: 560px) { .basics-strip { flex-wrap: wrap; } .bs-text small { display: none; } }

/* ---------- The "you did it" moment (FX.celebrate) ---------- */
.celebrate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(12, 18, 16, .62); opacity: 0; transition: opacity .25s ease; cursor: pointer; }
.celebrate.on { opacity: 1; }
.celebrate.off { opacity: 0; }
.cel-card { position: relative; width: min(400px, 100%); padding: 30px 26px 22px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.4); text-align: center; cursor: default; transform: scale(.9) translateY(10px); transition: transform .45s cubic-bezier(.2, 1.4, .4, 1); }
.celebrate.on .cel-card { transform: none; }
.cel-medal { position: relative; width: 104px; height: 104px; margin: -78px auto 10px; }
.cel-rays { position: absolute; inset: -26px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--c-honey) 55%, transparent) 0 9deg, transparent 9deg 22deg); -webkit-mask: radial-gradient(circle, #000 35%, transparent 70%); mask: radial-gradient(circle, #000 35%, transparent 70%); animation: celSpin 9s linear infinite; }
.cel-disc { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe08a, var(--c-honey) 70%); border: 4px solid var(--card); box-shadow: 0 8px 24px color-mix(in srgb, var(--c-honey) 45%, transparent); animation: celPop .6s cubic-bezier(.2, 1.6, .4, 1) both .1s; }
.cel-disc svg { width: 56px; height: 56px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cel-disc > span, .cel-disc > svg:not([viewBox="0 0 24 24"]) { width: 92%; height: 92%; }
.cel-disc .head-shot, .cel-disc > span { display: grid; place-items: center; }
.cel-card .kicker { margin: 0 0 4px; }
.cel-card h2 { margin: 0 0 6px; font-size: 2rem; }
.cel-sub { margin: 0 0 16px; color: var(--ink-2); }
.cel-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; margin: 0 0 18px; }
.cel-stats div { padding: 10px 6px; border-radius: 14px; background: var(--paper-2); display: flex; flex-direction: column; animation: celUp .4s ease both; }
.cel-stats div:nth-child(2) { animation-delay: .1s; } .cel-stats div:nth-child(3) { animation-delay: .2s; } .cel-stats div:nth-child(4) { animation-delay: .3s; }
.cel-stats b { font: 700 1.5rem var(--serif); color: var(--forest); }
.cel-stats span { font-size: .78rem; color: var(--ink-3); }
.cel-go { min-width: 160px; justify-content: center; }
.cel-confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.cel-confetti i { position: absolute; top: -12px; left: var(--x); width: 9px; height: 14px; border-radius: 2px; background: var(--c); animation: celFall var(--d) cubic-bezier(.25, .6, .5, 1) var(--w) forwards; opacity: 0; }
@keyframes celFall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(85vh) rotate(var(--r)); } }
@keyframes celPop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes celSpin { to { transform: rotate(360deg); } }
@keyframes celUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cel-rays, .cel-disc, .cel-stats div { animation: none; } .cel-card { transition: none; } }
html.no-motion .cel-rays, html.no-motion .cel-disc, html.no-motion .cel-stats div { animation: none; }

/* ---------- Review: Bjørn and what's waiting, then a picture of your memory ---------- */
.rv-hero { display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: center; margin: 4px 0 22px; padding: 24px 26px; border-radius: 22px; border: 2px solid color-mix(in srgb, var(--c-review) 45%, var(--line)); background: linear-gradient(150deg, color-mix(in srgb, var(--c-review) 10%, var(--card)), var(--card) 65%); box-shadow: var(--shadow); }
.rv-hero.clear { border-color: color-mix(in srgb, var(--forest-2) 45%, var(--line)); background: linear-gradient(150deg, color-mix(in srgb, var(--forest-2) 10%, var(--card)), var(--card) 65%); }
.rv-bear { width: 120px; height: 120px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; }
.rv-bear > * { width: 100%; height: 100%; }
.rv-main h2 { margin: 2px 0 6px; font-size: 1.6rem; }
.rv-main h2 b { font-size: 2.2rem; color: var(--c-review); }
.rv-hero.clear h2 { color: var(--forest); }
.rv-hero.running { grid-template-columns: 1fr; }
.rv-hero.running .rv-bear, .rv-hero.running .rv-main > :not(.review-host) { display: none; }
.rv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 30px; }
.rv-card h3 { margin: 0 0 2px; }
.rv-card > .muted.small { margin: 0 0 12px; }
.rv-bands { display: flex; height: 16px; border-radius: 99px; overflow: hidden; background: var(--paper-2); gap: 2px; }
.rv-bands i, .rv-legend i { display: block; background: var(--c-review); }
.rv-bands i.b0, .rv-legend i.b0 { background: color-mix(in srgb, var(--c-review) 55%, var(--card)); }
.rv-bands i.b1, .rv-legend i.b1 { background: var(--c-honey); }
.rv-bands i.b2, .rv-legend i.b2 { background: var(--forest-2); }
.rv-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0; padding: 0; list-style: none; font-size: .86rem; color: var(--ink-2); }
.rv-legend li { display: flex; align-items: center; gap: 6px; }
.rv-legend i { width: 10px; height: 10px; border-radius: 3px; }
.rv-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 120px; }
.rv-week div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 3px; }
.rv-week i { width: 70%; min-height: 3px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--c-review) 55%, var(--paper-2)); }
.rv-week .today i { background: var(--c-review); }
.rv-week small { font-size: .72rem; color: var(--ink-3); }
.rv-week .today small { color: var(--ink); font-weight: 700; }
.rv-n { font-size: .74rem; font-weight: 700; color: var(--ink-2); }
.rv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-chip { display: flex; flex-direction: column; align-items: flex-start; padding: 7px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.rv-chip:hover { border-color: var(--c-review); }
.rv-chip b { font-size: .95rem; }
.rv-chip span { font-size: .78rem; color: var(--ink-3); }
@media (max-width: 560px) { .rv-hero { grid-template-columns: 1fr; text-align: center; padding: 20px; } .rv-bear { width: 90px; height: 90px; margin: 0 auto; } .rv-hero .row-btns { justify-content: center; } }
/* A revealed answer, with what it means right next to it. */
.d-mean { color: var(--ink-2); font-weight: 600; }

/* ---------- The tour: the dots sit above the buttons, so long labels always fit ---------- */
.sheet-wrap.tour .guide-nav { grid-template-columns: auto 1fr auto; row-gap: 10px; }
.sheet-wrap.tour .guide-nav .dots { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
.sheet-wrap.tour .guide-nav > .btn:first-child { grid-column: 1; grid-row: 2; }
.sheet-wrap.tour .guide-nav > .btn:last-child { grid-column: 3; grid-row: 2; white-space: normal; text-align: center; }
.th-points { align-self: stretch; margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; text-align: left; }
.th-points li { padding: 8px 12px 8px 34px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); position: relative; }
.th-points li::before { content: '✓'; position: absolute; left: 12px; color: var(--forest-2); font-weight: 800; }
.th-points b { color: var(--ink); }
.plan-next { margin-top: 10px; }

/* ---------- Home: today's card, slim ---------- */
.ht-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; }
.ht-top .tier-tag { margin: 0; }
.ht-meta { color: var(--ink-3); font-size: .84rem; font-weight: 600; }
.home-today h1 { margin: 0 0 4px; }
.home-today .lead { margin: 0 0 14px; }
.ht-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.ht-steps li { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ht-steps i { display: block; height: 8px; border-radius: 99px; background: var(--paper-2); }
.ht-steps li.done i { background: var(--forest-2); }
.ht-steps span { font-size: .78rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-steps li.done span { color: var(--forest); font-weight: 600; }
.ht-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .84rem; }
.ht-foot .plan-line { margin: 0; padding: 4px 10px; font-size: .82rem; }
.ht-stop { color: var(--ink-2); text-decoration: none; }
.ht-stop:hover { color: var(--ink); }
.ht-stop b { color: var(--ink); }
.ht-stop span { color: var(--ink-3); }
.rhythm.mini { display: flex; align-items: center; gap: 8px; margin: 0 0 0 auto; text-decoration: none; }
.rh-mini-label { font-size: .74rem; color: var(--ink-3); white-space: nowrap; }
.rhythm.mini .rh-days { display: flex; gap: 3px; }
.rhythm.mini .rh-days li { display: block; }
.rhythm.mini .rh-days i { width: 11px; height: 11px; max-width: none; border-radius: 3px; border-width: 1px; font-size: 0; }
@media (max-width: 560px) { .rhythm.mini { margin-left: 0; } .ht-steps span { font-size: .7rem; } }
/* The word search, now at the top of Vocabulary. */
.vocab-search { margin: 0 0 22px; }

/* ---------- Review: what fresh, growing and strong mean (hover or tap) ---------- */
.rv-legend li { position: relative; cursor: help; border-radius: 6px; outline-offset: 2px; }
.rv-q { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--paper-2); color: var(--ink-3); font-size: .64rem; font-weight: 700; }
.rv-legend li::after { content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 5; width: 240px; padding: 9px 11px; border-radius: 10px; background: var(--ink); color: var(--card); font-size: .8rem; line-height: 1.4; box-shadow: 0 8px 24px rgba(0,0,0,.25); opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .15s, transform .15s; }
.rv-legend li:hover::after, .rv-legend li:focus::after { opacity: 1; transform: none; }
.rv-bands i { cursor: help; }

/* ---------- Grammar: extra practice rounds stay on the page, the buttons below them ---------- */
.g-round { margin-top: 18px; }
.g-round + .g-round { padding-top: 16px; border-top: 1px dashed var(--line); }
.g-round-done { margin-top: 10px; }
.g-finish-btns { margin-top: 18px; }
/* A wrong answer: a calm red border that stays until you change it. */
/* Calm, not alarming: just the field's border and a thin line next to the help. */
.exercise .field:has(input.wrong) { border-color: color-mix(in srgb, var(--berry) 65%, var(--line)); }
.exercise .ex-fb.bad { background: color-mix(in srgb, var(--berry) 6%, var(--card)); border-left: 3px solid color-mix(in srgb, var(--berry) 55%, transparent); border-radius: 4px 10px 10px 4px; line-height: 1.55; }
.ex-clue { display: block; margin-top: 4px; color: var(--ink-2); }
.ex-rule { display: block; margin-top: 4px; font-size: .88rem; }
.ex-stamp { flex-wrap: wrap; }
/* A tidier exercise: numbered sentences, a "1 of 3 done" counter, and a solved sentence folds into one line. */
.exercise { counter-reset: exn; }
.exercise .ex-item { counter-increment: exn; position: relative; padding-left: 34px; }
.exercise .ex-item::before { content: counter(exn); position: absolute; left: 0; top: 18px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; background: var(--paper-2); color: var(--ink-2); }
.exercise .ex-item.solved::before { content: '✓'; background: var(--forest-2); color: var(--card); }
.ex-head .ex-title { margin-right: auto; }
.ex-count { font-size: .82rem; color: var(--ink-2); padding: 3px 10px; border-radius: 99px; background: var(--paper-2); }
.ex-count.all { color: var(--forest); background: color-mix(in srgb, var(--forest-2) 14%, var(--card)); }
.ex-item.solved:has(.ex-fb.ok:not(:empty)) .ex-sent, .ex-item.solved:has(.ex-fb.ok:not(:empty)) .ex-meta { display: none; }
.ex-item.solved .ex-fb.ok { margin-top: 0; }
.ex-ok-line { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.ex-ok-tick { display: none; }
.ex-ok-no { font-size: 1.12rem; color: var(--forest); font-weight: 600; }
.ex-ok-en { display: block; color: var(--ink-2); font-size: .88rem; margin-top: 2px; }
.ex-ok-line > span:nth-child(2) { flex: 1; min-width: 200px; }
.ex-ok-line .why-btn { margin-left: auto; }
.ex-ok-line .why-box { flex-basis: 100%; }
.ex-fb.ok .why { display: block; margin-top: 6px; font-size: .9rem; }
.ex-stamp .ex-on { margin-left: auto; }
.ex-stamp small + .ex-on { margin-left: 8px; }
.rv-legend li::after { max-width: min(240px, 78vw); }
.rv-legend li:last-child::after { left: auto; right: 0; }
/* Today's steps: "Up next" on the next one, "✓ Done" on the finished ones. */
.ts-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; font: 700 .68rem var(--sans); letter-spacing: .04em; text-transform: uppercase; vertical-align: 2px; }
.ts-tag.next { background: var(--forest-2); color: var(--card); }
.ts-tag.done { background: var(--forest-soft); color: var(--forest); }
