/* Arc Land Registry — a "land survey" look: paper grid, plotted parcels, one warm
   signal colour reserved exclusively for land that is yours.

   Two themes. Dark is a survey drawn on slate; light is the same survey on paper.
   The rule that governs both: gold NEVER appears except where land is yours, so
   every other colour has to stay neutral in either theme. Nothing here is a plain
   inversion — on paper the locked tiles get darker (not lighter) so the gold still
   reads as the lit thing on the board.

   Every themed value is a variable. A raw hex below the :root blocks is a bug:
   it will look right in one theme and wrong in the other. The canvas board
   (iso.js) and the globe (globe.js) carry their own palettes keyed to the same
   `data-theme` attribute, since they paint pixels rather than style boxes. */

:root {
  --bg:        #0c1116;
  --panel:     #131a21;
  --panel-2:   #182029;
  --line:      #26313c;
  --text:      #e6edf3;
  --muted:     #8b9aa8;
  --gold:      #f7931a;   /* Bitcoin orange — only ever means "yours" */
  --gold-solid:#f7931a;   /* gold as a FILL; --gold is gold as ink */
  --on-gold:   #1a1000;   /* text sitting on a gold fill */
  --gold-dim:  #7a4a0d;
  --green:     #3fb950;
  --red:       #f85149;
  --radius:    12px;
  /* Native widgets — the date picker, the unit <select>, scrollbars — are drawn
     by the OS and ignore every variable above. This is the only thing that
     makes them follow the theme. */
  color-scheme: dark;

  --grid:      rgba(255,255,255,.018);
  --topbar-bg: rgba(12,17,22,.85);
  --ok-bg:     rgba(63,185,80,.08);
  --err-bg:    rgba(248,81,73,.08);
  --gold-bg:   rgba(247,147,26,.06);
  --rule:      rgba(38,49,60,.5);
  --rule-2:    rgba(38,49,60,.55);
  --track:     #0d1319;

  --board-bg:  radial-gradient(120% 90% at 50% 20%, #16202b 0%, #0a0f14 70%, #070b0f 100%);
  --hud-shadow:      0 1px 3px rgba(0,0,0,.85);
  --hud-shadow-big:  0 2px 10px rgba(0,0,0,.9), 0 0 26px rgba(247,147,26,.32);
  --hud-strong:      #fff;
  --hud-soft:        #cfe0ee;
  /* HUD secondary text sits over the BOARD TILES, not over the page background,
     so it cannot use --muted: on paper the tiles are mid-grey and --muted
     disappears into them. */
  --hud-muted:       #8b9aa8;

  --plate-bg:   linear-gradient(90deg, rgba(28,22,48,.92), rgba(28,22,48,.35));
  --plate-line: #4a3d6b;
  --plate-name: #efe6ff;
  --plate-sub:  #a294c4;

  --gauge-bg:    linear-gradient(90deg, rgba(58,40,16,.95), rgba(58,40,16,.55));
  --gauge-line:  #6d5323;
  --gauge-label: #f2c98a;
  --gauge-track: #241a09;
  --gauge-from:  #8a5a10;
  --gauge-to:    #ffd08a;
  --gauge-val:   #ffd08a;

  --tip-bg:     rgba(10,14,19,.97);
  --tip-shadow: 0 10px 30px rgba(0,0,0,.6);

  --key-full-line:   #ffc978;
  --key-partial:     #2a323d;
  --key-locked:      #465061;
  --key-locked-line: #4d5a69;

  /* Arc deeds. Must match deedTop / deedEdge in iso.js isoPalette('dark'). */
  --key-deed:           #2f6675;
  --key-deed-line:      #7fdbe8;
  --key-deed-mine:      #48b0c6;
  --key-deed-mine-line: #c8f4ff;
  --arc-toast-bg:       rgba(10,14,19,.97);

  --globe-bg:     #05080b;
  --globe-hud-bg: rgba(5,8,11,.66);

  --map-stage:  #0a0e12;
  --cell:       #161d25;
  --cell-line:  #1e2831;
  --cell-target:#1d2530;
}

/* Light — the survey on paper. Warm off-white rather than pure #fff, so the
   orange stays a signal instead of vibrating against the background. */
:root[data-theme="light"] {
  --bg:        #f7f4ee;
  --panel:     #ffffff;
  --panel-2:   #f3efe6;
  --line:      #ddd6c8;
  --text:      #16202a;
  --muted:     #5c6875;
  --gold:      #a85f06;   /* gold as ink: passes contrast on paper */
  --gold-solid:#e07c05;   /* gold as fill: still unmistakably Bitcoin orange */
  --on-gold:   #1a1000;
  --gold-dim:  #c98f2e;
  --green:     #1a7f37;
  --red:       #cf222e;
  color-scheme: light;

  --grid:      rgba(22,32,42,.05);
  --topbar-bg: rgba(247,244,238,.85);
  --ok-bg:     rgba(26,127,55,.10);
  --err-bg:    rgba(207,34,46,.08);
  --gold-bg:   rgba(224,124,5,.10);
  --rule:      rgba(22,32,42,.12);
  --rule-2:    rgba(22,32,42,.13);
  --track:     #e6e0d2;

  /* Paper, lit from the same top-centre direction as the dark board. */
  --board-bg:  radial-gradient(120% 90% at 50% 20%, #fffdf8 0%, #efe9dc 70%, #e4dccb 100%);
  --hud-shadow:      0 1px 2px rgba(255,255,255,.9);
  --hud-shadow-big:  0 1px 2px rgba(255,255,255,.95), 0 0 22px rgba(224,124,5,.28);
  --hud-strong:      #16202a;
  --hud-soft:        #253647;
  --hud-muted:       #334455;

  --plate-bg:   linear-gradient(90deg, rgba(236,231,248,.95), rgba(236,231,248,.45));
  --plate-line: #b3a8d0;
  --plate-name: #3b2f5c;
  --plate-sub:  #6a5e8c;

  --gauge-bg:    linear-gradient(90deg, rgba(250,236,213,.96), rgba(250,236,213,.55));
  --gauge-line:  #d9b273;
  --gauge-label: #8a5a10;
  --gauge-track: #ece0c8;
  --gauge-from:  #d9a441;
  --gauge-to:    #a85f06;
  --gauge-val:   #8a5a10;

  --tip-bg:     rgba(255,253,248,.98);
  --tip-shadow: 0 10px 30px rgba(22,32,42,.18);

  --key-full-line:   #8a5a10;
  --key-partial:     #e8e1d3;
  --key-locked:      #b3bcc7;
  --key-locked-line: #8f9aa7;

  /* Arc deeds on paper. Like gold, the fill barely moves and the EDGE flips
     from a highlight to a shadow. Must match isoPalette('light') in iso.js. */
  --key-deed:           #6fa8b8;
  --key-deed-line:      #2a5f6b;
  --key-deed-mine:      #2f93aa;
  --key-deed-mine-line: #0e3b46;
  --arc-toast-bg:       rgba(255,253,248,.98);

  /* The globe is Earth seen from orbit and it lights with the page — see the
     matching uLight branch in globe.js. */
  --globe-bg:     #dfe7ef;
  --globe-hud-bg: rgba(255,255,255,.72);

  --map-stage:  #f3efe6;
  --cell:       #d8d2c4;
  --cell-line:  #c3bcaa;
  --cell-target:#ece5d6;
}

* { box-sizing: border-box; }

/* A class selector like `.legend { display: flex }` outranks the UA's
   `[hidden] { display: none }`, so anything hidden from JS stays on screen.
   This is the defensive fix; without it every toggle in the page silently fails. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  /* faint survey grid, so the page itself reads as plotted land */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--text);
  font: 16px/1.6 ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }

