/* Latin subsets of Saira Condensed Regular and Saira Extra Condensed ExtraBold (SIL OFL 1.1, see
   fonts/OFL.txt). Renamed because the licence reserves the name "Saira" for unmodified fonts. */
@font-face {
  font-family: "Rotation Condensed";
  src: url("fonts/rotation-condensed-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rotation Extra Condensed";
  src: url("fonts/rotation-extra-condensed-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #1d1a20;
  --bar: #000000;
  --surface: #2a2a2c;
  --fg: #fff8f8;
  --muted: #b8b2bc;
  --line: rgba(255, 255, 255, 0.16);
  --outline: rgba(255, 255, 255, 0.85);
  --red: #d21f3c;
  /* Red for small text on the dark background, where #d21f3c is too dim to read. */
  --red-text: #ff6b7f;
  --focus: #f7bb04;
  --art-bg: linear-gradient(135deg, #2e2b33, #121014);
  --scrim: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.05) 85%);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 16'%3E%3Cpath d='M2 2l6 6-6 6' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E");
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 8.5l4 4 9-9' fill='none' stroke='%23000' stroke-width='2.5'/%3E%3C/svg%3E");
  --now-scrim:
    linear-gradient(to right, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0) 70%),
    linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.25) 45%, rgba(0, 0, 0, 0) 70%);
  --cut: 1.25rem;
  --display: "Rotation Extra Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --text: "Rotation Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  font-family: var(--text);
  font-size: 106.25%;
  line-height: 1.45;
  background: var(--bg);
  color: var(--fg);
  scrollbar-color: #5a5560 var(--bg);
  accent-color: var(--red);
}

*, *::before, *::after { box-sizing: border-box; }

::selection { background: var(--red); color: #ffffff; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0 auto;
  max-width: 74rem;
  padding: 0 clamp(1rem, 4vw, 2.5rem) 2.5rem;
  -webkit-text-size-adjust: 100%;
}

main {
  flex: 1;
  padding-bottom: 3rem;
}

h1, h2, h3, p { margin: 0; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: #ffffff; text-decoration-color: var(--red); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Headings that only take focus so screen readers land on them after navigation. */
[tabindex="-1"]:focus { outline: none; }

.muted { color: var(--muted); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.small { font-size: 0.9375rem; }
[hidden] { display: none !important; }

button, select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

/* The heading style of the official site: heavy, extra condensed, slanted capitals. */
.masthead h1, .now-map, .countdown-time,
.slot-map, .map-name, .submit-vote, .prose h1, .prose h2 {
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* Black bar across the full window width, like the official site's header. */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.875rem 0;
  background: var(--bar);
  box-shadow: 0 0 0 100vmax var(--bar);
  clip-path: inset(0 -100vmax);
}

.masthead h1, .masthead p {
  font-size: 1.5rem;
  line-height: 1;
}

.masthead h1 .muted { color: var(--muted); }

.masthead h1 a { text-decoration: none; }

.masthead p { font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; }
.masthead p a { text-decoration: none; }

/* Images on art cards. They fade in once loaded, and a failed one is removed from its frame. */

/* Each frame is its own stack, so whatever is layered inside it never rises above the card's text. */
.mode-art, .now-art, .map-art, .slot-art {
  background: var(--art-bg);
  overflow: hidden;
  isolation: isolate;
}

.mode-art img, .now-art img, .map-art img, .slot-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.mode-art img.loaded, .now-art img.loaded, .map-art img.loaded, .slot-art img.loaded { opacity: 1; }

/* Stack the sharp current-map art over its pre-blurred preview, and new panel art over the art
   it replaces (marked .leaving), which stays underneath until it is covered. */
.now-art > img, .mode-art > img { position: absolute; inset: 0; }
.mode-art > .leaving, .now-art > .leaving { z-index: 0; }

/* Unknown map, the same in every frame (home panel, hero, next-map card): a dark field with a
   trace of the pool art blurred past recognition and a whole "?" in the
   heading face, sized to sit inside the frame. If the image fails, the field and the "?" remain.
   The frame is isolated, so none of this rises above the card text. */
.mystery {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center end;
  padding-right: 7%;
  overflow: hidden;
  background: #17141b;
  container-type: size;
}

.mystery img {
  position: absolute;
  z-index: -1;
  inset: 0;
}

.mystery img.loaded { opacity: 0.2; }

/* The hero's trace is the map's small colour art, blurred here rather than in the file. */
.mystery-colour {
  filter: blur(24px) saturate(1.1) brightness(0.6);
  scale: 1.2;
}

.mystery img.mystery-colour.loaded { opacity: 0.4; }

.mystery::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
}

.now-art .mystery::after { background: var(--now-scrim); }

/* In the hero the "?" takes the top corner, clear of the prompt and its button. */
.now-art .mystery { place-items: start end; padding: 1.5rem 7%; }
.now-art .mystery-mark { font-size: min(45cqh, 40cqw); }

.mystery-mark {
  position: relative;
  z-index: 2;
  padding: 0 0.12em;
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  font-size: min(72cqh, 55cqw);
  line-height: 1;
  color: rgba(255, 255, 255, 0.09);
}

.mode-art::after, .now-art::after, .map-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scrim);
}

