/* The gate: the public shell and the public pages' components.
 *
 * Loaded after style.css on every signed-out page, and only there (body.gate).
 * style.css keeps the tokens, the tape overlays, the camcorder OSD, the hero
 * and the home page's toys; this file adds the shell (top bar, footer, frame),
 * a type scale that stops shouting, and the two auth scenes: the punch card
 * you sign in on and the personnel file you open when you sign up.
 *
 * Rules of the house: VT323 (--osd) is instrumentation, not prose: the OSD,
 * eyebrows, stamps, tiny captions. Sentences are Alegreya Sans; titles are
 * Grenze Gotisch in sentence case. Every pressable thing is at least 44 px
 * tall. Every focus is visible. Nothing here needs JavaScript. */

body.gate { font-size: 17px; }
.gate .sr, .gate .offscreen { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.gate .skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--lamp); color: var(--ink0); font-family: var(--osd); font-size: 18px; padding: 10px 14px; text-decoration: none; }
.gate .skip:focus { top: 12px; }
.gate .gate-main:focus { outline: none; }

/* ---------- the viewfinder frame: four corner ticks on the page box ---------- */
.gate .gate-page { position: relative; }
.gate .frame { position: fixed; inset: 0; pointer-events: none; z-index: 48; }
.gate .frame i { position: absolute; width: 22px; height: 22px; border: 1.5px solid var(--line-strong); opacity: .9; }
.gate .frame i:nth-child(1) { left: 10px; top: 46px; border-right: 0; border-bottom: 0; }
.gate .frame i:nth-child(2) { right: 10px; top: 46px; border-left: 0; border-bottom: 0; }
.gate .frame i:nth-child(3) { left: 10px; bottom: 10px; border-right: 0; border-top: 0; }
.gate .frame i:nth-child(4) { right: 10px; bottom: 10px; border-left: 0; border-top: 0; }
@media (max-width: 720px) { .gate .frame { display: none; } }

/* The OSD is chrome, not content: on a phone the battery and the time stamp
   sat over the very field somebody was typing in. The REC dot stays. */
@media (max-width: 640px) {
  .gate .osd-bat, .gate .osd-stamp { display: none; }
}

