/* Desktop-only. Vector-arcade look: dark field, thin bright strokes. */

:root {
  --bg: #05070d;
  --ink: #d8e6ff;
  --dim: #6d7d9c;
  --accent: #4de2c0;
  --warn: #ffb454;
  --danger: #ff5c72;
  --panel: rgba(9, 14, 26, 0.92);
  --line: rgba(120, 160, 220, 0.22);
  --mono: 'SF Mono', 'Cascadia Mono', 'Consolas', 'Roboto Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  user-select: none;
  cursor: default;
}

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hidden { display: none !important; }

/* ---------- Overlays ---------- */

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at centre, rgba(10, 18, 34, 0.82), rgba(3, 5, 10, 0.97));
  backdrop-filter: blur(3px);
  z-index: 50;
}

.panel {
  width: min(440px, 92vw);
  padding: 32px 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.panel.wide { width: min(680px, 94vw); }

/* Safety net: no overlay may ever run off the bottom of the screen. Panels
   with their own internal scrolling opt out below. */
.panel {
  max-height: 92vh;
  overflow-y: auto;
}

/* Lets the lobby screen sit over the game without swallowing clicks meant for
   the HUD (chat) or the admin panel underneath it. */
.overlay.passthrough { pointer-events: none; }
.overlay.passthrough .panel { pointer-events: auto; }

/* ---------- Login tabs ---------- */

/* ---------- Colour picker ---------- */

.colour-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
input[type=color] {
  width: 46px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}
#colour-swatches { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }
.swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.swatch:hover { transform: scale(1.15); }
.swatch.active { border-color: #fff; }

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  background: none;
  border-radius: 7px;
  color: var(--dim);
  letter-spacing: 2px;
}
.tab:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.tab.active {
  background: var(--accent);
  color: #04211c;
  font-weight: 700;
}
.tab.active:hover { background: var(--accent); filter: brightness(1.08); }

/* ---------- Lobby ---------- */

.warning {
  padding: 14px 16px;
  margin-bottom: 20px;
  background: rgba(255, 180, 84, 0.09);
  border: 1px solid rgba(255, 180, 84, 0.45);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink);
}
.warning strong { color: var(--warn); display: block; margin-bottom: 4px; letter-spacing: 1px; }
.warning em { color: var(--accent); font-style: normal; font-weight: 700; }
.warning button { margin-top: 12px; width: 100%; }

.lobby-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.lobby-settings div {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.lobby-settings span {
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--dim);
  margin-bottom: 4px;
}
.lobby-settings b { font-size: 15px; }

.lobby-head {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--dim);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-bottom: 10px;
}
/* Sits above the countdown, so it has to stay short: a full field of 40 chips
   is eight rows, which would shove the clock off the fold on the one screen
   people are actually watching. Three rows, then scroll. */
#lobby-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 104px;
  overflow-y: auto;
  margin-bottom: 14px;
}
.lobby-pilot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  font-size: 12px;
}
.lobby-pilot .dot { width: 8px; height: 8px; border-radius: 50%; }
.lobby-empty { color: var(--dim); font-size: 12px; }

.panel h1 {
  margin: 0 0 4px;
  font-size: 30px;
  letter-spacing: 5px;
  font-weight: 700;
}
.panel h1 span { color: var(--accent); display: block; }
.panel h2 { margin: 0 0 12px; font-size: 22px; letter-spacing: 2px; }

.sub { color: var(--dim); font-size: 12px; margin: 0 0 22px; letter-spacing: 0.5px; }

label {
  display: block;
  margin-bottom: 14px;
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--dim);
  text-transform: uppercase;
}

input[type=text], input[type=password], select {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.5px;
  outline: none;
}
input:focus, select:focus { border-color: var(--accent); }

button {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 11px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
button:hover { background: rgba(255, 255, 255, 0.11); }
button.primary { background: var(--accent); border-color: var(--accent); color: #04211c; font-weight: 700; }
button.primary:hover { filter: brightness(1.12); }
button.danger { border-color: rgba(255, 92, 114, 0.5); color: var(--danger); }
button:disabled { opacity: 0.4; cursor: not-allowed; }

#login-btn { width: 100%; margin-top: 6px; }

.error { color: var(--danger); font-size: 12px; min-height: 18px; margin-top: 10px; }

.panel.narrow { width: min(360px, 90vw); }
.confirm-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.confirm-actions button { flex: 1; padding: 11px 0; }

.controls-hint {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: var(--dim);
}
.controls-hint strong { color: var(--ink); letter-spacing: 1.5px; font-size: 10px; margin-bottom: 4px; }
kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 10px;
}

/* ---------- HUD ---------- */

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 20; }

