/* SKI Together — interface.
 *
 * The visual language is alpine trail signage: enamelled metal plates, heavy
 * condensed capitals, and the three run colours doing real work rather than
 * decoration. Every panel carries a coloured edge band that says which part of
 * the mountain you are looking at.
 *
 * The signature element is the altitude rail down the left of the screen: your
 * height above the base station, the three runs drawn as threads, and everyone
 * else on the mountain as a tick. It is the map, the progress bar and the
 * multiplayer roster in one column, and it appears nowhere else but here.
 */

:root {
  --snow: #f2f5f8;
  --snow-dim: #d9e1ea;
  --corduroy: #c7d4e0;
  --slate: #16202b;
  --slate-deep: #0c1219;
  --slate-soft: #24313f;
  --blue: #2e6fd9;
  --red: #d3352c;
  --black: #0c0f13;
  --sun: #ffb23f;
  --ice: #7fb4d8;

  /* Opaque enough to carry its own contrast. The HUD was tuned against a dark
     sky; the game is played on white snow, where a translucent plate stops being
     a plate and the type ends up sitting on the piste. */
  --panel: rgba(11, 17, 24, 0.90);
  --plate-edge: 0 0 0 1px rgba(6, 10, 15, 0.45), 0 6px 22px rgba(6, 10, 15, 0.28);
  --panel-solid: #101923;
  --hairline: rgba(242, 245, 248, 0.16);
  --hairline-strong: rgba(242, 245, 248, 0.34);

  --display: 'Barlow Condensed', 'Haettenschweiler', 'Arial Narrow', sans-serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  --gap: 14px;
  --radius: 3px;
  --band: 4px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--slate-deep);
  color: var(--snow);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

#view {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

/* Deliberately NOT `#ui > * { pointer-events: auto }`. That rule wins on ID
   specificity over `.hud { pointer-events: none }`, so the full-screen HUD ate
   every click in the game: the canvas never saw one, pointer lock never engaged,
   and with no pointer lock the input is idled — which looks exactly like "the
   controls do not work". Only the things you actually click opt in. */
.boot,
.panel-layer--on,
.clicktoplay,
.menu {
  pointer-events: auto;
}

.fallback {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- typography */

.t-display {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  line-height: 0.88;
}

.t-label {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--corduroy);
}

.t-num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'zero' 1;
}

/* ---------------------------------------------------------------- boot */

.boot {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  gap: 20px;
  background:
    radial-gradient(120% 90% at 50% 8%, #1d2c3d 0%, #0c1219 62%, #070b10 100%);
  text-align: center;
}

.boot__label {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(44px, 9vw, 108px);
  letter-spacing: 0.02em;
  line-height: 0.86;
  color: var(--snow);
}

.boot__step {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 13px;
  color: var(--corduroy);
  position: relative;
  padding-top: 18px;
}

.boot__step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--red) 50%, var(--black));
}

/* ---------------------------------------------------------------- helpers */

.clicktoplay {
  position: fixed;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 26px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--hairline);
  border-left: var(--band) solid var(--sun);
  border-radius: var(--radius);
  text-align: center;
}

.clicktoplay b {
  font-family: var(--display);
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.clicktoplay span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--corduroy);
}

.debug {
  position: fixed;
  right: 12px;
  bottom: 12px;
  padding: 8px 11px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.55;
  white-space: pre;
  color: var(--corduroy);
  background: rgba(8, 12, 17, 0.62);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.boot--error .boot__label { color: var(--red); }
.boot--error .boot__step { color: var(--snow); letter-spacing: 0.04em; font-family: var(--mono); text-transform: none; max-width: 60ch; }

/* ================================================================= HUD
 *
 * Anchored to the edges; the middle of the screen is where the skiing is and
 * nothing is allowed to sit there. The cold drains colour from the whole layer
 * through --chill, so freezing looks like freezing without a single icon.
 */

.hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  --chill: 0;
  /* How much of the screen the HUD is allowed to take. It stands down while you
     are actually skiing: at speed the mountain is the thing to look at, and a
     sixty-two pixel speed readout in the corner of a descent is furniture. */
  --hud: 1;
}

.rail, .cluster, .board {
  transform-origin: var(--anchor, left bottom);
  transition: transform 420ms var(--ease), opacity 420ms var(--ease);
}

