/* Cozy storybook palette. Change colours here; the brand colour also lives in config/brand.json. */
:root {
  --cream: #fbf4e6;
  --paper: #fffaf0;
  --ink: #2d3a3a;
  --ink-soft: #5f6f6c;
  --line: #eadfc8;
  --sea: #7cc8c0;
  --sea-deep: #4ea8a2;
  --teal: #2f7d78;
  --teal-dark: #23605c;
  --sage: #8cc26f;
  --leaf: #5e9e4a;
  --sand: #f3dfb0;
  --sun: #f6b04b;
  --coral: #f07f5f;
  --berry: #c4577a;
  --sky: #dff1ef;
  --good: #3f9b5f;
  --bad: #d65a4a;
  --radius: 18px;
  --shadow: 0 2px 0 rgba(45, 58, 58, .08), 0 8px 24px rgba(45, 58, 58, .08);
  --head: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(28px, 5vw, 40px); }
h2 { font-size: clamp(22px, 3.6vw, 28px); }
h3 { font-size: 19px; }
p { line-height: 1.55; margin: 0 0 .8em; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.hidden { display: none !important; }

/* Boot */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-logo { width: 72px; height: 72px; border-radius: 22px; background: var(--teal) url(../img/icon.svg) center/cover; animation: bob 1.6s ease-in-out infinite; }

/* Layout */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(251, 244, 230, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--head); font-weight: 700; font-size: 20px; }
.brand i { width: 34px; height: 34px; border-radius: 11px; background: url(../img/icon.svg) center/cover; }
.topbar .spacer { flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line); font-weight: 800; font-size: 14px; white-space: nowrap;
}
.chip.flame b { color: var(--coral); }
.chip.level b { color: var(--teal); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--sun); color: #fff; font-weight: 800; font-family: var(--head); font-size: 16px;
}
main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 20px 16px 96px; }
.narrow { max-width: 640px; margin: 0 auto; }

/* Bottom navigation (phones) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: none; justify-content: space-around;
  padding: 6px 8px max(8px, env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; text-align: center; text-decoration: none; color: var(--ink-soft); font-size: 11px; font-weight: 800; padding: 4px 0; }
.tabbar a span { display: block; font-size: 22px; line-height: 1.2; }
.tabbar a.on { color: var(--teal); }
.topnav { display: flex; gap: 4px; }
.topnav a { text-decoration: none; color: var(--ink-soft); font-weight: 800; padding: 8px 12px; border-radius: 12px; }
.topnav a.on, .topnav a:hover { color: var(--teal); background: var(--sky); }
@media (max-width: 760px) {
  .tabbar { display: flex; }
  .topnav { display: none; }
  .chip.level { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 16px; border: 0; cursor: pointer;
  font-family: var(--head); font-weight: 600; font-size: 18px; letter-spacing: .2px;
  background: var(--teal); color: #fff; box-shadow: 0 4px 0 var(--teal-dark);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--teal-dark); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sun { background: var(--sun); box-shadow: 0 4px 0 #c9852c; color: #4a3210; }
.btn.coral { background: var(--coral); box-shadow: 0 4px 0 #c45d40; }
.btn.ghost { background: var(--paper); color: var(--ink); box-shadow: 0 3px 0 var(--line); border: 1px solid var(--line); }
.btn.small { padding: 8px 14px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; color: var(--teal); font-weight: 800; cursor: pointer; padding: 4px; }

/* Cards and panels */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.stack > * + * { margin-top: 16px; }

/* Forms */
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.input {
  width: 100%; padding: 13px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff;
  font-size: 17px; outline: none; transition: border-color .15s;
}
.input:focus { border-color: var(--teal); }
.error { color: var(--bad); font-weight: 700; min-height: 1.4em; }

/* Welcome */
.welcome { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; min-height: calc(100vh - 140px); }
.welcome .hero-map { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.welcome h1 { font-size: clamp(34px, 6vw, 54px); }
.welcome .lead { font-size: 19px; color: var(--ink-soft); }
.welcome ul { padding: 0; list-style: none; margin: 18px 0; }
.welcome li { padding: 6px 0; font-weight: 700; }
.tabs { display: flex; gap: 6px; background: var(--sand); padding: 5px; border-radius: 14px; margin-bottom: 18px; }
.tabs button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 10px; font-weight: 800; cursor: pointer; }
.tabs button.on { background: var(--paper); box-shadow: var(--shadow); }
@media (max-width: 820px) { .welcome { grid-template-columns: 1fr; min-height: 0; } }

