:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #242c2a;
  background: #f7f5f0;
  --ink: #242c2a;
  --muted: #5c6863;
  --accent: #147569;
  --soft: #e7f1ec;
  --line: #d8ded6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 16px;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
}
button:hover:not(:disabled) {
  border-color: var(--accent);
  background: #f0f6f1;
}
button:disabled {
  cursor: default;
  opacity: 0.52;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #bb4e1c;
  outline-offset: 4px;
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.primary:hover:not(:disabled) {
  background: #24534a;
  color: #fff;
}
.quiet {
  background: transparent;
}
.topbar {
  max-width: 1180px;
  margin: auto;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.brand {
  text-decoration: none;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brandmark {
  display: inline-grid;
  place-items: center;
  background: #7153cd;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.brand-section {
  font-size: 13px;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--muted);
}
nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
}
main {
  max-width: 1120px;
  margin: auto;
  padding: 36px 24px 64px;
  min-height: 75vh;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-family: Georgia, serif;
  font-weight: 500;
  letter-spacing: -2px;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.03;
  margin-bottom: 20px;
}
h2 {
  font-size: 26px;
  letter-spacing: -0.7px;
}
h3 {
  font-size: 21px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 20px;
}
.muted {
  color: var(--muted);
}
.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 50px;
  align-items: center;
  padding: 30px 0 46px;
}
.hero p {
  max-width: 460px;
  font-size: 17px;
  line-height: 1.7;
}
.hero-art {
  position: relative;
  min-height: 275px;
  display: grid;
  place-items: center;
}
.orbit {
  border: 1px solid #c4d5c6;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle at 35% 30%, #e5eee0, #d0e2d6);
  overflow: hidden;
  transform: rotate(-12deg);
  box-shadow: 20px 22px 0 -5px #edeae0;
}
.orbit:before,
.orbit:after {
  content: "";
  position: absolute;
  border: 1px solid #9fb8aa;
  border-radius: 50%;
  inset: 0 55px;
}
.orbit:after {
  inset: 60px -20px;
  transform: rotate(15deg);
}
.atlas-line {
  position: absolute;
  inset: 40px 30px;
  border-top: 3px dashed #bf691e;
  border-radius: 50%;
  transform: rotate(-22deg);
}
.stamp {
  position: absolute;
  right: 5px;
  bottom: 15px;
  background: #fffcf6;
  border: 1px solid #d1b995;
  padding: 16px 20px;
  transform: rotate(8deg);
  box-shadow: 0 8px 20px #263e2110;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.hero-art .float-pin {
  position: absolute;
  top: 70px;
  left: 65px;
  color: #b65329;
  font-size: 48px;
}
.passport {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px;
  margin-bottom: 32px;
}
.passport h2 {
  font-size: 18px;
  margin: 0 0 6px;
}
.passport p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.stamps {
  display: flex;
  gap: 8px;
}
.passport-stamp {
  width: 42px;
  height: 42px;
  border: 1px dashed #b9c7bb;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #75847a;
}
.passport-stamp.done {
  border: 2px solid #18745a;
  background: #e9f4e9;
  color: #18745a;
  transform: rotate(-10deg);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.game-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px #263e2110;
}
.card-art {
  height: 145px;
  position: relative;
  background: var(--card-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-color);
}
.card-art svg {
  width: 100%;
  height: 100%;
}
.card-body {
  padding: 22px;
}
.card-body h3 {
  margin-bottom: 8px;
}
.card-body p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}
.pill {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 30px;
  background: #f0f3ec;
  font-size: 11px;
  letter-spacing: 0.3px;
}
.collection-note {
  margin-top: 26px;
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.game-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin: 20px 0 26px;
}
.game-head h1 {
  font-size: 48px;
  margin: 10px 0;
}
.game-head p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}
.back {
  font-size: 13px;
  color: var(--muted);
}
.modebar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.modebar .active {
  background: var(--soft);
  border-color: var(--accent);
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 275px;
  gap: 24px;
  align-items: start;
}
.board,
.sidebar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 25px;
}
.sidebar h3 {
  font-size: 15px;
}
.sidebar p,
.sidebar li {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.sidebar ol {
  padding-left: 18px;
}
.roundline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
  margin-bottom: 20px;
}
.progress {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
}
.progress i {
  height: 4px;
  flex: 1;
  background: #e4e8e2;
  border-radius: 4px;
}
.progress i.filled {
  background: var(--accent);
}
.board h2 {
  font-size: 26px;
  margin-bottom: 8px;
}
.prompt {
  line-height: 1.65;
  color: var(--muted);
  font-size: 14px;
}
.map-wrap {
  position: relative;
  border-radius: 14px;
  border: 1px solid #c5d9d8;
  background: #eaf3f2;
  overflow: hidden;
  margin: 18px 0;
}
.worldmap {
  display: block;
  width: 100%;
  min-height: 240px;
  max-height: 410px;
  touch-action: pan-y;
}
.worldmap.interactive {
  touch-action: none;
  cursor: crosshair;
}
.land {
  fill: #d4dfca;
  stroke: #94ac95;
  stroke-width: 0.32;
  vector-effect: non-scaling-stroke;
}
.land.candidate {
  fill: #c3d2c0;
  cursor: pointer;
}
.land.candidate:hover {
  fill: #9cbaa3;
}
.land.selected {
  fill: #e7ac5f;
  stroke: #784414;
}
.land.eliminated {
  fill: #c4c6c7;
}
.land.answer {
  fill: #70b496;
}
.graticule {
  stroke: #bdcfd0;
  stroke-width: 0.35;
  vector-effect: non-scaling-stroke;
  fill: none;
}
.map-trail {
  stroke: #ad5f24;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.water-trail {
  stroke: #267cae;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.map-label {
  font-family: system-ui;
  fill: #283a35;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 0.6;
  stroke-linejoin: round;
  font-weight: 650;
}
.map-caption {
  font-size: 11px;
  color: #546964;
  padding: 8px 12px;
  background: #f3f7f2;
  border-top: 1px solid #d4e0d6;
}
.map-tools,
.actions,
.choices,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.map-tools {
  margin-bottom: 10px;
}
.map-tools button {
  padding: 8px 12px;
}
.coords {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.coords label {
  font-size: 12px;
  font-weight: 700;
}
.coords input {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px;
}
.actions {
  margin-top: 18px;
}
.feedback {
  background: #edf3e9;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.65;
}
.feedback:empty {
  display: none;
}
.clues {
  list-style: none;
  margin: 18px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.clues li {
  background: #f5f5ee;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
}
.clues li::before {
  content: "✦";
  margin-right: 9px;
  color: var(--accent);
}
.search {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.choices {
  align-items: stretch;
}
.choices button {
  text-align: left;
  font-size: 13px;
  flex: 1 0 calc(50% - 8px);
}
.choices button.selected {
  border: 2px solid var(--accent);
  background: var(--soft);
}
.choices button.hinted {
  border: 2px solid #147569;
  background: #e7f4df;
}
.choices button[hidden] {
  display: none;
}
.chips {
  margin: 14px 0;
}
.chip {
  padding: 7px 10px;
  border-radius: 8px;
  background: #f0f3ec;
  font-size: 12px;
}
.route-scroll {
  max-height: 120px;
  overflow: auto;
}
.stat-row {
  display: flex;
  gap: 24px;
  margin: 18px 0;
  flex-wrap: wrap;
}
.stat-row strong {
  font-size: 25px;
  display: block;
}
.stat-row small {
  color: var(--muted);
  font-size: 11px;
}
.postcard {
  position: relative;
  background: #f4e7d7;
  border: 9px solid #fff;
  outline: 1px solid #d6d4c5;
  border-radius: 4px;
  margin: 24px 0;
  box-shadow: 0 8px 18px #36300d10;
  overflow: hidden;
}
.postcard svg {
  width: 100%;
  display: block;
}
.hotspot {
  position: absolute;
  width: 38px;
  min-height: 38px;
  height: 38px;
  border: 2px solid #fff;
  background: #263f38;
  color: #fff;
  border-radius: 50%;
  padding: 0;
  box-shadow: 0 2px 5px #0003;
  font-size: 13px;
}
.hotspot.opened {
  background: #fff;
  color: #1b5949;
  border-color: #1b5949;
}
.hotspot:hover:not(:disabled) {
  transform: scale(1.12);
  color: #1b5949;
}
.stack-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: grid;
  gap: 9px;
}
.stack-item {
  background: #f8f7f2;
  border: 1px solid #d8ded6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}
.stack-item .rank {
  font-family: Georgia, serif;
  font-size: 23px;
  color: #70806c;
  width: 20px;
}
.stack-item .place {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
}
.stack-item small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
  margin-top: 3px;
}
.stack-item button {
  padding: 6px 11px;
}
.stack-item.correct {
  border: 2px solid #3e865b;
  background: #eaf5e7;
}
.stack-item.correct .rank:after {
  content: "✓";
  font-size: 12px;
  display: block;
}
.stack-item[draggable="true"] {
  cursor: grab;
}
.stack-item.dragging {
  opacity: 0.5;
}
.stack-item.drop-target {
  border: 2px dashed var(--accent);
}
.result-title {
  font-family: Georgia, serif;
  font-size: 37px;
  font-weight: 500;
  letter-spacing: -1px;
}
.result-score {
  font-family: Georgia, serif;
  font-size: 62px;
  color: var(--accent);
  margin: 15px 0;
}
.result-score small {
  font: 16px system-ui;
  color: var(--muted);
}
.result-grid {
  display: flex;
  gap: 9px;
  margin: 18px 0;
}
.result-round {
  flex: 1;
  border: 1px solid var(--line);
  padding: 14px 8px;
  border-radius: 12px;
  text-align: center;
  font-size: 13px;
}
.result-round strong {
  display: block;
  font-size: 20px;
  margin-top: 5px;
}
.sharebox {
  width: 100%;
  min-height: 115px;
  padding: 12px;
  font: 13px/1.6 system-ui;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 12px;
}
.footer {
  border-top: 1px solid var(--line);
  max-width: 1120px;
  margin: auto;
  padding: 25px 24px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}
.footer span:first-child {
  margin-right: auto;
}
.notice {
  max-width: 1072px;
  margin: 10px auto;
  padding: 14px;
  background: #fff1d6;
  border: 1px solid #c7a24f;
  border-radius: 10px;
  font-size: 13px;
}
.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  max-width: 520px;
  width: calc(100% - 32px);
  color: var(--ink);
}
dialog::backdrop {
  background: #19372c66;
  backdrop-filter: blur(3px);
}
dialog p,
dialog li {
  font-size: 14px;
  line-height: 1.8;
}
dialog h2 {
  font-family: Georgia, serif;
  font-size: 30px;
}
dialog .actions {
  margin-bottom: 20px;
}
.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: #fff;
  padding: 15px;
}
.skip:focus {
  top: 10px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
.outline {
  max-height: 140px;
  min-height: 100px;
}
.daily-note {
  border-radius: 10px;
  padding: 12px;
  background: #fbefd7;
  font-size: 12px;
  line-height: 1.6;
  margin: 12px 0;
}
.link-button {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
}
.guide-page {
  max-width: 780px;
  line-height: 1.8;
}
.guide-page h1 {
  font-size: 48px;
}
.guide-page h2 {
  margin-top: 36px;
}
.guide-page li {
  margin-bottom: 10px;
}
.water-step {
  border-left: 3px solid #5d99b3;
  padding: 8px 15px;
  font-size: 13px;
  margin: 10px 0;
}
.map-recap {
  margin-top: 20px;
}
.tutorial-banner {
  padding: 12px 18px;
  background: #fff0cd;
  border: 1px solid #d5b979;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 13px;
}
.kbd {
  font-size: 11px;
  padding: 3px 6px;
  background: #f1eee5;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.small {
  font-size: 12px;
  line-height: 1.7;
}
.round-reveal {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 20px;
}
details {
  margin-top: 16px;
  font-size: 13px;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding: 12px 0;
  font-weight: 700;
}
body[data-game="postcard"] {
  --soft: #f6e7ed;
}
body[data-game="river-run"] {
  --soft: #e3f0f9;
}
@media (max-width: 850px) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    display: none;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero {
    gap: 10px;
  }
  .hero-art {
    transform: scale(0.85);
  }
  .passport {
    flex-wrap: wrap;
  }
  .game-head {
    flex-wrap: wrap;
  }
  .modebar {
    justify-content: flex-start;
  }
}
@media (max-width: 520px) {
  .topbar {
    padding: 16px;
    gap: 10px;
  }
  .brand-section {
    display: none;
  }
  .brand {
    font-size: 20px;
  }
  .topbar nav {
    gap: 10px;
    font-size: 12px;
  }
  .topbar nav button {
    padding: 8px 10px;
  }
  main {
    padding: 20px 16px 40px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 15px 0 24px;
  }
  .hero-art {
    display: none;
  }
  .hero p {
    font-size: 15px;
  }
  .cards {
    gap: 12px;
  }
  .card-art {
    height: 110px;
  }
  .card-body {
    padding: 15px;
  }
  .card-body h3 {
    font-size: 18px;
  }
  .card-body p {
    font-size: 12px;
    min-height: 36px;
    margin-bottom: 14px;
  }
  .card-foot {
    font-size: 10px;
    flex-wrap: wrap;
  }
  .passport {
    padding: 18px;
  }
  .passport-stamp {
    width: 35px;
    height: 35px;
  }
  .stamps {
    gap: 6px;
  }
  .board {
    padding: 18px 14px;
  }
  .worldmap {
    min-height: 220px;
  }
  .game-head h1 {
    font-size: 43px;
  }
  .coords {
    gap: 8px;
  }
  .map-tools button {
    padding: 8px 11px;
  }
  .choices button {
    flex-basis: calc(50% - 8px);
    padding: 10px;
  }
  .postcard {
    border-width: 5px;
  }
  .hotspot {
    width: 34px;
    height: 34px;
    min-height: 34px;
  }
  .stack-item {
    gap: 8px;
    padding: 8px;
  }
  .stack-item button {
    min-width: 44px;
    padding: 6px;
  }
  .result-score {
    font-size: 51px;
  }
  .result-round {
    font-size: 11px;
  }
  .result-round strong {
    font-size: 17px;
  }
  .footer {
    gap: 14px;
  }
  .actions > button {
    flex-grow: 1;
  }
  .game-head {
    margin-top: 12px;
    gap: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-contrast: more) {
  :root {
    --muted: #303a33;
    --line: #66756a;
  }
  .land {
    stroke: #374f39;
  }
  .map-label {
    stroke-width: 1;
  }
}

/* Keep all interactive stamps and postcard details at least 44px. */
.passport-stamp {
  width: 44px;
  height: 44px;
}
.stamps {
  gap: 4px;
}
.hotspot {
  width: 44px;
  min-height: 44px;
  height: 44px;
}