/* -------------------------------------------------------------- topbar */

.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 12px; padding-bottom: 12px;
}
.brand { font-size: 15px; letter-spacing: .2px; }
.topbar__right { display: flex; align-items: center; gap: 14px; }
.topbar__note { font-size: 12px; color: var(--muted); }
#theme-toggle { letter-spacing: .06em; font-size: 11px; padding: 6px 10px; }

/* ---------------------------------------------------------------- hero */

.hero { padding: 56px 0 28px; }
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 6vw, 50px);
  line-height: 1.1; letter-spacing: -.02em;
}
.hl { color: var(--gold); font-variant-numeric: tabular-nums; }
.lede { margin: 0; max-width: 60ch; color: var(--muted); font-size: 17px; }

/* --------------------------------------------------------------- panels */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 0 0 20px;
}
.panel--quiet { background: transparent; }
.panel h2 {
  margin: 0 0 16px;
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted);
}
.panel h3 { margin: 0; font-size: 15px; }
.panel__lede { margin: -6px 0 20px; color: var(--muted); max-width: 62ch; }

/* ---------------------------------------------------------------- forms */

.buy-form {
  display: grid;
  grid-template-columns: 150px 1fr 1fr auto;
  gap: 12px; align-items: end;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12px; color: var(--muted); }
