:root {
  color-scheme: dark;
  --bg: #0e141a;
  --bg-end: #0a0f18;
  --panel: rgba(20, 28, 36, 0.88);
  --panel-strong: #141c24;
  --line: rgba(255, 255, 255, 0.12);
  --text: #fff;
  --muted: #a7b0bb;
  --accent: #14b8a6;
  --accent-hover: #70f8d7;
  --accent-soft: rgba(20, 184, 166, 0.15);
  --brand-primary: #fff;
  --brand-secondary: #70f8d7;
  --brand-surface: rgba(20, 28, 36, 0.84);
  --brand-border: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 20% 8%, var(--accent-soft), transparent 32%),
    linear-gradient(180deg, var(--bg), var(--bg-end));
  color: var(--text);
  font: 16px/1.65 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  width: min(880px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* The wordmark is 161px and the links beside it are another 110-150. On a 320px screen that does
     not fit, and without this the row simply overhung: privacy.html measured 350px of content in a
     320px viewport, so the page scrolled sideways under a finger. Wrapping costs nothing at any
     width where the row does fit. */
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.brand-link {
  display: inline-flex;
  gap: 4px;
  padding: 7px 11px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--brand-surface);
  color: var(--brand-primary);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.14);
  text-transform: uppercase;
}

.brand-link strong { color: var(--brand-secondary); }

a { color: var(--accent); text-decoration: none; font-weight: 800; }
a:hover { color: var(--accent-hover); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

article {
  padding: clamp(22px, 5vw, 40px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

h1 { margin: 0 0 8px; font-size: clamp(34px, 7vw, 56px); line-height: 1; }
h2 { margin: 28px 0 8px; color: var(--text); font-size: 20px; }
p, li { color: var(--muted); }
p { margin: 0 0 12px; }
ul { margin: 0; padding-left: 20px; }
strong { color: var(--text); }
.date { color: var(--muted); font-size: 14px; }

/* How to Play brings its own stylesheet — guide.css — and only borrows the shell above: the
   tokens, the background, the wordmark and the nav. It used to be styled from here, and inheriting
   the furniture of a legal document is most of what made a page about a game read like one. */


@media (max-width: 720px) {
  main { padding: 28px 0; }
  nav { align-items: flex-start; margin-bottom: 24px; }
  nav > span { text-align: right; }
}

/* Below about 430px the wordmark and the links do not share a row on any of these pages, and
   flex-wrap on its own breaks them wherever it likes — on privacy.html, whose links are bare
   siblings rather than a group, that left "Terms /" on one line and "Support" on the next with the
   separator stranded. A block nav puts the wordmark on its own line and lets the links flow
   underneath as the one run of text they read as. */
@media (max-width: 430px) {
  nav { display: block; margin-bottom: 22px; }
  nav .brand-link { display: flex; width: fit-content; margin-bottom: 12px; }
  nav > span { text-align: left; }
}

/* The nav links on these pages are the one control on them, and they measured 59.2x19.0 on a
   390px phone — the game's own footer links get padded to 44px for exactly this reason and these
   never were. Padding with a matching negative margin, so the hit area grows and the row does not
   move. Keyed to the short axis too: sideways, the same page is the same finger.

   The padding is vertical only. It used to be `13px 6px` with `-13px -6px` against it, and a
   negative margin does not undo the overflow it causes: the last link's trailing 6px still ran
   past the end of its parent, so `nav` and `main` both measured 6px of scrollWidth they could not
   show and the whole page could be dragged sideways by six pixels on a phone. Height is the axis
   that was failing 44px anyway — the links were already 59px and 49px wide.

   `pointer: coarse` as well as the sizes, because a tablet held in portrait is 768x1024: a finger
   on a screen that is neither narrow nor short, which both width queries miss. */
@media (max-width: 560px), (max-height: 560px), (pointer: coarse) {
  nav a:not(.brand-link) {
    display: inline-block;
    padding: 13px 0;
    margin: -13px 0;
  }

  /* The wordmark is a link home and measured 42.4px tall — near enough to look right and still
     short of the target, which is the sort of miss that only a measurement finds. */
  .brand-link { min-height: 44px; align-items: center; }
}

/* ---------- the support form -------------------------------------------------------------------
   Reported as showing nothing when a request was sent. Part of that was the server losing the
   ticket, and part was this: `.status` had no rule anywhere in this stylesheet, so the confirmation
   rendered as an unstyled paragraph in body colour under the button — present, and easy to miss
   entirely on a phone. A message nobody notices is a message nobody got. */

.support-form {
    display: grid;
    gap: 14px;
    max-width: 560px;
    margin-top: 20px;
}

.support-form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.support-form input,
.support-form textarea {
    width: 100%;
    /* Margin sits outside border-box, and a width:100% control with the UA's own margin overhangs
       its container — the defect that let the iOS settings sheet be dragged sideways. */
    margin: 0;
    padding: 11px 12px;
    font: inherit;
    color: inherit;
    background: var(--panel, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--line, rgba(255, 255, 255, 0.18));
    border-radius: 10px;
}

.support-form textarea { min-height: 150px; resize: vertical; }

.support-form button {
    justify-self: start;
    /* A thumb needs 44px; the default button height is nowhere near it. */
    min-height: 44px;
    padding: 0 22px;
    font: inherit;
    font-weight: 700;
    color: #04121a;
    background: var(--accent, #3bf5c8);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.support-form button[disabled] { opacity: 0.55; cursor: default; }

.support-form .status {
    margin: 0;
    padding: 12px 14px;
    font-weight: 700;
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent, #3bf5c8) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent, #3bf5c8) 42%, transparent);
    color: var(--accent, #3bf5c8);
}

/* Nothing to say yet, so nothing to draw — an empty plate under the button reads as a fault. */
.support-form .status:empty { display: none; }

.support-form .status.is-bad {
    background: color-mix(in srgb, var(--danger, #ff4d6d) 14%, transparent);
    border-color: color-mix(in srgb, var(--danger, #ff4d6d) 42%, transparent);
    color: var(--danger, #ff4d6d);
}
