/* Erdkunde styles. Colors come from the theme variables below, so every part
   of the game follows light mode, dark mode, and the chosen accent color. */

:root, [data-theme="light"] {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #f3f2ee;
  --surface-3: #ebe9e3;
  --border: #e5e3dc;
  --border-strong: #d2cfc6;
  --text: #151a19;
  --muted: #5d6865;
  --faint: #8b9592;
  --shadow-sm: 0 1px 2px rgba(20, 26, 25, 0.05);
  --shadow: 0 1px 2px rgba(20, 26, 25, 0.04), 0 8px 24px rgba(20, 26, 25, 0.06);
  --shadow-lg: 0 20px 60px rgba(10, 16, 15, 0.22);
  --glass: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(20, 26, 25, 0.07);
  --overlay: rgba(12, 18, 17, 0.72);
  --note-bg: #fff7e2;
  --note-border: #efd38a;
  --note-text: #4a3a0b;
  --map-bg: #e9e6dd;
  --warm: #e2683c;
  --gold: #c58a00;
  --danger: #b42318;
  --great: #1f9d6b;
  --good: #e9b640;
  --fair: #ef8a4c;
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --heading-font: var(--font);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b100f;
  --surface: #121817;
  --surface-2: #182020;
  --surface-3: #202a28;
  --border: #232d2b;
  --border-strong: #34413e;
  --text: #e6ebe9;
  --muted: #9aa6a2;
  --faint: #6f7b78;
  --shadow-sm: none;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.6);
  --glass: rgba(18, 24, 23, 0.88);
  --glass-border: rgba(255, 255, 255, 0.08);
  --overlay: rgba(5, 8, 8, 0.82);
  --note-bg: #2a2412;
  --note-border: #5b4a1d;
  --note-text: #f3dea3;
  --map-bg: #1b2120;
  --gold: #f0c050;
  --danger: #f2826f;
  color-scheme: dark;
}

/* Accent colors. --accent fills buttons (white text on top), --accent-text is for
   text and icons on the page background, --accent-soft is a light tint. */