.tz, .opt {
  font-size: 10px; padding: 1px 5px; border-radius: 4px;
  background: var(--panel-2); border: 1px solid var(--line);
}
.tz { color: var(--gold); }

input[type="date"], input[type="number"], input[type="text"], select {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit; font-size: 15px;
  min-width: 0; width: 100%;
}
input:focus, select:focus, button:focus-visible, label.btn:focus-within {
  outline: 2px solid var(--gold); outline-offset: 1px;
}
.combo { display: flex; gap: 8px; }
.combo select { width: 88px; flex: none; }

.btn {
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 16px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn--primary { background: var(--gold-solid); border-color: var(--gold-solid); color: var(--on-gold); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { font-weight: 500; font-size: 13px; padding: 7px 12px; }
.btn--danger:hover { border-color: var(--red); color: var(--red); }

.quick {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted);
}
.chip {
  font: inherit; font-size: 13px;
  background: transparent; border: 1px dashed var(--line);
  color: var(--muted); border-radius: 999px; padding: 4px 12px; cursor: pointer;
}
.chip:hover { border-color: var(--gold); color: var(--gold); border-style: solid; }

/* --------------------------------------------------------------- banners */

.flash {
  border: 1px solid var(--green); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 16px; font-size: 14px;
  background: var(--ok-bg);
}
.flash.is-error { border-color: var(--red); background: var(--err-bg); }
.banner {
  border: 1px dashed var(--gold-dim); border-radius: 8px;
  background: var(--gold-bg);
  padding: 10px 14px; margin-bottom: 16px; font-size: 14px; color: var(--muted);
}
.banner strong { color: var(--gold); }

/* ---------------------------------------------------------------- ledger */

.ledger-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin: 28px 0 10px;
  padding-top: 20px; border-top: 1px solid var(--line);
}
.ledger-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Wide content scrolls inside its own box; the page body never scrolls sideways. */
.table-scroll { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); font-weight: 600;
  padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.ledger td { padding: 10px; border-bottom: 1px solid var(--rule); }
.ledger .num { text-align: right; font-variant-numeric: tabular-nums; }
.ledger .note { color: var(--muted); max-width: 220px; }
.ledger .empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.muted { color: var(--muted); font-weight: 400; }
.link-btn {
  background: none; border: 0; color: var(--muted);
  font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline;
}
.link-btn:hover { color: var(--red); }

/* ----------------------------------------------------------------- total */

