
:root {
  color-scheme: dark;
  --ink: #0b0f0c;
  --ink-2: #070a08;
  --rh: #ccff00;
  --rh-soft: #dfff66;
  --text: #e9efe3;
  --muted: #8f9a88;
  --faint: #626c5d;
  --surface: rgba(255,255,255,.05);
  --surface-2: rgba(255,255,255,.08);
  --line: rgba(255,255,255,.10);
  --line-lit: rgba(204,255,0,.38);
  --r-lg: 24px;
  --r: 18px;
  --r-sm: 12px;
  --pill: 999px;
  --shadow: 0 14px 44px rgba(0,0,0,.5);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
/*
 * "hidden" has to win over any display we set.
 *
 * The browser's own rule is [hidden] { display: none }, which a plain
 * "form.summon { display: flex }" outranks on specificity — so a form marked
 * hidden rendered anyway, and the descent page showed its collapsed wallet
 * field next to the button that was supposed to reveal it. Making it important
 * settles the whole class of bug rather than this one instance.
 */
[hidden] { display: none !important; }
html { background: var(--ink); }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Ambient bloom: three soft ccff00 lights behind everything. This is what
   stops a dark page reading as a black rectangle, and it replaces the rain. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(58vw 58vw at 10% -12%, rgba(204,255,0,.14), transparent 62%),
    radial-gradient(46vw 46vw at 94% 6%, rgba(204,255,0,.08), transparent 62%),
    radial-gradient(70vw 46vw at 50% 112%, rgba(204,255,0,.07), transparent 64%);
}

.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 24px 96px; }

