*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --coral: #ff6b6b;
  --teal: #4ecdc4;
  --amber: #ffb347;
  --cream: #fffaf3;
  --sky: #eef6ff;
  --ink: #2d3748;
  --ink-muted: #64748b;
  --bg-panel: rgba(255, 255, 255, 0.88);
  --bg-panel-border: rgba(255, 255, 255, 0.95);
  --shadow-pop: 0 4px 0 rgba(45, 55, 72, 0.06), 0 8px 24px rgba(45, 55, 72, 0.1);
  --radius: 14px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(160deg, #fff5eb 0%, var(--sky) 45%, #f0fdf9 100%);
}

#app {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.game-shell {
  position: relative;
  width: 100%;
  max-width: 1280px;
  height: 100%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(45, 55, 72, 0.06);
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #eef6ff;
  outline: none;
  cursor: crosshair;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Title screen ───────────────────────────────────────── */

.title-screen {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.title-screen[hidden] {
  display: none !important;
}

.title-screen__bg {
  position: absolute;
  inset: 0;
  background:
    url('assets/visual/ui-title-screen.png') center / cover no-repeat,
    linear-gradient(160deg, #f5f0e8 0%, #e8eef5 100%);
}

.title-screen__veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.25) 0%, rgba(255, 250, 243, 0.4) 100%);
}

.title-screen__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 2rem;
  text-align: center;
  animation: fade-up 0.5s ease-out;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.title-screen__logo {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  margin-bottom: 0.25rem;
}

.title-screen__name--sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.title-screen__wordmark {
  width: min(88vw, 420px);
  height: auto;
  display: block;
  margin: 0.05rem 0 0.1rem;
  filter: drop-shadow(0 4px 14px rgba(26, 34, 56, 0.14));
}

.title-screen__name {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #1a2238;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.6);
}

.title-screen__tagline {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(26, 34, 56, 0.72);
  margin-bottom: 0.35rem;
}

.title-screen__orientation {
  display: none;
  margin: 0 0 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(26, 34, 56, 0.65);
  background: rgba(255, 255, 255, 0.72);
}

.title-screen__play {
  min-width: 200px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.85rem 2.5rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #1a2238;
  background: linear-gradient(135deg, var(--amber) 0%, #ff9f1a 100%);
  box-shadow:
    0 4px 0 #d4880a,
    0 12px 32px rgba(255, 159, 26, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.title-screen__play:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 0 #d4880a,
    0 16px 40px rgba(255, 159, 26, 0.55);
}

.title-screen__play:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #d4880a;
}

.title-screen__controls {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(26, 34, 56, 0.55);
}

/* ── 待合室（Phase 6） ───────────────────────────────── */

.lobby-screen {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(238, 246, 255, 0.92);
  backdrop-filter: blur(8px);
}

.lobby-screen[hidden] {
  display: none !important;
}

.lobby-screen__panel {
  width: min(420px, 100%);
  padding: 1.5rem 1.35rem;
  border-radius: 20px;
  background: linear-gradient(165deg, #ffffff 0%, #f0f6ff 100%);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.lobby-screen__title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #1a2238;
  text-align: center;
}

.lobby-screen__hint,
.lobby-screen__status {
  margin: 0.35rem 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(26, 34, 56, 0.55);
  text-align: center;
  line-height: 1.45;
}

.lobby-screen__error {
  margin: 0.5rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

.lobby-screen__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.lobby-screen__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(26, 34, 56, 0.65);
}

.lobby-screen__input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 2px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  font: 600 0.95rem system-ui, sans-serif;
  color: #1a2238;
  background: #fff;
}

.lobby-screen__input--code {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: ui-monospace, monospace;
}

.lobby-screen__actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1rem;
}

.lobby-screen__btn {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 14px;
  font: 700 0.92rem system-ui, sans-serif;
  color: #1a2238;
  background: rgba(148, 163, 184, 0.18);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.lobby-screen__btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.lobby-screen__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lobby-screen__btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #ffb347 0%, #ff8c42 100%);
  box-shadow: 0 4px 0 #d4880a;
}

.lobby-screen__code {
  margin: 0.5rem 0;
  font: 800 1.6rem ui-monospace, monospace;
  letter-spacing: 0.2em;
  text-align: center;
  color: #1a2238;
}

.lobby-screen__players {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  max-height: 160px;
  overflow-y: auto;
}

.lobby-player {
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.35rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
}


.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  pointer-events: none;
  padding: calc(0.35rem + var(--safe-top)) calc(0.5rem + var(--safe-right)) 0 calc(0.5rem + var(--safe-left));
  display: flex;
  justify-content: center;
}

.hud__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: min(100%, 680px);
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 2px solid #fff;
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(10px);
}