[data-accent="forest"] { --accent: #1f6f5c; --accent-strong: #165646; --accent-soft: #e3efe9; --accent-text: #17594a; }
[data-accent="ocean"] { --accent: #1d5fa8; --accent-strong: #164a85; --accent-soft: #e4edf8; --accent-text: #174f8d; }
[data-accent="clay"] { --accent: #b4492a; --accent-strong: #933a21; --accent-soft: #f7e8e2; --accent-text: #973c22; }
[data-accent="plum"] { --accent: #7a3e8e; --accent-strong: #5f2f6f; --accent-soft: #f0e7f3; --accent-text: #6b3680; }
[data-accent="pink"] { --accent: #c93a74; --accent-strong: #a82f60; --accent-soft: #fbe8f0; --accent-text: #b02e63; }
[data-accent="slate"] { --accent: #3a4450; --accent-strong: #272e36; --accent-soft: #eceef1; --accent-text: #333c47; }
[data-accent="ochre"] { --accent: #8a6410; --accent-strong: #6d4f0c; --accent-soft: #f6efdc; --accent-text: #74540d; }
[data-theme="dark"][data-accent="forest"] { --accent: #23806a; --accent-strong: #1b6b58; --accent-soft: rgba(52, 170, 140, 0.16); --accent-text: #74d3b6; }
[data-theme="dark"][data-accent="ocean"] { --accent: #2a6fbf; --accent-strong: #225ea3; --accent-soft: rgba(80, 150, 230, 0.16); --accent-text: #8dbdf2; }
[data-theme="dark"][data-accent="clay"] { --accent: #c4572f; --accent-strong: #a8482a; --accent-soft: rgba(230, 120, 80, 0.16); --accent-text: #f0a07f; }
[data-theme="dark"][data-accent="plum"] { --accent: #8c4ea2; --accent-strong: #77418b; --accent-soft: rgba(190, 130, 215, 0.16); --accent-text: #d4a8e6; }
[data-theme="dark"][data-accent="pink"] { --accent: #c8457c; --accent-strong: #ad3a6b; --accent-soft: rgba(240, 120, 170, 0.16); --accent-text: #f5a6c8; }
[data-theme="dark"][data-accent="slate"] { --accent: #556271; --accent-strong: #46525f; --accent-soft: rgba(160, 180, 200, 0.14); --accent-text: #c4ced9; }
[data-theme="dark"][data-accent="ochre"] { --accent: #a77b16; --accent-strong: #8e6812; --accent-soft: rgba(230, 190, 90, 0.16); --accent-text: #ecc96f; }

[data-headings="serif"] { --heading-font: var(--serif); }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s, color 0.25s;
}
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-family: var(--heading-font); }
h1 { font-weight: 700; letter-spacing: -0.02em; }
[data-headings="serif"] h1 { font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 18px; letter-spacing: -0.01em; }
h3 { font-size: 15px; }
p { margin: 0 0 0.75em; }
a { color: var(--accent-text); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 24px; text-align: center; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 16px;
  font: inherit; font-weight: 600; font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px;
  cursor: pointer; text-decoration: none; text-align: center; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.08s;
}
.btn:hover:not(:disabled) { border-color: var(--accent-text); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); border-color: transparent; }
.btn.danger { color: var(--danger); }
.btn.primary.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { min-height: 34px; padding: 5px 11px; font-size: 14px; border-radius: 10px; }
.btn.big { min-height: 52px; font-size: 17px; width: 100%; border-radius: 14px; }
.btn.wide { width: 100%; }
.btn.big-ish { min-height: 46px; font-size: 16px; padding: 10px 20px; }
.btn.glass { background: var(--glass); border-color: var(--glass-border); backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-text); text-decoration: underline; cursor: pointer; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.field input, .field select, .field textarea, textarea, .join input, .maker-search input,
.mk-name, .mk-fact, .mk-zoom {
  font: inherit; font-weight: 400; font-size: 15px; color: var(--text);
  padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--surface); width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, textarea:focus, .join input:focus, .maker-search input:focus,
.mk-name:focus, .mk-fact:focus, .mk-zoom:focus {
  outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field select:disabled { background: var(--surface-2); color: var(--muted); }
textarea { resize: vertical; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 8px; }

/* Top bar */
.topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px clamp(16px, 4vw, 40px); background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar.bare { background: transparent; border: 0; padding-left: 0; padding-right: 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-name { font-family: var(--serif); font-size: 25px; font-weight: 600; letter-spacing: 0.01em; }
.topbar-title { font-weight: 600; color: var(--muted); }
.topnav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 2px; }

/* Banner */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 14px clamp(16px, 4vw, 40px) 24px; }
.hero-content { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr); gap: 32px; align-items: center; padding: 26px 0 14px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12.5px; font-weight: 700; color: var(--accent-text); margin-bottom: 12px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 60px); margin-bottom: 16px; }
.lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 560px; margin-bottom: 26px; }
.hero-globe { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; justify-self: center; }
.hero-globe canvas {
  width: 100%; height: 100%; display: block;
  --globe-pin: var(--warm);
}

.daily-card {
  max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.daily-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.daily-head .i { color: var(--accent-text); }
.daily-title { font-weight: 700; font-size: 16px; }
.daily-date { margin-left: auto; font-size: 13px; color: var(--muted); }
.daily-text { color: var(--muted); font-size: 15px; }
.daily-score { font-size: 16px; }
.daily-score strong { font-size: 30px; font-family: var(--heading-font); color: var(--accent-text); margin-right: 4px; }
.daily-streak { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.daily-streak .i { color: var(--warm); }
.daily-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Home */
.home { max-width: 1180px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 40px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 24px; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; }
.home-side .panel { padding: 18px; }
.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; margin-right: 6px;
  border: 1.5px solid var(--accent-text); color: var(--accent-text); font-size: 13px; font-weight: 700; vertical-align: 2px;
}
.group-title { margin: 22px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-family: var(--font); }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.pack-wrap { position: relative; display: flex; }
.pack-wrap .pack { flex: 1; }
.pack-edit {
  position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer;
  background: var(--glass); color: var(--text); box-shadow: var(--shadow);
}
.pack {
  display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden;
  border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface);
  font: inherit; color: inherit; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s;
}
.pack:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.pack[aria-checked="true"] { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-soft); }
.pack-img { position: relative; display: block; height: 104px; overflow: hidden; background: var(--surface-3); }
.pack-img .mosaic { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); transition: transform 0.6s ease; }
.pack:hover .pack-img .mosaic { transform: translate(-50%, -50%) scale(1.05); }
.pack-img .pack-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.pack:hover .pack-img .pack-photo { transform: scale(1.05); }
.pack-check {
  position: absolute; right: 10px; top: 10px; z-index: 1; width: 28px; height: 28px; border-radius: 50%;
  display: none; align-items: center; justify-content: center; background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.pack-check .i { width: 16px; height: 16px; stroke-width: 3; }
.pack[aria-checked="true"] .pack-check { display: flex; }
.pack-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.pack-title { font-weight: 700; font-size: 16px; }
.pack-desc { font-size: 13px; color: var(--muted); }
.pack-count { font-size: 12px; color: var(--accent-text); font-weight: 700; margin-top: 6px; }
.mosaic { display: block; position: relative; overflow: hidden; }
.mosaic img { position: absolute; width: 256px; height: 256px; max-width: none; }
.region-row { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.region-label { font-size: 14px; font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 14px; font-weight: 600; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; color: var(--text);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip .i { width: 16px; height: 16px; }
.chip:hover:not(:disabled) { border-color: var(--accent-text); }
.chip[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:disabled { opacity: 0.4; cursor: not-allowed; }
.chip[aria-checked="true"]:disabled { opacity: 1; cursor: default; }
.setting { margin-bottom: 14px; }
.setting-label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.note { background: var(--note-bg); border: 1px solid var(--note-border); color: var(--note-text); border-radius: 11px; padding: 8px 12px; font-size: 14px; }

.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.swatch {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.swatch-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--sw); flex: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25); }
.swatch[aria-checked="true"] { border-color: var(--sw); box-shadow: 0 0 0 3px var(--accent-soft); }

.mode-cards { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.mode-cards button {
  display: flex; align-items: center; gap: 10px; font: inherit; font-size: 15px; font-weight: 600; text-align: left;
  padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text);
}
.mode-cards button .i { width: 21px; height: 21px; color: var(--muted); }
.mode-cards button[aria-checked="true"] { border-color: var(--accent-text); background: var(--accent-soft); }
.mode-cards button[aria-checked="true"] .i { color: var(--accent-text); }
.mode-cards button:disabled { opacity: 0.45; cursor: not-allowed; }
.names { margin-top: 10px; }

.segmented { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.segmented button {
  font: inherit; font-size: 15px; font-weight: 600; text-align: left;
  padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text);
}
.segmented button[aria-checked="true"] { border-color: var(--accent-text); background: var(--accent-soft); }
.segmented.small { flex-direction: row; gap: 0; margin: 0; }
.segmented.small button { padding: 6px 12px; font-size: 14px; border-radius: 0; border-width: 1px; }
.segmented.small button:first-child { border-radius: 10px 0 0 10px; }
.segmented.small button:last-child { border-radius: 0 10px 10px 0; }

.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.settings.compact .field { margin-bottom: 8px; }
.home-side .btn.big { margin: 6px 0 8px; }
.join { display: flex; gap: 8px; }
.join input { text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--mono); }

.banner {
  background: var(--note-bg); border: 1px solid var(--note-border); color: var(--note-text); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
}
.banner p { margin: 0; }

.history { list-style: none; margin: 0; padding: 0; }
.history li { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 9px 0 9px 12px; border-top: 1px solid var(--border); font-size: 14px; }
.history li:first-child { border-top: 0; }
.h-bar { position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: linear-gradient(0deg, var(--accent) var(--p), var(--surface-3) var(--p)); }
.h-title { font-weight: 600; }
.h-score { text-align: right; font-variant-numeric: tabular-nums; }
.h-date { grid-column: 1 / -1; }

.footer { text-align: center; padding: 20px; color: var(--muted); font-size: 13px; }

/* Game */
.game { position: fixed; inset: 0; background: #0c1110; overflow: hidden; }
.scene { position: absolute; inset: 0; background: #0c1110; }
.scene.loading .leaflet-tile-pane { visibility: hidden; }
.scene.loading::after {
  content: "Loading the view..."; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  color: #fff; font-weight: 600; z-index: 500;
}
.scene.fixed .leaflet-control-zoom { display: none; }
.scene .leaflet-control-scale-line { background: var(--glass); color: var(--text); border-color: var(--text); font-weight: 600; }
.compass { position: absolute; left: 14px; bottom: 132px; z-index: 600; width: 44px; height: 44px; pointer-events: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35)); }
.compass circle { fill: var(--glass); stroke: var(--glass-border); }
.compass .n { fill: var(--warm); }
.compass .s { fill: var(--faint); }
.compass text { font: 800 7px var(--font); fill: var(--text); dominant-baseline: hanging; }

.game-bar {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 800;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--text);
  padding: 8px 10px 8px 16px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(12px); box-shadow: var(--shadow);
}
.gb-left { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.gb-round-line { display: flex; align-items: center; gap: 10px; }
.gb-round { font-weight: 700; }
.gb-dots { display: flex; gap: 4px; }
.dot-r { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); }
.dot-r.great { background: var(--great); }
.dot-r.good { background: var(--good); }
.dot-r.fair { background: var(--fair); }
.dot-r.miss { background: var(--faint); }
.dot-r.current { background: var(--surface); box-shadow: 0 0 0 2px var(--accent-text); }
.gb-title { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-scores { display: flex; gap: 16px; margin: 0 auto; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.gb-score { display: inline-flex; align-items: center; gap: 6px; }
.gb-score .label { font-weight: 500; color: var(--muted); font-size: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.gb-right { display: flex; align-items: center; gap: 6px; }
.gb-timer { position: relative; width: 52px; height: 40px; display: flex; align-items: center; justify-content: center; }
.gb-timer svg { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%) rotate(-90deg); }
.gb-timer .track { fill: none; stroke: var(--surface-3); stroke-width: 3; }
.gb-timer .ring { fill: none; stroke: var(--accent-text); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.gb-timer span { position: relative; font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.gb-timer.low .ring { stroke: var(--danger); }
.gb-timer.low span { color: var(--danger); }

.scene-tools { position: absolute; left: 12px; top: 86px; z-index: 700; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; max-width: 330px; }
.hint-box { background: var(--glass); color: var(--text); backdrop-filter: blur(10px); border-radius: 12px; padding: 10px 13px; box-shadow: var(--shadow); border-left: 4px solid var(--good); }
.hint-box p { margin: 0 0 4px; font-weight: 600; }
.hint-box p.small { font-weight: 400; }
.turn-tag {
  position: absolute; top: 86px; left: 50%; transform: translateX(-50%); z-index: 700;
  color: #fff; font-weight: 700; padding: 7px 18px; border-radius: 999px; box-shadow: var(--shadow);
}

.guess-panel {
  position: absolute; right: 16px; bottom: 24px; z-index: 800;
  width: 380px; height: 300px;
  display: flex; flex-direction: column; gap: 6px; color: var(--text);
  padding: 8px; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(12px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.4);
  transition: width 0.22s ease, height 0.22s ease;
}
.guess-panel:hover, .guess-panel:focus-within { width: 580px; height: 450px; }
.guess-panel.large, .guess-panel.large:hover { width: min(840px, calc(100vw - 32px)); height: min(640px, calc(100vh - 120px)); }
.gp-head { display: flex; align-items: center; gap: 6px; }
.gp-label { font-size: 13px; color: var(--muted); margin-right: auto; padding-left: 4px; }
.guess-map { flex: 1; border-radius: 12px; overflow: hidden; min-height: 0; cursor: crosshair; background: var(--map-bg); }
.guess-map .leaflet-container { cursor: crosshair; }
#btn-guess { min-height: 48px; font-size: 17px; }
.mobile-only { display: none !important; }

.overlay {
  position: absolute; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: var(--overlay); backdrop-filter: blur(8px);
}
.overlay-card { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 22px; padding: 30px; max-width: 480px; width: 100%; text-align: center; box-shadow: var(--shadow-lg); }
.handoff-badge {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px; color: #fff; font-weight: 800; font-size: 28px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.countdown-num { font-size: 60px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 4px 0; color: var(--accent-text); }
.code-display {
  font-family: var(--mono); font-size: 28px; font-weight: 700; letter-spacing: 0.1em;
  background: var(--accent-soft); color: var(--accent-text); border-radius: 12px; padding: 12px; text-align: center; user-select: all;
}

/* Round result */
.result { position: absolute; inset: 0; z-index: 1000; background: var(--map-bg); }
.result-map { position: absolute; inset: 0; background: var(--map-bg); }
.result-card {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 900;
  width: min(780px, calc(100% - 24px)); max-height: calc(100% - 40px); overflow: auto; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 22px 24px 18px; box-shadow: var(--shadow-lg);
  animation: rise 0.35s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.rc-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.rc-title { min-width: 0; }
.result-kicker { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0; font-weight: 700; }
.result-place { font-size: 30px; margin: 2px 0; letter-spacing: -0.01em; }
.result-where { color: var(--muted); margin-bottom: 10px; }
.rc-points { text-align: right; flex: none; }
.rc-points-num { display: block; font-family: var(--heading-font); font-size: 44px; font-weight: 700; line-height: 1; color: var(--accent-text); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.rc-points-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.rc-points.perfect .rc-points-num { color: var(--gold); }
.rc-points.perfect .rc-points-label::before { content: "Perfect! "; color: var(--gold); }
.result-players { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 12px; }
.rp { display: flex; gap: 12px; align-items: center; padding: 11px 13px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border); }
.rp.right { background: var(--accent-soft); border-color: transparent; }
.rp-badge { flex: none; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.rp-main { flex: 1; min-width: 0; }
.rp-line { margin: 0; font-weight: 600; }
.rp-check { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.rp.right .rp-check { color: var(--accent-text); font-weight: 600; }
.rp-points { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.rp-num { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.rp-num.perfect { color: var(--gold); }
.rp-hint { font-size: 12px; color: var(--muted); }
.bar { height: 7px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 7px; }
.bar span { display: block; height: 100%; border-radius: 99px; transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.result-fact { font-size: 16px; border-left: 3px solid var(--warm); padding: 2px 0 2px 12px; margin-bottom: 10px; }
.result-meta { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.result-meta li { display: flex; gap: 8px; }
.meta-label { flex: none; min-width: 64px; font-weight: 700; color: var(--text); }
.result-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; }
.result-actions #btn-next { margin-left: auto; min-width: 190px; min-height: 48px; }
.result-wait { margin-left: auto; font-weight: 700; color: var(--accent-text); }
.confetti { position: fixed; inset: 0; z-index: 2000; pointer-events: none; }

/* Map markers and controls */
.ek-pin { background: none; border: 0; }
.ek-pin-body {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  animation: drop 0.3s ease-out;
}
@keyframes drop { from { opacity: 0; translate: 0 -14px; } to { opacity: 1; translate: 0 0; } }
.ek-pin-body span { transform: rotate(45deg); color: #fff; font-weight: 800; font-size: 13px; font-family: var(--font); }
.ek-flag { background: none; border: 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4)); animation: plant 0.45s cubic-bezier(0.2, 1.4, 0.4, 1); transform-origin: 5px 40px; }
@keyframes plant { from { opacity: 0; scale: 0.3; } to { opacity: 1; scale: 1; } }
.ek-num { background: none; border: 0; }
.ek-num span {
  display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.ek-num.active span { background: var(--warm); transform: scale(1.2); }
.leaflet-container { font-family: var(--font); background: var(--map-bg); }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--surface); color: var(--text); border-bottom-color: var(--border); }
.leaflet-bar a.leaflet-disabled { background: var(--surface-2); color: var(--faint); }
.leaflet-bar { border: 1px solid var(--border-strong) !important; box-shadow: var(--shadow-sm) !important; border-radius: 10px !important; overflow: hidden; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); }
.leaflet-control-attribution { font-size: 10px; }
.leaflet-container .leaflet-control-attribution { background: var(--glass); color: var(--muted); }
.leaflet-container .leaflet-control-attribution a { color: var(--accent-text); }
.guess-map .leaflet-control-attribution,
.summary-map .leaflet-control-attribution,
.maker-map .leaflet-control-attribution,
.result-map .leaflet-control-attribution { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guess-map .leaflet-control-attribution:hover,
.summary-map .leaflet-control-attribution:hover,
.maker-map .leaflet-control-attribution:hover,
.result-map .leaflet-control-attribution:hover,
.leaflet-control-attribution:focus-within { white-space: normal; }
.leaflet-control-scale-line { background: var(--glass); color: var(--text); border-color: var(--text); }

/* Summary */
.summary { max-width: 1180px; margin: 0 auto; padding: 26px clamp(16px, 4vw, 40px) 40px; }
.summary-hero { display: flex; gap: 28px; align-items: center; margin-bottom: 22px; }
.score-ring { display: flex; gap: 18px; flex: none; }
.ring { position: relative; width: 168px; height: 168px; --ring: var(--accent-text); }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--surface-3); stroke-width: 10; }
.ring-fill { fill: none; stroke: var(--ring); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-label { font-family: var(--heading-font); font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.ring-sub { font-size: 13px; color: var(--muted); margin-top: 4px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-text h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 6px; }
.kicker { text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-size: 12.5px; font-weight: 700; margin: 0 0 4px; }
.sum-score { font-size: 18px; }
.summary-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.summary-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.summary-map { position: sticky; top: 16px; height: 560px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.visited h2 { margin-top: 0; }
.visited-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.v-item { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.v-thumb { position: relative; flex: none; width: 150px; min-height: 140px; overflow: hidden; background: var(--surface-3); }
.v-thumb .mosaic { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.v-num {
  position: absolute; left: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.v-body { padding: 12px 14px 12px 0; min-width: 0; }
.v-body h3 { font-size: 18px; margin: 0 0 2px; }
.v-where { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.v-scores { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.v-score { font-size: 13px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border-left: 4px solid var(--c); font-variant-numeric: tabular-nums; }
.v-fact { font-size: 14px; margin: 0 0 4px; }
.v-link { font-size: 13px; font-weight: 600; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.total td { font-weight: 800; border-bottom: 0; }
.table caption { padding: 16px; text-align: left; }
.table-wrap { overflow-x: auto; }

/* Maker */
.maker { display: flex; flex-direction: column; height: 100vh; }
.maker-body { flex: 1; display: grid; grid-template-columns: 420px minmax(0, 1fr); min-height: 0; }
.maker-side { overflow-y: auto; padding: 18px; background: var(--surface); border-right: 1px solid var(--border); }
.maker-games { display: flex; gap: 8px; align-items: flex-end; }
.maker-games .field { flex: 1; }
.maker-games .btn { margin-bottom: 12px; }
.maker-h { margin-top: 8px; }
.mk-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mk-list li { border: 1.5px solid var(--border); border-radius: 13px; padding: 10px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.mk-list li.active { border-color: var(--warm); }
.mk-list li.mk-empty { border-style: dashed; text-align: center; padding: 18px; }
.mk-row { display: flex; gap: 8px; align-items: center; }
.mk-row.tools { flex-wrap: wrap; gap: 4px; }
.mk-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff;
  font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.mk-name, .mk-fact, .mk-zoom { font-size: 14px; padding: 7px 9px; border-radius: 9px; }
.mk-zoom { width: auto; margin-right: auto; }
.maker-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.maker-actions #mk-play { grid-column: 1 / -1; }
.maker-actions .btn { white-space: normal; }
#mk-delete { width: 100%; }
.maker-mapwrap { position: relative; min-height: 0; }
.maker-map { position: absolute; inset: 0; }
.maker-search { position: absolute; top: 12px; left: 60px; right: 12px; z-index: 800; display: flex; gap: 8px; align-items: flex-start; }
.maker-search input { flex: 1; box-shadow: var(--shadow); max-width: 520px; }
.maker-search .segmented { margin-left: auto; box-shadow: var(--shadow); border-radius: 10px; }
.search-results {
  position: absolute; top: 48px; left: 0; width: min(520px, 100%); list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow); max-height: 360px; overflow-y: auto;
}
.search-results li { padding: 0; }
.search-results li.muted { padding: 10px; }
.search-results button { width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 9px; font: inherit; cursor: pointer; color: var(--text); }
.search-results button:hover, .search-results button:focus { background: var(--accent-soft); }
.mk-pop p { margin: 2px 0 8px; }

/* Results page */
.results-page { max-width: 1180px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 40px; display: flex; flex-direction: column; gap: 20px; }
.results-page textarea { margin-bottom: 10px; font-family: var(--mono); font-size: 13px; }

/* Dialogs and toast */
.dialog { border: 1px solid var(--border); border-radius: 20px; padding: 24px; max-width: 520px; width: calc(100% - 32px); box-shadow: var(--shadow-lg); color: var(--text); background: var(--surface); }
.dialog.wide { max-width: 720px; }
.dialog::backdrop { background: var(--overlay); backdrop-filter: blur(3px); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.help-steps li, .credits li { margin-bottom: 8px; }
.photo-credits { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.credits .photo-credits li { margin: 2px 0; }
.copybox { width: 100%; font-family: var(--mono); font-size: 13px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3000;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg);
  max-width: min(560px, calc(100% - 32px)); font-weight: 600; animation: rise-toast 0.25s ease-out;
}
@keyframes rise-toast { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Smaller screens */
@media (max-width: 1100px) {
  .topnav .btn span { display: none; }
  .topnav .btn { padding: 8px 10px; }
}
@media (max-width: 980px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-side { position: static; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-map { position: static; height: 360px; }
  .maker-body { grid-template-columns: 1fr; grid-template-rows: 55vh auto; }
  .maker-mapwrap { order: -1; min-height: 55vh; }
  .maker { height: auto; }
  .maker-side { border-right: 0; }
}
@media (max-width: 820px) {
  .hero-content { grid-template-columns: 1fr; gap: 10px; }
  .hero-globe { max-width: 260px; order: -1; }
}
@media (max-width: 720px) {
  .settings, .settings-row { grid-template-columns: 1fr; }
  .summary-hero { flex-direction: column; text-align: center; }
  .summary-actions { justify-content: center; }
  .ring { width: 140px; height: 140px; }
  .swatches { grid-template-columns: repeat(2, 1fr); }
  .game-bar { top: 8px; left: 8px; right: 8px; padding: 6px 8px 6px 12px; gap: 8px; }
  .gb-title, .hide-narrow, .gb-dots { display: none; }
  .gb-scores { margin: 0; font-size: 15px; }
  .scene-tools { top: auto; bottom: 84px; left: 8px; }
  .compass { display: none; }
  .mobile-only { display: inline-flex !important; }
  .open-map { position: absolute; right: 12px; bottom: 20px; z-index: 750; min-height: 52px; box-shadow: var(--shadow); }
  .guess-panel { display: none; }
  .guess-panel.open, .guess-panel.open:hover, .guess-panel.open.large {
    display: flex; inset: 70px 8px 8px 8px; width: auto; height: auto; z-index: 900;
  }
  #gp-size { display: none; }
  .result-card { bottom: 8px; padding: 14px 16px; max-height: 52%; }
  .result-place { font-size: 23px; }
  .rc-points-num { font-size: 34px; }
  .rp { flex-wrap: wrap; }
  .v-thumb { width: 104px; }
  .maker-search { left: 12px; flex-wrap: wrap; }
}

/* Printing the final results */
@media print {
  :root { --bg: #fff; --surface: #fff; --text: #000; }
  .topbar, .summary-actions, .footer, .summary .muted.small.center { display: none !important; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-map { position: static; height: 380px; }
  .panel { border: 0; padding: 0; }
  .v-item { break-inside: avoid; }
}

/* Streaks */
.rp.wrong { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: transparent; }
.rc-points.wrong .rc-points-num { color: var(--danger); }
.v-score.ok { border-left-color: var(--great); }
.v-score.no { border-left-color: var(--danger); }

/* Badges */
.badge-icon {
  flex: none; width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--faint); border: 1px solid var(--border);
}
.badge-icon .i { width: 22px; height: 22px; }
.badge-icon.earned { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 35%, transparent); }
.badge { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.badge:not(.earned) { opacity: 0.72; }
.badge-text { display: flex; flex-direction: column; min-width: 0; }
.badge-text strong { font-size: 15px; }
.badge-desc { font-size: 13px; color: var(--muted); }
.badge-date { font-size: 12px; color: var(--accent-text); font-weight: 600; margin-top: 2px; }
.badge.pop { animation: pop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.badge.pop:nth-child(3) { animation-delay: 0.12s; }
.badge.pop:nth-child(4) { animation-delay: 0.24s; }
@keyframes pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.sum-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: center; }
.sum-badges-title { width: 100%; margin: 0; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--accent-text); }
.sum-badges .badge { max-width: 360px; }

/* Progress page */
.progress-page { max-width: 1180px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 40px; display: flex; flex-direction: column; gap: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat-value { font-family: var(--heading-font); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 14px; font-weight: 600; }
.stat-sub { font-size: 12.5px; color: var(--muted); }
.progress-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.progress-grid > section:first-child { order: 2; }
.progress-map { height: 420px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 12px; }
@media (max-width: 980px) { .progress-grid { grid-template-columns: 1fr; } }

/* Latitude and longitude lines */
.leaflet-container path.grat-line { stroke: rgba(30, 60, 90, 0.35); stroke-width: 1; }
.leaflet-container path.grat-prime, .leaflet-container path.grat-dateline { stroke: rgba(30, 60, 90, 0.7); stroke-width: 1.5; }
.leaflet-container path.grat-equator { stroke: #c2410c; stroke-width: 2; }
.leaflet-container path.grat-special { stroke: #c2410c; stroke-width: 1.5; stroke-dasharray: 6 5; }
[data-theme="dark"] .leaflet-container path.grat-line { stroke: rgba(200, 220, 230, 0.3); }
[data-theme="dark"] .leaflet-container path.grat-prime, [data-theme="dark"] .leaflet-container path.grat-dateline { stroke: rgba(200, 220, 230, 0.65); }
[data-theme="dark"] .leaflet-container path.grat-equator, [data-theme="dark"] .leaflet-container path.grat-special { stroke: #fb923c; }
.grat-label { pointer-events: none; }
.grat-label span {
  position: absolute; white-space: nowrap; font: 600 10.5px var(--font); color: var(--text);
  background: var(--glass); padding: 1px 5px; border-radius: 6px; border: 1px solid var(--glass-border);
}
.grat-label.left span { left: 4px; transform: translateY(-50%); }
.grat-label.top span { top: 4px; transform: translateX(-50%); }
.grat-label.right span { right: 4px; transform: translateY(-115%); color: #c2410c; }
[data-theme="dark"] .grat-label.right span { color: #fb923c; }
.gp-coords { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.icon-btn.on { background: var(--accent-soft); color: var(--accent-text); }

/* Privacy policy and terms of use */
.legal-body { background: var(--bg); color: var(--text); }
.legal-page { max-width: 800px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 16px; }
.legal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 22px; }
.legal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: clamp(22px, 4vw, 44px); }
.legal h1 { font-size: clamp(28px, 4vw, 36px); margin: 0 0 6px; }
.legal .updated { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
.legal h2 { font-size: 19px; margin: 30px 0 8px; }
.legal p, .legal li { line-height: 1.65; }
.legal ul { padding-left: 22px; margin: 8px 0; }
.legal li { margin: 4px 0; }
.legal a, .footer a { color: var(--accent-text); }
