/* BOJI arena identity and lobby. Gameplay layout keeps its own viewport. */
:root {
  --boji-paper: #f6f5ef;
  --boji-ink: #20221e;
  --boji-red: #e9512c;
  --boji-rule: #ccccc2;
  --boji-copy: #5d6057;
}
body.boji-home {
  display: block;
  width: 100%;
  height: auto;
  min-height: 100svh;
  overflow: auto;
  background: var(--boji-paper);
  color: var(--boji-ink);
}
body.boji-home .app {
  display: none;
}
body:not(.boji-home) #bojiHome {
  display: none;
}
body:not(.room-setup) #bojiBack,
body.online-mode #bojiBack {
  display: none;
}
.boji-shell {
  --boji-nav-height: 80px;
  width: min(100% - clamp(36px, 9vw, 160px), 1320px);
  margin: 0 auto;
  padding: 0 0 max(36px, env(safe-area-inset-bottom));
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.boji-shell button,
.boji-shell select {
  font-family: inherit;
}
.boji-shell a {
  color: inherit;
  text-decoration: none;
}
.boji-nav {
  min-height: var(--boji-nav-height);
  display: flex;
  align-items: center;
  gap: clamp(20px, 6vw, 90px);
  border-bottom: 2px solid var(--boji-ink);
}
.boji-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font:
    italic 950 34px/1 "Arial Black",
    Arial,
    sans-serif;
}
.boji-mark {
  display: block;
  width: auto;
  height: 40px;
  margin-inline: 0;
}
.boji-nav nav {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  gap: clamp(16px, 3vw, 38px);
}
.boji-nav nav a,
.boji-nav nav button {
  display: inline-flex;
  align-items: center;
  padding: 4px 0 0;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  font-size: 14px;
  font-weight: 650;
  color: var(--boji-copy);
  white-space: nowrap;
}
#agentPrepPrompt {
  width: 100%;
  resize: vertical;
  line-height: 1.65;
}
.boji-nav nav [aria-current],
.boji-nav nav :hover {
  color: var(--boji-ink);
  border-bottom-color: var(--boji-red);
}
.boji-account {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 14px;
  min-height: 40px;
  border: 1px solid var(--boji-rule);
  border-radius: 3px;
  background: transparent;
  color: var(--boji-ink);
  font-weight: 650;
  font-size: 13px;
}
.boji-account svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
  flex: none;
}
.boji-account span {
  overflow-wrap: anywhere;
}
.boji-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  min-height: calc(100svh - var(--boji-nav-height));
  border-bottom: 1px solid var(--boji-rule);
  padding: 24px 0 max(24px, env(safe-area-inset-bottom));
}
.boji-hero-copy {
  order: 1;
  position: relative;
  text-align: center;
  padding: 8px 10px;
  background: radial-gradient(ellipse at center, var(--boji-paper) 42%, transparent 76%);
}
.boji-shell .boji-room-scroll {
  order: 2;
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  min-height: 44px;
  margin-top: auto;
  padding: 6px 16px 9px;
  border-radius: 8px;
  background: var(--boji-paper);
  color: var(--boji-copy);
  font-size: 13px;
  font-weight: 700;
}
.boji-shell .boji-room-scroll:hover {
  color: #a8321b;
}
.boji-room-scroll:focus-visible {
  outline: 2px solid var(--boji-ink);
  outline-offset: 3px;
}
.boji-room-scroll span {
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.boji-hero p {
  margin: 0;
  color: var(--boji-copy);
  line-height: 1.65;
  font-size: 14px;
}
.boji-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}
.boji-primary,
.boji-secondary,
.boji-small-button,
.boji-link-button,
.boji-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 11px 18px;
  min-height: 42px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.boji-primary {
  color: #fff;
  background: #c63d1e;
  border-color: #c63d1e;
}
.boji-primary:hover {
  background: #af3418;
}
.boji-secondary,
.boji-small-button,
.boji-icon-button {
  background: transparent;
  color: var(--boji-ink);
  border-color: #a4a79c;
}
.boji-secondary:hover,
.boji-small-button:hover,
.boji-icon-button:hover,
.boji-account:hover {
  background: #e9e8df;
}
.boji-hero-actions :is(.boji-primary, .boji-secondary),
#roomScreen.unified-room .room-start-bar .boji-action {
  --boji-button-edge: #292d25;
  --boji-button-fill: #fffdf4;
  --boji-button-hover: #f2eee1;
  --boji-button-chip: #ebe8da;
  justify-content: space-between;
  gap: clamp(8px, 2vw, 20px);
  padding: 5px 5px 5px 12px;
  min-height: 46px;
  border: 1px solid var(--boji-button-edge);
  border-radius: 7px;
  background: var(--boji-button-fill);
  box-shadow: 0 3px var(--boji-button-edge);
  transition: background-color 130ms ease, box-shadow 130ms ease, transform 130ms ease;
}
.boji-hero-actions .boji-primary,
#roomScreen.unified-room .room-start-bar .boji-action.boji-primary:not([aria-pressed="true"]) {
  --boji-button-edge: #752a1a;
  --boji-button-fill: #ba391e;
  --boji-button-hover: #a8321b;
  --boji-button-chip: #942e19;
  color: #fff;
}
.boji-hero-actions :is(.boji-primary, .boji-secondary):not(:disabled):hover,
#roomScreen.unified-room .room-start-bar .boji-action:not(:disabled):hover {
  background: var(--boji-button-hover);
}
.boji-hero-actions :is(.boji-primary, .boji-secondary):not(:disabled):active,
#roomScreen.unified-room .room-start-bar .boji-action:not(:disabled):active {
  transform: translateY(2px);
  box-shadow: 0 1px var(--boji-button-edge);
}
.boji-hero-actions :is(.boji-primary, .boji-secondary):focus-visible,
#roomScreen.unified-room .room-start-bar .boji-action:focus-visible {
  outline: 2px solid var(--boji-ink);
  outline-offset: 5px;
}
.boji-hero-actions span,
#roomScreen.unified-room .room-start-bar .boji-action > [aria-hidden="true"] {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 4px;
  background: var(--boji-button-chip);
  font-family: Arial, sans-serif;
  font-size: 18px;
  line-height: 1;
}
@media (prefers-reduced-motion: reduce) {
  .boji-hero-actions :is(.boji-primary, .boji-secondary),
  #roomScreen.unified-room .room-start-bar .boji-action {
    transition: none;
  }
}
.boji-hero-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(230px, 36svh, 360px);
  margin-top: auto;
  padding-bottom: clamp(20px, 5.5svh, 50px);
  pointer-events: none;
}
.boji-hero-maze {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 62% 68% at 50% 52%, #000 33%, transparent 97%);
}
.boji-maze-walls,
.boji-maze-lights {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.boji-maze-walls {
  stroke: #858b72;
  stroke-opacity: 0.42;
  stroke-width: 1.2;
}
.boji-maze-lights {
  stroke: #d45930;
  stroke-width: 3;
  filter: drop-shadow(0 0 5px #ed8e51);
  stroke-dasharray: 10 90;
}
.boji-maze-lights use {
  animation: boji-maze-flow 9s linear infinite;
}
.boji-maze-lights use:nth-child(2) {
  animation-delay: -3s;
}
.boji-maze-lights use:nth-child(3) {
  animation-delay: -6s;
}
@keyframes boji-maze-flow {
  from {
    opacity: 0;
    stroke-dashoffset: 10;
  }
  12%,
  78% {
    opacity: 0.9;
  }
  to {
    opacity: 0;
    stroke-dashoffset: -90;
  }
}
.boji-maze-wave-glow {
  filter: drop-shadow(0 0 5px #f28335);
}
.boji-maze-wave {
  fill: none;
  stroke: #e46228;
  stroke-width: 17;
  vector-effect: non-scaling-stroke;
  animation: boji-maze-expand 5.4s cubic-bezier(.15, .55, .44, 1) infinite;
}
.boji-maze-wave-glow g:nth-child(2) > .boji-maze-wave {
  animation-delay: -1.8s;
}
.boji-maze-wave-glow g:nth-child(3) > .boji-maze-wave {
  animation-delay: -3.6s;
}
@keyframes boji-maze-expand {
  0% {
    transform: scale(.06);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  64%, 100% {
    transform: scale(1.45);
    opacity: 0;
  }
}
.boji-hero-tank-scene {
  position: relative;
  width: clamp(178px, 26vw, 344px);
  max-width: 100%;
}
.boji-hero-tank-scene::before {
  content: "";
  position: absolute;
  top: 86%;
  left: 50%;
  width: min(210%, calc(100vw - 36px));
  height: 49%;
  transform: translateX(-50%);
  background: #191817;
  clip-path: polygon(
    0 66%, 11% 47%, 17% 34%, 22% 38%, 28% 19%, 38% 25%,
    47% 4%, 61% 13%, 69% 7%, 78% 25%, 89% 29%, 100% 54%,
    90% 51%, 82% 65%, 73% 75%, 68% 87%, 57% 81%, 51% 96%,
    40% 83%, 32% 85%, 21% 69%, 14% 78%, 17% 60%
  );
}
.boji-hero-tank {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}
@media (prefers-reduced-motion: reduce) {
  .boji-maze-lights,
  .boji-maze-wave-glow {
    display: none;
  }
  .boji-maze-lights use,
  .boji-maze-wave {
    animation: none;
  }
}
.boji-content {
  padding-top: clamp(22px, 3vw, 42px);
}
.boji-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.boji-section-heading {
  padding-bottom: 14px;
  border-bottom: 2px solid var(--boji-ink);
}
.boji-section-heading h2 {
  font-size: clamp(23px, 2.2vw, 32px);
  font-weight: 850;
  line-height: 1.2;
  margin: 0;
}
.boji-icon-button {
  padding: 4px 9px;
  min-height: 34px;
  min-width: 36px;
  font-family: Arial, sans-serif;
  font-size: 20px;
}
.boji-rooms {
  scroll-margin-top: 16px;
}
.boji-room-list,
.boji-round-list {
  overflow-wrap: anywhere;
}
.boji-list-empty {
  margin: 0;
  display: grid;
  place-content: center;
  padding: 24px 18px;
  min-height: 84px;
  color: var(--boji-copy);
  background: repeating-linear-gradient(-45deg, #2222 0 1px, transparent 1px 8px) left center / 3px 50%
    no-repeat;
  text-align: center;
  font-size: 14px;
}
.boji-small-button,
.boji-link-button {
  font-size: 13px;
  min-height: 38px;
  padding: 8px 12px;
}
.boji-link-button {
  background: none;
  color: var(--boji-copy);
}
.boji-link-button:hover {
  color: var(--boji-ink);
}
.boji-list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--boji-rule);
  font-size: 14px;
}
.boji-room-info {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.boji-list-empty p {
  margin: 6px 0 0;
}
#bojiRoomNotice:empty {
  display: none;
}
.boji-room-name {
  font-weight: 760;
}
.boji-room-meta,
.boji-room-status {
  color: var(--boji-copy);
  font-size: 13px;
}
.boji-room-action {
  color: var(--boji-ink);
  background: transparent;
  border: 1px solid var(--boji-rule);
  border-radius: 3px;
  padding: 7px 13px;
  margin-left: auto;
  font-weight: 700;
}
.boji-room-action:enabled:hover {
  background: #e9e8df;
}
/* The standings share the lobby's paper, tank artwork and pressed controls. */
.boji-standings {
  padding: clamp(18px, 3.5vw, 46px) 0;
  color: var(--boji-ink);
}
.boji-board-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36%;
  isolation: isolate;
  overflow: hidden;
  position: relative;
  border-radius: 6px;
  color: #f9f8ee;
  background: #252821;
}
.boji-board-title {
  align-self: center;
  z-index: 1;
  padding: clamp(25px, 4vw, 56px) 0 clamp(25px, 4vw, 56px) clamp(18px, 4.5vw, 66px);
}
.boji-board-title h1 {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.25vw, 20px);
  margin: 0;
  color: inherit;
  font-size: clamp(34px, 5vw, 76px);
  font-weight: 900;
  line-height: 1.15;
}
.boji-board-title h1::before {
  content: "";
  align-self: stretch;
  width: clamp(5px, 0.6vw, 9px);
  margin: 0.14em 0;
  transform: skew(-11deg);
  background: #ff7750;
}
.boji-board-title p {
  max-width: 34em;
  margin: 12px 0 0;
  font-size: clamp(12px, 1.1vw, 16px);
  line-height: 1.65;
  color: #d9dccc;
}
.boji-board-art {
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  background: repeating-linear-gradient(125deg, transparent 0 14px, #f5edd20b 14px 15px);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
}
.boji-board-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 80%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #64694e;
  box-shadow: 0 0 0 11px #d3d8a714;
  transform: translate(15%, 16%);
}
.boji-board-art img {
  position: absolute;
  inset-block-end: -6%;
  inset-inline-end: 5%;
  width: min(90%, 355px);
  height: 98%;
  object-fit: contain;
  object-position: bottom center;
}
.boji-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: clamp(18px, 2.5vw, 34px) 0 16px;
}
.boji-filters label {
  display: grid;
  min-width: min(125px, 22%);
  gap: 5px;
  color: var(--boji-copy);
  font-size: 12px;
  font-weight: 650;
}
.boji-filters select,
.boji-filters .boji-icon-button,
.boji-rank-focus button,
.boji-score-expand {
  border: 1px solid #a4a69a;
  border-radius: 5px;
  background-color: #fffdf6;
  color: var(--boji-ink);
}
.boji-filters select {
  min-height: 42px;
  width: 100%;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 650;
}
.boji-filters .boji-icon-button {
  margin-left: auto;
  min-height: 42px;
  min-width: 42px;
  box-shadow: 0 2px var(--boji-ink);
}
.boji-standings :is(button, select, summary):focus-visible {
  outline: 2px solid #af381b;
  outline-offset: 3px;
}
.boji-rank-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
}
.boji-rank-focus button {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 680;
}
.boji-rank-focus button[aria-pressed="true"] {
  background: var(--boji-ink);
  border-color: var(--boji-ink);
  color: #fffdf6;
}
.boji-score-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  color: var(--boji-ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.boji-score-table th,
.boji-score-table td {
  padding: 14px clamp(6px, 1.15vw, 18px);
  text-align: start;
  vertical-align: middle;
}
.boji-score-table thead th {
  border-top: 2px solid var(--boji-ink);
  border-bottom: 1px solid #a4a795;
  background: #e8e9de;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.boji-score-row { border-bottom: 1px solid var(--boji-rule); }
.boji-score-leader { background: #eceee2; }
.boji-score-row:hover, .boji-score-row:focus-within { background: #efeee4; }
.boji-score-table .boji-score-rank {
  width: 1%;
  font-size: 20px;
  font-style: italic;
  font-weight: 850;
  line-height: 1.2;
}
.boji-score-leader .boji-score-rank { color: #a0371e; }
.boji-score-name { font-weight: 600; width: 34%; }
.boji-score-identity { display: flex; align-items: center; gap: 10px; }
.boji-score-profile { min-width: 0; }
.boji-score-callsign { overflow-wrap: anywhere; }
.boji-score-avatar, .boji-score-identity img.agent-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  flex: none;
  border: 1px solid #9fa28f;
  border-radius: 7px;
  background: #e1e4d3;
  color: #3d4633;
  font-size: 18px;
}
.boji-score-identity img.agent-avatar { object-fit: cover; }
.boji-score-kind, .boji-score-rounds, .boji-mobile-metric {
  display: block;
  margin-top: 3px;
  color: var(--boji-copy);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.boji-score-wins, .boji-score-rate strong, .boji-score-eliminations {
  font-weight: 800;
}
.boji-metric-divider { color: #86897a; }
.boji-score-action { width: 1%; }
.boji-score-expand {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
}
.boji-score-expand::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.boji-score-expand[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
.boji-score-detail-row td {
  padding: 14px clamp(12px, 3vw, 42px);
  border-bottom: 1px solid #abae9f;
  background: #e9ebdf;
}
.boji-score-detail-row p, .boji-score-facts {
  margin: 0;
  line-height: 1.6;
  font-size: 13px;
}
.boji-score-detail-row p { color: var(--boji-copy); }
.boji-score-facts { display: flex; flex-wrap: wrap; gap: 8px 30px; }
.boji-score-facts div { display: flex; align-items: baseline; gap: 8px; }
.boji-score-facts dd { margin: 0; font-weight: 750; }
.boji-score-facts + p { margin-top: 5px; }
.boji-score-empty, .boji-score-loading {
  padding: clamp(36px, 6vw, 72px) 18px;
  border-block: 2px solid var(--boji-ink);
  background: repeating-linear-gradient(135deg, #555a40 0 2px, transparent 2px 5px) left 16px top 18px / 25px 4px no-repeat, #eceee4;
  text-align: center;
}
.boji-score-empty strong { font-size: clamp(18px, 2.1vw, 25px); }
.boji-score-empty p, .boji-score-retry { margin: 8px 0 0; color: var(--boji-copy); font-size: 14px; }
.boji-score-loading { margin: 0; }
#bojiRoundMore { display: block; margin: 16px auto 0; min-height: 42px; }
.boji-count-note { margin-top: 22px; font-size: 13px; color: var(--boji-copy); }
.boji-count-note summary { cursor: pointer; width: fit-content; font-weight: 700; }
.boji-count-note p { max-width: 74em; margin: 8px 0 0; line-height: 1.7; }
.boji-mobile-metric { display: none; }
.boji-score-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 720px) {
  .boji-board-heading { grid-template-columns: minmax(0, 1fr) 30%; }
  .boji-board-title { padding: 22px 0 22px 14px; }
  .boji-board-title h1 { font-size: clamp(28px, 6.5vw, 40px); }
  .boji-board-title p { margin-top: 8px; }
  .boji-board-art { clip-path: none; }
  .boji-board-art img { width: 96%; inset-inline-end: 2%; inset-block-end: 1%; }
  .boji-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 6px; }
  .boji-filters label { min-width: 0; }
  .boji-filters select { padding-inline: 5px; font-size: 12px; }
  .boji-filters .boji-icon-button { min-width: 34px; margin: 0; }
  .boji-score-table, .boji-score-table tbody { display: block; width: 100%; }
  .boji-score-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .boji-score-row {
    position: relative;
    display: grid;
    grid-template-columns: 1.8rem minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 12px 6px;
    padding: 14px 10px;
  }
  .boji-score-row:first-child { border-top: 2px solid var(--boji-ink); }
  .boji-score-table .boji-score-row :is(th, td) { width: auto; padding: 0; }
  .boji-score-rank { grid-column: 1; grid-row: 1; }
  .boji-score-name { grid-column: 2 / -1; grid-row: 1; }
  .boji-score-identity { margin-right: 42px; gap: 7px; }
  .boji-score-avatar, .boji-score-identity img.agent-avatar { width: 32px; height: 32px; font-size: 15px; }
  .boji-score-kind { margin: 0; }
  .boji-score-results, .boji-score-rate, .boji-score-combat { align-self: start; grid-row: 2; }
  .boji-score-results { grid-column: 1 / 3; }
  .boji-score-rate { grid-column: 3; }
  .boji-score-combat { grid-column: 4; }
  .boji-score-action { grid-row: 1; grid-column: 4; justify-self: end; }
  .boji-mobile-metric { display: block; margin: 0 0 3px; font-size: 11px; }
  .boji-score-rounds { display: inline-block; margin: 0 0 0 4px; font-size: 11px; }
  .boji-score-detail-row, .boji-score-detail-row td { display: block; }
}
.brand-name {
  font:
    italic 900 25px/1 "Arial Black",
    Arial,
    sans-serif;
}
.arena-shell,
.panel,
.feature-dialog,
.screen-card {
  box-shadow: 0 3px 14px #22231b12;
}
.arena-shell,
.panel {
  border-radius: 5px;
}
#bojiBack {
  font-size: 12px;
  min-height: 32px;
}
@media (min-width: 621px) and (max-width: 740px) {
  .boji-nav, .boji-nav nav { gap: 14px; }
}
@media (max-width: 620px) {
  .boji-shell {
    --boji-nav-height: 90px;
    width: calc(100% - 36px);
  }
  .boji-nav {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding-top: 10px;
  }
  .boji-wordmark {
    font-size: 24px;
    gap: 5px;
  }
  .boji-mark {
    width: 34px;
    height: 34px;
    margin-inline: -4px;
  }
  .boji-nav nav {
    grid-row: 2;
    grid-column: 1 / -1;
    gap: 24px;
    min-height: 40px;
  }
  .boji-nav nav a,
  .boji-nav nav button {
    font-size: 12px;
  }
  .boji-account {
    grid-row: 1;
    grid-column: 2;
    font-size: 12px;
    padding: 6px 10px;
    gap: 5px;
    max-width: 170px;
    min-height: 32px;
  }
  .boji-hero {
    padding-top: 12px;
  }
  .boji-hero-art {
    height: clamp(170px, 52vw, 250px);
  }
  .boji-hero-actions {
    margin-top: 14px;
  }
  .boji-content {
    padding-top: 22px;
  }
}
@media (max-width: 370px) {
  .boji-nav nav {
    gap: 12px;
  }
  .boji-account svg {
    display: none;
  }
}

/* Ready-room seats */
#roomRoster {
  display: grid;
  gap: 12px;
  border: 0;
  background: transparent;
}
#roomScreen #roomRoster .member-card {
  position: relative;
  min-height: 88px;
  border: 1px solid color-mix(in srgb, var(--text-main) 14%, transparent);
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(
    114deg,
    color-mix(in oklab, var(--player) 10%, var(--surface-raised)),
    var(--surface-raised) 58%
  );
}
#roomRoster .seat-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  margin: 0;
}
.member-card:has(> .member-actions) .seat-heading {
  padding-inline-end: 45px;
}
.member-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--text-main) 12%, transparent);
  border-radius: 10px;
  background: color-mix(in oklab, var(--player) 6%, var(--surface-raised));
  color: var(--player);
}
.member-avatar.guest-avatar {
  background: var(--surface-raised);
  color: var(--text-soft);
}
.guest-avatar::before,
.guest-avatar::after {
  content: "";
  position: absolute;
  background: currentColor;
  opacity: .8;
}
.guest-avatar::before {
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.guest-avatar::after {
  bottom: 7px;
  width: 16px;
  height: 9px;
  border-radius: 9px 9px 3px 3px;
}
.member-avatar svg {
  width: 25px;
  height: 25px;
}
.member-avatar .agent-avatar {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.member-initial {
  color: var(--text-main);
  font: 700 14px/1 var(--sans);
}
.member-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}
#roomRoster .pilot-name {
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.25;
}
.member-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 5px;
}
.member-tags span {
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-main) 6%, transparent);
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.member-tags span:first-child {
  color: var(--text-main);
}
#roomRoster .member-stamp {
  padding: 4px 6px;
  border: 1px solid color-mix(in srgb, currentColor 70%, transparent);
  border-radius: 3px;
  font: 700 11px/1.25 var(--sans);
  transform: rotate(-4deg);
}
#roomRoster .member-stamp[data-state="ready"] {
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent-ink) 5%, var(--surface-raised));
}
.member-actions > summary {
  position: absolute;
  top: 22px;
  inset-inline-end: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--boji-ink) 26%, transparent);
  border-radius: 7px;
  background: #fffdf4;
  box-shadow: 0 1px color-mix(in srgb, var(--boji-ink) 26%, transparent);
  color: var(--text-soft);
  cursor: pointer;
  list-style: none;
}
.member-actions > summary::-webkit-details-marker {
  display: none;
}
.member-actions > summary::after {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: -5px 0 currentColor, 5px 0 currentColor;
}
.member-actions > summary:hover,
.member-actions[open] > summary {
  background: #f2eee1;
  color: var(--text-main);
}
.member-actions > summary:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}
.member-actions .seat-controls {
  flex-wrap: wrap;
  margin-top: 12px;
}
.member-actions .seat-name-input {
  color: var(--text-main);
  flex: 1 0 100%;
  border-color: var(--border);
}
.member-add-card {
  align-self: stretch;
  min-width: 0;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
}
.member-add-card > summary {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px;
  border-radius: 6px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.member-add-card:not([open]) > summary {
  height: 100%;
}
.member-add-card > summary::-webkit-details-marker {
  display: none;
}
.member-add-card > summary:hover {
  background: var(--surface-raised);
}
.member-add-card > summary:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}
.member-add-card > summary span {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 36px;
  color: var(--accent-ink);
  font: 800 38px/1 var(--sans);
}
.member-add-card[open] > summary {
  min-height: 48px;
}
.member-add-card[open] > summary span {
  transform: rotate(45deg);
}
.member-add-card .roster-tools {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0 10px 10px;
}
body.room-setup :is(.hero, .footer),
.main-grid > #gameSidebar,
body.room-setup .main-grid > .arena-shell {
  display: none;
}
.main-grid:has(> .arena-shell) {
  grid-template-columns: minmax(0, 1fr);
}
.arena-score-column {
  display: none;
  position: absolute;
  inset-block-start: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: min(112px, calc(var(--arena-gutter) - 28px));
  container-type: inline-size;
  max-height: calc(100% - 28px);
  overflow: auto;
  gap: 11px;
}
#arenaScoresLeft {
  inset-inline-start: max(14px, calc(var(--arena-gutter) - 126px));
}
#arenaScoresRight {
  inset-inline-end: max(14px, calc(var(--arena-gutter) - 126px));
}
body.arena-side-scores .arena-score-column:not(:empty) {
  display: grid;
}
#arenaWrap #miniScores {
  position: absolute;
  inset: 37px 9px auto;
  z-index: 4;
  width: max-content;
  max-width: calc(100% - 18px);
  margin-inline: auto;
  flex-wrap: wrap;
  overflow: visible;
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--surface);
  pointer-events: none;
}
#arenaWrap #spectatorBanner {
  position: absolute;
  inset: auto auto 9px 50%;
  z-index: 4;
  width: max-content;
  max-width: calc(100% - 18px);
  padding: 4px 5px 4px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  transform: translateX(-50%);
}
#arenaWrap #miniScores:empty,
body.arena-side-scores #arenaWrap #miniScores {
  display: none;
}
#arenaWrap .mini-score {
  flex-shrink: 0;
}
#arenaWrap .mini-score.out i {
  background: transparent;
  outline: 1px solid var(--player);
}
.arena-score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  font: 12px/1.35 var(--sans);
}
.arena-score-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.arena-score-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(30px, 75cqi, 46px);
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--player);
  color: #101217;
  font: 750 clamp(14px, 22cqi, 20px)/1 var(--mono);
  font-variant-numeric: tabular-nums;
}
.arena-score-card.out .arena-score-tile {
  background: repeating-linear-gradient(135deg, transparent 0 4px, rgb(255 255 255 / .16) 4px 5px), #3a3d43;
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--player);
}
@container (max-width: 68px) {
  .arena-score-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}
