@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/nunito-600.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/nunito-700.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/nunito-800.woff2") format("woff2");
}

:root {
  --bg: #f4f1ea;
  --ink: #1c2430;
  --muted: #5d6b73;
  --line: #e3dccf;
  --pine: #0f6e56;
  --pine-dark: #084c3c;
  --pine-soft: #e5f4ee;
  --gold: #e9a825;
  --gold-soft: #fff4d6;
  --good: #157a45;
  --good-soft: #e5f6ec;
  --bad: #c4382f;
  --bad-soft: #fdecea;
  --card: #fffcf7;
  --shadow: 0 10px 30px rgba(28, 36, 48, 0.06);
  --tab: calc(86px + env(safe-area-inset-bottom));
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  font-family: "Nunito", "Segoe UI", sans-serif;
  font-weight: 600;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 50% -10%, #d7efe4, transparent 55%),
    #dfeae4;
}
button, input { font: inherit; color: inherit; }
button { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--pine); outline-offset: 2px; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.app {
  width: min(480px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}
@media (min-width: 560px) {
  body { padding: 24px 0; }
  .app {
    min-height: calc(100dvh - 48px);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15, 60, 45, 0.16);
  }
}

#view { padding-bottom: var(--tab); }
#tabs:empty { display: none; }
body:has(#tabs:empty) #view { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
body.lesson-mode { overflow: hidden; height: 100dvh; background: var(--bg); }
body.lesson-mode .app { height: 100dvh; min-height: 0; border-radius: 0; box-shadow: none; }
body.lesson-mode #view { height: 100%; padding-bottom: 0; overflow: auto; }
#tabs {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(480px, 100%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  background: #fffdf9;
  border-top: 1px solid var(--line);
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  z-index: 5;
  box-shadow: 0 -8px 24px rgba(28, 36, 48, 0.05);
}
#tabs a {
  text-decoration: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 62px;
  padding: 8px 2px 6px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
}
#tabs a.on {
  color: var(--pine-dark);
  background: var(--pine-soft);
}
.tab-ico { width: 26px; height: 26px; display: block; }
.tab-ico svg { width: 26px; height: 26px; display: block; }
.tab-label { display: block; }

.screen { padding: 18px 18px 8px; }
.topbar { padding-top: env(safe-area-inset-top); }
.brand-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.course-switch { position: relative; flex: none; }
.course-switch summary {
  list-style: none;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  color: var(--pine);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}
