/* DEV GRAVEYARD — night palette, pixel bevels, two pixel fonts. */
:root {
  color-scheme: dark;
  --bg: #07061a;
  --bg2: #0d0a24;
  --panel: #110d2c;
  --panel2: #171238;
  --line: #2c255a;
  --edge: #050412;
  --ink: #efeafc;
  --muted: #a49ed0;
  --dim: #6f6a9a;
  --gold: #f7cb45;
  --gold-hi: #fff1a6;
  --gold-lo: #a8701a;
  --red: #ff5c7a;
  --red-lo: #9c2442;
  --green: #9fe266;
  --violet: #a39be8;
  --moon: #efebdc;
  --display: 'Press Start 2P', ui-monospace, monospace;
  --body: 'Pixelify Sans', ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(83, 52, 140, 0.35), transparent 70%),
    radial-gradient(900px 600px at 0% 30%, rgba(34, 24, 90, 0.35), transparent 70%),
    var(--bg);
  color: var(--ink);
  font: 400 17px/1.45 var(--body);
  overflow-x: hidden;
}
a { color: inherit; }
img.px, canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.86em; letter-spacing: -0.01em; }

/* ---------------------------------------------------------------- CA bar */
.cabar {
  position: relative;
  z-index: 30;
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 6px 12px;
  background: linear-gradient(90deg, #2a1550, #3b1a5a 50%, #2a1550);
  border-bottom: 3px solid var(--edge);
  font: 10px/1.6 var(--display);
  color: var(--gold-hi);
}
.cabar .sym { color: var(--gold); }
.cabar .addr { font: 13px/1.3 ui-monospace, Menlo, Consolas, monospace; color: var(--ink); overflow-wrap: anywhere; max-width: 100%; }
.cabar .btn { padding: 6px 9px; font-size: 9px; }

/* ---------------------------------------------------------------- header */
.top {
  position: relative; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 0;
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo img { width: 32px; height: 32px; image-rendering: pixelated; filter: drop-shadow(3px 3px 0 var(--edge)); }
.logo b { font: 13px/1.2 var(--display); color: var(--gold); text-shadow: 3px 3px 0 var(--edge); letter-spacing: 0.02em; }
.logo b i { font-style: normal; color: var(--ink); }
.top nav { display: flex; gap: 18px; margin-left: auto; font: 10px/1 var(--display); }
.top nav a { color: var(--muted); text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.top nav a:hover { color: var(--ink); border-bottom-color: var(--violet); }
.top nav .count { color: var(--gold); }
.top .mini-search { margin-left: auto; display: flex; gap: 8px; flex: 0 1 430px; min-width: 0; }
.top .mini-search input { min-width: 0; }

/* ---------------------------------------------------------------- buttons + inputs */
.btn {
  --b: var(--gold); --hi: #fff0a8; --lo: #a8701a; --fg: #1b1030;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 14px;
  font: 11px/1 var(--display);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  background: var(--b);
  border: 0; border-radius: 0;
  box-shadow: inset -3px -3px 0 var(--lo), inset 3px 3px 0 var(--hi), 0 0 0 3px var(--edge);
  margin: 3px;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: transform 0.06s, filter 0.12s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(2px); box-shadow: inset 3px 3px 0 var(--lo), inset -3px -3px 0 var(--hi), 0 0 0 3px var(--edge); }
.btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }
.btn[disabled] { filter: grayscale(0.8) brightness(0.7); cursor: default; }
.btn.ghost { --b: #1f1950; --hi: #383080; --lo: #120e33; --fg: var(--ink); }
.btn.red { --b: #e2486a; --hi: #ff8ca3; --lo: #8f1f3b; --fg: #fff; }
.btn.green { --b: #6fc24a; --hi: #b7f08c; --lo: #2f7a2a; --fg: #0c1a08; }
.btn.on { --b: #6fc24a; --hi: #b7f08c; --lo: #2f7a2a; --fg: #0c1a08; }
.btn .ico { width: 12px; height: 12px; image-rendering: pixelated; }

.field {
  width: 100%;
  padding: 15px 14px;
  font: 16px/1.2 ui-monospace, Menlo, Consolas, monospace;
  color: var(--ink);
  background: #0a0820;
  border: 0; border-radius: 0;
  box-shadow: inset 3px 3px 0 #04030c, inset -3px -3px 0 #2a2360, 0 0 0 3px var(--edge);
  margin: 3px;
  outline: none;
}
.field::placeholder { color: var(--dim); font-family: var(--body); }
.field:focus { box-shadow: inset 3px 3px 0 #04030c, inset -3px -3px 0 #2a2360, 0 0 0 3px var(--violet); }

/* ---------------------------------------------------------------- panels */
.panel {
  position: relative;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  box-shadow: 0 0 0 3px var(--line), 0 0 0 6px var(--edge), 0 14px 0 6px rgba(0, 0, 0, 0.35);
  margin: 6px;
  padding: 18px 18px 16px;
}
.panel h2 {
  margin: 0 0 4px;
  font: 14px/1.4 var(--display);
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--edge);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.panel .sub { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font: 9px/1 var(--display); color: var(--red); text-shadow: none; }
.live-dot::before { content: ''; width: 8px; height: 8px; background: var(--red); box-shadow: 0 0 0 2px #4d1020; animation: blink 1.2s steps(2) infinite; }
.live-dot.off { color: var(--dim); }
.live-dot.off::before { background: var(--dim); animation: none; box-shadow: none; }
@keyframes blink { 50% { opacity: 0.25; } }

.tabs { display: inline-flex; gap: 2px; margin-left: auto; }
.tabs button {
  font: 9px/1 var(--display); padding: 8px 10px; border: 0; cursor: pointer;
  color: var(--muted); background: #0b0922; box-shadow: inset 0 0 0 2px var(--line);
}
.tabs button[aria-selected='true'] { color: #1b1030; background: var(--gold); box-shadow: inset -2px -2px 0 var(--gold-lo), inset 2px 2px 0 var(--gold-hi); }

/* ---------------------------------------------------------------- hero (home) */
.hero { position: relative; height: clamp(540px, 74vh, 760px); overflow: hidden; border-bottom: 3px solid var(--edge); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero canvas.pointing { cursor: pointer; } /* a mouse over one of the teaser's stones */
.hero::after { /* vignette + left fade for the copy */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 4, 15, 0.86) 0%, rgba(5, 4, 15, 0.62) 38%, rgba(5, 4, 15, 0) 64%),
    radial-gradient(120% 90% at 60% 40%, transparent 55%, rgba(3, 2, 10, 0.65));
}
.hero .copy { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-bottom: 40px; pointer-events: none; }
/* text lets clicks through to the teaser behind it (a click on a stone opens it); only the controls catch them */
.hero .copy a, .hero .copy button, .hero .copy input, .hero .copy form, .hero .copy .top { pointer-events: auto; }
.kicker { font: 10px/1.6 var(--display); color: var(--violet); letter-spacing: 0.06em; margin: 0 0 14px; text-shadow: 2px 2px 0 var(--edge); }
.hero h1 {
  margin: 0 0 18px; max-width: 15ch;
  font: 34px/1.35 var(--display);
  color: var(--ink);
  text-shadow: 4px 4px 0 var(--edge), 0 0 30px rgba(120, 90, 220, 0.35);
}
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lede { margin: 0 0 22px; max-width: 46ch; color: #cfc9ef; font-size: 19px; text-shadow: 2px 2px 0 var(--edge); }
.search { display: flex; gap: 8px; align-items: stretch; max-width: 640px; }
.search .btn { padding-inline: 18px; }
.hint { margin: 10px 0 0 4px; color: var(--muted); font-size: 15px; text-shadow: 2px 2px 0 var(--edge); }
.hint a { color: var(--gold); }
.err { margin: 10px 0 0 4px; color: var(--red); font-size: 16px; min-height: 1.2em; text-shadow: 2px 2px 0 var(--edge); }
.teaser-tag {
  position: absolute; z-index: 3; right: 16px; bottom: 16px;
  display: flex; align-items: center; gap: 12px;
  max-width: min(520px, calc(100% - 32px));
  padding: 10px 12px;
  background: rgba(8, 6, 26, 0.86);
  box-shadow: 0 0 0 3px var(--line), 0 0 0 6px var(--edge);
  text-decoration: none;
  font-size: 15px;
}
.teaser-tag b { font: 9px/1.5 var(--display); color: var(--red); display: block; }
.teaser-tag .go { margin-left: auto; font: 10px/1 var(--display); color: var(--gold); white-space: nowrap; }
.teaser-tag:hover { box-shadow: 0 0 0 3px var(--gold), 0 0 0 6px var(--edge); }

/* ---------------------------------------------------------------- totals strip */
.strip { display: flex; flex-wrap: wrap; gap: 6px 28px; justify-content: center; padding: 18px 0 8px; color: var(--muted); font-size: 16px; }
.strip b { font: 13px/1 var(--display); color: var(--ink); margin-right: 6px; }
.strip .r b { color: var(--red); }
.strip .g b { color: var(--gold); }

/* ---------------------------------------------------------------- home grid */
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; padding: 22px 0 10px; align-items: start; }
.feed { list-style: none; margin: 0; padding: 0; max-height: 640px; overflow: hidden; position: relative; }
.feed li {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
  padding: 9px 6px; border-bottom: 2px solid #1a1540;
}
.feed li a.row { display: contents; color: inherit; text-decoration: none; }
.feed li:hover { background: #17123a; }
.feed .ico { width: 26px; height: 26px; grid-row: span 2; image-rendering: pixelated; }
.feed .line1 { font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .line1 .w { color: var(--violet); }
.feed .line1 .no { color: var(--ink); font-weight: 600; }
.feed .line2 { font-size: 14px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; grid-column: 2; }
.feed .ago { grid-row: span 2; font: 9px/1 var(--display); color: var(--dim); }
.feed li.serial .no { color: var(--red); }
.feed li.grad { background: linear-gradient(90deg, rgba(247, 203, 69, 0.12), transparent); }
.feed li.grad .no { color: var(--gold); }
.feed li.watched { box-shadow: inset 4px 0 0 var(--gold); }
.feed li.new { animation: dig 0.9s steps(6); }
@keyframes dig { 0% { background: rgba(247, 203, 69, 0.35); transform: translateY(-6px); } 100% { background: transparent; transform: none; } }
.tag { display: inline-block; font: 8px/1 var(--display); padding: 3px 5px 2px; margin-left: 6px; vertical-align: 2px; color: #fff; background: var(--red-lo); }
.tag.gold { color: #1b1030; background: var(--gold); }
.tag.green { color: #0c1a08; background: var(--green); }
.tag.violet { color: #120e30; background: var(--violet); }
.feed-empty { color: var(--muted); padding: 18px 4px; }

.board { width: 100%; border-collapse: collapse; }
.board th { font: 8px/1.2 var(--display); color: var(--dim); text-align: left; padding: 0 8px 8px; }
.board th.n, .board td.n { text-align: right; }
.board td { padding: 9px 8px; border-top: 2px solid #1a1540; vertical-align: middle; }
.board tr { cursor: pointer; }
.board tbody tr:hover { background: #17123a; }
.board .rank { font: 11px/1 var(--display); color: var(--dim); width: 36px; }
.board tr:nth-child(1) .rank { color: var(--red); }
.board tr:nth-child(2) .rank, .board tr:nth-child(3) .rank { color: var(--gold); }
.board .who a { color: var(--ink); text-decoration: none; font-size: 16px; }
.board .who .u { display: block; color: var(--muted); font-size: 13px; }
.board .cnt { font: 13px/1 var(--display); color: var(--ink); }
.board .bar { height: 4px; margin-top: 6px; background: linear-gradient(90deg, var(--red), #7d2a6c); min-width: 3px; }
.board .gr { font: 10px/1 var(--display); color: var(--dim); }
.board .gr.has { color: var(--gold); }
.board td.last { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* ---------------------------------------------------------------- how it works */
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding: 18px 0 8px; }
.how .panel { padding: 16px; }
.how h3 { margin: 0 0 8px; font: 11px/1.5 var(--display); color: var(--gold); }
.how p { margin: 0; color: var(--muted); font-size: 16px; }

.watchlist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.watchlist li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #0b0922; box-shadow: inset 0 0 0 2px var(--line); }
.watchlist a { color: var(--ink); text-decoration: none; }
.watchlist button { border: 0; background: none; color: var(--dim); font: 10px/1 var(--display); cursor: pointer; padding: 4px; }
.watchlist button:hover { color: var(--red); }

/* ---------------------------------------------------------------- graveyard page */
.devhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; align-items: end; padding: 14px 0 6px; }
.devhead .who { display: flex; gap: 14px; align-items: center; min-width: 0; }
.devhead .avatar { width: 56px; height: 56px; flex: none; background: #0b0922; box-shadow: 0 0 0 3px var(--line), 0 0 0 6px var(--edge); margin: 6px; image-rendering: pixelated; object-fit: cover; }
.devhead h1 { margin: 0; font: 20px/1.4 var(--display); color: var(--ink); text-shadow: 3px 3px 0 var(--edge); overflow-wrap: anywhere; }
.devhead h1 .u { color: var(--gold); }
.devhead .addr { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); min-width: 0; }
.devhead .addr code { font: 13px/1.3 ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.devhead .addr button { border: 0; background: none; padding: 2px 4px; color: var(--violet); font: 9px/1 var(--display); cursor: pointer; }
.devhead .verdict { display: inline-block; margin-top: 10px; font: 10px/1 var(--display); padding: 7px 9px 6px; color: #fff; background: var(--red-lo); box-shadow: 0 0 0 3px var(--edge); }
.devhead .verdict.ok { background: #2f7a2a; }
.devhead .verdict.wait { background: #3a3660; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin: 18px 6px 6px; box-shadow: 0 0 0 3px var(--line), 0 0 0 6px var(--edge); background: var(--panel); }
.stat { padding: 14px 14px 12px; border-right: 2px solid #1d1844; min-width: 0; }
.stat:last-child { border-right: 0; }
.stat .v { font: 20px/1.15 var(--display); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .k { margin-top: 8px; font: 8px/1.4 var(--display); color: var(--dim); text-transform: uppercase; }
.stat .s { margin-top: 4px; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* a line in pieces (under Buried: "1,153 traded," "1,234 unknown"): a piece that doesn't fit goes whole onto the
   next line, so a narrow tile shows two short lines instead of a cut-off one */
.stat .s.parts { white-space: normal; }
.stat .s.parts > span { display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.stat.red .v { color: var(--red); }
.stat.gold .v { color: var(--gold); }
.stat.green .v { color: var(--green); }
.status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 6px 10px; color: var(--muted); font-size: 16px; min-height: 52px; }
.status .digging { font: 10px/1.4 var(--display); color: var(--gold); }
.status .bar { flex: 1 1 160px; max-width: 280px; height: 8px; background: #0b0922; box-shadow: 0 0 0 2px var(--line); position: relative; overflow: hidden; }
.status .bar i { position: absolute; inset: 0 auto 0 0; width: 30%; background: repeating-linear-gradient(90deg, var(--gold) 0 6px, var(--gold-lo) 6px 8px); animation: dig-bar 1.2s steps(10) infinite; }
@keyframes dig-bar { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.status .note { color: var(--dim); font-size: 14px; }

.yard {
  position: relative;
  height: clamp(420px, 72vh, 860px);
  margin: 6px;
  box-shadow: 0 0 0 3px var(--line), 0 0 0 6px var(--edge), 0 16px 0 6px rgba(0, 0, 0, 0.35);
  background: #0a0820;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#cemetery { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; outline: none; }
#cemetery.dragging { cursor: grabbing; }
#cemetery.pointing { cursor: pointer; }
.yard::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(130% 100% at 50% 35%, transparent 60%, rgba(3, 2, 10, 0.55)); }
.yard .ctrl { position: absolute; z-index: 3; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 4px; }
.yard .ctrl button {
  width: 38px; height: 38px; border: 0; padding: 0; cursor: pointer;
  font: 14px/1 var(--display); color: var(--ink);
  background: rgba(17, 13, 44, 0.9);
  box-shadow: inset -2px -2px 0 #0b0922, inset 2px 2px 0 #3a3280, 0 0 0 3px var(--edge);
  margin: 3px;
}
.yard .ctrl button:hover { color: var(--gold); }
.yard .ctrl button.sm { font-size: 8px; letter-spacing: -0.04em; }
.legend { position: absolute; z-index: 3; left: 12px; bottom: 12px; display: flex; gap: 12px; flex-wrap: wrap; padding: 8px 10px; background: rgba(8, 6, 26, 0.82); box-shadow: 0 0 0 3px var(--edge); font-size: 14px; color: var(--muted); max-width: calc(100% - 180px); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend canvas { width: auto; height: 22px; }
.minimap { position: absolute; z-index: 3; right: 12px; bottom: 12px; background: rgba(8, 6, 26, 0.88); box-shadow: 0 0 0 3px var(--edge), 0 0 0 5px var(--line); cursor: crosshair; }
.minimap canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
.yard .empty { position: absolute; z-index: 4; inset: auto 0 22% 0; text-align: center; font: 11px/1.8 var(--display); color: var(--ink); text-shadow: 3px 3px 0 var(--edge); pointer-events: none; padding: 0 20px; }
.yard .hint-drag { position: absolute; z-index: 3; left: 50%; top: 14px; transform: translateX(-50%); font: 8px/1 var(--display); color: var(--muted); background: rgba(8, 6, 26, 0.8); padding: 7px 9px; box-shadow: 0 0 0 2px var(--edge); pointer-events: none; transition: opacity 0.6s; white-space: nowrap; }

/* the coin card (hover on desktop, bottom sheet on phones) */
.tip {
  position: absolute; z-index: 10; width: 300px; pointer-events: none;
  background: linear-gradient(180deg, #1a1440, #110d2c);
  box-shadow: 0 0 0 3px var(--line), 0 0 0 6px var(--edge), 0 18px 30px rgba(0, 0, 0, 0.5);
  padding: 14px;
}
.tip.pinned { pointer-events: auto; }
.tip .hd { display: flex; gap: 12px; align-items: center; }
.tip .pic { width: 52px; height: 52px; flex: none; background: #0b0922; box-shadow: 0 0 0 2px var(--edge); image-rendering: pixelated; object-fit: cover; }
.tip .lies { font: 8px/1.4 var(--display); color: var(--dim); }
.tip .tk { font: 13px/1.4 var(--display); color: var(--ink); overflow-wrap: anywhere; }
.tip .nm { color: var(--muted); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.tip .ep { margin: 12px 0 10px; font-size: 18px; line-height: 1.3; color: var(--moon); }
.tip .ep::before { content: '“'; color: var(--dim); }
.tip .ep::after { content: '”'; color: var(--dim); }
.tip.grad .ep { color: var(--gold-hi); }
.tip dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; margin: 0 0 12px; }
.tip dt { font: 7px/1.4 var(--display); color: var(--dim); text-transform: uppercase; }
.tip dd { margin: 2px 0 0; font-size: 16px; color: var(--ink); white-space: nowrap; }
.tip .born { font-size: 14px; color: var(--muted); margin: -4px 0 12px; }
.tip .row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tip .btn { padding: 9px 10px; font-size: 9px; }
.tip .close { position: absolute; top: 6px; right: 6px; border: 0; background: none; color: var(--dim); font: 12px/1 var(--display); cursor: pointer; padding: 6px; display: none; }
.tip.pinned .close { display: block; }
.st { display: inline-block; font: 8px/1 var(--display); padding: 4px 6px 3px; color: #fff; background: #3a3660; }
.st.grad { background: var(--gold); color: #1b1030; }
.st.alive { background: var(--green); color: #0c1a08; }
.st.dead { background: #4a4d66; }
.st.stillborn { background: #2b2840; color: var(--muted); }
.st.fresh { background: #626883; color: #fff; }

/* the register: every coin as a table row */
.register-wrap { padding: 26px 0 10px; }
.register-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.register-tools .field { max-width: 280px; padding: 10px 12px; font-size: 14px; }
.register-tools select { font: 14px var(--body); color: var(--ink); background: #0a0820; border: 0; padding: 9px; box-shadow: 0 0 0 3px var(--edge), inset 0 0 0 2px var(--line); }
.register { width: 100%; border-collapse: collapse; font-size: 15px; }
.register th { font: 8px/1.2 var(--display); color: var(--dim); text-align: left; padding: 8px 8px; position: sticky; top: 0; background: var(--panel); }
.register td { padding: 8px; border-top: 2px solid #1a1540; vertical-align: top; }
.register td.n, .register th.n { text-align: right; white-space: nowrap; }
.register .c-name b { color: var(--ink); font-weight: 600; }
.register .c-name span { color: var(--muted); }
.register .c-ep { color: var(--muted); font-style: normal; }
.register tr.grad td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.register tr.alive td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.register tr.none td { padding: 18px 8px; text-align: center; color: var(--dim); }
.register a { color: var(--violet); }
.register-more { margin-top: 12px; text-align: center; }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; z-index: 60; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; max-width: calc(100% - 32px); pointer-events: none; }
.toast {
  pointer-events: auto; max-width: 380px; padding: 12px 14px; overflow-wrap: anywhere;
  background: #1a1440; color: var(--ink); font-size: 16px;
  box-shadow: 0 0 0 3px var(--line), 0 0 0 6px var(--edge), 0 12px 24px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.25s steps(4);
}
.toast b { display: block; font: 9px/1.5 var(--display); color: var(--gold); margin-bottom: 4px; }
.toast.alert { box-shadow: 0 0 0 3px var(--red), 0 0 0 6px var(--edge), 0 12px 24px rgba(0, 0, 0, 0.5); }
.toast.alert b { color: var(--red); }
.toast a { color: var(--gold); }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

footer { margin-top: 40px; padding: 26px 0 40px; border-top: 3px solid #120e30; color: var(--dim); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
footer a { color: var(--muted); }

.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.notfound h1 { font: 22px/1.5 var(--display); color: var(--gold); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1020px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(-n + 3) { border-bottom: 2px solid #1d1844; }
  .devhead { grid-template-columns: minmax(0, 1fr); }
  .actions { justify-content: flex-start; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .top { gap: 10px; flex-wrap: wrap; }
  .top nav { display: none; }
  .top .mini-search { order: 3; flex: 1 1 100%; margin-left: 0; }
  .logo b { font-size: 11px; }
  .hero { height: auto; min-height: 600px; }
  .hero .copy { justify-content: flex-start; padding: 26px 0 150px; }
  .hero::after { background: linear-gradient(180deg, rgba(5, 4, 15, 0.82) 0%, rgba(5, 4, 15, 0.7) 52%, rgba(5, 4, 15, 0.1) 80%), radial-gradient(120% 90% at 60% 40%, transparent 55%, rgba(3, 2, 10, 0.6)); }
  .hero h1 { font-size: 21px; line-height: 1.45; }
  .hero .lede { font-size: 17px; }
  .search { flex-direction: column; }
  .search .btn { width: calc(100% - 6px); padding: 15px; }
  .teaser-tag { left: 16px; right: 16px; bottom: 14px; max-width: none; }
  .how { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 14px 12px 12px; }
  .panel h2 { font-size: 12px; }
  .board .last, .board th.last { display: none; }
  .board td { padding: 9px 5px; }
  .board .rank { width: 26px; font-size: 9px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-right: 2px solid #1d1844 !important; border-bottom: 2px solid #1d1844; }
  .stat:nth-child(2n) { border-right: 0 !important; }
  .stat:nth-last-child(-n + 2) { border-bottom: 0; }
  .stat .v { font-size: 16px; }
  .devhead h1 { font-size: 15px; }
  .devhead .avatar { width: 44px; height: 44px; }
  .actions .btn { flex: 1 1 auto; }
  .yard { height: 64vh; min-height: 380px; }
  .legend { display: none; }
  .tip { position: fixed; left: 8px !important; right: 8px; top: auto !important; bottom: 8px; width: auto; }
  .register .c-ep, .register th.c-ep, .register .c-born, .register th.c-born { display: none; }
  .toasts { left: 16px; right: 16px; align-items: stretch; }
  .strip { gap: 6px 18px; font-size: 15px; }
  .feed li { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 2px; }
  .feed .just { display: none; }
  .feed .ago { font-size: 7px; }
  .feed .line1 { font-size: 15px; }
  .minimap { right: 8px; bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .feed li.new, .toast { animation: none; }
  .live-dot::before { animation: none; }
}
