/* ==========================================================================
   Trial of the Feather — the ONE live skin: "carved stone" (founder, 2026-09-26:
   "so boxy and AI looking, not thematic"). MATERIALS, not tokens: no rectangle
   with a border anywhere — every surface is a carved stone object.
     ground   = the crypt wall (assets/stone/crypt-portal.webp), darkened, torchlit
     header   = the carved lintel (lintel-*.webp: sconces · band · rune medallion),
                the Order's mark over the medallion, live flames on the sconces
     panels   = a real stone tablet at any size: border-image 9-slice of
                tablet-9.webp (the skull patched out of the band so it can repeat)
                + the skull medallion re-hung at the crest (tablet-medallion.webp)
     keys     = the angled stone slab (stone-button.webp), engraved glowing
                lettering laid on its tilted face (js/slab.js wraps it in .btn__face)
     chips    = small stone plates (a tighter slice of the tablet) holding a coin
     ladder   = three carved medallions on a stone stele (a nested tablet)
     rite     = three carved steps cut into the tablet, a gold check inlay when done
     satchel  = five recesses with the sigil marks inlaid, the forge as a hearth
                block, the seal trophy on a slab plinth
     market   = a stone counter with a recessed top, engraved listings, the
                "Weigh the purchase" ledger tablet with the scales inset
     card     = the likeness, plainly framed (a 2px gold-deep edge on a dark panel)
     standings= the great stele, rank medallions for the top three, the wallet
                tablet with a real-monospace address field
   Text: bone on stone (engraved: dark inset shadow + warm highlight), gold for
   numbers, ember for live glow, School colours on the sigil marks. No hairline
   dividers — short chiselled rules or nothing. Floor: nothing under 0.72rem.
   History: css/_v1-gold/ (parchment draft), css/_v2-crystal/ (the Site's crystal
   language), css/_v3-reference/ (the AIDesigner dashboard port). Logic never lives here.
   ========================================================================== */

:root {
  --bone: #e8dfc9; --dim: #a79a80; --faded: #6e6357;
  --gold: #d1b26f; --gold-hi: #e4c36a; --gold-100: #fcf3db; --gold-deep: #8a6a3b;
  --ember: #ff8a2a; --ember-deep: #7c2d12;
  --stone-950: #0d0c0a; --stone-900: #1a1815; --stone-800: #2a2622;
  --school-magicka: #4d8cc9; --school-alchemy: #6ea84b; --school-astronomy: #8a52c4; --school-necromancy: #9ca3af; --school-philosophy: #c98a4d;

  --engrave: 0 -1px 0 rgba(0, 0, 0, 0.95), 0 1px 0 rgba(255, 235, 190, 0.12), 0 2px 6px rgba(0, 0, 0, 0.6);
  --gold-glow: 0 -1px 1px rgba(0, 0, 0, 0.95), 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 10px rgba(228, 195, 106, 0.45), 0 0 26px rgba(201, 160, 63, 0.2);
  --gold-glow-hi: 0 -1px 1px rgba(0, 0, 0, 0.95), 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 14px rgba(228, 195, 106, 0.7), 0 0 34px rgba(201, 160, 63, 0.35);
  --ember-glow: 0 0 10px rgba(255, 138, 42, 0.6), 0 0 24px rgba(255, 138, 42, 0.3);
  --carve: inset 0 3px 10px rgba(0, 0, 0, 0.85), inset 0 -1px 0 rgba(255, 235, 190, 0.05);   /* a recess cut into stone */

  --tablet: url("../assets/stone/tablet-9.webp") 10.55% fill;
  --slab: url("../assets/stone/stone-button.webp");

  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-body: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --font-ui: 'Aldrich', 'Segoe UI', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --max: 1360px;
  --gutter: clamp(14px, 2.5vw, 32px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* aliases the dormant css/forge-key.css reads */
  --gold-hair: rgba(228, 195, 106, 0.4); --carve-grey: #b9ad93; --recess: var(--stone-950);
  --stone-tex: url("../assets/stone/crypt-portal.webp"); --chisel: var(--carve); --edge-hi: rgba(255, 235, 190, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; }
/* the founder found the type tiny on a desk (2026-10-06); every role is in rem, so one line lifts the whole platform to 18px there.
   Phones stay at 16px: the tablets' fixed 9-slice borders leave no room for more. */
@media (min-width: 900px) { html { font-size: 106.25%; } }   /* 17px on a laptop */
@media (min-width: 1320px) { html { font-size: 112.5%; } }   /* 18px on a desk */
body {
  margin: 0; min-height: 100vh;
  background: #050505;
  color: var(--bone);
  font-family: var(--font-body); font-size: 1.08rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* the crypt wall, darkened, with torchlight in the top corners and a vignette */
body::before { content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none; background: url("../assets/stone/crypt-portal.webp") center top / cover no-repeat; filter: brightness(0.5) saturate(0.85); }
body::after {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 480px 340px at 10% 0%, rgba(255, 138, 42, 0.17), transparent 70%),
    radial-gradient(ellipse 480px 340px at 90% 0%, rgba(255, 138, 42, 0.17), transparent 70%),
    radial-gradient(ellipse 85% 75% at 50% 45%, transparent 35%, rgba(0, 0, 0, 0.78) 100%);
}
#dust { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

::selection { background: var(--gold-deep); color: #fff; }
a { color: var(--gold-hi); text-decoration: none; }
a:hover { color: var(--gold-100); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
input, select, textarea { font: inherit; color: inherit; }
input { user-select: text; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 3px; }
[hidden] { display: none !important; }
b, strong { font-weight: 500; }

/* ---------- glyphs (inline SVG, currentColor) ---------- */
.glyph { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.15em; color: var(--gold); }
.art__glyph { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Type: engraved ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; margin: 0; color: var(--bone); text-shadow: var(--engrave); text-wrap: balance; }
.label { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 0.86rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bone); text-shadow: var(--engrave); }
.label::after { content: ""; display: block; width: 44px; height: 2px; margin-top: 6px; background: linear-gradient(90deg, rgba(228, 195, 106, 0.75), rgba(228, 195, 106, 0.08)); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.85); }   /* a short chiselled rule */
.eyebrow { font-family: var(--font-display); font-size: 0.84rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--dim); text-shadow: var(--engrave); }
.dim { color: var(--dim); }
.soul { color: var(--gold-hi); text-shadow: var(--gold-glow); }

/* ---------- Header: the carved lintel (sconces at the ends, the band between; the medallion is patched out) ---------- */
.top {
  position: sticky; top: 0; z-index: 60;
  height: 112px; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 24px;
  padding: 0 84px;
  background:
    url("../assets/stone/lintel-cap-l.webp") left top / auto 100% no-repeat,
    url("../assets/stone/lintel-cap-r.webp") right top / auto 100% no-repeat,
    url("../assets/stone/lintel-band.webp") center top / auto 100% repeat-x;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.8));
}
/* the brand lockup on the band: the mark disc with the name engraved beside it */
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand__mark { width: 62px; height: 62px; flex: none; border-radius: 50%; object-fit: cover; padding: 3px; background: var(--stone-950); box-shadow: 0 0 0 2px #3a3128, 0 0 0 4px #14120e, 0 6px 14px #000, 0 0 26px rgba(255, 138, 42, 0.22); }
.brand__text { display: flex; flex-direction: column; gap: 2px; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 0.92rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone); text-shadow: var(--engrave); white-space: nowrap; }
.brand__sub { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); text-shadow: var(--engrave); white-space: nowrap; }
/* order on the band: the lockup first, then the rooms, the keys at the far end */
.brand { order: -1; }
.rooms { justify-self: center; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 4px; }
.rooms a { position: relative; font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: #b9ad93; white-space: nowrap; padding: 10px 14px; text-shadow: var(--engrave); transition: color 0.25s, text-shadow 0.25s; }
.rooms a:hover { color: var(--gold-hi); text-shadow: var(--gold-glow); }
/* the phone menu key (js/nav.js): hidden on desktop, a 44px stone key on a phone; the bars swap for an X while open */
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; margin: 0; border: 1px solid rgba(214, 170, 90, 0.38); border-radius: 4px; background: rgba(0, 0, 0, 0.42); color: var(--gold-hi); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 6px #000; cursor: pointer; flex: none; }
.nav-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-toggle__x, .top.nav-open .nav-toggle__bars { display: none; }
.top.nav-open .nav-toggle__x { display: block; }
.rooms a.here { color: var(--gold-hi); text-shadow: var(--gold-glow); }
.rooms a.here::after { content: "◆"; position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); font-size: 0.5em; color: var(--gold-hi); text-shadow: 0 0 6px var(--gold-hi); }
.top__cta { justify-self: start; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { font-family: var(--font-display); font-weight: 700; font-size: 0.84rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); text-shadow: var(--engrave); }
.who { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; color: var(--gold-hi); text-shadow: var(--engrave); max-width: 220px; }
.who b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .avatar { width: 30px; height: 30px; object-fit: cover; flex: none; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px #3a3128, 0 0 0 3px #14120e, 0 2px 6px #000; }
/* the sconces are painted into the lintel's caps (340x601, drawn at the lintel's 112px, so 63px wide): each bowl's
   centre sits 23px in from the OUTER edge with its rim ~36px down, so the 46px flame canvas is flush with that edge
   (centre 23px) and its particles are born at 94 % of 50px = 47px, inside the bowl, rising through the painted flame.
   (The old 56px canvas at 8px put the live flame 13px off the bowl, to the left on the right sconce.) */
.torch { position: absolute; top: 0; width: 46px; height: 50px; pointer-events: none; z-index: 1; }
.torch--l { left: 0; }
.torch--r { right: 0; }
.torch__flame { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Room head (the rooms whose title sits on the wall above the tablets) ---------- */
/* the tablets sit in the CENTRE of the wall below the lintel (founder: "move into the center"): the room fills the
   viewport under the 112px lintel and centres its block; on a screen too short for the whole tablet it simply flows
   from the top with the same breath (~44px on a phone, ~65px at 1440, 84px wide) above and below */
/* the rooms stay hidden until the store knows the visitor is signed in (founder, 2026-10-06: the dashboard flashed before the
   Enter dialog); the lintel and the dialog stay visible. shell.js drops `gated` on sign-in and restores it on leave */
body.gated .room { visibility: hidden; }
.room { max-width: var(--max); margin: 0 auto; padding: clamp(44px, 4.5vw, 84px) var(--gutter); box-sizing: border-box; min-height: calc(100vh - 112px); display: flex; flex-direction: column; justify-content: center; }
/* The Chest sits about a tenth of the screen higher than true centre (founder, 2026-09-26: "bring the
   center back up by like 10%"). Two parts: a short top pad, so on a laptop (where the tablet nearly fills
   the room) it tucks up under the lintel instead of floating 84px below it; and extra bottom padding, which
   on a tall monitor lifts a centred column by half of it — 20vh → 10vh up. Short viewports scroll as before. */
@media (min-width: 901px) {
  .page-chest .room { padding-top: 24px; justify-content: flex-start; }
}
@media (min-width: 901px) and (min-height: 1200px) {
  .page-chest .room { justify-content: center; padding-bottom: calc(clamp(44px, 4.5vw, 84px) + 20vh); }
}
.room-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; padding: 0 4px; }
.room-head h1 { font-size: clamp(1.6rem, 2.6vw, 2rem); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-100); text-shadow: var(--gold-glow-hi), 0 4px 16px rgba(0, 0, 0, 0.9); }
.room-head p { margin: 0; font-style: italic; color: var(--dim); font-size: 1.02rem; text-shadow: 0 2px 8px #000; }
.room-head p span { font-style: normal; color: var(--gold-deep); font-size: 0.86rem; margin-left: 6px; }

/* ---------- Layout ---------- */
.rite-app, .standings-app { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); gap: 28px; align-items: start; }

