/* front_door: the guest pages (welcome, sign-in, invite, reset, account, privacy, errors) and the lobby card.
   Everrest's own pixel fonts, a real screenshot from the game behind the card, nothing remote. The pixel fonts are only ever drawn at
   multiples of 8 px (16, 24, 32, 48): any other size breaks their lines.
   Two kinds of text (ps-site-type, Nov 26 2026; Aaron: "that large font for everything made it hard to read... While I
   love our font and like the charm, huge text boxes everyone does make it hard"):
   - display text (titles, chips, labels, numbers, names, the race clock, the logo lockups) stays in the pixel
     fonts, where the charm lives; buttons are in the clean pixel font (--px) only, never the title font (Nov 27: "i don't like using header font in the buttons");
   - reading text (sentences, form help, lists, quotes, the privacy page) is in --read, the device's own screen font.
     The pixel font at 16 px is its own design drawn 2x (12 px lowercase, 12 px a letter across), as big on the page as
     a 24 px plain font, and 8 px (its 1x) is too small to read, so paragraphs in it ran about 30 letters a line on a phone.
   Every line height, both kinds, stays on the 8 px grid (24 and 32). */
@font-face { font-family: "Everrest Pixel"; src: url("/static/everrest-pixel.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Everrest Pixel Title"; src: url("/static/everrest-pixel-title.ttf") format("truetype"); font-display: swap; }

:root {
  color-scheme: dark;
  --night-0: #01091b; --night-1: #021530; --night-2: #022c4d; --night-3: #0f3552;
  --panel: rgba(2, 12, 30, .94); --frame: #24507a; --frame-hi: #3a6f9f;
  --cream: #f3ecd8; --text: #cbd8e8; --muted: #8fa6c2;
  --gold: #f2c85b; --gold-hi: #ffdc85; --gold-lo: #b8822a; --gold-mid: #d9a640;
  /* buttons only (nothing else on the site is this blue): the standard fill, and the cool paper of the large ones */
  --cta: #1a6fe0; --cta-hi: #4d94f0; --cta-lo: #0a2f75; --cta-hover: #2574d8; --cta-ink: #fff; --cta-edge: #010a1a;
  --paper: #e3eaf5; --paper-hi: #fff; --paper-lo: #4f6288; --paper-hover: #fff; --paper-ink: #02122e;
  --teal: #74e0c4; --amber: #f0a64a; --rose: #f08a8a; --sky: #7fb6ff;
  --px: "Everrest Pixel", ui-monospace, monospace;
  --px-title: "Everrest Pixel Title", "Everrest Pixel", ui-monospace, monospace;
  /* reading text: no font file and nothing fetched; system-ui is Segoe UI on Windows, San Francisco on a Mac and an
     iPhone, Roboto on Android. Body 16/24, a lead 20/32 (18/24 on a phone), small print 14/24. */
  --read: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --t-body: 16px/24px var(--read);
  --t-lead: 20px/32px var(--read);
  --t-small: 14px/24px var(--read);
}
@media (max-width: 700px) { :root { --t-lead: 18px/24px var(--read); } }
html { background: var(--night-0); }
/* body has no background of its own: it would paint over the fixed art layer below (html carries the colour). */
body { margin: 0; min-height: 100vh; color: var(--text); background: transparent;
  font: 16px/24px var(--px); -webkit-font-smoothing: none; font-smooth: never; text-rendering: optimizeSpeed; }
/* A screenshot from the game, held still behind everything (a fixed layer, not background-attachment: phones
   ignore that). The door picks one of the pool at random for each page it serves and names it on <body> (bg-1 to
   bg-6: Aaron's own press-kit screenshots, Nov 25 2026: "I like them all, randomize them out of a pool"). Only real
   captures of the game go in the pool, never generated art. */
.bg-1 { --bg: url("/static/bg-1.webp"); --bg-s: url("/static/bg-1-small.webp"); }   /* Amberfall river */
.bg-2 { --bg: url("/static/bg-2.webp"); --bg-s: url("/static/bg-2-small.webp"); }   /* Wanehold storm hall */
.bg-3 { --bg: url("/static/bg-3.webp"); --bg-s: url("/static/bg-3-small.webp"); }   /* Habibi's vista, the mountain */
.bg-4 { --bg: url("/static/bg-4.webp"); --bg-s: url("/static/bg-4-small.webp"); }   /* Whisperwood, the cascade steps */
.bg-5 { --bg: url("/static/bg-5.webp"); --bg-s: url("/static/bg-5-small.webp"); }   /* the Lucid map */
.bg-6 { --bg: url("/static/bg-6.webp"); --bg-s: url("/static/bg-6-small.webp"); }   /* supper in the Hub */
/* The layer between the art and the card (Aaron, Nov 25: "a better overlay between UI and background... so it doesnt
   dominate"): his screenshot stays, set back under one flat, slightly cool scrim (flat, so nothing bands across the
   pixel art; no blur on it) and a soft vignette that darkens only toward the edges, so the card reads first. */
body::before, .sky::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 42%, rgba(3, 8, 24, 0) 40%, rgba(3, 8, 24, .5) 100%),
    linear-gradient(rgba(8, 16, 40, .6), rgba(8, 16, 40, .6)), var(--bg, none) center / cover no-repeat, var(--night-0); }
