/* walkaloot.com — the game's night palette and its one rule: solid fill, cream rim, hard shadow
   straight down (docs/BRAND.md). Night only, like the app. */

:root {
  --sky: #262c55;
  --sky-deep: #1e2447;
  --cloud: #3e4884;
  --cloud-light: #5660a6;
  --shadow: #141a3a;
  --gold: #ffc845;
  --gold-deep: #e0a300;
  --gold-soft: #ffe9ae;
  --cream: #fff8ea;
  --teal: #0e4f48;
  --berry: #ff5c7a;
  --grass: #9ed370;
  --text: #fff8ea;
  --muted: #c6d2f7;
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--sky);
  color: var(--text);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--gold); }

h1, h2, h3, .wordmark { font-family: "Lilita One", "Nunito", sans-serif; font-weight: 400; letter-spacing: 0.01em; }

h1 { font-size: 2.2rem; margin: 0 0 0.4em; }
h2 { font-size: 1.5rem; margin: 1.4em 0 0.4em; }
h3 { font-size: 1.15rem; margin: 0.8em 0 0.3em; }

.wordmark {
  display: inline-block;
  color: var(--gold);
  font-size: 2.6rem;
  transform: rotate(-3deg);
  text-shadow: 0 0.11em 0 var(--teal);
  text-decoration: none;
}

.page { max-width: 880px; margin: 0 auto; padding: 24px 16px 64px; }

/* The splash's bubble sky (sky.js) lies fixed behind the whole page; everything in normal
   flow paints over it. The drift loops seamlessly: two copies of each cloud group sit 160
   viewBox units apart and slide 160 right, bands in 74 s (the splash's one width per 46 s
   over a 1.6-width wrap), highlights 1.3x faster. */
.sky-host .sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }
.sky-drift-bands { animation: sky-drift 74s linear infinite; }
.sky-drift-lights { animation: sky-drift 57s linear infinite; }
@keyframes sky-drift { to { transform: translateX(160px); } }

/* The hero: the splash laid out as a page header — emblem, wordmark, tagline pill. */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 0 30px; }
.emblem { width: min(248px, 64vw); height: auto; }
.hero-wordmark { font-size: clamp(2.6rem, 10vw, 3.6rem); margin-top: 20px; }
.em-coins { animation: em-bob 3.4s ease-in-out infinite; }
.em-spark { animation: em-twinkle 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.em-spark + .em-spark { animation-delay: 1.3s; }
@keyframes em-bob { 50% { transform: translateY(-3px); } }
@keyframes em-twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.82); }
}
@media (prefers-reduced-motion: reduce) {
  .sky-drift, .em-coins, .em-spark { animation: none; }
}

/* The splash's tagline pill: gold, tilted two degrees, text in the splash's deep navy. */
.tagline {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 20px;
  background: var(--gold);
  color: #1b2140;
  font-weight: 800;
  border: 3px solid var(--cream);
  border-radius: 999px;
  box-shadow: 0 5px 0 var(--shadow);
  transform: rotate(2deg);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.card {
  background: var(--sky-deep);
  border: 3px solid var(--cream);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--shadow);
  padding: 18px;
  margin: 0 0 18px;
}

.card.gold { background: var(--gold); color: var(--teal); }
/* Plain links only: a .button carries its own colours, and this used to override them, which made
   the teal button on the business page teal-on-teal (2026-10-02). */
.card.gold a:not(.button) { color: var(--teal); }

.button, button {
  font: inherit;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 18px;
  border: 3px solid var(--cream);
  border-radius: 14px;
  background: var(--teal);
  color: var(--cream);
  box-shadow: 0 5px 0 var(--shadow);
  cursor: pointer;
  text-decoration: none;
  transition: transform 60ms, box-shadow 60ms;
}

.button:active, button:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--shadow); }
.button.gold, button.gold { background: var(--gold); color: var(--teal); }
.button.quiet, button.quiet { background: var(--cloud); }
.button.danger, button.danger { background: var(--berry); color: var(--teal); }
button:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: 0 5px 0 var(--shadow); }