.hud-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hud-stat {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.hud-stat--time {
  min-width: 2.6rem;
  padding-right: 0.15rem;
  border-right: 1px solid rgba(45, 55, 72, 0.1);
}

.hud-stat--area {
  min-width: 2.35rem;
  padding-left: 0.15rem;
  border-left: 1px solid rgba(45, 55, 72, 0.1);
  justify-content: flex-end;
}

.hud-stat--urgent .hud-value--time {
  color: var(--coral);
  animation: pulse-time 0.8s ease-in-out infinite alternate;
}

@keyframes pulse-time {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.hud-value {
  font-size: 0.82rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
}

.hud-value--time {
  font-size: 0.92rem;
  color: #c2410c;
}

.hud-center {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  border: 2px solid #fff;
  box-shadow: var(--shadow-pop);
  align-self: center;
}

.hud-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
}

.hud-title {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* Team chips — 横1行 */
.team-bars {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.team-chip {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 0.22rem;
  min-width: 0;
}

.team-chip--local {
  padding: 0.12rem 0.2rem;
  margin: -0.12rem -0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(78, 205, 196, 0.35);
}

.team-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.team-chip--local .team-chip__dot {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.team-chip__track {
  flex: 1 1 auto;
  height: 5px;
  border-radius: 99px;
  background: rgba(45, 55, 72, 0.08);
  overflow: hidden;
  min-width: 0;
}

.team-chip__fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.25s ease;
}

.team-chip__pct {
  flex-shrink: 0;
  min-width: 1.65rem;
  font-size: 0.58rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: 1;
}

/* ── Death overlay（灰色・シンプル） ───────────────────── */

.death-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.72) 100%);
}

.death-overlay[hidden] {
  display: none !important;
}

.death-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fecaca;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.death-countdown-line {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

#death-countdown {
  font-variant-numeric: tabular-nums;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

/* ── Touch controls — バーチャルジョイスティック（スマホ） ── */

.touch-controls {
  position: absolute;
  left: calc(0.65rem + var(--safe-left));
  bottom: calc(0.65rem + var(--safe-bottom));
  z-index: 12;
  pointer-events: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  display: none;
}

.game-shell--dead .touch-controls {
  display: none !important;
}

.joystick {
  position: relative;
  width: 7.25rem;
  height: 7.25rem;
  pointer-events: auto;
  touch-action: none;
}

.joystick__base {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.52);
  border: 2px solid rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(8px);
}

.joystick__base::before {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px dashed rgba(78, 205, 196, 0.35);
  pointer-events: none;
}

.joystick__stick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.25rem;
  height: 3.25rem;
  margin: -1.625rem 0 0 -1.625rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff 0%, rgba(255, 255, 255, 0.88) 100%);
  border: 2px solid #fff;
  box-shadow:
    0 3px 0 rgba(45, 55, 72, 0.08),
    0 6px 16px rgba(45, 55, 72, 0.14);
  transform: translate(0, 0);
  will-change: transform;
}

.joystick__stick.is-active {
  background: #fff;
  box-shadow:
    0 2px 0 rgba(45, 55, 72, 0.06),
    0 8px 20px rgba(78, 205, 196, 0.28);
  border-color: rgba(78, 205, 196, 0.45);
}

@media (hover: none) and (pointer: coarse) {
  .touch-controls:not([hidden]) {
    display: block;
  }

  .joystick {
    width: 8rem;
    height: 8rem;
  }

  .joystick__stick {
    width: 3.5rem;
    height: 3.5rem;
    margin: -1.75rem 0 0 -1.75rem;
  }

  .title-screen__play,
  .lobby-screen__btn,
  .results-play-again,
  .results-back-title {
    min-height: 48px;
  }
}

/* ── Results overlay（ポップ） ────────────────────────── */

.results-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(255, 250, 243, 0.65);
  backdrop-filter: blur(10px);
}

.results-overlay[hidden] {
  display: none !important;
}

.results-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(480px, 100%);
  max-height: min(90vh, 720px);
  padding: 1.75rem 1.85rem 1.35rem;
  border-radius: 22px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow:
    0 4px 0 rgba(45, 55, 72, 0.06),
    0 20px 48px rgba(255, 107, 107, 0.12),
    0 20px 48px rgba(78, 205, 196, 0.1);
  animation: panel-pop 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
  background: #fff;
}

.results-panel__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-right: -0.35rem;
  padding-right: 0.35rem;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(45, 55, 72, 0.08);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(78, 205, 196, 0.55) rgba(45, 55, 72, 0.08);
}

.results-panel__scroll::-webkit-scrollbar {
  width: 6px;
}

.results-panel__scroll::-webkit-scrollbar-track {
  border-radius: 99px;
  background: rgba(45, 55, 72, 0.06);
}

.results-panel__scroll::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(78, 205, 196, 0.55);
}

.results-panel__scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(78, 205, 196, 0.75);
}

.results-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('assets/visual/ui-results-panel.png') center / cover no-repeat;
  opacity: 0.2;
  z-index: 0;
}

.results-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 250, 243, 0.92) 100%);
  z-index: 0;
}

.results-panel > * {
  position: relative;
  z-index: 1;
}