/* ---------- the top bar ---------- */
.gate-top { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand nav" "langs langs"; align-items: center; gap: 10px 22px; padding: calc(env(safe-area-inset-top, 0px) + 62px) 0 8px; position: relative; z-index: 5; }
.gate-brand { grid-area: brand; display: inline-flex; line-height: 0; border-radius: 6px; }
.gate-brand img { width: 72px; height: auto; filter: drop-shadow(0 2px 10px rgba(0,0,0,.7)); transition: filter .25s; }
.gate-brand:hover img { filter: drop-shadow(0 0 14px rgba(240,177,58,.45)); }
.gate-menu-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gate-burger { display: none; }
.gate-nav { grid-area: nav; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.gate-link { font-family: var(--osd); font-size: 20px; letter-spacing: .04em; color: var(--bone); text-decoration: none; padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.gate-link:hover { color: var(--lamp); }
.gate-link.here { border-bottom-color: var(--lamp); color: var(--lamp); }
.gate-acct { margin-left: auto; display: flex; align-items: center; gap: 4px 10px; }
.gate .btn.sm { font-size: 18px; padding: 10px 16px; min-height: 44px; }
.gate .btn.gate-cta .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink0); box-shadow: 0 0 8px var(--lamp); }
.gate-top .langs { grid-area: langs; padding-bottom: 6px; }
.gate-top .langs button { min-height: 36px; }

@media (max-width: 860px) {
  .gate-top { grid-template-columns: auto 1fr auto; grid-template-areas: "brand . burger" "nav nav nav" "langs langs langs"; gap: 8px 12px; padding-top: calc(env(safe-area-inset-top, 0px) + 54px); }
  .gate-brand img { width: 58px; }
  .gate-burger { grid-area: burger; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line-strong); color: var(--bone); font-family: var(--osd); font-size: 19px; letter-spacing: .06em; cursor: pointer; user-select: none; }
  .gate-burger .bars { display: inline-grid; gap: 4px; }
  .gate-burger .bars i { display: block; width: 18px; height: 2px; background: currentColor; }
  .gate-menu-toggle:focus-visible + .gate-burger { outline: 2px solid var(--lamp); outline-offset: 3px; }
  .gate-nav { grid-area: nav; display: none; flex-direction: column; align-items: stretch; gap: 0; border: 1px solid var(--line-strong); background: var(--ink1); padding: 6px; }
  .gate-menu-toggle:checked ~ .gate-nav { display: flex; }
  .gate-link { min-height: 48px; border-bottom: 1px solid var(--line); padding-inline: 14px; }
  .gate-link.here { border-bottom-color: var(--line); background: #1e170f; }
  .gate-acct { margin: 6px 0 0; flex-direction: column; align-items: stretch; }
  .gate-acct .gate-link { border-bottom: 0; }
  .gate .btn.gate-cta { justify-content: center; }
}

/* ---------- the home page's additions ---------- */
.gate .hero-note { font-family: var(--body); font-size: 16.5px; color: var(--parch); margin: -6px 0 0; line-height: 1.45; }
.gate .rooms-asof { font-family: var(--body); font-size: 14.5px; color: var(--parch-dim); }
.gate .dl-funnel { margin-top: 14px; font-family: var(--osd); font-size: 19px; letter-spacing: .04em; color: var(--lamp); }
.gate .office .form h3 { font-family: var(--display); font-weight: 600; font-size: 26px; letter-spacing: 0; text-transform: none; }
.gate .office .form p.sub { font-family: var(--body); font-size: 16px; color: var(--paper-dim); line-height: 1.5; }
.gate .board .empty { text-transform: none; font-family: var(--body); font-size: 16px; letter-spacing: 0; }

/* ---------- the page head ---------- */
.gate-main { padding-block: clamp(22px, 4vw, 44px) clamp(40px, 6vw, 72px); min-height: 52vh; }
.gate-head { display: grid; gap: 12px; max-width: 900px; }
.gate-head-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; }
.gate .h1 { font-family: var(--display); font-weight: 600; color: var(--bone); font-size: clamp(34px, 4.8vw, 56px); line-height: 1.02; letter-spacing: .005em; margin: 0; max-width: 22ch; text-wrap: balance; }
.gate .lede { margin-top: 2px; }
.gate .gate-tools { flex: 0 1 auto; }
.gate .eyebrow { font-size: 16px; }

/* ---------- a scene: the form and the panel beside it ---------- */
.scene { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: clamp(20px, 3vw, 44px); align-items: start; margin-top: clamp(24px, 3.4vw, 40px); }
.scene.narrow { grid-template-columns: minmax(0, 620px) minmax(280px, 360px); }
@media (max-width: 900px) { .scene, .scene.narrow { grid-template-columns: minmax(0, 1fr); } }