/* Riding: everything shrinks, and the things you do not read at speed fade back.
   The speed itself stays legible, because that one IS read at speed. */
/* Riding used to fade whole panels to 42%, background included, which is why
   nothing but the speed could be read on the piste. A sign gets smaller as it
   recedes; it does not turn transparent. So the plates keep their contrast and
   only the rows you genuinely do not read at 66 km/h step back. */
.hud--riding .board__roster,
.hud--riding .board__clock,
.hud--riding .rail__tick,
.hud--riding .rail__label,
.hud--riding .bar .t-label { opacity: 0.55; }
.hud--riding .rail { opacity: 0.92; }
.hud--riding .board { opacity: 0.92; }

.hud::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: calc(var(--chill) * 0.9);
  background:
    radial-gradient(120% 90% at 50% 50%, transparent 38%, rgba(120, 165, 210, 0.30) 100%);
  transition: opacity 400ms var(--ease);
}

.hud--hidden { opacity: 0; pointer-events: none !important; }
.hud { transition: opacity 180ms var(--ease); }

.hud > * { pointer-events: none; }
.hud .prompt, .hud .clicktoplay { pointer-events: auto; }

/* ---- the altitude rail: the one bold thing */

.rail {
  position: absolute;
  left: 20px;
  top: 45%;
  transform: translateY(-50%);
  --anchor: left center;
  transform: translateY(-50%) scale(var(--hud));
  /* The viewBox is 92 x 400, so the box has to keep that ratio or the tick
     labels stretch into something nobody can read. */
  --rail-h: min(42vh, 330px);
  height: calc(var(--rail-h) + 52px);
  width: calc(var(--rail-h) * 0.23 + 22px);
  padding: 10px 11px 9px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  /* Thin light lines vanish against a white mountain. The plate is what makes
     the rail readable at midday on a groomed piste. */
  background: linear-gradient(180deg, rgba(10, 15, 21, 0.90), rgba(10, 15, 21, 0.80));
  border: 1px solid var(--hairline);
  border-left: var(--band) solid var(--corduroy);
  border-radius: var(--radius);
  box-shadow: var(--plate-edge);
}

.rail__label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--corduroy);
}

.rail__svg { width: 100%; height: 100%; overflow: visible; }

.rail__tick {
  font-family: var(--mono);
  font-size: 10px;
  fill: rgba(242, 245, 248, 0.72);
}

.rail__run {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  fill: rgba(242, 245, 248, 0.72);
}

.rail__foot {
  display: flex;
  align-items: baseline;
  gap: 3px;
  padding-top: 7px;
  border-top: 1px solid var(--hairline);
}

.rail__alt {
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  color: var(--snow);
}

.rail__unit {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--corduroy);
}

/* ---- vitals, hung under the rail */

/* The last readout without a plate of its own, and the only one still unreadable
   on a groomed piste: mid-grey type on white snow has no contrast whatever you do
   to it. Everything that has to be READ goes on enamel; only the speed number,
   which is huge and yellow, is allowed to sit on the snow. */
.cluster {
  position: absolute;
  left: 22px;
  bottom: 26px;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 12px 18px 12px 15px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-left: var(--band) solid var(--corduroy);
  border-radius: var(--radius);
  box-shadow: var(--plate-edge);
  --anchor: left bottom;
  transform-origin: left bottom;
  transform: scale(var(--hud));
}

.vitals {
  width: 130px;
  display: grid;
  gap: 9px;
  padding-bottom: 6px;
}

.bar .t-label {
  font-size: 10px;
  letter-spacing: 0.16em;
}

.bar__track {
  margin-top: 3px;
  height: 5px;
  background: rgba(242, 245, 248, 0.16);
  border-radius: 2px;
  overflow: hidden;
}

.bar__fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: var(--corduroy);
  transition: background 400ms var(--ease);
}

.bar--cold .bar__fill { background: linear-gradient(90deg, var(--ice), var(--snow)); }
.bar--stamina .bar__fill { background: var(--sun); }
.bar--warning .bar__fill { background: var(--red); }
.bar--warning .t-label { color: var(--red); }

/* ---- speed */

.speed {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: baseline;
  column-gap: 7px;
}