/* Leaving mid-match, from inside the match.
   Top-left is the one corner no control occupies on either layout: thrust is
   bottom-left, the turn cluster bottom-right, the map top-right. It is also
   the only corner a stray thumb never crosses in flight. Deliberately quiet —
   dim until touched — because it is not something anyone should hit by
   accident, and the confirmation behind it is the real guard. */
#btn-quit {
  position: absolute;
  top: 14px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 10px;
  background: rgba(10, 16, 28, 0.55);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 2px;
  cursor: pointer;
  pointer-events: auto;   /* #hud itself is click-through */
  transition: color 0.15s, border-color 0.15s;
}
#btn-quit .glyph { font-size: 13px; line-height: 1; }
#btn-quit:hover, #btn-quit:active {
  color: var(--danger);
  border-color: rgba(255, 92, 114, 0.5);
}

#hud-topleft {
  position: absolute;
  top: 54px;          /* clear of the leave button above it */
  left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat { display: flex; align-items: baseline; gap: 10px; }
.label { font-size: 10px; letter-spacing: 2px; color: var(--dim); }
.value { font-size: 22px; font-weight: 700; text-shadow: 0 0 12px rgba(77, 226, 192, 0.35); }
#hud-lives { color: var(--accent); letter-spacing: 3px; }

.hull-wrap { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.hull-bar {
  width: 160px;
  height: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}
.hull-fill {
  height: 100%;
  width: 100%;
  background: var(--accent);
  transition: width 0.12s linear, background 0.3s;
}
.hull-fill.mid { background: var(--warn); }
.hull-fill.low { background: var(--danger); }
.hull-fill.shield { background: #5ad8ff; }

.weapon {
  margin-top: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  align-self: flex-start;
  border: 1px solid currentColor;
}
.weapon.expiring { animation: weaponFlash 0.6s steps(2, end) infinite; }
@keyframes weaponFlash { 50% { opacity: 0.35; } }

#hud-top {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
#hud-timer { font-size: 30px; font-weight: 700; letter-spacing: 3px; }
#hud-timer.urgent { color: var(--danger); }
#hud-state { font-size: 10px; letter-spacing: 3px; color: var(--dim); text-transform: uppercase; }

/* A column, so the kill feed can sit under the board without either of them
   having to know how tall the other is. flex-end keeps both hugging the right
   edge — without it the 260px feed would widen the column and strand the
   narrower table on its left. */
#hud-topright {
  position: absolute;
  top: 16px;
  right: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
#leaderboard { border-collapse: collapse; font-size: 12px; min-width: 190px; }
#leaderboard td { padding: 2px 0 2px 12px; white-space: nowrap; }
#leaderboard td:first-child { padding-left: 0; color: var(--dim); width: 18px; }
#leaderboard td.sc { text-align: right; font-weight: 700; min-width: 46px; }
#leaderboard td.lv {
  color: var(--accent);
  letter-spacing: 1px;
  text-align: right;
  font-size: 10px;
  min-width: 26px;
}
#leaderboard tr.gone td { opacity: 0.45; font-style: italic; }
#leaderboard tr.me td { color: var(--accent); }
#leaderboard tr.out td { opacity: 0.35; text-decoration: line-through; }
#leaderboard tr.bot td:nth-child(2)::after { content: ' ⌁'; color: var(--dim); }

#radar {
  position: absolute;
  right: 18px;
  bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(6, 10, 20, 0.72);
}

/* No position of its own on desktop: it is the second row of #hud-topright and
   follows the board down however many rows the board has. */
#killfeed {
  width: 260px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-size: 11px;
}
.feed-item {
  padding: 3px 8px;
  background: rgba(9, 14, 26, 0.8);
  border-radius: 4px;
  border-left: 2px solid var(--line);
  animation: feedIn 0.18s ease-out;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.feed-item .k { color: var(--accent); }
.feed-item .v { color: var(--danger); }
.feed-item .w { color: var(--dim); }
.feed-item .s { color: var(--danger); font-weight: 700; letter-spacing: 1px; }
@keyframes feedIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

#centre-msg {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 30px;
  letter-spacing: 5px;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}
#centre-msg .small { display: block; font-size: 13px; letter-spacing: 3px; color: var(--dim); margin-top: 10px; }

#netstat {
  position: absolute;
  left: 18px;
  bottom: 4px;
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 1px;
}
#netstat .dim { opacity: 0.55; }

/* ---------- Admin ---------- */

#admin {
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 250px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  /* Above the lobby overlay so the admin can still reach the controls. */
  z-index: 60;
  font-size: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 3px;
  font-size: 10px;
  color: var(--accent);
}
.admin-head button { padding: 0 8px; font-size: 14px; line-height: 20px; border: none; background: none; }
#btn-admin-out {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--dim);
  cursor: pointer;
}
#btn-admin-out:hover { color: var(--danger); }