body.room-setup:not(.boji-home) {
  background: var(--boji-paper);
}
body.room-setup:not(.boji-home) .app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: none;
}
.header .sidebar-toggle {
  display: none;
}
.header .room-guide-toggle {
  display: none;
}
.header .sidebar-details-toggle,
body:not(.infinity-header-active) .header .room-guide-toggle {
  display: grid;
}
body.room-setup .header {
  flex-shrink: 0;
  border-block: 0;
}
body.room-setup .main-grid {
  display: block;
  flex: 1;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
  overscroll-behavior: contain;
}
body.room-setup #roomScreen.unified-room {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  max-width: 1560px;
  height: 100%;
  min-height: 0;
  max-height: none;
  margin: 0 auto;
  padding: clamp(12px, 3vw, 44px) clamp(12px, 3vw, 44px) 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.room-setup #roomScreen::before {
  content: none;
}
body.room-setup #roomScreen.unified-room > .net-intro {
  padding-bottom: 18px;
}
body.room-setup #roomScreen.unified-room > .net-intro:not(:has(> :not([hidden]))) {
  padding: 0;
}
body.room-setup #roomScreen.unified-room > .net-content {
  grid-area: 2 / 1;
  align-self: stretch;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: calc(var(--room-action-space, 150px) + 12px);
  scroll-padding-bottom: calc(var(--room-action-space, 150px) + 12px);
}
body.room-setup #roomScreen .net-content > .room-disclosure,
body.room-setup #roomScreen .net-content > .room-disclosure > summary {
  border: 0;
}
#sidebarDialog {
  width: min(760px, calc(100% - 24px));
}
#sidebarDialog[data-view="scores"] {
  width: min(480px, calc(100% - 24px));
}
#sidebarDialog[data-view="scores"] [data-sidebar-guide],
#sidebarDialog[data-view="guide"] .sidebar > .panel:not([data-sidebar-guide]) {
  display: none;
}
#sidebarDialog[data-view="guide"] .panel:not([data-sidebar-guide]) + [data-sidebar-guide] {
  border-top: 0;
}
#sidebarDialog .feature-body {
  padding: 0 clamp(14px, 4vw, 28px) 18px;
}
#sidebarDialog[open] .sidebar {
  display: grid;
  gap: 0;
}
#sidebarDialog .panel {
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#sidebarDialog .panel + .panel {
  border-top: 1px solid var(--border);
}
#sidebarDialog .panel-title {
  flex-wrap: wrap;
  gap: 8px;
  padding: 15px 0 9px;
  color: var(--text-main);
  font: 700 14px/1.4 var(--sans);
}
#sidebarDialog :is(.roster, .manual, .power-list, .log) {
  padding-inline: 0;
}
#sidebarDialog .power-row {
  margin: 0;
  padding: 8px 0;
}
@media (min-width: 700px) {
  #sidebarDialog .power-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
  }
  #sidebarDialog .power-note {
    grid-column: 1 / -1;
  }
}
.room-visibility {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.room-visibility-state {
  font-size: 12px;
}
body:not(.room-setup) .room-visibility {
  display: none;
}
.room-visibility-track {
  position: relative;
  flex: none;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #777b70;
}
.room-visibility-track::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fffdf4;
}
.room-visibility[aria-checked="true"] .room-visibility-track {
  background: var(--accent-ink);
}
.room-visibility[aria-checked="true"] .room-visibility-track::before {
  transform: translateX(16px);
}
body.room-setup #roomScreen .room-start-bar {
  grid-area: 2 / 1;
  align-self: end;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 10px max(12px, env(safe-area-inset-bottom));
  background: transparent;
  text-align: center;
  pointer-events: none;
}
body.room-setup #roomScreen .room-start-bar :is(button, a) {
  pointer-events: auto;
}
#roomScreen.unified-room .room-start-bar .boji-action {
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--boji-ink);
  font: 700 14px/1.3 var(--sans);
}
#roomScreen.unified-room .room-start-bar .boji-action:disabled {
  background: var(--surface-sunken);
  color: var(--text-subtle);
  border-color: var(--border);
  box-shadow: none;
}
body.room-setup #roomScreen .room-start-bar #readyHint {
  margin: 0;
}
body.room-setup #roomScreen .room-start-bar #roomStatus {
  min-height: 0;
  margin: 0;
}
.room-footer-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: min(100%, 640px);
  gap: clamp(4px, 2vw, 16px);
  padding-bottom: 3px;
}
.room-footer-tools > [data-guest-agent-invite] {
  grid-area: 1 / 1;
  justify-self: end;
}
.room-footer-tools > .boji-primary {
  grid-area: 1 / 2;
}
.room-footer-tools:has(> #startRoomBtn:not([hidden])) > #toggleSpectateBtn {
  grid-row: 2;
}
.room-footer-management {
  grid-area: 1 / 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
body.room-setup #roomScreen.unified-room .room-footer-tools .boji-action {
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 4px 7px;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  white-space: nowrap;
}
body.room-setup #roomScreen.unified-room .room-footer-tools :is(#startRoomBtn, #readyBtn, #toggleSpectateBtn) {
  position: relative;
  min-width: clamp(76px, 15vw, 144px);
  min-height: 44px;
  margin: 0;
  padding-inline: 23px;
  font-size: 14px;
}
#roomScreen.unified-room .room-footer-tools .boji-action > [aria-hidden="true"] {
  width: 18px;
  height: 18px;
  font-size: 13px;
}
#roomScreen.unified-room .room-footer-tools .boji-primary > [aria-hidden="true"] {
  position: absolute;
  inset-inline-end: 4px;
}
#roomScreen.unified-room .room-footer-tools .room-action {
  --boji-button-edge: var(--danger-edge);
  --boji-button-fill: var(--surface-raised);
  --boji-button-hover: color-mix(in srgb, var(--danger) 9%, var(--surface-raised));
  justify-content: center;
  color: var(--danger);
}
body.room-setup.touch-landscape #roomScreen.unified-room > :is(.net-intro, .net-content) {
  padding-right: 0;
}
body.room-setup.touch-landscape #roomScreen.unified-room > .net-intro {
  overflow: visible;
}
@media (min-width: 820px) {
  body.room-setup #roomRoster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}
@media (max-width: 620px) {
  body.room-setup #roomScreen.unified-room {
    padding-inline: 5px;
  }
}
@media (max-width: 480px) {
  body.room-setup #roomScreen .room-start-bar {
    padding-inline: 0;
  }
  #roomScreen.unified-room .room-footer-tools .boji-action:not(.boji-primary) > [aria-hidden="true"] {
    display: none;
  }
}
@media (max-width: 340px) {
  .room-footer-tools > [data-guest-agent-invite] {
    grid-area: 2 / 1 / 3 / 2;
  }
  .room-footer-management {
    grid-area: 2 / 3 / 3 / 4;
  }
}

