:root {
  --ink: #532f42;
  --muted: #846b78;
  --cream: #fff7e8;
  --paper: #fffdf8;
  --coral: #ff775f;
  --orange: #ffb341;
  --teal: #46b8a9;
  --sky: #8cd7e8;
  --lavender: #b9a8ed;
  --line: #eadbc9;
  --shadow: 0 18px 0 rgba(83, 47, 66, 0.08), 0 28px 70px rgba(83, 47, 66, 0.15);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 11% 18%, rgba(255, 179, 65, 0.17) 0 6px, transparent 7px),
    radial-gradient(circle at 88% 24%, rgba(70, 184, 169, 0.16) 0 5px, transparent 6px),
    var(--cream);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  overflow-x: hidden;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.sky-shape {
  position: fixed;
  z-index: -1;
  border: 2px solid rgba(83, 47, 66, 0.07);
  transform: rotate(-8deg);
}

.sky-shape-one {
  width: 260px; height: 260px;
  left: -90px; top: 30%;
  border-radius: 42% 58% 65% 35% / 48% 38% 62% 52%;
  background: rgba(140, 215, 232, 0.25);
}

.sky-shape-two {
  width: 220px; height: 220px;
  right: -70px; top: 7%;
  border-radius: 64% 36% 42% 58% / 48% 64% 36% 52%;
  background: rgba(185, 168, 237, 0.19);
  transform: rotate(19deg);
}

.sky-shape-three {
  width: 170px; height: 170px;
  right: 4%; bottom: -88px;
  border-radius: 50%;
  background: rgba(255, 119, 95, 0.12);
}

.app-shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.48rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  color: white;
  background: var(--teal);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 1.4rem;
  transform: rotate(12deg);
}

.icon-button {
  width: 40px; height: 40px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 900;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.icon-button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.icon-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.hero-copy { text-align: center; margin: 34px auto 22px; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--coral);
  font-size: 0.77rem;
  font-weight: 900;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 8vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}
.hero-copy > p:last-child {
  max-width: 510px;
  margin: 13px auto 0;
  color: var(--muted);
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: 0.98rem;
}

.mode-panel { display: grid; justify-items: center; gap: 10px; margin-bottom: 18px; }
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 5px;
  gap: 4px;
  background: #eadfcf;
  border-radius: 16px;
}

.mode-button, .duration-button {
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
}

.mode-button {
  padding: 9px 15px;
  border-radius: 11px;
  transition: background 140ms ease, transform 140ms ease, color 140ms ease;
}
.mode-button.is-active {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 2px 7px rgba(83, 47, 66, 0.12);
}

.duration-row {
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: 0.82rem;
}
.duration-row:not([hidden]) { display: flex; }
.duration-button {
  min-width: 48px;
  padding: 5px 9px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.6);
  font-size: 0.78rem;
}
.duration-button.is-active { color: white; border-color: var(--teal); background: var(--teal); }
.duration-divider { width: 1px; height: 24px; margin-inline: 2px; background: rgba(83,47,66,.16); }
.hyper-toggle {
  min-height: 30px;
  padding: 5px 11px;
  color: var(--muted);
  background: rgba(255,255,255,.62);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 900;
}
.hyper-toggle.is-active { color: white; border-color: var(--coral); background: var(--coral); }