/* ---- nav: a floating glass pill ---- */
nav { position: sticky; top: 0; z-index: 50; padding: 16px 24px 0; }
.nav-in {
  max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 18px; border-radius: var(--pill);
  background: rgba(18,24,18,.62); border: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: var(--shadow);
}
.brand { font-size: 16px; font-weight: 750; letter-spacing: -.01em; color: var(--rh); text-decoration: none; margin-right: 6px; }
.brand i { color: var(--faint); font-style: normal; font-weight: 650; }
.nav-links { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 550;
  padding: 8px 14px; border-radius: var(--pill); transition: color .16s, background .16s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a[aria-current] { color: #0d1400; background: var(--rh); }

/*
 * The nav on a phone.
 *
 * There was no handling at all: brand plus six links plus the X mark needs
 * roughly six hundred pixels, and most of the traffic to a project like this
 * arrives on a 390px screen from a link on X — so the first thing most people
 * ever saw was a header that did not fit.
 *
 * It scrolls rather than collapsing behind a hamburger. Six destinations is
 * few enough that hiding them behind a tap costs more than it saves, and a
 * scrolling row keeps every one of them one gesture away. The mask on the
 * trailing edge is what tells you there is more.
 */
@media (max-width: 780px) {
  nav { padding: 10px 12px 0; }
  .nav-in { gap: 6px; padding: 8px 8px 8px 14px; }
  .brand { font-size: 15px; margin-right: 2px; }
  .nav-links {
    gap: 0; overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: none; -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
            mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { font-size: 13px; padding: 7px 10px; white-space: nowrap; }
  /* The X mark stays put so there is always something at the end to aim at. */
  .nav-links .icon-link { width: 30px; height: 30px; margin-left: 2px; flex: 0 0 30px; }
}
@media (max-width: 460px) {
  .nav-links a { font-size: 12px; padding: 6px 8px; }
}

/* ------------------------------------------------------------- descent --- */
.crawl { display: grid; grid-template-columns: minmax(0,1fr) 236px; gap: 18px; align-items: start; }
.board { border: 1px solid var(--line); border-radius: var(--r); padding: 8px; overflow: auto; background: #060805; }
/*
 * The full-screen control floats in the board's corner rather than taking a
 * row between the board and the thumbs.
 *
 * As a row it cost 39 vertical pixels, which pushed the pad off the bottom of
 * a 700px phone — the exact budget the mobile layout was tuned to. A control
 * that is only ever pressed once should not be charged for on every turn.
 */
.play { position: relative; }
.fsbar { position: absolute; top: 6px; right: 8px; margin: 0; z-index: 3; }
.fsbar .btn { padding: 6px 12px; font-size: 12px; }
/* Where you are, on the board rather than in the vitals — a phone has no row
   to spare for something that changes once every ten floors. */
.place {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); text-align: center; margin: 0 0 6px; min-height: 12px;
}
.gr { display: grid; gap: 0; margin: 0 auto; width: max-content; }
/*
 * One tile, sized from a variable.
 *
 * It was a hard 32px in both the stylesheet and the script, which made the
 * board a fixed 480 across — wider than a phone, so the game arrived already
 * scrolled sideways with a third of the room off-screen. Everything now reads
 * the --cell variable, and the media queries below are the only place that
 * number lives.
 */
.gr { --cell: 32px; }
/*
 * The cell, and the one place a dungeon's colour is applied.
 *
 * Blended into the cell's OWN background rather than filtered over the board,
 * because a filter on .gr would take the ghost, the enemies and their health
 * bars with it — they are child elements. Blending only touches this element's
 * background-image, so the art dims and the sprites standing on it do not.
 * Dungeon one sets no tint and gets the art exactly as drawn.
 */
.gr .c {
  width: var(--cell); height: var(--cell); position: relative;
  background-color: var(--floor-tint, #060805);
  background-blend-mode: var(--floor-blend, normal);
  background-size: var(--cell) var(--cell); background-repeat: no-repeat;
  image-rendering: pixelated;
}
.gr .c.seen { filter: brightness(.45) saturate(.6); }
/* Outside the floor entirely. The camera window is a fixed size, so the edges
   of a small floor have to be something rather than a gap. */
.gr .c.void { background: #040503; }
.gr .c.t-floor { background-image: var(--t-floor); }
.gr .c.t-wall { background-image: var(--t-wall); }
.gr .c.t-shaft { background-image: var(--t-shaft); }
.gr .c.t-dust { background-image: var(--t-dust); }
.gr .c.t-orb { background-image: var(--t-orb); }
.gr .c.t-ward { background-image: var(--t-ward); }
.gr .c.t-chest { background-image: var(--t-chest); }
.gr .c .ent { position: absolute; inset: 0; background-size: var(--cell) var(--cell); image-rendering: pixelated; z-index: 2; }
.gr .c.t-frost { background-image: var(--t-frost); }
.gr .c.t-spore { background-image: var(--t-spore); }
.gr .c.t-spike { background-image: var(--t-spike); }
.gr .c.t-arrow { background-image: var(--t-arrow); }
.gr .c.t-boon { background-image: var(--t-boon); }
/*
 * The line of fire. Faint red hazard pips on every tile a visible launcher
 * can shoot down — the warning the player used to pay for in health. Faint
 * on purpose: it must read at a glance without shouting over the tiles.
 */
.gr .c.lane::after {
  content: ''; position: absolute; inset: 40%; z-index: 1; border-radius: 50%;
  background: rgba(255, 95, 95, .38);
}
/* Taking the shot: the ghost flinches, and the bolt that hit is drawn. */
.gr .c .bolt {
  position: absolute; left: -20%; top: 44%; z-index: 5;
  width: 62%; height: 12%; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #ff8a8a 55%, #fff 100%);
  animation: bolt-in .28s ease-in both;
}
@keyframes bolt-in { from { transform: translateX(-160%); opacity: 0; } to { transform: translateX(120%); opacity: 1; } }
.gr .c .me.shot { animation: shot-flinch .32s ease-out; }
@keyframes shot-flinch {
  0% { filter: none; transform: translateY(0); }
  30% { filter: brightness(2.2) sepia(1) saturate(6) hue-rotate(-45deg); transform: translateY(-2px) translateX(2px); }
  100% { filter: none; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .gr .c .bolt { animation: none; }
  .gr .c .me.shot { animation: none; }
}
.gr .c .ent.sweeper { background-image: var(--t-sweeper); }
.gr .c .ent.shade { background-image: var(--t-shade); }
.gr .c .ent.warden { background-image: var(--t-warden); }
.gr .c .ent.blight { background-image: var(--t-blight); }
.gr .c .ent.husk { background-image: var(--t-husk); }
.gr .c .ent.mimic { background-image: var(--t-mimic); }
.gr .c .ent.auditor { background-image: var(--t-auditor); }
.gr .c .ent.compactor { background-image: var(--t-compactor); }
.gr .c .ent.null { background-image: var(--t-null); }
/* Cut out, so it stands ON the floor tile rather than covering it. Nudged up
   a touch and given a soft contact shadow so it reads as a thing in a room. */
/*
 * The ghost never quite settles.
 *
 * It is a ghost, so it hovers rather than stands, and a sprite sitting
 * perfectly still on a tile reads as a token on a board. The grid is rebuilt
 * from scratch every turn, which means this element is new each time and the
 * cycle restarts — and that is the useful half of the effect: between turns it
 * drifts, and the moment you step it kicks off the cycle again, so a move
 * reads as a little push off the floor rather than a teleport.
 *
 * The shadow moves against it. Keeping the drop-shadow tied to the sprite
 * would float the shadow too, which is the one thing that would make it look
 * like a sticker sliding around instead of something above the ground.
 */
@keyframes ghost-float {
  0%   { transform: translateY(1px) scaleY(.97); }
  35%  { transform: translateY(-3px) scaleY(1.02); }
  70%  { transform: translateY(-1px) scaleY(1); }
  100% { transform: translateY(1px) scaleY(.97); }
}
@keyframes ghost-shadow {
  0%   { opacity: .55; transform: scaleX(1); }
  35%  { opacity: .28; transform: scaleX(.82); }
  70%  { opacity: .42; transform: scaleX(.93); }
  100% { opacity: .55; transform: scaleX(1); }
}
.gr .c .me {
  position: absolute; left: -2px; top: -5px;
  width: calc(var(--cell) + 4px); height: calc(var(--cell) + 4px);
  image-rendering: pixelated; z-index: 3;
  transform-origin: 50% 100%;
  animation: ghost-float 1.5s ease-in-out infinite;
}
/* A separate contact shadow, so it can shrink as the ghost lifts away. */
.gr .c .me-shadow {
  position: absolute; left: 50%; bottom: 2px; z-index: 2;
  width: 20px; height: 4px; margin-left: -10px; border-radius: 50%;
  background: rgba(0,0,0,.7);
  animation: ghost-shadow 1.5s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .gr .c .me, .gr .c .me-shadow { animation: none; }
}
.gr .c .hpbar { position: absolute; left: 3px; right: 3px; bottom: 1px; height: 3px; background: rgba(0,0,0,.75); z-index: 4; border-radius: 2px; }
.gr .c .hpbar i { display: block; height: 100%; background: #ff5f5f; border-radius: 2px; }
.hud { display: grid; gap: 8px; }
.hud .stat { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; background: var(--surface); }
.hud .stat span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; display: block; }
.hud .stat b { font-family: var(--mono); font-size: 17px; color: var(--rh); }
.meter { height: 6px; border-radius: var(--pill); background: rgba(255,255,255,.08); overflow: hidden; margin-top: 5px; }
.meter i { display: block; height: 100%; transition: width .18s; }
.meter.hp i { background: linear-gradient(90deg,#ff7a7a,#ff4d4d); }
.meter.en i { background: linear-gradient(90deg,var(--rh-soft),var(--rh)); }
.meter.xp i { background: #6aa0ff; }
.logbox { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; background: var(--surface); font-size: 11px; color: var(--muted); display: grid; gap: 2px; min-height: 96px; align-content: start; }
.picks { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); margin: 12px 0; }
@media (max-width: 700px) { .picks { grid-template-columns: 1fr; } }
.pick { border: 1px solid var(--line-lit); border-radius: var(--r); padding: 13px; background: rgba(204,255,0,.06); cursor: pointer; color: inherit; font: inherit; text-align: left; }
.pick:disabled { opacity: .45; cursor: not-allowed; }
.pick:disabled:hover { background: rgba(204,255,0,.06); }

/*
 * The question at the bottom of a dungeon.
 *
 * Framed like a level-up because it is the same kind of moment — the run stops
 * until it is answered — but warmer, since one of the two answers is the only
 * way anybody ever banks a bonus.
 */
/* ------------------------------------------------------ a pending choice --- */
/*
 * Levelling up and standing on a way out both stop the run until answered, so
 * both are modals over the board rather than panels above it.
 *
 * They used to render at the top of the page, which on a phone put them off
 * screen: you are scrolled to your thumbs, you level up, and every tap silently
 * does nothing. The same thing happened in full screen. A modal cannot be
 * scrolled away from, and the scrim takes the tap that used to fall through to
 * a pad that was refusing it — the refusal becomes visible instead of silent.
 *
 * Fixed, and inside #d-run, which matters: the Fullscreen API renders only the
 * fullscreen element and its descendants, so a prompt outside it would simply
 * not be drawn.
 */
.pop {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; padding: 16px;
  background: rgba(4,6,4,.78);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: pop-in .16s ease-out;
}
@keyframes pop-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pop { animation: none; } }
.pop-card {
  width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto;
  border: 1px solid var(--line-lit); border-radius: var(--r-lg);
  padding: 20px 22px; background: var(--ink);
  box-shadow: 0 24px 70px rgba(0,0,0,.7);
}
.pop-card .section-head { margin-bottom: 14px; }
.pop-card .picks { margin: 0; }
@media (max-width: 560px) {
  .pop { padding: 10px; }
  .pop-card { padding: 16px 15px; max-height: 92vh; }
}

.wayout {
  border: 1px solid var(--line-lit); border-radius: var(--r-lg);
  padding: 20px 22px; margin: 0 0 18px;
  background:
    radial-gradient(80% 140% at 50% 0%, rgba(204,255,0,.10), transparent 70%),
    var(--surface);
}
/*
 * As a modal the way-out card needs an OPAQUE base. It inherits .wayout, whose
 * background is a tint over var(--surface) — five percent white — so the card
 * was see-through and the board and the full-screen button read straight
 * through the text. The tint stays; what it sits on becomes solid.
 */
.pop-card.wayout {
  margin: 0; border: 0; padding: 20px 22px;
  background:
    radial-gradient(80% 140% at 50% 0%, rgba(204,255,0,.10), transparent 70%),
    var(--ink);
}
.wayout .picks { grid-template-columns: repeat(2, 1fr); margin-bottom: 0; }
@media (max-width: 700px) { .wayout .picks { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .pop-card.wayout { padding: 16px 15px; } }
.wayout .lede { margin: 0 0 14px; max-width: 62ch; }
.pick:hover { background: rgba(204,255,0,.13); }
.pick b { display: block; color: var(--rh); margin-bottom: 4px; }
.pick span { font-size: 12px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags i { font-style: normal; font-size: 10px; padding: 2px 7px; border-radius: var(--pill); background: rgba(204,255,0,.12); color: var(--rh-soft); }
/* Borrowed power reads differently from owned power: brighter, and counting. */
.tags i.boon { background: rgba(204,255,0,.28); color: #0d1400; font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--muted); margin-top: 10px; align-items: center; }
.legend b { display: inline-block; width: 20px; height: 20px; background-size: 20px 20px; image-rendering: pixelated; vertical-align: -5px; margin-right: 5px; }
/* ---------------------------------------------------------- arcade hero --- */
/*
 * A full-bleed animated backdrop with the page sitting on top of it.
 *
 * The gameplay is the argument, so it goes behind everything rather than in a
 * box to one side. Two things make text on top of it readable: the scrim, and
 * pinning the animation to the BOTTOM — the fighting happens along the floor,
 * so anchoring there keeps the busiest pixels under the call to action instead
 * of under the headline.
 */
.arcade {
  position: relative; isolation: isolate; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 54px 34px 40px; margin-bottom: 30px;
}
.arcade::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: url(/scene/hero.gif) center bottom / auto 224px repeat-x;
  image-rendering: pixelated;
}
/*
 * 370KB of animated backdrop is a lot to spend on decoration over a cellular
 * connection. It is a background rather than content, so it blocks nothing —
 * but anybody who has actually asked their browser to save data should not be
 * made to pay for it, and the scrim below already reads as a dark room.
 */
@media (prefers-reduced-data: reduce) {
  .arcade::before { background-image: none; }
}
.arcade::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  /*
   * Heavy at the top where the headline sits, light at the bottom where the
   * fighting is. The first cut was .88 opaque over the action, which hid the
   * thing the section exists to show — a backdrop nobody can make out is just
   * an expensive dark rectangle.
   */
  background:
    linear-gradient(180deg, rgba(6,8,5,.96) 0%, rgba(6,8,5,.86) 34%, rgba(6,8,5,.52) 72%, rgba(6,8,5,.60) 100%),
    radial-gradient(70% 90% at 50% 0%, rgba(204,255,0,.10), transparent 70%);
}
/*
 * Sized like a headline without being one. The page already has an h1 in the
 * hero; two of them made this read as a second front page stacked on the
 * first, and screen readers agreed.
 */
.arcade h2 {
  margin: 0 0 12px; font-size: clamp(27px, 4.2vw, 40px); letter-spacing: -.02em;
  text-shadow: 0 2px 18px rgba(6,8,5,.95);
}
.arcade p { max-width: 54ch; margin: 0 0 8px; text-shadow: 0 1px 12px rgba(6,8,5,.9); }
.arcade .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.arcade .cta .btn { font-size: 15px; padding: 12px 22px; }
/* The entry field, once the button has expanded into it. */
.arcade form.entry { margin: 22px 0 6px; max-width: 620px; }
.arcade form.entry input { flex: 1 1 260px; }
.arcade #d-why { max-width: 62ch; }
.arcade .kicker {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--rh); border: 1px solid var(--line-lit);
  border-radius: var(--pill); padding: 4px 12px; margin-bottom: 16px;
}
@media (max-width: 640px) { .arcade { padding: 36px 20px 30px; } }

/*
 * The follow card, in place of an embedded timeline.
 *
 * The timeline was half a megabyte of somebody else's javascript and the only
 * third-party anything on a site with no runtime dependencies — slow, a
 * tracking surface, and the element most likely to simply stop working one
 * day. What it bought was a list of posts most visitors scroll straight past.
 * This says the same thing, loads nothing, and cannot break.
 */
.follow {
  display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); transition: border-color .16s, background .16s;
}
.follow:hover { border-color: var(--rh); background: rgba(204,255,0,.07); }
.follow img { width: 56px; height: 56px; border-radius: 50%; image-rendering: pixelated; flex: 0 0 56px; }
.follow .who { min-width: 0; }
.follow .who b { display: block; font-family: var(--mono); font-size: 15px; color: var(--rh); }
.follow .who span { font-size: 13px; color: var(--muted); }
.follow .go { margin-left: auto; font-size: 13px; color: var(--text); white-space: nowrap; }
@media (max-width: 560px) { .follow { flex-wrap: wrap; } .follow .go { margin-left: 0; } }

/* Walking the collection, one edition at a time. */
.stepper { display: flex; align-items: center; gap: 12px; margin: -12px 0 24px; flex-wrap: wrap; }
.stepper .note { font-family: var(--mono); font-size: 12px; }

/* The badge on a cell, when the piece has something worth saying. */
.cell .gr.odd { color: var(--rh); font-weight: 600; }

/* ---------------------------------------------------------- gallery bar --- */
/* A select that is actually filtering something should not look like one that
   is not. Eleven identical dropdowns hid the entire state of the page. */
.filters select:not([data-any]) { border-color: var(--line); }
.filters select.on { border-color: var(--rh); color: var(--text); background: rgba(204,255,0,.08); }
.tally { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: -4px 0 20px; }
.tally .count { margin: 0; font-size: 13px; color: var(--muted); }
.tally .count b { font-family: var(--mono); color: var(--text); font-weight: 500; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-size: 12px; padding: 4px 10px; border-radius: var(--pill);
  border: 1px solid var(--line-lit); background: rgba(204,255,0,.08); color: var(--text);
}
.chip span { color: var(--muted); font-size: 11px; }
.chip b { color: var(--muted); font-weight: 500; }
.chip:hover { background: rgba(204,255,0,.16); }
.chip:hover b { color: var(--rh); }

/* The page for a link that went nowhere. */
.lost { text-align: center; padding: 56px 0 30px; max-width: 54ch; margin: 0 auto; }
.lost img { width: 132px; height: 132px; image-rendering: pixelated; margin-bottom: 18px; }
.lost h1 { margin: 0 0 12px; }
.lost code { font-family: var(--mono); font-size: 13px; color: var(--rh-soft); word-break: break-all; }
.lost .links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ---------------------------------------------------------------- ticker --- */
/*
 * A marquee that cannot stutter at the wrap.
 *
 * The content is rendered twice and the track slides exactly half its width,
 * so the second copy is in the first one's place at the moment it resets. One
 * copy with a modulo would jump; two copies and a 50% translate is seamless
 * for free.
 */
.ticker {
  overflow: hidden; border-block: 1px solid var(--line);
  background: rgba(204,255,0,.04); margin: 34px 0; padding: 11px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker .track { display: flex; width: max-content; animation: slide 42s linear infinite; }
.ticker span {
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap; padding: 0 22px;
}
.ticker span b { color: var(--rh); font-weight: 500; }
.ticker span::after { content: '\25CF'; color: var(--line-lit); margin-left: 22px; font-size: 8px; vertical-align: middle; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker .track { animation: none; } }

/* --------------------------------------------------------------- showcase --- */
/*
 * Text one side, a clip the other, alternating down the page. The clip is the
 * argument — a still of a generated collection cannot show that the picture
 * changes with the number.
 */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin: 46px 0; }
.showcase.flip > .media { order: -1; }
@media (max-width: 820px) { .showcase { grid-template-columns: 1fr; gap: 24px; } .showcase.flip > .media { order: 0; } }
.showcase .media {
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background: #060805; line-height: 0; box-shadow: var(--shadow);
}
.showcase .media img { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.showcase h2 {
  margin: 0 0 14px; font-size: clamp(26px, 3.6vw, 38px); line-height: 1.08; letter-spacing: -.02em;
}
/* The second line glows, so a two-line headline reads as one gesture. */
.showcase h2 em {
  font-style: normal; color: var(--rh);
  text-shadow: 0 0 26px rgba(204,255,0,.45);
}
.showcase .eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--rh); margin: 0 0 12px;
}
.showcase p { margin: 0 0 10px; }

/* Cards and sections ease in the first time they are scrolled to. */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.seen { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ------------------------------------------------------ descent on a phone --- */
/*
 * The game was keyboard-only and 480 pixels wide, which on a phone means
 * unplayable and half off-screen at the same time. Three things fix it: the
 * board shrinks to fit, the vitals move above it so they are visible while you
 * play, and there is something to press.
 *
 * The constraint that shapes all of it is vertical, not horizontal. A turn is
 * read-then-press, so the board and the d-pad have to be on screen AT THE SAME
 * TIME or every move costs a scroll. That budget is about 700 pixels of phone,
 * and the board and pad claim 490 of it between them, which leaves roughly 150
 * for the vitals. Stacked cards wanted 321. Hence the chips below: same
 * numbers, laid out along the line instead of down the page.
 */
/* ----------------------------------------------------------- full screen --- */
/*
 * The board, and nothing else.
 *
 * A class rather than the Fullscreen API doing the work, because iOS Safari
 * has no element fullscreen — offering the button on a phone and having it do
 * nothing would be worse than not offering it. The API is still requested and
 * hides the browser chrome where it exists; this makes the page fill whatever
 * viewport it ends up with.
 */
#d-run.immersive {
  position: fixed; inset: 0; z-index: 200;
  height: 100vh; height: 100dvh;
  margin: 0; padding: 10px 12px;
  background: var(--ink);
  overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; align-items: center;
}
#d-run.immersive .crawl { width: 100%; max-width: 620px; grid-template-columns: 1fr; gap: 8px; }
#d-run.immersive .board { width: 100%; }
/*
 * The tile size is solved rather than stepped: as large as the narrower of the
 * two constraints allows, so the board fills a phone held upright and still
 * leaves the pad on screen. 250px is the vitals, the pad and their gaps.
 */
#d-run.immersive .gr {
  --cell: clamp(16px, min(calc((100vw - 44px) / 15), calc((100dvh - 360px) / 15)), 46px);
}
#d-run.immersive .pad { display: grid; }
/*
 * Full screen wants the same compact vitals a phone does, for the same reason:
 * the board and the pad have to share one screen. These repeat the phone
 * values rather than sharing them because a media query cannot be part of a
 * selector list, and the alternative — a class toggled from script — would put
 * the layout of a working mobile view at the mercy of a JS path.
 */
#d-run.immersive .hud { order: -1; gap: 6px; grid-template-columns: repeat(4, 1fr); }
#d-run.immersive .hud .stat { padding: 4px 8px 8px; display: block; position: relative; font-size: 11px; line-height: 1.2; }
#d-run.immersive .hud .stat span { font-size: 9px; letter-spacing: .05em; line-height: 1.3; }
#d-run.immersive .hud .stat b { font-size: 13px; line-height: 1.25; }
#d-run.immersive .hud .stat .meter { position: absolute; left: 6px; right: 6px; bottom: 3px; height: 3px; margin: 0; }
#d-run.immersive .hud .vital { order: 1; }
#d-run.immersive .hud .wide { order: 2; grid-column: 1 / -1; display: flex; align-items: baseline; gap: 6px; padding-bottom: 7px; }
#d-run.immersive .hud #d-block { display: none; }
#d-run.immersive .hud #d-talentbox { order: 3; grid-column: 1 / 3; display: flex; align-items: center; gap: 7px; padding: 4px 8px; }
#d-run.immersive .hud .logbox {
  order: 4; grid-column: 1 / -1; min-height: 0; max-height: 44px;
  overflow: hidden; padding: 5px 9px; line-height: 1.3; gap: 0;
}
#d-run.immersive .hud #d-talentbox:not([hidden]) ~ .logbox { grid-column: 3 / -1; }
#d-run.immersive .board { padding: 5px; }
#d-run.immersive .fsbar { top: 10px; right: 12px; }
/* The page behind it has nothing to contribute while this is up. */
html.immersive-on { overflow: hidden; }
html.immersive-on nav { display: none; }

/*
 * The pad's SHAPE is unconditional; only whether it shows is conditional.
 *
 * It used to be defined entirely inside the phone media query, so turning it
 * on anywhere else — full screen on a desktop, say — produced a column of
 * full-width bars: display:grid with no areas and no button sizing. Structure
 * here, visibility at the two places that want it.
 */
.pad {
  display: none; gap: 7px; justify-content: center; margin: 8px auto 0;
  grid-template-areas: '. up .' 'left wait right' '. down .';
}
.pad button {
  width: 58px; height: 52px; border-radius: var(--r-sm);
  border: 1px solid var(--line-lit); background: var(--surface);
  color: var(--text); font-size: 19px; line-height: 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.pad button:active { background: rgba(204,255,0,.2); border-color: var(--rh); }
.pad .up { grid-area: up; } .pad .down { grid-area: down; }
.pad .left { grid-area: left; } .pad .right { grid-area: right; }
.pad .wait { grid-area: wait; font-size: 12px; letter-spacing: .06em; color: var(--muted); }
/* Why a tap did nothing. Sits between the board and the thumbs, which is the
   only place on a phone that is certain to be on screen when it matters. */
.hint {
  margin: 8px auto 0; max-width: 40ch; text-align: center;
  font-size: 12px; color: var(--rh-soft);
}
/* Telling a phone to press space is worse than saying nothing. */
.taps-only { display: none; }

@media (max-width: 900px), (pointer: coarse) {
  .keys-only { display: none; }
  .taps-only { display: inline; }

  /* Vitals first, board next, controls under the thumb. */
  .crawl { grid-template-columns: 1fr; }
  .crawl { gap: 10px; }
  .crawl .hud { order: -1; gap: 6px; grid-template-columns: repeat(4, 1fr); }
  /*
   * Label over value, but with the air taken out — and the meter pinned along
   * the bottom edge instead of taking a row of its own.
   *
   * Laying the label and value side by side reads better and was the first
   * attempt, but "Health 32 / 32" needs about 104 pixels and a quarter of a
   * 390px phone is 81, so every chip wrapped to three lines and the row cost
   * MORE than stacking did. Stacked and tight, a chip is 41 pixels.
   */
  /*
   * The font-size and line-height here are not decoration — the value is an
   * inline <b>, so its line box is at least as tall as the chip's own strut,
   * and the inherited 15px/1.65 body text was silently adding eleven pixels to
   * every chip for a line of text that is not there.
   */
  .hud .stat { padding: 4px 8px 8px; display: block; position: relative; font-size: 11px; line-height: 1.2; }
  .hud .stat span { font-size: 9px; letter-spacing: .05em; line-height: 1.3; }
  .hud .stat b { font-size: 13px; line-height: 1.25; }
  .hud .stat .meter { position: absolute; left: 6px; right: 6px; bottom: 3px; height: 3px; margin: 0; }
  /*
   * Four short chips on one line, then the one that carries a sentence of its
   * own on the next. Level reads "atk 9 · sight 3 · 3 walls", which no
   * quarter-width chip can hold, so it gets the full width — and there, with
   * room to spare, the label and value do sit on one line.
   */
  .hud .vital { order: 1; }
  .hud .wide {
    order: 2; grid-column: 1 / -1;
    display: flex; align-items: baseline; gap: 6px; padding-bottom: 7px;
  }
  /* Which block seeded the floor is a nice thing to know, not a thing to read mid-turn. */
  .hud #d-block { display: none; }
  /*
   * Band, crew and log take more room than they earn on a small screen, so
   * the last two share a row. Both hold one short line, and a row here is
   * worth about the height of the arrow key that was falling off the bottom
   * of the screen. When there is no band yet the log takes the row alone.
   */
  .hud .logbox {
    order: 4; grid-column: 1 / -1; min-height: 0; max-height: 44px;
    overflow: hidden; padding: 5px 9px; line-height: 1.3; gap: 0;
  }
  .hud #d-talentbox { order: 3; grid-column: 1 / 3; display: flex; align-items: center; gap: 7px; padding: 4px 8px; }
  .hud #d-talentbox:not([hidden]) ~ .logbox { grid-column: 3 / -1; }

  /* Every pixel between the board and the thumb is one the board could use. */
  .board { padding: 5px; }

  .pad { display: grid; }
}

@media (max-width: 700px) { .gr { --cell: 28px; } }
@media (max-width: 560px) { .gr { --cell: 24px; } .pad button { width: 54px; height: 48px; } }
@media (max-width: 400px) { .gr { --cell: 20px; } }

/* the scene that greets you once a wallet is loaded */
.scene {
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: #060805; margin-bottom: 18px; line-height: 0;
}
.scene img { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.stack {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 18px;
}
.stack .s {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; background: var(--surface);
}
.stack .s span { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.stack .s b { font-family: var(--mono); font-size: 21px; color: var(--rh); }
.stack .s.pile b { font-size: 25px; }

/* character select */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.ghostcard { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface); cursor: pointer; color: inherit; font: inherit; text-align: left; display: grid; gap: 8px; }
.ghostcard:hover { border-color: var(--rh); background: rgba(204,255,0,.08); }
.ghostcard .top { display: flex; align-items: center; gap: 10px; }
.ghostcard img {
  width: 52px; height: 52px; image-rendering: pixelated; flex: 0 0 52px;
  /* The sprite is cut out now, so the frame behind it is the card's job. */
  border-radius: var(--r-sm); background: rgba(0,0,0,.35);
}
.ghostcard .nm { min-width: 0; }
.ghostcard .nm b { display: block; font-family: var(--mono); font-size: 12px; font-weight: 500; }
/* Each on its own line. These are inline by default, so the trait line and
   the grade line ran together into "HollowedLegendary". */
.ghostcard .nm span { display: block; font-size: 10px; color: var(--muted); line-height: 1.45; }
.ghostcard .sc { font-family: var(--mono); font-size: 11px; color: var(--rh); }
.ghostcard .rows { display: grid; gap: 2px; font-size: 11px; color: var(--muted); }
.ghostcard .rows em { font-style: normal; color: var(--text); }
.ghostcard .skill { font-size: 11px; color: var(--rh-soft); }
/* ------------------------------------------------------- how a run ends --- */
/*
 * A run ended on a heading and a line of statistics, which is a receipt. Ten
 * floors in the dark earns a moment, so both endings get one — and they are
 * deliberately opposite: coming apart, or going up.
 *
 * Built out of the ghost you actually played and a handful of divs rather than
 * a rendered clip. It starts on the frame the run ended, costs no bytes, and
 * cannot be out of date with the art.
 */
.outro { display: grid; place-items: center; margin: 4px 0 20px; }
.outro-stage {
  position: relative; width: 230px; height: 200px;
  display: grid; place-items: center; isolation: isolate;
}
/* The floor it happens on, so the ghost is somewhere rather than nowhere. */
.outro-stage::after {
  content: ''; position: absolute; left: 50%; bottom: 26px; z-index: 0;
  width: 132px; height: 12px; margin-left: -66px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.65), transparent 70%);
}
.outro-ghost {
  position: relative; z-index: 2; width: 124px; height: 124px;
  image-rendering: pixelated; display: block;
}
.outro .shard {
  position: absolute; left: 50%; top: 46%; z-index: 1;
  width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  background: var(--rh); opacity: 0;
  animation: shard-out var(--dur) ease-out var(--delay) forwards;
}
@keyframes shard-out {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(.25); opacity: 0; }
}
.outro .ring {
  position: absolute; left: 50%; top: 46%; z-index: 0;
  width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  border: 2px solid var(--rh); opacity: 0;
  animation: ring-out 1.9s ease-out var(--delay) forwards;
}
@keyframes ring-out {
  0% { transform: scale(.2); opacity: .9; }
  100% { transform: scale(4.2); opacity: 0; }
}

/* Unmade: a shudder, the colour draining, then it comes apart. */
.outro.unmade .outro-ghost { animation: unmade 1.7s ease-in forwards; }
.outro.unmade .shard { background: #ff5f5f; }
@keyframes unmade {
  0%   { transform: none; filter: none; }
  10%  { transform: translateX(-5px) rotate(-2deg); }
  20%  { transform: translateX(5px) rotate(2deg); }
  30%  { transform: translateX(-4px) rotate(-1deg); }
  40%  { transform: translateX(3px); filter: saturate(.5) brightness(1.5); }
  55%  { transform: none; filter: saturate(.2) brightness(1.7); }
  100% { transform: scale(.84) translateY(12px); opacity: 0; filter: saturate(0) brightness(.35); }
}

/* Unmade the other way: the lights simply went out. */
.outro.spent .outro-ghost { animation: spent 1.9s ease-in forwards; }
.outro.spent .shard { background: var(--faint); }
@keyframes spent {
  0%   { filter: none; opacity: 1; }
  100% { filter: brightness(.25) saturate(.2); opacity: .12; transform: translateY(8px); }
}

/* Through it: it goes up, and it takes the light with it. */
.outro.won .outro-ghost { animation: ascend 2.4s cubic-bezier(.22,.7,.3,1) forwards; }
@keyframes ascend {
  0%   { transform: none; filter: none; }
  25%  { transform: translateY(4px) scale(.97); }
  60%  { filter: drop-shadow(0 0 16px var(--rh)) brightness(1.15); }
  100% { transform: translateY(-30px) scale(1.07); filter: drop-shadow(0 0 30px var(--rh)) brightness(1.25); }
}

@media (prefers-reduced-motion: reduce) {
  /* The scene still happens, it just does not move: the last frame, held. */
  .outro .outro-ghost, .outro .shard, .outro .ring { animation: none; }
  .outro .shard, .outro .ring { display: none; }
  .outro.unmade .outro-ghost { filter: saturate(0) brightness(.5); opacity: .5; }
  .outro.spent .outro-ghost { filter: brightness(.3) saturate(.2); opacity: .4; }
  .outro.won .outro-ghost { filter: drop-shadow(0 0 20px var(--rh)) brightness(1.2); }
}
@media (max-width: 560px) {
  .outro-stage { width: 190px; height: 168px; }
  .outro-ghost { width: 100px; height: 100px; }
}

/* Entering a score: follow, post, paste. Same shape as claiming a Warrant. */
.enter { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--surface); margin: 16px 0; }
.enter .steps { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.enter .steps li { line-height: 1.6; }
.enter .steps li::marker { color: var(--rh); font-weight: 700; }
.enter .steps .btn { vertical-align: middle; margin-left: 4px; }
.enter .steps input[type="text"] {
  display: block; width: 100%; max-width: 420px; margin-top: 7px;
  padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line-lit); background: rgba(0,0,0,.35);
  color: var(--text); font: inherit; font-size: 13px;
}
.enter .steps input[type="text"]:focus { outline: none; border-color: var(--rh); }
.tick { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; cursor: pointer; font-size: 13px; color: var(--muted); }
.tick input { width: 16px; height: 16px; accent-color: var(--rh); cursor: pointer; }

/* A name on the board, rather than a number nobody recognises. */
.who-x { color: var(--rh); text-decoration: none; font-weight: 600; }
.who-x:hover { text-decoration: underline; }

/* Honorary tributes: gold, not brand green, so they read as the exception. */
.gr.honorary, .badge.honorary { color: #0d1400; background: linear-gradient(135deg, #ffe487, #f0c64a); font-weight: 700; }
.badge.honorary { padding: 2px 9px; border-radius: var(--pill); }
.cell:has(.gr.honorary) { outline: 1px solid rgba(240, 198, 74, .5); outline-offset: -1px; }
.tribute-card {
  border: 1px solid rgba(240, 198, 74, .35); border-radius: var(--r);
  padding: 14px 16px; margin: 14px 0;
  background: linear-gradient(180deg, rgba(240, 198, 74, .08), transparent);
}
.tribute-card p { margin: 0 0 8px; }
.tribute-card p:last-child { margin: 0; }

.warrant { border: 1px solid var(--rh); border-radius: var(--r); padding: 14px 16px; background: rgba(204,255,0,.09); margin: 14px 0; }
.warrant b { color: var(--rh); }
/*
 * Claiming a Warrant is three steps now — post it, paste it, sign it — so it
 * is numbered. Somebody who just found a one-in-a-hundred item should not have
 * to work out what the form wants.
 */
.warrant .steps { margin: 12px 0 6px; padding-left: 20px; display: grid; gap: 12px; }
.warrant .steps li { line-height: 1.6; }
.warrant .steps li::marker { color: var(--rh); font-weight: 700; }
.warrant .steps .btn { vertical-align: middle; margin-left: 4px; }
.warrant .steps input {
  display: block; width: 100%; max-width: 420px; margin-top: 7px;
  padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line-lit); background: rgba(0,0,0,.35);
  color: var(--text); font: inherit; font-size: 13px;
}
.warrant .steps input:focus { outline: none; border-color: var(--rh); }
.nav-links .icon-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; margin-left: 6px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 50%;
}
.nav-links .icon-link:hover { color: var(--rh); border-color: var(--line-lit); background: var(--surface); }
footer .icon-link { display: inline-flex; align-items: center; gap: 7px; }

/* ---- surfaces ---- */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.028));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.07);
  padding: 26px;
}
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--rh); margin: 0 0 10px; }
h1 { font-size: 30px; line-height: 1.15; font-weight: 760; letter-spacing: -.025em; margin: 0 0 10px; }
h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 14px; }
p.lede { color: var(--muted); font-size: 16px; margin: 0 0 22px; max-width: 58ch; }