@media (max-width: 700px) { body::before, .sky::before {
  background: radial-gradient(ellipse 90% 80% at 50% 40%, rgba(3, 8, 24, 0) 40%, rgba(3, 8, 24, .5) 100%),
    linear-gradient(rgba(8, 16, 40, .64), rgba(8, 16, 40, .64)), var(--bg-s, none) center / cover no-repeat, var(--night-0); } }

/* The card: one calm panel with a pixel frame (four flat bands, so the corners step like the game's own UI). */
main.card { position: relative; max-width: 560px; margin: 48px auto 24px; padding: 32px 40px 32px; box-sizing: border-box;
  background: var(--panel);
  box-shadow: 0 -4px var(--frame), 0 4px var(--frame), -4px 0 var(--frame), 4px 0 var(--frame), 0 24px 48px rgba(0, 0, 0, .45); }
@media (max-width: 640px) { main.card { margin: 24px 16px 16px; padding: 24px 24px 24px; } }
.logo { display: block; margin: 0 auto 16px; width: 100%; max-width: 360px; }
.logo img { display: block; width: 100%; height: auto; }

/* Type: one vertical rhythm on an 8 px grid. Pixel sizes 16, 24, 32, 48 only; reading text 14, 16, 18 and 20 px; every
   line height 24, 32, 40, 48 or 64. The title font fills its em box, so headings get more room: 24/40, 32/48, 48/64.
   Headings wrap balanced, paragraphs wrap without a lone last word, and spacing is 8, 16, 24, 32, 48.
   Reading text: every paragraph, list item, form label, field, legend, quote and small print is in --read, unless a
   rule names a pixel font for it (an eyebrow, a chip, a caption, a count): :where() adds no weight, so any class rule
   wins. A dl is a list of labels and values (the account page), display text, so it keeps the pixel font.
   The pixel text keeps its edges hard (font smoothing off on body); reading text is smoothed as the system draws it. */
:where(p, li, label, legend, blockquote, small, figcaption, input, textarea) { font: var(--t-body); -webkit-font-smoothing: auto; text-rendering: auto; }
/* the paragraphs and list items that are display text (each names its pixel font in its own rule): hard edges again */
:is(.eyebrow, .chip, .viewers, .tuning, .cap, .byline, .aka, .more, .line-call, .watching, .place, .gl-clock, .like, .big,
  .ctl-h, .lv-idle-title, .tiles span, .taps span) { -webkit-font-smoothing: none; text-rendering: optimizeSpeed; }