/* ---------- The tablet: one panel primitive (a 9-slice of the carved stone) ---------- */
.panel {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border: 54px solid transparent;
  border-image: var(--tablet) / 54px / 0 round;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.75);
}
/* no crest ornament — the frame's runes and corner eyes are the tablet's only carving */
.head { display: flex; justify-content: space-between; align-items: center; gap: 14px 16px; flex-wrap: wrap; padding: 2px 2px 16px; }
.head > .chips { flex-basis: 100%; justify-content: flex-start; }
.market-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.body { padding: 4px 2px 8px; display: flex; flex-direction: column; gap: 16px; }
.hint { font-style: italic; color: var(--dim); font-size: 0.98rem; text-shadow: var(--engrave); }
.hint::before { content: '⟡ '; color: var(--gold-hi); font-style: normal; text-shadow: 0 0 8px rgba(228, 195, 106, 0.5); }
.hint:empty { display: none; }
.panel > .hint { padding: 14px 2px 0; margin: 0; }
.page-chest .panel > .hint { text-align: center; }
.banner {
  position: absolute; left: 50%; top: 10px; transform: translate(-50%, -10px); z-index: 7;
  border: 16px solid transparent; border-image: var(--tablet) / 16px / 0 round;
  padding: 4px 12px 8px; max-width: 84%; text-align: center; pointer-events: none;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.85));
  opacity: 0; transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.banner b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-hi); text-shadow: var(--gold-glow-hi); }
.banner span { font-style: italic; color: var(--bone); font-size: 0.98rem; text-shadow: var(--engrave); }
.banner.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Chips: small stone plates holding a gold coin ---------- */
.chips { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.chip {
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  border: 12px solid transparent; border-image: var(--tablet) / 12px / 0 round;
  padding: 2px 10px 4px 4px;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.7));
}
.chip .dot { display: none; }
.chip .glyph, .chip .mark { grid-column: 1; grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 50%; padding: 7px; background: radial-gradient(circle at 35% 30%, #fff0bf, #e4c36a 40%, #c9a03f 72%, #6b4f16); color: #3a2a08; border: 0; box-shadow: 0 0 0 1px #4a3a14, 0 2px 5px #000, 0 0 10px rgba(228, 195, 106, 0.25); }
.chip .mark { padding: 0; }
.chip .mark .art__glyph { width: 56%; height: 56%; stroke-width: 2; filter: none; }
.chip b { grid-column: 2; grid-row: 1; font-family: var(--font-ui); font-weight: 400; font-size: 1.1rem; line-height: 1.1; color: var(--gold-hi); text-shadow: var(--gold-glow); font-variant-numeric: tabular-nums; }
.chip .u { grid-column: 2; grid-row: 2; font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); text-shadow: var(--engrave); }
.chip.event b { grid-row: 1 / 3; align-self: center; font-size: 1rem; }
.chip.streak .glyph { background: radial-gradient(circle at 35% 30%, #ffd27a, #ff8a2a 45%, #c2410c 72%, #4a1a06); color: #3a1206; box-shadow: 0 0 0 1px #4a2a14, 0 2px 5px #000; }
.chip.streak.lit .glyph { box-shadow: 0 0 0 1px #4a2a14, 0 2px 5px #000, 0 0 14px rgba(255, 138, 42, 0.6); }
.chip.streak.lit b { color: var(--ember); text-shadow: var(--ember-glow); }
.chip.event.urgent b { color: var(--ember); text-shadow: var(--ember-glow); }

/* ---------- Keys: the angled stone slab, lettering on its tilted face ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 0; padding: 0.8em 1.6em 1.3em; line-height: 1.2; text-align: center; text-decoration: none;
  border: 0; background: var(--slab) center / 100% 100% no-repeat;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.75));
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-hi); text-shadow: var(--gold-glow);
  transition: filter 0.25s, color 0.25s, transform 0.12s var(--ease), text-shadow 0.25s;
}
.btn__face { display: inline-flex; align-items: center; justify-content: center; gap: 8px; transform: perspective(300px) rotateX(11deg); transform-origin: 50% 100%; }
.btn:hover { color: var(--gold-100); text-shadow: var(--gold-glow-hi); filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 16px rgba(228, 195, 106, 0.28)); }
/* focus on a slab is a glow, never a box drawn around the stone */
.btn:focus-visible { outline: none; color: var(--gold-100); text-shadow: var(--gold-glow-hi); filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 18px rgba(228, 195, 106, 0.45)); }
.btn:active { transform: translateY(3px) scale(0.985); filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.8)) brightness(0.9); }
.btn.primary, .btn.provider { font-size: 1.2rem; letter-spacing: 0.2em; padding: 1.05em 2.6em 1.8em; min-width: 340px; color: var(--gold-100); text-shadow: var(--gold-glow-hi); }
.btn.primary > .glyph, .btn.provider > .glyph, .btn .btn__face > .glyph { width: 1.05em; height: 1.05em; color: inherit; }
.btn.tiny { font-size: 0.84rem; letter-spacing: 0.12em; padding: 0.7em 1.15em 1.15em; }
.btn.quiet { background: none; filter: none; padding: 0.5em 0.9em; color: var(--dim); text-shadow: var(--engrave); }
.btn.quiet .btn__face { transform: none; }
.btn.quiet:hover { color: var(--gold-hi); text-shadow: var(--gold-glow); filter: none; }
.btn:disabled, .btn[aria-disabled="true"] { color: var(--faded); text-shadow: var(--engrave); transform: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.7)) brightness(0.72); }
select.btn { appearance: none; -webkit-appearance: none; padding: 0.7em 1.6em 1.1em 1.1em; }
select.btn option { background: var(--stone-900); color: var(--bone); font-family: var(--font-body); letter-spacing: 0; text-transform: none; }