@keyframes panel-pop {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.results-logo {
  flex-shrink: 0;
  display: block;
  width: 52px;
  height: 52px;
  margin: 0 auto 0.5rem;
  border-radius: 12px;
}

.results-wordmark {
  flex-shrink: 0;
  display: block;
  width: min(72vw, 200px);
  height: auto;
  margin: 0 auto 0.35rem;
}

.results-kicker {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
  margin-bottom: 0.25rem;
}

.results-title {
  flex-shrink: 0;
  font-size: 1.6rem;
  font-weight: 900;
  text-align: center;
  color: var(--ink);
  margin-bottom: 0.85rem;
}

.results-title--win {
  text-shadow: 0 2px 12px currentColor;
}

.results-title--defeat {
  color: var(--coral);
}

.results-title--draw {
  color: var(--amber);
}

.results-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.55rem;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.results-player-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.results-player-row {
  display: grid;
  grid-template-columns: 2rem 1fr 4.2rem 2rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(45, 55, 72, 0.06);
}

.results-player-row--local {
  border-color: rgba(78, 205, 196, 0.5);
  background: rgba(78, 205, 196, 0.1);
}

.results-player-row--first .results-rank {
  color: var(--amber);
}

.results-player-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.results-player-name {
  font-size: 0.82rem;
  font-weight: 800;
}

.results-player-stat {
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink);
}

.results-player-stat--kills {
  color: var(--coral);
}

.results-row {
  display: grid;
  grid-template-columns: 2rem 1fr 3.5rem;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(45, 55, 72, 0.06);
  transition: transform 0.15s ease;
}

.results-row--local {
  border-color: rgba(78, 205, 196, 0.5);
  background: rgba(78, 205, 196, 0.12);
}

.results-row--winner {
  box-shadow: inset 0 0 0 2px rgba(255, 179, 71, 0.35);
}

.results-row--first .results-rank {
  color: var(--amber);
  font-size: 1.15rem;
}

.results-rank {
  font-size: 1rem;
  font-weight: 900;
  color: var(--ink-muted);
  text-align: center;
}

.results-team-block {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.results-team {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: capitalize;
}

.results-bar-track {
  height: 6px;
  border-radius: 99px;
  background: rgba(45, 55, 72, 0.08);
  overflow: hidden;
}

.results-bar-fill {
  height: 100%;
  border-radius: 99px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.results-pct {
  font-size: 0.9rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink);
}

.results-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  margin: 0 0 1rem;
}

.results-play-again {
  flex-shrink: 0;
  width: 100%;
  margin: 0;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #1a2238;
  background: linear-gradient(135deg, var(--amber) 0%, #ff9f1a 100%);
  box-shadow:
    0 4px 0 #d4880a,
    0 8px 20px rgba(255, 159, 26, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.results-play-again:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.results-play-again:active {
  transform: scale(0.98);
}

.results-back-title {
  flex-shrink: 0;
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 0.85rem 1rem;
  border: 2px solid rgba(45, 55, 72, 0.12);
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.92);
  transition: transform 0.15s ease, background 0.15s ease;
}

.results-back-title:hover {
  background: #fff;
  transform: translateY(-1px);
}

.results-back-title:active {
  transform: scale(0.98);
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 640px) {
  .game-shell {
    max-width: none;
    box-shadow: none;
  }

  .hud__bar {
    gap: 0.35rem;
    padding: 0.28rem 0.45rem;
  }

  .hud-value {
    font-size: 0.76rem;
  }

  .hud-value--time {
    font-size: 0.84rem;
  }

  .hud-stat--time {
    min-width: 2.35rem;
  }

  .hud-stat--area {
    min-width: 2.1rem;
  }

  .team-bars {
    gap: 0.25rem;
  }

  .team-chip__pct {
    min-width: 1.45rem;
    font-size: 0.52rem;
  }

  .team-chip__track {
    height: 4px;
  }

  .title-screen__content {
    padding: calc(1.25rem + var(--safe-top)) 1rem calc(1.5rem + var(--safe-bottom));
    gap: 0.5rem;
  }

  .title-screen__logo {
    width: 80px;
    height: 80px;
  }

  .lobby-screen {
    align-items: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: calc(0.75rem + var(--safe-top)) calc(0.75rem + var(--safe-right)) calc(0.75rem + var(--safe-bottom)) calc(0.75rem + var(--safe-left));
  }

  .lobby-screen__panel {
    margin: auto 0;
  }

  .results-overlay {
    padding: calc(0.75rem + var(--safe-top)) calc(0.75rem + var(--safe-right)) calc(0.75rem + var(--safe-bottom)) calc(0.75rem + var(--safe-left));
  }

  .results-panel {
    max-height: calc(100dvh - 1.5rem - var(--safe-top) - var(--safe-bottom));
    padding: 1.25rem 1.15rem 1rem;
  }

  .results-title {
    font-size: 1.35rem;
    margin-bottom: 0.65rem;
  }

  .results-actions {
    order: 99;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.96) 28%);
  }
}

@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .title-screen__orientation {
    display: block;
  }
}

@media (max-width: 640px) and (max-height: 700px) {
  .title-screen {
    align-items: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