/* ---------- Admin: a dashboard, not a seat ----------
   Logging in as admin is not a way into a game, so the game itself is not
   drawn at all: no canvas, no lobby, no rotate prompt, no touch pads. What
   is left is the panel, given the whole screen to be a dashboard in. */
body.admin-only #game,
body.admin-only #hud,
body.admin-only #lobby,
body.admin-only #results,
body.admin-only #touch,
body.admin-only #rotate,
body.admin-only #toosmall,
body.admin-only #admin-chip { display: none !important; }

body.admin-only {
  overflow-y: auto;
  background: var(--bg, #05070d);
}
body.admin-only #admin {
  position: static;
  transform: none;       /* the floating panel is centred by translateY */
  width: min(880px, 94vw);
  max-height: none;
  margin: 24px auto;
}
/* Two columns where there is room: the instance controls on the left, the
   database on the right, so neither needs scrolling to reach. */
@media (min-width: 760px) {
  body.admin-only #admin-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 22px;
    align-items: start;
  }
  body.admin-only #admin-body > .admin-sub { grid-column: 1; }
  body.admin-only #admin-body > .admin-sub:nth-of-type(2) ~ * { grid-column: 2; }
}
body.admin-only #admin-db-rows { max-height: 320px; }

/* ---------- Admin on a phone ----------
   The dashboard is a page, not an overlay, so none of the in-game touch
   layout applies to it — but the panel's desktop geometry does, and 250px of
   fixed-position sidebar is not a dashboard. Give it the screen. */
body.admin-only.touch #admin,
body.admin-only.pads #admin {
  width: 100%;
  margin: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
}
body.admin-only.pads .admin-head { position: sticky; top: 0; z-index: 2; }
body.admin-only.pads #admin-body { display: block; }        /* never two columns */
body.admin-only.pads .admin-grid { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); }
body.admin-only.pads .admin-tabs { flex-wrap: wrap; }
body.admin-only.pads .dbtab { flex: 1 0 30%; padding: 8px 0; }  /* thumb-sized */
body.admin-only.pads #admin-db-rows { max-height: none; font-size: 11px; }
body.admin-only.pads #admin-db-rows .r { padding: 7px 5px; }   /* tappable rows */
body.admin-only.pads #admin-db-rows .r .d { font-size: 9px; }
/* Portrait is the right shape for a dashboard, so do not force landscape and
   do not shrink the type the way the in-game HUD does. */
body.admin-only.touch .panel h1 { font-size: inherit; letter-spacing: inherit; }

/* ---------- Admin dashboard ---------- */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 5px;
  margin-bottom: 10px;
}
.admin-grid div {
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.admin-grid span { display: block; font-size: 8px; letter-spacing: 1.5px; color: var(--dim); }
.admin-grid b { font-size: 13px; font-variant-numeric: tabular-nums; }

.admin-tabs { display: flex; gap: 4px; margin: 8px 0 6px; }
.dbtab {
  flex: 1;
  padding: 5px 0;
  font-size: 9px;
  letter-spacing: 1.5px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--dim);
  cursor: pointer;
}
.dbtab.active { color: var(--accent); border-color: var(--accent); }

#admin-db-q { width: 100%; margin-bottom: 6px; font-size: 11px; padding: 5px 7px; }
#admin-db-state { color: var(--dim); letter-spacing: 0; }
#admin-db-rows {
  max-height: 190px;
  overflow-y: auto;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
#admin-db-rows .r {
  display: flex;
  gap: 6px;
  padding: 3px 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
#admin-db-rows .r .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#admin-db-rows .r .v { color: var(--accent); min-width: 42px; text-align: right; }
#admin-db-rows .r .d { color: var(--dim); white-space: nowrap; }
#admin-db-rows .empty { color: var(--dim); font-style: italic; padding: 6px 5px; }

/* Rows that go somewhere. */
#admin-db-rows .r.click { cursor: pointer; }
#admin-db-rows .r.click:hover { background: rgba(122, 162, 255, 0.10); }
#admin-db-rows .r.back { color: var(--accent); cursor: pointer; }

