/* DoxxPad: grayscale, four fixed pages, left sidebar. Plain CSS, no build step. */

/* Your heading font: put it in /public/fonts/ as display.woff2 (see fonts/README.txt). */
@font-face { font-family: "DoxxDisplay"; src: url("../fonts/display.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #EAEAEA;
  --paper-hi: #F6F6F6;
  --panel: rgba(255, 255, 255, .72);
  --ink: #111111;
  --ink-2: #3D3D3D;
  --muted: #727272;
  --rule: rgba(0, 0, 0, .12);
  --ink-rgb: 17, 17, 17;
  --side: 300px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 30px 60px -40px rgba(0, 0, 0, .35);
  --f-display: "DoxxDisplay", "Archivo", system-ui, sans-serif;
  --f-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --cut: cubic-bezier(.7, 0, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
body { background: var(--paper); color: var(--ink); font: 400 18px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: var(--ink); color: #fff; }
:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; margin: -1px; padding: 0; }
.mono, code { font-family: var(--f-mono); }
.muted { color: var(--muted); }
.ic { width: 22px; height: 22px; display: block; }

#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 26px; border-radius: 12px; border: 1.5px solid transparent; font-weight: 600; font-size: 18px; white-space: nowrap; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #333; }
.btn-ghost { background: var(--panel); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { height: 56px; }
.btn-xl { height: 64px; padding: 0 34px; font-size: 19px; }

/* ---------- Sidebar ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 10; display: flex; flex-direction: column; gap: 30px; padding: 28px 22px; background: rgba(246, 246, 246, .86); border-right: 1px solid var(--rule); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.logo { display: flex; align-items: center; gap: 12px; font: 800 28px/1 var(--f-display); letter-spacing: -.03em; padding: 0 8px; }
.logo-mark { width: 40px; height: 40px; flex: none; }
.logo-mark .f { fill: var(--ink); transition: transform .5s var(--cut); transform-origin: right center; transform-box: fill-box; }
.logo-mark .o { fill: none; stroke: var(--ink); stroke-width: 2; }
.logo:hover .logo-mark .f { transform: scaleX(.35); }
.nav { display: grid; gap: 6px; }
.nav a { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; transition: background .2s, color .2s; }
.nav a:hover { background: rgba(0, 0, 0, .05); }
.nav a.is-active { background: var(--ink); color: #fff; }
.nv-ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 11px; background: rgba(0, 0, 0, .06); }
.nav a.is-active .nv-ic { background: rgba(255, 255, 255, .14); }
.nv-t { display: grid; line-height: 1.25; }
.nv-t b { font-size: 18px; }
.nv-t span { font-size: 14px; color: var(--muted); }
.nav a.is-active .nv-t span { color: rgba(255, 255, 255, .65); }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.side-acct { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px dashed var(--rule); }
.sa-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(0, 0, 0, .06); }
.side-acct > span:last-child { display: grid; line-height: 1.25; min-width: 0; }
.side-acct b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-acct span span { font-size: 13.5px; color: var(--muted); }
.wallet-btn { width: 100%; }
.wallet-btn.is-connected { background: var(--panel); color: var(--ink); border-color: var(--ink); font-family: var(--f-mono); font-weight: 500; }
.w-ic .ic { width: 20px; height: 20px; }
.ca { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--rule); }
.ca-k { font-weight: 700; font-size: 14px; }
.ca code { flex: 1; font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-copy { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 9px; background: var(--ink); color: #fff; }
.ca-copy .ic { width: 18px; height: 18px; }
.side-x { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 16px; }
.side-x:hover { background: rgba(0, 0, 0, .05); }

/* ---------- Pages (fixed, no scrolling on desktop) ---------- */
.main { position: fixed; inset: 0 0 0 var(--side); z-index: 1; }
.page { position: absolute; inset: 0; display: none; overflow-y: auto; padding: clamp(28px, 5vh, 56px) clamp(24px, 4vw, 64px); }
.page.is-active { display: block; animation: pageIn .45s var(--ease); }
@keyframes pageIn { from { opacity: 0; } }
.pg-inner { max-width: 1180px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: clamp(20px, 3.5vh, 36px); }
.pg-head { display: grid; gap: 12px; max-width: 820px; }
.pg-title { font: 800 clamp(40px, 5.6vh, 64px)/1.02 var(--f-display); letter-spacing: -.035em; }
.pg-lede { font-size: 19px; color: var(--ink-2); max-width: 62ch; }
.dot { color: var(--ink); }

/* Redaction bar that lifts off the heading when a page opens */
.rv { position: relative; display: inline; }
.rv::after { content: ""; position: absolute; left: -.08em; right: -.08em; top: .1em; bottom: .02em; background: var(--ink); transform-origin: right center; transform: scaleX(1); }
.rv.go::after { animation: unredact .85s var(--cut) .12s forwards; }
@keyframes unredact { to { transform: scaleX(0); } }

.panel { position: relative; padding: clamp(20px, 2.6vh, 30px); border-radius: 22px; background: var(--panel); border: 1px solid rgba(255, 255, 255, .9); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.panel-h { display: flex; align-items: center; gap: 12px; font: 700 24px/1.1 var(--f-display); letter-spacing: -.02em; margin-bottom: 10px; }
.step { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--ink); color: #fff; font: 700 16px var(--f-body); }

/* ---------- Launch ---------- */
.launch-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.acct-body { display: grid; gap: 10px; margin-top: 18px; }
.acct-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--rule); background: rgba(255, 255, 255, .7); text-align: left; transition: border-color .2s; }
button.acct-row:hover { border-color: var(--ink); }
.acct-ic { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: #fff; }
.acct-id { flex: 1; display: grid; line-height: 1.3; min-width: 0; }
.acct-id b { font-size: 17.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-id span { font-size: 14px; color: var(--muted); }
.go { font-weight: 600; padding: 8px 14px; border-radius: 10px; background: rgba(0, 0, 0, .06); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.badge .ic { width: 15px; height: 15px; }
.link-btn { border: 0; background: none; font-size: 14.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }
.shown-as { margin-top: 10px; padding: 18px; border-radius: 14px; background: rgba(0, 0, 0, .04); display: grid; gap: 6px; }
.shown-as .muted { font-size: 14.5px; }
.shown-line { font: 700 22px/1.2 var(--f-display); letter-spacing: -.01em; }
.who.redacted { color: transparent; background: var(--ink); border-radius: 4px; padding: 0 .2em; }
.acct.nudge { animation: nudge .5s var(--ease); }
@keyframes nudge { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.lform { display: grid; gap: clamp(10px, 1.6vh, 16px); margin-top: 14px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; align-content: start; }
.field > label, .field > .lab { display: flex; justify-content: space-between; font-weight: 600; font-size: 16.5px; }
.opt { font-weight: 400; font-size: 14.5px; color: var(--muted); }
.input { width: 100%; height: clamp(48px, 6vh, 56px); padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--rule); background: rgba(255, 255, 255, .8); font-size: 17.5px; transition: border-color .2s, box-shadow .2s; }
textarea.input { height: auto; min-height: 72px; padding: 12px 16px; resize: none; line-height: 1.45; }
.input::placeholder { color: #A0A0A0; }
.input:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(0, 0, 0, .08); }
.field.has-error .input, .field.has-error .drop { border-color: var(--ink); border-style: dashed; }
.err { font-size: 14.5px; color: var(--ink); font-weight: 600; }
.err:empty { display: none; }
.pre, .suf { position: relative; }
.pre span, .suf span { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.pre span { left: 16px; } .pre .input { padding-left: 34px; }
.suf span { right: 16px; } .suf .input { padding-right: 60px; }
.drop { display: flex; align-items: center; gap: 12px; height: clamp(48px, 6vh, 56px); padding: 0 8px; border-radius: 12px; border: 1.5px dashed rgba(0, 0, 0, .25); background: rgba(255, 255, 255, .6); cursor: pointer; }
.drop:hover, .drop:focus-visible { border-color: var(--ink); }
.drop-img { position: relative; width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--ink); color: rgba(255, 255, 255, .7); overflow: hidden; }
.drop-img .ic { width: 20px; height: 20px; }
.drop-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop-t { font-weight: 500; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form-err { margin-top: -4px; }
.confirm { display: grid; gap: 14px; margin-top: 14px; }
.preview { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 16px; background: #fff; border: 1px solid var(--rule); }
.preview img { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; filter: grayscale(1); }
.pv-name { font: 700 24px/1.1 var(--f-display); }
.pv-name span { font: 600 16px var(--f-body); color: var(--muted); }
.pv-by { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 16.5px; }
.pv-desc { color: var(--ink-2); }
.sum { display: grid; border-top: 1px solid var(--rule); }
.sum > div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 16.5px; }
.sum dt { color: var(--muted); }
.sum dd { overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.done { flex-basis: 100%; display: flex; align-items: center; gap: 10px; font-size: 17px; }

/* ---------- Why ---------- */
.why-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.reveal-demo { display: grid; gap: 4px; padding: clamp(22px, 3vh, 36px); }
.rd-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 18px; }
.rd-row.big { border-bottom: 0; padding-top: 22px; }
.rd-row code { font-size: 17px; }
.rd-who { position: relative; font: 800 clamp(28px, 3.4vh, 38px)/1 var(--f-display); letter-spacing: -.02em; }
.rd-who i { position: absolute; left: -.1em; right: -.1em; top: -.05em; bottom: -.1em; background: var(--ink); transform-origin: right center; animation: redact 5s var(--cut) infinite; }
@keyframes redact { 0%, 22% { transform: scaleX(1); } 34%, 82% { transform: scaleX(0); } 94%, 100% { transform: scaleX(1); } }
.rd-cap { margin-top: 10px; font-size: 15.5px; color: var(--muted); }
.why-points { display: grid; gap: 14px; }
.why-points article { padding: 22px 24px; border-radius: 18px; background: var(--panel); border: 1px solid rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.why-points h2 { font: 700 22px/1.15 var(--f-display); margin-bottom: 6px; }
.why-points p { color: var(--ink-2); font-size: 17px; }

/* ---------- Docs ---------- */
.docs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.steps { counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--panel); border: 1px solid rgba(255, 255, 255, .9); }
.steps li::before { content: counter(s); grid-row: span 2; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 700; }
.steps b { font-size: 18px; }
.steps span { font-size: 15.5px; color: var(--ink-2); }
.faq { display: grid; gap: 10px; }
.faq details { border-radius: 16px; background: var(--panel); border: 1px solid rgba(255, 255, 255, .9); overflow: hidden; }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; font-weight: 600; font-size: 18px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 14px; height: 14px; flex: none; background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat; transition: transform .3s var(--ease); }
.faq details[open] { background: var(--ink); color: #fff; }
.faq details[open] summary::after { transform: rotate(45deg); background: linear-gradient(#fff, #fff) center / 100% 2px no-repeat, linear-gradient(#fff, #fff) center / 2px 100% no-repeat; }
.faq p { padding: 0 20px 18px; font-size: 16.5px; color: rgba(255, 255, 255, .78); }

/* ---------- Unmask game ---------- */
.game-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(24px, 4vw, 56px); align-items: center; }
.game-side { display: grid; gap: 26px; }
.legend { display: grid; gap: 10px; font-size: 16.5px; color: var(--ink-2); }
.legend > div { display: flex; align-items: center; gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 9px; font-size: 14.5px; font-weight: 600; }
.chip .ic { width: 16px; height: 16px; }
.chip.anon { background: var(--ink); color: #fff; font-family: var(--f-mono); font-weight: 500; }
.chip.ver { background: #fff; border: 1.5px solid var(--ink); }
.g-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 18px 20px; border-radius: 16px; background: var(--ink); color: #fff; }
.stat .n { font: 800 38px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.stat .c { margin-top: 8px; font-size: 14.5px; color: rgba(255, 255, 255, .62); }
.lives { display: flex; gap: 6px; height: 38px; align-items: center; }
.lives i { width: 22px; height: 22px; border-radius: 5px; background: #fff; transition: opacity .3s; }
.lives i.off { opacity: .18; }
.board-wrap { position: relative; width: min(68vh, 560px); aspect-ratio: 1; }
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; height: 100%; padding: 14px; border-radius: 26px; background: var(--panel); border: 1px solid rgba(255, 255, 255, .9); box-shadow: var(--shadow); }
.tile { position: relative; display: grid; place-items: center; padding: 6px; border-radius: 14px; border: 1.5px solid var(--rule); background: rgba(255, 255, 255, .55); overflow: hidden; transition: background .15s, transform .15s, border-color .15s; }
.tile .bar { width: 50%; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .08); }
.t-txt { display: flex; align-items: center; gap: 4px; font-size: clamp(11px, 1.5vh, 14px); font-weight: 600; text-align: center; overflow-wrap: anywhere; line-height: 1.2; }
.t-txt .ic { width: 14px; height: 14px; flex: none; }
.tile.is-anon { background: var(--ink); color: #fff; border-color: var(--ink); animation: pop .2s var(--ease); }
.tile.is-ver { background: #fff; border-color: var(--ink); animation: pop .2s var(--ease); }
.tile.is-revealed { background: #fff; border-color: var(--ink); transform: scale(.94); }
.tile.miss { background: #888; border-color: #888; }
.tile.wrong { animation: shake .35s; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.g-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; border-radius: 26px; background: rgba(234, 234, 234, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: opacity .3s, visibility 0s; }
.g-overlay.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s, visibility 0s .3s; }
.g-ov-h { font: 800 44px/1 var(--f-display); letter-spacing: -.03em; }
.g-overlay .btn .ic { width: 18px; height: 18px; }

/* ---------- Intro ---------- */
.intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--paper); transition: opacity .6s var(--ease); }
.intro-in { display: grid; justify-items: center; gap: 22px; text-align: center; }
.intro-word { font: 800 clamp(64px, 11vw, 160px)/1 var(--f-display); letter-spacing: -.045em; }
.intro-word .ch { position: relative; display: inline-block; }
.intro-word .ch i { position: absolute; left: -.02em; right: -.02em; top: .08em; bottom: .02em; background: var(--ink); transform-origin: right center; }
.intro.is-playing .ch i { animation: unredact .5s var(--cut) forwards; animation-delay: calc(.3s + var(--i) * .11s); }
.intro-line, .intro-enter { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.intro-line { font-size: 20px; color: var(--ink-2); }
.intro-enter { min-width: 220px; pointer-events: none; transition-delay: .1s; }
.intro.is-ready .intro-line, .intro.is-ready .intro-enter { opacity: 1; transform: none; }
.intro.is-ready .intro-enter { pointer-events: auto; }
.intro.is-leaving { opacity: 0; pointer-events: none; }
html.intro-open .side, html.intro-open .main { visibility: hidden; }

/* ---------- Cursor ---------- */
html.has-cursor, html.has-cursor * { cursor: none !important; }
.cur-dot, .cur-box { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; opacity: 0; transition: opacity .3s; }
html.cursor-on .cur-dot, html.cursor-on .cur-box { opacity: 1; }
.cur-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--ink); }
.cur-box { width: 40px; height: 22px; margin: -11px 0 0 -20px; border: 1.5px solid #fff; border-radius: 4px; mix-blend-mode: difference; transition: opacity .3s, width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), background .25s; }
.cur-box.is-hover { width: 64px; height: 34px; margin: -17px 0 0 -32px; background: #fff; }
.cur-box.is-text { width: 4px; height: 26px; margin: -13px 0 0 -2px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 20px; left: calc(50% + var(--side) / 2); transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(90vw, 520px); pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 14px 18px; border-radius: 12px; font-size: 16.5px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5); animation: tIn .35s var(--ease); transition: opacity .4s, transform .4s; }
.toast.out { opacity: 0; transform: translateY(-6px); }
@keyframes tIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Smaller screens: sidebar becomes a top bar, pages scroll ---------- */
@media (max-width: 1000px) {
  body { overflow: auto; }
  :root { --side: 0px; }
  .side { position: sticky; top: 0; inset: auto; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .nav { display: flex; gap: 4px; overflow-x: auto; }
  .nav a { padding: 8px 12px; }
  .nv-t span, .nv-ic { display: none; }
  .side-foot { margin: 0 0 0 auto; display: flex; }
  .side-acct, #side-ca, .side-x { display: none; }
  .wallet-btn { width: auto; height: 48px; }
  .main { position: static; }
  .page { position: static; overflow: visible; }
  .launch-grid, .why-grid, .docs-grid, .game-wrap { grid-template-columns: 1fr; }
  .board-wrap { width: min(92vw, 520px); margin-inline: auto; }
  .toasts { left: 50%; }
}
@media (max-width: 600px) { .frow, .g-stats { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; } }

/* ---------- Stacked layout: blocks sit on top of each other, one centred column ---------- */
@media (min-width: 1001px) {
  .pg-inner { max-width: 1000px; }
  .pg-head { max-width: none; }

  /* Launch: sign-in panel above coin details */
  .launch-grid { grid-template-columns: 1fr; gap: 16px; }
  .acct { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .acct > .panel-h, .acct > p, .acct > .acct-shown { grid-column: 1; }
  .acct > .acct-body { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .acct-shown .shown-as { margin-top: 14px; }
  /* Coin details keeps its original vertical form */

  /* Why: example card above the three points */
  .why-grid { grid-template-columns: 1fr; gap: 16px; }
  .reveal-demo { padding: clamp(16px, 2.4vh, 26px) clamp(20px, 2.6vw, 32px); }
  .rd-row { padding: 10px 0; }
  .rd-row.big { padding-top: 14px; }
  .why-points { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* Docs: steps in a row above the FAQ */
  .docs-grid { grid-template-columns: 1fr; gap: 16px; }
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .steps li { grid-template-columns: 1fr; row-gap: 6px; align-content: start; padding: 16px; }
  .steps li::before { grid-row: auto; margin-bottom: 4px; }
  .steps span { font-size: 14.5px; }
  .faq summary { padding: 14px 20px; }

  /* Unmask: rules and scores above the board */
  .game-wrap { grid-template-columns: 1fr; gap: 18px; justify-items: center; }
  .game-side { width: 100%; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; align-items: center; }
  .game-side > .pg-head { grid-column: 1 / -1; }
  .stat { padding: 14px 18px; }
  .stat .n { font-size: 32px; }
  .board-wrap { width: min(calc(100vh - 360px), 540px); min-width: 320px; }
}

/* Shorter screens (e.g. 1366x768): tighten spacing so every page still fits without scrolling */
@media (min-width: 1001px) and (max-height: 820px) {
  .page { padding-top: 20px; padding-bottom: 20px; }
  .pg-inner { gap: 14px; }
  .pg-head { gap: 6px; }
  .pg-title { font-size: 40px; }
  .pg-lede { font-size: 16.5px; }
  .panel { padding: 16px 20px; }
  .panel-h { font-size: 21px; margin-bottom: 6px; }
  .acct-row { padding: 10px 12px; }
  .acct-ic { width: 40px; height: 40px; }
  .shown-as { padding: 12px 14px; }
  .lform { gap: 8px; margin-top: 8px; }
  .input, .drop, .lform textarea.input { height: 46px; }
  .btn-xl { height: 54px; }
  .steps li { padding: 12px; }
  .steps b { font-size: 16px; }
  .steps span { font-size: 13.5px; line-height: 1.4; }
  .faq { gap: 8px; }
  .faq summary { padding: 11px 18px; font-size: 16.5px; }
  .faq p { padding: 0 18px 12px; font-size: 15px; }
}

/* Launch, stacked: slim sign-in panel (buttons side by side) so the vertical form still fits */
@media (min-width: 1001px) {
  .acct { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .acct > .acct-shown { display: none; }
  .acct > .acct-body { grid-row: 1 / span 2; grid-template-columns: 1fr 1fr; align-self: center; }
  .acct .acct-id span, .acct .go, .acct .acct-row .badge { display: none; }
  .acct .acct-row { padding: 10px 12px; gap: 12px; }
  .acct .acct-ic { width: 40px; height: 40px; }
  .acct > p { font-size: 15.5px; }
  .acct .panel-h { margin-bottom: 4px; }
}
@media (min-width: 1001px) and (max-height: 1000px) {
  #launch.page { padding-top: 24px; padding-bottom: 24px; }
  #launch .pg-inner { gap: 16px; }
  #launch .pg-head { gap: 6px; }
  #launch .pg-title { font-size: clamp(36px, 4.6vh, 48px); }
  #launch .pg-lede { font-size: 17px; }
  #launch .panel { padding: 16px 22px; }
  #launch .lform { gap: 8px; margin-top: 6px; }
  #launch .input, #launch .drop { height: 46px; }
  #launch textarea.input { min-height: 60px; }
  #launch .btn-xl { height: 54px; }
}