.mode-art, .now-art, .map-art {
  position: absolute;
  inset: 0;
}

/* Home: a header row with the shared countdown, then one slanted panel per mode, after the
   official modes page. On phones the panels are full-width bands, skewed as a whole with their
   art and text skewed back, so the outline, hover bar and click area follow the slanted shape. */

.home { padding-top: clamp(1.25rem, 3vw, 2rem); padding-bottom: 1.5rem; }

.panels {
  --skew: 3deg;
  --rise: 1rem;
  display: grid;
  gap: 0.625rem;
  margin: 0.25rem 0 0;
  padding: var(--rise) 0;
  list-style: none;
}

.panel {
  position: relative;
  display: block;
  height: 5.75rem;
  overflow: hidden;
  background: var(--art-bg);
  color: #ffffff;
  text-decoration: none;
  transform: skewY(calc(-1 * var(--skew)));
}

.panel .mode-art {
  inset: calc(-1 * var(--rise)) 0;
  transform: skewY(var(--skew));
}

/* Phones: the art is wider than the band and pinned to its left, painted side, so most of the
   wireframe half is cropped. One even darkening plus a heavier left side gives every band the
   same text contrast. */
.panel .mode-art > img {
  left: 0;
  width: 160%;
  max-width: none;
  object-position: 0 50%;
}

.panel .mode-art::after,
.panel .mystery::after {
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.76) 0%, rgba(0, 0, 0, 0.64) 55%, rgba(0, 0, 0, 0.26) 83%, rgba(0, 0, 0, 0.46) 100%);
}

.panel .mystery { place-items: center; padding: 0 0 0 10%; }

.panel-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.0625rem;
  padding: 0 1.25rem;
  text-align: left;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  transform: skewY(var(--skew));
}

/* The mode is the label; the map on now is the headline. */
.panel-mode {
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: #ffffff;
}