/* A proportion is read faster than a number, so every count carries one. */
#admin-db-rows .bar {
  flex: 1 1 60px;
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  overflow: hidden;
}
#admin-db-rows .bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  opacity: 0.75;
}
#admin-db-rows .mhead,
#admin-db-rows .mfoot {
  padding: 6px 5px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.5px;
}
#admin-db-rows .mfoot { border-top: 1px solid var(--line); margin-top: 4px; }
#admin-body { padding: 12px; max-height: 74vh; overflow-y: auto; }
.admin-row { display: flex; justify-content: space-between; padding: 3px 0; color: var(--dim); }
.admin-row b { color: var(--ink); }
.admin-field { margin: 12px 0 8px; font-size: 10px; }
.admin-field b { color: var(--accent); }
.admin-field input[type=range] { width: 100%; margin-top: 4px; accent-color: var(--accent); }
.admin-check { display: flex; align-items: center; gap: 8px; font-size: 10px; margin: 10px 0; }
.admin-check input { accent-color: var(--accent); }
.admin-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 14px 0 4px; }
.admin-buttons .primary { grid-column: 1 / -1; }
.admin-sub {
  margin: 14px 0 6px;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--dim);
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.admin-player { display: flex; justify-content: space-between; align-items: center; padding: 2px 0; }
.admin-player button { padding: 1px 6px; font-size: 9px; letter-spacing: 1px; }
.admin-player .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }

.locked {
  padding: 9px 11px;
  margin: 12px 0 4px;
  background: rgba(255, 180, 84, 0.1);
  border: 1px solid rgba(255, 180, 84, 0.35);
  border-radius: 6px;
  color: var(--warn);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.5px;
}

/* Tucked into the corner so it never sits over the playfield. */
#admin-chip {
  position: fixed;
  left: 18px;
  top: 18px;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 15px;
  line-height: 34px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--dim);
  z-index: 61;
  opacity: 0.5;
}
#admin-chip:hover { opacity: 1; color: var(--accent); border-color: var(--accent); }

/* ---------- A room admin's panel ----------
   The same panel, holding one evening's worth of it. Everything that runs the
   SERVER rather than the room is marked `global-only` in index.html and comes
   off here; the server refuses those commands from a room admin regardless, so
   this is about not showing somebody a database they cannot open.

   It also has to survive being a floating dialog over a live game, which the
   global dashboard never does — body.admin-only turns that one into a page. */
#admin.room-admin .global-only { display: none !important; }
#admin.room-admin {
  max-height: 86vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* Running a room from a phone is a real thing to want, and 250px pinned to
   the middle of a 360px screen is not it. */
body.pads #admin.room-admin {
  top: auto;
  bottom: 10px;
  left: 8px;
  transform: none;
  width: auto;
  max-width: min(320px, calc(100vw - 16px));
  max-height: 62vh;
}

/* ---------- Results ---------- */

/* A full lobby produces 40+ rows. Cap the panel to the viewport and let the
   table scroll inside it, rather than running off the bottom of the screen. */
#results .panel {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  overflow: hidden; /* the table scrolls, not the panel */
}
#results-scroll {
  flex: 1 1 auto;
  min-height: 0; /* required for a flex child to actually shrink and scroll */
  overflow-y: auto;
  margin-top: 8px;
  overscroll-behavior: contain;
}
/* Thin dark scrollbar so it doesn't fight the theme. */
#results-scroll { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
#results-scroll::-webkit-scrollbar { width: 8px; }
#results-scroll::-webkit-scrollbar-track { background: transparent; }
#results-scroll::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
#results-scroll::-webkit-scrollbar-thumb:hover { background: rgba(120, 160, 220, 0.4); }

#results-table { width: 100%; border-collapse: collapse; font-size: 13px; }
#results-table th {
  text-align: left;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--dim);
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  /* Keep the column labels visible while scrolling. */
  position: sticky;
  top: 0;
  background: #0b1220;
  z-index: 1;
}
#results-table td { padding: 6px 0; border-bottom: 1px solid rgba(120, 160, 220, 0.08); }
#results-table td.num { text-align: right; }
#results-table tr.me td { color: var(--accent); }
#results-winner {
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 4px;
}
/* Survival bonus, under the trophy: related to it but not the same claim. */
#results-winner .bonus {
  display: block;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--dim);
  margin-top: 4px;
}

/* ============================================================
   Touch / mobile
   ============================================================
   Two independent classes, because a tablet is neither a phone
   nor a desktop:

     body.pads   fingers, so draw the on-screen controls.
     body.touch  a small screen too, so compact the whole HUD.

   A phone gets both. A tablet gets only `pads` — it flies with
   thumbs but has ample room for the full-size HUD, and shrinking
   the leaderboard on a 10-inch screen helped nobody. A desktop
   gets neither. Preview with ?touch=1 (phone) or ?pads=1
   (tablet).
   ------------------------------------------------------------ */

/* Stop the browser treating the play area as a scrollable document:
   no pull-to-refresh, no rubber-banding, no double-tap zoom. */
html, body {
  touch-action: none;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

#touch { display: none; }

body.pads #touch {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;   /* only the pads themselves take input */
  z-index: 30;
}

