/* ═══════════════════════════════════════════════════════════════════════════
   CRobinHood — "Sherwood after dark"
   forest night · parchment · stitched leather · neon-green arrows
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --night: #050d09;
  --forest-900: #07130d;
  --forest-800: #0c1f15;
  --forest-700: #12301f;
  --moss: #2d5b3a;
  --leaf: #8cff4f;
  --leaf-deep: #3d8f1c;
  --gold: #e6b84c;
  --gold-deep: #8d6516;
  --parchment: #efe2c3;
  --parchment-dark: #d9c59a;
  --ink: #2b1d0f;
  --leather: #5b3a22;
  --leather-dark: #3a2414;
  --apple: #e0362a;
  --text: #e8eedf;
  --muted: #9fb3a2;

  --f-display: 'Pirata One', 'Georgia', serif;
  --f-poster: 'Rye', 'Georgia', serif;
  --f-body: 'Bricolage Grotesque', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius: 18px;
  --topbar-h: 72px;
  --dock-h: 0px;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  font: 400 17px/1.55 var(--f-body);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(140, 255, 79, .10), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(230, 184, 76, .08), transparent 60%),
    linear-gradient(180deg, var(--forest-800), var(--night) 70%);
  background-attachment: fixed;
  overflow-x: hidden;
}
body::before { /* film grain */
  content: '';
  position: fixed; inset: 0;
  background: var(--grain);
  opacity: .22;
  pointer-events: none;
  z-index: 100;
  mix-blend-mode: overlay;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px dashed var(--leaf); outline-offset: 3px; }