/* app.js steps --fit down until a long name fits --fit-lines lines. */
.mode-map {
  --fit-lines: 1;
  max-width: 100%;
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: calc(1.875rem * var(--fit, 1));
  line-height: 0.92;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

/* A bar only appears when the rotation predicts a different map. */
.panel-progress {
  appearance: none;
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 0.3125rem;
  border: 0;
  background: rgba(255, 255, 255, 0.2);
}

.panel-progress::-webkit-progress-bar { background: transparent; }
.panel-progress::-webkit-progress-value { background: var(--red); }
.panel-progress::-moz-progress-bar { background: var(--red); }

.panel:is(:hover, :focus-visible) .mode-art:has(> img.loaded)::after { opacity: 0.85; }

/* On the skewed phone bands the outline takes the slanted shape too. */
.panel:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.panel { scroll-margin-block-start: 4rem; }

@media (min-width: 70rem) {
  /* Padding on the items instead of a gap, so the items' boxes meet and the pointer is always
     over one of them: no gap to drop into while the hovered panel widens. */
  .panels {
    --skew: 7deg;
    --pad: 0.25rem;
    /* How far the top edge sits right of the bottom edge: the old 7deg skew over 26rem. */
    --slant: calc(26rem * tan(var(--skew)));
    /* Widening a panel squeezes the others, down to --keep of an equal share and no further.
       --grow is the factor that lands the others just above that floor, so the whole
       transition is spent moving. */
    --keep: 0.92;
    --grow: 1.5;
    container: panels / inline-size;
    display: flex;
    gap: 0;
    margin-top: 1.25rem;
    /* Leave room for the slanted outer edges. */
    padding: 0 calc(var(--slant) / 2 - var(--pad));
  }
  .panels > li { position: relative; flex: 1 1 0; min-width: calc(100cqi / var(--mode-count, 1) * var(--keep)); padding-inline: var(--pad); }
  /* Here the slant is a clip-path on an upright panel rather than a skew. Software renderers
     redraw a skewed clip on every frame it changes size, which made widening a panel stutter
     (p95 117ms against 34ms in Firefox with software WebRender at 4K). The parallelogram sits
     where the skew put it, its top half a slant right of the box and its bottom half a slant
     left, so the 0.5rem gaps between neighbours stay. */
  .panel, .panels > li::before {
    --left-top: calc(var(--slant) / 2);
    --right-bottom: calc(100% - var(--slant) / 2);
  }
  .panel {
    height: clamp(24rem, 100dvh - 18.5rem, 36rem);
    overflow: visible;
    transform: none;
    clip-path: polygon(var(--left-top) 0, calc(100% + var(--slant) / 2) 0, var(--right-bottom) 100%, calc(var(--slant) / -2) 100%);
  }
  .panel .mode-art { inset: 0 calc(var(--slant) / -2); transform: none; }
  .panel .mode-art::after,
  .panel .mystery::after {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.75) 30%, rgba(0, 0, 0, 0.1) 65%);
  }
  /* A tall, narrow panel: the "?" sits higher, clear of the text, still cut by the right edge. */
  /* Above the text block, centred in the visible part of the tall panel. */
  .panel .mystery { place-items: center; padding: 0 0 12rem; }
  .panel .mystery-mark { font-size: 60cqw; }
  .panel-progress { left: calc(var(--slant) / -2); width: 100%; }
  /* Anchored to the bottom and shifted left by part of the slant, so the left-aligned text sits
     inside the parallelogram at the height it occupies. */
  .panel-text {
    inset: auto 0 0;
    justify-content: flex-end;
    padding: 0 0.75rem 1.5rem 1.125rem;
    transform: none;
    translate: calc(var(--slant) * -0.28) 0;
  }
  /* The clip would hide an outline, so the focus ring is a slightly larger parallelogram drawn
     behind the panel by its unclipped list item. */
  .panel:focus-visible { outline: none; }
  .panels > li:has(> .panel:focus-visible)::before {
    content: "";
    position: absolute;
    inset: -4px calc(var(--pad) - 4px);
    background: var(--focus);
    clip-path: polygon(var(--left-top) 0, calc(100% + var(--slant) / 2) 0, var(--right-bottom) 100%, calc(var(--slant) / -2) 100%);
  }
  /* Size from the whole row so the type stays steady as a panel expands. */
  .panel .mode-map {
    --name: min(3rem, (100cqi / var(--mode-count, 1) * var(--keep) - 2 * var(--pad) - 2rem - 5px) / 3.45);
    --fit-lines: 2;
    min-height: calc(var(--name) * 1.84);
    margin-top: 0.125rem;
    font-size: calc(var(--name) * var(--fit, 1));
  }
  .panel-mode { font-size: 1rem; }
  /* Center mystery art in each card. Known maps use an image rectangle spanning the row. */
  .panel .mode-art > img, .panel .mystery img {
    inset: 0 auto;
    left: 50%;
    width: auto;
    max-width: none;
    height: 100%;
    aspect-ratio: 16 / 9;
    translate: -50% 0;
  }
  .panel .mode-art > img {
    left: var(--shared-art-center, 50%);
    width: var(--shared-art-width, auto);
  }
}

/* Desktop row with a fine pointer: the panel under the pointer or keyboard focus widens and its
   neighbours narrow, like an accordion. The neighbours keep all their text. */
@media (min-width: 70rem) {
  .panels > li:has(> .panel:focus-visible) { flex-grow: var(--grow); }
}

@media (min-width: 70rem) and (hover: hover) and (pointer: fine) {
  .panels > li:hover { flex-grow: var(--grow); }
}

/* flex-grow is a plain number, so it transitions without interpolate-size. With reduced motion
   the panel still widens, at once. */