/* One knob for the whole control scheme. Scales with the short edge so a
   small phone and a tablet both get thumb-sized targets. */
body.pads {
  --pad: clamp(52px, 15vh, 88px);
  --pad-big: clamp(64px, 19vh, 108px);
  --edge-x: calc(14px + env(safe-area-inset-left, 0px));
  --edge-r: calc(14px + env(safe-area-inset-right, 0px));
  --edge-y: calc(14px + env(safe-area-inset-bottom, 0px));
}

.pad {
  position: absolute;
  width: var(--pad);
  height: var(--pad);
  border-radius: 50%;
  border: 1.5px solid rgba(122, 162, 255, 0.42);
  background: rgba(10, 16, 30, 0.42);
  color: var(--ink);
  font-family: var(--mono);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  /* The pads must never scroll, select or long-press-menu. */
  touch-action: none;
  user-select: none;
  backdrop-filter: blur(2px);
  transition: background 60ms linear, border-color 60ms linear, transform 60ms linear;
}

.pad .glyph { font-size: calc(var(--pad) * 0.34); line-height: 1; }
.pad .cap {
  font-size: clamp(7px, 1.5vh, 9px);
  letter-spacing: 1.5px;
  color: var(--dim);
}
.pad.big { width: var(--pad-big); height: var(--pad-big); }
.pad.big .glyph { font-size: calc(var(--pad-big) * 0.32); }
.pad.small { width: calc(var(--pad) * 0.82); height: calc(var(--pad) * 0.82); }

/* Held state is driven by a class from input.js, not :active — a pointer that
   slides off the pad still counts as held, and :active wouldn't show that. */
.pad.on {
  background: rgba(77, 226, 192, 0.26);
  border-color: var(--accent);
  transform: scale(0.94);
}

/* --- layout ---------------------------------------------------
   Left hand: thrust at the bottom, jump above it.
   Right hand: fire above the two turn pads, the three forming a triangle. */
#pad-thrust { left: var(--edge-x); bottom: var(--edge-y); }
#pad-hyper  { left: var(--edge-x); top: 50%; transform: translateY(-60%); }
#pad-hyper.on { transform: translateY(-60%) scale(0.94); }

#pad-cluster {
  position: absolute;
  right: var(--edge-r);
  bottom: var(--edge-y);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
#pad-turn {
  display: flex;
  gap: 10px;
  pointer-events: none;
}
#pad-cluster .pad { position: relative; }

/* Fire latches rather than being held, so it needs a state you can read at a
   glance mid-fight — a held button and a latched one look nothing alike. */
#pad-fire.latched {
  background: rgba(255, 107, 157, 0.3);
  border-color: var(--danger, #ff6b9d);
  transform: none;
  animation: fire-latched 1.1s ease-in-out infinite;
}
#pad-fire.latched .cap::after { content: ' ON'; color: var(--danger, #ff6b9d); }
@keyframes fire-latched {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(255, 107, 157, 0); }
}

/* --- HUD reflow ---------------------------------------------
   The desktop HUD claims all four corners, which is exactly where the
   controls now live. Anything that would sit under a thumb either moves
   or goes. */
body.touch #netstat { display: none; }

/* One line of commentary, about you only, in the free band along the bottom
   between the thrust pad and the control cluster — roughly 700px of a
   844px-wide handset, which is more than a single line ever needs. */
/* Three lines now, stacked upward from the bottom edge between the thumb pads.
   The base rule right-aligns its items, which is right against the right edge
   of a desktop and ragged in the middle of a phone — three lines of different
   lengths need a centre to hang off. `overflow: hidden` comes off the column
   for the same reason: it would clip the stack to one line's height. Each
   .feed-item still truncates on its own. */
body.touch #killfeed {
  /* FIXED, not absolute. On a phone the feed belongs at the bottom of the
     screen between the thumb pads, and it now lives inside #hud-topright —
     which is itself absolutely positioned, so `absolute` would measure this
     against the score board instead of the viewport. Nothing in the chain
     above it carries a transform, filter or backdrop-filter, which is the
     only thing that would make `fixed` mean something else. */
  position: fixed;
  top: auto;
  right: auto;
  left: 50%;
  margin-top: 0;
  transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: auto;
  max-width: calc(100vw - 2 * (var(--edge-r) + var(--pad-big) + 16px));
  align-items: center;
  gap: 2px;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

body.touch #hud-topleft {
  top: calc(44px + env(safe-area-inset-top, 0px));
  left: var(--edge-x);
  gap: 3px;
  transform: scale(0.82);
  transform-origin: top left;
}

body.pads #btn-quit {
  top: calc(8px + env(safe-area-inset-top, 0px));
  left: var(--edge-x);
  padding: 8px 14px 8px 11px;   /* a thumb, not a mouse */
}