.lang { background: var(--cloud); min-height: 36px; padding: 4px 12px; font-size: 0.9rem; }

/* The home page's three ways on: the two stores and the business side. */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 0 0 12px; }
.choices .button { flex-direction: column; gap: 0; min-height: 72px; padding: 10px 12px; text-align: center; }
.choice-main { font-family: "Lilita One", "Nunito", sans-serif; font-weight: 400; font-size: 1.4rem; line-height: 1.2; }
.choice-sub { font-size: 0.8rem; font-weight: 700; }

/* The home page on a wide screen: one narrow column with a small emblem, so the whole page fits a
   laptop screen instead of spreading a one-line card across it. Phones keep the big splash. */
.page.home { max-width: 720px; }
@media (min-width: 700px) {
  .home .top { margin-bottom: 0; }
  .home .hero { padding: 0 0 22px; }
  .home .emblem { width: 150px; }
  .home .hero-wordmark { font-size: 2.8rem; margin-top: 12px; }
  .home .tagline { margin-top: 10px; }
  .home .card.gold h1 { font-size: 1.7rem; }
  .home .card.gold p:last-child { margin-bottom: 0; }
}
/* A store button before the store page exists: shown, not pressable. Solid palette colours, not
   opacity, which blends the gold with the sky into a brown that is in no palette. */
.button.soon { background: var(--cloud); color: var(--muted); cursor: default; }
.button.soon:active { transform: none; box-shadow: 0 5px 0 var(--shadow); }

/* The language choice behind a globe (like groupride's; no flags, a flag reads as "this
   page's language"): a <details> dropdown, round chunky button, card-like menu. */
.lang-pick { position: relative; }
.lang-pick summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--cloud);
  color: var(--cream);
  border: 3px solid var(--cream);
  border-radius: 50%;
  box-shadow: 0 4px 0 var(--shadow);
  cursor: pointer;
}
.lang-pick summary::-webkit-details-marker { display: none; }
.lang-pick summary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--shadow); }
.lang-pick .lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  min-width: 130px;
  padding: 6px;
  background: var(--sky-deep);
  border: 3px solid var(--cream);
  border-radius: 14px;
  box-shadow: 0 5px 0 var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lang-pick .lang-menu button {
  background: transparent;
  border: none;
  box-shadow: none;
  min-height: 36px;
  justify-content: flex-start;
  padding: 6px 10px;
  border-radius: 9px;
  color: var(--cream);
}
.lang-pick .lang-menu button:hover { background: var(--cloud); }
.lang-pick .lang-menu button:active { transform: none; }
.lang-pick .lang-menu button.active { background: var(--gold); color: var(--teal); }

label { display: block; font-weight: 700; margin: 12px 0 4px; }

input[type=text], input[type=email], input[type=number], input[type=datetime-local], textarea, select {
  font: inherit;
  width: 100%;
  padding: 10px 12px;
  border: 3px solid var(--cream);
  border-radius: 12px;
  background: var(--cream);
  color: var(--teal);
  font-weight: 700;
}

textarea { resize: vertical; min-height: 70px; }

input[type=range] { width: 100%; accent-color: var(--gold); }
input[type=checkbox] { accent-color: var(--gold); width: 20px; height: 20px; vertical-align: middle; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; min-width: 0; }

.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

.tier {
  background: var(--sky-deep);
  border: 3px solid var(--cream);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--shadow);
  padding: 16px;
}

.tier .price { font-family: "Lilita One", sans-serif; font-size: 2rem; color: var(--gold); }

.tier-choice { display: flex; gap: 10px; flex-wrap: wrap; }
.tier-choice label {
  flex: 1 1 160px;
  margin: 0;
  padding: 10px 12px;
  border: 3px solid var(--cream);
  border-radius: 14px;
  background: var(--cloud);
  cursor: pointer;
}
.tier-choice input { margin-right: 6px; }
.tier-choice label:has(input:checked) { background: var(--gold); color: var(--teal); }

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.error { color: var(--berry); font-weight: 700; }
.ok { color: var(--grass); font-weight: 700; }
.hidden { display: none !important; }