@media (min-width: 70rem) and (prefers-reduced-motion: no-preference) {
  .panels > li { transition: flex-grow 450ms cubic-bezier(0.22, 1, 0.36, 1); }
}

/* The mode navigation is the tracker's full-width black header. */
.tracker-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: var(--bar);
  box-shadow: 0 0 0 100vmax var(--bar);
  clip-path: inset(0 -100vmax);
}

.mode-nav {
  display: flex;
  align-items: center;
}

.mode-tabs {
  --fade-start: 0px;
  --fade-end: 0px;
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}

.mode-tabs > li { max-width: 100%; }
.mode-tabs.scroll-back { --fade-start: 0.875rem; }
.mode-tabs.scroll-forward { --fade-end: 0.875rem; }
.mode-tabs:is(.scroll-back, .scroll-forward):not(:focus-within) {
  mask-image: linear-gradient(to right, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
}

.scroll-modes {
  flex: 0 0 2.75rem;
  align-self: stretch;
  min-height: 2.75rem;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--bar);
}

.scroll-modes::after {
  content: "";
  display: block;
  width: 0.5rem;
  height: 0.875rem;
  margin-inline: auto;
  background: var(--chevron) center / contain no-repeat;
}

.scroll-modes.at-end::after { rotate: 180deg; }
.scroll-modes:hover { background: var(--surface); }
.scroll-modes:focus-visible { outline-offset: -3px; }
.mode-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 0.875rem;
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.1875rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
}

.mode-tab:hover { color: #ffffff; }

/* The current mode gets a slanted red bar along the bottom edge, like the panels' hover bar. */
.mode-tab[aria-current="page"] {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}
.mode-tab[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto 0.5rem 0;
  height: 0.25rem;
  background: var(--red);
  transform: skewX(-18deg);
}

.mode-tab:focus-visible { outline-offset: -3px; }

/* A thin rule sets the way home apart from the modes. */
.mode-home {
  flex: none;
  padding-left: 0;
  padding-right: 1rem;
  margin-right: 0.5rem;
  color: var(--muted);
  border-right: 1px solid var(--line);
  min-height: 2.75rem;
}

.mode-home::before {
  content: "";
  width: 0.5rem;
  height: 0.75rem;
  background: currentColor;
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
}

.notice {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
}

.small-button {
  min-height: 2rem;
  padding: 0.125rem 0.75rem;
  border: 1px solid var(--outline);
  border-radius: 2px;
  background: transparent;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.small-button:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.layout {
  display: grid;
  gap: 2rem;
  padding-top: clamp(1rem, 3vw, 1.75rem);
}

.loading .upcoming,
.loading .report,
.loading .countdown,
.loading .now-ask { display: none; }

/* The current map, full width. The art is darkened on the left and along the bottom so the
   text reads on any arena; the corner cut is the official panels' edge. */
.now {
  --cut: 1.5rem;
  /* The map name leads; the countdown digits are a step smaller. */
  --hero-type: clamp(3rem, 12cqi, 5.5rem);
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-height: clamp(19rem, 42dvh, 23rem);
  overflow: hidden;
  background: var(--art-bg);
  color: #ffffff;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  container-type: inline-size;
}

.now-art::after { background: var(--now-scrim); }

/* Phones: the art is taller than the card and anchored to its bottom, so the arena fills the
   card rather than the sky above it. */
.now-art > img {
  top: auto;
  height: 125%;
  object-position: 50% 100%;
}

.now-copy {
  position: relative;
  display: grid;
  grid-template-areas: "mode" "map" "clock" "ask";
  align-items: end;
  width: 100%;
  padding: 1.25rem 1.25rem 1.5rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.now-mode {
  grid-area: mode;
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.92);
}

.now-map {
  grid-area: map;
  max-width: 11em;
  margin: 0.25rem 0 0 -0.04em;
  font-size: var(--hero-type);
  line-height: 0.86;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

/* With no map, "Unknown" steps down and the prompt and button follow it straight away. */
.now.is-unknown .now-map { font-size: calc(var(--hero-type) * 0.82); }
.now.is-unknown .now-copy { grid-template-areas: "mode" "map" "ask" "clock"; }
.now.is-unknown .countdown { margin-top: 1.5rem; }
.now.is-unknown .now-ask { margin-top: 0.75rem; }

/* Time remaining until the next predicted map change. */
.countdown {
  grid-area: clock;
  display: grid;
  justify-items: start;
  margin-top: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.8);
}

.countdown-time {
  margin-top: 0.125rem;
  font-size: calc(var(--hero-type) * 0.72);
  line-height: 0.86;
  color: #ffffff;
}

.countdown-bar {
  justify-self: stretch;
  height: 0.3125rem;
  margin-top: 0.625rem;
  background: rgba(255, 255, 255, 0.2);
}

.countdown-bar span {
  display: block;
  height: 100%;
  background: var(--red);
  transform-origin: left;
  transform: scaleX(var(--elapsed, 0));
}

/* The prompt (only when the map is unknown) and the report button, together. */
.now-ask {
  grid-area: ask;
  display: grid;
  justify-items: start;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.now-sub {
  font-size: 1.25rem;
  line-height: 1.25;
  color: #ffffff;
}

.now-sub:empty { display: none; }

.section-title {
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.875rem;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.upcoming .section-title { margin-bottom: 1rem; }

/* Next maps: art banners on phones, a row of cards on wider screens. */
.slots {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.slot {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 5rem;
  overflow: hidden;
  background: var(--surface);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 0.75rem), calc(100% - 0.75rem) 100%, 0 100%);
}

.slot-art {
  position: absolute;
  inset: 0;
}

.slot-art::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.1) 100%);
}

