/* Shared site styles: tokens, type, nav, footer, buttons, labels, tables. Landing-only rules live in landing.css. */
:root {
  /* Eden at dawn: sky mist, navy ink, coral action, ocean, leaf and gold accents. */
  --paper: #eef4f8;
  --paper-2: #ffffff;
  --paper-3: #dce7ef;
  --ink: #12203a;
  --ink-2: #4b5a74;
  --ink-3: #8794aa;
  --line: rgba(18, 32, 58, .12);
  --line-2: rgba(18, 32, 58, .2);
  --sun: #f2994a;
  --sun-ink: #a85a12;
  --coral: #e4623b;
  --sea: #2372a3;
  --leaf: #1c7a5f;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 8px;
  --wrap: 1200px;
  --gut: 32px;
  --nav-h: 64px;
}
@media (max-width: 720px) { :root { --gut: 16px; --nav-h: 56px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
code, .mono { font-family: var(--mono); }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

/* Gradient headline (Inter 700, tight, ink to grey) */
.grad {
  background: linear-gradient(180deg, #12203a 0%, #12203a 30%, #2372a3 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.display { font-weight: 700; letter-spacing: -0.06em; line-height: .9; }

/* Mono label / kicker */
.label, .kicker {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.kicker { color: var(--sea); }
.kicker { display: block; margin-bottom: 14px; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }

/* Buttons: 8px rectangles. Ink fill, or hairline ghost. Never pills. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: var(--r);
  border: 1px solid var(--coral);
  background: var(--coral); color: #fff;
  font: 500 14px/1 var(--sans); letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: #cc5230; border-color: #cc5230; }
.btn-primary { /* alias of the default ink button */ }
.btn-ghost { background: rgba(255, 255, 255, .6); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: #fff; border-color: var(--ink); }
.btn-sun { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.btn-sun:hover { background: #e0873a; border-color: #e0873a; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn[disabled], .btn.is-off { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  height: var(--nav-h);
  background: rgba(238, 244, 248, .92);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-over .nav { position: fixed; left: 0; right: 0; background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.nav-over.scrolled .nav { background: rgba(238, 244, 248, .86); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.nav-in { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; max-width: 1440px; margin: 0 auto; padding: 0 var(--gut); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 16px; letter-spacing: -0.03em; justify-self: start; }
.brand-mark { width: 22px; height: 22px; flex: none; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: var(--r); text-decoration: none; font-size: 14px; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); background: rgba(18, 32, 58, .05); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-cta { display: flex; gap: 8px; justify-self: end; align-items: center; }
.nav-cta .btn { height: 36px; }
.burger { display: none; width: 40px; height: 36px; border: 1px solid var(--line-2); border-radius: var(--r); background: transparent; cursor: pointer; padding: 0; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform .2s; }
.burger span:first-child { top: 13px; } .burger span:last-child { bottom: 13px; }
.menu-open .burger span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .burger span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
.drawer { position: fixed; z-index: 9; top: var(--nav-h); left: 0; right: 0; background: var(--paper-2); border-bottom: 1px solid var(--line); padding: 8px var(--gut) 20px; display: grid; gap: 2px; }
.drawer[hidden] { display: none; }
.drawer a { padding: 12px 0; text-decoration: none; font-size: 18px; font-weight: 500; letter-spacing: -0.02em; border-bottom: 1px solid var(--line); }
.drawer .btn { margin-top: 14px; font-size: 15px; height: 44px; border-bottom: 1px solid var(--ink); }
.drawer .btn-ghost { border-color: var(--line-2); }
.find { display: flex; gap: 8px; margin-top: 14px; }
.find input { flex: 1; min-width: 0; }
@media (max-width: 860px) {
  .nav-in { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .nav-cta .hide-sm { display: none; }
  .burger { display: block; }
}
@media (max-width: 420px) { .nav-cta .btn { padding: 0 12px; font-size: 13px; } }

/* Inputs */
input[type="text"], input:not([type]), input[type="search"], input[type="number"], select, textarea {
  height: 40px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--paper-2); color: var(--ink);
  font: 400 14px/1 var(--sans);
}
textarea { height: auto; padding: 10px 12px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--paper); position: relative; z-index: 2; }
.foot-in { max-width: 1440px; margin: 0 auto; padding: 40px var(--gut) 48px; display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: start; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.03em; font-size: 15px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-links a { text-decoration: none; font-size: 14px; color: var(--ink-2); }
.foot-links a:hover { color: var(--ink); }
.foot-ca { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.foot-ca a:not(.btn) { font: 400 12px/1.4 var(--mono); color: var(--ink-2); word-break: break-all; text-decoration: none; }
.foot-ca a:not(.btn):hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 640px) { .foot-in { grid-template-columns: 1fr; } }

/* Token box: CA to copy + buy */
.token { display: grid; gap: 10px; }
.token-label { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.token-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.token-ca { min-width: 0; flex: 1 1 280px; display: flex; align-items: center; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper-2); text-decoration: none; overflow: hidden; }
.token-ca code { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.token-ca:hover { border-color: var(--ink); }

/* Addresses */
.addr { font: 400 12.5px/1.4 var(--mono); color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); word-break: break-all; }
.addr:hover { border-bottom-color: var(--ink); }
.sub { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-left: 6px; text-decoration: none; }
.sub:hover { color: var(--ink); }

/* Hairline tables */
.tbl-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--ink); background: var(--paper-2); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 500 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding: 12px 16px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom-color: var(--line-2); }
.tbl td:last-child, .tbl th:last-child { padding-right: 0; }
.empty { padding: 22px 0; margin: 0; color: var(--ink-2); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); font-size: 14px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border-top: 1px solid var(--ink); }
.stat { padding: 18px 20px 18px 0; border-bottom: 1px solid var(--line); }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat-v { font-size: 28px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; word-break: break-word; }
.stat-l { margin-top: 6px; font: 500 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat, .stat + .stat { padding: 14px 12px 14px 0; border-left: 0; }
  .stat:nth-child(2n) { padding-left: 12px; border-left: 1px solid var(--line); }
  .stat-v { font-size: 22px; }
}

/* Messages */
.msg { font-size: 14px; color: var(--ink-2); min-height: 1.4em; margin: 8px 0 0; }
.msg.ok { color: var(--leaf); }
.msg.err { color: #b33a1c; }
.msg.warn { color: var(--sun-ink); }

/* ---------- App pages: still paper, header band, hairline sections ---------- */
.app-main { min-height: 60vh; }
.band { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: linear-gradient(100deg, #e3eef7 0%, #eef2f5 55%, #fbe6d4 100%); }
.band-dots { position: absolute; inset: 0; background: url(/static/band.svg) right bottom / auto 100% no-repeat; opacity: .92; pointer-events: none; }
.band-dots::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #e3eef7 0%, rgba(227, 238, 247, .85) 30%, rgba(227, 238, 247, 0) 60%); }
.band-in { position: relative; min-height: clamp(240px, 26vw, 340px); display: flex; flex-direction: column; justify-content: flex-end; padding-top: 48px; padding-bottom: 36px; }
.band-title { font-size: clamp(52px, 7.2vw, 108px); letter-spacing: -0.06em; line-height: .9; padding-bottom: .06em; max-width: 14ch; word-break: break-word; }
.band-title.sm { font-size: clamp(40px, 5.4vw, 80px); max-width: none; }
.band-sub { margin: 18px 0 0; max-width: 560px; font-size: 16px; color: var(--ink-2); }
.band-sub .addr { font-size: 12.5px; }
@media (max-width: 720px) {
  .band-dots { opacity: .55; background-size: auto 44%; background-position: right 12px; }
  .band-dots::after { display: none; }
  .band-in { min-height: 220px; padding-top: 40px; padding-bottom: 28px; }
}

.sheet { padding-top: 16px; padding-bottom: 96px; }
.card { display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: 48px; padding: 44px 0; border-top: 1px solid var(--line); }
.sheet > .card:first-child, .sheet > .stats + .card { border-top: 0; }
.card > * { grid-column: 2; min-width: 0; }
.card > h2 { grid-column: 1; grid-row: 1 / span 20; align-self: start; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 16px; }
.card > p { color: var(--ink-2); max-width: 70ch; }
.card > p.empty { max-width: none; }
.card > p:last-child { margin-bottom: 0; }
.card .stats { margin-bottom: 20px; }
.card .row { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.card.center { display: block; text-align: left; border-top: 0; padding-top: 56px; }
.card.center p { font-size: 18px; color: var(--ink); }
@media (max-width: 860px) {
  .card { grid-template-columns: 1fr; padding: 32px 0; }
  .card > *, .card > h2 { grid-column: 1; grid-row: auto; }
}
.sheet > .stats { margin: 40px 0 8px; }
.small { font-size: 13px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.text-link::after { content: '\2192'; }
.note, .warn { padding: 12px 14px; margin: 0 0 16px; border-radius: var(--r); background: var(--paper-2); border: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.warn { border-color: rgba(242, 153, 74, .6); background: rgba(242, 153, 74, .12); }
.feed { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.feed li { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed time { font: 400 12px/1.6 var(--mono); color: var(--ink-3); white-space: nowrap; }
@media (max-width: 640px) { .feed li { flex-direction: column; gap: 4px; } }
.card code { font-size: 12.5px; word-break: break-all; }
.link-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.link-form input { flex: 1 1 320px; font-family: var(--mono); font-size: 13px; }

/* ---------- Map ---------- */

.map-wrap { padding-top: 32px; padding-bottom: 32px; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.map-frame { background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.map-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.lg { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.sw { position: relative; width: 12px; height: 12px; display: inline-block; flex: none; }
.sw::after { content: ''; position: absolute; left: 50%; top: 50%; border-radius: 50%; background: var(--leaf); transform: translate(-50%, -50%); }
.sw-common::after { width: 4px; height: 4px; }
.sw-rare::after { width: 7px; height: 7px; background: var(--sea); }
.sw-landmark::after { width: 11px; height: 11px; background: var(--coral); }
.sw-owned { background: var(--ink); border-radius: 2px; }
.sw-mine { background: var(--sun); border-radius: 2px; }
.sw-pick { background: var(--coral); border-radius: 2px; }
.sw-pick::after { width: 4px; height: 4px; background: #fff; }
.sw-owned::after, .sw-mine::after { display: none; }
.map-box { position: relative; overflow: auto; -webkit-overflow-scrolling: touch; padding: clamp(14px, 2.4vw, 32px); }
#map { width: 100%; max-width: 820px; height: auto; margin: 0 auto; cursor: crosshair; touch-action: manipulation; }
.tip { position: absolute; z-index: 3; pointer-events: none; background: var(--ink); color: var(--paper-2); font: 400 12px/1.3 var(--mono); padding: 7px 10px; border-radius: 6px; white-space: nowrap; }
.tile-info { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.tile-info[hidden] { display: none; }
.panel { position: sticky; top: calc(var(--nav-h) + 24px); background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.panel h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.04em; margin-bottom: 10px; }
.panel > p { font-size: 14px; color: var(--ink-2); }
.panel .row { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 0; }
.panel .row .btn { flex: 1 1 auto; }
.kv { margin: 18px 0 0; border-top: 1px solid var(--line); }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv .label { color: var(--ink-3); }
.kv b { font-weight: 600; font-variant-numeric: tabular-nums; }
.kv a { font: 400 13px/1 var(--mono); }
.kv[hidden] { display: none; }
.map-owners { padding-top: 24px; padding-bottom: 96px; }
.map-owners .card { border-top: 1px solid var(--line); }
@media (max-width: 1000px) {
  .map-layout { grid-template-columns: 1fr; }
  .panel { position: static; }
}
@media (max-width: 720px) {
  .map-box { max-height: 70vh; padding: 12px; }
  #map { width: 900px; max-width: none; }
  .map-wrap { padding-top: 20px; }
}

/* 3D map */
.map-3d { position: relative; height: clamp(460px, 68vh, 760px); background: linear-gradient(180deg, #cbe1f2 0%, #e9eef2 55%, #fbe3ce 100%); overflow: hidden; touch-action: none; }
.map-3d[hidden], .map-box[hidden] { display: none; }
.map-3d canvas { width: 100%; height: 100%; max-width: none; cursor: grab; }
.map-3d canvas:active { cursor: grabbing; }
.map-3d-hint { position: absolute; left: 14px; bottom: 12px; margin: 0; padding: 6px 9px; border-radius: 6px; background: rgba(255, 255, 255, .8); font: 500 10.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); pointer-events: none; }
.view-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: #fff; }
.view-switch[hidden] { display: none; }
.view-switch button { appearance: none; border: 0; background: transparent; cursor: pointer; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); padding: 9px 14px; }
.view-switch button + button { border-left: 1px solid var(--line-2); }
.view-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
@media (max-width: 720px) { .map-3d { height: 62vh; } .map-3d-hint { font-size: 9.5px; } }