/* ---------- shared form pieces ---------- */
.gate .punch form, .gate .file-form form { display: grid; gap: 18px; }
.gate .field { display: grid; gap: 7px; margin: 0; min-width: 0; }
.gate .field > label, .gate .field > legend, .gate fieldset.field > legend { font-family: var(--body); font-weight: 700; font-size: 13.5px; letter-spacing: .1em; text-transform: uppercase; }
.gate fieldset.field { border: 0; padding: 0; margin: 0; }
.gate .field .help { font-family: var(--body); font-size: 14.5px; line-height: 1.45; letter-spacing: 0; margin: 0; }
.gate .field .err { font-family: var(--body); font-size: 15px; line-height: 1.4; letter-spacing: 0; margin: 0; padding-left: 10px; border-left: 3px solid currentColor; }
.gate .field .avail, .gate .field .match { font-family: var(--body); font-size: 15px; letter-spacing: 0; margin: 0; min-height: 1.3em; }
.gate .field .avail[data-ok="wait"] { font-style: italic; }
.gate .pw { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.gate .reveal { font-family: var(--osd); font-size: 17px; letter-spacing: .06em; min-width: 64px; min-height: 44px; padding: 0 12px; border: 1px solid; background: transparent; cursor: pointer; }
.gate .meter { display: block; height: 6px; background: rgba(0,0,0,.12); overflow: hidden; border-radius: 3px; }
.gate .meter i { display: block; height: 100%; width: 0; transition: width .25s, background .25s; }
.gate .meter i[data-level="1"] { width: 34%; background: #b3231a; }
.gate .meter i[data-level="2"] { width: 67%; background: var(--lamp-deep); }
.gate .meter i[data-level="3"] { width: 100%; background: #2f7a2a; }
.gate .dob { display: grid; grid-template-columns: 5.5em 5.5em 7em; gap: 10px; }
.gate .dob > span { display: grid; gap: 5px; }
.gate .dob label { font-family: var(--body); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: none; }
.gate .dob input { text-align: center; font-variant-numeric: tabular-nums; }
.gate .agree, .gate .field > label.agree { display: flex; gap: 12px; align-items: flex-start; font-family: var(--body); font-size: 16px; line-height: 1.45; cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 400; }
.gate .agree input[type="checkbox"] { width: 24px; height: 24px; flex: none; margin-top: 1px; cursor: pointer; }
.gate .agree a { text-decoration: underline; text-underline-offset: 3px; }
.gate .caps[hidden] { display: none; }
.gate .form-actions { display: grid; gap: 12px; margin-top: 4px; }
.gate .form-actions .btn { justify-self: start; min-height: 50px; font-size: 21px; padding: 12px 24px; }
.gate .form-foot { font-family: var(--body); font-size: 15.5px; line-height: 1.5; display: grid; gap: 4px; margin: 0; }
.gate .form-foot a { text-decoration: underline; text-underline-offset: 3px; }
.gate .stay { font-family: var(--body); font-size: 14px; line-height: 1.45; margin: 0; }
@media (max-width: 480px) {
  .gate .form-actions .btn { justify-self: stretch; justify-content: center; }
  .gate .dob { grid-template-columns: 1fr 1fr 1.4fr; }
}

/* A callsign is stored in capitals, so it is typed in capitals. */
.gate input.callsign { text-transform: uppercase; }
.gate input.callsign::placeholder { text-transform: none; }
.file-form h2 { font-family: var(--display); font-weight: 600; font-size: 27px; line-height: 1.1; color: var(--paper-ink); margin: 0; }
.file-form p.body { font-family: var(--body); font-size: 16px; line-height: 1.5; color: var(--paper-ink); margin: 0; }

/* Dark inputs: the punch card and any form on the tape. */
.gate .punch .field > label, .gate .punch legend { color: var(--parch); }
.gate .punch input[type="text"], .gate .punch input[type="password"] { font-family: var(--body); font-size: 19px; color: var(--bone); background: #0c0a09; border: 1px solid var(--line-strong); border-radius: 4px; padding: 11px 14px; min-height: 48px; width: 100%; letter-spacing: .01em; transition: border-color .15s, box-shadow .15s; }
.gate .punch input:focus { outline: 2px solid transparent; border-color: var(--lamp); box-shadow: 0 0 0 3px rgba(240,177,58,.2); }
.gate .punch .field.bad input { border-color: var(--rec); }
.gate .punch .help { color: var(--parch-dim); }
.gate .punch .err { color: #ffb9ae; border-left-color: var(--rec); }
.gate .punch .reveal { color: var(--parch); border-color: var(--line-strong); }
.gate .punch .reveal:hover { color: var(--bone); border-color: var(--bone); }
.gate .punch .reveal[aria-pressed="true"] { color: var(--lamp); border-color: var(--lamp-deep); }
.gate .punch .form-foot { color: var(--parch); }
.gate .punch .form-foot a { color: var(--lamp); }
.gate .punch .stay { color: var(--parch-dim); }
.gate .punch .agree { color: var(--parch); }
.gate .punch .agree input { accent-color: var(--lamp); }

/* ---------- the punch card (sign in) ---------- */
.punch { position: relative; background: linear-gradient(180deg, #17130f 0%, #100d0b 100%); border: 1px solid var(--line-strong); border-radius: 6px; padding: 24px 26px 26px; box-shadow: 0 30px 60px rgba(0,0,0,.55), inset 0 1px 0 rgba(233,220,193,.06); display: grid; gap: 18px; overflow: hidden; }
.punch::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: repeating-linear-gradient(90deg, var(--rec) 0 18px, var(--lamp) 18px 36px); opacity: .8; }
.punch-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-family: var(--osd); font-size: 17px; letter-spacing: .14em; text-transform: uppercase; color: var(--parch-dim); }
.punch-head .rec { display: inline-flex; align-items: center; gap: 8px; color: var(--lamp); }
.punch-head .rec i { width: .55em; height: .55em; border-radius: 50%; background: var(--rec); box-shadow: 0 0 8px var(--rec); animation: blink 1.4s steps(1) infinite; }
.punch .flash { margin: 0; }
@media (max-width: 480px) { .punch { padding: 20px 16px 22px; } }

/* ---------- the personnel file (sign up) ---------- */
.file { position: relative; background: #c9a86a; border-radius: 4px 14px 4px 4px; padding: 28px 14px 14px; box-shadow: 0 30px 60px rgba(0,0,0,.55); margin-top: 16px; }
.file::before { content: ""; position: absolute; left: 0; top: -14px; width: 46%; height: 18px; background: #c9a86a; border-radius: 8px 8px 0 0; }
.file .tab { position: absolute; left: 14px; top: -11px; font-family: var(--osd); font-size: 15px; letter-spacing: .14em; color: #4a3a22; text-transform: uppercase; }
.file-form { position: relative; background: radial-gradient(circle at 28% 78%, rgba(240,177,58,.16), transparent 55%), var(--paper); color: var(--paper-ink); padding: 26px 24px 28px; display: grid; gap: 20px; }
.file-form::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.035) 0 1px, transparent 1px 3px); }
.file-form > * { position: relative; }
.file-form .field > label, .file-form legend { color: var(--paper-dim); }
.file-form input[type="text"], .file-form input[type="password"] { font-family: var(--body); font-size: 19px; color: var(--paper-ink); background: rgba(255,255,255,.38); border: 1px solid #a39679; border-bottom: 2px solid #8d7f66; border-radius: 3px; padding: 10px 12px; min-height: 48px; width: 100%; text-transform: none; letter-spacing: .01em; transition: border-color .15s, box-shadow .15s, background .15s; }
.file-form input::placeholder { color: #9a8d75; opacity: 1; }
.file-form input:focus { outline: 2px solid transparent; border-color: var(--paper-ink); background: rgba(255,255,255,.6); box-shadow: 0 0 0 3px rgba(42,35,27,.14); }
.file-form .field.bad input { border-color: #b3231a; }
.file-form .help { color: var(--paper-dim); }
.file-form .err { color: #b3231a; border-left-color: #b3231a; }
.file-form .avail[data-ok="true"], .file-form .match[data-ok="true"] { color: #2f5d2a; }
.file-form .avail[data-ok="false"], .file-form .match[data-ok="false"] { color: #b3231a; }
.file-form .avail[data-ok="wait"] { color: var(--paper-dim); }
.file-form .reveal { color: var(--paper-ink); border-color: #a39679; }
.file-form .reveal:hover { border-color: var(--paper-ink); background: rgba(255,255,255,.4); }
.file-form .reveal[aria-pressed="true"] { background: var(--paper-ink); color: var(--paper); border-color: var(--paper-ink); }
.file-form .agree { color: var(--paper-ink); }
.file-form .agree input { accent-color: var(--paper-ink); }
.file-form .agree a { color: var(--paper-ink); }
.file-form .agree a:hover { color: #b3231a; }
.file-form .flash { font-family: var(--body); font-size: 16px; letter-spacing: 0; border-width: 2px; margin: 0; }
.file-form .flash.good { color: #2f5d2a; border-color: #6d8f67; background: rgba(109,143,103,.18); }
.file-form .flash.bad { color: #8f1d15; border-color: #b3231a; background: rgba(179,35,26,.12); }
.file-form .form-foot { color: var(--paper-dim); }
.file-form .form-foot a { color: var(--paper-ink); }
.file-form .btn.paper { background: var(--paper-ink); border-color: var(--paper-ink); color: var(--paper); }
.file-form .btn.paper:hover { background: #3d3327; box-shadow: none; }
.file-form .more { border: 1px dashed #a39679; padding: 0 14px; }
.file-form .more summary { font-family: var(--body); font-weight: 600; font-size: 15px; color: var(--paper-dim); padding: 12px 0; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.file-form .more summary::-webkit-details-marker { display: none; }
.file-form .more summary::before { content: ""; width: 0; height: 0; border-left: 7px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; transition: transform .15s; }
.file-form .more[open] summary::before { transform: rotate(90deg); }
.file-form .more > div { display: grid; gap: 16px; padding: 4px 0 16px; }
.file-form .opts2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.file-form .opts3 { display: flex; flex-wrap: wrap; gap: 8px; }
.file-form .pick { position: relative; display: block; }
.file-form .pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-form .pick span { display: grid; gap: 2px; border: 1px solid #a39679; border-radius: 3px; padding: 9px 12px; font-family: var(--body); font-size: 15.5px; font-weight: 600; line-height: 1.2; cursor: pointer; background: rgba(255,255,255,.3); min-height: 44px; align-content: center; transition: border-color .15s, background .15s; }
.file-form .pick span small { font-weight: 400; font-size: 13.5px; color: var(--paper-dim); line-height: 1.3; }
.file-form .pick:hover span { border-color: var(--paper-ink); }
.file-form .pick input:checked + span { border-color: var(--paper-ink); background: var(--paper-ink); color: var(--paper); }
.file-form .pick input:checked + span small { color: #cfc6b4; }
.file-form .pick input:focus-visible + span { outline: 2px solid #b3231a; outline-offset: 2px; }
.file-form .stamp { justify-self: start; font-family: var(--osd); font-size: 17px; letter-spacing: .16em; text-transform: uppercase; border: 3px solid #b3231a; color: #b3231a; padding: 3px 9px; transform: rotate(-4deg); opacity: .85; }
@media (max-width: 480px) { .file { padding: 26px 8px 8px; } .file-form { padding: 22px 16px 24px; } .file-form .opts2 { grid-template-columns: 1fr; } }

/* ---------- the panels beside a scene ---------- */
.tonight, .steps-panel { border: 1px solid var(--line-strong); background: var(--ink1); padding: 20px 22px 22px; display: grid; gap: 14px; align-content: start; }
.tonight-h, .steps-panel h2 { font-family: var(--osd); font-weight: 400; font-size: 17px; letter-spacing: .14em; text-transform: uppercase; color: var(--lamp); margin: 0; display: flex; align-items: center; gap: 10px; }
.tonight-h .dot { width: .55em; height: .55em; border-radius: 50%; background: var(--rec); box-shadow: 0 0 8px var(--rec); animation: blink 1.4s steps(1) infinite; }
.tonight-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.tonight-stats li { display: grid; gap: 2px; }
.tonight-stats b { font-family: var(--display); font-weight: 600; font-size: 38px; line-height: 1; color: var(--bone); font-variant-numeric: tabular-nums; }
.tonight-stats span { font-family: var(--body); font-size: 14.5px; color: var(--parch-dim); }
.tonight-none { font-family: var(--body); font-size: 15px; color: var(--parch); margin: 0; line-height: 1.45; }
.tonight-van { font-family: var(--osd); font-size: 19px; letter-spacing: .05em; color: var(--parch-dim); margin: 0; }
.tonight .btn { justify-self: start; }
.steps-panel ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.steps-panel li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; font-family: var(--body); font-size: 15.5px; line-height: 1.45; color: var(--parch); }
.steps-panel li::before { content: counter(step); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--lamp-deep); color: var(--lamp); font-family: var(--osd); font-size: 17px; }
.steps-panel li b { color: var(--bone); font-weight: 700; }
.steps-panel .fine { font-family: var(--body); font-size: 14px; color: var(--parch-dim); line-height: 1.45; margin: 0; padding-top: 10px; border-top: 1px solid var(--line); }
.steps-panel .fine::before { content: "🔒 "; }

/* ---------- a board (rooms, news, clans, download) in the public shell ---------- */
.gate-board { margin-top: clamp(20px, 3vw, 32px); display: grid; gap: 18px; }
.gate-board .gate-account-note { margin: 0; font-size: 17px; }
.gate-board .gate-account-note a { color: var(--lamp); }

/* The boards' slabs keep their frames, but a sentence in them is a sentence:
   the old pages set their help lines in the camcorder font. */
.gate-board .slab .help, .gate-board .slab p.empty, .gate-board .room-empty p, .gate-board .newslist .nbody, .gate-board .notes li { font-family: var(--body); font-size: 15.5px; letter-spacing: 0; text-transform: none; line-height: 1.5; }
.gate-board .slab .steps, .gate-board .steps { display: grid; grid-template-columns: 1fr; gap: 10px; padding-left: 20px; }
.gate-board .slab .steps li { font-family: var(--body); font-size: 15.5px; line-height: 1.5; color: var(--parch); }
.gate-board .slab .steps li b { color: var(--bone); }
.gate-board .slab h3 { text-transform: uppercase; }

/* ---------- prose pages (rules, privacy, terms) ---------- */
.gate-prose { max-width: 66ch; margin-top: clamp(20px, 3vw, 32px); display: grid; gap: 14px; }
.gate-prose h2 { font-family: var(--display); font-weight: 600; font-size: 27px; line-height: 1.1; color: var(--bone); margin: 18px 0 0; }
.gate-prose p, .gate-prose li { font-family: var(--body); font-size: 17px; line-height: 1.6; color: var(--parch); }
.gate-prose b, .gate-prose strong { color: var(--bone); }
.gate-prose a { color: var(--bone); text-decoration: underline; text-underline-offset: 3px; }
.gate-prose a:hover { color: var(--lamp); }
.gate-prose ul, .gate-prose ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.gate-prose ol.rule-list { list-style: none; padding: 0; counter-reset: rule; gap: 10px; }
.gate-prose ol.rule-list li { counter-increment: rule; display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: baseline; }
.gate-prose ol.rule-list li::before { content: counter(rule, decimal-leading-zero); font-family: var(--osd); font-size: 22px; color: var(--lamp); letter-spacing: .04em; }
.gate-prose .fine { font-size: 14.5px; color: var(--parch-dim); }
.gate-prose .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.gate-prose dl { margin: 0; display: grid; gap: 8px; }
.gate-prose dt { font-family: var(--body); font-weight: 700; color: var(--bone); }
.gate-prose dd { margin: 0 0 6px; }

/* ---------- the blank tape (404) and other empty pages ---------- */
.blank { display: grid; gap: 18px; max-width: 640px; margin-top: 24px; }
.blank .actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- cards on a page (the welcome page's next steps) ---------- */
.gate-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.gate-card { border: 1px solid var(--line-strong); background: var(--ink1); padding: 18px 18px 20px; display: grid; gap: 8px; align-content: start; text-decoration: none; color: var(--parch); transition: border-color .15s, transform .15s; }
.gate-card:hover { border-color: var(--lamp-deep); transform: translateY(-1px); }
.gate-card h3 { font-family: var(--display); font-weight: 600; font-size: 24px; color: var(--bone); margin: 0; }
.gate-card p { font-family: var(--body); font-size: 15px; line-height: 1.45; margin: 0; }
.gate-card .go { font-family: var(--osd); font-size: 18px; color: var(--lamp); letter-spacing: .06em; }
.codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.codes li { font-family: var(--osd); font-size: 26px; letter-spacing: .14em; color: var(--paper-ink); padding: 8px 12px; border: 1px dashed #a39679; text-align: center; user-select: all; }
@media (max-width: 420px) { .codes { grid-template-columns: 1fr; } }

/* ---------- the footer: the tape's tail ---------- */
.gate-foot { position: relative; margin-top: clamp(48px, 8vw, 96px); padding: 30px 0 28px; border-top: 1px solid var(--line); display: grid; gap: 22px; }
.gate-foot-stripe { position: absolute; left: 0; top: -1px; width: 100%; height: 3px; background: repeating-linear-gradient(90deg, var(--rec) 0 18px, var(--lamp) 18px 36px); opacity: .5; }
.gate-foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.gate-foot-brand { line-height: 0; }
.gate-foot-brand img { width: 88px; height: auto; filter: drop-shadow(0 2px 10px rgba(0,0,0,.7)); }
.gate-foot-text { display: grid; gap: 4px; }
.gate-foot-tag { font-family: var(--display); font-weight: 600; font-size: 24px; color: var(--bone); margin: 0; }
.gate-foot-fine { font-family: var(--body); font-size: 15px; color: var(--parch-dim); margin: 0; }
.gate-foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.gate-foot-links a { font-family: var(--osd); font-size: 19px; letter-spacing: .04em; color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding: 6px 0; min-height: 36px; display: inline-flex; align-items: center; transition: color .15s, border-color .15s; }
.gate-foot-links a:hover { color: var(--lamp); border-bottom-color: var(--lamp); }
.gate-foot-top { margin-left: auto; }
@media (max-width: 640px) { .gate-foot-top { margin-left: 0; } }

/* ---------- motion manners ---------- */
@media (prefers-reduced-motion: reduce) {
  .punch-head .rec i, .tonight-h .dot { animation: none; opacity: 1; }
}
