@font-face {
  font-family: "Dela Gothic One";
  src: url('/dela-gothic-queue.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Inter", "Yu Gothic UI", "Meiryo", sans-serif;
  --sky-top: #588ba8;
  --sky-bottom: #a4cbd9;
  --page-ink: #102431;
  color: var(--page-ink);
  background: linear-gradient(var(--sky-top), var(--sky-bottom)) fixed;
  --muted: #a6acc0;
  --edge: #303548;
  --red: #ff747a;
  --purple: #c69cff;
  --lime: #e0f878;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 290px; isolation: isolate; }
body.queue-view:has(#queue-empty:not([hidden]))::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: auto auto 0 0;
  width: clamp(128px, 21vw, 260px);
  aspect-ratio: 299 / 269;
  background: url('/hud-shark.png') left bottom / contain no-repeat;
  pointer-events: none;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
.shell { width: min(1120px, calc(100% - 56px)); margin: auto; padding: 28px 0 44px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 21px; }
.topbar .clock { margin-inline-start: auto; }
.clock small { color: var(--muted); font-size: .74rem; margin-top: 3px; }
.topbar .clock small { color: inherit; }
.clock { display: grid; text-align: right; gap: 4px; }
.clock strong { font: 700 1.15rem ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }

.youtube { --team: var(--red); --wash: #271c2a; }
.twitch { --team: var(--purple); --wash: #211e34; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 302px; align-items: start; gap: 20px; }
:is(.home-view, .queue-view) {
  min-height: 100dvh;
  overflow-x: clip;
  background: #fff;
}
:is(.home-view, .queue-view) .shell {
  width: min(1160px, calc(100% - 56px));
  padding: 24px 0 24px;
  display: grid;
  grid-template-columns: 1fr;
}
.queue-view .topbar { grid-area: 1 / 1; padding: 0; min-height: 64px; }
:is(.home-view, .queue-view) .clock strong { font-size: clamp(1rem, 2.5vw, 1.65rem); line-height: 1; }
:is(.home-view, .queue-view) .clock small { margin-top: 0; font-weight: 700; }
.home-view .shell {
  width: 100%;
  height: 100dvh;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 0;
  overflow: clip;
}
.home-view .topbar { display: none; }
.home-layout { grid-area: 1 / 1; min-width: 0; min-height: 0; text-align: center; }
.home-scene {
  --tower-side-width: calc(100% / 3);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.home-towers {
  flex: 1;
  display: grid;
  grid-template-columns: var(--tower-side-width) minmax(0, 1fr) var(--tower-side-width);
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
}
.home-center {
  grid-area: 1 / 2;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 4dvh, 42px);
  padding: clamp(8px, 4dvh, 48px) 0 clamp(4px, 2dvh, 24px);
  min-width: 0;
  min-height: 0;
}
.home-title { width: min(126%, 620px); aspect-ratio: 1040 / 696; min-height: 0; }
.home-title img { display: block; width: 100%; height: 100%; object-fit: contain; }
.home-tower { position: absolute; inset-block: 0; width: var(--tower-side-width); overflow: hidden; pointer-events: none; }
.home-tower.home-tower-red { inset-inline-start: 0; }
.home-tower.home-tower-purple { inset-inline-end: 0; }
.home-tower-red, .queue-scene[data-team="youtube"], .finish-overlay[data-team="youtube"] { --tower-ink: #782c39; --tower-button: #913b4b; --tower-button-edge: #5b2431; }
.home-tower-purple, .queue-scene[data-team="twitch"], .finish-overlay[data-team="twitch"] { --tower-ink: #422966; --tower-button: #614089; --tower-button-edge: #3e275d; }
.home-tower-art { background: center / 168% 129% no-repeat; }
:is(.home-tower-red, .queue-scene[data-team="youtube"]) .home-tower-art {
  background-image: url('/tower-red.webp');
  background-position: 70% 50%;
}
:is(.home-tower-purple, .queue-scene[data-team="twitch"]) .home-tower-art {
  background-image: url('/tower-purple.webp');
  background-position: 30% 50%;
}
.home-tower .home-tower-art {
  position: absolute;
  inset: 0;
}
.home-links {
  flex: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: clamp(8px, 2vw, 24px);
  width: min(calc(100% - 16px), 480px);
}
.home-tower-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}
.home-join, .home-live, .home-queue-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  min-height: 44px;
  padding: 0 14px;
  text-decoration: none;
  white-space: nowrap;
  font-size: .88rem;
  font-weight: 800;
}
.home-join {
  background: var(--tower-button);
  color: #fff8ed;
  border: 1px solid var(--tower-button-edge);
  border-radius: 10px 11px 9px 10px;
  box-shadow: 0 3px 0 var(--tower-button-edge);
}
.home-join:disabled { opacity: .58; }
.home-join:hover:not(:disabled) { filter: brightness(1.14); }
.home-join:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--tower-button-edge); }
.home-live { color: var(--tower-ink); padding-inline: 2px; }
.home-live:hover { text-decoration: underline; text-underline-offset: .23em; }
:is(.home-tower-actions, .queue-actions) .home-live {
  min-height: 52px;
  border-radius: 6px;
  background: var(--tower-button-edge);
  color: #fff;
}
.home-tower-actions .home-live {
  line-height: 1.2;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.home-queue-link {
  margin-top: 16px;
  border-radius: 10px;
  color: var(--page-ink);
  background: var(--lime);
}
.home-queue-link:hover { background: #eafaa2; }
.home-tools {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0 18px;
}
.home-details summary, .home-tool-button {
  min-height: 40px;
  padding: 10px 2px;
  color: var(--page-ink);
  background: none;
  border: 0;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 700;
}
.home-details summary { display: inline-flex; gap: 6px; align-items: center; }
.home-details summary::-webkit-details-marker { display: none; }
.home-details summary::after { content: "＋"; }
.home-details[open] summary::after { content: "−"; }
.home-details summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.home-details summary:hover, .home-tool-button:hover { text-decoration: underline; text-underline-offset: .2em; }
.home-detail-content {
  position: absolute;
  inset-block-end: 100%;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: min(280px, calc(100vw - 40px));
  padding: 12px 14px;
  color: var(--page-ink);
  background: #f5f6ef;
  border: 1px solid #3f6072;
  border-radius: 10px;
  text-align: left;
}
.home-preview-links { display: grid; gap: 10px; }
.home-preview-links a { color: inherit; font-weight: 700; font-size: .83rem; }
.home-previous { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; font-size: .79rem; }
.home-clock { display: flex; justify-content: center; padding: clamp(4px, 1.5dvh, 12px) 0; }
.home-clock .clock { text-align: center; }
.home-clock .clock small { color: inherit; }
.home-view .connection { text-align: center; margin: 5px 0 0; }
.queue-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: clamp(36px, 8vh, 100px) 0 20px;
}
.queue-empty img { display: block; width: min(62vw, 236px); height: auto; }
.queue-empty h1, .queue-copy h1, .queue-status { font-family: "Dela Gothic One", "Yu Gothic UI", "Meiryo", sans-serif; font-weight: 400; }
.queue-empty h1 { font-size: clamp(1.3rem, 3.4vw, 2rem); }
.queue-empty .home-queue-link { margin: 0; }
.queue-view:has(.queue-scene:not([hidden])) .shell { width: 100%; padding: 0; }
.queue-view:has(.queue-scene:not([hidden])) .topbar { display: none; }
.queue-scene {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: max(420px, 100svh);
  overflow: clip;
}
.queue-art { grid-area: 1 / 1; }
.queue-scene[data-team="twitch"] .queue-art { grid-column: 3; }
.queue-copy {
  grid-area: 1 / 2 / 2 / 4;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(100%, 560px);
  padding: clamp(48px, 16svh, 160px) clamp(12px, 5vw, 56px) 28px;
}
.queue-scene[data-team="twitch"] .queue-copy { grid-column: 1 / 3; }
.queue-copy .clock { margin-bottom: clamp(10px, 2svh, 16px); text-align: center; }
.queue-copy h1 {
  color: var(--tower-ink);
  font-size: clamp(1.2rem, 3.25vw, 2.4rem);
  line-height: 1.15;
}
.queue-status {
  margin-top: 8px;
  font-size: clamp(1.7rem, 5.5vw, 3.85rem);
  letter-spacing: -.035em;
  line-height: 1.18;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.queue-time {
  margin-top: 10px;
  font-size: clamp(.78rem, 1.95vw, 1.1rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.queue-deadline {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 12px;
  margin-top: 14px;
  font-size: .77rem;
  font-weight: 750;
}
.queue-deadline time {
  color: var(--tower-ink);
  font-family: "Dela Gothic One", "Yu Gothic UI", sans-serif;
  font-size: clamp(1.52rem, 3.6vw, 2.4rem);
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.queue-actions {
  display: grid;
  width: min(100%, 258px);
  gap: 5px;
  margin-top: 16px;
}
.queue-resume-note {
  max-width: 25rem;
  margin-top: 14px;
  font-size: clamp(.76rem, 1.5vw, .9rem);
  line-height: 1.55;
}
:is(.home-tower-actions, .queue-actions) .home-join {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
}
:is(.home-tower-actions, .queue-actions) :is(.home-join, .home-live) {
  font-size: clamp(.83rem, .75rem + .44vw, 1.125rem);
  font-weight: 700;
}
:is(.home-tower-actions, .queue-actions) .home-join:active:not(:disabled) { box-shadow: none; }
.home-tower-actions .home-join { min-height: 52px; padding-inline: 2px; }
.queue-view .connection { text-align: center; }
.board-row, .panel { border: 1px solid var(--edge); border-radius: 16px; background: #191c28; color: #f4f3f9; }
.tower-hud {
  --hud-inset: clamp(8px, 4%, 36px);
  position: absolute;
  inset-inline-start: var(--hud-inset);
  inset-block-end: clamp(6px, 2%, 14px);
  width: fit-content;
  max-width: calc(100% - 2 * var(--hud-inset));
  display: grid;
  gap: 3px;
  padding: 7px 10px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: #151925ed;
  pointer-events: none;
  transition: opacity 240ms ease-out;
}
.tower-hud.is-obscured { opacity: .23; transition-duration: 120ms; }
.hud-shark {
  position: absolute;
  inset-inline-start: 9%;
  inset-block-start: 0;
  margin-block-start: clamp(-69px, -24%, -38px);
  inline-size: clamp(62px, 38%, 109px);
  block-size: auto;
}
.remaining-drops {
  position: absolute;
  inset-inline-start: 8px;
  inset-block-end: calc(100% + 46px);
  display: grid;
  grid-template-columns: repeat(var(--drop-limit, 10), minmax(0, 1fr));
  width: calc(100% - 8px);
  gap: clamp(2px, 1.3cqw, 4px);
}
.illustrated .remaining-drops { inset-block-end: calc(100% + clamp(38px, 24cqw, 69px) + 8px); }
.remaining-drops span {
  width: 100%;
  max-width: 30px;
  aspect-ratio: 224 / 229;
  background: url('/hito.png') left bottom / 142.857% 403.493% no-repeat;
}
.hud-window { position: relative; display: grid; gap: 3px; }
.stage-metrics > div > span { color: var(--muted); font-size: .73rem; }
.stage-metrics { display: flex; align-items: end; flex-wrap: wrap; gap: 5px 12px; }
.height-metric, .count-metric, .fallen-metric { display: grid; gap: 2px; }
.count-metric, .fallen-metric { border-inline-start: 1px solid var(--edge); padding-inline-start: 10px; }
.stage-metrics strong { color: var(--team, #fff); font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
#team-height { font-size: clamp(1.8rem, 3.85vw, 3.45rem); line-height: 1; letter-spacing: -.045em; transform-origin: left bottom; }
#height-decimals { font-size: .58em; letter-spacing: -.025em; }
.height-unit { font-size: .43em; letter-spacing: normal; color: #dce0f0; }
#tower-count, #fallen-total { font-size: clamp(1.06rem, 1.8vw, 1.6rem); line-height: 1.06; }
#fallen-total { color: #ffd4ae; }
#tower-stats { display: grid; gap: 3px; }
.tower-hud.illustrated {
  --hud-ink: #562d45;
  --hud-inset: clamp(6px, 3%, 28px);
  width: min(296px, calc(100% - 2 * var(--hud-inset)));
  padding: 0;
  border: 0;
  background: none;
  color: var(--hud-ink);
  isolation: isolate;
  container-type: inline-size;
}
.illustrated .hud-window {
  align-content: center;
  gap: 3px;
  padding: 1px 5px 3px;
  border: solid transparent;
  border-width: 10px 16px 22px;
  border-image: url('/hud-window.png') 60 78 115 78 fill stretch;
}
.illustrated .stage-metrics {
  justify-content: space-between;
  gap: 4px;
}
.illustrated .stage-metrics > div > span {
  color: var(--hud-ink);
  font-size: clamp(8px, 3.65cqw, 11px);
  line-height: 1.15;
  white-space: nowrap;
}
.illustrated .count-metric, .illustrated .fallen-metric {
  border-inline-start-color: #562d4533;
  padding-inline-start: clamp(3px, 1.8cqw, 5px);
}
.tower-hud.illustrated #team-height {
  color: var(--hud-ink);
  font-size: clamp(16px, 8.8cqw, 27px);
  letter-spacing: normal;
}
.illustrated #height-decimals { font-size: .88em; letter-spacing: normal; }
.illustrated .height-unit {
  color: var(--hud-ink);
  font-size: .65em;
  white-space: nowrap;
}
.tower-hud.illustrated #tower-count, .tower-hud.illustrated #fallen-total {
  color: var(--hud-ink);
  font-size: clamp(11px, 6.4cqw, 19px);
  line-height: 1.1;
}
@container (max-width: 205px) {
  .illustrated .hud-window { gap: 2px; padding-inline: 1px; }
  .illustrated .stage-metrics { gap: 3px; }
  .illustrated .count-metric, .illustrated .fallen-metric { border-inline-start: 0; padding-inline-start: 0; }
  .tower-hud.illustrated #team-height { font-size: clamp(15px, 9.3cqw, 19px); }
}
.stage { height: clamp(395px, 58vh, 610px); position: relative; overflow: hidden; background-color: var(--sky-top); }
.board-row { display: flex; overflow: hidden; }
.board-row .stage { flex: 1 1 0; min-width: 0; }
.tower-overview { display: flex; flex: 0 0 clamp(62px, 22%, 176px); min-width: 0; flex-direction: column; background: #191c28; border-inline-start: 1px solid var(--edge); }
#overview-board { display: block; flex: 1 1 0; width: 100%; min-height: 0; }
#board { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.stage-empty { pointer-events: none; position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 9px; color: #b7bfd1; padding-bottom: 14%; font-size: .87rem; }
.stage-empty span { color: var(--lime); font-size: 2.3rem; }
.start-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; pointer-events: none; }
.start-overlay.is-ready { align-content: end; padding-bottom: clamp(14px, 6svh, 56px); }
.ready-controls {
  position: absolute;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
  --hint-distance: clamp(46px, 22%, 170px);
  --hint-row: clamp(30px, 10svh, 72px);
}
.ready-controls.has-pinch { visibility: visible; }
.ready-glyph {
  position: absolute;
  width: clamp(27px, 10%, 74px);
  height: clamp(26px, 9svh, 68px);
  object-fit: contain;
  translate: -50% -50%;
  filter: drop-shadow(0 1px 2px #17344b88);
}
.ready-rotate-left, .ready-left { left: max(28px, calc(var(--hint-x) - var(--hint-distance))); }
.ready-rotate-right, .ready-right { left: min(calc(100% - 28px), calc(var(--hint-x) + var(--hint-distance))); }
.ready-rotate-left, .ready-rotate-right { top: var(--hint-y); }
.ready-left, .ready-right { top: calc(var(--hint-y) + var(--hint-row)); }
.ready-faster {
  top: min(71%, calc(var(--hint-y) + var(--hint-row) * 2));
  left: var(--hint-x);
}
.start-label { padding: 13px 20px; color: #1b2010; background: var(--lime); border: 0; border-radius: 9px; font-weight: 800; }
#start-turn { pointer-events: auto; }
.start-deadline { margin: 0; padding: 5px 9px; border-radius: 6px; background: #131621; color: var(--lime); font-size: .83rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.countdown { font: 850 clamp(3.5rem, 14vw, 6rem) ui-monospace, Consolas, monospace; color: var(--lime); text-shadow: 0 2px 12px #11151b; }
.controls { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 7px; padding: 11px 13px 12px; }
.controls button { display: flex; justify-content: center; align-items: center; min-width: 0; background: #252939; padding: 6px 4px; border: 1px solid #424960; border-radius: 8px; }
.controls img { display: block; width: min(100%, 54px); height: clamp(20px, 3.75svh, 27px); object-fit: contain; pointer-events: none; }
.controls button:disabled { opacity: .62; }
.controls button[data-action="left"], .controls button[data-action="right"] { touch-action: none; }
.controls button:not(:disabled):hover { border-color: var(--lime); }
.controls button.drop:not(:disabled) { background: var(--lime); }
.controls button.drop:not(:disabled) img { filter: brightness(.17); }
.music-credit {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  padding: 5px 3px 0;
  font-size: .72rem;
  line-height: 1.35;
}
.music-credit a { color: inherit; text-underline-offset: .17em; }
.music-credit a:hover { text-decoration-thickness: 2px; }

.sidebar { display: grid; gap: 13px; min-width: 0; }
.panel { padding: 17px; }
.panel h2 { font-size: 1.05rem; }
.queue-button { width: 100%; margin-top: 12px; color: #15190b; background: var(--lime); border: 1px solid transparent; border-radius: 8px; padding: 10px 7px; font-size: .85rem; font-weight: 800; }
.queue-button:disabled { background: #252939; border-color: var(--edge); color: var(--muted); }
.connection { font-size: .72rem; margin-top: 13px; padding-left: 3px; }
.connection:empty { display: none; }

.play-view .shell {
  width: calc(100% - clamp(16px, 2.5vw, 40px));
  height: 100dvh;
  min-height: 370px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 7px;
  padding: 8px 0;
}
.play-view .topbar { display: none; }
.play-view .workspace { display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-height: 0; }
.play-view .stage-panel { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.play-view .board-row { position: relative; flex: 1; min-height: 0; }
.play-view .stage { height: auto; }
.play-view .tower-overview { flex-basis: clamp(56px, 10%, 138px); }
.play-view .controls { flex: none; padding: 7px 9px; }
.finish-overlay {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: clamp(14px, 3svh, 25px);
  padding: 10px;
  color: #fff;
  background: rgb(14 22 36 / .44);
}
.finish-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; }
.finish-notice {
  font-family: "Dela Gothic One", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: clamp(1.7rem, 4.8vw, 3.6rem);
  font-weight: 400;
  line-height: 1.15;
  text-shadow: 0 2px 8px #122237;
}
.finish-actions .home-join { border: 0; border-radius: 7px; box-shadow: none; }
.finish-actions .finish-home { color: var(--page-ink); background: #fff; }
.finish-actions .queue-button { width: auto; margin: 0; }
.play-view .connection { margin: 0; }

.broadcast-view .topbar { display: none; }
.broadcast-view .shell { width: min(1600px, calc(100% - 32px)); }
.broadcast-view .workspace { grid-template-columns: minmax(0, 1fr) minmax(155px, 17%); gap: 14px; }
.broadcast-view .stage { height: auto; aspect-ratio: 16 / 9; }
.broadcast-hud {
  position: absolute;
  inset-block-start: clamp(8px, 5%, 26px);
  inset-inline-start: clamp(8px, 4%, 36px);
  font-size: clamp(.65rem, 1.15vw, .85rem);
  pointer-events: none;
}
.broadcast-hud .clock {
  max-width: 100%;
  padding: .42em .65em;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: #151925ed;
}
.broadcast-hud .clock { gap: 1px; text-align: left; }
.broadcast-hud .clock small { margin-top: 0; font-size: .85em; }
.broadcast-hud .clock strong { font: 800 clamp(.9rem, 1.65vw, 1.42rem)/1.1 ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .shell { width: min(580px, calc(100% - 28px)); padding: 17px 0 30px; }
  .topbar { padding-bottom: 15px; }
  .workspace { grid-template-columns: 1fr; gap: 12px; }
  :is(.home-view, .queue-view) .shell { width: min(580px, calc(100% - 28px)); padding-top: 14px; }
  .queue-view .topbar { min-height: 49px; }
  .home-view .shell { width: 100%; padding: 0; }
  .home-scene { --tower-side-width: calc(100% / 6); }
  .home-title { width: min(100%, 420px); }
  .home-tower-art { background-size: 168% 112%; }
  .home-tower-actions .home-join { min-height: 44px; }
  .home-tower-actions .home-live { min-height: 44px; padding-inline: 0; }
  .home-join { padding-inline: 8px; font-size: .8rem; }
  .home-live { min-height: 38px; font-size: .76rem; }
  .queue-actions .home-live { min-height: 44px; }
  .queue-actions { margin-top: 10px; }
  .broadcast-view .workspace { grid-template-columns: 1fr; }
  .stage { height: clamp(285px, 48vh, 490px); }
  .controls { padding: 8px; }
  .controls button { padding-inline: 2px; }
}

@media (max-width: 600px) {
  .play-view .shell { gap: 4px; }
}

@media (max-width: 440px) {
  .home-tower-actions { gap: 5px; }
}

@media (max-height: 400px) {
  .home-tower-actions :is(.home-join, .home-live) { min-height: 34px; }
  .home-details summary, .home-tool-button { min-height: 30px; padding-block: 5px; }
}

@media (max-width: 760px) and (max-height: 450px) and (min-aspect-ratio: 4/3) {
  .broadcast-view .shell {
    width: min(580px, calc(100% - 24px), calc((100dvh - 110px) * 2.2));
    padding-block: 8px 12px;
  }
}

@media (max-width: 420px) and (orientation: portrait) {
  .broadcast-view .broadcast-hud .clock { display: flex; align-items: baseline; gap: 5px; }
  .broadcast-view .tower-hud:not(.illustrated) { gap: 1px; padding: 4px 6px; }
  .broadcast-view .tower-hud:not(.illustrated) .stage-metrics { display: grid; grid-template-columns: max-content minmax(0, 1fr) minmax(0, 1.2fr); gap: 5px; }
  .broadcast-view .tower-hud:not(.illustrated) .stage-metrics > div { gap: 1px; }
  .broadcast-view .tower-hud:not(.illustrated) .stage-metrics > div > span { font-size: .625rem; line-height: 1.05; }
  .broadcast-view .tower-hud:not(.illustrated) :is(.count-metric, .fallen-metric) { padding-inline-start: 5px; }
  .broadcast-view .tower-hud:not(.illustrated) #team-height { font-size: 1.35rem; }
  .broadcast-view .tower-hud:not(.illustrated) :is(#tower-count, #fallen-total) { font-size: .875rem; }
}