.speed__value {
  grid-row: 1;
  font-size: 46px;
  font-weight: 600;
  line-height: 0.82;
  letter-spacing: -0.02em;
  color: var(--snow);
  transition: color 300ms var(--ease);
}

.speed--fast .speed__value { color: var(--sun); }

.speed__unit {
  grid-row: 1;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--corduroy);
}

.speed__surface {
  grid-row: 2;
  grid-column: 1 / -1;
  margin-top: 6px;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--corduroy);
}

/* ---- points and roster */

.board {
  position: absolute;
  right: 22px;
  top: 22px;
  min-width: 186px;
  padding: 13px 15px 12px;
  background: var(--panel);
  backdrop-filter: blur(9px);
  border: 1px solid var(--hairline);
  border-left: var(--band) solid var(--sun);
  border-radius: var(--radius);
  --anchor: right top;
  transform: scale(var(--hud));
}

.board__head { display: flex; justify-content: space-between; align-items: baseline; }
.board__clock { font-size: 12px; color: var(--corduroy); }

.board__points {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.05;
  margin-top: 2px;
}

.board__roster {
  list-style: none;
  margin: 10px 0 0;
  padding: 9px 0 0;
  border-top: 1px solid var(--hairline);
  display: grid;
  gap: 5px;
}

.board__row {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--corduroy);
}

.board__row--you { color: var(--snow); }
.board__dot { width: 8px; height: 8px; border-radius: 50%; display: block; }
.board__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board__score { font-size: 12px; }

/* ---- transient */

.trick {
  position: absolute;
  left: 50%;
  bottom: 21%;
  transform: translate(-50%, 14px);
  text-align: center;
  opacity: 0;
  transition: opacity 220ms var(--ease), transform 320ms var(--ease);
}

.trick--on { opacity: 1; transform: translate(-50%, 0); }

.trick__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(8, 12, 17, 0.7);
}

.trick__score {
  font-size: 21px;
  font-weight: 600;
  color: var(--sun);
  text-shadow: 0 2px 14px rgba(8, 12, 17, 0.8);
}

.trick__combo {
  margin-top: 2px;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--corduroy);
}

.flash {
  position: absolute;
  left: 50%;
  top: 74px;
  transform: translate(-50%, -8px);
  padding: 9px 18px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-left: var(--band) solid var(--blue);
  border-radius: var(--radius);
  font-size: 13.5px;
  opacity: 0;
  transition: opacity 240ms var(--ease), transform 300ms var(--ease);
}

.flash--on { opacity: 1; transform: translate(-50%, 0); }

.prompt {
  position: absolute;
  left: 50%;
  bottom: 88px;
  transform: translate(-50%, 8px);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 16px;
  background: var(--panel);
  backdrop-filter: blur(9px);
  border: 1px solid var(--hairline);
  border-left: var(--band) solid var(--snow);
  border-radius: var(--radius);
  font-size: 14px;
  opacity: 0;
  transition: opacity 160ms var(--ease), transform 220ms var(--ease);
}

.prompt--on { opacity: 1; transform: translate(-50%, 0); }
.prompt--blocked { border-left-color: var(--red); color: var(--corduroy); }

kbd {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border: 1px solid var(--hairline-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: rgba(242, 245, 248, 0.08);
}

/* ================================================================= panels */

/* Above everything, including the main menu — the settings panel opened from the
   menu was rendering underneath it. */
.panel-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  padding: 26px;
  overflow-y: auto;
  background: linear-gradient(90deg, rgba(8, 12, 17, 0.94) 0%, rgba(8, 12, 17, 0.72) 52%, rgba(8, 12, 17, 0.12) 100%);
  backdrop-filter: blur(3px);
}

.panel-layer--on { display: block; }

.panel {
  max-width: 660px;
  background: var(--panel-solid);
  border: 1px solid var(--hairline);
  border-left: 6px solid var(--panel-band, var(--sun));
  border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.panel__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 4px 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--hairline);
}

.panel__title {
  grid-column: 1;
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 44px;
  line-height: 0.86;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.panel__sub {
  grid-column: 1;
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--corduroy);
  max-width: 46ch;
}

.panel__close {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
}

.panel__body { padding: 18px 24px 22px; display: grid; gap: 22px; }

.rack__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rack__note { font-size: 12px; color: rgba(199, 212, 224, 0.66); }