/* ---------- Fields: recesses cut into the stone ---------- */
.rite-form input, .rite-form select, #walletForm input, .checker input, .enter-dev input, .entry-post {
  width: 100%; min-width: 0; padding: 11px 14px; outline: 0; border: 0; border-radius: 3px;
  background: rgba(0, 0, 0, 0.45); color: var(--bone);
  font-family: var(--font-ui); font-size: 0.88rem; letter-spacing: 0.03em; line-height: 1.3;
  box-shadow: var(--carve);
  transition: box-shadow 0.25s;
}
.rite-form input:focus, .rite-form select:focus, #walletForm input:focus, .checker input:focus, .enter-dev input:focus, .entry-post:focus { box-shadow: var(--carve), 0 0 12px rgba(228, 195, 106, 0.25); outline: 0; }
.rite-form input:disabled, #walletForm input:disabled, .entry-post:disabled { opacity: 0.5; }
::placeholder { color: var(--faded); opacity: 1; }
.rite-form select option { background: var(--stone-900); }
/* verbatim identifiers read back character by character: a real monospace, never Aldrich */
#walletForm input, .checker input, .wallet-current code { font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.01em; }
.entry-post { font-family: var(--font-body); font-size: 1.02rem; }

/* ---------- Stats: engraved on the tablet ---------- */
.kv-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 10px; padding: 6px 0 4px; }
.kv-rows .row { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.kv-rows .row > span { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); text-shadow: var(--engrave); }
.kv-rows .row b { font-family: var(--font-ui); font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--gold-hi); font-variant-numeric: tabular-nums; text-shadow: var(--gold-glow); }
.kv-rows .row b.txt { font-family: var(--font-display); font-weight: 700; font-size: 0.86rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone); text-shadow: var(--engrave); }
.empty-note { font-style: italic; color: var(--dim); font-size: 0.98rem; text-align: center; text-shadow: var(--engrave); }
.rite-note { font-style: italic; color: var(--dim); font-size: 1rem; text-align: center; margin: 0; text-shadow: var(--engrave); }
.rite-note b { color: var(--bone); }
.rite-note .mark { vertical-align: middle; margin-right: 6px; }