.total { text-align: center; padding: 8px 0 24px; }
.total__btc {
  font-size: clamp(40px, 10vw, 68px); font-weight: 700;
  letter-spacing: -.03em; line-height: 1;
  color: var(--gold); font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.total__btc .unit { font-size: .35em; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.total__sats { color: var(--muted); font-size: 14px; margin-top: 8px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ tier */

.tier {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.tier__badge { font-size: 38px; line-height: 1; }
.tier__body { flex: 1; min-width: 0; }
.tier__name { font-size: 20px; font-weight: 700; }
.tier__blurb { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.tier__next { font-size: 12px; margin-top: 6px; }
.bar { height: 7px; background: var(--track); border-radius: 999px; overflow: hidden; }
.bar__fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 999px; transition: width .6s cubic-bezier(.2,.8,.2,1);
}

.badges {
  list-style: none; display: flex; flex-wrap: wrap;
  gap: 8px; padding: 0; margin: 0 0 22px;
}
.badge {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  font-variant-numeric: tabular-nums;
}
.badge__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line);
}
.badge.is-hit { color: var(--gold); border-color: var(--gold-dim); background: var(--gold-bg); }
.badge.is-hit .badge__dot { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

/* ----------------------------------------------------------------- stats */

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
}
.stat--hero { border-color: var(--gold-dim); }
.stat__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted); margin-bottom: 8px;
}
.stat__value {
  font-size: 34px; font-weight: 700; line-height: 1.1;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.stat--hero .stat__value { color: var(--gold); }
.stat__value--small { font-size: 22px; }
.stat__sub { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ------------------------------------------------------ board + RPG HUD */

.viewtabs { display: inline-flex; gap: 0; margin-bottom: 14px; }
.viewtab {
  font: inherit; font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 7px 16px; cursor: pointer;
  background: var(--panel-2); color: var(--muted);
  border: 1px solid var(--line);
}
.viewtab:first-child { border-radius: 8px 0 0 8px; }
.viewtab:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.viewtab.is-on { background: var(--gold-solid); border-color: var(--gold-solid); color: var(--on-gold); }

.board {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* A cool slate backdrop so the orange reads as light rather than as paint. */
  background: var(--board-bg);
  overflow: hidden;
  height: clamp(360px, 62vw, 560px);
}
#iso-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#iso-canvas:active { cursor: grabbing; }
#iso-canvas:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

/* The HUD floats over the board and never intercepts a drag. */
.hud {
  position: absolute; pointer-events: none;
  font-variant-numeric: tabular-nums;
  text-shadow: var(--hud-shadow);
}
.hud--tl { top: 12px; left: 12px; }
.hud--tr { top: 10px; right: 14px; text-align: right; }
.hud--br { bottom: 46px; right: 14px; text-align: right; }
.hud--bl { bottom: 46px; left: 14px; }

.hud__clock {
  font-size: 15px; font-weight: 700; color: var(--text);
  letter-spacing: .06em;
}
.hud__update {
  font-size: 10px; color: var(--hud-muted);
  letter-spacing: .07em; margin-top: 2px;
}

.persona {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  background: var(--plate-bg);
  border: 1px solid var(--plate-line); border-left: 3px solid var(--gold);
  border-radius: 4px; padding: 5px 16px 5px 8px;
}
.persona__icon { font-size: 19px; line-height: 1; }
.persona__text { display: flex; flex-direction: column; line-height: 1.25; }
.persona__name { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--plate-name); }
.persona__sub { font-size: 9px; letter-spacing: .09em; color: var(--plate-sub); }

/* The big number, in the reference's serif display style. */
.hud__btc {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 6.5vw, 52px); font-weight: 700;
  color: var(--hud-strong); line-height: 1; letter-spacing: -.01em;
  text-shadow: var(--hud-shadow-big);
}
.hud__unit {
  font-size: .38em; color: var(--gold);
  margin-left: .28em; letter-spacing: .06em; font-family: inherit;
}
.hud__sats { font-size: 10px; color: var(--hud-muted); letter-spacing: .08em; margin-top: 3px; }