.rack__row {
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 9px;
}

.card {
  text-align: left;
  padding: 12px 13px 13px;
  background: rgba(242, 245, 248, 0.045);
  border: 1px solid var(--hairline);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  color: var(--snow);
  font: inherit;
  cursor: pointer;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}

.card:hover:not(:disabled) { background: rgba(242, 245, 248, 0.09); transform: translateY(-1px); }
.card--picked { border-left-color: var(--sun); background: rgba(255, 178, 63, 0.10); }
.card--locked, .card:disabled { opacity: 0.5; cursor: not-allowed; }
.card--owned { border-left-color: var(--corduroy); }

.card__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }

.card__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.card__style {
  font-family: var(--display);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--corduroy);
}

.card__stats { margin: 9px 0 0; display: grid; gap: 4px; }

.stat { display: grid; grid-template-columns: 76px 1fr 30px; align-items: center; gap: 7px; }
.stat__label { font-size: 10.5px; color: var(--corduroy); }
.stat__track { height: 3px; background: rgba(242, 245, 248, 0.13); border-radius: 2px; overflow: hidden; }
.stat__fill { display: block; height: 100%; background: var(--corduroy); }
.stat__value { font-size: 10.5px; text-align: right; color: var(--corduroy); }

.card__blurb { margin: 9px 0 0; font-size: 12px; line-height: 1.45; color: rgba(199, 212, 224, 0.86); }
.card__lock { margin-top: 8px; font-size: 11px; color: var(--sun); }
.card__price { margin-top: 9px; font-size: 15px; font-weight: 600; color: var(--sun); }
.card--owned .card__price { color: var(--corduroy); }

.panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.panel__msg { margin: 0; font-size: 13px; color: var(--corduroy); }
.panel__msg--bad { color: var(--red); }

.btn {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 10px 18px;
  color: var(--snow);
  background: rgba(242, 245, 248, 0.07);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}

.btn:hover:not(:disabled) { background: rgba(242, 245, 248, 0.15); }
.btn:disabled { opacity: 0.42; cursor: not-allowed; }
.btn--primary { background: var(--sun); color: var(--slate-deep); border-color: var(--sun); }
.btn--primary:hover:not(:disabled) { background: #ffc367; }
.btn--small { padding: 5px 11px; font-size: 12px; }

.panel__close {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--corduroy);
  background: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 6px 12px;
  cursor: pointer;
}

.panel__close:hover { color: var(--snow); border-color: var(--hairline-strong); }

.swatches__row { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 7px; }

.swatch {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  outline: 1px solid rgba(8, 12, 17, 0.5);
  cursor: pointer;
  transition: transform 140ms var(--ease), border-color 140ms var(--ease);
}

.swatch:hover { transform: translateY(-2px); }
.swatch--on { border-color: var(--snow); }

.field { display: grid; gap: 7px; }
.field__head { display: flex; justify-content: space-between; align-items: baseline; }
.field__value { font-size: 13px; color: var(--corduroy); }
.field--toggle { grid-template-columns: 1fr auto; align-items: center; }

.field__input {
  font: inherit;
  font-size: 15px;
  padding: 9px 12px;
  color: var(--snow);
  background: rgba(242, 245, 248, 0.06);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.field__input:focus { outline: 2px solid var(--sun); outline-offset: 1px; }

.field__range { width: 100%; accent-color: var(--sun); }

.switch {
  width: 46px;
  height: 24px;
  border-radius: 12px;
  border: 1px solid var(--hairline-strong);
  background: rgba(242, 245, 248, 0.08);
  position: relative;
  cursor: pointer;
  transition: background 180ms var(--ease);
}

.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--corduroy);
  transition: transform 180ms var(--ease), background 180ms var(--ease);
}

.switch--on { background: var(--sun); border-color: var(--sun); }
.switch--on::after { transform: translateX(22px); background: var(--slate-deep); }

.seg { display: flex; flex-wrap: wrap; gap: 5px; }

.seg__btn {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 7px 12px;
  color: var(--corduroy);
  background: rgba(242, 245, 248, 0.05);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  cursor: pointer;
}

.seg__btn--on { background: var(--snow); color: var(--slate-deep); border-color: var(--snow); }

.section { display: grid; gap: 10px; }