/* World map */
.world-wrap { position: relative; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); background: var(--sea); }
.world-wrap svg { display: block; width: 100%; height: auto; }
.island-hit { cursor: pointer; }
.island-hit:hover .isl, .island-hit:focus .isl { filter: brightness(1.06) drop-shadow(0 6px 10px rgba(0,0,0,.12)); }
.island-hit:focus { outline: none; }
.isl { transition: filter .2s; }
.island-label {
  font-family: var(--head); font-weight: 600; font-size: 21px; fill: var(--ink);
  paint-order: stroke; stroke: var(--paper); stroke-width: 6px; stroke-linejoin: round;
}
.island-sub { font-family: var(--body); font-weight: 800; font-size: 13px; fill: var(--teal-dark); paint-order: stroke; stroke: var(--paper); stroke-width: 5px; }
.cloud { animation: drift 60s linear infinite; }
.cloud.slow { animation-duration: 95s; }
.wave { animation: wave 6s ease-in-out infinite; }
.boat { animation: bob 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sway { animation: sway 4s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom center; }
.twinkle { animation: twinkle 2.4s ease-in-out infinite; }
.mist { animation: mist 7s ease-in-out infinite; }
@keyframes drift { from { transform: translateX(-260px); } to { transform: translateX(1260px); } }
@keyframes wave { 0%, 100% { transform: translateX(0); opacity: .55; } 50% { transform: translateX(14px); opacity: .9; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(2deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes mist { 0%, 100% { opacity: .85; } 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.today { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 18px; }
@media (max-width: 760px) { .today { grid-template-columns: 1fr; } }
.goal-bar { height: 14px; border-radius: 99px; background: var(--sand); overflow: hidden; margin: 10px 0 6px; }
.goal-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), var(--coral)); border-radius: 99px; transition: width .6s ease; }
.mascot-row { display: flex; gap: 14px; align-items: center; }
.mascot-row svg { flex: 0 0 auto; }
.bubble { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; font-weight: 700; position: relative; }

/* Island and course pages */
.crumbs { margin-bottom: 14px; }
.crumbs a { text-decoration: none; font-weight: 800; }
.island-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.island-head .big-emoji { font-size: 48px; width: 76px; height: 76px; display: grid; place-items: center; background: var(--sky); border-radius: 24px; }
.course-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); transition: transform .15s; }
.course-card:hover { transform: translateY(-3px); }
.course-card.soon { opacity: .6; pointer-events: none; }
.course-card .top { display: flex; align-items: center; gap: 12px; }
.flag { width: 44px; height: 33px; border-radius: 7px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.08); background: #eee; }
.flag.big { width: 120px; height: 90px; border-radius: 12px; }
.course-icon { font-size: 30px; width: 44px; text-align: center; }
.progress { height: 10px; border-radius: 99px; background: var(--sand); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--sage); border-radius: 99px; }
.stats-line { display: flex; gap: 14px; font-size: 14px; font-weight: 800; color: var(--ink-soft); flex-wrap: wrap; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 99px; background: var(--sand); font-size: 12px; font-weight: 800; }
.badge.due { background: #ffe1d6; color: #a4442a; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.cats button { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 7px 13px; font-weight: 800; font-size: 14px; cursor: pointer; }
.cats button.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.item-tile { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; text-align: left; padding: 0; }
.item-tile img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.item-tile .t { padding: 8px 10px; }
.item-tile b { display: block; font-family: var(--head); font-weight: 600; font-size: 17px; }
.item-tile small { color: var(--ink-soft); font-weight: 700; }
.item-tile .dot { float: right; width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin-top: 6px; }
.item-tile .dot.learned { background: var(--sage); }
.item-tile .dot.due { background: var(--coral); }
.item-tile .tile-emoji { aspect-ratio: 1; display: grid; place-items: center; font-size: 54px; background: var(--sky); }
.item-tile .tile-flag { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }

/* Study session */
.study { max-width: 620px; margin: 0 auto; }
.study-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.study-top .progress { flex: 1; height: 14px; }
.study-top .progress i { background: linear-gradient(90deg, var(--sage), var(--leaf)); transition: width .4s; }
.x { border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--ink-soft); line-height: 1; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; animation: pop .35s ease; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.card .pic { position: relative; overflow: hidden; background: var(--sky) center / cover no-repeat; display: flex; justify-content: center; }
/* Soft blurred copy of the picture fills the sides, so the whole picture is always visible and never cropped. */
.card .pic::before { content: ''; position: absolute; inset: -30px; background: inherit; filter: blur(34px) saturate(1.05); opacity: .45; }
.card .pic img { position: relative; display: block; width: auto; max-width: 100%; height: auto; max-height: 46vh; object-fit: contain; animation: breathe 9s ease-in-out infinite; }
.card .pic.short img { max-height: 34vh; }
/* Gentle "alive" motion that stays inside the frame. */
@keyframes breathe { 0%, 100% { transform: scale(.985); } 50% { transform: scale(1); } }
.card .body { padding: 18px 20px 20px; }
.word { font-family: var(--head); font-weight: 700; font-size: clamp(36px, 8vw, 52px); line-height: 1; margin: 0; }
.meaning { font-size: 20px; font-weight: 800; color: var(--teal); }
.sounds { display: inline-block; margin: 10px 0; padding: 6px 12px; border-radius: 12px; background: #fff3d6; font-weight: 800; }
.picture-line { font-size: 17px; }
.sentence { border-left: 4px solid var(--sand); padding-left: 12px; margin-top: 12px; }
.sentence b { font-weight: 800; }
.audio-btn { border: 0; width: 46px; height: 46px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 20px; cursor: pointer; flex: 0 0 auto; box-shadow: 0 3px 0 var(--teal-dark); }
.audio-btn.small { width: 34px; height: 34px; font-size: 15px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.prompt { font-family: var(--head); font-weight: 600; font-size: 24px; text-align: center; margin: 6px 0 16px; }
.prompt.huge { font-size: clamp(40px, 10vw, 64px); }
.options { display: grid; gap: 10px; }
.options.two { grid-template-columns: 1fr 1fr; }
.opt {
  padding: 15px 16px; border-radius: 16px; border: 2px solid var(--line); background: #fff; cursor: pointer;
  font-weight: 800; font-size: 18px; text-align: left; box-shadow: 0 3px 0 var(--line); transition: transform .08s;
}
.opt:hover { border-color: var(--sea-deep); }
.opt:active { transform: translateY(2px); }
.opt.right { border-color: var(--good); background: #e5f5e8; box-shadow: 0 3px 0 var(--good); }
.opt.wrong { border-color: var(--bad); background: #fbe6e2; box-shadow: 0 3px 0 var(--bad); }
.opt .flag { width: 54px; height: 40px; }
.opt.flag-opt { display: grid; place-items: center; padding: 10px; }
.opt.flag-opt .flag { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.feedback { margin-top: 14px; padding: 14px 16px; border-radius: 16px; font-weight: 800; animation: pop .25s ease; }
.feedback.good { background: #e5f5e8; color: #24663c; }
.feedback.bad { background: #fbe6e2; color: #8f2f22; }
.type-input { font-size: 26px; text-align: center; font-family: var(--head); letter-spacing: 1px; }
.digits { font-family: var(--head); font-weight: 600; font-size: clamp(28px, 7vw, 42px); letter-spacing: 3px; text-align: center; }
.pegs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 14px 0; }
.peg { background: var(--sky); border-radius: 14px; padding: 10px 4px; text-align: center; }
.peg .e { font-size: 30px; }
.peg .n { font-family: var(--head); font-weight: 700; font-size: 22px; }
.peg .w { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
@media (max-width: 420px) { .pegs { grid-template-columns: repeat(5, 1fr); gap: 4px; } .peg .e { font-size: 22px; } .peg .n { font-size: 17px; } .peg .w { font-size: 11px; } }

/* Summary */
.summary { text-align: center; }
.big-num { font-family: var(--head); font-weight: 700; font-size: 44px; color: var(--teal); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.trio .panel { padding: 14px 8px; }
.trio small { font-weight: 800; color: var(--ink-soft); }

/* XP toast and confetti */
.toast {
  position: fixed; left: 50%; top: 76px; transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 99px; font-weight: 800;
  animation: toast 2.2s ease forwards; pointer-events: none;
}
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -10px); } 12%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -10px); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: fall 2.6s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* Academy */
.lesson-step { min-height: 260px; }
.lesson-step .body-text { font-size: 18px; }
.dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--teal); }
.lesson-card { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); }
.lesson-card .e { font-size: 32px; width: 56px; height: 56px; display: grid; place-items: center; background: var(--sky); border-radius: 16px; flex: 0 0 auto; }
.lesson-card.done .e { background: #e5f5e8; }

/* Arena */
.arena-grid { font-family: var(--head); font-weight: 600; font-size: clamp(24px, 5vw, 34px); letter-spacing: 2px; line-height: 1.7; text-align: center; }
.arena-grid span.pair:nth-child(odd) { color: var(--teal); }
.timer { font-family: var(--head); font-weight: 700; font-size: 22px; color: var(--coral); }
.recall-row { display: flex; gap: 6px; justify-content: center; margin: 6px 0; flex-wrap: wrap; }
.recall-row input { width: 34px; height: 44px; text-align: center; font-family: var(--head); font-size: 22px; border: 2px solid var(--line); border-radius: 10px; }
.recall-row input.right { border-color: var(--good); background: #e5f5e8; }
.recall-row input.wrong { border-color: var(--bad); background: #fbe6e2; }
.board { width: 100%; border-collapse: collapse; }
.board td { padding: 8px 6px; border-bottom: 1px solid var(--line); font-weight: 700; }
.board tr.me td { color: var(--teal); }
.board td.n { width: 32px; color: var(--ink-soft); }
.board td.s { text-align: right; font-family: var(--head); }
.pi-line { font-family: var(--head); font-size: 22px; letter-spacing: 2px; word-break: break-all; line-height: 1.6; }
.pi-line .ok { color: var(--teal); }

/* Profile */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 12px; }
.bars div { flex: 1; background: var(--sea); border-radius: 6px 6px 0 0; min-height: 3px; position: relative; }
.bars div.today { background: var(--sun); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.kv .panel { padding: 14px; }
.kv b { font-family: var(--head); font-size: 26px; display: block; }
.kv small { font-weight: 800; color: var(--ink-soft); }
@media (max-width: 760px) { .arena-layout { grid-template-columns: 1fr !important; } }
.cloud, .wave, .boat, .mist { pointer-events: none; }
@media (max-width: 640px) { .island-label { font-size: 26px; } .island-sub { font-size: 16px; } }

/* ---- Atlas: continent maps and country shapes ---- */
.geo-map { position: relative; border-radius: 14px; overflow: hidden; background: #cfeaf0; }
.geo-scroll { overflow: auto; -webkit-overflow-scrolling: touch; }
.geo-map svg { display: block; width: 100%; height: auto; }
.geo-map .sea { fill: #cfeaf0; }
.geo-map .o { fill: #e7e2d6; stroke: #fff; stroke-width: .6; }
.geo-map .c { fill: #f1e2bd; stroke: #fff; stroke-width: .8; stroke-linejoin: round; transition: fill .2s; }
.geo-map .c.ctx { fill: #ebe5d5; }
.geo-map .c.seen, .geo-map .dot.seen { fill: #f8cf7e; }
.geo-map .c.learned, .geo-map .dot.learned { fill: var(--sage); }
.geo-map .dot { fill: #e9c98a; stroke: #fff; stroke-width: 2; }
.geo-map .hit { fill: transparent; }
.geo-map .hl, .geo-map .sel { fill: var(--coral) !important; }
.geo-map .right { fill: var(--good) !important; }
.geo-map .wrong { fill: var(--bad) !important; }
.geo-map .ring { fill: none; stroke: var(--coral); stroke-width: 4; animation: ringPulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.geo-map .ring.good { stroke: var(--good); }
@keyframes ringPulse { 0%, 100% { opacity: .9; transform: scale(1); } 50% { opacity: .35; transform: scale(1.18); } }
.geo-map svg.tappable [data-c] { cursor: pointer; }
.geo-map svg.tappable .c.f:hover, .geo-map svg.tappable .dot:hover { fill: #f6b96b; }
.zoom-btns { position: absolute; right: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.zoom-btns button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); font-size: 20px; font-weight: 800; cursor: pointer; box-shadow: var(--shadow); }
.atlas-panel { margin-top: 16px; }
.atlas-panel .geo-map { margin-top: 12px; }
.atlas-panel .geo-map + .geo-map { margin-top: 10px; }
.map-label { display: flex; align-items: center; gap: 6px; font-family: var(--head); font-size: 18px; }
.map-label .flag { width: 30px; height: 22px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 13px; font-weight: 700; align-items: center; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: #f1e2bd; margin-right: 5px; vertical-align: -1px; }
.legend i.learned { background: var(--sage); }
.legend i.seen { background: #f8cf7e; }
.where { margin-top: 12px; }
.where p { margin: 8px 0 0; font-weight: 700; }
.shape-stage { display: grid; place-items: center; padding: 18px; background: radial-gradient(circle at 50% 40%, #fff 0%, var(--sky) 75%); }
.shape-art svg { display: block; width: 100%; height: 100%; overflow: visible; }
.shape-stage .shape-art { width: min(100%, 520px); height: 40vh; }
.shape-stage.short .shape-art { height: 28vh; }
.shape-art .fill { fill: var(--sea-deep); fill-rule: evenodd; }
.shape-art .edge { fill: none; stroke: var(--ink); stroke-width: .9; stroke-linejoin: round; vector-effect: non-scaling-stroke; fill-rule: evenodd; }
.shape-art .shadow { fill: rgba(45, 58, 58, .14); fill-rule: evenodd; }
.shape-art .cap-ring { fill: none; stroke: #fff; stroke-width: 2.5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.shape-art .cap-pin { fill: var(--coral, #ff6b57); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.shape-art image { animation: breathe 9s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.item-tile .tile-shape { aspect-ratio: 1; padding: 12px; background: var(--sky); }
.opt .opt-shape { width: 100%; aspect-ratio: 4 / 3; padding: 6px; }
@media (max-width: 640px) {
  .shape-stage .shape-art { height: 32vh; }

}
.geo-map.zoomed .geo-scroll { max-height: 72vh; }
.geo-map path, .geo-map circle { vector-effect: non-scaling-stroke; }
.geo-map .ring { stroke-width: 3; }

/* PAO workshop */
.pao-code { display: flex; flex-wrap: wrap; gap: 6px; }
.pao-code span { padding: 4px 10px; border-radius: 10px; background: var(--sky); font-weight: 800; font-family: var(--head); }
.pao-code b { color: var(--teal); margin-right: 2px; }
.pao-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.pao-tile .pao-num { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 12px 0; }
.pao-tile .pao-num span { font-family: var(--head); font-size: 30px; font-weight: 700; color: var(--teal); }
.pao-tile .pao-num small { font-weight: 800; color: var(--ink-soft); }
.pao-tile .t b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pao-tile .t small { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pao-tile:not(.chosen) { border-style: dashed; background: transparent; }
.pao-tile:not(.chosen) .t b { color: var(--ink-soft); }
.pao-big { font-family: var(--head); font-size: 44px; font-weight: 700; color: var(--teal); }
.pao-opts { display: grid; gap: 8px; }
.pao-opt { display: grid; grid-template-columns: 44px 1fr; gap: 2px 10px; align-items: center; text-align: left; padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); cursor: pointer; font: inherit; color: inherit; }
.pao-opt:hover { border-color: var(--sea-deep); }
.pao-opt.on { border-color: var(--teal); background: var(--sky); box-shadow: 0 3px 0 var(--teal); }
.pao-opt .e { grid-row: span 2; font-size: 32px; text-align: center; }
.pao-opt .who b { font-family: var(--head); font-weight: 600; font-size: 18px; margin-right: 8px; }
.pao-opt .who small { font-weight: 700; }
.pao-opt .pa { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.pao-editor details { margin-top: 14px; }
.pao-editor summary { cursor: pointer; font-weight: 800; color: var(--teal); }
.pao-field { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; margin-top: 8px; font-weight: 800; }
.pao-card { display: grid; gap: 8px; text-align: left; max-width: 420px; margin: 12px auto 0; }
.pao-card > div { display: grid; grid-template-columns: 76px 1fr; gap: 2px 10px; align-items: baseline; padding: 8px 12px; border-radius: 12px; background: var(--sky); }
.pao-card small { font-weight: 800; color: var(--teal); text-transform: uppercase; font-size: 12px; letter-spacing: .5px; }
.pao-card b { font-family: var(--head); font-weight: 600; font-size: 19px; }
.pao-card .muted { grid-column: 2; font-size: 14px; }
.pao-scene { text-align: center; }
.pao-scene .digits { font-size: 34px; letter-spacing: 3px; }
@media (max-width: 560px) { .pao-field { grid-template-columns: 1fr; gap: 4px; } }
.opt.flag-opt .pao-big { font-size: 34px; }
.cardface { display: inline-flex; align-items: baseline; gap: 1px; font-family: var(--head); font-weight: 700; }
.cardface.red { color: #c8362b; }
.cardface.black { color: var(--ink); }
.cardface i { font-style: normal; }
.pao-scene .scene-item { margin: 0 10px; }
.island-info { text-decoration: none; color: inherit; }
.island-info .big-emoji { font-size: 34px; }
.island-info.soon { opacity: .7; }
a.island-info:hover { border-color: var(--sea-deep); }

/* Arena drills */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 8px 14px; font-weight: 800; font-size: 15px; cursor: pointer; font-family: inherit; color: inherit; }
.chips button.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.small-input { width: 96px; padding: 8px 10px; }
.panel h4 { margin: 16px 0 8px; font-family: var(--head); font-weight: 600; }
.check { display: flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; }
.drill-view { min-height: 190px; display: grid; place-items: center; align-content: center; gap: 10px; margin: 16px 0 4px; padding: 18px; background: var(--sky); border-radius: 18px; user-select: none; }
.drill-view { touch-action: pan-y; cursor: grab; transition: transform .22s ease; }
.drill-view.dragging { cursor: grabbing; transition: none; }
.drill-digits { font-family: var(--head); font-weight: 700; font-size: clamp(48px, 13vw, 96px); letter-spacing: 6px; color: var(--ink); }
.drill-cards { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.bigcard { width: 96px; height: 136px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; place-items: center; align-content: center; font-family: var(--head); line-height: 1; }
.bigcard b { font-size: 40px; font-weight: 700; }
.bigcard i { font-style: normal; font-size: 46px; }
.bigcard.red { color: #c8362b; }
.bigcard.black { color: var(--ink); }
.drill-hints { display: grid; gap: 4px; justify-items: center; }
.drill-hint { font-weight: 700; color: var(--ink-soft); }
.drill-hint small { display: inline-block; width: 20px; height: 20px; border-radius: 50%; background: var(--teal); color: #fff; text-align: center; line-height: 20px; font-size: 12px; }
.drill-strip { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; justify-content: center; }
.drill-strip button { width: 12px; height: 12px; border-radius: 50%; border: 0; background: var(--line); padding: 0; cursor: pointer; }
.drill-strip button.on { background: var(--teal); transform: scale(1.3); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.slot { position: relative; height: 54px; border: 2px dashed var(--line); border-radius: 10px; background: var(--paper); display: grid; place-items: center; font-size: 20px; cursor: pointer; font-family: inherit; }
.slot small { position: absolute; top: 2px; left: 5px; font-size: 10px; color: var(--ink-soft); font-weight: 800; }
.slot.on { border-color: var(--teal); border-style: solid; background: var(--sky); }
.slot.right { border: 2px solid var(--good); background: #e5f5e8; }
.slot.wrong { border: 2px solid var(--bad); background: #fbe6e2; }
.slot s { font-size: 12px; position: absolute; bottom: 1px; right: 4px; }
.picker { display: grid; gap: 4px; margin-top: 8px; }
.picker-row { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 4px; }
.picker button { padding: 8px 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 15px; }
.picker button.used { opacity: .3; }
@media (max-width: 560px) { .picker button { font-size: 12px; padding: 7px 0; } .picker-row { gap: 2px; } }
.spark svg { width: 100%; height: 60px; margin-top: 10px; }
.spark polyline { fill: none; stroke: var(--teal); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.board.log td { font-size: 14px; padding: 6px 4px; }
.panel.soft { background: var(--sky); box-shadow: none; }
.scene-row { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; flex-wrap: wrap; }
.scene-key { font-family: var(--head); min-width: 90px; }
.pao-opt .why { display: block; font-size: 13px; font-weight: 800; color: var(--teal); margin-top: 2px; }
.pao-opt.own { border-style: dashed; }
.pao-opt.own.on { border-style: solid; }
.pao-own { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--sky); }
.pao-own[hidden] { display: none; }

/* Design versions: shared parts (assets/js/designs/common.js). Designs restyle these in assets/css/designs/<id>.css */
.dz-bar { height: 8px; border-radius: 99px; background: var(--bar-track, var(--line)); overflow: hidden; min-width: 60px; }
.dz-bar i { display: block; height: 100%; background: var(--bar, var(--sage)); border-radius: inherit; }
.dz-flag { width: 28px; height: 21px; border-radius: 4px; object-fit: cover; }
.dz-emoji { font-size: 22px; width: 28px; text-align: center; }
.dz-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dz-stat { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 4px; }
.dz-stat b { font-family: var(--head); font-size: 20px; font-weight: 600; }
.dz-stat small { color: var(--ink-soft); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
@media (max-width: 640px) { .dz-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dz-hello { display: flex; gap: 14px; align-items: center; }
.dz-hello p { margin: 0 0 8px; font-weight: 700; }
.dz-tree { display: grid; gap: 10px; }
.dz-area { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.dz-area summary { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "e n d" "e b b"; gap: 4px 12px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
.dz-area summary::-webkit-details-marker { display: none; }
.dz-area-emoji { grid-area: e; font-size: 28px; }
.dz-area-name { grid-area: n; display: grid; }
.dz-area-name small { color: var(--ink-soft); font-weight: 700; }
.dz-area summary .badge { grid-area: d; }
.dz-area summary .dz-bar { grid-area: b; }
.dz-area.soon { opacity: .65; }
.dz-items { list-style: none; margin: 0; padding: 0 8px 8px; display: grid; gap: 2px; }
.dz-items li > a, .dz-items li > span { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit; }
.dz-items li > a:hover { background: var(--sky); }
.dz-item-text { display: grid; flex: 1; min-width: 0; }
.dz-item-text small { color: var(--ink-soft); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-items li.soon { opacity: .55; }
.dz-items li.done .dz-item-text b::after { content: ' ✓'; color: var(--good); }
.dz-switch { position: fixed; left: 14px; bottom: 84px; z-index: 50; }
@media (min-width: 761px) { .dz-switch { bottom: 18px; } }
.dz-switch-btn { border: 0; border-radius: 99px; padding: 9px 14px; background: #2d3a3a; color: #fff; font-weight: 800; box-shadow: 0 4px 14px rgba(0,0,0,.25); cursor: pointer; font-family: system-ui, sans-serif; }
.dz-switch-menu { position: absolute; bottom: 46px; left: 0; background: #fff; color: #2d3a3a; border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.25); padding: 6px; display: grid; min-width: 220px; font-family: system-ui, sans-serif; }
.dz-switch-menu[hidden] { display: none; }
.dz-switch-menu button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; color: inherit; }
.dz-switch-menu button:hover, .dz-switch-menu button.on { background: #e8f2f0; }
.dz-switch-menu small { color: #6b7a78; }
@media (max-width: 760px) { .dz-switch-btn { padding: 6px 10px; font-size: 12px; opacity: .9; } }

/* Cookie consent */
.consent { position: fixed; z-index: 100; left: 12px; right: 12px; bottom: 12px; max-width: 460px; margin-left: auto; background: #fff; color: #2d3a3a;
  border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.28); padding: 16px 18px; font-family: system-ui, -apple-system, sans-serif; font-size: 15px; line-height: 1.45; }
.consent p { margin: 6px 0 12px; }
.consent a { color: #2f7d78; }
.consent-title { font-size: 16px; }
.consent-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.consent .btn { font-family: inherit; }
.consent-cats { display: grid; gap: 10px; margin: 4px 0 14px; }
.consent-cats[hidden] { display: none; }
.consent-cat { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.consent-cat input { margin-top: 4px; width: 18px; height: 18px; accent-color: #2f7d78; }
.consent-cat span { display: grid; }
.consent-cat small { color: #6b7a78; }
@media (max-width: 760px) { .consent { bottom: 76px; } }

/* Legal pages and links */
.legal { max-width: 760px; margin: 0 auto; line-height: 1.6; }
.legal h1 { margin-top: 8px; }
.legal h2 { font-size: 1.2rem; margin-top: 1.6em; }
.legal ul { padding-left: 1.2em; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.legal-links a.on { font-weight: 800; text-decoration: none; color: var(--ink); }
.legal-mini { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 13px; margin: 8px 0 0; }
.panel .legal-mini { justify-content: flex-start; }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.lp-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 18px 16px 90px; font: 13px/1.4 system-ui, sans-serif; opacity: .75; }
.lp-legal a, .lp-legal button { color: inherit; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 10px 0; cursor: pointer; }
label.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--teal); }
.ok-note { background: var(--sky); padding: 14px; border-radius: 12px; }

/* Admin */
.admin-list { display: grid; gap: 8px; margin: 14px 0; }
.admin-user { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--paper); }
.admin-user summary { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; cursor: pointer; }
.admin-name { display: grid; min-width: 200px; }
.admin-name small, .admin-meta { color: var(--ink-soft); font-size: 13px; }
.admin-meta { flex: 1; }
.badge.access { background: #fff1c9; color: #7a5600; border-radius: 99px; padding: 3px 10px; font-size: 13px; font-weight: 700; }
.admin-edit { display: grid; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.admin-days { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-edit input[type=date] { width: auto; }
.admin-history ul { margin: 6px 0 0; padding-left: 1.1em; font-size: 14px; }
.table-wrap { overflow-x: auto; }
.admin-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-edit > .btn { justify-self: start; }

/* History: the year as a scene, and a period on the timeline */
.year-scene { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--sky); display: grid; gap: 6px; }
.year-scene p { margin: 0; }
.year-scene .e { font-size: 22px; }
.year-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.year-head > small { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); font-size: 12px; }
.year-digits { display: flex; gap: 4px; align-items: flex-end; font-family: var(--head); }
.year-digits > i { font-style: normal; font-size: 22px; opacity: .35; padding: 0 2px 14px; }
.year-digits span { display: grid; justify-items: center; background: var(--paper); border-radius: 8px; padding: 2px 8px; }
.year-digits b { font-size: 22px; line-height: 1.1; }
.year-digits small { font-size: 10px; font-weight: 800; color: var(--teal); }
.timeline { position: relative; height: 34px; margin: 12px 0 4px; border-top: 3px solid var(--line); }
.timeline i { position: absolute; top: -7px; height: 11px; border-radius: 6px; background: var(--teal); }
.timeline small { position: absolute; top: 6px; font-size: 11px; color: var(--ink-soft); }

/* Home: "Continue" on top of every design, and the Arrange dialog */
.ip { margin: 0 0 18px; }
.ip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ip-head h2 { margin: 0 0 10px; font-size: 1.25rem; }
.ip-arrange { font-weight: 700; font-size: 14px; white-space: nowrap; }
.ip-row { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.ip-card { flex: 0 0 230px; scroll-snap-align: start; display: grid; gap: 10px; align-content: space-between; padding: 14px; border-radius: var(--radius, 18px);
  background: var(--paper); box-shadow: var(--shadow); border: 1px solid var(--line); color: var(--ink); }
.ip-top { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.ip-icon { font-size: 26px; }
.ip-flag { width: 30px; height: 22px; border-radius: 4px; object-fit: cover; }
.ip-title { display: grid; min-width: 0; }
.ip-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-title small { color: var(--ink-soft); font-size: 13px; }
.ip-bar { height: 7px; border-radius: 9px; background: var(--bar-track, var(--line)); overflow: hidden; }
.ip-bar i { display: block; height: 100%; background: var(--bar, var(--teal)); border-radius: 9px; }
.ip-card .btn { justify-self: start; }
.ip-empty { margin: 0; }
.ar-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(20, 30, 30, .45); display: grid; place-items: center; padding: 16px; }
.ar-dialog { width: min(560px, 100%); max-height: 88vh; overflow: auto; }
.ar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ar-items { margin: 8px 0 2px 30px; gap: 6px; }
.ar-row { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.ar-items .ar-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; }
.ar-line { display: flex; align-items: center; gap: 8px; }
.ar-name { flex: 1; min-width: 0; }
.ar-handle { cursor: grab; touch-action: none; user-select: none; font-size: 20px; color: var(--ink-soft); padding: 0 4px; }
.ar-row.dragging { opacity: .85; box-shadow: 0 8px 24px rgba(0,0,0,.18); outline: 2px solid var(--teal); }
.ar-up, .ar-down { border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; }

/* Photo courses (breeds, birds, paintings): the photo with its credit */
.card figure.photo, figure.photo { margin: 0; }
.credit { font-size: 11px; line-height: 1.3; color: var(--ink-soft); padding: 4px 10px 0; text-align: right; overflow-wrap: anywhere; }
.credit a { color: inherit; text-decoration: underline dotted; }
.opt.flag-opt .opt-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display: block; }
details.credits summary { cursor: pointer; font-weight: 600; }
details.credits ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }
details.credits li { margin: 3px 0; }
details.credits .credit { display: inline; padding: 0; text-align: left; }

/* How to learn this (method.js): a panel on the course page and a tip under every card. */
details.method { margin-top: 16px; }
details.method summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
details.method summary::-webkit-details-marker { display: none; }
details.method summary::after { content: '▾'; margin-left: auto; color: var(--ink-soft); transition: transform .2s; }
details.method:not([open]) summary::after { transform: rotate(-90deg); }
details.method summary b { font-family: var(--head); font-size: 18px; }
.method-icon { font-size: 22px; }
.method-steps { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.method-steps li { counter-increment: step; position: relative; padding: 10px 12px 10px 48px; background: var(--sky); border-radius: 14px; line-height: 1.45; }
.method-steps li::before { content: counter(step); position: absolute; left: 12px; top: 9px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--sea-deep); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.method-why { margin-top: 12px; line-height: 1.5; }
.method-lesson, .method-first { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--sea-deep); }
.method-first { display: block; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--sand); color: var(--ink); text-decoration: none; }
.method-tip { margin: 0; padding: 10px 18px 14px; font-size: 14px; color: var(--ink-soft); border-top: 1px dashed var(--line); line-height: 1.45; }

/* History: the scene put into the event, and the learner's Year Code with the three cells this year uses. */
.scene-in { font-weight: 700; }
.year-code { margin-top: 6px; background: var(--paper); border-radius: 12px; padding: 10px 12px; }
.year-code-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-size: 14px; }
.year-code table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.3; }
.year-code th, .year-code td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.year-code thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.year-code tbody th { font-family: var(--head); font-size: 15px; width: 22px; color: var(--ink-soft); }
.year-code tr.on th { color: var(--ink); }
.year-code td.hit { background: var(--sun); font-weight: 800; border-radius: 6px; }
.year-code .e { font-size: 15px; }
@media (max-width: 560px) { .year-code table { font-size: 12px; } .year-code th, .year-code td { padding: 3px 4px; } }

/* The memory picture in words and the "spot it" features, each under a small label. */
.memo { margin-top: 10px; padding: 10px 14px; border-radius: 14px; background: var(--sand); }
.memo > small, .spot > small { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 2px; }
.memo .picture-line { margin: 0; }
.spot { margin-top: 10px; padding: 0 2px; line-height: 1.45; }
.card .where .geo-map { max-width: 560px; margin-left: auto; margin-right: auto; }
.peg-sounds { display: flex; gap: 8px; justify-content: center; margin: 4px 0 2px; }
.peg-sounds span { background: var(--sky); border-radius: 10px; padding: 4px 10px; font-size: 15px; }
.peg-sounds b { font-family: var(--head); font-size: 18px; }
.year-scene { min-width: 0; overflow-wrap: anywhere; }
.year-scene > * { min-width: 0; }
.year-code table { table-layout: fixed; }
.year-code thead th:first-child, .year-code tbody th { width: 22px; }
@media (max-width: 560px) {
  .year-scene { padding: 10px; }
  .year-code { padding: 8px 6px; }
  .year-code .e { display: none; }
  .year-digits b { font-size: 18px; }
}

/* Front page: free guides (landings/common.js guides()); works on the light and the dark landing versions */
.lp-guides { width: min(1080px, 100% - 32px); margin: 56px auto 40px; }
.lp-guides h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 12px; }
.lp-guides > p { max-width: 760px; font-size: 17px; line-height: 1.7; margin: 0 0 12px; opacity: .92; }
.lp-guides > p a { color: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: #ffc53d; }
.lp-guide-tiles { list-style: none; padding: 0; margin: 22px 0 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.lp-guide-tiles a { display: grid; gap: 4px; height: 100%; padding: 16px 18px; border-radius: 16px; background: #fff; color: #1c2340; text-decoration: none;
  border: 1px solid rgba(28, 35, 64, .1); box-shadow: 0 10px 26px -14px rgba(28, 35, 64, .35); transition: transform .15s; }
.lp-guide-tiles a:hover { transform: translateY(-2px); }
.lp-guide-tiles b { font-size: 17px; line-height: 1.25; color: #1c2340; font-family: inherit; }
.lp-guide-tiles span { font-size: 14px; color: #545d7e; line-height: 1.45; }
.lp-guides-all a { color: inherit; font-weight: 700; }
.lp-guides.v8-guides { color: #fff; }
.lp-guides.v8-guides h2 { color: #fff; }
.lp-guides.v6-guides { color: #1c2340; }
.lp-guides.v6-guides h2 { color: #1c2340; }
.lp-guides.v6-guides > p a { text-decoration-color: #7c4dff; }
.lp-guides.v8-guides h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; }

/* Admin analytics */
.an-kpis { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.an-kpis .panel small { display: block; }
.an-filters { gap: 8px; margin: 10px 0; align-items: center; }
.an-filters select, .an select.input { width: auto; max-width: 220px; padding: 8px 10px; }
.an-table td, .an-table th { white-space: nowrap; font-size: 14px; }
.an-table td.an-key { white-space: normal; min-width: 170px; max-width: 300px; overflow-wrap: anywhere; font-weight: 600; }
.an input[type=date].input { width: auto; }
.an-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

/* Premium (#/premium) */
.prem-hero h1 { margin: 0 0 6px; }
.prem-hero p { margin: 0; font-size: 18px; }
.prem-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 16px; }
.prem-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.prem-opt { position: relative; display: grid; gap: 4px; text-align: left; padding: 18px 16px 14px; border-radius: 18px; border: 2px solid var(--line, #dde3f3); background: var(--card, #fff); cursor: pointer; font: inherit; color: inherit; }
.prem-opt.on { border-color: var(--primary, #5146e5); box-shadow: 0 0 0 3px rgba(81, 70, 229, .15); }
.prem-opt b { font-size: 15px; }
.prem-price { font-size: 26px; font-weight: 800; }
.prem-opt small { opacity: .75; }
.prem-badge { position: absolute; top: -11px; right: 12px; background: #ffc53d; color: #1c2340; font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 99px; }
.btn.big { padding: 16px 22px; font-size: 18px; }
.small { font-size: 13px; }
.prem-thanks { font-size: 18px; font-weight: 700; }
.prem-warn { color: var(--bad, #c8401f); font-weight: 700; }
@media (max-width: 480px) { .prem-opts { grid-template-columns: 1fr; } }