.hud__row { display: flex; align-items: baseline; justify-content: flex-end; gap: 10px; }
.hud__k { font-size: 9px; letter-spacing: .12em; color: var(--hud-muted); }
.hud__v { font-size: 16px; font-weight: 700; color: var(--text); }
.hud__v--gold { color: var(--gold); }

.hud__unlocked { font-size: 11px; color: var(--hud-soft); letter-spacing: .04em; }
.hud__inview { font-size: 10px; color: var(--hud-muted); letter-spacing: .05em; margin-top: 2px; }

/* Bottom gauge, after the reference's BONUS GAUGE. */
.gauge {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  display: flex; align-items: center; gap: 10px;
  pointer-events: none;
  background: var(--gauge-bg);
  border: 1px solid var(--gauge-line); border-radius: 999px;
  padding: 5px 14px;
}
.gauge__label { font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--gauge-label); white-space: nowrap; }
.gauge__track { flex: 1; height: 8px; background: var(--gauge-track); border-radius: 999px; overflow: hidden; }
.gauge__fill {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gauge-from), var(--gold-solid), var(--gauge-to));
  border-radius: 999px; transition: width .5s cubic-bezier(.2,.8,.2,1);
}
.gauge__val { font-size: 11px; font-weight: 700; color: var(--gauge-val); white-space: nowrap; }

/* ------------------------------------------------------- tooltip + legend */

.tip {
  position: absolute; z-index: 5; pointer-events: none;
  min-width: 210px; max-width: 300px;
  background: var(--tip-bg);
  border: 1px solid var(--gold-dim); border-radius: 8px;
  padding: 11px 13px;
  box-shadow: var(--tip-shadow);
  font-size: 12px; line-height: 1.45; color: var(--text);
}
.tip__head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .1em; color: var(--muted);
}
.tip__head--gold { color: var(--gold); }
.tip__head b { color: inherit; }
.tip__icon { font-size: 20px; }
.tip__sub { font-size: 10px; letter-spacing: .06em; color: var(--muted); }
.tip__big {
  font-family: Georgia, serif; font-size: 24px; font-weight: 700;
  color: var(--gold); margin: 6px 0 1px; line-height: 1;
}
.tip__big span { font-size: .45em; color: var(--muted); }
.tip__p { margin: 8px 0 0; color: var(--hud-soft); font-size: 11.5px; }
.tip__p b { color: var(--gold); }
.tip__tbl { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 11px; }
.tip__tbl th {
  text-align: left; font-weight: 500; color: var(--muted);
  padding: 2px 0; white-space: nowrap;
}
.tip__tbl td { text-align: right; padding: 2px 0; font-variant-numeric: tabular-nums; }
.tip__empty { text-align: center !important; color: var(--muted); padding: 8px 0 !important; }

/* ------------------------------------------------------------ wallet button */

/* Three states, and the dot carries the meaning so it reads at a glance without
   depending on colour alone: hollow = not connected, amber = wrong network,
   green = live. */
.btn--wallet {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .04em; padding: 6px 12px;
  font-variant-numeric: tabular-nums;
}
.wallet-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--muted); background: transparent;
}
.btn--wallet[data-state="on"]   .wallet-dot { background: var(--green); border-color: var(--green); }
.btn--wallet[data-state="warn"] .wallet-dot { background: var(--gold-solid); border-color: var(--gold-solid); }
.btn--wallet[data-state="warn"] { border-color: var(--gold-dim); color: var(--gold); }
.wallet-bal { color: var(--muted); font-size: 11px; }
.btn--wallet[data-state="idle"] .wallet-bal { display: none; }

/* ------------------------------------------------------------------- modal */

