/* Hallmark · macrostructure: scroll-told night in panels (after Santioni Notturno) · genre: atmospheric · pre-emit critique: P5 H4 E4 S5 R4 V5 · contrast: pass (40-41) */
/* MASKD: a masquerade night told in panels. Palette and type from brand/STYLE.md. */
@font-face { font-family: "Pixelify"; src: url("/assets/fonts/pixelify.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "MRound"; src: url("/assets/fonts/mplusround-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --ink: #141212;
  --ink-2: #1f1b1b;
  --red: #c82924;
  --ox: #592223;
  --cream: #ede6d6;
  --tan: #b9ad97;
  --gold: #d4a24c;
  --step: 0.035em;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .07 0 0 0 0 .07 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { background: var(--ink); color: var(--cream); scrollbar-color: var(--red) var(--ink); scrollbar-width: thin; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; font: 400 17px/1.55 "Figtree", system-ui, sans-serif; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--red); border: 2px solid var(--ink); }
::selection { background: var(--red); color: var(--cream); }
img, canvas { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--cream); color: var(--ink); padding: 8px 12px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.pix, .arrive-mask, .panel-mask img, .silhouette, .brand img, canvas { image-rendering: pixelated; }

/* ---------- carved pixel type (the cover's wordmark) ---------- */
.wordmark, .head, .foot-word, .brand-word, .alias {
  font-family: "Pixelify", system-ui, sans-serif; font-weight: 700; letter-spacing: 0.01em; color: var(--cream);
  text-shadow:
    0 calc(var(--step) * -1) 0 var(--red),
    var(--step) var(--step) 0 var(--tan),
    calc(var(--step) * 2) calc(var(--step) * 2) 0 var(--ox),
    calc(var(--step) * 3) calc(var(--step) * 3) 0 var(--ox),
    calc(var(--step) * 4) calc(var(--step) * 4) 0 var(--ox),
    calc(var(--step) * 5) calc(var(--step) * 5) 0 var(--ink);
  word-break: keep-all; overflow-wrap: normal; hyphens: none;
}
.head { font-size: clamp(34px, 4.6vw, 76px); line-height: 1.02; margin: 0 0 0.4em; --step: 0.045em; }
.head-ink { color: var(--cream); }
.plate {
  display: inline-block; margin: 0; padding: 0.45em 1.1em 0.5em; background: var(--ink); color: var(--cream);
  border: 2px solid var(--red); box-shadow: 4px 4px 0 var(--ox);
  font: 700 clamp(15px, 1.5vw, 22px)/1 "Pixelify", system-ui, sans-serif; letter-spacing: 0.04em; text-transform: uppercase;
}
.plate-sm { font-size: 15px; padding: 0.45em 0.8em; }
.cap {
  margin: 0; max-width: 34ch; padding: 14px 18px 15px; background: var(--cream); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  font: 800 clamp(14px, 1.15vw, 17px)/1.4 "MRound", "Figtree", sans-serif;
}
.cap em { font-style: normal; color: var(--red); }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; align-items: center; gap: 18px;
  padding: 14px clamp(14px, 2.4vw, 36px); pointer-events: none;
}
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border: 2px solid var(--ink); }
.brand-word { font-size: 24px; --step: 0.06em; }
.navplate { display: flex; margin: 0 auto; border: 2px solid var(--ink); background: var(--cream); box-shadow: 4px 4px 0 var(--ink); }
.navplate a { padding: 8px 16px; color: var(--ink); text-decoration: none; font: 800 14px/1 "MRound", sans-serif; border-right: 2px solid var(--ink); }
.navplate a:last-child { border-right: 0; }
.navplate a:hover, .navplate a.on { background: var(--ink); color: var(--cream); }
.chrome { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ico { display: grid; place-items: center; width: 38px; height: 38px; background: var(--ink); border: 2px solid var(--cream); color: var(--cream); }
.ico svg { width: 18px; height: 18px; fill: currentColor; }
.ico:hover { background: var(--cream); color: var(--ink); }
.chip {
  height: 38px; padding: 0 12px; background: var(--ink); border: 2px solid var(--tan); color: var(--tan);
  font: 700 14px/1 "Pixelify", system-ui, sans-serif; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip.live { color: var(--cream); border-color: var(--cream); }
.chip.live:hover { background: var(--cream); color: var(--ink); }
.btn-buy, .btn-red {
  display: inline-grid; place-items: center; height: 38px; padding: 0 16px; background: var(--red); color: var(--cream);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); text-decoration: none; font: 700 16px/1 "Pixelify", system-ui, sans-serif;
  transition: transform .08s, box-shadow .08s;
}
.btn-buy:hover, .btn-red:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn-buy[aria-disabled="true"] { background: var(--ox); color: var(--tan); cursor: not-allowed; }
.btn-buy[aria-disabled="true"]:hover { transform: none; box-shadow: 3px 3px 0 var(--ink); }
.btn-phantom {
  display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; background: var(--cream); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font: 800 14px/1 "MRound", sans-serif;
}
.btn-phantom svg { width: 18px; height: 18px; fill: currentColor; }
.btn-phantom:hover { background: var(--ink); color: var(--cream); }
.btn-ghost {
  display: inline-grid; place-items: center; height: 42px; padding: 0 16px; background: transparent; color: inherit;
  border: 2px solid currentColor; text-decoration: none; font: 800 14px/1 "MRound", sans-serif;
}
.btn-ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ---------- arrival ---------- */
.arrive { position: relative; height: 100svh; min-height: 620px; overflow: hidden; background: var(--ink); display: grid; place-items: center; isolation: isolate; }
.arrive-world { position: absolute; inset: -3%; z-index: -2; }
.hall-img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.62) saturate(1.05); }
.arrive::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(20, 18, 18, .38); }
.embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.arrive-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 90px 20px 40px; }
.arrive-mask { width: clamp(104px, 11vw, 176px); height: auto; border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); margin-bottom: 22px; }
.wordmark { margin: 0; font-size: clamp(76px, 15.5vw, 290px); line-height: .9; --step: 0.028em; }
.wm-line { display: inline-block; }
.arrive .plate { margin-top: clamp(18px, 2vw, 30px); font-size: clamp(16px, 1.7vw, 28px); }
.cap-hero { position: relative; z-index: 2; margin: 26px auto 0; text-align: left; }
.enter {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 2; color: var(--cream); text-decoration: none;
  font: 800 13px/1 "MRound", sans-serif; padding: 8px 12px; border: 2px solid var(--cream); background: var(--ink);
  animation: bob 2.4s steps(6) infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------- invitation (paper) ---------- */
.invite { background: var(--cream) var(--grain); color: var(--ink); padding: clamp(80px, 10vw, 160px) clamp(16px, 4vw, 64px); overflow: hidden; }
.page {
  position: relative; max-width: min(1640px, 92vw); margin: 0 auto; display: grid; gap: 22px;
  grid-template-columns: repeat(12, 1fr); grid-template-rows: auto auto auto;
}
.panel { border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); overflow: hidden; background: var(--ox); }
.panel-mask { grid-column: 1 / span 7; grid-row: 1 / span 3; aspect-ratio: 1 / 1; display: grid; place-items: center; }
.panel-mask img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 45%; }
.invite .head { grid-column: 8 / span 5; grid-row: 1; align-self: end; color: var(--cream); font-size: clamp(30px, 3.4vw, 56px); }
.cap-a { grid-column: 8 / span 5; grid-row: 2; align-self: start; }
.cap-b { grid-column: 7 / span 5; grid-row: 3; align-self: start; margin-left: -40px; position: relative; }
.cap-c { grid-column: 2 / span 5; grid-row: 4; margin-top: -60px; position: relative; }