.course-switch summary::-webkit-details-marker { display: none; }
.course-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 6;
  width: min(260px, 72vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  box-shadow: var(--shadow);
}
.course-menu a, .course-here { display: block; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit; }
.course-menu a:hover { background: var(--pine-soft); }
.course-menu strong { display: block; }
.course-menu span, .course-here span { color: var(--muted); font-size: 13px; font-weight: 600; }
.course-hub { font-weight: 800; color: var(--pine); }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand h1 { font-size: 22px; line-height: 1; margin: 0; font-weight: 800; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.stats-row {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}
.pill, .goal {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  font-weight: 800;
}
.flame { width: 18px; height: 18px; display: inline-flex; color: #e07a14; }
.flame svg { width: 18px; height: 18px; }
.goal {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 8px;
}
.goal b { display: block; font-size: 14px; }
.goal span { color: var(--muted); font-size: 12px; }
.ring { width: 40px; height: 40px; display: block; }
.ring-track { fill: none; stroke: #efe8da; stroke-width: 4; }
.ring-value {
  fill: none;
  stroke: var(--pine);
  stroke-width: 4;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 22px 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.continue {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: var(--pine);
  color: white;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 12px 24px rgba(15, 110, 86, 0.22);
  text-decoration: none;
}
a.unit { text-decoration: none; color: inherit; }
.mat-link { margin-top: 14px; }
.continue small { display: block; opacity: 0.85; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; }
.continue strong { display: block; font-size: 22px; font-weight: 800; margin: 4px 0; }
.continue em { font-style: normal; font-weight: 700; opacity: 0.92; }
.section-label {
  margin: 22px 2px 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.path { display: flex; flex-direction: column; gap: 10px; }
.unit {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 18px;
  padding: 12px 12px 12px 14px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  box-shadow: var(--shadow);
}
.unit.current { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233, 168, 37, 0.25); }
.unit.locked { opacity: 0.72; }
.unit.done { background: #f3faf6; }
.marker {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--pine-soft);
  color: var(--pine-dark);
  font-weight: 800;
}
.unit.done .marker { background: var(--pine); color: white; }
.unit.locked .marker { background: #efeae2; color: #8a8175; }
.unit h2 { margin: 0; font-size: 17px; font-weight: 800; }
.unit p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 99px;
  background: #efe8da;
  overflow: hidden;
}
.bar span { display: block; height: 100%; background: var(--pine); border-radius: 99px; }
.fine { color: var(--muted); font-size: 13px; margin: 8px 2px 0; }

.btn {
  appearance: none;
  border: 0;
  background: var(--pine);
  color: white;
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 17px;
  padding: 12px 16px;
}
.btn:disabled { opacity: 0.45; }
.btn.ghost {
  background: transparent;
  color: var(--pine-dark);
  border: 2px solid var(--line);
}
.btn.bad { background: var(--bad); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.text-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--pine);
  font-weight: 800;
  padding: 8px 0;
}

.lesson {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.lesson-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 8px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
}
.track {
  flex: 1;
  height: 12px;
  background: #e7e0d4;
  border-radius: 99px;
  overflow: hidden;
}
.track span { display: block; height: 100%; background: var(--pine); border-radius: 99px; transition: width 0.25s ease; }
.hearts { display: flex; gap: 2px; color: var(--bad); }
.heart { width: 16px; height: 16px; display: block; opacity: 0.28; }
.heart.on { opacity: 1; }
.heart svg, .ico svg { width: 100%; height: 100%; display: block; }
.combo {
  margin: 0 18px;
  color: var(--pine-dark);
  font-size: 13px;
  font-weight: 800;
}
.lesson-body {
  flex: 1;
  overflow: auto;
  padding: 8px 18px 12px;
}
.eyebrow {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine);
  font-size: 12px;
  font-weight: 800;
}
.prompt {
  margin: 6px 0 14px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.capital-hero { margin: 0 0 6px; font-size: 22px; font-weight: 800; color: var(--pine-dark); }
.hint { margin: 6px 0 0; color: var(--muted); }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  width: 100%;
  text-align: left;
  background: white;
  border: 2px solid var(--line);
  border-radius: 16px;
  min-height: 58px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 17px;
}
.choice .key {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #f3efe6;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 13px;
  flex: none;
}
.choice.selected { border-color: var(--pine); background: var(--pine-soft); }
.choice.good { border-color: var(--good); background: var(--good-soft); }
.choice.bad { border-color: var(--bad); background: var(--bad-soft); }
.answer-input {
  width: 100%;
  border: 2px solid var(--line);
  background: white;
  border-radius: 16px;
  min-height: 58px;
  padding: 12px 14px;
  font-size: 18px;
  font-weight: 700;
}
.answer-input:focus { border-color: var(--pine); outline: none; }
.letter-hint { min-height: 1.2em; color: var(--muted); font-weight: 800; }

.map-slot { margin: 4px 0 12px; }
.map {
  background: #e7f3ed;
  border-radius: 18px;
  padding: 6px;
  overflow: hidden;
}
.map svg { width: 100%; height: auto; display: block; }
.map.shape { background: transparent; padding: 0; }
.map.shape svg { height: 190px; }
.map .context path {
  fill: #e7e0d2;
  stroke: #fff;
  stroke-width: 1.1px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.map .state path {
  fill: #d5e6de;
  stroke: #fff;
  stroke-width: 1.4px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.map .dc path {
  fill: #d9d3c7;
  stroke: #fff;
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
.map .state.s1 path { fill: #b7ddd0; }
.map .state.s2 path { fill: #6fbfa4; }
.map .state.s3 path { fill: #1f8f6e; }
.map .state.s4 path { fill: #0c5c46; }
.map .state.is-hot path { fill: var(--gold); }
.map .state.is-on path { fill: var(--pine); }
.map .state.is-good path { fill: var(--good); }
.map .state.is-bad path { fill: var(--bad); }
.map.interactive .state { cursor: pointer; }
@media (hover: hover) {
  .map.interactive .state:hover path { fill: #8fceba; }
  .map.interactive .state.is-on:hover path { fill: var(--pine); }
}

.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match-col { display: flex; flex-direction: column; gap: 8px; }
.match button {
  min-height: 52px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: white;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  padding: 8px;
}
.match button.sel { border-color: var(--pine); background: var(--pine-soft); }
.match button.done { background: var(--pine); color: white; border-color: var(--pine); }
.match button.flash { border-color: var(--bad); background: var(--bad-soft); }

.dock {
  flex: none;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #f7f4ee;
  border-top: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dock.good { background: var(--good-soft); }
.dock.bad { background: var(--bad-soft); }
.dock-note { margin: 0; text-align: center; color: var(--muted); }
.feedback-copy strong { font-size: 20px; font-weight: 800; }
.feedback-copy p { margin: 4px 0 0; white-space: pre-wrap; }
.xp-pop { float: right; font-weight: 800; color: var(--pine-dark); }
.dock.bad .xp-pop { color: var(--bad); }

.sheet {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 26, 0.4);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  z-index: 4;
}
.sheet .card { width: 100%; margin-bottom: env(safe-area-inset-bottom); }
.sheet h2 { margin: 0 0 6px; }

.hero-mark { width: 72px; height: 72px; border-radius: 20px; }
.welcome h1 { font-size: 36px; margin: 12px 0 8px; letter-spacing: -0.03em; }
.welcome p { font-size: 17px; line-height: 1.4; }
.welcome { padding-top: calc(28px + env(safe-area-inset-top)); }

.back {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
  margin-bottom: 8px;
}
.skill-row { margin: 10px 0; }
.skill-row .who { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; }
.meters { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.meter { display: grid; grid-template-columns: 72px 1fr 32px; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.meter-track {
  position: relative;
  height: 8px;
  background: #efe8da;
  border-radius: 99px;
  overflow: hidden;
}
.meter-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--pine);
}
.meter-num { text-align: right; font-weight: 800; color: var(--ink); }

.search {
  width: 100%;
  border: 2px solid var(--line);
  background: white;
  border-radius: 14px;
  min-height: 48px;
  padding: 10px 12px;
  font-size: 16px;
  margin: 8px 0 12px;
}
.atlas-list { display: flex; flex-direction: column; gap: 8px; }
.atlas-list a, .weak a {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
}
.atlas-list strong, .weak strong { display: block; }
.atlas-list small, .weak small { color: var(--muted); }
.legend { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; margin-right: 4px; vertical-align: -2px; }
.swatch-0 { background: #d5e6de; }
.swatch-1 { background: #b7ddd0; }
.swatch-2 { background: #6fbfa4; }
.swatch-3 { background: #1f8f6e; }
.swatch-4 { background: #0c5c46; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-grid div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.stat-grid b { display: block; font-size: 22px; }
.stat-grid span { color: var(--muted); font-size: 13px; }
.choice-row { display: flex; gap: 8px; }
.choice-row button { flex: 1; }
.seg { min-height: 44px; border-radius: 12px; border: 2px solid var(--line); background: white; font-weight: 800; }
.seg.on { border-color: var(--pine); background: var(--pine-soft); color: var(--pine-dark); }
.toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  font-weight: 800;
}
.switch { width: 42px; height: 26px; border-radius: 99px; background: #ddd4c6; position: relative; flex: none; }
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  transition: transform 0.15s ease;
}
.switch.on { background: var(--pine); }
.switch.on::after { transform: translateX(16px); }
.file input { display: none; }
.account-card { margin: 4px 0 16px; }
.player-name { font-size: 22px; }
.code-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--pine-soft); border-radius: 14px; padding: 10px 12px; }
.code-label { display: block; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.friend-code { font-size: 22px; letter-spacing: 0.12em; }
.btn.slim { width: auto; min-height: 46px; padding: 8px 16px; }
.account-stats { margin-top: 4px; }
.friend-add { display: flex; gap: 8px; align-items: center; }
.friend-add .search { margin: 0; }
.friend-list { display: flex; flex-direction: column; gap: 8px; }
.friend-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.friend-row small { display: block; color: var(--muted); font-weight: 700; }
.form-error { margin: 0; color: var(--bad); font-weight: 800; }
.rank-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.rank-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.rank-row.you { border-color: var(--pine); box-shadow: 0 0 0 3px rgba(15, 110, 86, 0.12); }
.rank-row.top { background: #fff9ee; }
.rank-num { font-weight: 800; font-size: 18px; text-align: center; color: var(--muted); }
.rank-num.medal { color: #a56b00; }
.rank-who strong { display: block; }
.rank-who small { color: var(--muted); }
.rank-score { font-size: 18px; }

.mat-game {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: calc(8px + env(safe-area-inset-top)) 14px 10px;
  gap: 8px;
  overflow: hidden;
}
.mat-top { display: flex; align-items: center; gap: 8px; }
.mat-top strong { display: block; font-size: 18px; }
.mat-count { margin: 0; color: var(--muted); font-size: 13px; font-weight: 800; }
.mat-toast { margin: 0; min-height: 2.6em; color: var(--ink); font-weight: 700; }
.mat-board {
  flex: 1 1 auto;
  min-height: 0;
  background: #e7f3ed;
  border-radius: 18px;
  overflow: hidden;
  touch-action: none;
}
.mat-board svg { width: 100%; height: 100%; display: block; }
.mat-context {
  fill: #e7e0d2;
  stroke: #fff;
  stroke-width: 1px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.mat-board.blank .mat-context { fill: transparent; stroke: transparent; }
.mat-slot path {
  fill: rgba(255, 255, 255, 0.72);
  stroke: #6f9486;
  stroke-width: 1.4px;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
}
.mat-slot.filled path { fill: #0f6e56; stroke: #fff; stroke-dasharray: none; }
.mat-slot.miss path { fill: #f6d0cb; stroke: #c4382f; }
.mat-board.blank .mat-slot path { fill: transparent; stroke: transparent; }
.mat-board.blank .mat-slot.filled path { fill: #0f6e56; stroke: #fff; }
.mat-modes { display: flex; gap: 8px; margin-top: 8px; }
.mat-modes a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  color: var(--pine);
  background: #e7f3ed;
  border-radius: 999px;
  padding: 6px 10px;
}
.mat-label { display: none; fill: #084c3c; font-family: Nunito, sans-serif; font-weight: 800; pointer-events: none; }
.mat-label.on { display: block; }
.mat-tray {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.mat-piece {
  border: 2px solid var(--line);
  background: white;
  border-radius: 14px;
  padding: 4px 4px 6px;
  text-align: center;
  touch-action: none;
}
.mat-piece span { display: block; font-size: 11px; font-weight: 800; line-height: 1.15; min-height: 2.2em; }
.mat-piece svg { width: 100%; height: 34px; display: block; }
.mat-piece path { fill: #0f6e56; }
.mat-piece.is-picked { border-color: var(--pine); background: var(--pine-soft); }
.mat-float {
  position: fixed;
  z-index: 30;
  width: 84px;
  height: 64px;
  pointer-events: none;
  filter: drop-shadow(0 10px 14px rgba(28, 36, 48, 0.28));
}
.mat-float path { fill: #0f6e56; }
.mat-dock { display: flex; flex-direction: column; gap: 8px; }
.mat-dock strong { font-size: 18px; }

.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.confetti i {
  position: absolute;
  left: var(--x);
  top: var(--y, -20px);
  width: 10px;
  height: 18px;
  background: var(--c, var(--gold));
  border-radius: 2px;
  animation: fall var(--d, 2s) ease-in forwards;
  animation-delay: var(--delay, 0s);
}
.confetti i.dot { width: 14px; height: 14px; border-radius: 50%; }
.confetti i.square { width: 13px; height: 13px; border-radius: 2px; }
.confetti i.ribbon { width: 8px; height: 26px; border-radius: 3px; }
.confetti i.star { width: 0; height: 0; background: transparent; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 18px solid var(--c); }
.medals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.medal { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; color: var(--muted); }
.medal.on { border-color: var(--gold); background: var(--gold-soft); color: var(--ink); }
.medal b { display: block; font-size: 18px; }
.medal span { font-size: 12px; }
.medal-art svg { width: 52px; height: 52px; display: block; margin: 0 auto 4px; }
.medal:not(.on) .medal-art { filter: grayscale(1); opacity: 0.4; }
.friend-open { background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.friend-open small { display: block; color: var(--muted); font-weight: 700; }
.compare { margin: 6px 0 12px; padding: 10px; border-radius: 14px; background: #f6f1e7; }
.compare-names, .compare-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.compare-names { font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.compare-names span:last-child, .compare-row b:last-child { text-align: right; }
.compare-row span { text-align: center; color: var(--muted); font-size: 12px; }
.compare-awards { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.compare-award { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 10px; opacity: 0.38; font-size: 12px; }
.compare-award .medal-art svg { width: 28px; height: 28px; margin: 0; }
.compare-award.you, .compare-award.them { opacity: 1; }
.compare-award.you { box-shadow: inset 3px 0 0 var(--pine); }
.compare-award.them { box-shadow: inset -3px 0 0 var(--gold); }
.compare-award.you.them { box-shadow: inset 3px 0 0 var(--pine), inset -3px 0 0 var(--gold); }
button.banner { width: 100%; text-align: left; border: 0; font: inherit; }
@keyframes fall {
  to { transform: translate(var(--r, 0), 115dvh) rotate(var(--spin, 540deg)) scale(var(--s, 1)); opacity: 0.15; }
}
@media (prefers-reduced-motion: reduce) {
  .track span, .switch::after, .confetti i { transition: none; animation: none; }
}

.result-score { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; margin: 0; }
.result-score small { font-size: 20px; color: var(--muted); letter-spacing: 0; }
.banner {
  background: var(--gold-soft);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 800;
  margin: 8px 0;
}
.map-missing { color: var(--muted); }