/* Keep live readouts above the arena and give the stage the remaining height. */
.app > .footer,
.arena-shell .objective-bar[hidden] {
  display: none !important;
}
#infiniteArena[open] {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}
#infiniteArena > #infiniteStatusbar {
  grid-row: 2;
  border-top: 0;
  border-bottom: 1px solid var(--border);
}
#infiniteArena > .infinite-underbar {
  grid-row: 3;
  min-height: 0;
  padding-block: 4px;
  border-top: 0;
  border-bottom: 1px solid var(--border);
}
#infiniteArena > .infinite-stage {
  grid-row: 4;
}
#infiniteArena[data-spectating="true"] > .infinite-underbar:has(#infiniteStatus[hidden]) {
  display: none;
}
#infiniteControlsHint {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
#infiniteArena .infinite-readout:has(#infiniteStatus[hidden]) {
  flex-basis: 0;
}
#infiniteArena .infinite-underbar:has(#infiniteStatus[hidden]) {
  column-gap: 0;
}
@media (min-width: 760px) {
  #infiniteArena > .infinite-underbar .local-loadouts {
    min-height: 0;
  }
  #infiniteLoadouts .pilot-loadout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    grid-template-rows: minmax(30px, auto) 12px;
    align-items: center;
    gap: 2px 10px;
  }
  #infiniteLoadouts .pilot-loadout .cooldown-line {
    grid-column: 1 / -1;
  }
}