/* ---------- portal ---------- */
.portal { position: relative; height: 260vh; background: var(--ink); }
.portal-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.arch {
  position: relative; width: min(46vmin, 440px); aspect-ratio: 3 / 4; border: 10px solid var(--cream);
  border-radius: 999px 999px 0 0; box-shadow: 0 0 0 6px var(--ink), 0 0 0 10px var(--tan); overflow: visible;
  display: grid; place-items: center;
}
.disc { position: absolute; left: 50%; top: 52%; width: 70%; aspect-ratio: 1; margin: -35% 0 0 -35%; border-radius: 50%; background: var(--red); will-change: transform; }
.silhouette { position: relative; width: 44%; height: auto; filter: brightness(0) ; opacity: .92; }
.cap-portal { position: absolute; bottom: 12vh; left: 50%; transform: translateX(-50%); text-align: center; white-space: nowrap; max-width: none; }

/* ---------- hall (red colonnade, walked sideways) ---------- */
.hall { position: relative; background: var(--red); }
.hall-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.hall-head { position: absolute; top: 84px; left: clamp(16px, 4vw, 64px); z-index: 3; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.hall-head .head { margin: 0; }
.hall-count { margin: 0; }
.colonnade { display: flex; align-items: stretch; height: min(64svh, 640px); margin-top: 60px; will-change: transform; outline: none; }
.colonnade:focus-visible { outline: 3px solid var(--gold); }
.col { flex: 0 0 auto; width: clamp(54px, 5vw, 86px); position: relative; background: repeating-linear-gradient(90deg, #a51f1b 0 6px, var(--red) 6px 14px); border-left: 3px solid var(--ink); border-right: 3px solid var(--ink); }
.col::before, .col::after { content: ""; position: absolute; left: -14px; right: -14px; height: 26px; background: var(--cream); border: 3px solid var(--ink); }
.col::before { top: -3px; box-shadow: inset 0 -8px 0 var(--tan); }
.col::after { bottom: -3px; box-shadow: inset 0 8px 0 var(--tan); }
.niche {
  flex: 0 0 auto; width: clamp(220px, 19vw, 300px); margin: 40px 18px; background: var(--ox); border: 3px solid var(--ink);
  border-radius: 140px 140px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 26px 16px; box-shadow: inset 0 0 0 6px #4a1b1c; position: relative; text-decoration: none; color: var(--cream);
}
a.niche:hover { box-shadow: inset 0 0 0 6px var(--gold); }
.niche canvas { width: 76%; height: auto; aspect-ratio: 1; }
.niche-plate { background: var(--ink); border: 2px solid var(--red); padding: 7px 10px; text-align: center; min-width: 78%; }
.niche-name { display: block; font: 700 17px/1.1 "Pixelify", system-ui, sans-serif; color: var(--cream); white-space: nowrap; }
.niche-rank { display: block; margin-top: 4px; font: 800 12px/1 "MRound", sans-serif; color: var(--tan); }
.niche-rank b { color: var(--gold); font-weight: 800; }
.niche.empty { background: transparent; border-style: dashed; border-color: var(--ox); box-shadow: none; }
.niche.empty .niche-hook { width: 46%; aspect-ratio: 1; border: 3px dashed var(--ox); border-radius: 50%; }
.niche.notice { width: clamp(280px, 30vw, 440px); background: var(--cream); color: var(--ink); border-radius: 0; box-shadow: 8px 8px 0 var(--ink); text-align: left; align-items: flex-start; }
.niche.notice h3 { margin: 0; font: 700 26px/1.1 "Pixelify", system-ui, sans-serif; color: var(--ink); }
.niche.notice p { margin: 0; font: 800 15px/1.45 "MRound", sans-serif; }
.niche.notice em { font-style: normal; color: var(--red); }

/* ---------- wear ---------- */
.wear { position: relative; background: var(--ox) var(--grain); padding: clamp(90px, 10vw, 150px) clamp(16px, 4vw, 64px); display: grid; gap: 50px; justify-items: center; }
.wear-intro { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; max-width: 760px; }
.find { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; width: 100%; }
.find input {
  flex: 1 1 320px; min-width: 0; height: 50px; padding: 0 16px; background: var(--cream); color: var(--ink); border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink); font: 600 16px/1 "Figtree", sans-serif;
}
.find input::placeholder { color: #7a7060; }
.find-or { font: 800 14px/1 "MRound", sans-serif; color: var(--tan); }
.wear .btn-ghost { color: var(--cream); }
.hold { position: relative; width: 132px; height: 132px; border-radius: 50%; border: 0; background: var(--ink); color: var(--cream); display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.hold span { font: 700 24px/1 "Pixelify", system-ui, sans-serif; position: relative; }
.hold-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.hold-ring circle { fill: none; stroke: var(--ox); stroke-width: 8; }
.hold-ring .hold-fill { stroke: var(--red); stroke-dasharray: 340; stroke-dashoffset: 340; }
.hold:disabled { opacity: .45; cursor: not-allowed; }
.hold:not(:disabled) { animation: breathe 2s steps(8) infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 8px rgba(200, 41, 36, .35); } }
.hold.held { animation: none; }
.hold-help { margin: 0; color: var(--tan); font: 800 14px/1.4 "MRound", sans-serif; max-width: 46ch; }

.mine { width: min(1120px, 100%); display: grid; grid-template-columns: minmax(260px, 440px) 1fr; gap: clamp(24px, 4vw, 56px); background: var(--cream) var(--grain); color: var(--ink); border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); padding: clamp(18px, 3vw, 40px); }
.mine[hidden] { display: none; }
.mine-frame { background: var(--ox); border: 3px solid var(--ink); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.mine-frame canvas, .mp-card canvas { width: 100%; height: auto; aspect-ratio: 1; }
.mine-body, .mp-body { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.alias { margin: 0; font-size: clamp(30px, 3.2vw, 50px); line-height: 1; --step: 0.05em; }
.mine-line { margin: 0; font: 500 16px/1.5 "Figtree", sans-serif; max-width: 52ch; }
.mine-line b { color: var(--red); }
.rep { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 2px solid var(--ink); width: 100%; }
.rep div { padding: 10px 12px; border-right: 2px solid var(--ink); }
.rep div:last-child { border-right: 0; }
.rep strong { display: block; font: 700 24px/1 "Pixelify", system-ui, sans-serif; }
.rep span { display: block; margin-top: 4px; font: 800 12px/1.3 "MRound", sans-serif; color: #5b5244; }
.rep .rep-total { background: var(--ink); color: var(--cream); }
.rep .rep-total span { color: var(--tan); }
.parts { display: flex; flex-wrap: wrap; gap: 8px; }
.part { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 2px solid var(--ink); background: transparent; font: 800 13px/1 "MRound", sans-serif; }
.part[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.part:disabled { opacity: .4; cursor: not-allowed; border-style: dashed; }
.part small { font: 700 11px/1 "Pixelify", system-ui, sans-serif; color: var(--red); }
.part[aria-pressed="true"] small { color: var(--gold); }
.acts { display: flex; flex-wrap: wrap; gap: 10px; }
.acts .btn-red { height: 42px; }
.status { margin: 0; min-height: 1.4em; font: 800 14px/1.4 "MRound", sans-serif; color: var(--ox); }

/* ---------- ranks (staircase of plinths) ---------- */
.ranks { position: relative; background: var(--ink); padding: clamp(90px, 10vw, 160px) clamp(16px, 4vw, 64px) clamp(70px, 8vw, 120px); overflow: hidden; }
.ranks > .head, .ranks-lede, .cap-rule { max-width: min(1640px, 92vw); margin-left: auto; margin-right: auto; }
.ranks > .head { display: block; }
.ranks-lede { color: var(--tan); margin-top: 0; margin-bottom: 40px; max-width: 1280px; font-size: 18px; }
.ranks-lede, .ledger-lede { text-wrap: pretty; }
.stairs { list-style: none; margin: 0 auto; padding: 0; max-width: min(1640px, 92vw); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 18px); align-items: end; }
.stair { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stair canvas { width: 104%; height: auto; aspect-ratio: 1; margin-bottom: 10px; }
.stair-block { width: 100%; background: var(--cream); color: var(--ink); border: 3px solid var(--ink); box-shadow: inset 0 -10px 0 var(--tan), 5px 5px 0 var(--ox); padding: 12px 10px 18px; }
.stair:nth-child(1) .stair-block { min-height: 150px; }
.stair:nth-child(2) .stair-block { min-height: 190px; }
.stair:nth-child(3) .stair-block { min-height: 230px; }
.stair:nth-child(4) .stair-block { min-height: 270px; }
.stair:nth-child(5) .stair-block { min-height: 310px; }
.stair:nth-child(6) .stair-block { min-height: 350px; background: var(--red); color: var(--cream); }
.stair-name { display: block; font: 700 clamp(17px, 1.6vw, 24px)/1 "Pixelify", system-ui, sans-serif; }
.stair:nth-child(5) .stair-name { color: #8a5a10; }
.stair-req { display: block; margin-top: 8px; font: 800 13px/1.35 "MRound", sans-serif; }
.stair-gets { display: block; margin-top: 8px; font: 600 13px/1.35 "Figtree", sans-serif; }
.stair-count { display: inline-block; margin-top: 10px; padding: 4px 8px; background: var(--ink); color: var(--cream); font: 700 13px/1 "Pixelify", system-ui, sans-serif; }
.stair.you .stair-block { outline: 4px solid var(--gold); outline-offset: 3px; }
.cap-rule { margin-top: 44px; max-width: 52ch; display: block; }

/* ---------- ledger ---------- */
.ledger { background: var(--ox); padding: clamp(80px, 9vw, 140px) clamp(16px, 4vw, 64px); }
.ledger-page { max-width: min(1280px, 100%); margin: 0 auto; background: var(--cream) var(--grain); color: var(--ink); border: 3px solid var(--ink); box-shadow: 12px 12px 0 var(--ink); padding: clamp(22px, 4vw, 56px); }
.ledger .head { color: var(--cream); }
.ledger-lede { max-width: 62ch; margin: 0 0 28px; }
.board { border-top: 3px solid var(--ink); }
.row { display: grid; grid-template-columns: 56px 52px 1fr 120px 110px; gap: 14px; align-items: center; padding: 10px 6px; border-bottom: 2px solid var(--ink); text-decoration: none; color: inherit; }
a.row:hover { background: var(--ink); color: var(--cream); }
.row canvas { width: 52px; height: 52px; background: var(--ox); }
.row-place { font: 700 26px/1 "Pixelify", system-ui, sans-serif; color: var(--red); }
.row-alias { font: 700 19px/1.1 "Pixelify", system-ui, sans-serif; }
.row-rank { font: 800 13px/1.2 "MRound", sans-serif; }
.row-rep { font: 700 22px/1 "Pixelify", system-ui, sans-serif; text-align: right; }
.row-head { font: 800 12px/1 "MRound", sans-serif; color: #5b5244; padding-top: 12px; padding-bottom: 12px; }
.row-head span:last-child { text-align: right; }
.board-empty { padding: 28px 6px 10px; font: 800 16px/1.5 "MRound", sans-serif; max-width: 58ch; }
.board-empty em { font-style: normal; color: var(--red); }

/* ---------- footer ---------- */
.foot { background: var(--ink); padding: clamp(70px, 8vw, 120px) clamp(16px, 4vw, 64px) 40px; text-align: center; display: grid; justify-items: center; gap: 26px; }
.foot-word { margin: 0; font-size: clamp(64px, 13vw, 240px); line-height: .9; --step: 0.028em; }
.foot-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.foot-note { margin: 0; color: var(--tan); font-size: 14px; max-width: 60ch; }

/* ---------- mask page ---------- */
.maskpage { position: fixed; inset: 0; z-index: 60; background: rgba(20, 18, 18, .86); display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.maskpage[hidden] { display: none; }
.mp-card { position: relative; width: min(920px, 100%); display: grid; grid-template-columns: minmax(220px, 380px) 1fr; gap: 28px; background: var(--cream) var(--grain); color: var(--ink); border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--red); padding: 28px; }
.mp-card canvas { background: var(--ox); border: 3px solid var(--ink); }
.mp-close { position: absolute; top: -18px; right: -18px; width: 44px; height: 44px; background: var(--red); color: var(--cream); border: 3px solid var(--ink); font: 700 26px/1 "Pixelify", system-ui, sans-serif; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 70; margin: 0; padding: 12px 16px; background: var(--cream); color: var(--ink); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--red); font: 800 14px/1.3 "MRound", sans-serif; transition: transform .25s; max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); }

/* ---------- small screens ---------- */
@media (max-width: 980px) {
  .navplate { display: none; }
  .page { grid-template-columns: 1fr; }
  .panel-mask, .invite .head, .cap-a, .cap-b, .cap-c { grid-column: 1; grid-row: auto; margin: 0; }
  .invite .head { color: var(--cream); }
  .stairs { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
  .stair .stair-block { min-height: 0 !important; }
  .mine, .mp-card { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .top { gap: 8px; padding: 10px 10px; }
  .brand-word { display: none; }
  .chrome { gap: 6px; }
  .chip { max-width: 92px; padding: 0 8px; font-size: 12px; }
  .ico { width: 34px; height: 34px; }
  .btn-buy, .btn-phantom, .chip { height: 34px; }
  .btn-buy { padding: 0 10px; }
  #phantom-label { display: none; }
  .btn-phantom { padding: 0 8px; }
  .cap-portal { white-space: normal; width: 86vw; }
  .rep { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rep div:nth-child(2) { border-right: 0; }
  .rep div:nth-child(-n+2) { border-bottom: 2px solid var(--ink); }
  .row { grid-template-columns: 34px 44px 1fr 70px; gap: 10px; }
  .row canvas { width: 44px; height: 44px; }
  .row-rank { display: none; }
  .stairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hall-head { top: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* headings that sit on paper get their own ink slab, like a comic title box */
.invite .head, .ledger .head { justify-self: start; display: inline-block; background: var(--ink); padding: 0.28em 0.45em 0.42em 0.38em; border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--red); }
.ledger .head { margin-bottom: 0.6em; }
.wear .mine .btn-ghost, .mp-card .btn-ghost { color: var(--ink); }
.top { transition: background .2s, box-shadow .2s; }
.top.solid { background: var(--ink); box-shadow: 0 3px 0 var(--red); }

/* audit pass: the hall's status plate sits under its heading, and the hero caption and scroll cue leave the centre axis */
.hall-head { flex-direction: column; align-items: flex-start; gap: 10px; }
@media (min-width: 981px) {
  .cap-hero { position: absolute; left: clamp(20px, 4vw, 72px); bottom: clamp(70px, 9vh, 120px); margin: 0; }
  .enter { left: auto; right: clamp(20px, 4vw, 72px); transform: none; animation-name: bob-r; }
}
@keyframes bob-r { 50% { transform: translateY(6px); } }
@media (max-width: 980px) { .arrive { grid-template-rows: 1fr auto; } .cap-hero { margin: 0 16px 90px; justify-self: center; } }
.toast { transform: translate(-50%, calc(100% + 40px)); visibility: hidden; transition: transform .25s, visibility 0s .25s; }
.toast.show { visibility: visible; transition: transform .25s; }
@media (max-width: 620px) { .chip { max-width: 112px; font-size: 11px; padding: 0 7px; } }