.modal { position: fixed; inset: 0; z-index: 60; display: flex;
         align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none !important; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.modal__panel {
  position: relative; width: 100%; max-width: 380px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--tip-shadow);
}
.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal__head h2 { margin: 0; font-size: 16px; }
.modal__x {
  background: transparent; border: 0; color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.modal__x:hover { color: var(--text); }
.modal__note { margin: 14px 0 0; font-size: 11px; color: var(--muted); line-height: 1.5; }

.wallet-list { display: flex; flex-direction: column; gap: 8px; }
.wallet-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 13px; cursor: pointer; text-align: left;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 9px; color: var(--text); font-size: 13px; font-weight: 600;
}
.wallet-row:hover { border-color: var(--gold-dim); }
.wallet-row img { width: 26px; height: 26px; border-radius: 6px; flex: none; }
.wallet-row .rdns { margin-left: auto; font-size: 10px; color: var(--muted); font-weight: 400; }
.wallet-none { text-align: center; padding: 10px 0; font-size: 13px; }
.wallet-none p { margin: 0 0 6px; }

.acct-tbl { margin-bottom: 14px; }
.acct-actions { display: flex; gap: 8px; }
.acct-actions .btn { flex: 1; text-align: center; font-size: 12px; }
.btn--sm { padding: 4px 10px; font-size: 11px; }

/* Claim progress. Sits over the board, bottom-centre, out of the HUD's way. */
.arc-toast {
  position: absolute; z-index: 6; left: 50%; bottom: 14px;
  transform: translateX(-50%);
  max-width: min(440px, calc(100% - 32px));
  background: var(--arc-toast-bg);
  border: 1px solid var(--gold-dim); border-radius: 8px;
  padding: 9px 14px;
  box-shadow: var(--tip-shadow);
  font-size: 12px; line-height: 1.45; color: var(--text);
  text-align: center;
}
.arc-toast[hidden] { display: none; }

.legend {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  font-size: 12px; color: var(--muted);
}
.legend li { display: flex; align-items: center; gap: 8px; }
.legend b { color: var(--text); font-weight: 600; }
.legend__hint { color: var(--gold); font-style: italic; }
.key {
  width: 17px; height: 17px; flex: none; border-radius: 3px;
  transform: rotate(45deg) scale(.82);       /* read as a board tile, not a box */
}
.key--full { background: var(--gold-solid); border: 1px solid var(--key-full-line); }
.key--partial { background: var(--key-partial); border: 2px solid var(--gold-solid); }
.key--locked { background: var(--key-locked); border: 1px solid var(--key-locked-line); }
/* Deeds claimed on Arc. Cool on purpose — gold means Bitcoin you own, and a
   deed says nothing about anybody's holdings, so the two must never blur. */
.key--deed { background: var(--key-deed); border: 1px solid var(--key-deed-line); }
.key--deed-mine { background: var(--key-deed-mine); border: 2px solid var(--key-deed-mine-line); }

.tip__addr { font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: 10.5px; }
.tip__click {
  margin: 9px 0 0; padding-top: 8px; border-top: 1px solid var(--line);
  font-size: 10.5px; letter-spacing: .05em; color: var(--gold);
}

/* --------------------------------------------------------- whale list */