/* ---- controls ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none;
  font: inherit; font-size: 14px; font-weight: 650; padding: 11px 20px; border-radius: var(--pill);
  background: var(--rh); color: #0d1400; border: 1px solid transparent;
  box-shadow: 0 6px 22px rgba(204,255,0,.22); transition: transform .16s, box-shadow .16s, background .16s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(204,255,0,.34); background: var(--rh-soft); }
.btn.secondary {
  background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: none;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn.secondary:hover { background: var(--surface-2); border-color: var(--line-lit); box-shadow: none; }
.btn[aria-disabled="true"] { opacity: .42; pointer-events: none; }
.btn.sm { padding: 8px 15px; font-size: 13px; }

input[type=text], select {
  font: inherit; font-size: 14px; color: var(--text); padding: 11px 15px;
  background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: var(--pill);
  transition: border-color .16s, box-shadow .16s;
}
input[type=text] { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; }
input[type=text]:focus, select:focus { outline: none; border-color: var(--line-lit); box-shadow: 0 0 0 4px rgba(204,255,0,.10); }
input[type=text]::placeholder { color: var(--faint); }
select { border-radius: var(--r-sm); padding: 9px 12px; cursor: pointer; }

/* ---- summon ---- */
form.summon { display: flex; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }
/* Two fields plus a button: the link is the long one, so it takes the slack. */
form.gtd #gtd-link { flex: 2 1 320px; }
form.gtd #gtd-address { flex: 1 1 240px; }
.split { display: flex; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.art {
  position: relative; flex: 0 0 auto; width: 372px; padding: 16px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.art img { width: 100%; display: block; image-rendering: pixelated; border-radius: var(--r); }
.art .tag { display: block; margin-top: 12px; text-align: center; color: var(--faint); font-family: var(--mono); font-size: 12px; }
.meta { flex: 1 1 340px; min-width: 320px; }
.gname { font-size: 27px; font-weight: 760; letter-spacing: -.025em; margin: 0 0 8px; }
.gsub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.badge {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--pill);
  font-size: 12px; font-weight: 700; background: var(--surface); border: 1px solid var(--line);
}

.traits { display: grid; gap: 8px; }
.trait {
  display: flex; align-items: center; gap: 12px; padding: 11px 15px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.trait .k { color: var(--faint); font-size: 12px; font-weight: 600; width: 78px; flex: 0 0 auto; }
.trait .v { font-weight: 600; font-size: 14px; }
.trait .p { margin-left: auto; color: var(--faint); font-size: 12px; font-family: var(--mono); }
.trait .t { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--pill); background: rgba(255,255,255,.06); }
.trait.special { border-color: var(--line-lit); background: rgba(204,255,0,.07); }
.trait.special .k { color: var(--rh); }

.links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* ---- grids ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 16px; }
.cell {
  display: block; text-decoration: none; padding: 8px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.cell:hover { transform: translateY(-3px); border-color: var(--line-lit); box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.cell img { width: 100%; aspect-ratio: 1; display: block; image-rendering: pixelated; border-radius: var(--r-sm); background: rgba(0,0,0,.3); }
.cell .cap { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 9px 4px 3px; }
.cell .id { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.cell .gr { font-size: 10px; font-weight: 700; }

.bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.bar .spacer { margin-left: auto; }
.note { color: var(--faint); font-size: 13px; }
.empty {
  border: 1px dashed var(--line); border-radius: var(--r-lg); padding: 56px 24px;
  text-align: center; color: var(--muted);
}

/* ---- x feed ---- */
.feed { padding: 12px; min-height: 160px; }
.feed iframe { border-radius: var(--r) !important; }
.feed-fallback {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 160px; text-align: center;
}

/* ---- claim ---- */
.phases { margin-bottom: 8px; }
.phase { padding: 26px 28px; }
.phase h2 { margin: 0 0 10px; }
.phase-count { font-size: 40px; font-weight: 780; letter-spacing: -.04em; margin: 0 0 10px; color: var(--rh); }
.phase-count span { font-size: 14px; font-weight: 600; color: var(--faint); letter-spacing: 0; margin-left: 8px; }

/* ---- protocol ---- */
.entries { display: grid; gap: 16px; }
.entry { padding: 26px 28px; }
.entry-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.entry-head h2 { margin: 0; }
.entry .teaser { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.entry p { margin: 0 0 12px; max-width: 68ch; }
.entry p:last-child { margin-bottom: 0; }
.entry.sealed { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); }
.stamp {
  font-size: 10px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase;
  color: var(--rh); border: 1px solid var(--line-lit); border-radius: var(--pill);
  padding: 3px 10px; background: rgba(204,255,0,.08);
}

/* Bars, not covered text. The words are not in the document. */
.redacted { display: grid; gap: 9px; padding: 2px 0 4px; }
.rline { display: flex; flex-wrap: wrap; gap: 7px; }
.rbar {
  display: inline-block; height: 13px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.13) 0 6px, rgba(255,255,255,.08) 6px 12px);
}
.entry.sealed .rbar { background: rgba(204,255,0,.10); }

/* ---- about ---- */
.about-hero h1 { font-size: 40px; line-height: 1.08; letter-spacing: -.035em; }

/* Prose on the left, a ghost that rides along on the right. align-items:start
   is what actually lets the aside stick — a stretched grid item is already as
   tall as its row and so has nowhere to travel. */
.about-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 60px; align-items: start; }
.about-aside { position: sticky; top: 96px; }
.floater-cap {
  display: flex; justify-content: center; gap: 8px; margin-top: 14px;
  font-family: var(--mono); font-size: 12px; color: var(--faint); text-decoration: none;
}
.floater-cap:hover { color: var(--rh); }