.filter-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(460px, 100%);
  padding: 5px 7px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-family: "Trebuchet MS", system-ui, sans-serif;
}
.filter-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.filter-check {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 18px; height: 18px;
  color: transparent;
  background: rgba(255,255,255,.55);
  border: 1.5px solid var(--muted);
  border-radius: 5px;
  box-shadow: none;
  font-size: .62rem;
  font-weight: 900;
}
.filter-toggle input:checked + .filter-check { color: white; background: var(--teal); }
.filter-toggle input:focus-visible + .filter-check { outline: 3px solid rgba(70,184,169,.28); outline-offset: 2px; }
.filter-toggle b { display: block; color: var(--muted); font-size: .74rem; }
.filter-toggle small { display: block; margin-top: 1px; color: #a08a95; font-size: .66rem; line-height: 1.2; }

.game-card {
  position: relative;
  overflow: visible;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 13px;
  border-bottom: 1.5px solid var(--line);
}

.round-pill {
  padding: 6px 10px;
  color: white;
  background: var(--ink);
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.scoreline {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: 0.78rem;
}
.scoreline b { color: var(--ink); }
.score-divider { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }

.map-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 375px;
  padding: 34px;
  overflow: hidden;
  background: #f7eddd;
}

.map-grid {
  position: absolute;
  inset: 0;
  opacity: 0.36;
  background-image:
    linear-gradient(rgba(83,47,66,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83,47,66,.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 15%, transparent 72%);
}

.country-svg {
  position: relative;
  z-index: 2;
  width: min(570px, 92%);
  height: 290px;
  overflow: visible;
  opacity: 1;
  transform: scale(1);
  transition: opacity 120ms ease, transform 220ms cubic-bezier(.2,.8,.2,1);
}
.country-svg.is-hidden { opacity: 0; transform: scale(.84) rotate(-2deg); }
.country-svg.is-concealed { opacity: 0; transform: scale(.84); visibility: hidden; }
.map-stage.flash-mode .country-svg { transition: none; }
.country-svg.is-revealing { animation: land-in 460ms cubic-bezier(.2,.9,.3,1.2); }
.map-stage.flash-mode .country-svg.is-revealing { animation: none; }
@keyframes land-in { from { opacity: 0; transform: scale(.68) rotate(-4deg); } to { opacity: 1; transform: scale(1); } }

.ready-state, .hidden-shape {
  position: relative;
  z-index: 4;
  text-align: center;
}
.ready-state h2 { margin: 7px 0 3px; font-size: 1.45rem; }
.ready-state p { margin: 0 0 17px; color: var(--muted); font-family: "Trebuchet MS", system-ui, sans-serif; }
.ready-icon { font-size: 3rem; animation: bob 1.7s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(3deg); } }

.countdown {
  position: relative;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 108px; height: 108px;
  color: white;
  background: var(--coral);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 6px 6px 0 var(--ink);
  font-size: 3.6rem;
  font-weight: 900;
  animation: count-pop 460ms ease both;
}
.countdown[hidden] { display: none; }
@keyframes count-pop { from { transform: scale(.45) rotate(-8deg); } to { transform: scale(1); } }

.hidden-shape span { display: block; font-size: 2.9rem; margin-bottom: 5px; }
.hidden-shape strong { display: block; font-size: 1.4rem; }
.hidden-shape small { display: block; margin-top: 5px; color: var(--muted); font-family: "Trebuchet MS", system-ui, sans-serif; font-size: .9rem; }

.hyper-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  width: 100%;
}
.hyper-shape-card {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 230px;
  padding: 18px 10px 12px;
  background: rgba(255,253,248,.76);
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: 4px 4px 0 rgba(83,47,66,.13);
}
.hyper-number {
  position: absolute;
  left: 9px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: white;
  background: var(--ink);
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 900;
}
.hyper-shape-card svg { width: 100%; height: 176px; overflow: visible; transition: none; }
.hyper-shape-card path { stroke: var(--ink); stroke-width: 1.25; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.hyper-shape-card:nth-child(1) path { fill: var(--coral); }
.hyper-shape-card:nth-child(2) path { fill: var(--orange); }
.hyper-shape-card:nth-child(3) path { fill: var(--teal); }
.hyper-shape-card.is-concealed svg { visibility: hidden; }
.hyper-shape-card.is-resolved { background: #ecfaf5; }
.hyper-shape-card.is-resolved path { fill: #2caa76; }
.hyper-shape-card:not(.is-concealed):not(.is-resolved):not(.is-wrong) .hyper-card-status { display: none; }
.hyper-shape-card.is-resolved .hyper-card-status,
.hyper-shape-card.is-wrong .hyper-card-status { inset: auto 5px 5px; font-size: .75rem; background: inherit; }
.hyper-mode .hidden-shape { display: none; }
.map-stage.hyper-mode { display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.hyper-mode .ready-state,
.hyper-mode .countdown,
.hyper-mode .hyper-grid { flex-shrink: 0; }
.hyper-shape-card.is-wrong { background: #fff0e8; }
.hyper-card-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 2.2rem;
  font-weight: 900;
}
.hyper-shape-card.is-resolved .hyper-card-status { color: var(--teal); }
.hyper-shape-card.is-wrong .hyper-card-status { color: var(--coral); }

.hyper-play-area { padding: 18px 20px 22px; border-top: 1.5px solid var(--line); }
.hyper-instruction { margin: 0 0 12px; color: var(--muted); font-family: "Trebuchet MS", system-ui, sans-serif; font-size: .82rem; }
.hyper-answer-list { display: grid; gap: 9px; }
.hyper-strikes { margin: 0 0 12px; color: #a54537; font-size: .85rem; font-weight: 800; }
.hyper-answer-row {
  display: grid;
  grid-template-columns: 31px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
}
.hyper-answer-number { display: grid; place-items: center; width: 28px; height: 28px; color: white; background: var(--ink); border-radius: 50%; font-size: .75rem; font-weight: 900; }
.hyper-answer-row .guess-input { height: 44px; }
.hyper-answer-row .primary-button { min-height: 44px; padding-inline: 14px; }
.hyper-answer-row.is-correct .guess-input { color: #267c70; border-color: var(--teal); background: #ecfaf5; }
.hyper-answer-row.is-wrong .guess-input { color: #a54537; border-color: var(--coral); background: #fff0e8; }
.hyper-feedback { grid-column: 2 / -1; margin: -4px 2px 2px; color: var(--muted); font-family: "Trebuchet MS", system-ui, sans-serif; font-size: .73rem; }
.hyper-skip { display: block; margin: 13px 0 0 auto; }

.duel-panel { min-height: 590px; }
.duel-landing, .duel-lobby, .duel-finish { max-width: 530px; margin: 0 auto; padding: 38px 28px 34px; text-align: center; }
.duel-hero-icon { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 14px; color: white; background: var(--lavender); border: 2px solid var(--ink); border-radius: 50%; box-shadow: 5px 5px 0 var(--ink); font-size: 1.8rem; }
.duel-landing h2, .duel-lobby h2, .duel-finish h2 { margin: 0; font-size: 1.8rem; }
.duel-landing > p { margin: 8px auto 24px; color: var(--muted); font-family: "Trebuchet MS", system-ui, sans-serif; line-height: 1.45; }
.duel-landing .input-label { margin-top: 13px; text-align: left; }
.duel-setting-label { margin-top: 14px !important; }
.duel-select {
  width: 100%; height: 50px; padding: 0 13px;
  color: var(--ink); background: white; border: 2px solid var(--line); border-radius: 13px;
  font-family: "Trebuchet MS", system-ui, sans-serif; font-weight: 700;
}
.duel-create { width: 100%; margin-top: 16px; background: var(--lavender); }
.duel-or { display: flex; align-items: center; gap: 10px; margin: 23px 0 13px; color: #a18c97; font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.duel-or::before, .duel-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.duel-join-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.room-code-input { text-transform: uppercase; letter-spacing: .16em; }
.duel-message { min-height: 19px; margin: 12px 0 0; color: var(--muted); font-family: "Trebuchet MS", system-ui, sans-serif; font-size: .8rem; }
.duel-message.is-error { color: #b34738; }
.duel-kicker { margin: 0 0 5px; color: var(--coral); font-size: .72rem; font-weight: 900; letter-spacing: .13em; }
.duel-lobby > p:not(.duel-kicker):not(.duel-message) { color: var(--muted); font-family: "Trebuchet MS", system-ui, sans-serif; }
.invite-box { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin: 20px 0; padding: 6px; background: #f2e9dd; border-radius: 13px; }
.invite-box input { min-width: 0; padding: 0 8px; color: var(--muted); background: transparent; border: 0; outline: 0; font-family: "Trebuchet MS", system-ui, sans-serif; font-size: .76rem; }
.invite-box button { padding: 9px 11px; color: white; background: var(--teal); border: 0; border-radius: 9px; cursor: pointer; font-size: .75rem; font-weight: 900; }
.player-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.player-card { padding: 15px 10px; background: #f8f1e6; border: 1.5px solid var(--line); border-radius: 14px; font-family: "Trebuchet MS", system-ui, sans-serif; }
.player-card b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-card small { display: block; margin-top: 5px; color: var(--muted); }
.player-card.is-ready { border-color: var(--teal); background: #ecfaf5; }
.duel-ready { width: 100%; background: var(--teal); }
.duel-scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; border-bottom: 1.5px solid var(--line); }
.duel-scoreboard > div { display: grid; justify-items: center; align-content: center; min-height: 78px; padding: 10px; }
.duel-scoreboard > div:first-child { background: #ecfaf5; }
.duel-scoreboard > div:last-child { background: #fff0e8; }
.duel-scoreboard small { max-width: 150px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: .68rem; font-weight: 900; text-transform: uppercase; }
.duel-scoreboard b { margin-top: 2px; font-size: 1.65rem; }
.duel-clock { min-width: 100px; }
.duel-clock b { font-variant-numeric: tabular-nums; }
.duel-map-stage { position: relative; display: grid; place-items: center; min-height: 325px; padding: 28px; overflow: hidden; background: #f7eddd; }
.duel-country-svg { height: 245px; }
.duel-countdown { position: relative; z-index: 8; display: grid; place-items: center; width: 108px; height: 108px; color: white; background: var(--lavender); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 6px 6px 0 var(--ink); font-size: 3.4rem; font-weight: 900; }
.duel-answer-flash { min-height: 18px; margin: 10px 0 -5px; color: var(--muted); text-align: center; font-family: "Trebuchet MS", system-ui, sans-serif; font-size: .78rem; }
.duel-answer-flash.is-correct { color: #237b6e; }
.duel-answer-flash.is-wrong { color: #b34738; }
.duel-trophy { font-size: 3.5rem; }
.final-score { display: grid; gap: 8px; margin: 22px 0; }
.final-score-row { display: grid; grid-template-columns: 1fr auto; padding: 13px 15px; text-align: left; background: #f8f1e6; border-radius: 12px; font-family: "Trebuchet MS", system-ui, sans-serif; }
.final-score-row.is-winner { background: #fff1c8; border: 1.5px solid var(--orange); }
.duel-finish-actions { display: grid; gap: 13px; justify-items: center; }

.play-area { padding: 21px 20px 23px; }
.input-label { display: block; margin-bottom: 8px; font-size: .77rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.guess-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.autocomplete { position: relative; min-width: 0; }

.guess-input {
  width: 100%; height: 50px;
  padding: 0 15px;
  border: 2px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: white;
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-weight: 700;
  transition: border-color 130ms ease, box-shadow 130ms ease;
}
.guess-input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(70,184,169,.14); }
.guess-input:disabled { color: #aa929d; background: #f1e9dd; cursor: not-allowed; }

.suggestions {
  position: absolute;
  z-index: 20;
  left: 0; right: 0;
  top: calc(100% + 7px);
  margin: 0;
  padding: 6px;
  max-height: 220px;
  overflow-y: auto;
  list-style: none;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 13px;
  box-shadow: 5px 5px 0 var(--ink);
}
.suggestions li { padding: 9px 10px; border-radius: 8px; cursor: pointer; font-family: "Trebuchet MS", system-ui, sans-serif; font-weight: 700; }
.suggestions li:hover, .suggestions li.is-active { color: white; background: var(--teal); }

.primary-button {
  min-height: 50px;
  padding: 0 21px;
  border: 2px solid var(--ink);
  border-radius: 13px;
  color: white;
  background: var(--coral);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  font-weight: 900;
  transition: transform 110ms ease, box-shadow 110ms ease, filter 110ms ease;
}
.primary-button:hover:not(:disabled) { filter: brightness(1.03); transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--ink); }
.primary-button:active:not(:disabled) { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--ink); }
.primary-button:disabled { opacity: .43; cursor: not-allowed; box-shadow: 2px 2px 0 var(--ink); }
.primary-button.compact { min-height: 44px; padding-inline: 18px; background: var(--teal); }

.play-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; }
.input-hint { min-height: 16px; margin: 0 2px; color: var(--muted); font-family: "Trebuchet MS", system-ui, sans-serif; font-size: .75rem; }
.skip-button {
  flex: 0 0 auto;
  padding: 4px 1px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  cursor: pointer;
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: .75rem;
  font-weight: 700;
}
.skip-button:hover:not(:disabled) { color: var(--coral); }
.skip-button:disabled { opacity: .42; cursor: not-allowed; }

.result-panel {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 19px 20px 21px;
  border-top: 1.5px solid var(--line);
  background: #ecfaf5;
  border-radius: 0 0 24px 24px;
}
.result-panel[hidden] { display: none; }
.result-panel.is-wrong { background: #fff0e8; }
.result-panel.is-skipped { background: #f3efff; }
.result-badge {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: white;
  background: var(--teal);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 1.4rem;
  font-weight: 900;
}
.is-wrong .result-badge { background: var(--coral); }
.is-skipped .result-badge { background: var(--lavender); }
.result-kicker { margin: 0 0 2px; color: var(--teal); font-size: .71rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.is-wrong .result-kicker { color: var(--coral); }
.is-skipped .result-kicker { color: #7560b5; }
.result-copy h2 { margin: 0; font-size: 1.35rem; line-height: 1.08; }
.result-copy > p:last-child { margin: 5px 0 0; color: var(--muted); font-family: "Trebuchet MS", system-ui, sans-serif; font-size: .78rem; }
.next-button { background: var(--ink); white-space: nowrap; }

.catalog-note { display: grid; justify-items: center; gap: 7px; margin: 34px 0 12px; text-align: center; color: var(--muted); font-size: .78rem; }
.catalog-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.catalog-button {
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--teal);
  cursor: pointer;
  font-weight: 900;
}
.catalog-button:hover { color: var(--teal); }
.catalog-button-secondary { color: var(--muted); border-bottom-color: var(--lavender); }
.footer-options { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: center; margin: 12px auto 20px; }
footer { max-width: 600px; margin: 0 auto; color: #9e8993; text-align: center; font-family: "Trebuchet MS", system-ui, sans-serif; font-size: .68rem; line-height: 1.5; }
footer a { color: inherit; text-underline-offset: 2px; }

dialog {
  width: min(440px, calc(100% - 34px));
  padding: 29px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 22px;
  box-shadow: 9px 9px 0 var(--ink);
}
dialog::backdrop { background: rgba(83,47,66,.42); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; right: 13px; top: 11px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.6rem; }
.dialog-emoji { font-size: 2.3rem; }
dialog h2 { margin: 8px 0 12px; font-size: 1.7rem; }
dialog h3 { margin: 22px 0 10px; font-size: .86rem; letter-spacing: .08em; text-transform: uppercase; }
dialog ol { margin: 0; padding-left: 23px; font-family: "Trebuchet MS", system-ui, sans-serif; line-height: 1.75; }
.dialog-tip { margin-top: 17px; padding: 12px 14px; border-radius: 12px; background: #eee8ff; font-family: "Trebuchet MS", system-ui, sans-serif; font-size: .87rem; }
.catalog-dialog { width: min(760px, calc(100% - 34px)); max-height: min(86vh, 820px); overflow-y: auto; }
.dialog-kicker { margin: 0; color: var(--coral); font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.catalog-summary { margin: 0; color: var(--muted); font-family: "Trebuchet MS", system-ui, sans-serif; font-size: .88rem; line-height: 1.45; }
.catalog-tabs { display: inline-flex; gap: 4px; margin: 0 0 14px; padding: 4px; background: #eee5d8; border-radius: 12px; }
.catalog-tab { padding: 7px 11px; color: var(--muted); background: transparent; border: 0; border-radius: 9px; cursor: pointer; font-size: .75rem; font-weight: 900; }
.catalog-tab.is-active { color: var(--ink); background: var(--paper); box-shadow: 0 2px 6px rgba(83,47,66,.1); }
.catalog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 7px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: .82rem;
}
.catalog-list li { padding: 7px 9px; background: #f8f1e6; border-radius: 8px; }
.catalog-list.is-visual { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.catalog-list.is-visual .catalog-card { display: grid; grid-template-rows: 88px auto; gap: 7px; align-items: center; min-height: 126px; padding: 10px; text-align: center; font-weight: 700; }
.catalog-card svg { width: 100%; height: 88px; overflow: visible; }
.catalog-card path { fill: var(--coral); stroke: var(--ink); stroke-width: 1.1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.catalog-card span { align-self: start; line-height: 1.15; }
.excluded-catalog { margin-top: 24px; padding-top: 1px; border-top: 1.5px solid var(--line); }
.excluded-catalog > p { margin: -3px 0 11px; color: var(--muted); font-family: "Trebuchet MS", system-ui, sans-serif; font-size: .78rem; }
.catalog-list.is-excluded li { color: #8f7985; background: #f1edf5; }
.catalog-list.is-excluded .catalog-card path { fill: var(--lavender); stroke: #756382; }

.confetti { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall 1.45s ease-in forwards; }
@keyframes fall { to { transform: translate3d(var(--drift), 110vh, 0) rotate(690deg); opacity: .8; } }

@media (max-width: 620px) {
  .app-shell { width: min(100% - 20px, 760px); padding-top: 13px; }
  .hero-copy { margin-top: 27px; }
  .hero-copy > p:last-child { padding-inline: 18px; }
  .map-stage { min-height: 330px; padding: 22px 14px; }
  .country-svg { width: 95%; height: 250px; }
  .guess-row { grid-template-columns: 1fr; }
  .guess-button { width: 100%; }
  .play-actions { align-items: flex-start; }
  .result-panel { grid-template-columns: auto 1fr; }
  .next-button { grid-column: 1 / -1; width: 100%; }
  .scoreline { gap: 6px; font-size: .71rem; }
  .duration-row:not([hidden]) { flex-wrap: wrap; justify-content: center; }
  .duration-divider { display: none; }
  .hyper-grid { gap: 6px; }
  .hyper-shape-card { min-height: 170px; padding: 13px 5px 8px; border-radius: 13px; }
  .hyper-shape-card svg { height: 130px; }
  .hyper-answer-row { grid-template-columns: 28px minmax(0,1fr); }
  .hyper-answer-row .primary-button { grid-column: 2; width: 100%; }
  .hyper-feedback { grid-column: 2; }
  .duel-landing, .duel-lobby, .duel-finish { padding: 30px 18px; }
  .duel-join-row { grid-template-columns: 1fr; }
  .duel-scoreboard small { max-width: 92px; }
  .duel-map-stage { min-height: 285px; padding: 20px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

[hidden] { display: none !important; }

/* OutlineAtlas · Atlas's warm desk in a quiet blue office */
:root { --ink:#302139; --muted:#85717d; --cream:#fff5df; --paper:#fffcf4; --teal:#24b5ac; --line:#e9d9c4; --shadow:0 8px 0 #100d2090,0 26px 70px #050c1c66; }
[hidden] { display:none !important; }
body { background:#0e1c35 url('./assets/atlas-office.png') center center / cover fixed no-repeat; }
body::before { content:''; position:fixed; inset:0; z-index:-1; background:linear-gradient(90deg,#09172c20,#09172c05 65%,transparent); pointer-events:none; }
.sky-shape { display:none; }
.app-shell { width:min(730px,calc(100% - 36px)); margin:0 0 0 max(45px,calc((100vw - 1360px) / 2 + 80px)); padding:26px 0 34px; }
.topbar { width:min(1200px,calc(100vw - 100px)); min-height:43px; }
.brand { color:#fff3d1; font-size:1.7rem; letter-spacing:-.055em; gap:11px; text-shadow:0 2px 0 #061226; }
.brand-accent { color:#66d3cd; }
.brand-mark { width:35px; height:35px; background:#1caaa4; border:2px solid #98e7d9; box-shadow:0 0 18px #37cfc333; color:#fff4d7; font-size:1.6rem; transform:rotate(-15deg); }
.topbar-actions { display:flex; align-items:center; gap:11px; }
.account-button,.calendar-button { background:#142a46dd; color:#fff1d4; border:1px solid #556a85; border-radius:12px; cursor:pointer; }
.account-button { padding:9px 14px; font-size:.82rem; font-weight:bold; }
.calendar-button { width:40px; height:40px; display:grid; place-items:center; }
.calendar-button svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.topbar .icon-button { width:31px; height:31px; color:#ede3ce; border:1px solid #64728c; box-shadow:none; background:#122540; font-size:.95rem; }
.account-button:hover,.calendar-button:hover { background:#27445d; border-color:#82d8cf; }
.hero-copy { margin:23px auto 20px; color:#fff2d0; text-align:left; padding:0 8px; }
.hero-copy .eyebrow { color:#b1d2cf; font-size:.65rem; letter-spacing:.15em; }
.hero-copy h1 { font-size:clamp(1.6rem,3vw,2.2rem); letter-spacing:-.04em; line-height:1.15; }
.hero-copy > p:last-child { font-size:.82rem; color:#c2c3c8; margin:7px 0 0; }
.mode-panel { justify-items:stretch; gap:13px; margin-bottom:15px; }
.segmented { display:grid; grid-template-columns:repeat(4,1fr); background:#15223ad9; padding:5px; border:1px solid #6a66884d; border-radius:18px; gap:6px; }
.mode-button { padding:12px 8px; color:#d9d3dc; background:#34314f; border:1px solid #686482; border-radius:12px; font-size:.91rem; box-shadow:0 3px 0 #0b1423; }
.mode-button.is-active { color:#102039; background:linear-gradient(140deg,#6dddd5,#33bfb8); border-color:#8bf0dd; box-shadow:0 0 20px #3cc9c333,0 3px 0 #12585b; }
.mode-button:hover { transform:translateY(-1px); }
.duration-row { justify-content:center; color:#e8deca; background:#132139ed; border:1px solid #4b536c; padding:8px; border-radius:14px; flex-wrap:wrap; }
.duration-button,.hyper-toggle { color:#e2d8ce; border-color:#54627c; }
.duration-button.is-active,.hyper-toggle.is-active { color:#15243b; background:#64d2c6; }
.game-card { position:relative; background:linear-gradient(150deg,#fff8e7,#fff4db); border:3px solid #241d35; padding:27px; border-radius:28px; box-shadow:var(--shadow); overflow:visible; }
.daily-heading { display:flex; gap:16px; justify-content:space-between; align-items:center; margin:0 0 17px; }
.daily-heading h2 { margin:0; font-size:clamp(1.65rem,3.1vw,2.4rem); line-height:1.15; letter-spacing:-.05em; }
.daily-heading .eyebrow { color:#8d776c; letter-spacing:.08em; font-size:.64rem; margin-bottom:6px; }
.daily-subtitle { color:var(--muted); font-size:.8rem; margin:7px 0 0; }
.daily-points { display:flex; flex-direction:column; align-items:center; background:#f3e5ca; min-width:84px; padding:10px 16px; border-radius:19px; color:#2a2546; }
.daily-points b { display:block; font-size:2.2rem; line-height:1.15; }
.daily-points span { font-size:.76rem; color:#8b756f; }
.daily-progress { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:0 0 11px; }
.stage-chip { text-align:center; padding:8px 6px; border:1px solid #dfd1bc; border-radius:999px; font-size:.8rem; font-weight:bold; color:#a39991; }
.stage-chip.is-active { color:#1d615f; background:#ccece3; border-color:#80c8bc; }
.stage-chip.is-complete { background:#e0ece0; color:#3b7767; border-color:#b7d3be; }
.stage-chip.is-active.is-complete { border-color:#2bada0; }
.daily-round-info { color:#887d78; font-size:.72rem; text-align:center; margin:0 0 14px; }
body[data-mode=daily] .card-topline { border-top:1px solid #e9dcc6; padding-top:15px; }
.scoreline { font-size:.77rem; }
.round-pill { padding:6px 10px; background:#ede5d2; color:#8f7765; font-size:.62rem; letter-spacing:.06em; }
.map-stage { min-height:300px; height:300px; margin:8px 0 20px; background:transparent; border:0; border-radius:15px; }
.map-grid { display:none; }
.country-svg { width:100%; height:100%; max-height:100%; overflow:visible; }
.country-svg.is-concealed { visibility:hidden; opacity:0; }
.flash-mode .country-svg,.flash-mode .country-svg path,.hyper-shape-card svg,.duel-country-svg { transition:none !important; animation:none !important; }
.country-svg path { stroke-width:.65; }
.hyper-mode.map-stage { height:285px; min-height:285px; }
.hyper-grid { gap:12px; }
.hyper-shape-card { background:#fffaf0; border:1.5px solid #e0d4bd; border-radius:16px; }
.hyper-shape-card svg { max-height:190px; }
.hyper-shape-card.is-resolved { background:#e0f0d9; border-color:#74b38b; }
.hyper-shape-card.is-wrong { background:#f7eadb; }
.hyper-mode .ready-state { background:#fff6e4fa; border-radius:18px; padding:18px; inset:0; z-index:3; }
.ready-state h2 { font-size:1.5rem; }
.ready-state p { font-size:.84rem; }
.ready-state .primary-button { margin-top:6px; }
.hyper-mode .hidden-shape { display:none !important; }
.primary-button { background:#1ca69e; color:white; border:1px solid #168b85; border-radius:14px; box-shadow:0 4px 0 #106e6b; font-weight:900; }
.primary-button:hover { background:#219f98; }
.primary-button:active { transform:translateY(2px); box-shadow:0 2px 0 #106e6b; }
.primary-button:disabled { opacity:.48; cursor:default; }
.guess-input,.duel-select { color:#392f44; border:2px solid #d8cbb8; background:#fffcf5; border-radius:13px; box-shadow:none; }
.guess-input:focus { border-color:#31afa6; outline:3px solid #43c6b328; }
.input-label { color:#715d69; font-size:.78rem; }
.guess-row { gap:12px; }
.guess-button { min-width:100px; }
.suggestions { background:#fffdf7; border:1px solid #ddcfb8; box-shadow:0 12px 30px #33213b26; z-index:20; }
.skip-button { color:#8e7e78; font-size:.75rem; }
.skip-button:hover { color:#32304b; }
.input-hint { font-size:.7rem; }
.result-panel { padding:18px 0 0; border-top:1px solid #e2d4bd; background:transparent; border-radius:0; }
.result-panel h2 { font-size:1.55rem; }
.next-button { white-space:normal; font-size:.82rem; }
.catalog-note { color:#e1d9cc; font-size:.72rem; margin:22px 0 0; }
.catalog-button { color:#c6ebe1; }
.catalog-note .catalog-button { color:#d7f2e6; font-size:.74rem; }
.footer-options { padding:13px 10px; border:0; background:#13213bd4; border-radius:14px; color:#d6d3d2; margin-top:15px; }
.filter-toggle b { color:#dbd4cb; font-size:.71rem; }
.filter-toggle small { color:#aeb2bd; font-size:.63rem; }
.filter-check { background:#182a42; border-color:#687186; }
footer { color:#b2adad; font-size:.6rem; margin-top:15px; padding:0 8px; }
footer a { color:#b8d9d1; }
dialog { background:var(--paper); color:var(--ink); border:2px solid #382938; border-radius:27px; box-shadow:0 30px 120px #0007; padding:30px; max-height:90dvh; }
dialog::backdrop { background:#071225bb; backdrop-filter:blur(5px); }
dialog .catalog-button { color:#8a6f7b; }
.dialog-close { color:#826876; background:#f2e8db; border:1px solid #e0d1c2; box-shadow:none; }
.dialog-kicker { color:#ad8763; font-size:.68rem; letter-spacing:.1em; font-weight:800; text-transform:uppercase; margin:0 40px 8px 0; }
dialog h2 { letter-spacing:-.05em; font-size:1.9rem; margin:0 30px 14px 0; }
.collection-dialog { width:min(1050px,calc(100vw - 28px)); }
.collection-tabs { display:flex; padding:4px; border:1px solid #e8d6c2; background:#f3eadf; border-radius:999px; width:fit-content; margin:18px 0 22px; gap:3px; }
.collection-tabs button { border:0; border-radius:999px; background:none; color:#94777f; padding:9px 22px; font-weight:bold; cursor:pointer; font-size:.86rem; }
.collection-tabs button.is-active { background:#23aaa3; color:#fffdf1; box-shadow:0 2px 4px #11615b22; }
.collection-range { text-align:center; color:#886f77; font-size:.85rem; margin:0 0 18px; }
.activity-calendar { display:grid; grid-template-columns:repeat(6,1fr); gap:10px; }
.calendar-day { display:flex; flex-direction:column; justify-content:space-between; align-items:center; min-width:0; min-height:130px; border:1px solid #eadbc9; border-radius:17px; background:#fff8e8; color:#53344d; padding:10px 6px; cursor:pointer; }
.calendar-day:disabled { opacity:1; cursor:default; }
.calendar-day.was-missed { background:#f8f5ee; color:#a49692; }
.calendar-day>b { font-size:.73rem; }
.calendar-day.is-today { border:2px solid #36b8a9; box-shadow:0 0 0 3px #37b7a01a; }
.calendar-day:not(:disabled):hover { border-color:#9abca9; transform:translateY(-2px); }
.trophy-sprite { display:inline-block; width:95px; max-width:100%; aspect-ratio:280/218; vertical-align:middle; overflow:hidden; mix-blend-mode:normal; }
.trophy-sprite svg { width:100%; height:100%; display:block; overflow:hidden; }
.sleep-sprite { width:74px; height:65px; object-fit:contain; opacity:.83; }
.calendar-caption { color:#9a7d76; font-size:.63rem; margin-top:3px; }
.was-played .calendar-caption { color:#694b59; font-weight:bold; }
.collection-legend { text-align:center; color:#a08d83; font-size:.71rem; margin:20px 0 12px; }
.sync-status { text-align:center; color:#8e7a7c; font-size:.71rem; line-height:1.6; margin:14px 0 0; }
.account-dialog { width:min(450px,calc(100vw - 28px)); }
.account-dialog p { font-size:.84rem; color:#8c7781; line-height:1.55; }
.account-dialog .guess-input { width:100%; margin-bottom:17px; }
.account-dialog form .primary-button { width:100%; margin-top:6px; }
.account-dialog .auth-note { font-size:.68rem; margin-top:18px; }
.account-dialog .auth-message { color:#9b6072; font-size:.76rem; }
#signedInArea .catalog-button { display:block; margin:17px auto 0; }
#signedInEmail { overflow-wrap:anywhere; }
#signedInArea .primary-button { width:100%; }
.expedition-summary { display:flex; align-items:center; gap:20px; padding:15px 0 24px; }
.expedition-summary>.trophy-sprite { width:140px; flex-shrink:0; }
.expedition-summary h2 { font-size:2.6rem; margin:3px 0; letter-spacing:-.06em; }
.expedition-summary p:not(.eyebrow) { color:#8f737a; font-size:.78rem; margin:7px 0 0; }
.scorecard-stage { border-top:1px solid #e4d4bd; padding:17px 0 9px; }
.scorecard-stage h3 { font-size:1rem; margin:0 0 10px; letter-spacing:-.02em; }
.scorecard-round-label { color:#9d827a; font-size:.68rem; margin:12px 0 7px; }
.scorecard-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.answer-key-card { display:flex; flex-direction:column; gap:7px; align-items:center; justify-content:space-between; padding:15px 8px 11px; text-align:center; border:1px solid #e5d6c2; border-radius:14px; background:#fff9ec; min-width:0; }
.answer-key-card svg { width:100%; height:95px; }
.answer-key-card path { fill:#be9c88; }
.answer-key-card b { font-size:.72rem; }
.answer-key-card span { color:#a08d7d; font-size:.62rem; }
.answer-key-card.was-correct { background:#e8f1df; border-color:#bad0ad; }
.answer-key-card.was-correct path { fill:#3f9e83; }
.answer-key-card.was-correct span { color:#418b72; }
.scorecard-actions { display:flex; justify-content:center; gap:15px; flex-wrap:wrap; margin:26px 0 0; align-items:center; }
.scorecard-actions .primary-button { font-size:.8rem; padding:13px 18px; }
.scorecard-actions .catalog-button { color:#8a6d76; font-size:.75rem; }
.daily-reset-note { text-align:center; font-size:.7rem; color:#a08c7c; width:100%; margin:5px 0 0; }
.save-prompt { width:min(380px,calc(100vw - 30px)); text-align:center; padding:28px; }
.save-prompt h2 { margin-right:0; font-size:1.6rem; }
.save-prompt p { color:#917a7c; font-size:.84rem; line-height:1.5; }
.save-prompt .trophy-sprite { width:150px; }
.save-prompt .primary-button { width:100%; font-size:.85rem; padding:12px; }
.save-prompt .catalog-button { display:block; margin:18px auto 0; }
.points-burst { position:fixed; top:40%; left:min(calc(50% - 180px),600px); z-index:100; pointer-events:none; }
.earned-points { display:block; font-size:2.8rem; font-weight:1000; color:#fff2ad; text-shadow:0 3px 0 #32877d,0 0 20px #34bc9f; animation:points-pop .9s cubic-bezier(.16,.8,.36,1) forwards; position:absolute; }
@keyframes points-pop { 0% { opacity:0; transform:translateY(12px) scale(.6); } 20% { opacity:1; transform:translateY(-4px) scale(1.1); } 65% { opacity:1; } 100% { opacity:0; transform:translateY(-62px) scale(.9); } }
.toast { position:fixed; bottom:26px; left:50%; transform:translateX(-50%); z-index:200; max-width:min(540px,calc(100% - 28px)); padding:14px 20px; background:#24354bf5; color:#fff1d5; border:1px solid #687f8c; border-radius:15px; box-shadow:0 9px 30px #0005; font-size:.8rem; text-align:center; }
.duel-scoring { background:#e3efe1; border-radius:12px; padding:10px; color:#568475 !important; font-size:.75rem !important; }
.duel-map-stage { background:transparent; }
.duel-landing h2 { letter-spacing:-.04em; }
#infoDialog .dialog-tip { background:#f4ebdc; }
button:focus-visible,a:focus-visible { outline:3px solid #72d5c1; outline-offset:4px; }
@media(min-width:1600px) { .app-shell { margin-left:calc((100vw - 1400px) / 2 + 70px); } }
@media(max-width:1100px) {
  body { background-position:65% center; }
  .app-shell { margin:0 auto; width:min(730px,calc(100% - 36px)); }
  .topbar { width:100%; }
  .game-card { background:#fff6e2f7; }
}
@media(max-width:700px) {
  body { background:#101e35; }
  body::before { position:absolute; height:330px; z-index:-1; background:url('./assets/atlas-office.png') right 58% / auto 165% no-repeat; opacity:1; }
  .app-shell { width:calc(100% - 22px); margin:0 auto; padding:18px 0 22px; }
  .topbar { padding:0 6px; align-items:center; }
  .brand { font-size:1.4rem; gap:7px; }
  .brand-mark { width:27px; height:27px; font-size:1.1rem; }
  .topbar-actions { gap:7px; }
  .account-button { padding:8px 10px; font-size:.7rem; }
  .calendar-button { width:33px; height:33px; border-radius:10px; }
  .topbar .icon-button { display:none; }
  .hero-copy { height:175px; padding:0 10px 16px; margin:0; display:flex; flex-direction:column; justify-content:flex-end; text-align:left; pointer-events:none; }
  .hero-copy h1 { font-size:1.3rem; max-width:180px; text-shadow:0 2px 9px #001630; }
  .hero-copy .eyebrow { font-size:.5rem; max-width:155px; margin-bottom:7px; color:#c6d4d4; }
  .hero-copy>p:last-child { display:none; }
  .mode-panel { margin-bottom:10px; gap:10px; }
  .segmented { border-radius:17px; padding:4px; gap:4px; }
  .mode-button { font-size:.74rem; padding:10px 2px; border-radius:12px; }
  .mode-button>span { display:none; }
  .game-card { padding:19px 15px; border-radius:24px; border-width:2px; background:#fff6e2; }
  .daily-heading { gap:8px; margin-bottom:15px; }
  .daily-heading h2 { font-size:1.68rem; }
  .daily-heading .eyebrow { font-size:.52rem; }
  .daily-subtitle { font-size:.63rem; max-width:190px; line-height:1.45; }
  .daily-points { min-width:65px; padding:9px 10px; border-radius:16px; }
  .daily-points b { font-size:1.9rem; }
  .daily-points span { font-size:.63rem; }
  .daily-progress { gap:6px; }
  .stage-chip { padding:7px 4px; font-size:.67rem; }
  .daily-round-info { font-size:.6rem; margin-bottom:10px; }
  .card-topline { gap:5px; }
  .scoreline { font-size:.65rem; }
  .round-pill { padding:5px 7px; font-size:.52rem; }
  .map-stage { height:250px; min-height:250px; margin:5px 0 15px; }
  .hyper-mode.map-stage { height:235px; min-height:235px; }
  .hyper-grid { gap:6px; }
  .hyper-shape-card { border-radius:12px; padding:10px 5px; }
  .hyper-shape-card svg { height:145px; }
  .hyper-card-status { font-size:.6rem; }
  .hyper-number { font-size:.6rem; }
  .hyper-instruction { font-size:.7rem; line-height:1.4; }
  .hyper-answer-row { grid-template-columns:1fr auto; gap:7px; }
  .hyper-answer-number { display:none; }
  .hyper-answer-row .primary-button { font-size:.74rem; padding:12px; }
  .hyper-feedback { font-size:.67rem; }
  .guess-row { grid-template-columns:1fr auto; gap:8px; }
  .guess-input { font-size:.9rem; min-height:49px; padding:12px 13px; }
  .guess-button { min-width:73px; padding:12px 13px; font-size:.84rem; }
  .play-actions { align-items:center; gap:10px; margin-top:11px; }
  .input-hint { font-size:.6rem; line-height:1.4; }
  .skip-button { font-size:.62rem; flex-shrink:0; }
  .result-panel { gap:10px; grid-template-columns:auto 1fr; }
  .result-panel .next-button { grid-column:1 / -1; width:100%; margin-top:5px; }
  .result-copy h2 { font-size:1.3rem; }
  .result-copy p { font-size:.75rem; }
  .footer-options { gap:13px; padding:12px; }
  .filter-toggle b { font-size:.66rem; }
  .filter-toggle small { font-size:.57rem; }
  .catalog-note { margin-top:20px; font-size:.64rem; }
  .catalog-note .catalog-button { font-size:.66rem; }
  dialog { padding:25px 18px; border-radius:23px; }
  dialog h2 { font-size:1.6rem; }
  .collection-dialog { width:calc(100vw - 18px); }
  .collection-tabs { margin:15px 0; }
  .collection-tabs button { font-size:.76rem; padding:9px 18px; }
  .collection-range { font-size:.72rem; line-height:1.5; }
  .activity-calendar { grid-template-columns:repeat(3,1fr); gap:7px; }
  .calendar-day { min-height:116px; padding:8px 4px; border-radius:14px; }
  .calendar-day>b { font-size:.66rem; }
  .calendar-caption { font-size:.53rem; }
  .trophy-sprite { width:85px; }
  .sleep-sprite { width:65px; height:60px; }
  .expedition-summary { gap:10px; }
  .expedition-summary>.trophy-sprite { width:95px; }
  .expedition-summary h2 { font-size:2rem; }
  .expedition-summary p:not(.eyebrow) { font-size:.65rem; }
  .scorecard-grid { gap:6px; }
  .answer-key-card { padding:10px 5px; gap:6px; }
  .answer-key-card svg { height:75px; }
  .answer-key-card b { font-size:.6rem; }
  .answer-key-card span { font-size:.52rem; }
  .scorecard-actions { margin-top:20px; gap:15px; }
  .points-burst { left:45%; }
  .earned-points { font-size:2.4rem; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
  .earned-points { animation:none !important; opacity:1; font-size:1.7rem; }
}
/* All shape-stage layers share one cell; hidden shapes retain a fixed canvas. */
.map-stage { padding:10px; }
.map-stage > * { grid-area:1 / 1; }
.map-stage.hyper-mode { display:grid; padding:0; gap:0; }
.ready-state { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; flex-direction:column; }
.hidden-shape { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; flex-direction:column; pointer-events:none; }
.map-stage .countdown { z-index:6; }
.hyper-shape-card { min-height:235px; }
@media(max-width:700px) { .hyper-shape-card { min-height:210px; } .map-stage { padding:8px; } .hyper-mode .ready-state { padding:12px; } .ready-icon { font-size:2rem; } .ready-state h2 { font-size:1.2rem; } .ready-state p { font-size:.72rem; margin-bottom:9px; } }
body { position:relative; isolation:isolate; }
/* Align the 1v1 countdown, silhouette and hidden-state message in one canvas too. */
.duel-map-stage > * { grid-area:1 / 1; }
@media(max-width:700px) { .play-area,.hyper-play-area { padding:15px 0 6px; } .hyper-feedback { grid-column:1 / -1; } .duel-landing,.duel-lobby,.duel-finish { padding:20px 0; } }
dialog { overflow:auto; overscroll-behavior:contain; }
@media(max-width:700px) { .guess-input { font-size:16px; } }

/* Silhouettes have an explicit viewport, independent of SVG intrinsic sizing. */
.map-stage { display:grid; grid-template-rows:minmax(0,1fr); grid-template-columns:minmax(0,1fr); min-width:0; isolation:isolate; }
.map-stage > .country-svg,.duel-map-stage > .country-svg {
  position:absolute; inset:16px; width:calc(100% - 32px); height:calc(100% - 32px);
  min-width:0; min-height:0; max-width:none; max-height:none; overflow:hidden;
}
.duel-map-stage { height:325px; grid-template-rows:minmax(0,1fr); grid-template-columns:minmax(0,1fr); }
.hyper-grid { height:100%; min-height:0; grid-template-rows:minmax(0,1fr); }
.hyper-shape-card { display:block; min-height:0; height:100%; overflow:hidden; }
.hyper-shape-card svg { position:absolute; inset:30px 10px 32px; width:calc(100% - 20px); height:calc(100% - 62px); max-height:none; min-height:0; overflow:hidden; }
.hyper-mode .ready-state { z-index:5; }
.countdown { border-radius:26px; color:#fff6da; background:#258c89; border:2px solid #28645f; box-shadow:0 5px 0 #17514e33; animation:count-pop 250ms ease both; }

/* A collection button that reads as a destination, even without recognising the icon. */
.topbar { position:sticky; top:12px; z-index:40; padding:10px 14px; border:1px solid #8792a32b; border-radius:18px; background:#102038da; backdrop-filter:blur(12px); }
.calendar-button {
  width:auto; height:auto; min-height:44px; display:inline-flex; align-items:center; justify-content:center;
  gap:10px; padding:10px 16px; color:#3c3046; background:linear-gradient(130deg,#ffe6a5,#eec674);
  border:1px solid #fff0bd; border-radius:13px; box-shadow:0 3px 0 #8c653a70,0 0 22px #ebc97a1a;
  font-size:.8rem; font-weight:900; white-space:nowrap;
}
.calendar-button:hover { color:#322637; background:#ffedbc; border-color:#fff3cd; }
.collection-button-arrow { color:#8d6745; font-size:1rem; }
.calendar-button svg { width:22px; height:22px; }

#collectionDialog .collection-tabs { margin-bottom:18px; }
@media(max-width:700px) {
  .topbar { display:grid; grid-template-columns:1fr auto; gap:10px; padding:10px; top:7px; border-radius:16px; }
  .topbar-actions { display:contents; }
  .topbar .brand { grid-area:1 / 1; }
  .topbar .account-button { grid-area:1 / 2; }
  .topbar .calendar-button { grid-area:2 / 1 / 3 / -1; width:100%; min-height:40px; padding:8px 12px; font-size:.78rem; border-radius:11px; }
  .hero-copy { height:150px; }
  .map-stage > .country-svg,.duel-map-stage > .country-svg { inset:12px; width:calc(100% - 24px); height:calc(100% - 24px); }
  .duel-map-stage { height:285px; }
  .hyper-shape-card { min-height:0; }
  .hyper-shape-card svg { inset:30px 7px 32px; width:calc(100% - 14px); height:calc(100% - 62px); }
}
/* Atlas-green land, with a deeper green for a solved Hyper country. */
.hyper-shape-card:nth-child(n) path { fill:#7bcb58; stroke:#315d43; }
.hyper-shape-card.is-resolved:nth-child(n) path { fill:#2b8d50; stroke:#205d38; }
.hyper-shape-card.is-wrong:nth-child(n) path { fill:#98bd7b; }
#duelCountryPath { fill:#7bcb58; stroke:#315d43; }
.catalog-card path { fill:#70bd52; }
.answer-key-card path { fill:#91b975; }
.answer-key-card.was-correct path { fill:#32894e; }
/* Country geometry has no cast shadow or outline, in every game and key view. */
#countryPath,#duelCountryPath,.hyper-shape-card path,.catalog-card path,.answer-key-card path {
  stroke:none !important;
  filter:none !important;
}
/* The game lives on a softly lit slate-blue desktop. */
.game-card { color:#f5ecd5; background:linear-gradient(145deg,#2b455b,#20364c); border-color:#60798a; box-shadow:0 7px 0 #101a2bd9,0 25px 60px #07132280,inset 0 1px 0 #c7dbdf17; }
.game-card .daily-heading h2,.game-card .expedition-summary h2 { color:#fff1cf; }
.game-card .daily-heading .eyebrow { color:#a8c0c3; }
.game-card .daily-subtitle { color:#bfd0d0; }
.game-card .daily-points { color:#ffefbe; background:#39576a; box-shadow:inset 0 1px 0 #d9e9e319; }
.game-card .daily-points span { color:#b5cbce; }
.game-card .stage-chip { color:#95aeb9; border-color:#506b7b; background:#283f54; }
.game-card .stage-chip.is-active { color:#e4f7d8; border-color:#7db59b; background:#36675f; }
.game-card .stage-chip.is-complete { color:#b9e5b4; border-color:#5b9278; background:#30534e; }
.game-card .daily-round-info { color:#b5c8ca; }
body[data-mode=daily] .game-card .card-topline { border-top-color:#4b6474; }
.game-card .card-topline { border-bottom-color:#476071; }
.game-card .round-pill { color:#c6d8d8; background:#1a3044; }
.game-card .scoreline { color:#afc6cb; }
.game-card .scoreline b { color:#f8edce; }
.game-card .score-divider { background:#738e9a; }
.game-card .input-label { color:#dddcc7; }
.game-card .guess-input,.game-card .duel-select { color:#f7efd8; background:#172e42; border-color:#5c7484; }
.game-card .guess-input::placeholder { color:#a7bcc3; opacity:1; }
.game-card .guess-input:focus { border-color:#88c886; box-shadow:0 0 0 3px #7bc77c25; }
.game-card .guess-input:disabled { color:#819ba9; background:#20374b; border-color:#4b6273; }
.game-card .input-hint,.game-card .hyper-instruction,.game-card .hyper-feedback { color:#b7c9cc; }
.game-card .skip-button { color:#c5d0ca; }
.game-card .skip-button:hover:not(:disabled) { color:#f9e5b3; }
.game-card .suggestions { background:#1a3247; color:#f4ecd8; border-color:#638287; box-shadow:0 12px 30px #07132488; }
.game-card .suggestions li:hover,.game-card .suggestions li.is-active { background:#457d69; color:#fff6df; }
.game-card .primary-button { background:#298e85; border-color:#65b8a3; color:#fff5dc; box-shadow:0 4px 0 #103b43; }
.game-card .primary-button:hover:not(:disabled) { background:#369d8e; }
.game-card .hyper-play-area { border-top-color:#4c6575; }
.game-card .hyper-strikes { color:#e0bd9a; }
.game-card .hyper-shape-card { background:#1d3449; border-color:#5a7483; box-shadow:0 4px 0 #142839; }
.game-card .hyper-shape-card.is-resolved { background:#2d5143; border-color:#8abd78; }
.game-card .hyper-shape-card.is-wrong { background:#3c424b; border-color:#937b79; }
.game-card .hyper-number { color:#f4e6c9; background:#415e70; }
.game-card .hyper-card-status { color:#9fb9c2; }
.game-card .hyper-shape-card.is-resolved .hyper-card-status { color:#c2ebac; }
.game-card .hyper-shape-card.is-wrong .hyper-card-status { color:#edc5ad; }
.game-card .hyper-shape-card.is-resolved:nth-child(n) path { fill:#85cc5f; stroke:#375f41; }
.game-card .ready-state h2,.game-card .hidden-shape strong { color:#f9ecd0; }
.game-card .ready-state p,.game-card .hidden-shape small { color:#b6cace; }
.game-card .hyper-mode .ready-state { background:#243d53fa; }
.game-card .result-panel { background:#2c504c; border-color:#5b7a76; border-radius:16px; padding:17px; }
.game-card .result-panel.is-wrong { background:#4b3d49; border-color:#8a706f; }
.game-card .result-panel.is-skipped { background:#393f59; border-color:#6e7293; }
.game-card .result-copy h2 { color:#fff0cf; }
.game-card .result-copy>p:last-child { color:#c1cfcd; }
.game-card .result-kicker { color:#a9dda9; }
.game-card .is-wrong .result-kicker { color:#f2b49d; }
.game-card .is-skipped .result-kicker { color:#d7c9f0; }
.game-card .expedition-summary p:not(.eyebrow) { color:#bdd0cf; }
.game-card .expedition-summary .eyebrow { color:#b7d1c9; }
.game-card .expedition-summary>.trophy-sprite { mix-blend-mode:normal; background:transparent; border-radius:0; padding:0; box-shadow:none; }
.game-card .scorecard-stage { border-color:#4f6978; }
.game-card .scorecard-round-label { color:#b1c5c9; }
.game-card .answer-key-card { background:#223e52; border-color:#536c7b; }
.game-card .answer-key-card.was-correct { background:#2f5145; border-color:#6a9f7c; }
.game-card .answer-key-card path { fill:#a0c18c; }
.game-card .answer-key-card.was-correct path { fill:#8acd67; }
.game-card .answer-key-card span { color:#acc2c5; }
.game-card .answer-key-card.was-correct span { color:#c0e5ac; }
.game-card .scorecard-actions .catalog-button { color:#c4d9cb; }
.game-card .daily-reset-note { color:#a8c0c4; }
.game-card .duel-landing>p,.game-card .duel-lobby>p,.game-card .duel-message { color:#bed0d2; }
.game-card .duel-landing .duel-scoring { background:#35594e; color:#d4e5c3 !important; }
.game-card .duel-or { color:#9fb7c1; }
.game-card .duel-or::before,.game-card .duel-or::after { background:#566b7a; }
.game-card .invite-box,.game-card .player-card,.game-card .final-score-row { background:#2e495e; border-color:#5c7888; }
.game-card .invite-box input,.game-card .player-card small { color:#c0d0d2; }
.game-card .player-card.is-ready,.game-card .final-score-row.is-winner { background:#365c50; border-color:#91b876; }
.game-card .duel-scoreboard { border-color:#58717c; }
.game-card .duel-scoreboard>div:first-child { background:#31574d; }
.game-card .duel-scoreboard>div:last-child { background:#493f50; }
.game-card .duel-scoreboard small { color:#c7d0ca; }
.game-card .duel-answer-flash { color:#b9cbd0; }
.game-card .duel-answer-flash.is-correct { color:#b4df98; }
.game-card .duel-answer-flash.is-wrong { color:#edba9b; }
@media(max-width:1100px) { .game-card { background:linear-gradient(145deg,#2b455bf7,#20364cfb); } }

.catalog-list.is-visual .catalog-card { grid-template-rows:88px auto auto; }
.catalog-scope { display:block; font-size:.62rem; line-height:1.35; color:#8c737a; font-weight:400; }

/* A bright little keepsake badge leads to the collection room. */
.topbar .calendar-button { min-height:54px; gap:11px; padding:8px 15px 8px 9px; color:#3b342e; background:linear-gradient(140deg,#fff0be 0%,#f4d18b 58%,#e6b663 100%); border:1px solid #ffecc1; border-bottom:3px solid #a9793e; border-radius:17px; box-shadow:inset 0 1px 0 #fff9e4,0 4px 0 #614b3840,0 0 25px #eec98220; transition:transform 150ms ease,box-shadow 150ms ease; }
.topbar .calendar-button:hover { color:#302d29; background:linear-gradient(140deg,#fff7d8,#ffdfa0); border-color:#fff3cf; border-bottom-color:#b88643; transform:translateY(-1px); box-shadow:inset 0 1px 0 #fffdf2,0 5px 0 #614b3840,0 0 30px #eec98238; }
.topbar .calendar-button:active { transform:translateY(1px); box-shadow:inset 0 1px 0 #fff9e4,0 2px 0 #614b3840; }
.topbar .calendar-button:focus-visible { outline:3px solid #9be1cc; outline-offset:4px; }
.collection-button-emblem { width:38px; height:38px; flex:0 0 38px; display:grid; place-items:center; background:linear-gradient(145deg,#397d72,#214c51); border:1px solid #88b9a0; border-radius:12px; box-shadow:inset 0 1px 0 #d3f3cb30; }
.calendar-button .collection-button-emblem svg { width:31px; height:31px; stroke-linecap:round; stroke-linejoin:round; }
.collection-button-label { white-space:normal; text-align:left; line-height:1.25; letter-spacing:.005em; }
.collection-button-arrow { flex:0 0 auto; color:#775126; margin-left:1px; }
@media(max-width:900px) {
  .topbar { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:10px; padding:10px; }
  .topbar-actions { display:contents; }
  .topbar .brand { grid-area:1 / 1; }
  .topbar .account-button { grid-area:1 / 2; }
  .topbar .icon-button { grid-area:1 / 3; }
  .topbar .calendar-button { grid-area:2 / 1 / 3 / -1; width:100%; min-height:54px; padding:8px 13px 8px 9px; border-radius:15px; font-size:.8rem; }
  .collection-button-label { flex:1; }
}
@media(prefers-reduced-motion:reduce) { .topbar .calendar-button { transition:none; } }

/* Keep Atlas's club sign readable over the mobile office illustration. */
@media(max-width:600px) {
  .hero-copy .eyebrow { align-self:flex-start; max-width:230px; padding:7px 9px; border-radius:9px; background:#10283ef5; border:1px solid #5a7b89; color:#e5f2ed; font-size:.63rem; line-height:1.45; letter-spacing:.08em; text-shadow:none; }
}