/* ---------- The prize ladder: three carved medallions on a stone stele ---------- */
.ladder-legend { display: grid; gap: 4px; margin-top: 6px; border: 26px solid transparent; border-image: var(--tablet) / 26px / 0 round; padding: 2px 0; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.7)); }
.ladder-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title places" "cost places"; column-gap: 16px; align-items: center; padding: 9px 6px 9px 58px; min-height: 58px; }
.ladder-row .tier-pill { grid-area: title; white-space: normal; line-height: 1.15; }   /* "Guaranteed WL" wraps instead of running into the count */
.ladder-row b { grid-area: cost; font-family: var(--font-display); font-weight: 400; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); text-shadow: var(--engrave); }
.ladder-row em { grid-area: places; font-style: normal; text-align: right; white-space: nowrap; min-width: 88px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; align-self: center; }
.ladder-row em strong { font-family: var(--font-ui); font-weight: 400; font-size: 1.1rem; line-height: 1; font-variant-numeric: tabular-nums; color: var(--gold-hi); text-shadow: var(--gold-glow); }
.ladder-row em span { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); text-shadow: var(--engrave); }
.ladder-row .tier-pill::before { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; font-size: 1rem; }
.ladder-row.you .tier-pill { color: var(--gold-100); }
/* the medallion: carved into the stone, gold / silver / bronze; inline and small elsewhere */
.tier-pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone); white-space: nowrap; text-shadow: var(--engrave); --n: "•"; --m1: #e6e8e3; --m2: #9ca3af; --m3: #4b5563; --mtext: #1a1508; }
.tier-pill::before { content: var(--n); display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--m1), var(--m2) 48%, var(--m3) 80%); color: var(--mtext); font-family: var(--font-ui); font-size: 0.8rem; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.75), 0 0 0 3px #3a3128, inset 0 -2px 4px rgba(0, 0, 0, 0.5), 0 3px 8px #000; flex: none; text-shadow: none; }
.tier-pill.free-nft { --n: "1"; --m1: #fff0bf; --m2: #e4c36a; --m3: #6b4f16; color: var(--gold-hi); }
.tier-pill.gtd { --n: "2"; --m1: #ffffff; --m2: #d1d5db; --m3: #4b5563; }
.tier-pill.priority { --n: "3"; --m1: #ffd7a8; --m2: #f97316; --m3: #5a2410; --mtext: #fff3e0; color: #f0c9a0; }

/* ---------- Art slots ---------- */
.mark { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #2a2622, #0d0c0a 70%); box-shadow: inset 0 0 8px #000, 0 0 0 1px rgba(0, 0, 0, 0.85), 0 0 0 2px #3a3128, 0 2px 5px #000; color: var(--gold); vertical-align: middle; }
.mark .art__glyph { width: 56%; height: 56%; }
.mark .art__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.mark--sm { width: 32px; height: 32px; }
.mark--lg { width: 56px; height: 56px; }
.mark--coin { width: 24px; height: 24px; }
[data-school="magicka"] { --school: var(--school-magicka); }
[data-school="alchemy"] { --school: var(--school-alchemy); }
[data-school="astronomy"] { --school: var(--school-astronomy); }
[data-school="necromancy"] { --school: var(--school-necromancy); }
[data-school="philosophy"] { --school: var(--school-philosophy); }
.mark--sigil { color: var(--school, var(--gold)); }
.school-cell, .frag-slot span, .reveal li.frag .amt { color: var(--school, var(--bone)); }
.art { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(0, 0, 0, 0.4); box-shadow: var(--carve); border-radius: 3px; color: var(--gold); }
.art .art__glyph { width: 38%; max-width: 150px; height: auto; opacity: 0.9; filter: drop-shadow(0 0 12px rgba(228, 195, 106, 0.3)); }
.art .art__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4%; }
.art__name { position: absolute; left: 12px; right: 12px; top: 10px; text-align: center; font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-deep); text-shadow: var(--engrave); pointer-events: none; }
/* Once the founder's file is in, the drawn fallback and the slot-name label are debug chrome and must never reach a
   player — !important so no later skin rule (a per-slot glyph override, a breakpoint) can resurrect either of them. */
.art--loaded .art__glyph, .art--loaded .art__glyph-wrap, .art--loaded > .art__name { display: none !important; }
.art__glyph-wrap { display: contents; }
.art--pixel .art__img, .art--pixel { image-rendering: pixelated; }
.art__img { transition: opacity 0.65s var(--ease); }
.art__img.is-in, .art__img.is-out { opacity: 0; }
.art__strip { position: absolute; inset: 0; z-index: 3; background-repeat: no-repeat; background-position: 0 0; background-size: calc(var(--frames, 8) * 100%) 100%; animation: artStrip 0.9s forwards; pointer-events: none; }
.art[data-art-mode="bg"].art--loaded { background-size: contain; background-position: center; background-repeat: no-repeat; }

/* ---------- The Rite of Entry: three steps carved into the tablet ---------- */
.entry-rite { margin: 0 0 14px; padding: 0 0 4px; }
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.entry-reward { font-style: italic; color: var(--gold-hi); font-size: 0.98rem; text-shadow: var(--engrave); }
.entry-steps { display: flex; flex-direction: column; gap: 8px; }
.entry-step { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 3px; background: rgba(0, 0, 0, 0.3); box-shadow: var(--carve); }
.entry-step.done { opacity: 0.8; }
.entry-n { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: var(--gold-hi); width: 28px; text-align: center; flex: none; text-shadow: var(--gold-glow); }
.entry-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.entry-body b { font-family: var(--font-display); font-weight: 700; font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone); text-shadow: var(--engrave); }
.entry-body em { font-size: 0.95rem; color: var(--dim); font-style: italic; text-shadow: var(--engrave); }
.entry-tick { flex: none; width: 48px; text-align: center; color: var(--gold-hi); font-size: 1.25rem; text-shadow: 0 0 10px rgba(228, 195, 106, 0.6), 0 -1px 0 #000; }   /* the gold check inlay */
.entry-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.entry-actions .btn.primary { min-width: 0; font-size: 0.9rem; letter-spacing: 0.14em; padding: 0.8em 1.7em 1.3em; }
.entry-post { flex: 1 1 260px; }
.entry-status { font-size: 0.95rem; color: var(--dim); font-style: italic; text-shadow: var(--engrave); }
.entry-error { font-size: 0.98rem; color: var(--ember); font-style: italic; margin-top: 8px; min-height: 1em; text-shadow: var(--engrave); }

/* ---------- The Chest: the founder's render IS the hero — it fills the stage's height on the left; the copy, its one-line state and the key sit on the right ---------- */
.chest-scene { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.hero-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 3px; background: var(--stone-950) url("../assets/aidesigner/chest-altar.webp") 30% 40% / cover no-repeat; box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.9), inset 0 0 0 2px rgba(0, 0, 0, 0.7); }
/* the painted altar is only a faint texture now (founder review 10-06: its plinth read as a second object behind the render) */
.hero-stage::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13, 12, 10, 0.74), rgba(13, 12, 10, 0.7) 45%, rgba(13, 12, 10, 0.93)); pointer-events: none; }
.hero-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13, 12, 10, 0.92), transparent 55%); pointer-events: none; }
.hero-copy { position: absolute; left: 57%; right: 4%; top: 12%; z-index: 2; }
.hero-copy .glyph { width: 1.6rem; height: 1.6rem; color: rgba(228, 195, 106, 0.85); filter: drop-shadow(0 0 8px rgba(228, 195, 106, 0.5)); margin-bottom: 8px; }
.hero-copy h1 { font-size: clamp(1.8rem, 2.7vw, 2.75rem); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-100); text-shadow: var(--gold-glow-hi), 0 4px 16px rgba(0, 0, 0, 0.9); margin-bottom: 12px; }
.hero-copy p { margin: 0; font-size: 1.1rem; font-style: italic; color: var(--bone); line-height: 1.5; text-shadow: 0 2px 8px #000; }
.hero-copy p span { font-style: normal; color: var(--gold-deep); font-size: 0.86rem; margin-left: 6px; }
/* the chest's one-line state ("Something waits inside." / "Emptied for today…") lives in the copy block — never over the art */
.hero-caption { display: block; margin-top: 12px; font-style: italic; font-size: 1rem; line-height: 1.45; color: var(--gold-hi); text-shadow: 0 2px 8px #000, 0 0 12px #000; }
.hero-cta { margin-top: 24px; display: flex; justify-content: flex-start; }   /* inside .hero-copy: title, line, caption, key, one stack */
.hero-cta .btn.primary { min-width: 0; width: 100%; max-width: 340px; font-size: 1.05rem; letter-spacing: 0.16em; padding: 0.95em 1.2em 1.6em; white-space: nowrap; }
/* the founder's render — a cut-out on alpha, 1024², the chest body ≈ 79 % of the canvas, closed and open on one shared
   canvas with the body aligned — fills the stage's height on the left; its arcane glow may run under the copy */
.chest-slot { position: absolute; left: 3%; top: 3%; width: 52%; height: 94%; z-index: 1; background: none; box-shadow: none; border-radius: 0; overflow: visible; color: var(--gold-hi); }
.chest-slot .art__glyph { display: none; }   /* until the file lands, the painted altar chest behind the slot stands in */
/* a pool of dark behind the render so the painted altar chest never shows through its alpha */
.chest-slot::before { content: ""; position: absolute; inset: 0 8% 0 0; border-radius: 40%; pointer-events: none; opacity: 0; transition: opacity 0.6s; background: radial-gradient(ellipse 60% 56% at 48% 50%, rgba(13, 12, 10, 0.97) 40%, transparent 78%); }
.chest-slot.art--loaded::before { opacity: 1; }
.chest-slot .art__img { padding: 0; z-index: 1; }
.chest-slot .art__name { top: 8px; color: rgba(138, 106, 59, 0.85); }
/* LIVE: ready to open — an ember pulse under the chest; opened — the arcane green pours out */
.chest-slot::after { content: ""; position: absolute; inset: 8%; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 0.6s; background: radial-gradient(ellipse 44% 36% at 50% 64%, rgba(255, 138, 42, 0.3), transparent 70%); }
.chest-scene:has(#openBtn:not([hidden])) .chest-slot::after { opacity: 1; animation: pulse 2.4s ease-in-out infinite; }
.chest-slot.open::after { opacity: 1; animation: none; background: radial-gradient(ellipse 46% 40% at 50% 50%, rgba(197, 250, 1, 0.2), transparent 70%); }
.chest-slot.shake { animation: chestShake 0.45s ease-in-out; }
@keyframes chestShake { 0%, 100% { transform: none; } 25% { transform: rotate(-2deg); } 50% { transform: rotate(1.5deg) translateY(-2px); } 75% { transform: rotate(-1deg); } }
.chest-after { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 22px 2px 8px; }
/* the reveal: engraved rows, the number in gold, no dividers — one chiselled rule above the total */
.reveal { display: flex; flex-direction: column; gap: 2px; width: min(520px, 100%); }
.reveal li { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 8px 6px; font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.06em; color: var(--bone); text-shadow: var(--engrave); opacity: 0; transform: translateX(-14px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); overflow: hidden; }
.reveal li > * { grid-row: 1; }
.reveal li.in, .reveal li.shown { opacity: 1; transform: none; }
.reveal li.in::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(230, 205, 152, 0.16) 50%, transparent 70%); background-size: 260% 100%; background-position: 120% 0; animation: sweep 0.9s ease-out forwards; }
.reveal li .glyph { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff0bf, #e4c36a 40%, #c9a03f 72%, #6b4f16); color: #3a2a08; box-shadow: 0 0 0 1px #4a3a14, 0 2px 5px #000; }
.reveal li .mark--coin { width: 30px; height: 30px; background: radial-gradient(circle at 35% 30%, #fff0bf, #e4c36a 40%, #c9a03f 72%, #6b4f16); color: #3a2a08; box-shadow: 0 0 0 1px #4a3a14, 0 2px 5px #000; }
.reveal li .mark--coin .art__glyph { stroke-width: 2; }
.reveal li em { grid-column: 2; font-style: italic; font-family: var(--font-body); font-size: 1.15rem; letter-spacing: 0; color: var(--dim); text-transform: none; }
.reveal li .amt { grid-column: 3; font-family: var(--font-ui); font-weight: 400; font-size: 1.3rem; letter-spacing: 0.02em; color: var(--gold-hi); font-variant-numeric: tabular-nums; text-align: right; text-shadow: var(--gold-glow); }
.reveal li.streak .glyph { background: radial-gradient(circle at 35% 30%, #ffd27a, #ff8a2a 45%, #c2410c 72%, #4a1a06); color: #3a1206; }
.reveal li.streak .amt { color: var(--ember); text-shadow: var(--ember-glow); }
.reveal li.frag .amt { font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.06em; text-shadow: var(--engrave); }
.reveal li.none .mark, .reveal li.none .glyph { filter: grayscale(1) brightness(0.6); }
.reveal li.total { margin-top: 8px; padding-top: 14px; }
.reveal li.total::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 140px; height: 2px; background: linear-gradient(90deg, transparent, rgba(228, 195, 106, 0.7), transparent); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.85); }
.reveal li.total .amt { font-size: 1.4rem; color: var(--gold-100); text-shadow: var(--gold-glow-hi); }
.reveal:empty { display: none; }
/* the countdown, engraved in Aldrich on a stone plate */
#countdownBox { display: inline-block; border: 18px solid transparent; border-image: var(--tablet) / 18px / 0 round; padding: 2px 22px 8px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.7)); }
.countdown { font-family: var(--font-ui); font-size: 2.2rem; letter-spacing: 0.06em; color: var(--gold-hi); text-shadow: var(--gold-glow-hi); font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown-label { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); text-shadow: var(--engrave); margin-bottom: 4px; }
.age-rule { font-style: italic; color: var(--dim); font-size: 0.95rem; text-align: center; max-width: 480px; margin: 0; text-shadow: var(--engrave); }
.too-young { font-style: italic; color: var(--bone); font-size: 1.02rem; text-align: center; max-width: 480px; text-shadow: var(--engrave); }
.too-young b { color: var(--gold-hi); }

/* ---------- The Satchel: five recesses, the hearth, the trophy on its plinth ---------- */
.frag-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.frag-slot { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px 12px; border-radius: 3px; background: rgba(0, 0, 0, 0.32); box-shadow: var(--carve); transition: box-shadow 0.3s; }
.frag-slot.have { box-shadow: var(--carve), 0 0 0 1px rgba(228, 195, 106, 0.35), 0 0 16px rgba(228, 195, 106, 0.14); }
.frag-slot.short .mark { opacity: 0.5; filter: grayscale(1); }
.frag-slot.short span { opacity: 0.6; }
.frag-slot b { font-family: var(--font-ui); font-weight: 400; font-size: 1.4rem; line-height: 1; color: var(--gold-hi); text-shadow: var(--gold-glow); }
.frag-slot.short b { color: var(--faded); text-shadow: var(--engrave); }
.frag-slot span { font-family: var(--font-display); font-size: 0.84rem; letter-spacing: 0.12em; text-transform: uppercase; text-align: center; text-shadow: var(--engrave); }
/* the forge: a stone hearth block — a deep recess with ember heat inside */
.forge-box { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 20px; border-radius: 3px; background: radial-gradient(ellipse 70% 50% at 50% 100%, rgba(255, 138, 42, 0.14), transparent 70%), rgba(0, 0, 0, 0.34); box-shadow: var(--carve), inset 0 -20px 40px rgba(124, 45, 18, 0.12); transition: box-shadow 0.6s; }
.forge-box .art { width: 100%; max-width: 440px; aspect-ratio: 3 / 2; max-height: 200px; background: radial-gradient(ellipse 60% 50% at 50% 100%, rgba(255, 138, 42, 0.18), transparent 70%), rgba(0, 0, 0, 0.5); }
.forge-box .art .art__glyph { color: var(--ember); filter: drop-shadow(0 0 14px rgba(255, 138, 42, 0.5)); }
.forge-box .art em { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; font-style: italic; font-size: 0.98rem; color: var(--bone); text-shadow: 0 2px 8px #000, 0 0 12px #000; pointer-events: none; }
.forge-box .missing { font-style: italic; color: var(--dim); font-size: 1rem; text-shadow: var(--engrave); }
.forge-box .missing b { color: var(--bone); }
.wl-status { font-size: 0.98rem; line-height: 1.5; color: var(--dim); padding: 10px 14px; text-align: left; max-width: 56ch; border-radius: 3px; background: rgba(0, 0, 0, 0.35); box-shadow: var(--carve), inset 3px 0 0 0 rgba(228, 195, 106, 0.35); text-shadow: var(--engrave); }
/* LIVE: on the whitelist */
.wl-status.in { color: var(--bone); box-shadow: var(--carve), inset 3px 0 0 0 var(--ember), 0 0 18px rgba(255, 138, 42, 0.14); }
.forge-box:has(.wl-status.in) { box-shadow: var(--carve), inset 0 -20px 40px rgba(124, 45, 18, 0.2), 0 0 26px rgba(255, 138, 42, 0.16); }
/* the trophy on its plinth (the stone slab beneath it) */
/* the Seal and its words stack (founder review 2026-10-06: side by side in the narrow aside the title broke into
   one word per line and read as nonsense); the ladder legend below carries the numbers */
.trophy { display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 6px; margin-top: 4px; }
.trophy .art--seal { width: 132px; height: 152px; padding: 0 0 22px; background: var(--slab) center bottom / 100% auto no-repeat; box-shadow: none; overflow: visible; border-radius: 0; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.8)); justify-content: flex-end; }
.trophy .art--seal .art__glyph { width: 84%; height: auto; max-width: none; object-fit: contain; opacity: 1; filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.8)) contrast(1.2); margin-bottom: 14px; }
.trophy .art--seal .art__img { padding: 0 8% 24%; }
.trophy .art--seal .art__name { top: 0; }
.trophy__text { min-width: 0; }
.seal-title { display: block; font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-deep); text-shadow: var(--engrave); margin-bottom: 4px; }
.trophy h3 { font-size: 1.15rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-hi); text-shadow: var(--gold-glow); margin-bottom: 8px; }
.trophy .rite-note { text-align: center; font-size: 0.98rem; max-width: 34ch; }
.rite-app:has(.wl-status.in) .trophy .art--seal .art__glyph { filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 16px rgba(255, 138, 42, 0.45)) contrast(1.2); }
.rite-app:has(.wl-status.in) .trophy h3 { color: var(--gold-100); text-shadow: var(--gold-glow-hi); }