.kicker {
  margin: 0 0 .3rem;
  font: 400 .85rem/1 var(--f-poster);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── buttons ─────────────────────────────────────────────────────────────── */
.btn {
  --bg: var(--parchment); --fg: var(--ink); --edge: #9d8656;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .7em 1.2em;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--bg);
  color: var(--fg);
  font: 800 1rem/1 var(--f-body);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 5px 0 var(--edge), 0 10px 18px rgba(0,0,0,.35);
  transform: translateY(0);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.btn:hover { transform: translateY(-2px) rotate(-.6deg); box-shadow: 0 7px 0 var(--edge), 0 14px 22px rgba(0,0,0,.4); filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge), 0 4px 8px rgba(0,0,0,.3); }
.btn--leaf { --bg: var(--leaf); --edge: var(--leaf-deep); }
.btn--gold { --bg: var(--gold); --edge: var(--gold-deep); }
.btn--ghost { --bg: transparent; --fg: var(--parchment); --edge: rgba(239,226,195,.25); border-color: var(--parchment); }
.btn--x { --bg: #0b0b0b; --fg: #fff; --edge: #444; border-color: #000; }
.btn--sm { padding: .55em .9em; font-size: .9rem; }
.btn--lg { padding: .85em 1.4em; font-size: 1.05rem; }

.chip {
  display: inline-flex; padding: .35em .8em;
  border: 1px solid rgba(230,184,76,.5); border-radius: 999px;
  font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--gold);
  transition: background .15s;
}
.chip:hover { background: rgba(230,184,76,.12); }

/* ── shell ───────────────────────────────────────────────────────────────── */
.app { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
  padding: 0 clamp(.8rem, 2vw, 1.6rem);
  background:
    var(--grain),
    linear-gradient(180deg, #4a2f1b, var(--leather-dark));
  border-bottom: 3px solid #1d120a;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.topbar::after { /* stitching */
  content: ''; position: absolute; left: 0; right: 0; bottom: 5px;
  border-bottom: 2px dashed rgba(230,184,76,.45);
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--gold); box-shadow: 0 0 0 3px #1d120a; }
.brand__name { font: 400 1.7rem/1 var(--f-display); color: var(--parchment); letter-spacing: .02em; }
.brand__name em { font-style: normal; color: var(--leaf); }

.tabs { position: relative; display: flex; justify-content: center; gap: .25rem; }
.tab {
  position: relative;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem .85rem;
  border: 0; border-radius: 10px;
  background: transparent;
  color: var(--parchment-dark);
  font: 600 .95rem/1 var(--f-body);
  transition: color .15s, background .15s, transform .15s;
}
.tab svg { font-size: 1.15rem; flex: none; }
.tab:hover { color: var(--parchment); background: rgba(255,255,255,.05); }
.tab[aria-selected="true"] { color: var(--ink); background: var(--parchment); box-shadow: inset 0 -3px 0 var(--parchment-dark); transform: rotate(-1.2deg); }
.tab--hot:not([aria-selected="true"]) { color: var(--leaf); }
.tab--hot::after {
  content: 'PLAY'; position: absolute; top: -8px; right: -6px;
  padding: 2px 5px; border-radius: 4px;
  background: var(--apple); color: #fff;
  font: 800 .55rem/1 var(--f-body); letter-spacing: .05em;
  transform: rotate(8deg);
  animation: wiggle 2.4s ease-in-out infinite;
}
.tab__short { display: none; }
.tabs__arrow {
  position: absolute; left: 0; bottom: -14px;
  width: 64px; height: 12px;
  color: var(--leaf);
  filter: drop-shadow(0 0 6px rgba(140,255,79,.8));
  transform: translateX(-200px);
  transition: transform .45s cubic-bezier(.2,.9,.25,1.2);
  pointer-events: none;
}
.topbar__actions { display: flex; align-items: center; gap: .6rem; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; border: 2px solid rgba(239,226,195,.3);
  font-size: 1.05rem; color: var(--parchment); text-decoration: none;
  transition: border-color .15s, background .15s;
}
.icon-btn:hover { border-color: var(--parchment); background: rgba(255,255,255,.06); }

.stage { position: relative; width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(1rem, 3vw, 2.2rem) clamp(.8rem, 3vw, 2rem) 2rem; }
.panel { animation: thunk .5s cubic-bezier(.2,.9,.3,1.25) both; }
.panel__head { margin-bottom: 1.6rem; }
.panel h2, .section-h, .crew h3, .band h2 { font: 400 clamp(2.3rem, 5vw, 3.6rem)/1 var(--f-display); margin: 0; color: var(--parchment); }
.section-h { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 3rem 0 1.2rem; }

.fineprint { padding: 1.2rem 1rem calc(1.2rem + var(--dock-h)); text-align: center; font-size: .8rem; color: var(--muted); opacity: .8; }

@keyframes thunk {
  0% { opacity: 0; transform: translateY(18px) rotate(.6deg) scale(.985); }
  100% { opacity: 1; transform: none; }
}
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(8deg); } 85% { transform: rotate(-6deg) scale(1.15); } 90% { transform: rotate(12deg); } }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ── HIDEOUT ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: min(68vh, 560px);
  display: flex; align-items: center;
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid #1d120a;
  box-shadow: 0 0 0 2px rgba(230,184,76,.45), 0 30px 60px rgba(0,0,0,.55);
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 30%; }
.hero__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,13,9,.96) 0%, rgba(5,13,9,.82) 38%, rgba(5,13,9,0) 70%); }
.hero__copy { padding: clamp(1.4rem, 4vw, 3.4rem); max-width: 640px; }
.stamp {
  display: inline-block; margin: 0 0 1rem;
  padding: .35rem .7rem;
  border: 2px solid var(--leaf); border-radius: 6px;
  color: var(--leaf);
  font: 400 .8rem/1 var(--f-poster); letter-spacing: .06em; text-transform: uppercase;
  transform: rotate(-2.5deg);
  box-shadow: 0 0 18px rgba(140,255,79,.25) inset;
}
.stamp b { font-weight: 400; color: var(--parchment); }
.hero__title {
  margin: 0;
  font: 400 clamp(3.6rem, 10vw, 7.4rem)/.86 var(--f-display);
  color: var(--parchment);
  text-shadow: 0 4px 0 #1d120a, 0 10px 30px rgba(0,0,0,.6);
}
.hero__title span { color: var(--leaf); text-shadow: 0 4px 0 #173d0a, 0 0 28px rgba(140,255,79,.55); }
.hero__ticker { margin: .5rem 0 0; font: 700 1.05rem/1 var(--f-mono); color: var(--gold); letter-spacing: .08em; }
.hero__motto { margin: 1rem 0 1.4rem; font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 600; color: var(--parchment); max-width: 30ch; }

.quiver {
  display: inline-flex; align-items: center; max-width: 100%;
  border: 2px solid #1d120a; border-radius: 12px;
  background: var(--grain), linear-gradient(180deg, var(--leather), var(--leather-dark));
  box-shadow: inset 0 0 0 1px rgba(230,184,76,.35);
  overflow: hidden;
}
.quiver__label { padding: .6rem .7rem; font: 400 .9rem/1 var(--f-poster); color: var(--gold); border-right: 2px dashed rgba(230,184,76,.4); }
.quiver__addr { padding: .6rem .8rem; font: 500 .9rem/1 var(--f-mono); color: var(--parchment); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiver__copy {
  display: inline-flex; align-items: center; gap: .35rem;
  align-self: stretch; padding: 0 .9rem; border: 0;
  background: var(--gold); color: var(--ink); font-weight: 800; font-size: .9rem;
}
.quiver__copy:hover { background: var(--leaf); }
.seal { display: flex; align-items: center; gap: .45rem; margin: .7rem 0 0; font-size: .9rem; font-weight: 700; color: var(--parchment); }
.seal b {
  display: grid; place-items: center; width: 1.4rem; height: 1.4rem; flex: none;
  border-radius: 50%; background: var(--leaf); color: var(--ink); font-size: .8rem;
  box-shadow: 0 0 12px rgba(140,255,79,.5);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }

.signposts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.6rem; }
.signpost {
  position: relative; display: grid; gap: .25rem;
  padding: 1rem 2.4rem 1rem 1.1rem;
  text-decoration: none;
  color: var(--ink);
  background:
    var(--grain),
    repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 13px),
    linear-gradient(180deg, #c99a5d, #a87843);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%);
  border-radius: 6px 0 0 6px;
  transform: rotate(var(--r, -1deg));
  transition: transform .2s;
}
.signpost:nth-child(2n) { --r: 1.2deg; }
.signpost:hover { transform: rotate(0) translateX(6px); }
.signpost b { font: 400 1.5rem/1 var(--f-display); }
.signpost span { font-size: .88rem; font-weight: 600; opacity: .8; }
.signpost--hot { background: var(--grain), linear-gradient(180deg, var(--leaf), #63d42f); }

/* ── LEGEND ──────────────────────────────────────────────────────────────── */
.legend__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: center; }
.scroll {
  position: relative;
  padding: clamp(1.4rem, 4vw, 2.6rem);
  color: var(--ink);
  background:
    var(--grain),
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(120,80,30,.25), transparent 55%),
    var(--parchment);
  border-radius: 6px;
  box-shadow: inset 0 0 60px rgba(120,80,30,.45), 0 24px 50px rgba(0,0,0,.5);
  transform: rotate(-.6deg);
}
.scroll::before, .scroll::after { /* rolled ends */
  content: ''; position: absolute; left: -10px; right: -10px; height: 22px;
  background: linear-gradient(180deg, #b8955e, #e7d4a8 45%, #a07c45);
  border-radius: 11px;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
}
.scroll::before { top: -11px; }
.scroll::after { bottom: -11px; }
.scroll .kicker { color: var(--gold-deep); }
.scroll h2 { color: var(--ink); margin-bottom: 1rem; }
.scroll p { margin: 0 0 .9rem; }
.scroll__sign { font-style: italic; font-size: .9rem; opacity: .7; }
.exhibit { margin: 0; padding: .8rem .8rem 1.2rem; background: #f6f1e4; color: var(--ink); border-radius: 4px; transform: rotate(2.4deg); box-shadow: 0 24px 50px rgba(0,0,0,.55); }
.exhibit img { border-radius: 2px; }
.exhibit figcaption { margin-top: .7rem; font: 400 1.2rem/1.1 var(--f-display); text-align: center; }

.code { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: code; }
.code li {
  position: relative; counter-increment: code;
  padding: 2.4rem 1.1rem 1.2rem;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--forest-700), var(--forest-800));
  border: 1px solid rgba(140,255,79,.18);
}
.code li::before { /* wax seal */
  content: counter(code);
  position: absolute; top: -18px; left: 1rem;
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50% 46% 52% 48%;
  background: radial-gradient(circle at 35% 30%, #e0473a, #8e1a12);
  color: #ffd9c9; font: 400 1.5rem/1 var(--f-display);
  box-shadow: 0 0 0 4px rgba(142,26,18,.35), 0 6px 12px rgba(0,0,0,.4);
}
.code b { display: block; font: 400 1.4rem/1.1 var(--f-display); color: var(--leaf); margin-bottom: .35rem; }
.code span { font-size: .93rem; color: var(--muted); }

.crew {
  margin-top: 3rem;
  display: grid; grid-template-columns: 340px 1fr; gap: 1.8rem; align-items: center;
  padding: 1.2rem;
  border-radius: var(--radius);
  background: var(--grain), linear-gradient(120deg, rgba(91,58,34,.55), rgba(18,48,31,.6));
  border: 1px solid rgba(230,184,76,.3);
}
.crew img { border-radius: 12px; transform: rotate(-2deg); box-shadow: 0 14px 30px rgba(0,0,0,.5); }
.crew h3 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: .6rem; }
.crew p { margin: 0 0 1.2rem; max-width: 52ch; }

/* ── HEIST ───────────────────────────────────────────────────────────────── */
.heist__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: start; }
.map {
  position: relative;
  padding: 2rem clamp(1.2rem, 3vw, 2.2rem);
  color: var(--ink);
  background:
    var(--grain),
    linear-gradient(135deg, #f0e2bf, #d6bd88);
  border-radius: 10px;
  box-shadow: inset 0 0 70px rgba(110,70,20,.5), 0 24px 50px rgba(0,0,0,.5);
}
.map__trail { position: absolute; top: 2rem; bottom: 6rem; left: 1rem; width: 70px; height: calc(100% - 8rem); }
.map__trail path { fill: none; stroke: #8e1a12; stroke-width: 2.5; stroke-dasharray: 2 7; vector-effect: non-scaling-stroke; opacity: .6; }
.steps { position: relative; list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: 1.3rem; }
.steps li { display: grid; grid-template-columns: 54px 1fr; gap: 1rem; align-items: start; }
.steps b { font: 400 1.6rem/1.1 var(--f-display); }
.steps p { margin: .2rem 0 0; font-size: .95rem; }
.x {
  width: 54px; height: 54px; display: grid; place-items: center;
  font: 400 1.6rem/1 var(--f-poster); color: #8e1a12;
  border: 3px solid #8e1a12; border-radius: 50%;
  background: rgba(255,255,255,.35);
  transform: rotate(-8deg);
}
.map__cta { margin-left: 70px; }

.ledger-wrap {
  padding: 1.6rem;
  border-radius: var(--radius);
  background: var(--grain), linear-gradient(180deg, var(--leather), var(--leather-dark));
  border: 2px solid #1d120a;
  box-shadow: inset 0 0 0 6px rgba(0,0,0,.15), inset 0 0 0 7px rgba(230,184,76,.35), 0 24px 50px rgba(0,0,0,.5);
}
.ledger__title { margin: 0 0 1rem; font: 400 2rem/1 var(--f-display); color: var(--gold); }
.ledger { margin: 0; display: grid; }
.ledger > div { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .6rem 0; border-bottom: 1px dashed rgba(230,184,76,.3); }
.ledger dt { font: 400 .8rem/1 var(--f-poster); letter-spacing: .05em; text-transform: uppercase; color: var(--parchment-dark); opacity: .85; }
.ledger dd { margin: 0; font-weight: 800; color: var(--parchment); text-align: right; }
.ledger .ledger__ok { color: var(--leaf); }
.ledger__addr dd { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.ledger__addr code { font: 500 .85rem/1 var(--f-mono); color: var(--leaf); }
.ledger__addr button { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(230,184,76,.5); border-radius: 8px; background: transparent; color: var(--gold); flex: none; }
.ledger__addr button:hover { background: var(--gold); color: var(--ink); }
.ledger__warn { margin: 1rem 0; padding: .7rem .9rem; border-radius: 10px; background: rgba(224,54,42,.15); border: 1px solid rgba(224,54,42,.45); font-size: .88rem; color: #ffd0c8; }
.ledger__links { display: flex; flex-wrap: wrap; gap: .5rem; }

.lookout { margin-top: 2rem; border-radius: var(--radius); overflow: hidden; border: 2px solid #1d120a; box-shadow: 0 0 0 2px rgba(140,255,79,.25); background: var(--forest-900); }
.lookout__bar { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1.1rem; background: var(--forest-700); font-size: .95rem; }
.lookout__bar span { color: var(--muted); font-size: .85rem; }
.lookout__frame { height: min(62vh, 520px); display: grid; place-items: center; background: linear-gradient(rgba(5,13,9,.78), rgba(5,13,9,.78)), url(../assets/img/green-candles.webp) center / cover; }
.lookout__frame iframe { width: 100%; height: 100%; border: 0; }

/* ── TARGET PRACTICE ─────────────────────────────────────────────────────── */
.hunt__grid { display: grid; grid-template-columns: 1fr 290px; gap: 1.2rem; align-items: start; }
.range {
  position: relative;
  aspect-ratio: 16 / 10;
  max-height: calc(100dvh - var(--topbar-h) - 5rem);
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a1c12;
  border: 6px solid #3a2414;
  box-shadow: inset 0 0 0 2px rgba(230,184,76,.4), 0 0 0 2px #1d120a, 0 30px 60px rgba(0,0,0,.55);
  touch-action: none;
  user-select: none; -webkit-user-select: none;
  container-type: size; /* the sheets below adapt to the game area's real height */
}
.range canvas#huntCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.range.is-live canvas#huntCanvas { cursor: none; }

.hud { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: .5rem; pointer-events: none; z-index: 2; }
.hud__cell {
  min-width: 84px; padding: .35rem .7rem .4rem;
  border-radius: 10px;
  background: rgba(29,18,10,.78);
  border: 1px solid rgba(230,184,76,.4);
  backdrop-filter: blur(4px);
}
.hud__cell span { display: block; font: 400 .62rem/1 var(--f-poster); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.hud__cell b { font: 700 1.35rem/1.1 var(--f-mono); color: var(--parchment); }
.hud__cell--time { margin-left: auto; }
.hud__cell--time.is-low b { color: var(--apple); animation: pulse .5s ease-in-out infinite alternate; }
.hud__cell--mult { position: relative; min-width: 64px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.hud__cell--mult b { color: rgba(239,226,195,.55); transition: color .2s; }
.hud__cell--mult.is-hot { border-color: var(--leaf); box-shadow: 0 0 14px rgba(140,255,79,.45); }
.hud__cell--mult.is-hot b { color: var(--leaf); text-shadow: 0 0 10px rgba(140,255,79,.6); }
.hud__meter { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(140,255,79,.15); }
.hud__meter::after {
  content: ""; position: absolute; inset: 0;
  background: var(--leaf);
  transform: scaleX(var(--fill, 0)); transform-origin: left;
  transition: transform .15s ease-out;
}
.hud__btn { pointer-events: auto; width: 44px; border-radius: 10px; border: 1px solid rgba(230,184,76,.4); background: rgba(29,18,10,.78); font-size: 1.1rem; }
@keyframes pulse { to { transform: scale(1.12); } }

.sheet {
  position: absolute; inset: 50% auto auto 50%; z-index: 3;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 1.5rem));
  max-height: calc(100% - 1.5rem); overflow: auto;
  padding: clamp(1rem, 3vw, 1.8rem);
  color: var(--ink);
  text-align: center;
  background: var(--grain), radial-gradient(ellipse at 30% 10%, rgba(255,255,255,.4), transparent 60%), var(--parchment);
  border-radius: 8px;
  box-shadow: inset 0 0 50px rgba(120,80,30,.45), 0 20px 60px rgba(0,0,0,.6);
  animation: sheetIn .35s cubic-bezier(.2,.9,.3,1.3) both;
}
.sheet--small { width: min(380px, calc(100% - 1.5rem)); }
@keyframes sheetIn { from { opacity: 0; transform: translate(-50%, -42%) rotate(-2deg); } }
.sheet .kicker { color: var(--gold-deep); }
.sheet h2 { color: var(--ink); }
.sheet .sheet__title { margin: 0 0 .8rem; font: 400 clamp(2rem, 4.2vw, 3rem)/1 var(--f-display); } /* .sheet: beat .panel h2 */
.sheet__title span { color: var(--leaf-deep); }
.sheet__hint { margin: .2rem auto 1rem; max-width: 42ch; font-size: .92rem; }
.rules { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.rules li { display: grid; justify-items: center; gap: .1rem; padding: .5rem .3rem; border-radius: 10px; background: rgba(43,29,15,.08); }
.rules__icon { width: 56px; height: 56px; }
.rules b { font: 700 1.3rem/1 var(--f-mono); color: var(--leaf-deep); }
.rules b.neg { color: #b3241a; }
.rules span { font-weight: 800; font-size: .88rem; line-height: 1.15; }
.rules small { display: block; font-weight: 600; font-size: .72rem; opacity: .7; }
.combo {
  display: flex; align-items: center; gap: .7rem;
  margin: 0 0 .6rem; padding: .5rem .8rem;
  border-radius: 10px; border: 2px dashed rgba(61,143,28,.55);
  background: rgba(61,143,28,.1);
  text-align: left; font-size: .84rem; font-weight: 600; line-height: 1.25;
}
.combo b { flex: none; font: 700 1.05rem/1 var(--f-mono); color: var(--leaf-deep); }
.combo small { font-size: inherit; }
.sheet__form { display: grid; gap: .35rem; text-align: left; }
.sheet__form label { font: 400 .75rem/1 var(--f-poster); letter-spacing: .06em; text-transform: uppercase; }
.sheet__labels { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.sheet__labels label { white-space: nowrap; }
.sheet__toggle { padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; font: 700 .8rem/1.15 var(--f-body); text-align: right; opacity: .7; }
.sheet__toggle small { font-weight: 600; font-size: inherit; opacity: .75; }
.sheet__toggle::before { content: '+'; margin-right: .3em; font-family: var(--f-mono); }
.sheet__toggle.is-set::before { content: '✓'; color: var(--leaf-deep); }
.sheet__toggle[aria-expanded="true"]::before { content: '−'; color: inherit; }
.sheet__toggle:hover, .sheet__toggle[aria-expanded="true"] { opacity: 1; }
.sheet__toggle[aria-expanded="false"] .if-open, .sheet__toggle[aria-expanded="true"] .if-closed { display: none; }
.sheet.is-wallet .sheet__hint { display: none; }
.sheet__row { display: flex; flex-wrap: wrap; gap: .6rem; }
.sheet__row input, .sheet__wallet input {
  flex: 1; min-width: 0;
  padding: .7rem .9rem;
  border: 2px solid var(--ink); border-radius: 12px;
  background: #fff8e6; color: var(--ink);
  font: 600 1rem/1 var(--f-body);
}
.sheet__err { color: #b3241a; font-weight: 700; }
.sheet__wallet { order: 1; flex-basis: 100%; font-size: .8rem; } /* own line under name + button */
.sheet__wallet input { display: block; width: 100%; font-family: var(--f-mono); font-size: max(16px, .9rem); } /* 16px: iOS won't zoom */
.sheet__wallet .sheet__err { display: block; margin-top: .25rem; }
.sheet__score { margin: .2rem 0 0; font: 400 clamp(3.4rem, 9vw, 5rem)/1 var(--f-display); }
.sheet__score small { font-size: .35em; margin-left: .2em; opacity: .6; }
.sheet__rank { margin: .2rem 0 .3rem; font: 400 1.1rem/1 var(--f-poster); color: var(--leaf-deep); }
.sheet__pb { margin: .2rem 0; font-weight: 800; color: var(--gold-deep); }
.tally { display: grid; grid-template-columns: repeat(6, 1fr); gap: .4rem; margin: 1rem 0; }
.tally div { padding: .5rem .2rem; border-radius: 10px; background: rgba(43,29,15,.08); }
.tally dt { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.tally dd { margin: .15rem 0 0; font: 700 1.2rem/1 var(--f-mono); }
.sheet__actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }
.sheet__note { margin: .9rem 0 0; font-size: .85rem; font-weight: 600; }
.sheet__link { display: block; margin: .8rem auto 0; padding: 0; border: 0; background: none; color: var(--ink); font-size: .82rem; font-weight: 600; text-decoration: underline; opacity: .65; }
.sheet__link:hover { opacity: 1; }

.count {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-items: center;
  font: 400 clamp(3rem, 12vw, 8rem)/1 var(--f-display);
  color: var(--parchment);
  text-shadow: 0 6px 0 #1d120a, 0 0 40px rgba(140,255,79,.6);
  pointer-events: none;
}
.count span { animation: countPop .7s cubic-bezier(.2,.9,.3,1.4) both; }
@keyframes countPop { from { opacity: 0; transform: scale(2.2) rotate(-6deg); } 60% { opacity: 1; } }

.hall {
  padding: 1.1rem;
  border-radius: var(--radius);
  background: var(--grain), linear-gradient(180deg, var(--leather), var(--leather-dark));
  border: 2px solid #1d120a;
  box-shadow: inset 0 0 0 1px rgba(230,184,76,.35), 0 20px 40px rgba(0,0,0,.45);
}
.hall__head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .7rem; }
.hall__head h3 { margin: 0; font: 400 1.7rem/1 var(--f-display); color: var(--gold); }
.hall__scope { font-size: .72rem; color: var(--parchment-dark); opacity: .7; }
.hall__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; counter-reset: hall; }
.hall__list li, .hall__you {
  counter-increment: hall;
  display: grid; grid-template-columns: 34px 1fr auto; gap: .5rem; align-items: center;
  padding: .45rem .6rem; border-radius: 8px;
  background: rgba(0,0,0,.2);
  font-size: .92rem;
}
.hall__list li::before { content: counter(hall); font: 700 .85rem/1 var(--f-mono); color: var(--parchment-dark); }
.hall__list li:nth-child(1)::before { content: '🥇'; }
.hall__list li:nth-child(2)::before { content: '🥈'; }
.hall__list li:nth-child(3)::before { content: '🥉'; }
.hall__list li.is-me { background: rgba(140,255,79,.16); box-shadow: inset 0 0 0 1px rgba(140,255,79,.5); }
.hall__list b, .hall__you b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.hall__list em, .hall__you em { font: 700 .95rem/1 var(--f-mono); font-style: normal; color: var(--leaf); }
.hall__empty { margin: .5rem 0; font-size: .9rem; color: var(--parchment-dark); }
.hall__you { margin-top: .6rem; border: 1px dashed rgba(140,255,79,.5); }
.hall__you span { font: 700 .8rem/1 var(--f-mono); color: var(--parchment-dark); }

/* ── WANTED ──────────────────────────────────────────────────────────────── */
.board {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2.2rem);
  padding: clamp(1.2rem, 4vw, 2.6rem);
  border-radius: var(--radius);
  background:
    var(--grain),
    repeating-linear-gradient(180deg, transparent 0 118px, rgba(0,0,0,.45) 118px 121px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 3px, transparent 3px 17px),
    linear-gradient(180deg, #5a3a1f, #3d2612);
  border: 3px solid #1d120a;
  box-shadow: inset 0 0 80px rgba(0,0,0,.6), 0 24px 50px rgba(0,0,0,.5);
}
.poster {
  position: relative; margin: 0;
  padding: 1rem 1rem 1.1rem;
  color: var(--ink);
  background: var(--grain), radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.35), transparent 60%), #ead9b0;
  box-shadow: inset 0 0 40px rgba(120,80,30,.5), 0 14px 26px rgba(0,0,0,.5);
  transform: rotate(var(--r, 0deg));
  transition: transform .25s cubic-bezier(.2,.9,.3,1.3), box-shadow .25s;
  cursor: zoom-in;
}
.poster::before { /* nail */
  content: ''; position: absolute; top: 8px; left: 50%; width: 12px; height: 12px; margin-left: -6px;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ccc, #444);
  box-shadow: 0 2px 3px rgba(0,0,0,.6);
}
.poster:hover { transform: rotate(0) scale(1.03); box-shadow: inset 0 0 40px rgba(120,80,30,.5), 0 24px 40px rgba(0,0,0,.6); z-index: 1; }
.poster__h { margin: .5rem 0 .5rem; text-align: center; font: 400 clamp(1.8rem, 3.4vw, 2.5rem)/1 var(--f-poster); letter-spacing: .06em; text-transform: uppercase; color: #4a2c12; }
.poster img, .poster__whale { width: 100%; aspect-ratio: 1; object-fit: cover; border: 3px solid #4a2c12; filter: sepia(.45) contrast(1.05) saturate(.9); transition: filter .25s; }
.poster:hover img { filter: none; }
.poster__whale { height: auto; background: #d8c494; padding: 1rem; }
.poster--whale { cursor: default; }
.poster figcaption { margin-top: .7rem; text-align: center; }
.poster figcaption b { display: block; font: 400 1.5rem/1 var(--f-display); }
.poster figcaption span { display: block; margin-top: .3rem; font-size: .85rem; font-weight: 600; }
.poster figcaption i { display: block; margin-top: .3rem; font: 400 .78rem/1.2 var(--f-poster); font-style: normal; color: #8e1a12; }
.board__cta { text-align: center; margin: 1.6rem 0 0; color: var(--parchment-dark); }
.board__cta a { color: var(--leaf); font-weight: 800; }

/* ── BAND ────────────────────────────────────────────────────────────────── */
.band__hero { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: center; margin-bottom: 1.8rem; }
.band__lion { height: 300px; width: auto; justify-self: center; filter: drop-shadow(0 0 30px rgba(140,255,79,.25)); animation: float 5s ease-in-out infinite; }
.band__hero p:not(.kicker) { max-width: 54ch; font-size: 1.1rem; }
.horns { display: flex; flex-wrap: wrap; gap: 1rem; }
.horn {
  flex: 1 1 220px;
  display: grid; gap: .2rem; align-content: start;
  padding: 1.2rem 1.3rem;
  border-radius: 14px;
  text-decoration: none;
  background: linear-gradient(180deg, var(--forest-700), var(--forest-800));
  border: 1px solid rgba(140,255,79,.2);
  transition: transform .15s, border-color .15s, background .15s;
}
.horn:hover { transform: translateY(-4px) rotate(-.8deg); border-color: var(--leaf); }
.horn b { font: 400 1.6rem/1 var(--f-display); color: var(--parchment); }
.horn span { color: var(--muted); font-size: .9rem; }
.horn svg { font-size: 1.6rem; margin-bottom: .4rem; }
.horn--x { flex: 2 1 360px; background: #0b0b0b; border-color: #333; align-content: center; justify-items: start; }
.horn--x b { font-size: 2.4rem; }
.horn--x svg { font-size: 2.6rem; }
.rally {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: 1.6rem; padding: 1.3rem 1.5rem;
  border-radius: var(--radius);
  background: var(--grain), linear-gradient(100deg, rgba(140,255,79,.22), rgba(230,184,76,.15));
  border: 1px solid rgba(140,255,79,.4);
}
.rally h3 { margin: 0; font: 400 2rem/1 var(--f-display); }
.rally p { margin: .2rem 0 0; color: var(--parchment-dark); }
.disclaimer { margin: 1.8rem 0 0; padding: 1rem 1.2rem; border-radius: 12px; background: rgba(0,0,0,.3); color: var(--muted); font-size: .85rem; }
.disclaimer b { color: var(--parchment-dark); }

/* ── overlays ────────────────────────────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; gap: 1rem; align-content: center; padding: 1rem; background: rgba(3,8,5,.88); backdrop-filter: blur(6px); }
.lightbox img { max-height: 78vh; border-radius: 10px; border: 4px solid var(--parchment); box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.lightbox__close { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--parchment); background: transparent; font-size: 1.1rem; }
.toast {
  position: fixed; left: 50%; bottom: calc(1.4rem + var(--dock-h)); z-index: 95;
  transform: translateX(-50%);
  padding: .7rem 1.1rem; border-radius: 12px;
  background: var(--leaf); color: var(--ink); font-weight: 800;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  animation: sheetIn .3s both;
}

/* ── responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .tab span:not(.tab__short) { display: none; }
  .tab--hot span.tab__short { display: inline; }
  .tab { padding: .6rem .75rem; }
  .signposts { grid-template-columns: repeat(2, 1fr); }
  .code { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
  .range { aspect-ratio: 4 / 3; } /* the side board leaves the range narrow: go taller */
}
@media (max-width: 960px) {
  .hunt__grid { grid-template-columns: 1fr; }
  .range { aspect-ratio: 4 / 5; max-height: calc(100dvh - var(--topbar-h) - var(--dock-h) - 2rem); }
  .tally { grid-template-columns: repeat(3, 1fr); }
  .heist__grid, .legend__grid { grid-template-columns: 1fr; }
  .exhibit { max-width: 420px; justify-self: center; }
  .board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  :root { --topbar-h: 60px; --dock-h: 70px; }
  .topbar { grid-template-columns: auto 1fr; }
  .topbar__actions { justify-self: end; }
  .brand__name { font-size: 1.4rem; }
  .brand img { width: 38px; height: 38px; }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: calc(var(--dock-h) + env(safe-area-inset-bottom));
    padding: .4rem .4rem calc(.4rem + env(safe-area-inset-bottom));
    gap: 0;
    background: var(--grain), linear-gradient(0deg, var(--leather-dark), #4a2f1b);
    border-top: 3px solid #1d120a;
    box-shadow: 0 -8px 24px rgba(0,0,0,.45);
  }
  .tab { flex: 1; flex-direction: column; gap: .25rem; padding: .45rem .1rem; font-size: .66rem; }
  .tab span:not(.tab__short) { display: inline; }
  .tab--hot span:not(.tab__short) { display: none; }
  .tab svg { font-size: 1.35rem; }
  .tab[aria-selected="true"] { transform: translateY(-4px) rotate(-1.5deg); }
  .tab--hot::after { top: -4px; right: 4px; }
  .tabs__arrow { display: none; }
  .hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero__bg { position: relative; height: 230px; }
  .hero__bg img { object-position: 82% 30%; }
  .hero__bg::after { background: linear-gradient(0deg, rgba(5,13,9,1), rgba(5,13,9,0) 60%); }
  .hero__copy { margin-top: -70px; background: linear-gradient(180deg, transparent, var(--night) 70px); }
  .crew { grid-template-columns: 1fr; }
  .horn { flex-basis: 40%; }
  .horn--x { flex-basis: 100%; }
  .band__hero { grid-template-columns: 1fr; text-align: center; }
  .band__hero p { margin-inline: auto; }
  .band__lion { height: 220px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hide-xs { display: none; }
  .signposts { grid-template-columns: 1fr; }
  .code { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .rules small { display: none; }
  .sheet__row { flex-direction: column; }
  .sheet__wallet { order: 0; flex-basis: auto; } /* stacked: name, wallet, then the button */
  .sheet__row .btn { order: 1; }
  .hero__cta .btn { flex: 1 1 auto; }
  .map__trail { display: none; }
  .map__cta { margin-left: 0; width: 100%; }
  .steps li { grid-template-columns: 44px 1fr; }
  .x { width: 44px; height: 44px; font-size: 1.3rem; }
  .hud__cell { min-width: 0; padding: .3rem .5rem; }
  .range { aspect-ratio: 2 / 3; }
  .combo { justify-content: center; gap: .5rem; padding: .4rem .6rem; font-size: .74rem; }
  .combo b { font-size: .82rem; }
  .combo small { display: none; }
  .sheet .sheet__title { margin-bottom: .5rem; }
  .rules { gap: .4rem; margin-bottom: .5rem; }
  .rules li { padding: .35rem .2rem; }
  .rules__icon { width: 42px; height: 42px; }
  .sheet__hint { margin-bottom: .6rem; }
  .hud__cell b { font-size: 1.1rem; }
}
@media (max-width: 560px) and (max-height: 650px) {
  #sheetStart .sheet__hint { display: none; } /* small phones: keep the name field in view */
}
@media (max-width: 560px) and (max-height: 700px) {
  #sheetStart.is-wallet .sheet__title { font-size: 1.45rem; } /* one line, so the wallet field fits too */
}
/* short game area (small laptops, browser bars…): trim the start sheet so the name field stays in view */
@container (max-height: 500px) {
  #sheetStart .sheet__hint { display: none; }
}
@container (max-height: 470px) {
  #sheetStart .sheet__title { margin-bottom: .5rem; font-size: 2rem; }
  #sheetStart .rules { gap: .4rem; margin-bottom: .5rem; }
  #sheetStart .rules li { padding: .35rem .2rem; }
  #sheetStart .rules__icon { width: 40px; height: 40px; }
  #sheetStart .rules small, #sheetStart .combo small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