#matchHeaderToggle {
  display: none;
}
body:is(.infinity-header-active, :not(.boji-home, .overlay-open, .room-setup)) #matchHeaderToggle {
  display: grid;
}
body.match-header-collapsed:is(.infinity-header-active, :not(.boji-home, .overlay-open, .room-setup)) #gameHeader {
  position: fixed;
  inset: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) auto auto;
  z-index: 10;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
body.match-header-collapsed:is(.infinity-header-active, :not(.boji-home, .overlay-open, .room-setup))
  #gameHeader > :not(.header-right),
body.match-header-collapsed:is(.infinity-header-active, :not(.boji-home, .overlay-open, .room-setup))
  #gameHeader .header-right > :not(#matchHeaderToggle),
body.match-header-collapsed:not(.boji-home, .overlay-open, .room-setup)
  .arena-shell > :is(.arena-bar, #objectiveBar),
body.match-header-collapsed.infinity-header-active
  #infiniteArena > :is(#infiniteStatusbar, .infinite-underbar) {
  display: none;
}
body.match-header-collapsed.infinity-header-active #infiniteHeader {
  padding: 0;
}
body.match-header-collapsed #matchHeaderToggle {
  background: var(--surface-raised);
}
#matchHeaderToggle[aria-expanded="false"] svg {
  transform: rotate(180deg);
}


#joinDialog[data-home-join] :is(.eyebrow, [for="pilotName"], #pilotName, #pilotNameStatus, [data-account-seat], #guestRoomInviteField) {
  display: none;
}
#joinDialog[data-home-join] .join-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#joinDialog[data-home-join] .join-dialog-actions > button {
  margin: 0;
}


:is(#fullscreenBtn, #infiniteFullscreenBtn)[aria-busy="true"] {
  cursor: wait;
  opacity: .6;
}