.keys { display: grid; gap: 6px; }
.keys__row { display: grid; grid-template-columns: 128px 1fr; align-items: center; gap: 12px; font-size: 13px; color: var(--corduroy); }
.keys__row kbd { justify-self: start; }

.settings { display: grid; gap: 16px; }

.tally {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

.tally__item { display: grid; gap: 2px; }
.tally__value { font-size: 22px; font-weight: 600; }

.net { display: grid; gap: 11px; }
.net__status { margin: 0; font-size: 13px; color: var(--corduroy); }
.net__hint { margin: 0; font-size: 12.5px; color: rgba(199, 212, 224, 0.66); line-height: 1.5; }
.net__actions { display: flex; flex-wrap: wrap; gap: 7px; }
.net__join { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.net__rooms { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }

.net__room {
  display: grid;
  grid-template-columns: 88px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  background: rgba(242, 245, 248, 0.05);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  font-size: 13px;
}

.net__code { font-weight: 600; }
.net__host { color: var(--corduroy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net__count { color: var(--corduroy); font-size: 12px; }
.net__empty { font-size: 12.5px; color: rgba(199, 212, 224, 0.6); }

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

@media (max-width: 720px) {
  .rail { display: none; }
    .cluster { gap: 12px; }
  .panel { max-width: none; }
}

/* ================================================================= main menu
 *
 * The 3D behind this is the real mountain with the real lifts turning, so the
 * plate stays to one side and never covers what it is advertising.
 */

.menu {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-content: center;
  padding: 0 clamp(24px, 6vw, 92px);
  opacity: 1;
  transition: opacity 380ms var(--ease);
}

.menu--leaving { opacity: 0; }

.menu__plate {
  max-width: 480px;
  padding: 30px 34px 30px;
  background: linear-gradient(180deg, rgba(9, 14, 20, 0.90), rgba(9, 14, 20, 0.82));
  /* A light blur only. The heavy one turned the mountain behind the plate into
     grey mush with visible blotches — and the mountain is what the plate is
     advertising. */
  backdrop-filter: blur(3px);
  border: 1px solid var(--hairline);
  border-left: 6px solid var(--sun);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.menu__title {
  margin: 0;
  display: grid;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.80;
  letter-spacing: 0.005em;
}

/* Both words measured to the same optical width: the type becomes a block, and
   the block is the logo. */
.menu__title span:first-child {
  font-size: clamp(58px, 8vw, 96px);
  color: var(--snow);
  -webkit-text-stroke: 0;
}

.menu__title span:last-child {
  font-size: clamp(37px, 5.1vw, 61px);
  color: transparent;
  -webkit-text-stroke: 1.5px var(--snow);
  letter-spacing: 0.055em;
}

.menu__tagline {
  margin: 18px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--corduroy);
  max-width: 38ch;
}

.menu__actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn--big {
  font-size: 20px;
  padding: 13px 34px;
  letter-spacing: 0.14em;
}

/* The piste board. The one place in the menu where the three run colours are
   doing their real job — telling you which run is which — rather than decorating
   an edge. */
.pistes {
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid var(--hairline);
}

.pistes__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.pistes__state {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6fbf7a;
}

.pistes__list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}

.pistes__run {
  display: grid;
  grid-template-columns: 14px 1fr auto auto;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  background: rgba(11, 17, 24, 0.72);
  font-size: 13.5px;
}

.pistes__chip {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
  box-shadow: 0 0 0 1px rgba(242, 245, 248, 0.28);
}

.pistes__run--blue .pistes__chip { background: var(--blue); }
.pistes__run--red .pistes__chip { background: var(--red); }
.pistes__run--black .pistes__chip { background: #11151b; }

.pistes__name { font-weight: 500; }
.pistes__len, .pistes__grade { font-size: 12px; color: var(--corduroy); }
.pistes__grade { min-width: 34px; text-align: right; }

.pistes__foot {
  margin: 11px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(199, 212, 224, 0.72);
}

.menu__hint {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--corduroy);
  padding: 6px 14px;
  background: rgba(9, 14, 20, 0.72);
  border-radius: var(--radius);
}

@media (max-width: 720px) {
  .pistes__run { grid-template-columns: 12px 1fr auto; }
  .pistes__grade { display: none; }
}