.floater { position: relative; width: 100%; aspect-ratio: 1; }
.floater::after {
  content: ''; position: absolute; inset: 10%; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(204,255,0,.28), transparent 68%); filter: blur(28px);
}
.gl {
  position: absolute; inset: 0; z-index: 1;
  background-size: 100% 100%; background-repeat: no-repeat; background-position: center;
  image-rendering: pixelated;
}
/* Two offset echoes of the same frame. Not an RGB channel split — that throws
   red and blue fringing off a ccff00 palette and turns the brand into a
   rainbow. Offsetting the whole image keeps every pixel a colour already on
   screen, exactly like the promo reel. */
.gl-echo { opacity: 0; }
.floater.glitching .gl-base { animation: gl-jit 420ms steps(1) 1 }
.floater.glitching .gl-a { animation: gl-a 420ms steps(1) 1 }
.floater.glitching .gl-b { animation: gl-b 420ms steps(1) 1 }

@keyframes gl-jit {
  0%, 100% { transform: none }
  20% { transform: translateX(-3px) }
  45% { transform: translateX(4px) }
  70% { transform: translateX(-2px) }
}
@keyframes gl-a {
  0%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0) }
  15% { opacity: .75; transform: translateX(-11px); clip-path: inset(16% 0 58% 0) }
  40% { opacity: .6; transform: translateX(-7px); clip-path: inset(54% 0 24% 0) }
  65% { opacity: .7; transform: translateX(-13px); clip-path: inset(6% 0 78% 0) }
  85% { opacity: .35; transform: translateX(-4px); clip-path: inset(38% 0 44% 0) }
}
@keyframes gl-b {
  0%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0) }
  20% { opacity: .5; transform: translateX(10px); clip-path: inset(66% 0 14% 0) }
  45% { opacity: .65; transform: translateX(14px); clip-path: inset(28% 0 50% 0) }
  70% { opacity: .45; transform: translateX(6px); clip-path: inset(74% 0 8% 0) }
  90% { opacity: .3; transform: translateX(9px); clip-path: inset(12% 0 70% 0) }
}