h1, h2, .lead { font-family: var(--px-title); color: var(--cream); font-weight: normal; letter-spacing: 0; text-wrap: balance; }
h1 { font-size: 32px; line-height: 48px; margin: 0 0 16px; text-align: center; }
h2 { font-size: 24px; line-height: 40px; margin: 32px 0 8px; }
p { margin: 0 0 16px; text-wrap: pretty; }
.lead { font: var(--t-lead); color: var(--text); text-align: center; }
.center { text-align: center; }
.quiet, .small { color: var(--muted); }
a { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
a:hover { color: var(--gold-hi); }
/* one ring for the keyboard on every link (the tabs, the Watch chips, the logos and the plain links used to get the
   browser's own 1 px line, which does not show on the night colours); buttons keep theirs, 8 px out */
a:focus-visible { outline: 4px solid var(--sky); outline-offset: 4px; }
ul { margin: 0 0 16px; padding-left: 24px; } li { margin: 0 0 8px; text-wrap: pretty; }

/* Forms */
label { display: block; margin: 0 0 16px; color: var(--muted); }
input[type=email], input[type=password], input[type=text], input[type=number] { display: block; width: 100%; box-sizing: border-box;
  margin-top: 8px; padding: 12px 16px; font: var(--t-body); color: var(--cream); background: var(--night-0); border: 0;
  border-radius: 0; box-shadow: 0 -4px var(--frame), 0 4px var(--frame), -4px 0 var(--frame), 4px 0 var(--frame); outline: none; }
input:focus { box-shadow: 0 -4px var(--gold), 0 4px var(--gold), -4px 0 var(--gold), 4px 0 var(--gold); }
form { margin: 0; }
/* the sign-in sheet (signin.py): Google and Discord stacked, then "or", then the email box; the six digits big and spaced */
p.or { margin: 8px 0; text-align: center; color: var(--muted); font: 16px/24px var(--px); -webkit-font-smoothing: none; }
a.button.wide + a.button.wide { margin-top: 16px; }
input.codebox { font: 32px/48px var(--px); letter-spacing: 8px; text-align: center; padding: 12px 8px; -webkit-font-smoothing: none; }

/* Buttons (Nov 27 2026, Aaron: "i don't like using header font in the buttons ... make them clean please ... cream yellow ... clashes a bit",
   "i like the blue with white text overall it stands out the most", "that white grey one works well on larger buttons"): the clean pixel font,
   blue with a white label for every standard button (24 px, a 4 px lip), cool paper with a night-navy label for the large hero ones
   (32 px, an 8 px lip), a 4 px dark ring round the fill so it reads on the night pages and over bright pictures, a pixel highlight band on top,
   pressed drops by the lip, focus is a white ring. Gold and cream stay for headings, times and links; no button uses them. */
button, a.button { --b: var(--cta); --lipw: 4px; --bandw: 4px; display: inline-block; box-sizing: border-box; margin: 8px 0 8px;
  padding: 12px 32px; font: 24px/40px var(--px); letter-spacing: 0; color: var(--cta-ink); text-decoration: none; text-align: center; cursor: pointer;
  text-wrap: balance;
  background: var(--b); border: 0; border-radius: 0;
  box-shadow: 0 -4px var(--cta-edge), -4px 0 var(--cta-edge), 4px 0 var(--cta-edge), 0 var(--lipw) var(--cta-lo), 0 calc(var(--lipw) + 4px) var(--cta-edge), inset 0 var(--bandw) var(--cta-hi); }
button:hover, a.button:hover { --b: var(--cta-hover); }
button:active, a.button:active { transform: translateY(var(--lipw)); --b: var(--cta);
  box-shadow: 0 -4px var(--cta-edge), -4px 0 var(--cta-edge), 4px 0 var(--cta-edge), 0 4px var(--cta-edge); }
button:focus-visible, a.button:focus-visible, a.watch:focus-visible, input[type=checkbox]:focus-visible { outline: 4px solid #fff; outline-offset: 8px; }
/* the large ones: the hero, the stage's Be the first, the big Wishlist, the share page's go */
a.button.huge, .next button.go, .next a.go, a.button.first { --cta: var(--paper); --cta-hi: var(--paper-hi); --cta-lo: var(--paper-lo);
  --cta-hover: var(--paper-hover); --cta-ink: var(--paper-ink); --lipw: 8px; --bandw: 8px; font: 32px/40px var(--px); padding: 20px 48px; margin-bottom: 12px; }
a.button.first { padding: 16px 40px; }
@media (max-width: 700px) { a.button.huge, .next button.go, .next a.go, a.button.first { font-size: 24px; line-height: 32px; padding: 16px 16px; } }
button.wide, a.button.wide { display: block; width: 100%; }
button:disabled { --b: #34445a; --cta-lo: #263344; color: #b4bfce; cursor: default; transform: none;
  box-shadow: 0 -4px #0f1b2c, -4px 0 #0f1b2c, 4px 0 #0f1b2c, 0 var(--lipw) #263344, 0 calc(var(--lipw) + 4px) #0f1b2c; }
/* quiet: a framed label that takes the button blue when pointed at */
button.soft, a.button.soft { --b: transparent; font: 16px/24px var(--px); color: var(--text); background: rgba(1, 9, 27, .6); padding: 8px 16px;
  box-shadow: 0 -4px var(--frame-hi), 0 4px var(--frame-hi), -4px 0 var(--frame-hi), 4px 0 var(--frame-hi); margin: 8px 8px 8px 4px; }
button.soft:hover, a.button.soft:hover { --b: transparent; background: var(--night-3); color: #fff;
  box-shadow: 0 -4px var(--cta), 0 4px var(--cta), -4px 0 var(--cta), 4px 0 var(--cta); }
button.soft:disabled { color: #8794a6; background: transparent; box-shadow: 0 -4px var(--frame), 0 4px var(--frame), -4px 0 var(--frame), 4px 0 var(--frame); }
.actions { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: center; margin: 24px 0 0; }

/* A message when something went wrong: warm, never alarming. */
.problem { margin: 0 0 24px; padding: 12px 16px; color: var(--cream); background: rgba(120, 40, 60, .35);
  box-shadow: 0 -4px var(--rose), 0 4px var(--rose), -4px 0 var(--rose), 4px 0 var(--rose); }

dl { margin: 0 0 16px; } dl dt { color: var(--muted); } dl dd { margin: 0 0 16px; color: var(--cream); }
.link { word-break: break-all; background: var(--night-0); padding: 8px; }
footer { text-align: center; padding: 16px 16px 32px; color: var(--muted); }
footer a { display: inline-block; padding: 12px 0; color: var(--muted); margin: 0 8px; }      /* 48 px tall for a thumb */
.sep { border: 0; height: 4px; background: var(--frame); margin: 32px 0; opacity: .6; }
kbd { font: 16px/24px var(--px); color: var(--cream); background: var(--night-3); padding: 0 8px; }

/* ---- the lobby card (room.html) */
.status { display: flex; gap: 16px; align-items: flex-start; margin: 0 0 24px; padding: 16px 16px; background: rgba(2, 44, 77, .45);
  box-shadow: 0 -4px var(--night-3), 0 4px var(--night-3), -4px 0 var(--night-3), 4px 0 var(--night-3); text-align: left; }
.status h1 { text-align: left; margin: 0 0 8px; font-size: 32px; line-height: 48px; }
.status p { margin: 0; }
.lamp { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 16px; background: var(--sky);
  animation: glow 1.6s steps(4) infinite; }
.status[data-tone=go] .lamp { background: var(--teal); }
.status[data-tone=wait] .lamp { background: var(--amber); }
.status[data-tone=end] .lamp { background: var(--gold); animation: none; }
.status[data-tone=off] .lamp { background: #5b6b80; animation: none; }
@keyframes glow { 0% { opacity: 1; } 50% { opacity: .35; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lamp { animation: none; } }
@media (max-width: 480px) { .status h1 { font-size: 24px; line-height: 40px; } .lamp { margin-top: 12px; } }
.notes { list-style: none; padding: 0; margin: 0 0 24px; }
.notes li { margin: 0 0 16px; }
.notes b { font-weight: normal; color: var(--cream); }
.line { color: var(--muted); margin: 0 0 8px; }
.line.on { color: var(--teal); }
.agree { display: flex; gap: 16px; align-items: center; margin: 24px 0 16px; color: var(--cream); cursor: pointer; }
.agree input { flex: 0 0 auto; width: 24px; height: 24px; margin: 0; accent-color: var(--gold); cursor: pointer; }
.who { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 16px; color: var(--muted); margin: 24px 0 0; }
.who a { color: var(--muted); }      /* as Sign out beside them and every other footer link */
.who span { flex-basis: 100%; text-align: center; overflow-wrap: anywhere; }
.who form { display: inline; }
.who button.link-like { all: unset; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; margin: 0 8px; }
.who button.link-like:hover { color: var(--gold-hi); }
.who button.link-like:focus-visible { outline: 4px solid var(--sky); outline-offset: 4px; }
#warn { color: var(--amber); text-align: center; margin: 16px 0 0; }
#warn:empty { display: none; }

/* Phones: the plain links in the lobby's footer line and under the forms are 44 px tall to tap (Nov 28) */
@media (max-width: 700px) {
  .who a, .who button.link-like { display: inline-block; padding: 10px 4px; margin-top: -10px; margin-bottom: -10px; }      /* 44 px to tap, no more room taken */
  p.quiet a, p.center a { display: inline-block; padding: 10px 6px; margin: -10px -6px; }
}

/* Discord and the socials (social.py; Aaron, Nov 28: "Advertise our discord and socials as well places"). The big button is
   Discord's blurple with its mark and white words in the clean pixel font; the row is small one-colour marks that take the text
   colour and turn cream when pointed at. Every one is a plain link: nothing from those sites loads. */
a.button.discord { --cta: #5865f2; --cta-hi: #7a85f5; --cta-lo: #3b45b8; --cta-hover: #6a76f4; display: flex; align-items: center; justify-content: center;
  gap: 16px; width: 100%; max-width: 360px; margin: 16px auto 8px; padding: 16px 24px; }
a.button.discord .mark { flex: none; width: 32px; height: 32px; }
nav.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 8px 0; }
nav.socials a { display: inline-grid; place-items: center; width: 44px; height: 44px; color: var(--muted); }
nav.socials a:hover { color: var(--cream); }
footer nav.socials a { display: inline-grid; margin: 0; padding: 0; }
nav.socials a .mark { width: 24px; height: 24px; }
nav.socials.foot { margin: 0 0 8px; }
footer.landfoot nav.socials { flex-basis: 100%; }
.joinbox { margin: 24px 0 0; text-align: center; }
section.findus h2 { margin-top: 0; }
section.findus .wrap { text-align: center; }

/* Aaron's token, the MurMur coin: the one rule for every page (the dialog's sheet uses this one too) */
.token-coin { display: inline-block; width: 16px; height: 16px; margin: 0 8px 0 0; vertical-align: -2px;
  background: url(/static/tok-coin.png) center / contain no-repeat; image-rendering: pixelated; }

/* "Wishlist now" beside the logo on every page that shows it (Aaron, Nov 28: "Cta button super cool CTA next to logo as
   well.. with a steam icon yea?"; thanks.wish_now). Blue with white words like every button, smaller than the page's
   own main action; the Steam mark at the left, a pixel shine that passes every few seconds, a press that sinks onto
   its lip. An account that has said it is wishlisted gets the quiet "Wishlisted" instead. */
.logorow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px; margin: 0 0 16px; }
.logorow > .logo { flex: 1 1 200px; min-width: 0; max-width: 320px; margin: 0; }
a.wishnow, span.wishnow { position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; overflow: hidden;
  padding: 8px 16px 8px 12px; margin: 0 0 8px; font: 16px/24px var(--px); color: #fff; text-decoration: none; white-space: nowrap;
  -webkit-font-smoothing: none; background: var(--cta);
  box-shadow: 0 -4px var(--cta-edge), -4px 0 var(--cta-edge), 4px 0 var(--cta-edge), 0 4px var(--cta-lo), 0 8px var(--cta-edge), inset 0 4px var(--cta-hi); }
a.wishnow:hover { color: #fff; background: var(--cta-hover); }
a.wishnow:active { transform: translateY(4px);
  box-shadow: 0 -4px var(--cta-edge), -4px 0 var(--cta-edge), 4px 0 var(--cta-edge), 0 4px var(--cta-edge), inset 0 4px var(--cta-hi); }
a.wishnow:focus-visible { outline: 4px solid #fff; outline-offset: 6px; }
.wishnow .stm { display: block; flex: none; width: 16px; height: 16px; }
.wishnow > span { position: relative; z-index: 1; }
.wishnow .wn-now { font-style: normal; }
a.wishnow::after { content: ""; position: absolute; inset: 4px 0 0; pointer-events: none; background-repeat: no-repeat; background-size: 300% 100%;
  background-image: linear-gradient(90deg, transparent 0 40%, rgba(255, 255, 255, .55) 40% 41.5%, transparent 41.5% 43%,
    rgba(255, 255, 255, .3) 43% 44.5%, transparent 44.5%);
  background-position: 100% 0; animation: wn-shine 6s steps(24, end) infinite; }      /* background-position only: nothing moves layout */
@keyframes wn-shine { 0%, 75% { background-position: 100% 0; } 100% { background-position: 0 0; } }
span.wishnow.done { color: var(--muted); background: transparent; box-shadow: inset 0 0 0 4px var(--night-3); }
@media (prefers-reduced-motion: reduce) { a.wishnow::after { display: none; } a.wishnow:active { transform: none; } }

/* /login: the same branded ways in as the sign-in dialog (web/signin_dialog.css), one line each down to 360 px */
a.sd-prov { display: flex; align-items: center; justify-content: center; gap: 12px; box-sizing: border-box; width: 100%; min-height: 48px; margin: 0 0 12px;
  padding: 12px 16px; border-radius: 4px; font: 500 16px/24px var(--read); letter-spacing: 0; text-decoration: none; white-space: nowrap; }
a.sd-prov .mark { flex: none; width: 24px; height: 24px; }
a.sd-google { color: #e3e3e3; background: #131314; border: 1px solid #8e918f; }
a.sd-google:hover { color: #fff; background: #1d1e1f; }
a.sd-discord { color: #fff; background: #5865f2; border: 1px solid #5865f2; }
a.sd-discord:hover { color: #fff; background: #4752c4; border-color: #4752c4; }
a.sd-prov:focus-visible { outline: 4px solid #fff; outline-offset: 4px; }