.slot-art > img { position: absolute; inset: 0; }

.slot-text {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem;
  line-height: 1.1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.slot time {
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.88);
}

.slot-map { font-size: 1.5rem; line-height: 0.95; overflow-wrap: anywhere; }

.slot-empty {
  padding: 1rem 1.25rem;
  border: 1px dashed var(--line);
  border-radius: 2px;
}

/* Report: pick a map, then send it from the bar under the grid. */

.report {
  display: grid;
  align-content: start;
  /* Clear of the sticky tab row when the hero's button scrolls here. */
  scroll-margin-top: 4rem;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  background: #242127;
  border: 1px solid var(--line);
}

.report-instruction {
  margin: 0.375rem 0 1rem;
  color: var(--muted);
}

.maps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.map {
  scroll-margin-block-start: 4rem;
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-height: 4.5rem;
  aspect-ratio: 2 / 1;
  padding: 0;
  border: 0;
  border-radius: 2px;
  overflow: hidden;
  background: var(--art-bg);
  color: #ffffff;
  text-align: left;
}

/* Dark enough at the bottom that names read even on the brightest arena art. */
.map-art::after {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.05) 75%);
}

.map-name {
  position: relative;
  padding: 0.5rem 0.625rem;
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* A neutral flag marks the prediction. Selection has its own treatment. */
.map-tag {
  display: none;
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  padding: 0.25rem 0.875rem 0.25rem 0.5rem;
  background: #eeebee;
  color: #201a21;
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  font-size: 0.875rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  clip-path: polygon(0 0, 100% 0, calc(100% - 0.5rem) 100%, 0 100%);
}

.map.is-now .map-tag { display: block; }

/* The selection ring is drawn inside the tile, so it never spills past the grid. */
.map[aria-pressed="true"] .map-art::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  box-shadow: inset 0 0 0 3px #ffffff;
}

/* Clear of the tile, so focus and selection show at the same time. */
.map:focus-visible { outline-offset: 3px; }

/* Once a map is picked, the other tiles' art steps back a little; their names stay full
   strength, and pointing at a tile brings its art back. */
.maps:has(.map[aria-pressed="true"]) .map:not([aria-pressed="true"], :hover, :focus-visible) .map-art { opacity: 0.75; }

/* The selected map gets a white disc with a drawn check. */
.map[aria-pressed="true"]::before,
.map[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0.4rem;
  right: 0.4rem;
  width: 1.5rem;
  height: 1.5rem;
}

.map[aria-pressed="true"]::before { border-radius: 50%; background: #ffffff; }

.map[aria-pressed="true"]::after {
  background: #111111;
  -webkit-mask: var(--check) center / 0.875rem no-repeat;
  mask: var(--check) center / 0.875rem no-repeat;
}

.map:disabled { opacity: 0.6; }

/* The bar under the grid: the picked map and the button that sends it. Once a map is picked it
   sticks to the bottom of the screen until the report section ends. */
.report-bar {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-top: 1rem;
  padding: 0.75rem;
  border-top: 1px solid var(--line);
  background: #242127;
}

.report:has(.map[aria-pressed="true"]):not(:has(.map:focus-visible)) .report-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 -0.75rem 1.5rem rgba(0, 0, 0, 0.45);
}