.prose { max-width: 72ch; }
.prose section { margin-top: 40px; }
.prose h2 { font-size: 22px; margin-bottom: 12px; }
.prose p { margin: 0 0 16px; color: var(--text); }
.prose .lore p { font-size: 16.5px; line-height: 1.75; }
.prose.craft { max-width: 74ch; }
.prose.craft p { color: var(--muted); font-size: 15px; }
.prose.craft h2 { font-size: 18px; }

/* ---- landing ---- */
.hero { display: flex; gap: 44px; align-items: center; flex-wrap: wrap; padding: 52px 0 20px; }
.hero-copy { flex: 1 1 400px; min-width: 320px; }
.hero h1 { font-size: 46px; line-height: 1.05; letter-spacing: -.04em; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--rh); }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
/*
 * The hero ghost is a live summoner: a framed portrait that floats, a plate
 * naming what turned up, and a button to draw another. The bloom behind it is
 * the same green glow the rest of the site runs on.
 */
.hero-art { flex: 0 0 auto; width: 320px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-frame { position: relative; width: 100%; }
.hero-frame::after {
  content: ''; position: absolute; inset: 8%; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(204,255,0,.30), transparent 68%); filter: blur(30px);
}
.hero-art img {
  position: relative; z-index: 1; width: 100%; display: block; image-rendering: pixelated;
  animation: hero-float 5.5s ease-in-out infinite;
  transition: opacity .22s ease;
}
.hero-art img.fading { opacity: 0; }
/* A quick settle when a freshly summoned ghost lands. */
.hero-art img.landed { animation: hero-float 5.5s ease-in-out infinite, hero-pop .34s ease-out; }
@keyframes hero-pop { 0% { transform: scale(.9); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes hero-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hero-art img, .hero-art img.landed { animation: none; } }

.hero-plate {
  position: relative; z-index: 2; text-align: center; min-height: 34px;
  display: flex; flex-direction: column; gap: 1px;
}
.hero-num { font-family: var(--mono); font-size: 15px; color: var(--rh); letter-spacing: .02em; }
.hero-meta { font-size: 12px; color: var(--muted); text-transform: lowercase; letter-spacing: .02em; min-height: 15px; }
.hero-roll {
  position: relative; z-index: 2; font-size: 13px; padding: 8px 18px;
}
.hero-roll:active { transform: translateY(1px); }

/*
 * The proof-of-life strip.
 *
 * Everything else on the front page is the project talking about itself. This
 * is the only part that is evidence, so it sits directly under the headline —
 * and it is [hidden] in the markup until real numbers arrive, because an
 * unconfigured deploy showing four zeroes argues the opposite of what the
 * strip is for. No database, no strip, and the page reads exactly as it did.
 */
.pulse {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 8px 0 34px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.pulse div { min-width: 0; }
.pulse b {
  display: block; font-family: var(--mono); font-size: 26px; line-height: 1.1;
  color: var(--rh); letter-spacing: -.02em;
}
.pulse span {
  display: block; margin-top: 3px; font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
}
/* A live number should look live. One pass when it lands, then it sits still. */
.pulse b { animation: pulse-in .5s ease-out; }
@keyframes pulse-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pulse b { animation: none; } }
@media (max-width: 700px) {
  .pulse { grid-template-columns: repeat(2, 1fr); gap: 14px 12px; padding: 16px; }
  .pulse b { font-size: 22px; }
}

/*
 * The Warrant pitch.
 *
 * A guaranteed mint hidden in a dungeon is the most interesting mechanic in
 * the project and it had one sentence in a paragraph about something else.
 * It gets a panel, and the panel gets the gold Hollowed standing in it.
 */
.warrant-pitch {
  display: grid; grid-template-columns: minmax(0,1fr) 220px; gap: 34px; align-items: center;
  margin-top: 30px; padding: 38px 34px;
  border: 1px solid var(--line-lit); border-radius: var(--r-lg);
  background:
    radial-gradient(90% 120% at 100% 50%, rgba(255,200,50,.10), transparent 62%),
    radial-gradient(80% 120% at 0% 0%, rgba(204,255,0,.08), transparent 60%),
    var(--surface);
}
.warrant-pitch h2 { font-size: 34px; line-height: 1.1; letter-spacing: -.03em; margin: 0 0 14px; }
.warrant-pitch h2 em { font-style: normal; color: var(--rh); }
.warrant-pitch .lede { margin-bottom: 12px; }
.warrant-pitch .note { max-width: 56ch; }
.warrant-mark { position: relative; justify-self: center; }
.warrant-mark::after {
  content: ''; position: absolute; inset: -8%; z-index: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,200,50,.28), transparent 68%); filter: blur(26px);
}
.warrant-mark img {
  position: relative; z-index: 1; width: 100%; height: auto; display: block;
  image-rendering: pixelated;
  animation: warrant-float 4.5s ease-in-out infinite;
}
@keyframes warrant-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) { .warrant-mark img { animation: none; } }
@media (max-width: 760px) {
  .warrant-pitch { grid-template-columns: 1fr; gap: 20px; padding: 30px 22px; text-align: left; }
  .warrant-pitch h2 { font-size: 27px; }
  .warrant-mark { width: 150px; order: -1; justify-self: start; }
}