body.touch #hud-top { top: 6px; }
body.touch #hud-timer { font-size: 22px; }

/* The bottom-right corner is the control cluster now, so the map takes the
   top-right (vacated by the leaderboard) and the commentary sits under it. */
body.touch #radar {
  right: var(--edge-r);
  left: auto;
  bottom: auto;
  top: calc(6px + env(safe-area-inset-top, 0px));
  transform: scale(0.72);
  transform-origin: top right;
  opacity: 0.85;
}

/* Scores under the map. The band between the radar and the control cluster is
   about 130px on a 390px-tall handset; six rows at 15px is 90px, so it fits
   with room rather than only just. */
body.touch #hud-topright {
  top: calc(122px + env(safe-area-inset-top, 0px));
  right: var(--edge-r);
}
body.touch #leaderboard {
  font-size: 10px;
  min-width: 0;
  width: 144px;              /* matches the radar above it */
  table-layout: fixed;
}
body.touch #leaderboard td { padding: 1px 0 1px 6px; }
body.touch #leaderboard td:first-child { width: 12px; }
body.touch #leaderboard td:nth-child(2) {
  /* Long call signs would otherwise push the score off the edge. */
  max-width: 66px;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.touch #leaderboard td.lv { font-size: 8px; min-width: 18px; }
body.touch #leaderboard td.sc { min-width: 38px; }
/* Separator before your own row when you're below the cut. */
#leaderboard tr.gap td {
  height: 9px;
  border-top: 1px dashed var(--line);
  padding: 0;
}
body.touch #leaderboard tr.gap td { height: 7px; }
/* Your own row below the divider is the one you're looking for — let it read
   as brightly as the leaders above it. */
#leaderboard tr.gap + tr.me td { color: var(--accent); font-weight: 700; }

body.touch #centre-msg { font-size: 26px; }

/* Landscape phones are short. Give the overlays room rather than letting a
   panel run off both ends. */
body.touch .panel { padding: 16px 18px; max-height: 88vh; }
body.touch .panel h1 { font-size: 22px; letter-spacing: 3px; }
body.touch .controls-hint { display: none; }
body.touch label { margin-bottom: 9px; }

/* --- portrait blocker --------------------------------------- */
#rotate { z-index: 90; }
#rotate .panel { text-align: center; }
.rotate-icon {
  font-size: 46px;
  color: var(--accent);
  animation: rotate-hint 2.4s ease-in-out infinite;
  display: inline-block;
}
@keyframes rotate-hint {
  0%, 55% { transform: rotate(0deg); }
  75%, 100% { transform: rotate(90deg); }
}

/* Login help swaps with the input method: keys on a desktop, pad positions on
   anything flown with thumbs. Neither is any use to the other. */
.touch-hint { display: none; }
body.pads .touch-hint {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.6px;
}
.touch-hint strong {
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 2px;
  margin-bottom: 2px;
}

/* ---------- Dread announcements ----------
   For the two or three events a match that ought to make everyone look up.
   Blackletter where the machine has one — Office ships Old English Text MT,
   which covers most work PCs — and a heavy serif everywhere else. The drama
   is carried by size, tracking and glow rather than by the font, so it still
   lands on a machine with neither. */
#alert {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  z-index: 25;
  font-family: 'UnifrakturMaguntia', 'Old English Text MT', 'Blackadder ITC',
               'Cloister Black', 'Luminari', Georgia, 'Times New Roman', serif;
  font-size: clamp(30px, 6.5vw, 76px);
  line-height: 1.05;
  letter-spacing: 4px;
  white-space: nowrap;
  color: rgba(255, 92, 92, 0.82);
  text-shadow:
    0 0 18px rgba(255, 40, 40, 0.55),
    0 0 46px rgba(255, 0, 0, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.9);
  /* Animated from script (see showAlert) using opacity and transform only.
     Promoted to its own layer so the canvas underneath is never repainted on
     its account. */
  will-change: opacity, transform;
  opacity: 0;
}

#alert .sub {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: clamp(9px, 1.5vw, 14px);
  letter-spacing: 6px;
  text-transform: uppercase;
  color: rgba(255, 190, 190, 0.72);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* The keyframes live in showAlert() now. A CSS `filter: blur()` here was being
   recomputed over a full-screen canvas for four and a half seconds every time a
   boss arrived, which is not a price worth paying for a soft edge. */

/* A phone has the timer, the map and the stats across the top already, so the
   banner sits lower and tighter rather than colliding with all three. */
body.touch #alert {
  top: 30%;
  letter-spacing: 2px;
  font-size: clamp(26px, 7.5vw, 48px);
}