/* ---------- The Market: a stone counter, engraved listings, the ledger ---------- */
.table-wrap { overflow-x: auto; padding: 6px 8px; border-radius: 3px; background: rgba(0, 0, 0, 0.34); box-shadow: var(--carve); }   /* the recessed top of the counter / the face of the stele */
table.board { width: 100%; border-collapse: collapse; font-family: var(--font-display); font-size: 0.85rem; color: var(--bone); }
table.board th { text-align: left; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); text-shadow: var(--engrave); padding: 10px 8px 8px; white-space: nowrap; }
table.board td { padding: 9px 8px; font-variant-numeric: tabular-nums; vertical-align: middle; text-shadow: var(--engrave); }
table.board tbody tr:nth-child(even) td { background: rgba(255, 235, 190, 0.025); }
table.board td b { font-family: var(--font-ui); font-weight: 400; font-size: 0.98rem; color: var(--gold-hi); text-shadow: var(--gold-glow); }
table.board td.name { font-family: var(--font-body); font-style: italic; font-size: 1rem; color: var(--bone); letter-spacing: 0; }
table.board td.name small { display: block; font-family: var(--font-ui); font-style: normal; font-size: 0.84rem; letter-spacing: 0.02em; color: var(--dim); }
table.board td .school-cell { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; letter-spacing: 0.08em; text-transform: uppercase; }
table.board td .school-cell .mark { width: 26px; height: 26px; }
table.board tr.mine td { background: rgba(228, 195, 106, 0.06); }
table.board tr.you td { background: rgba(228, 195, 106, 0.1); color: var(--gold-hi); }
table.board td.empty { text-align: center; font-family: var(--font-body); font-style: italic; color: var(--dim); padding: 30px 10px; letter-spacing: 0; }
.rite-form { display: flex; flex-direction: column; gap: 10px; }
.rite-form label { font-family: var(--font-display); font-size: 0.84rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); text-shadow: var(--engrave); }
.bd-lines { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 3px; background: rgba(0, 0, 0, 0.35); box-shadow: var(--carve); font-family: var(--font-display); font-size: 0.875rem; letter-spacing: 0.04em; }
.bd-lines .bd { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--dim); text-shadow: var(--engrave); }
.bd-lines .bd b { font-family: var(--font-ui); font-weight: 400; font-size: 0.98rem; color: var(--gold-hi); text-shadow: var(--gold-glow); white-space: nowrap; }
.bd-lines .bd.sac { color: rgba(255, 138, 42, 0.85); }
.bd-lines .bd.sac b { color: var(--ember); text-shadow: var(--ember-glow); }
.bd-lines .bd.total { position: relative; padding-top: 10px; margin-top: 2px; color: var(--bone); font-size: 1rem; }
.bd-lines .bd.total::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 2px; background: linear-gradient(90deg, transparent, rgba(228, 195, 106, 0.7), transparent); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.85); }
.bd-lines .bd.total b { font-size: 1.1rem; color: var(--gold-100); text-shadow: var(--gold-glow-hi); }
/* "Weigh the purchase": a stone ledger tablet with the scales inset */
.confirm-box { position: relative; margin-top: 8px; display: flex; flex-direction: column; gap: 12px; border: 26px solid transparent; border-image: var(--tablet) / 26px / 0 round; padding: 0 2px 6px; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.75)); }
.confirm-box h3 { font-size: 0.875rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-hi); text-align: center; text-shadow: var(--gold-glow); }
.scales { display: block; height: 140px; width: auto; margin: -6px auto 0; object-fit: contain; mix-blend-mode: screen; filter: drop-shadow(0 0 15px rgba(228, 195, 106, 0.25)); pointer-events: none; -webkit-mask-image: radial-gradient(ellipse 46% 50% at 50% 50%, #000 45%, transparent 74%); mask-image: radial-gradient(ellipse 46% 50% at 50% 50%, #000 45%, transparent 74%); }   /* feathered: its black ground must not print as a square */
.confirm-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.result { font-size: 0.98rem; color: var(--dim); font-style: italic; min-height: 1.3em; text-shadow: var(--engrave); }
.result.error { color: var(--ember); }
.result.found { color: var(--bone); font-style: normal; }
.result strong { color: var(--gold-hi); font-weight: 500; }
.result ul { margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.result li { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.result p { margin: 8px 0 0; font-style: italic; }
.my-listings { display: flex; flex-direction: column; gap: 8px; }
.my-listing { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 3px; background: rgba(0, 0, 0, 0.32); box-shadow: var(--carve); font-size: 0.95rem; color: var(--dim); text-shadow: var(--engrave); }
.my-listing b { font-family: var(--font-ui); font-weight: 400; font-size: 0.98rem; color: var(--gold-hi); text-shadow: var(--gold-glow); }
.my-listing .cancel { margin-left: auto; }
.stall-note { font-style: italic; font-size: 0.98rem; color: var(--dim); text-shadow: var(--engrave); }

/* ---------- The Trial Card: the likeness, plainly framed ----------
   The founder (2026-10-06): no archway in the centre; the image, with a clean frame around it.
   The painted PNG shows at its natural aspect (the painter returns 1024x1024); the frame is a
   2px gold-deep edge with a 1px dark inset and a soft drop shadow. The stand-in is a dark panel
   of the same size carrying one italic line. ---------- */
.card-scene { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 6px 2px 8px; }
.card-stage { position: relative; width: min(420px, 100%); }
.card-frame { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; overflow: hidden; border: 2px solid var(--gold-deep); border-radius: 3px; background: radial-gradient(ellipse 80% 60% at 50% 40%, #1a1712, #050505 80%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.85), 0 14px 28px rgba(0, 0, 0, 0.75); }
.card-frame:not(.painted) { aspect-ratio: 1 / 1; padding: 10%; }
.card-frame img.card-img { display: block; width: 100%; height: auto; image-rendering: auto; }
.card-frame .art { background: none; box-shadow: none; border: 0; width: 100%; flex: 1 1 auto; }
.card-frame .art .art__glyph { width: 32%; max-width: 96px; opacity: 0.55; }
.card-frame .art.art--loaded { position: absolute; inset: 0; background-size: cover; background-position: center; }
.card-frame em { position: relative; z-index: 2; font-style: italic; font-size: 1.05rem; line-height: 1.5; color: var(--dim); max-width: 86%; text-align: center; text-shadow: 0 2px 8px #000; }
.card-frame.working .art__glyph { animation: conjure 1.6s ease-in-out infinite; }
@keyframes conjure { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; filter: drop-shadow(0 0 18px rgba(228, 195, 106, 0.6)); } }
.card-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.card-actions .btn.primary { min-width: 0; font-size: 1rem; letter-spacing: 0.16em; padding: 0.9em 2em 1.5em; }
.placeholder-tag { font-family: var(--font-display); font-size: 0.84rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); text-shadow: var(--engrave); }

/* ---------- Standings: the great stele ---------- */
.pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--font-ui); font-size: 0.85rem; color: var(--dim); text-shadow: var(--engrave); }
.phase-line { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); text-shadow: var(--engrave); }
.updated { font-family: var(--font-ui); font-size: 0.86rem; color: var(--faded); text-align: right; text-shadow: var(--engrave); }
/* rank medallions for the top three (keyed by rank, so page two never wears them) */
tr[data-rank="1"] td:first-child, tr[data-rank="2"] td:first-child, tr[data-rank="3"] td:first-child { color: var(--gold-hi); white-space: nowrap; }
tr[data-rank="1"] td:first-child::before, tr[data-rank="2"] td:first-child::before, tr[data-rank="3"] td:first-child::before { content: ""; display: inline-block; width: 16px; height: 16px; border-radius: 50%; margin-right: 6px; vertical-align: -3px; background: radial-gradient(circle at 35% 30%, var(--m1), var(--m2) 48%, var(--m3) 80%); box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.75), 0 0 0 2.5px #3a3128, 0 2px 4px #000; }
tr[data-rank="1"] { --m1: #fff0bf; --m2: #e4c36a; --m3: #6b4f16; }
tr[data-rank="2"] { --m1: #ffffff; --m2: #d1d5db; --m3: #4b5563; }
tr[data-rank="3"] { --m1: #ffd7a8; --m2: #f97316; --m3: #5a2410; }
/* the Seals column wears the seal glyph */
td.seals::before { content: ""; display: inline-block; width: 15px; height: 15px; margin-right: 6px; vertical-align: -2px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e4c36a' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5.6'/%3E%3Cpath d='M12 6.6l1.6 3.3 3.6.5-2.6 2.5.6 3.6-3.2-1.7-3.2 1.7.6-3.6-2.6-2.5 3.6-.5z'/%3E%3C/svg%3E") center / contain no-repeat; filter: drop-shadow(0 0 4px rgba(228, 195, 106, 0.4)); }
.me-card { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; }
.me-card .name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.08em; color: var(--gold-hi); text-shadow: var(--gold-glow); }
.me-card .handle { font-family: var(--font-ui); font-size: 0.8rem; color: var(--dim); margin-bottom: 8px; text-shadow: var(--engrave); }
.me-card .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); text-shadow: var(--engrave); }
.me-card .row b { font-family: var(--font-ui); font-weight: 400; font-size: 1.05rem; color: var(--gold-hi); text-transform: none; letter-spacing: 0.02em; text-shadow: var(--gold-glow); }
.me-card .row b.txt { font-family: var(--font-display); font-weight: 700; font-size: 0.86rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone); text-shadow: var(--engrave); }
.wallet-closed p { margin: 0; font-style: italic; font-size: 0.98rem; color: var(--dim); text-shadow: var(--engrave); }
/* the wallet: a tablet of its own, the address in a real monospace */
.wallet-panel { display: flex; flex-direction: column; gap: 12px; border: 26px solid transparent; border-image: var(--tablet) / 26px / 0 round; padding: 0 2px 4px; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.7)); }
.wallet-why { margin: 0; font-style: italic; font-size: 0.98rem; color: var(--dim); text-shadow: var(--engrave); }
#walletForm { display: flex; flex-direction: column; gap: 10px; }
.wallet-current { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-family: var(--font-display); font-size: 0.84rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); text-shadow: var(--engrave); }
.wallet-current code { text-transform: none; color: var(--gold-hi); word-break: break-all; user-select: text; text-shadow: none; }
.wallet-current .lock { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.14em; color: var(--gold-hi); text-shadow: var(--gold-glow); }
.wallet-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.checker { padding-top: 14px; }
.checker form { display: flex; flex-direction: column; gap: 10px; }
.chain-note { margin-top: 10px; display: flex; align-items: center; gap: 6px; font-family: var(--font-ui); font-size: 0.86rem; color: var(--dim); text-shadow: var(--engrave); }
.chain-note .glyph { color: var(--gold); width: 14px; height: 14px; }

