:root {
  --bg: #04070f;
  --panel: #0a1226;
  --line: rgba(120, 170, 255, 0.18);
  --text: #eef4ff;
  --muted: #8fa3c8;
  --blue: #3d8bff;
  --cyan: #57e0ff;
  --gold: #ffc643;
  --font: 'Segoe UI', Inter, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
}

/* ------------------------------------------------------------ show canvas */

#show {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;          /* survives the mobile URL bar collapsing */
  display: block;
  background: var(--bg);
  touch-action: none;      /* the canvas handles its own taps */
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* --------------------------------------------------------- document pages */

body.page {
  overflow: auto;
  background:
    radial-gradient(1100px 620px at 50% -10%, rgba(61, 139, 255, 0.18), transparent 70%),
    var(--bg);
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.brand {
  display: flex;
  align-items: baseline;
  font-weight: 800;
  font-size: 44px;
  letter-spacing: -1.5px;
  margin: 0 0 6px;
}
.brand .hundred { color: var(--gold); }

/* The one checkbox in the app. Laid out as a row rather than inheriting the
   block layout every other input here uses, because a tick and its words
   belong on the same line. */
.tick {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
  cursor: pointer;
  user-select: none;
}
.tick input {
  width: auto;
  margin: 0;
  accent-color: var(--gold);
  /* Big enough to hit with a thumb. */
  width: 18px;
  height: 18px;
  flex: none;
}
.tick span { font-size: 14px; color: #9fb2d4; }

/* An unofficial fan project has to say so, plainly and everywhere. */
.notice {
  margin: 46px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #5d6f8f;
  font-size: 12px;
  line-height: 1.7;
  max-width: 640px;
}

.tagline {
  color: var(--muted);
  margin: 0 0 40px;
  font-size: 17px;
}

.card {
  background: rgba(9, 17, 36, 0.86);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 32px;
  margin-bottom: 22px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: 0.4px;
}

.card p { color: var(--muted); margin: 0 0 18px; line-height: 1.6; }

.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

label {
  display: block;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

input[type=text], input[type=email], input[type=password] {
  width: 100%;
  padding: 13px 15px;
  margin-bottom: 16px;
  background: rgba(4, 9, 22, 0.9);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
}
input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(87, 224, 255, 0.15);
}

.btn {
  display: inline-block;
  padding: 14px 30px;
  border: 0;
  border-radius: 12px;
  background: var(--gold);
  color: #12203f;
  font-family: var(--font);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 1px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(255, 198, 67, 0.28); }

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn.ghost:hover { border-color: var(--cyan); box-shadow: none; }

.err {
  background: rgba(255, 77, 94, 0.12);
  border: 1px solid rgba(255, 77, 94, 0.4);
  color: #ffd6da;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 15px;
}

.muted { color: var(--muted); font-size: 14px; }
a { color: var(--cyan); }

/* Seat picker on the home page: three cards, one per role. */
.seats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 720px) { .seats { grid-template-columns: 1fr; } }

.seat-card {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 16, 34, 0.6);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.seat-card:hover {
  border-color: rgba(255, 198, 67, 0.55);
  background: rgba(18, 29, 54, 0.75);
  transform: translateY(-2px);
}
.seat-card b {
  display: block;
  font-size: 17px;
  letter-spacing: 0.4px;
  color: var(--gold);
  margin-bottom: 6px;
}
.seat-card span {
  display: block;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
/* The honest caveat under each card: what this actually gets you. */
.seat-card em {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(143, 163, 200, 0.75);
}

/* Next live show, on the home page. Automated shows are always on and need no
   announcement; a live one is an event, so it gets a line of its own. */
.livestrip {
  display: flex; align-items: center; gap: 18px;
  margin-top: 20px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(8, 16, 34, 0.6);
}
.livestrip.open { border-color: rgba(56, 217, 122, 0.5); }
.livestrip b { display: block; font-size: 12px; letter-spacing: 2px;
               text-transform: uppercase; color: var(--gold); margin-bottom: 3px; }
.livestrip.open b { color: #b7f5d0; }
.livestrip span { color: var(--muted); font-size: 14px; }
.livestrip .btn { margin: 0 0 0 auto; padding: 9px 18px; font-size: 14px; }
@media (max-width: 560px) {
  .livestrip { flex-direction: column; align-items: flex-start; }
  .livestrip .btn { margin: 4px 0 0; }
}

/* What the automated run is playing next, on the home page. Quieter than the
   live strip on purpose: an event is an announcement, and this is the bill. */
.billstrip {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin-top: 18px; padding: 12px 16px;
  border: 1px solid rgba(120, 170, 255, 0.14); border-radius: 12px;
  background: rgba(8, 16, 34, 0.4);
}
.billstrip b { font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
               color: var(--muted); margin-right: 8px; }
.billstrip span { color: var(--text); font-weight: 700; }
.billstrip .band { color: var(--muted); font-weight: 600; font-size: 13px;
                   margin-left: 8px; }
.billstrip .then { color: var(--muted); font-size: 13px; }

/*
 * Tables, on a phone.
 *
 * Every table on these pages is a row of numbers with a name in it — a
 * leaderboard, a profile's best answers, the admin lists — and six columns of
 * that is wider than a phone however small the type gets. They were not
 * scrolling either: the page has no horizontal scroll, so the far column was
 * simply cut off at the edge of the screen, which loses data silently rather
 * than loudly.
 *
 * So the table becomes its own scrolling box below 640px. `display: block` is
 * what makes that possible — a table cannot scroll as a table — and the cells
 * inside still lay out as a table, so nothing about the markup or the desktop
 * rendering changes. Scoped to the two containers these pages use so it is the site's tables and not, one
 * day, something inside the game.
 *
 * The padding comes down with it, because two columns of a six column table
 * are made of padding at this width, and a table that fits is better than a
 * table that scrolls.
 */
@media (max-width: 640px) {
  .wrap table,
  .page table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .wrap table th, .page table th,
  .wrap table td, .page table td { padding-left: 7px; padding-right: 7px; }
  /* A number that wraps is two numbers as far as the eye is concerned. */
  .wrap table th.n, .page table th.n,
  .wrap table td.n, .page table td.n { white-space: nowrap; }
}

/*
 * The site nav.
 *
 * Sticky, because the pages under it are long - the leaderboard and the
 * changelog both run well past a screen - and a nav you have to scroll back up
 * to find is one people stop using.
 *
 * It wraps rather than collapsing into a hamburger. There are at most eight
 * links and they are all short; a menu behind a button would be a tap and an
 * animation to reach something that fits on two lines on the narrowest phone.
 */
.sitenav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(4, 8, 20, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.sitenav-in {
  max-width: 1080px;
  margin: 0 auto;
  padding: 9px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.sitenav .nav-left,
.sitenav .nav-right { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.sitenav .nav-right { margin-left: auto; }
.sitenav a {
  display: block;
  padding: 7px 11px;
  border-radius: 8px;
  color: #b9cdec;
  font: 700 13px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
}
.sitenav a:hover { color: #eef4ff; background: rgba(120, 170, 255, 0.10); }
.sitenav a.on { color: var(--gold); background: rgba(255, 198, 67, 0.10); }
.sitenav a.cta { color: #0b1020; background: var(--gold); }
.sitenav a.cta:hover { color: #0b1020; filter: brightness(1.08); }
.sitenav a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
/* Who you are, and the way to your own record. It used to be a bare span and
   was hidden on a narrow screen, on the grounds that the links mattered more
   than a name you already know. Now that it is the only route to the profile
   page, hiding it would put that page out of reach of every phone - so it
   stays and gives up its width instead. */
.sitenav .who {
  padding: 0 8px;
  color: var(--muted);
  font: 700 12px/1 var(--font);
  letter-spacing: 0.4px;
}
@media (max-width: 620px) {
  .sitenav .who {
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sitenav-in { padding: 7px 12px; }
  .sitenav a { padding: 6px 9px; font-size: 12px; }
}