.whales { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.whales__h { margin: 0 0 8px; font-size: 15px; }
.whales__lede { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; max-width: 70ch; }
.whales__src { margin: 12px 0 0; font-size: 11px; color: var(--muted); }

.wl { list-style: none; margin: 0; padding: 0; }
.wl__row {
  display: grid;
  grid-template-columns: 26px 12px minmax(0, 1fr) 84px 92px 62px 92px;
  align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--rule-2);
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.wl__rank { color: var(--muted); font-size: 11px; text-align: right; }
.wl__sw { width: 12px; height: 12px; border-radius: 2px; transform: rotate(45deg) scale(.8); }
.wl__name {
  color: var(--text); text-decoration: none; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wl__name:hover { color: var(--gold); text-decoration: underline; }
.wl__kind { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.wl__btc { text-align: right; font-weight: 600; }
.wl__pct { text-align: right; color: var(--muted); font-size: 12px; }
.wl__usd { text-align: right; color: var(--gold); font-size: 12px; }

@media (max-width: 700px) {
  .wl__row { grid-template-columns: 22px 12px minmax(0,1fr) 88px; gap: 8px; }
  .wl__kind, .wl__pct, .wl__usd { display: none; }
}

.viewtabs--sm .viewtab { padding: 6px 12px; font-size: 11px; }

.board__bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.zoomer { display: inline-flex; align-items: center; gap: 8px; }
.zoomer__label { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) { .gauge__fill { transition: none; } }

@media (max-width: 620px) {
  .hud--br, .hud--bl { bottom: 42px; }
  .hud__inview { display: none; }
  .persona { padding-right: 10px; }
}

/* ----------------------------------------------------------------- globe */

.globe {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--globe-bg);
  overflow: hidden;
  /* Tall enough that a tilted horizon has somewhere to sit, but never so tall it
     pushes the controls off a phone screen. */
  height: clamp(320px, 56vw, 520px);
}
#globe-canvas {
  display: block;
  width: 100%; height: 100%;
  cursor: grab;
  touch-action: none;          /* the canvas handles its own drag and pinch */
}
#globe-canvas:active { cursor: grabbing; }
#globe-canvas:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.globe__hud {
  position: absolute; left: 12px; bottom: 12px; right: 12px;
  font-size: 12px; color: var(--muted);
  background: var(--globe-hud-bg);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.globe__bar {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 10px; margin-top: 14px;
}
.globe__hint { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------------- map */

.map { text-align: center; }
.map__stage {
  max-width: 460px; margin: 0 auto 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--map-stage); padding: 10px; overflow: hidden;
}
.map__stage svg { display: block; width: 100%; height: auto; }

/* Each level "lands" by easing out of a zoom, so consecutive frames read as one
   continuous descent rather than as separate pictures. */
.map__stage.is-zooming svg { animation: land .9s cubic-bezier(.16,.9,.3,1); }
@keyframes land {
  from { transform: scale(2.6); opacity: .15; }
  to   { transform: scale(1);   opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .map__stage.is-zooming svg { animation: none; }
  .bar__fill { transition: none; }
}

.cell { fill: var(--cell); stroke: var(--cell-line); stroke-width: .25; }
.cell--mine    { fill: var(--gold-solid); stroke: var(--gold-solid); }
.cell--partial { fill: var(--gold-dim); stroke: var(--gold); }
.cell--target  { fill: var(--cell-target); stroke: var(--gold); stroke-width: .6; stroke-dasharray: 1.5 1.2; }

.map__caption { color: var(--muted); font-size: 14px; margin: 0 0 6px; min-height: 44px; }
.map__caption strong { color: var(--text); }
.map__found { color: var(--gold); font-size: 14px; margin: 0 0 14px; }

/* ------------------------------------------------------------------- faq */

.faq { margin: 0; }
.faq dt { font-weight: 600; margin-top: 16px; }
.faq dd { margin: 4px 0 0; color: var(--muted); max-width: 66ch; }
.faq code {
  background: var(--panel-2); border: 1px solid var(--line);
  padding: 1px 5px; border-radius: 4px; font-size: 13px;
}

.footer { padding: 30px 20px 50px; color: var(--muted); font-size: 13px; text-align: center; }
.footer a { color: var(--muted); }

/* ------------------------------------------------------------- responsive */

@media (max-width: 700px) {
  .buy-form { grid-template-columns: 1fr 1fr; }
  .field--note { grid-column: 1 / -1; }
  .buy-form > .btn { grid-column: 1 / -1; }
  .stats { grid-template-columns: 1fr; }
  .hero { padding: 36px 0 20px; }
  .panel { padding: 18px; }
  .topbar__note { display: none; }
}