.report-thumb {
  position: relative;
  flex: none;
  width: 4.5rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--art-bg);
}

.report-thumb:empty { display: none; }

.report-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.report-thumb img.loaded { opacity: 1; }

.report-text { flex: 1 1 auto; min-width: 0; }

.report-summary {
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.report-mode {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.2;
  color: var(--muted);
}

.report-mode:empty, .vote-status:not(:empty) ~ .report-mode { display: none; }


/* A status message (sending, thanks, an error) stands in for the summary. */
.vote-status:empty { display: none; }
.vote-status:not(:empty) + .report-summary { display: none; }

/* Keep both steps of reporting on the same button treatment. */
.report-jump, .submit-vote {
  flex: none;
  min-height: 3rem;
  padding: 0.25rem 1.5rem;
  border: 2px solid var(--red);
  border-radius: 0;
  background: var(--red);
  color: #ffffff;
  text-shadow: none;
  transform: skewX(-12deg);
}

.report-jump > span, .submit-vote > span {
  display: block;
  transform: skewX(12deg);
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.375rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

:is(.report-jump, .submit-vote):hover:not(:disabled) {
  border-color: #df2343;
  background: #df2343;
}

.submit-vote { margin-right: 0.375rem; }

.submit-vote:disabled {
  border-color: rgba(255, 255, 255, 0.3);
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
}

/* A shorter hero gives the first upcoming map room on a phone. */
@media (max-width: 43.99rem) {
  .countdown {
    grid-template-columns: auto 1fr;
    align-items: baseline;
    column-gap: 0.75rem;
    margin-top: 0.875rem;
  }
  .countdown-time { grid-column: 2; grid-row: 1; }
  .countdown-bar { grid-column: 1 / -1; }
  .now-ask { margin-top: 0.875rem; }
  .now.is-unknown { min-height: 0; }
  .report-bar {
    margin-inline: -0.75rem;
    padding: 0.625rem 0.75rem calc(0.625rem + env(safe-area-inset-bottom));
  }
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.erase {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.erase-confirm {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

.link-button:hover { text-decoration-color: var(--red); text-decoration-thickness: 2px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

/* Links on the left, the disclaimer on the right; when they wrap, it stays right-aligned. */
.disclaimer { margin-left: auto; text-align: right; }

/* Tablets and up: the hero's text sits on a dark left side with the art clear on the right,
   the next maps sit in a row, and the sections share one spacing step. */
@media (min-width: 44rem) {
  .layout { gap: 2.25rem; }
  /* All the text sits on a dark left side; the right of the hero is the art alone. */
  .now { min-height: 0; }
  .now-art > img { top: 0; height: 100%; object-position: 50% 50%; }
  .now-art::after, .now-art .mystery::after {
    background:
      linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.78) 35%, rgba(0, 0, 0, 0.3) 58%, rgba(0, 0, 0, 0) 75%),
      linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 40%);
  }
  .now-copy { padding: clamp(1.5rem, 3vw, 2.25rem); }
  .countdown { width: min(100%, 15rem); }
  .now-art .mystery { place-items: center end; padding-inline-end: 14%; }
  .now-art .mystery-mark {
    font-size: min(72cqh, 28cqw);
    color: rgba(255, 255, 255, 0.14);
  }
  .section-title { font-size: 2.25rem; }
  /* Tighter tabs, so all six modes fit a tablet's width without scrolling. */
  .mode-tab:not(.mode-home) { padding-inline: 0.5rem; }
  .mode-tab { font-size: 1.0625rem; }
  .mode-home { padding-right: 0.75rem; }

  .upcoming .section-title { margin-bottom: 1.25rem; }
  .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
  .slot { align-items: flex-end; min-height: 8rem; }
  .slot-art::after { background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 50%, rgba(0, 0, 0, 0.05) 100%); }
  .slot-map { font-size: 1.75rem; }
  .maps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .map { aspect-ratio: 16 / 10; }
  .map-name { font-size: 1.3125rem; }
  .report-mode { font-size: 1rem; }
  .report-bar { padding: 0.75rem 0.375rem 0 0; }
  .report:has(.map[aria-pressed="true"]):not(:has(.map:focus-visible)) .report-bar { padding-bottom: 0.75rem; }
  .report-thumb { width: 5.5rem; }
}

@media (min-width: 64rem) {
  .layout { gap: 1.875rem; }
  .upcoming .section-title { margin-bottom: 1rem; }
  .slot { min-height: 7.5rem; }
  .map { aspect-ratio: 16 / 9; }
  /* The countdown stands right of the name block, past a thin rule. */
  .now { min-height: clamp(18rem, 22vw, 20rem); }
  .now-copy {
    grid-template-columns: minmax(0, max-content) auto 1fr;
    grid-template-areas: "mode clock ." "map clock ." "ask clock .";
    column-gap: 2rem;
  }
  .now.is-unknown .now-copy { grid-template-areas: "mode clock ." "map clock ." "ask clock ."; }
  .countdown, .now.is-unknown .countdown {
    grid-row: 1 / -1;
    align-self: end;
    margin: 0;
    width: 13rem;
    padding-left: 2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.22);
  }
  .maps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .mode-tab:not(.mode-home) { padding-inline: 0.875rem; }
  .mode-tab { font-size: 1.1875rem; }
  .mode-home { padding-right: 1rem; }
}

@media (max-width: 30rem) {
  .masthead h1, .masthead p { font-size: 1.3125rem; }
  .report-bar { gap: 0.625rem; }
  .report-thumb { width: 3.5rem; }
  .report-summary { font-size: 1.25rem; }
  .submit-vote { padding-inline: 1.25rem; }
  :is(.report-jump, .submit-vote) > span { font-size: 1.25rem; }
  .map-name { font-size: 1.0625rem; }
  /* Too narrow for two columns: the disclaimer wraps under the links, so it reads left to right. */
  .disclaimer { margin-left: 0; text-align: left; }
}

@media (max-width: 23rem) {
  .mode-tab { font-size: 1.0625rem; }
  .mode-tab:not(.mode-home) { padding-inline: 0.5rem; }
  .mode-home { padding-right: 0.5rem; margin-right: 0.25rem; }
  .report-bar:has(.report-thumb:not(:empty)) { flex-wrap: wrap; }
  .report-thumb:not(:empty) + .report-text { flex-basis: calc(100% - 4.125rem); }
  .submit-vote { margin-inline-start: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  button, .mode-tab {
    transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out, box-shadow 120ms ease-out;
  }
  .mode-art img, .now-art img, .map-art img, .slot-art img {
    transition: opacity 250ms ease-out, transform 250ms ease-out;
  }
  .panel .mode-art::after { transition: opacity 200ms ease-out; }
  .map:hover:not(:disabled) .map-art img.loaded { transform: scale(1.04); }
}

.prose {
  max-width: 68ch;
  padding-top: 2rem;
}

.prose h1 {
  font-size: 2.625rem;
  line-height: 0.95;
  margin-bottom: 1rem;
}

.prose h2 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.625rem;
  line-height: 1;
}

.prose p, .prose ul { margin: 0 0 0.875rem; }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.375rem; }
.prose li::marker { color: var(--red-text); }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 0.85em; }

/* Home to a mode and back: the mode's panel morphs into the current-map card (app.js gives the
   two the shared name), and the rest of the page slides a little the way you are going. */
::view-transition-group(mode-art) {
  animation-duration: 400ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-old(mode-art),
::view-transition-new(mode-art) {
  height: 100%;
  object-fit: cover;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 300ms;
  animation-timing-function: ease-in-out;
}

@keyframes page-out-left { to { opacity: 0; translate: -3rem 0; } }
@keyframes page-in-right { from { opacity: 0; translate: 3rem 0; } }
@keyframes page-out-right { to { opacity: 0; translate: 3rem 0; } }
@keyframes page-in-left { from { opacity: 0; translate: -3rem 0; } }

html:active-view-transition-type(forward)::view-transition-old(root) { animation-name: page-out-left; }
html:active-view-transition-type(forward)::view-transition-new(root) { animation-name: page-in-right; }
html:active-view-transition-type(backward)::view-transition-old(root) { animation-name: page-out-right; }
html:active-view-transition-type(backward)::view-transition-new(root) { animation-name: page-in-left; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