/* ---------- Dialogs: a tablet held up to the torchlight ---------- */
dialog.enter { border: 0; padding: 0; margin: auto; background: transparent; color: var(--bone); width: min(480px, 94vw); max-width: 94vw; }
dialog.enter::backdrop { background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(124, 45, 18, 0.2), transparent 70%), rgba(3, 3, 3, 0.86); }
.enter-body { position: relative; display: flex; flex-direction: column; gap: 14px; border: 54px solid transparent; border-image: var(--tablet) / 54px / 0 round; padding: 0 0 4px; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.9)); }
.enter-head { display: grid; justify-items: center; gap: 6px; text-align: center; }
.enter-mark { width: 80px; height: 80px; margin: -26px 0 4px; border-radius: 50%; padding: 4px; background: var(--stone-950); box-shadow: 0 0 0 2px #3a3128, 0 0 0 4px #14120e, 0 6px 14px #000, 0 0 26px rgba(255, 138, 42, 0.22); }
.enter-head h2 { font-size: 1.4rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-100); text-shadow: var(--gold-glow-hi); }
.enter-sub { margin: 4px 0 0; font-style: italic; color: var(--dim); font-size: 1rem; text-shadow: var(--engrave); }
.enter-inapp { margin: 10px 8px 0; padding: 10px 12px; border: 1px solid rgba(255, 138, 42, 0.45); border-radius: 3px; background: rgba(120, 50, 10, 0.25); color: var(--bone); font-size: 0.95rem; line-height: 1.45; text-align: center; text-shadow: var(--engrave); }
.enter-inapp b { color: var(--gold-hi); font-weight: 700; }
.enter-providers { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.btn.provider { width: 100%; min-width: 0; font-size: 0.95rem; letter-spacing: 0.14em; white-space: nowrap; }
.btn.provider .glyph { width: 18px; height: 18px; color: inherit; }
.enter-status { font-style: italic; font-size: 0.95rem; text-align: center; color: var(--dim); text-shadow: var(--engrave); }
.enter-status:empty { display: none; }
.enter-error { font-size: 0.98rem; font-style: italic; color: var(--ember); text-align: center; text-shadow: var(--engrave); }
.enter-error:empty { display: none; }
.enter-dev { padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.enter-dev form { display: flex; gap: 8px; }
.enter-dev input { flex: 1; }
.enter-actions { display: flex; justify-content: center; }
/* the hard gate (X-only server, play room): no "Not now" — only the sign-in, or a look at the public standings */
.enter-peek { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); text-decoration: none; text-shadow: var(--engrave); padding: 6px 2px 2px; border-bottom: 1px solid rgba(214, 170, 90, 0.25); transition: color 0.2s, border-color 0.2s; }
.enter-peek:hover, .enter-peek:focus-visible { color: var(--gold-hi); border-color: var(--gold); outline: none; }
dialog.enter.hard::backdrop { background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(124, 45, 18, 0.24), transparent 70%), rgba(3, 3, 3, 0.94); }
/* the chest's gate pop-up (founder, 2026-10-06: a turned-away account must be TOLD the rules): the same tablet, the rules as a list */
dialog.gate .enter-sub { color: var(--bone); font-size: 1.04rem; line-height: 1.5; }
.gate-detail { margin: 0 8px; font-style: italic; text-align: center; color: var(--gold-hi); font-size: 1rem; line-height: 1.5; text-shadow: var(--engrave); }
.gate-detail:empty { display: none; }
.gate-rules { list-style: decimal; margin: 2px 14px 0; padding-left: 1.3em; color: var(--dim); font-size: 0.95rem; line-height: 1.55; text-shadow: var(--engrave); }
.gate-rules li::marker { color: var(--gold); font-family: var(--font-display); font-size: 0.8rem; }
.gate-rules b { color: var(--bone); font-weight: 400; }
.follow-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.follow-gate .btn.provider[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

/* ---------- Keyframes ---------- */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes artStrip { to { background-position: 100% 0; } }
@keyframes sweep { to { background-position: -40% 0; opacity: 0; } }

/* ---------- Responsive (every size stays ≥ 0.72rem) ---------- */
@media (max-width: 1560px) {
  /* inside the tablet the stele is narrower than the table: the reached-at column yields first */
  .page-standings table.board th:nth-child(6), .page-standings table.board td:nth-child(6) { display: none; }
}
@media (max-width: 1360px) {
  .rooms a { padding: 10px 10px; letter-spacing: 0.08em; }
  .brand__sub { display: none; }
}
@media (max-width: 1180px) {
  .rite-app, .standings-app { grid-template-columns: minmax(0, 1fr) 320px; }
  .rooms a { padding: 10px 7px; font-size: 0.8rem; letter-spacing: 0.08em; }   /* five rooms on one line beside the lockup at 1024 */
  .top { padding: 0 70px; gap: 0 14px; }
  .who { max-width: 170px; }
  #listTable th:nth-child(4), #listTable td:nth-child(4) { display: none; }   /* "seller receives" — the confirm names it */
  /* a narrower stage (≈520px at 1024): the render yields a little so its shards stay clear of the copy */
  .chest-slot { left: 2%; width: 50%; }
  .hero-copy { left: 54%; right: 3%; }
}
@media (max-width: 900px) {
  .rite-app, .standings-app { grid-template-columns: 1fr; }
  .room { min-height: 0; }   /* the lintel is auto-height here and the rooms scroll anyway */
  /* the lintel loses its caps on a phone: the band alone, the lockup and keys on the first row, the rooms on the second */
  /* founder, 2026-10-06 ("non mobile optimized nav bar… can they touch that with their thumb?"): the lintel keeps
     ONE row (the lockup, the account, the menu key) and the rooms open as a drop-down of full-width stone rows under it
     (js/nav.js toggles .nav-open). The mock badge has no room here; the dev name says it anyway. */
  .top { height: auto; overflow: visible; grid-template-columns: 1fr auto; grid-template-areas: "brand cta"; gap: 0 10px; padding: 8px 12px 10px; background: url("../assets/stone/lintel-band.webp") center top / auto 100% repeat-x; }
  .torch { display: none; }
  .brand { grid-area: brand; gap: 10px; }
  .top__cta { grid-area: cta; justify-self: end; justify-content: flex-end; flex-wrap: nowrap; gap: 8px; }
  .badge { display: none; }
  .who { max-width: 150px; }
  .who .avatar { width: 26px; height: 26px; }
  .nav-toggle { display: inline-flex; }
  .rooms { display: none; position: absolute; left: 0; right: 0; top: 100%; width: 100%; justify-self: stretch; align-self: start; z-index: 61; flex-direction: column; align-items: stretch; gap: 0; padding: 2px 0 12px; background: linear-gradient(180deg, #1c1915, #110f0d); border-top: 1px solid rgba(214, 170, 90, 0.3); box-shadow: 0 26px 44px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
  .top.nav-open .rooms { display: flex; }
  .rooms a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 22px; font-size: 1rem; letter-spacing: 0.14em; color: var(--bone); border-bottom: 1px solid rgba(0, 0, 0, 0.7); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035); }
  .rooms a.here { color: var(--gold-hi); text-shadow: var(--gold-glow); }
  .rooms a.here::after { position: static; transform: none; font-size: 0.55em; margin-left: 12px; }
  .rooms > .fk-trigger { margin: 12px 22px 2px; min-height: 48px; justify-content: center; font-size: 0.9rem; }
  .rooms > .fk-trigger .fk-trigger__t { position: static; width: auto; height: auto; overflow: visible; clip: auto; }   /* forge-key.css clips the label on the band; the drop-down has room for the whole "What do I need?" */
  .brand__mark { width: 46px; height: 46px; }
  .brand__name { font-size: 0.8rem; }
  .brand__sub { font-size: 0.66rem; }
  /* a column: the copy (with the chest's state line), the render at the stage's full width, then the key */
  .hero-stage { aspect-ratio: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 20px 26px; background-position: 74% 60%; }
  .hero-copy { display: contents; text-align: center; }   /* its children become the column's items: copy, then the render, then the key */
  .hero-copy > * { order: 0; }
  .chest-slot { order: 1; }
  .hero-cta { order: 2; margin-top: 0; }
  .hero-copy h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .chest-slot { position: relative; left: auto; top: auto; width: min(440px, 100%); height: auto; aspect-ratio: 1; margin: -8px 0 -6px; }
  .chest-slot.art--missing .art__glyph { display: block; width: 46%; }   /* the drawn fallback, only while the file is missing */
  .chest-slot .art__name { top: 6px; }
  .chest-slot::before { opacity: 1; }
  .hero-cta { width: 100%; justify-content: center; }
  .hero-cta .btn.primary { font-size: 1.1rem; letter-spacing: 0.16em; padding: 1em 1.4em 1.7em; white-space: normal; }
  .btn.primary { min-width: 0; width: 100%; max-width: 440px; }
}
@media (max-width: 560px) {
  .brand__text { display: none; }   /* the mark alone is the brand on a phone; the account chip needs the room */
  /* five School tiles on a phone: three above, two centred below (6-track grid), labels that may wrap; a 5-across row
     left "NECROMANCY" running into "PHILOSOPHY" (founder's Discord, 2026-10-06) */
  .frag-grid { grid-template-columns: repeat(6, 1fr); gap: 8px; }
  .frag-slot { min-width: 0; grid-column: span 2; padding: 12px 4px 10px; }
  .frag-slot:nth-child(4), .frag-slot:nth-child(5) { grid-column: span 3; }
  .frag-slot span { font-size: 0.72rem; letter-spacing: 0.02em; }   /* 11.5px floor; the 3 + 2 grid gives each name room */
  /* dialog titles on a phone: "Follow @MallardOrderRH to begin your Trials" must fit the tablet's 258px, so the
     display face shrinks and a handle may break rather than run under the border */
  dialog.enter .enter-head h2 { font-size: 1.1rem; letter-spacing: 0.08em; overflow-wrap: anywhere; }
  .brand__mark { width: 42px; height: 42px; }
  .btn.tiny { letter-spacing: 0.08em; padding: 0.65em 0.9em 1.05em; }
  .btn.primary, .btn.provider { font-size: 1rem; letter-spacing: 0.12em; padding: 1em 1.6em 1.6em; }
  .who { max-width: 140px; }
  .room-head p span { display: none; }
  .panel { border-width: 34px; border-image-width: 34px; }
  .hero-stage { padding: 20px 12px 24px; }   /* the render takes the tablet's full inner width on a phone */
  .chip { border-width: 10px; border-image-width: 10px; padding: 2px 6px 3px 2px; column-gap: 8px; }
  .chip .glyph, .chip .mark { width: 28px; height: 28px; padding: 6px; }
  .chip b { font-size: 1rem; }
  .entry-step { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px 12px; align-items: center; padding: 10px; }
  .entry-n { grid-column: 1; grid-row: 1; }
  .entry-body { grid-column: 2; grid-row: 1; }
  .entry-tick { grid-column: 3; grid-row: 1; width: auto; }
  .entry-step > .btn, .entry-step > .dim { grid-column: 2 / -1; grid-row: 2; justify-self: start; }
  .kv-rows .row b { font-size: 1.3rem; }
  .ladder-legend { border-width: 20px; border-image-width: 20px; }
  .ladder-row { padding-left: 54px; }
  .countdown { font-size: 1.9rem; }
  #countdownBox { border-width: 14px; border-image-width: 14px; }
  .frag-slot span { letter-spacing: 0.06em; font-size: 0.8rem; }
  .trophy { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .trophy .rite-note { text-align: center; }
  .confirm-box, .wallet-panel { border-width: 20px; border-image-width: 20px; }
  .card-stage { width: 100%; }
  table.board { font-size: 0.8rem; }
  table.board th { letter-spacing: 0.08em; padding: 8px 6px; }
  #listTable th:nth-child(3), #listTable td:nth-child(3), #listTable th:nth-child(4), #listTable td:nth-child(4),
  .page-standings table.board th:nth-child(5), .page-standings table.board td:nth-child(5),
  .page-standings table.board th:nth-child(6), .page-standings table.board td:nth-child(6) { display: none; }
  table.board td { padding: 8px 5px; }
  /* 290px inside the tablet: the School shows as its medallion alone (the confirm names it in words) */
  #listTable .school-cell { width: 26px; overflow: hidden; gap: 0; }
  table.board td.name { max-width: 28vw; }
  table.board td.name small { overflow-wrap: anywhere; }
  .banner { max-width: 96%; border-width: 10px; border-image-width: 10px; padding: 2px 8px 6px; }
  .banner b { font-size: 0.9rem; letter-spacing: 0.08em; }
  .banner span { font-size: 0.9rem; }
  .enter-body { border-width: 36px; border-image-width: 36px; }
  .enter-mark { margin-top: -18px; }
}

@media (max-width: 400px) {
  .frag-slot span { font-size: 0.72rem; letter-spacing: 0; }   /* "NECROMANCY" fits a third of a 360px tablet without breaking */
}
@media (max-width: 360px) {
  /* 320-wide phones: three School slots no longer fit the tablet (the slot's own min-content is ~97px) and the
     Satchel scrolled sideways by ~49px — two columns keep every room scroll-free down to 320 */
  .frag-slot { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  #dust, .torch__flame { display: none; }
  .reveal li { opacity: 1; transform: none; }
  .reveal li.in::after, .art__strip { display: none; }
}

/* the X portrait standing in for the card (founder, 2026-10-06) */
.card-img--likeness { aspect-ratio: 1 / 1; object-fit: cover; }
.card-likeness-note { display: block; padding: 10px 14px 12px; font-style: italic; text-align: center; color: var(--dim); font-size: 0.98rem; line-height: 1.45; text-shadow: var(--engrave); }