.reel {
  display: block; width: 100%; max-width: 520px; margin: 0 auto;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow); image-rendering: pixelated; background: #0b0f0c;
}

.section { margin-top: 60px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .note { margin-left: auto; }

.mint { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; }
.mint div { background: #131a13; padding: 18px 20px; }
.mint dt { font-size: 12px; color: var(--faint); margin: 0 0 4px; }
.mint dd { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.mint dd.tba { color: var(--muted); font-weight: 600; font-size: 16px; }

.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 16px; }
.rare { display: flex; gap: 14px; align-items: center; }
.rare .swatch { width: 46px; height: 46px; border-radius: 15px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.16); }
.rare .rname { font-weight: 700; }
.rare .rdesc { color: var(--muted); font-size: 13px; }

footer { margin-top: 72px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--rh); }

@media (prefers-reduced-motion: reduce) {
  .cell, .btn { transition: none; }
  .cell:hover, .btn:hover { transform: none; }
  .hit { animation: none; }
  /* The cycle is switched off in script too; this covers the frame mid-flight. */
  .floater.glitching .gl-base,
  .floater.glitching .gl-a,
  .floater.glitching .gl-b { animation: none; }
}
@media (max-width: 900px) {
  .about-layout { grid-template-columns: 1fr; gap: 32px; }
  /* Sticky in a single column would park the ghost on top of the prose. */
  .about-aside { position: static; order: -1; max-width: 260px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .hero { padding-top: 28px; }
  .hero h1 { font-size: 34px; }
  .hero-art { width: 100%; max-width: 320px; margin: 0 auto; }
  .art { width: 100%; }
  .nav-links a { padding: 8px 11px; }
}