/* Reduced motion is honoured by the browser for script-driven animations too,
   which is one more reason to drive it from there. */

/* ---------- Lobby countdown + briefing carousel ---------- */

#lobby-clock {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin: 4px 0 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.lobby-clock-label {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--dim);
}
#lobby-countdown {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
#lobby-clock.imminent #lobby-countdown {
  color: var(--danger, #ff6b9d);
  animation: pulse-clock 1s ease-in-out infinite;
}
@keyframes pulse-clock {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

#carousel { margin-bottom: 16px; }
#carousel-panel {
  min-height: 188px;
  animation: cr-in 400ms ease-out;
}
#carousel-panel h3 {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
}
@keyframes cr-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.cr-keys div {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  font-size: 11px;
  color: var(--dim);
}
.cr-keys em { font-style: normal; color: var(--ink); letter-spacing: 0.4px; }
.cr-keys span { opacity: 0.6; }

.cr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.cr-table th {
  text-align: left;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.cr-table td { padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.cr-table td:nth-child(2) { text-align: right; padding-right: 10px; color: var(--dim); width: 62px; }
.cr-table td.sc { text-align: right; font-weight: 700; color: var(--accent); }
.cr-table td.sc.bad { color: var(--danger, #ff6b9d); }
.cr-table .p-repair { color: #9bff6b; }
.cr-table .p-double { color: #ffe066; }
.cr-table .p-missile { color: #ff9f43; }
.cr-table .p-shield { color: #5ad8ff; }
.cr-table .p-lightning { color: #c792ea; }
.p-mines { color: #ff5c72; }
.p-flame { color: #ff2d55; }
.p-ram { color: #8bd450; }
.p-blackhole { color: #c04dff; }
.p-overdrive { color: #ffd166; }
/* Divides the rolled loot from the boss drops, which have a source rather than
   odds. A row, not a second table, so the effect column stays aligned. */
.cr-table .cr-split td {
  padding: 8px 0 3px;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
}

.cr-note {
  margin: 10px 0 0;
  font-size: 10px;
  line-height: 1.55;
  color: var(--dim);
}
.cr-note b { color: var(--ink); }

#carousel-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
}
#carousel-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line);
  transition: background 300ms;
}
#carousel-dots span.on { background: var(--accent); }

/* A phone in portrait reads the briefing fine; it just needs to breathe. */
body.touch #carousel-panel { min-height: 0; }
body.touch #lobby-countdown { font-size: 26px; }

/* ---------- Lobby chat ---------- */

#lobby-chat { margin-top: 6px; }
#lobby-chat-log {
  height: 116px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding: 8px 10px;
  background: rgba(6, 10, 20, 0.5);
  border: 1px solid var(--line);
  border-radius: 6px 6px 0 0;
  border-bottom: none;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
#lobby-chat-log .chat-line { opacity: 0.92; }
#lobby-chat-log .chat-empty { color: var(--dim); font-style: italic; }

#lobby-chat-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  border-radius: 0 0 6px 6px;
  background: rgba(9, 14, 26, 0.92);
  font-size: 12px;
}

/* The lobby panel now carries a countdown, a briefing, a roster and a chat
   log, which is more than a short landscape phone can show at once. */
#lobby .panel { max-height: 92vh; overflow-y: auto; }
body.touch #lobby-chat-log { height: 84px; }

/* Overdrive badge. No countdown: you keep it until something kills you. */
#hud-overdrive {
  color: #ffd166;
  animation: overdrive-pulse 1.4s ease-in-out infinite;
}
#hud-mines { color: #ff5c72; }
/* Like overdrive: no clock on it, so the badge only says whether you have it. */
#hud-ram { color: #8bd450; }
/* Fire only stops when you jump, so this has to be the loudest thing on the
   HUD — it is an instruction, not a status. */
#hud-burning {
  color: #ff8c3c;
  font-weight: 700;
  animation: pulse-clock 0.7s ease-in-out infinite;
}
@keyframes overdrive-pulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 10px rgba(255, 209, 102, 0.5); }
  50% { opacity: 0.72; text-shadow: 0 0 18px rgba(255, 209, 102, 0.85); }
}

/* Leaving on purpose, rather than closing the tab and leaving a seat warm. */
.lobby-actions { margin: 14px 0 4px; }
#btn-leave {
  width: auto;
  padding: 7px 16px;
  font-size: 11px;
  letter-spacing: 1.5px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--dim);
}
#btn-leave:hover { color: var(--danger, #ff6b9d); border-color: var(--danger, #ff6b9d); }

/* ---------- Maintenance notice ----------
   Sits over the game as well as the lobby: a deploy restarts the process and
   the world is in memory, so a match in progress goes with it. People should
   see that coming. */
#maint-banner {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 7px 20px;
  border-radius: 0 0 8px 8px;
  background: rgba(40, 26, 10, 0.94);
  border: 1px solid rgba(255, 180, 84, 0.5);
  border-top: none;
  color: #ffb454;
  font-size: 12px;
  letter-spacing: 1.2px;
  pointer-events: none;
  max-width: 92vw;
  text-align: center;
}
#maint-banner.imminent {
  background: rgba(48, 14, 22, 0.96);
  border-color: rgba(255, 107, 157, 0.6);
  color: #ff8fb0;
  animation: maint-pulse 1.2s ease-in-out infinite;
}
@keyframes maint-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Touch controls page of the briefing: the pads as they appear on screen. */
.cr-pads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.cr-pad { display: flex; align-items: center; gap: 9px; }
.cr-pad b {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--ink);
  font-weight: 600;
}
.cr-pad span { display: block; font-size: 10px; color: var(--dim); }

/* ---------- Lobby order on a phone ----------
   Lives in cabinet.css now, next to the layout it reorders.

   What was here was a flex column plus an `order` for each direct child of
   #lobby .panel — written for markup where the roster, the clock, the chat
   and the settings WERE direct children. The cabinet wraps them in .cab-col
   columns, so every one of those child selectors had stopped matching. The
   `display: flex` had not: it carries an id, it outweighed
   `.panel.cabinet { display: grid }`, and it was quietly taking the lobby's
   grid away on the one device that could least afford the surprise. */

/* The briefing rotates on its own; chat is what people are actually here for
   while they wait, so give it the room rather than the settings list. */
body.touch #lobby-chat-log { height: 108px; }
body.touch #lobby-settings { font-size: 10px; }

/* Above the fold, so it competes with the clock and the chat — but who is in
   the room is the question people open the lobby to answer, so it keeps three
   rows of names like the desktop does, and scrolls past that. */
body.touch #lobby-roster { max-height: 96px; margin-bottom: 10px; }
body.touch #lobby-pilots-head { padding-top: 8px; margin-bottom: 6px; }
body.touch .lobby-pilot { padding: 4px 9px; font-size: 12px; }

/* ============================================================
   Private rooms, and the arcade board
   ============================================================ */

#room-pick { margin-bottom: 14px; }
#room-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 168px;
  overflow-y: auto;
}
.room {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  text-align: left;
  font-family: var(--mono);
  font-size: 12px;
}
.room .rn { color: var(--ink); letter-spacing: 0.5px; }
.room .rs { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; }
/* The chosen room has to be obvious: the password box below it is useless
   until one is picked, and an unselected list looks identical to a broken one. */
.room.on {
  border-color: var(--accent);
  background: rgba(122, 162, 255, 0.12);
}
.room.on .rn { color: var(--accent); font-weight: 700; }
.room-empty {
  padding: 12px;
  text-align: center;
  color: var(--dim);
  font-size: 11px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
#room-hint { margin: 8px 0 0; font-size: 10px; }

/* --- the arcade cabinet ------------------------------------ */
#arcade {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.arcade-head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--accent);
  text-align: center;
  margin-bottom: 10px;
  /* The one place a bit of cabinet glow is the right answer. */
  text-shadow: 0 0 12px rgba(122, 162, 255, 0.55);
}
#arcade-top {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 11px;
}
#arcade-top td { padding: 2px 0; }
#arcade-top .rank { color: var(--dim); width: 26px; }
#arcade-top .who {
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}
#arcade-top .pts { text-align: right; color: #ffe066; font-weight: 700; }
/* First place is the only row anybody actually reads. */
#arcade-top tr:first-child .who,
#arcade-top tr:first-child .pts { color: #ffd166; }

#arcade-totals {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}
#arcade-totals span { white-space: nowrap; }

/* On a phone the login panel is already tight; the board is the first thing
   that can go, but the totals are one line and worth keeping. */
body.touch #arcade { margin-top: 14px; padding-top: 10px; }
body.touch #arcade-totals { font-size: 10px; }

/* --- room management, in the global admin panel ------------- */
#admin-rooms { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.admin-room {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
}
.admin-room .rn { color: var(--ink); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-room .rs { color: var(--dim); font-size: 9px; text-transform: uppercase; letter-spacing: 1px; }
.room-del {
  padding: 0 7px;
  line-height: 1.4;
  color: var(--dim);
  border-color: transparent;
  background: none;
}
.room-del:hover { color: var(--danger, #ff6b9d); border-color: var(--danger, #ff6b9d); }
#admin-room-form { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
#admin-room-form input { font-size: 11px; padding: 6px 8px; }
#room-error { font-size: 10px; min-height: 0; margin: 0; }