.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--cloud);
  font-size: 0.8rem;
  font-weight: 800;
}
.pill.draft { background: var(--cloud-light); }
.pill.pending { background: var(--gold-soft); color: var(--teal); }
.pill.active { background: var(--grass); color: var(--teal); }
.pill.ended, .pill.cancelled { background: var(--cloud); color: var(--muted); }

ul.steps { padding-left: 1.2em; }
ul.steps li { margin: 0.3em 0; }

footer { margin-top: 40px; color: var(--muted); font-size: 0.85rem; }

/* The portal: a sidebar and the map. */
.portal {
  display: grid;
  grid-template-columns: minmax(300px, 400px) 1fr;
  height: 100vh;
}

.side {
  overflow-y: auto;
  padding: 16px;
  border-right: 3px solid var(--shadow);
}

#map { width: 100%; height: 100%; min-height: 360px; }

.drop-item {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0 0 10px;
  background: var(--cloud);
  min-height: 0;
  padding: 10px 12px;
}
.drop-item .title { font-weight: 800; }
.drop-item.selected { background: var(--gold); color: var(--teal); }

.profile-row { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.profile-row #profile-handle { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  border: 3px solid var(--cream);
  object-fit: cover;
  background: var(--cloud);
}
.avatar.placeholder { background: var(--cloud-light); }
.profile-picture { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.profile-picture .row { flex: 1 1 160px; }
.handle-field { display: flex; align-items: center; gap: 6px; }
.handle-field .at { font-family: "Lilita One", "Nunito", sans-serif; font-size: 1.3rem; color: var(--gold); }
.handle-field input { flex: 1 1 auto; min-width: 0; }

.picture-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--cream);
  object-fit: cover;
  background: var(--cloud);
}

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.85rem; margin-top: 6px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--teal); vertical-align: -1px; margin-right: 4px; }
.dot.gold { background: var(--gold); }
.dot.found { background: var(--grass); }
.dot.struck { background: #9aa4b2; }

.code-input { letter-spacing: 0.4em; font-size: 1.4rem; text-align: center; }
/* The portal's coupon box at the foot of the gold pay card: the field takes the room, the button
   its own width, and the answer in teal (berry on gold does not read). */
.coupon { border-top: 2px dashed var(--teal); margin-top: 16px; padding-top: 4px; }
.coupon .row { align-items: center; }
.coupon .row > input { flex: 1 1 160px; text-transform: uppercase; }
.coupon .row > button { flex: 0 0 auto; }
.coupon-msg { color: var(--teal); font-weight: 800; margin: 10px 0 0; }

/* The centre hint while nothing is picked yet: a small gold card nobody can miss. */
.hint-card {
  background: var(--gold);
  color: var(--teal);
  font-weight: 800;
  border: 3px solid var(--cream);
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--shadow);
  padding: 8px 12px;
}

/* The treasure-picture modal: the drop zone first, then the crop frame. */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 26, 58, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-card { width: min(440px, 100%); max-height: 100%; overflow-y: auto; margin: 0; }
.modal-card h3 { margin-top: 0; }

.dropzone {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  border: 3px dashed var(--cream);
  border-radius: var(--radius);
  background: var(--cloud);
  font-weight: 700;
  cursor: pointer;
}
.dropzone.over { border-color: var(--gold); background: var(--cloud-light); }

#crop-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: var(--shadow);
  touch-action: none;
  cursor: grab;
}
#crop-canvas.dragging { cursor: grabbing; }
#crop-zoom { margin-top: 10px; }

@media (max-width: 760px) {
  .portal { grid-template-columns: 1fr; grid-template-rows: auto 60vh; height: auto; }
  .side { border-right: none; border-bottom: 3px solid var(--shadow); }
  #map { height: 60vh; }
  h1 { font-size: 1.8rem; }
}
