* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  color: #f5eadb;
  background:
    radial-gradient(circle at top, rgba(255, 174, 66, 0.18), transparent 35%),
    linear-gradient(135deg, #15100c, #2b1a10);
}

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.scoreboard-page {
  align-items: flex-start;
}

.card {
  width: 100%;
  max-width: 520px;
  padding: 24px;
  border: 2px solid #9d6b34;
  border-radius: 18px;
  background: rgba(20, 14, 10, 0.92);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.wide-card {
  max-width: 1000px;
}

h1,
h2 {
  margin-top: 0;
  color: #ffbd62;
}

label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: bold;
}

input,
select,
button {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-size: 1rem;
}

input,
select,
textarea {
  background: #f5eadb;
  border: 2px solid #9d6b34;
  color: #1f140c;
}

textarea {
  width: 100%;
  border-radius: 10px;
  padding: 12px;
  font: inherit;
}

button,
.button-link {
  display: inline-block;
  margin-top: 16px;
  border: none;
  background: #c8792f;
  color: #fff8ed;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  background: #e08d3b;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.secondary,
.secondary-link {
  background: #4d3a2a;
}

.secondary:hover,
.secondary-link:hover {
  background: #6b4d35;
}

.danger-button {
  background: #9d2f2f;
}

.danger-button:hover {
  background: #c13b3b;
}

.status {
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  line-height: 1.5;
}

.success {
  background: rgba(76, 175, 80, 0.2);
  border: 1px solid rgba(76, 175, 80, 0.7);
}

.error {
  background: rgba(244, 67, 54, 0.2);
  border: 1px solid rgba(244, 67, 54, 0.7);
}

.success-text {
  color: #8ef58e;
}

.error-text {
  color: #ff8c7f;
}

.muted {
  color: #cdb99f;
}

.hidden {
  display: none !important;
}

hr {
  margin: 24px 0;
  border: none;
  border-top: 1px solid rgba(255, 189, 98, 0.25);
}

a,
.big-link {
  color: #ffbd62;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button-row .button-link {
  flex: 1;
}

/* Scoreboard/player pages */
.teams {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.team-card,
.tag-card,
.event-card,
.objective-card {
  padding: 16px;
  border: 1px solid rgba(255, 189, 98, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.team-card h2 {
  margin-bottom: 8px;
}

.score {
  color: #ffbd62;
  font-size: 4rem;
  font-weight: bold;
}

.tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.tag-card span,
.event-card span,
.objective-card span {
  display: block;
  margin-top: 4px;
  color: #cdb99f;
}

.events,
.objective-list {
  display: grid;
  gap: 10px;
}

.objective-list {
  margin-top: 16px;
}

.objective-card {
  gap: 12px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  line-height: 1.3;
}

.checkbox-row input {
  width: auto;
  transform: scale(1.2);
}

.capture-button {
  margin-top: 0;
  min-height: 58px;
  user-select: none;
  touch-action: none;
}

.capture-button.holding {
  background: #b9422f;
}

.capture-progress {
  min-height: 22px;
  color: #cdb99f;
  line-height: 1.4;
}

/* Admin layout */
.admin-page .wide-card {
  max-width: 1180px;
}

.admin-card {
  margin-bottom: 40px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.admin-header h1 {
  margin: 0;
  line-height: 1.1;
}

.admin-nav {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 0;
}

.admin-nav .button-link {
  min-width: 130px;
  margin-top: 0;
}

.admin-section h3 {
  margin-top: 24px;
  color: #ffbd62;
}

.admin-grid {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.three-col {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.four-col {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.compact-checks label {
  margin-top: 0;
}

.admin-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 20px;
}

.admin-item {
  padding: 14px;
  border: 1px solid rgba(255, 189, 98, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  line-height: 1.35;
}

.admin-item span {
  display: block;
  margin-top: 4px;
  color: #cdb99f;
  word-break: break-word;
}

.admin-item-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.readonly-input {
  opacity: 0.65;
  cursor: not-allowed;
  background: rgba(196, 196, 196, 0.685);
}

/* Admin tabs */
.admin-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0 18px;
  padding: 10px;
  border: 1px solid rgba(255, 189, 98, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.admin-tab-button {
  margin-top: 0;
  border: 1px solid rgba(255, 189, 98, 0.28);
  background: #4d3a2a;
  white-space: nowrap;
}

.admin-tab-button:hover {
  background: #6b4d35;
}

.admin-tab-button.active {
  background: #c8792f;
  box-shadow: 0 0 0 2px rgba(255, 189, 98, 0.18) inset;
}

.admin-tab-button.disabled-tab,
.admin-tab-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

.admin-tab-panel .admin-section + .admin-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 189, 98, 0.25);
}

.sub-tab-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.sub-tab-button {
  flex: 1;
  width: auto;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-color, #f5f5f5);
  cursor: pointer;
}

.sub-tab-button.active {
  border-color: rgba(255, 210, 80, 0.75);
  background: rgba(255, 210, 80, 0.18);
}

.sub-tab-panel {
  display: none;
}

.sub-tab-panel.active {
  display: block;
}

.nested-admin-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

/* Admin buttons */
.mini-button {
  width: auto;
  margin-top: 0;
  padding: 8px 10px;
  font-size: 0.85rem;
}

.compact-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.compact-buttons .mini-button {
  width: auto;
  margin-top: 0;
}

.admin-section > .button-row,
.admin-section .button-row:not(.compact-buttons) {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.admin-section > .button-row button,
.admin-section .button-row:not(.compact-buttons) button,
.admin-section > .button-row .button-link,
.admin-section .button-row:not(.compact-buttons) .button-link {
  width: 100%;
  margin-top: 0;
}

.admin-section .button-row.compact-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Status row and Ready button */
.admin-status-row {
  display: grid;
  grid-template-columns: minmax(0, 2.8fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-top: 18px;
}

.admin-status-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 210, 100, 0.28);
  border-radius: 14px;
  background:
    radial-gradient(circle at top left, rgba(255, 210, 100, 0.13), transparent 38%),
    rgba(0, 0, 0, 0.32);
}

.admin-status-row .admin-status-card {
  height: 100%;
  min-height: 104px;
  margin: 0;
  box-sizing: border-box;
}

.admin-status-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

.admin-status-title {
  margin-top: 2px;
  font-size: 1.05rem;
  font-weight: 700;
}

.admin-status-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  white-space: nowrap;
}

.status-pill-good {
  border-color: rgba(100, 255, 150, 0.55);
  background: rgba(100, 255, 150, 0.14);
}

.status-pill-waiting {
  border-color: rgba(255, 210, 100, 0.6);
  background: rgba(255, 210, 100, 0.14);
}

.status-pill-paused {
  border-color: rgba(120, 180, 255, 0.6);
  background: rgba(120, 180, 255, 0.14);
}

.status-pill-ended {
  border-color: rgba(255, 120, 120, 0.6);
  background: rgba(255, 120, 120, 0.14);
}

.ready-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 104px;
  margin: 0;
  padding: 0 22px;
  border: 1px solid rgba(130, 255, 160, 0.8);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(75, 220, 110, 0.95), rgba(30, 150, 65, 0.95));
  box-sizing: border-box;
  box-shadow: 0 0 18px rgba(70, 255, 120, 0.18);
  color: #071b0c;
  font-size: 1.1rem;
  font-weight: 900;
}

.ready-button:hover {
  border-color: rgba(170, 255, 190, 1);
  background: linear-gradient(180deg, rgba(95, 245, 130, 1), rgba(40, 175, 75, 1));
  box-shadow: 0 0 24px rgba(70, 255, 120, 0.32);
}

/* Map */
.map-panel {
  width: 100%;
}

.address-grid {
  grid-template-columns: 1fr auto auto;
  align-items: end;
}

.address-grid button {
  margin-top: 0;
}

.admin-map,
#adminMap {
  width: 100%;
  height: 620px;
  min-height: 620px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin-top: 14px;
  border: 2px solid #9d6b34;
  border-radius: 14px;
  background: #203526;
}

.map-help {
  margin-top: 10px;
}

.map-status {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #cdb99f;
}

.map-status:empty {
  display: none;
}

.map-status.success {
  border: 1px solid rgba(76, 175, 80, 0.7);
  color: #8ef58e;
}

.map-status.error {
  border: 1px solid rgba(244, 67, 54, 0.7);
  color: #ff8c7f;
}

.map-loading-message,
.map-unavailable {
  padding: 24px;
  color: #cdb99f;
  line-height: 1.5;
}

.map-unavailable {
  color: #ff8c7f;
}

.map-div-icon {
  background: transparent;
  border: none;
}

.map-vertex-pin,
.boundary-marker {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #1f140c;
  border-radius: 999px;
  background: #ffbd62;
  color: #1f140c;
  font-size: 13px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.map-objective-pin,
.map-draft-objective-pin,
.map-you-pin,
.objective-marker {
  width: 26px;
  height: 26px;
  border: 3px solid #1f140c;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.map-objective-pin {
  background: #e05a3b;
}

.map-draft-objective-pin {
  width: 30px;
  height: 30px;
  background: #4caf50;
  border-color: #f5eadb;
}

.map-you-pin {
  width: 28px;
  height: 28px;
  background: #62b7ff;
  border-color: #f5eadb;
}

.objective-marker {
  display: grid;
  place-items: center;
  background: #63e66d;
  color: #102211;
  font-weight: bold;
}

/* Leaflet hardening/fallbacks if external Leaflet CSS is blocked. */
.leaflet-container,
#adminMap.leaflet-container,
.admin-map .leaflet-container {
  width: 100% !important;
  height: 100% !important;
  min-height: 620px !important;
  overflow: hidden;
  position: relative;
  outline-style: none;
  background: #203526 !important;
  font-family: Arial, sans-serif;
}

.leaflet-pane,
.leaflet-map-pane,
.leaflet-tile-pane,
.leaflet-overlay-pane,
.leaflet-marker-pane,
.leaflet-shadow-pane,
.leaflet-tooltip-pane,
.leaflet-popup-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  user-select: none;
  -webkit-user-drag: none;
}

.leaflet-container img,
.leaflet-container .leaflet-tile,
#adminMap .leaflet-tile {
  max-width: none !important;
  max-height: none !important;
}

.leaflet-container .leaflet-tile,
.leaflet-tile {
  width: 256px;
  height: 256px;
}

.leaflet-control-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

.leaflet-control-container .leaflet-top,
.leaflet-control-container .leaflet-bottom,
.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }

.leaflet-control {
  position: relative;
  z-index: 1000;
  clear: both;
  float: left;
  pointer-events: auto;
}

.leaflet-top .leaflet-control { margin-top: 10px; }
.leaflet-left .leaflet-control { margin-left: 10px; }
.leaflet-right .leaflet-control { margin-right: 10px; }
.leaflet-bottom .leaflet-control { margin-bottom: 10px; }

.leaflet-control-zoom {
  margin: 12px;
}

.leaflet-control-zoom a,
.admin-map .leaflet-control-zoom a,
#adminMap .leaflet-control-zoom a {
  display: block;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #999;
  border-radius: 0;
  background: #f5eadb;
  color: #1f140c;
  line-height: 34px;
  text-align: center;
  text-decoration: none;
}

.leaflet-control-attribution {
  padding: 4px 8px;
  background: rgba(245, 234, 219, 0.85);
  color: #1f140c;
  font-size: 11px;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border: 1px solid #9d6b34;
  background: #1f140c;
  color: #f5eadb;
}

.leaflet-container a {
  color: #c8792f;
}

.leaflet-zoom-animated {
  transform-origin: 0 0;
}

.leaflet-interactive {
  cursor: pointer;
}

/* Join lobby */
.join-lobby-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 16px;
  align-items: start;
}

.join-qr-card,
.join-player-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
}

.join-qr-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.join-qr-image {
  width: 260px;
  height: 260px;
  padding: 8px;
  border-radius: 10px;
  background: white;
  image-rendering: pixelated;
}

.join-lobby-start-row {
  width: 100%;
  margin-top: 18px;
}

.join-lobby-start-row button {
  width: 100%;
}

.join-player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.join-player-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
}

.fallback-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 210, 100, 0.4);
  background: rgba(255, 210, 100, 0.2);
  font-weight: bold;
}

/* Login/profile */
.login-card {
  max-width: 460px;
  margin: 0 auto;
}

.profile-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  margin-top: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 210, 100, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transform: translateY(-2px);
}

.profile-icon-button:hover {
  border-color: rgba(255, 210, 100, 0.95);
  background: rgba(255, 210, 100, 0.14);
}

.profile-icon-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-icon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.9;
}

.profile-fallback-svg {
  width: 24px;
  height: 24px;
  fill: rgba(255, 255, 255, 0.85);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.profile-modal {
  width: min(720px, 96vw);
  max-height: 92vh;
  overflow: auto;
}

.profile-avatar-preview-row {
  margin-top: 10px;
}

.profile-avatar-preview {
  display: none;
  width: 96px;
  height: 96px;
  border: 2px solid rgba(255, 210, 100, 0.6);
  border-radius: 999px;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 800px) {
  .admin-section > .button-row,
  .admin-section .button-row:not(.compact-buttons) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-status-row,
  .address-grid,
  .join-lobby-layout {
    grid-template-columns: 1fr;
  }

  .admin-map,
  #adminMap,
  .leaflet-container,
  #adminMap.leaflet-container,
  .admin-map .leaflet-container {
    height: 420px;
    min-height: 420px !important;
  }

  .ready-button {
    min-height: 56px;
  }
}

@media (max-width: 700px) {
  .admin-header {
    display: block;
  }

  .admin-nav {
    margin-top: 12px;
  }
}

@media (max-width: 600px) {
  .page {
    align-items: flex-start;
    padding: 12px;
  }

  .card {
    padding: 18px;
  }

  .score {
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .admin-section > .button-row,
  .admin-section .button-row:not(.compact-buttons) {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .admin-tabs {
    grid-template-columns: 1fr;
  }
}


.ready-requirements-panel {
  margin: 12px 0 16px;
}

.ready-requirements {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 189, 98, 0.45);
  background: rgba(0, 0, 0, 0.18);
}

.ready-requirements strong {
  display: block;
  margin-bottom: 6px;
  color: #ffbd62;
}

.ready-requirements ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.ready-requirements li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.requirement-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex: 0 0 22px;
}

.requirement-met .requirement-icon {
  background: rgba(76, 175, 80, 0.22);
  color: #8ee68e;
  border: 1px solid rgba(76, 175, 80, 0.7);
}

.requirement-missing .requirement-icon {
  background: rgba(255, 189, 98, 0.18);
  color: #ffbd62;
  border: 1px solid rgba(255, 189, 98, 0.7);
}

.ready-requirements-ok {
  border-color: rgba(76, 175, 80, 0.65);
}

.ready-requirements-warning {
  border-color: rgba(255, 189, 98, 0.5);
}

.ready-requirements-locked {
  border-color: rgba(98, 183, 255, 0.55);
}

.ready-requirements-locked span {
  color: rgba(245, 234, 219, 0.78);
}


.danger-outline-button {
  background: rgba(157, 47, 47, 0.28);
  border: 1px solid rgba(255, 140, 127, 0.65);
  color: #fff8ed;
}

.danger-outline-button:hover {
  background: rgba(193, 59, 59, 0.55);
}

.join-lobby-start-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.join-lobby-start-row button {
  width: 100%;
}


.profile-modal {
  position: relative;
  width: min(560px, 96vw);
  max-height: none;
  overflow: visible;
  padding: 18px 24px 16px;
}

.profile-modal h2 {
  margin: 0 42px 12px 0;
}

.profile-modal h3 {
  margin: 10px 0 6px;
}

.profile-modal label {
  margin-bottom: 8px;
}

.profile-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border: 1px solid rgba(255, 210, 100, 0.45);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text, #ffffff);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.profile-modal-close:hover {
  border-color: rgba(255, 210, 100, 0.9);
  background: rgba(255, 210, 100, 0.18);
}

.profile-avatar-picker-section {
  margin-top: 10px;
}

.profile-avatar-grid {
  display: grid;
  grid-template-columns: repeat(10, 38px);
  gap: 6px;
  max-height: 190px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
  border: 1px solid rgba(255, 210, 100, 0.35);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 210, 100, 0.85) rgba(0, 0, 0, 0.25);
}

.profile-avatar-grid::-webkit-scrollbar {
  width: 10px;
}

.profile-avatar-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
}

.profile-avatar-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(255, 210, 100, 0.85),
    rgba(255, 92, 180, 0.75)
  );
  border: 2px solid rgba(0, 0, 0, 0.35);
  border-radius: 999px;
}

.profile-avatar-option {
  width: 38px;
  height: 38px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 999px;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
}

.profile-avatar-option.selected {
  border-color: rgba(255, 210, 100, 0.95);
  box-shadow: 0 0 0 2px rgba(255, 210, 100, 0.18);
}

.sprite-avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background-repeat: no-repeat;
  background-color: rgba(0, 0, 0, 0.18);
}

.profile-avatar-sprite {
  width: 36px;
  height: 36px;
}

.profile-icon-sprite {
  width: 38px;
  height: 38px;
}

.join-player-avatar.sprite-avatar,
.join-player-avatar.sprite-player-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  max-width: 42px;
  max-height: 42px;
  flex: 0 0 42px;
  display: inline-block;
  overflow: hidden;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-actions button {
  width: 100%;
}


.profile-avatar-current-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 12px;
  padding: 10px;
  border: 1px solid rgba(255, 210, 100, 0.28);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
}

.profile-avatar-current-preview {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  border: 2px solid rgba(255, 210, 100, 0.65);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.24);
}

.profile-avatar-current-sprite {
  width: 72px;
  height: 72px;
}


/* Big mode-aware scoreboard display */
.scoreboard-display-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 189, 98, 0.14), transparent 30%),
    radial-gradient(circle at 85% 5%, rgba(98, 183, 255, 0.12), transparent 25%),
    linear-gradient(135deg, #090705, #16100c 45%, #070606);
  overflow: hidden;
}

.scoreboard-display {
  min-height: 100vh;
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}

.scoreboard-display-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border: 2px solid rgba(255, 189, 98, 0.42);
  border-radius: 20px;
  background: rgba(20, 14, 10, 0.86);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
}

.scoreboard-display-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.8rem);
  line-height: 0.95;
}

.scoreboard-display-header p {
  margin: 6px 0 0;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.scoreboard-clock {
  min-width: 190px;
  padding: 10px 18px;
  border-radius: 16px;
  border: 2px solid rgba(255, 189, 98, 0.65);
  background: rgba(0, 0, 0, 0.38);
  color: #ffbd62;
  font-size: clamp(2.2rem, 5vw, 5.4rem);
  font-weight: 900;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.scoreboard-content {
  min-height: 0;
  display: grid;
  gap: 14px;
}

.team-elimination-score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.team-score-panel {
  border-radius: 20px;
  border: 2px solid rgba(255, 189, 98, 0.35);
  background: rgba(20, 14, 10, 0.82);
  padding: 14px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.team-score-red {
  border-color: rgba(224, 90, 59, 0.72);
  box-shadow: 0 0 24px rgba(224, 90, 59, 0.12);
}

.team-score-blue {
  border-color: rgba(98, 183, 255, 0.72);
  box-shadow: 0 0 24px rgba(98, 183, 255, 0.12);
}

.team-score-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  color: #f5eadb;
  font-size: clamp(1.2rem, 2vw, 2.1rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.team-score-status {
  color: #cdb99f;
  font-size: clamp(0.85rem, 1.2vw, 1.15rem);
  font-weight: 700;
}

.team-score-box {
  display: grid;
  place-items: center;
  min-height: 120px;
  border-radius: 18px;
  background:
    radial-gradient(circle at center, rgba(255, 189, 98, 0.18), transparent 62%),
    rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 189, 98, 0.28);
}

.team-score-box span {
  font-size: clamp(4.2rem, 10vw, 10rem);
  line-height: 0.82;
  font-weight: 1000;
  color: #fff8ed;
  text-shadow: 0 0 20px rgba(255, 189, 98, 0.28);
}

.team-score-box small {
  color: #ffbd62;
  font-size: clamp(0.9rem, 1.4vw, 1.2rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.team-player-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  max-height: 27vh;
  overflow: auto;
  padding-right: 4px;
}

.team-player-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.team-player-row.dead {
  opacity: 0.62;
  background: rgba(80, 80, 80, 0.16);
}

.team-player-main {
  display: grid;
  gap: 2px;
}

.team-player-main strong {
  color: #fff8ed;
  font-size: clamp(0.9rem, 1.3vw, 1.15rem);
}

.team-player-main span {
  color: #cdb99f;
  font-size: clamp(0.76rem, 1vw, 0.95rem);
}

.team-player-status {
  min-width: 72px;
  padding: 5px 8px;
  border-radius: 999px;
  text-align: center;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  background: rgba(76, 175, 80, 0.18);
  color: #8ef58e;
  border: 1px solid rgba(76, 175, 80, 0.42);
}

.team-player-row.dead .team-player-status {
  background: rgba(157, 47, 47, 0.24);
  color: #ff8c7f;
  border-color: rgba(244, 67, 54, 0.55);
}

.team-elimination-main-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(310px, 0.75fr);
  gap: 14px;
}

.scoreboard-map-card,
.scoreboard-events-card {
  min-height: 0;
  border-radius: 20px;
  border: 2px solid rgba(255, 189, 98, 0.28);
  background: rgba(20, 14, 10, 0.78);
  padding: 14px;
}

.scoreboard-section-title {
  margin-bottom: 10px;
  color: #ffbd62;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scoreboard-map-wrap {
  height: calc(100vh - 405px);
  min-height: 330px;
}

.scoreboard-map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.map-background {
  fill: rgba(0, 0, 0, 0.34);
  stroke: rgba(255, 189, 98, 0.16);
  stroke-width: 2;
}

.map-zone-polygon {
  fill: rgba(255, 189, 98, 0.12);
  stroke: rgba(255, 189, 98, 0.45);
  stroke-width: 3;
}

.map-zone-outline {
  fill: none;
  stroke: rgba(255, 248, 237, 0.55);
  stroke-width: 2;
  stroke-dasharray: 10 8;
}

.map-player circle {
  stroke: #fff8ed;
  stroke-width: 3;
  fill: #ffbd62;
  filter: drop-shadow(0 0 8px rgba(255, 189, 98, 0.72));
}

.map-player-red circle {
  fill: #e05a3b;
  filter: drop-shadow(0 0 10px rgba(224, 90, 59, 0.85));
}

.map-player-blue circle {
  fill: #62b7ff;
  filter: drop-shadow(0 0 10px rgba(98, 183, 255, 0.85));
}

.map-player.dead circle {
  fill: #777;
  opacity: 0.65;
  filter: none;
}

.map-player text {
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.85);
  stroke-width: 5;
  fill: #fff8ed;
  font-size: 22px;
  font-weight: 900;
  text-anchor: middle;
}

.scoreboard-event-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 420px);
  overflow: hidden;
}

.scoreboard-event-row {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.scoreboard-event-row strong {
  color: #ffbd62;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scoreboard-event-row span {
  color: #f5eadb;
  line-height: 1.25;
}

.scoreboard-loading,
.scoreboard-error,
.scoreboard-map-empty,
.scoreboard-empty-list {
  display: grid;
  place-items: center;
  min-height: 200px;
  color: #cdb99f;
  border: 1px dashed rgba(255, 189, 98, 0.32);
  border-radius: 16px;
}

.generic-scoreboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

@media (max-width: 900px) {
  .scoreboard-display-body {
    overflow: auto;
  }

  .scoreboard-display-header,
  .team-elimination-score-grid,
  .team-elimination-main-grid {
    grid-template-columns: 1fr;
  }

  .scoreboard-display-header {
    display: grid;
  }

  .scoreboard-clock {
    width: 100%;
  }

  .scoreboard-map-wrap {
    height: 360px;
  }
}


/* Scoreboard theme + fit pass */
.scoreboard-display-body {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.scoreboard-display {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  padding: clamp(8px, 1.2vw, 16px);
  grid-template-rows: auto 1fr;
  gap: clamp(8px, 1vw, 12px);
  overflow: hidden;
}

.scoreboard-display-header {
  min-height: 0;
  padding: clamp(8px, 1vw, 14px) clamp(12px, 1.4vw, 18px);
  background: var(--score-card-bg, rgba(20, 14, 10, 0.78));
  border-color: var(--score-border, rgba(255, 189, 98, 0.42));
}

.scoreboard-display-header h1 {
  font-size: clamp(1.7rem, 3.4vw, 4rem);
}

.scoreboard-display-header p {
  font-size: clamp(0.85rem, 1.15vw, 1.15rem);
}

.scoreboard-clock {
  min-width: clamp(130px, 15vw, 190px);
  padding: clamp(6px, 0.8vw, 10px) clamp(10px, 1vw, 18px);
  font-size: clamp(1.8rem, 4.1vw, 4.8rem);
  background: rgba(0, 0, 0, 0.34);
  border-color: var(--score-border-strong, rgba(255, 189, 98, 0.65));
  color: var(--score-accent, #ffbd62);
}

.scoreboard-content {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.team-elimination-score-grid {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(8px, 1vw, 12px);
}

.team-score-panel {
  min-height: 0;
  padding: clamp(8px, 1vw, 12px);
  background: var(--score-card-bg, rgba(20, 14, 10, 0.72));
  border-color: var(--score-border, rgba(255, 189, 98, 0.35));
}

.team-score-heading {
  margin-bottom: 6px;
  font-size: clamp(0.95rem, 1.45vw, 1.65rem);
}

.team-score-status {
  font-size: clamp(0.72rem, 0.95vw, 1rem);
}

.team-score-box {
  min-height: clamp(66px, 10vh, 118px);
  border-color: var(--score-border-soft, rgba(255, 189, 98, 0.24));
}

.team-score-box span {
  font-size: clamp(3rem, 7.6vw, 8rem);
}

.team-score-box small {
  font-size: clamp(0.72rem, 0.9vw, 1rem);
}

.team-player-list {
  margin-top: 8px;
  gap: 5px;
  max-height: clamp(96px, 18vh, 190px);
  overflow: hidden;
}

.team-player-row {
  padding: clamp(5px, 0.6vw, 8px) clamp(7px, 0.8vw, 10px);
  border-color: var(--score-border-soft, rgba(255, 255, 255, 0.08));
}

.team-player-main strong {
  font-size: clamp(0.72rem, 1vw, 1rem);
}

.team-player-main span {
  font-size: clamp(0.64rem, 0.82vw, 0.86rem);
}

.team-player-status {
  min-width: clamp(54px, 5.5vw, 72px);
  padding: 3px 6px;
  font-size: clamp(0.62rem, 0.8vw, 0.78rem);
}

.team-elimination-main-grid {
  min-height: 0;
  height: 100%;
  grid-template-columns: minmax(0, 2.35fr) minmax(250px, 0.7fr);
  gap: clamp(8px, 1vw, 12px);
}

.scoreboard-map-card,
.scoreboard-events-card {
  min-height: 0;
  height: 100%;
  padding: clamp(8px, 1vw, 12px);
  background: var(--score-card-bg, rgba(20, 14, 10, 0.70));
  border-color: var(--score-border, rgba(255, 189, 98, 0.28));
  overflow: hidden;
}

.scoreboard-section-title {
  margin-bottom: 6px;
  font-size: clamp(0.78rem, 1vw, 1rem);
  color: var(--score-accent, #ffbd62);
}

.scoreboard-map-wrap {
  height: calc(100% - 28px);
  min-height: 0;
}

.scoreboard-map-svg {
  max-height: 100%;
}

.scoreboard-event-list {
  max-height: calc(100% - 28px);
  overflow: hidden;
  gap: 6px;
}

.scoreboard-event-row {
  padding: 7px 8px;
}

.scoreboard-event-row strong {
  font-size: clamp(0.58rem, 0.76vw, 0.74rem);
  color: var(--score-accent, #ffbd62);
}

.scoreboard-event-row span {
  font-size: clamp(0.68rem, 0.9vw, 0.92rem);
}

.scoreboard-display .muted {
  color: var(--score-muted, #cdb99f) !important;
}

/* Theme bridge: most existing themes style cards/buttons, but the big scoreboard uses custom classes. */
html body.scoreboard-display-body {
  color: var(--score-text, inherit);
}

body.scoreboard-display-body .scoreboard-display-header,
body.scoreboard-display-body .team-score-panel,
body.scoreboard-display-body .scoreboard-map-card,
body.scoreboard-display-body .scoreboard-events-card {
  backdrop-filter: blur(2px);
}

/* Theme-specific scoreboard variables */
body.scoreboard-display-body {
  --score-text: #f5eadb;
  --score-muted: #cdb99f;
  --score-accent: #ffbd62;
  --score-border: rgba(255, 189, 98, 0.36);
  --score-border-strong: rgba(255, 189, 98, 0.68);
  --score-border-soft: rgba(255, 189, 98, 0.18);
  --score-card-bg: rgba(20, 14, 10, 0.72);
}

html:has(link[href*="alien-invasion"]) body.scoreboard-display-body,
body.scoreboard-display-body:has(+ *) {
}

html body.scoreboard-display-body {
  color: var(--ai-text, var(--ca-text, var(--cc-text, var(--score-text))));
}

html body.scoreboard-display-body .scoreboard-display-header,
html body.scoreboard-display-body .team-score-panel,
html body.scoreboard-display-body .scoreboard-map-card,
html body.scoreboard-display-body .scoreboard-events-card {
  background:
    linear-gradient(180deg, rgba(20, 14, 10, 0.64), rgba(8, 7, 6, 0.70));
}

body.scoreboard-display-body.theme-bright .scoreboard-display-header,
body.scoreboard-display-body.theme-bright .team-score-panel,
body.scoreboard-display-body.theme-bright .scoreboard-map-card,
body.scoreboard-display-body.theme-bright .scoreboard-events-card {
  background: rgba(255, 255, 255, 0.72);
  color: #1f1740;
}

@media (max-width: 900px) {
  .scoreboard-display-body {
    overflow: auto;
  }

  .scoreboard-display {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .scoreboard-content,
  .team-elimination-main-grid {
    height: auto;
    overflow: visible;
  }

  .team-player-list,
  .scoreboard-event-list {
    max-height: none;
    overflow: visible;
  }
}



/* === Scoreboard layout redesign (mockup-based) === */
.scoreboard-display-body {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  color: var(--score-text, #f6f1e7);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 189, 98, 0.12), transparent 28%),
    radial-gradient(circle at 85% 8%, rgba(98, 183, 255, 0.10), transparent 25%),
    linear-gradient(135deg, #100c08, #17110d 52%, #0c0a09);
  --score-text: #f6f1e7;
  --score-muted: #d2bfaa;
  --score-accent: #ffbd62;
  --score-card-bg: rgba(16, 12, 10, 0.82);
  --score-card-bg-soft: rgba(16, 12, 10, 0.74);
  --score-border: rgba(255, 189, 98, 0.42);
  --score-border-strong: rgba(255, 189, 98, 0.76);
  --score-red: #e05a3b;
  --score-blue: #62b7ff;
}

.scoreboard-display {
  width: 100vw;
  height: 100vh;
  padding: 12px;
  overflow: hidden;
}

.scoreboard-content {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.team-elimination-board {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  grid-template-rows: 148px minmax(0, 1fr) 54px;
  grid-template-areas:
    "redScore status blueScore"
    "redRoster map blueRoster"
    ". events .";
  gap: 12px 14px;
}

.score-box-card,
.round-status-card,
.team-roster-card,
.scoreboard-map-card,
.scoreboard-event-strip {
  border: 3px solid var(--score-border);
  border-radius: 34px;
  background: var(--score-card-bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.score-box-card {
  position: relative;
  overflow: visible;
  display: grid;
  place-items: center;
  padding: 14px;
  text-align: center;
}

.score-box-card.score-box-winner {
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.28),
    0 0 0 3px color-mix(in srgb, #ffd86b 42%, transparent),
    0 0 38px color-mix(in srgb, #ffd86b 28%, transparent);
}

.score-box-card.score-box-winner::before {
  content: "👑";
  position: absolute;
  top: 10px;
  left: 6px;
  font-size: clamp(1.85rem, 2.6vw, 2.8rem);
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
  transform: rotate(-14deg);
  z-index: 5;
}

.score-box-red { grid-area: redScore; border-color: color-mix(in srgb, var(--score-red) 60%, var(--score-border)); }
.score-box-blue { grid-area: blueScore; border-color: color-mix(in srgb, var(--score-blue) 60%, var(--score-border)); }

.score-box-label {
  color: var(--score-text);
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: none;
}

.score-box-value {
  color: var(--score-accent);
  font-size: clamp(3.6rem, 6vw, 5.6rem);
  line-height: 1;
  font-weight: 1000;
  text-shadow: 0 0 16px rgba(255, 189, 98, 0.22);
}

.score-box-meta {
  color: var(--score-muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.round-status-shell {
  grid-area: status;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 18px;
}

.round-status-card {
  width: 100%;
  min-height: 84px;
  padding: 18px 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}

.round-status-primary {
  color: var(--score-text);
  font-size: clamp(1.35rem, 2.3vw, 2.4rem);
  font-weight: 900;
}

.round-status-secondary {
  color: var(--score-accent);
  font-size: clamp(1rem, 1.6vw, 1.45rem);
  font-weight: 800;
  text-transform: none;
  text-align: right;
}

.round-timer-box {
  position: absolute;
  top: 0;
  min-width: 126px;
  padding: 12px 20px;
  border: 3px solid var(--score-border-strong);
  border-radius: 18px;
  background: var(--score-card-bg);
  color: var(--score-accent);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0.05em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.team-roster-card {
  padding: 14px 14px 16px;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.team-roster-red { grid-area: redRoster; }
.team-roster-blue { grid-area: blueRoster; }

.team-roster-title,
.scoreboard-map-title,
.scoreboard-event-strip-label {
  color: var(--score-text);
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: lowercase;
  text-align: center;
}

.team-roster-title {
  margin-bottom: 12px;
}

.team-roster-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  overflow: hidden;
  align-content: start;
}

.team-roster-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-roster-empty {
  color: var(--score-muted);
  text-align: center;
  padding: 10px;
}

.roster-player-card {
  display: grid;
  gap: 4px;
  padding: 10px 10px 9px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}

.roster-player-card.dead {
  opacity: 0.68;
}

.roster-player-name {
  color: var(--score-text);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.1;
}

.roster-player-stats {
  color: var(--score-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.roster-player-status {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  background: rgba(64, 182, 74, 0.18);
  color: #90f09e;
  border: 1px solid rgba(64, 182, 74, 0.36);
}

.roster-player-card.dead .roster-player-status {
  background: rgba(220, 76, 58, 0.16);
  border-color: rgba(220, 76, 58, 0.36);
  color: #ff9f90;
}

.scoreboard-map-center {
  grid-area: map;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  padding: 14px;
  overflow: hidden;
}

.scoreboard-map-title {
  margin-bottom: 10px;
}

.scoreboard-map-wrap {
  min-height: 0;
  height: 100%;
}

.scoreboard-map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.map-background {
  fill: rgba(0, 0, 0, 0.28);
}

.map-zone-polygon {
  fill: rgba(255, 189, 98, 0.12);
  stroke: rgba(255, 189, 98, 0.42);
  stroke-width: 3;
}

.map-zone-outline {
  fill: none;
  stroke: rgba(255, 248, 237, 0.52);
  stroke-width: 2;
  stroke-dasharray: 10 8;
}

.map-player circle {
  stroke: #fff8ed;
  stroke-width: 3;
  fill: var(--score-accent);
}

.map-player-red circle {
  fill: var(--score-red);
  filter: drop-shadow(0 0 10px rgba(224, 90, 59, 0.85));
}

.map-player-blue circle {
  fill: var(--score-blue);
  filter: drop-shadow(0 0 10px rgba(98, 183, 255, 0.85));
}

.map-player.dead circle {
  fill: #777;
  opacity: 0.7;
  filter: none;
}

.map-player text {
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.85);
  stroke-width: 5;
  fill: #fff8ed;
  font-size: 22px;
  font-weight: 900;
  text-anchor: middle;
}

.scoreboard-event-strip {
  grid-area: events;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 0;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  min-width: 0;
}

.scoreboard-event-strip-content {
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}

.scoreboard-event-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--score-muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scoreboard-event-chip strong {
  color: var(--score-accent);
  text-transform: lowercase;
  font-size: 0.78rem;
}

.scoreboard-loading,
.scoreboard-error,
.scoreboard-map-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--score-muted);
  border: 2px dashed var(--score-border);
  border-radius: 24px;
}

.generic-scoreboard-layout {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
}

.generic-scoreboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border: 3px solid var(--score-border);
  border-radius: 24px;
  background: var(--score-card-bg);
}

.generic-scoreboard-header h1 {
  margin: 0;
  color: var(--score-text);
}

.generic-scoreboard-header p {
  margin: 6px 0 0;
  color: var(--score-muted);
}

.generic-scoreboard-clock {
  color: var(--score-accent);
  font-size: 2rem;
  font-weight: 1000;
}

.generic-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.generic-team-card {
  padding: 18px;
  border: 3px solid var(--score-border);
  border-radius: 24px;
  background: var(--score-card-bg);
}

.generic-team-name {
  color: var(--score-text);
  font-size: 1.2rem;
  font-weight: 900;
}

.generic-team-score {
  color: var(--score-accent);
  font-size: 3.2rem;
  font-weight: 1000;
}

.generic-team-players {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

/* Theme bridge for scoreboard */
body.scoreboard-display-body[data-theme="neon-80s"] {
  --score-accent: #ff4fd8;
  --score-muted: #c8fbff;
  --score-border: rgba(255, 79, 216, 0.50);
  --score-border-strong: rgba(0, 240, 255, 0.85);
  --score-card-bg: rgba(18, 8, 38, 0.82);
  --score-card-bg-soft: rgba(18, 8, 38, 0.72);
}

body.scoreboard-display-body[data-theme="tron-sci-fi"] {
  --score-accent: #62f7ff;
  --score-muted: #b7f8ff;
  --score-border: rgba(98, 247, 255, 0.46);
  --score-border-strong: rgba(98, 247, 255, 0.88);
  --score-card-bg: rgba(5, 17, 32, 0.82);
}

body.scoreboard-display-body[data-theme="zombie-tag"] {
  --score-accent: #8df06b;
  --score-muted: #c4e8b8;
  --score-border: rgba(141, 240, 107, 0.42);
  --score-border-strong: rgba(141, 240, 107, 0.78);
  --score-card-bg: rgba(7, 24, 10, 0.82);
}

body.scoreboard-display-body[data-theme="tactical-camo"] {
  --score-accent: #d4c27a;
  --score-muted: #d2c8a0;
  --score-border: rgba(212, 194, 122, 0.42);
  --score-border-strong: rgba(212, 194, 122, 0.78);
  --score-card-bg: rgba(28, 32, 20, 0.84);
}

body.scoreboard-display-body[data-theme="candy-apocalypse"],
body.scoreboard-display-body[data-theme="cartoon-chaos"],
body.scoreboard-display-body[data-theme="superhero-city"] {
  --score-accent: #ff5599;
  --score-muted: #4f4780;
  --score-border: rgba(33, 28, 67, 0.72);
  --score-border-strong: rgba(33, 28, 67, 0.92);
  --score-card-bg: rgba(255, 255, 255, 0.82);
  --score-text: #2d2148;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 133, 200, 0.16), transparent 28%),
    radial-gradient(circle at 85% 8%, rgba(116, 240, 255, 0.14), transparent 25%),
    linear-gradient(135deg, #fff7fd, #effeff 55%, #fff8f0);
}

@media (max-width: 1200px) {
  .team-elimination-board {
    grid-template-columns: 180px minmax(0, 1fr) 180px;
  }

  .team-roster-grid.two-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .scoreboard-display-body {
    overflow: auto;
  }

  .scoreboard-display {
    height: auto;
    min-height: 100vh;
  }

  .team-elimination-board {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "status"
      "redScore"
      "blueScore"
      "map"
      "redRoster"
      "blueRoster"
      "events";
  }

  .scoreboard-event-strip {
    grid-template-columns: 1fr;
  }

  .scoreboard-event-strip-content {
    flex-wrap: wrap;
    white-space: normal;
  }
}



/* === Scoreboard layout tweak: larger score boxes, wider side columns, theme background === */

/* Let the loaded theme own the page background.
   The scoreboard cards keep their themed panel styling, but the page itself
   no longer forces the old wasteland background over every theme. */
body.scoreboard-display-body {
  background: inherit !important;
}

/* Bigger red/blue score boxes and side player columns.
   Narrower center status/name panel. */
.team-elimination-board {
  grid-template-columns: clamp(270px, 25vw, 360px) minmax(360px, 0.82fr) clamp(270px, 25vw, 360px) !important;
  grid-template-rows: clamp(172px, 21vh, 230px) minmax(0, 1fr) 58px !important;
  gap: 12px 14px !important;
}

.score-box-card {
  padding: clamp(16px, 1.4vw, 24px) !important;
  border-radius: 36px !important;
}

.score-box-label {
  font-size: clamp(1.3rem, 1.8vw, 2rem) !important;
}

.score-box-value {
  font-size: clamp(5.2rem, 9vw, 9.4rem) !important;
}

.score-box-meta {
  font-size: clamp(1rem, 1.2vw, 1.25rem) !important;
}

/* Make the center name/mode box narrower and visually lighter. */
.round-status-shell {
  max-width: 560px;
  width: 100%;
  justify-self: center;
}

.round-status-card {
  min-height: clamp(76px, 10vh, 106px) !important;
  padding: clamp(12px, 1.2vw, 18px) clamp(22px, 2vw, 34px) !important;
  border-radius: 28px !important;
}

.round-status-primary {
  font-size: clamp(1.1rem, 1.75vw, 1.9rem) !important;
}

.round-status-secondary {
  font-size: clamp(0.9rem, 1.2vw, 1.25rem) !important;
}

/* Bigger timer box. */
.round-timer-box {
  min-width: clamp(168px, 16vw, 260px) !important;
  padding: clamp(14px, 1.4vw, 24px) clamp(24px, 2vw, 40px) !important;
  border-radius: 22px !important;
  font-size: clamp(2rem, 4vw, 4.8rem) !important;
  transform: translateY(-8px);
  z-index: 2;
}

/* Player side panels get a little more breathing room now that side columns are wider. */
.team-roster-card {
  border-radius: 34px !important;
}

.team-roster-title {
  font-size: clamp(1.05rem, 1.35vw, 1.4rem) !important;
}

.roster-player-name {
  font-size: clamp(0.86rem, 1vw, 1.05rem) !important;
}

.roster-player-stats {
  font-size: clamp(0.72rem, 0.86vw, 0.92rem) !important;
}

/* Match the bottom corners of the playzone with the top of the event strip.
   The map now has squared-off bottom corners so it visually sits on the events bar. */
.scoreboard-map-center {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.scoreboard-map-card,
.scoreboard-map-wrap,
.scoreboard-map-svg .map-background {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.map-background {
  rx: 28;
}

/* Keep event strip connected to the square-bottom map. */
.scoreboard-event-strip {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

/* Theme-specific body backgrounds.
   These make the scoreboard backdrop follow the selected theme even though
   the scoreboard layout uses custom classes. */
body.scoreboard-display-body[data-theme="default"] {
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 189, 98, 0.12), transparent 28%),
    radial-gradient(circle at 85% 8%, rgba(98, 183, 255, 0.10), transparent 25%),
    linear-gradient(135deg, #100c08, #17110d 52%, #0c0a09) !important;
}

body.scoreboard-display-body[data-theme="neon-80s"] {
  background:
    radial-gradient(circle at 22% 10%, rgba(255, 79, 216, 0.20), transparent 22%),
    radial-gradient(circle at 80% 16%, rgba(0, 240, 255, 0.18), transparent 22%),
    linear-gradient(180deg, #160522 0%, #07020f 100%) !important;
}

body.scoreboard-display-body[data-theme="tron-sci-fi"],
body.scoreboard-display-body[data-theme="laser-tag-arena"] {
  background:
    radial-gradient(circle at 18% 14%, rgba(98, 247, 255, 0.18), transparent 22%),
    radial-gradient(circle at 80% 10%, rgba(40, 110, 255, 0.15), transparent 24%),
    linear-gradient(180deg, #051120 0%, #020611 100%) !important;
}

body.scoreboard-display-body[data-theme="zombie-tag"] {
  background:
    radial-gradient(circle at 20% 10%, rgba(141, 240, 107, 0.16), transparent 22%),
    radial-gradient(circle at 80% 14%, rgba(95, 140, 70, 0.14), transparent 22%),
    linear-gradient(180deg, #07180a 0%, #020803 100%) !important;
}

body.scoreboard-display-body[data-theme="tactical-camo"] {
  background:
    radial-gradient(circle at 20% 10%, rgba(212, 194, 122, 0.12), transparent 24%),
    linear-gradient(135deg, #1c2014 0%, #0b0e08 100%) !important;
}

body.scoreboard-display-body[data-theme="toxic-slime-lab"] {
  background:
    radial-gradient(circle at 20% 10%, rgba(168, 255, 62, 0.18), transparent 24%),
    radial-gradient(circle at 80% 18%, rgba(60, 255, 160, 0.12), transparent 22%),
    linear-gradient(180deg, #081f10 0%, #020804 100%) !important;
}

body.scoreboard-display-body[data-theme="alien-invasion"] {
  background:
    radial-gradient(circle at 24% 12%, rgba(128, 255, 178, 0.14), transparent 18%),
    radial-gradient(circle at 82% 18%, rgba(174, 85, 255, 0.14), transparent 18%),
    linear-gradient(180deg, #141336 0%, #070711 100%) !important;
}

body.scoreboard-display-body[data-theme="candy-apocalypse"] {
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 95, 178, 0.20), transparent 18%),
    radial-gradient(circle at 82% 14%, rgba(89, 228, 255, 0.16), transparent 18%),
    radial-gradient(circle at 72% 82%, rgba(196, 255, 80, 0.14), transparent 20%),
    linear-gradient(180deg, #34113f 0%, #1a1030 100%) !important;
}

body.scoreboard-display-body[data-theme="cartoon-chaos"] {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 215, 74, 0.28), transparent 18%),
    radial-gradient(circle at 80% 20%, rgba(90, 232, 255, 0.24), transparent 18%),
    radial-gradient(circle at 76% 82%, rgba(255, 118, 165, 0.22), transparent 18%),
    linear-gradient(180deg, #7ce7ff 0%, #ffe270 100%) !important;
}

body.scoreboard-display-body[data-theme="superhero-city"] {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 220, 74, 0.22), transparent 20%),
    radial-gradient(circle at 80% 14%, rgba(80, 180, 255, 0.22), transparent 20%),
    linear-gradient(180deg, #193a8a 0%, #0a1432 100%) !important;
}

body.scoreboard-display-body[data-theme="pirate-treasure"] {
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 211, 106, 0.18), transparent 22%),
    linear-gradient(180deg, #2a1508 0%, #100704 100%) !important;
}

body.scoreboard-display-body[data-theme="retro-arcade"] {
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 220, 74, 0.18), transparent 22%),
    radial-gradient(circle at 80% 18%, rgba(255, 77, 205, 0.18), transparent 22%),
    linear-gradient(180deg, #130a30 0%, #05020f 100%) !important;
}

@media (max-width: 1200px) {
  .team-elimination-board {
    grid-template-columns: 230px minmax(300px, 1fr) 230px !important;
  }

  .round-status-shell {
    max-width: 500px;
  }
}

@media (max-width: 900px) {
  .team-elimination-board {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }

  .round-status-shell {
    max-width: none;
  }

  .scoreboard-map-center {
    border-bottom-left-radius: 34px !important;
    border-bottom-right-radius: 34px !important;
  }

  .scoreboard-event-strip {
    border-top-left-radius: 34px !important;
    border-top-right-radius: 34px !important;
  }
}



/* === Scoreboard tweak: make top team boxes tall enough for all score data === */
.team-elimination-board {
  grid-template-rows: clamp(215px, 25vh, 285px) minmax(0, 1fr) 58px !important;
}

.score-box-card {
  align-content: center !important;
  grid-template-rows: auto 1fr auto !important;
  row-gap: clamp(8px, 1vh, 14px) !important;
  min-height: clamp(205px, 24vh, 275px) !important;
  overflow: hidden !important;
}

.score-box-label {
  align-self: end !important;
  line-height: 1.05 !important;
}

.score-box-value {
  align-self: center !important;
  line-height: 0.85 !important;
  margin: 0 !important;
}

.score-box-meta {
  align-self: start !important;
  line-height: 1.15 !important;
  margin: 0 !important;
  padding-bottom: 2px !important;
  white-space: nowrap !important;
}

/* Keep the center status panel balanced against the taller score boxes. */
.round-status-shell {
  align-self: center !important;
  padding-top: clamp(34px, 4.5vh, 58px) !important;
}

.round-timer-box {
  top: 0 !important;
}

@media (max-width: 1200px) {
  .team-elimination-board {
    grid-template-rows: clamp(200px, 23vh, 250px) minmax(0, 1fr) 58px !important;
  }

  .score-box-card {
    min-height: clamp(190px, 22vh, 240px) !important;
  }

  .score-box-value {
    font-size: clamp(4.4rem, 8vw, 7.5rem) !important;
  }
}

@media (max-width: 900px) {
  .team-elimination-board {
    grid-template-rows: auto !important;
  }

  .score-box-card {
    min-height: 190px !important;
  }
}



/* === Scoreboard fullscreen positioning fix from marked mockup === */

/* True full-screen coverage. */
html,
body.scoreboard-display-body {
  width: 100vw !important;
  height: 100vh !important;
  min-width: 100vw !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.scoreboard-display-body::before {
  inset: 0 !important;
}

.scoreboard-display {
  width: 100vw !important;
  height: 100vh !important;
  min-width: 100vw !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: clamp(8px, 0.7vw, 12px) !important;
  overflow: hidden !important;
}

/* New grid:
   left/right rosters span from under score boxes all the way to the bottom.
   events are attached only under the center play-zone area.
*/
.team-elimination-board {
  width: 100% !important;
  height: 100% !important;
  grid-template-columns: clamp(300px, 19.5vw, 390px) minmax(560px, 1fr) clamp(300px, 19.5vw, 390px) !important;
  grid-template-rows: clamp(210px, 22.5vh, 270px) minmax(0, 1fr) clamp(54px, 6vh, 70px) !important;
  grid-template-areas:
    "redScore status blueScore"
    "redRoster map blueRoster"
    "redRoster events blueRoster" !important;
  gap: clamp(8px, 0.8vw, 12px) clamp(10px, 0.9vw, 14px) !important;
}

/* Top score boxes stay large and keep all data inside. */
.score-box-card {
  min-height: 100% !important;
  height: 100% !important;
  padding: clamp(12px, 1.1vw, 22px) !important;
  overflow: hidden !important;
}

.score-box-value {
  font-size: clamp(5.4rem, 8.2vw, 9.2rem) !important;
  line-height: 0.82 !important;
}

.score-box-meta {
  font-size: clamp(1rem, 1.15vw, 1.28rem) !important;
  line-height: 1.1 !important;
}

/* Timer: move it higher and make it the true top-most item. */
.round-status-shell {
  max-width: none !important;
  width: 100% !important;
  height: 100% !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  align-items: center !important;
  padding-top: clamp(42px, 5vh, 66px) !important;
}

.round-timer-box {
  top: 0 !important;
  transform: translateY(-22px) !important;
  min-width: clamp(220px, 18vw, 330px) !important;
  padding: clamp(16px, 1.1vw, 22px) clamp(30px, 2vw, 52px) !important;
  font-size: clamp(2.6rem, 4.3vw, 5.3rem) !important;
  border-radius: 24px !important;
}

/* Title/status bar: wider and centered under timer. */
.round-status-card {
  width: min(100%, 760px) !important;
  justify-self: center !important;
  min-height: clamp(86px, 10.5vh, 120px) !important;
  padding: clamp(14px, 1.2vw, 22px) clamp(34px, 2.2vw, 58px) !important;
  border-radius: 28px !important;
  grid-template-columns: 1fr auto !important;
}

.round-status-primary {
  font-size: clamp(1.35rem, 2.1vw, 2.35rem) !important;
  line-height: 1.08 !important;
}

.round-status-secondary {
  font-size: clamp(1rem, 1.45vw, 1.55rem) !important;
}

/* Player columns now fill all the way down beside the map/events stack. */
.team-roster-card {
  height: 100% !important;
  min-height: 0 !important;
  align-self: stretch !important;
  padding: clamp(12px, 1vw, 18px) !important;
}

.team-roster-red,
.team-roster-blue {
  grid-row: 2 / 4 !important;
}

.team-roster-grid {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Map/events center column fills all available space. */
.scoreboard-map-center {
  height: 100% !important;
  min-height: 0 !important;
  align-self: stretch !important;
  padding: clamp(12px, 0.9vw, 16px) !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.scoreboard-map-wrap {
  height: 100% !important;
  min-height: 0 !important;
}

.scoreboard-map-svg {
  height: 100% !important;
  min-height: 0 !important;
}

.scoreboard-event-strip {
  height: 100% !important;
  min-height: 0 !important;
  align-self: stretch !important;
  padding: clamp(8px, 0.7vw, 12px) clamp(12px, 1vw, 18px) !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

.scoreboard-event-strip-content {
  overflow: hidden !important;
}

/* Remove any extra page-level breathing room from older CSS. */
.scoreboard-content {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Keep responsive fallback usable. */
@media (max-width: 1200px) {
  .team-elimination-board {
    grid-template-columns: 260px minmax(420px, 1fr) 260px !important;
  }

  .round-status-card {
    width: min(100%, 640px) !important;
  }

  .round-timer-box {
    min-width: clamp(190px, 17vw, 270px) !important;
    font-size: clamp(2rem, 3.8vw, 4.5rem) !important;
  }
}

@media (max-width: 900px) {
  html,
  body.scoreboard-display-body {
    overflow: auto !important;
    height: auto !important;
  }

  .scoreboard-display {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  .team-elimination-board {
    height: auto !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    grid-template-areas:
      "status"
      "redScore"
      "blueScore"
      "map"
      "events"
      "redRoster"
      "blueRoster" !important;
  }

  .team-roster-red,
  .team-roster-blue {
    grid-row: auto !important;
  }

  .round-timer-box {
    position: relative !important;
    transform: none !important;
    margin-bottom: 10px;
  }

  .round-status-shell {
    display: grid !important;
    padding-top: 0 !important;
  }

  .round-status-card {
    width: 100% !important;
  }

  .scoreboard-map-center {
    border-bottom-left-radius: 34px !important;
    border-bottom-right-radius: 34px !important;
  }

  .scoreboard-event-strip {
    border-top-left-radius: 34px !important;
    border-top-right-radius: 34px !important;
  }
}



/* === Scoreboard tweak: title bar matches playzone width === */
.round-status-shell {
  width: 100% !important;
  max-width: none !important;
  justify-self: stretch !important;
}

.round-status-card {
  width: 100% !important;
  max-width: none !important;
  justify-self: stretch !important;
}

@media (max-width: 1200px) {
  .round-status-card {
    width: 100% !important;
    max-width: none !important;
  }
}



/* === Scoreboard real map layer: Leaflet / OpenStreetMap === */
.scoreboard-leaflet-map {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.28);
}

.scoreboard-map-center {
  overflow: hidden !important;
}

.scoreboard-map-center .leaflet-container {
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.28);
  filter: saturate(0.92) contrast(1.03) brightness(0.86);
}

.scoreboard-map-center .leaflet-tile-pane {
  opacity: 0.88;
}

.scoreboard-map-center .leaflet-control-container {
  display: none;
}

.leaflet-player-marker {
  position: relative;
  width: 1px !important;
  height: 1px !important;
}

.leaflet-player-marker span {
  position: absolute;
  left: -13px;
  top: -13px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 3px solid #fff8ed;
  background: var(--score-accent, #ffbd62);
  box-shadow: 0 0 12px rgba(255, 189, 98, 0.7);
}

.leaflet-player-marker.red span {
  background: var(--score-red, #e05a3b);
  box-shadow: 0 0 12px rgba(224, 90, 59, 0.9);
}

.leaflet-player-marker.blue span {
  background: var(--score-blue, #62b7ff);
  box-shadow: 0 0 12px rgba(98, 183, 255, 0.9);
}

.leaflet-player-marker.dead span {
  background: #777;
  opacity: 0.72;
  box-shadow: none;
}

.leaflet-player-marker b {
  position: absolute;
  left: 0;
  top: -44px;
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff8ed;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.leaflet-objective-marker {
  position: relative;
  width: 1px !important;
  height: 1px !important;
  z-index: 620 !important;
}

.leaflet-objective-marker span {
  position: absolute;
  left: -16px;
  top: -16px;
  width: 32px;
  height: 32px;
  line-height: 30px;
  text-align: center;
  border-radius: 999px;
  border: 3px solid #fff8ed;
  background: var(--score-accent, #ffbd62);
  color: #140b08;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(255, 189, 98, 0.95);
}

.leaflet-objective-marker.base span {
  border-radius: 8px;
}

.leaflet-objective-marker.red span {
  background: var(--score-red, #e05a3b);
  color: #fff8ed;
}

.leaflet-objective-marker.blue span {
  background: var(--score-blue, #62b7ff);
  color: #071018;
}

.leaflet-objective-marker.carried span {
  animation: objectivePulse 1.1s ease-in-out infinite alternate;
}

.leaflet-objective-marker b {
  position: absolute;
  left: 0;
  top: 24px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.74);
  color: #fff8ed;
  font-size: 13px;
  letter-spacing: 0.03em;
}

@keyframes objectivePulse {
  from { transform: scale(1); }
  to { transform: scale(1.16); }
}


/* The real map touches the events strip, so keep bottom corners square in desktop layout. */
.scoreboard-map-center .scoreboard-leaflet-map,
.scoreboard-map-center .leaflet-container {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

@media (max-width: 900px) {
  .scoreboard-map-center .scoreboard-leaflet-map,
  .scoreboard-map-center .leaflet-container {
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
  }
}



/* === Scoreboard Leaflet no-flash/full-fill fix === */
.scoreboard-map-center {
  min-height: 0 !important;
}

.scoreboard-map-wrap.scoreboard-leaflet-map,
.scoreboard-leaflet-map,
.scoreboard-leaflet-map .leaflet-container {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
}

.scoreboard-leaflet-map .leaflet-pane,
.scoreboard-leaflet-map .leaflet-map-pane,
.scoreboard-leaflet-map .leaflet-tile-pane,
.scoreboard-leaflet-map .leaflet-overlay-pane,
.scoreboard-leaflet-map .leaflet-marker-pane {
  width: 100%;
  height: 100%;
}

.scoreboard-map-center .leaflet-container {
  background: rgba(0, 0, 0, 0.28) !important;
}

.scoreboard-map-center .leaflet-tile {
  will-change: auto;
}



/* === Scoreboard final map/fullscreen fix: map gets the middle height === */

/* This version uses vh-based rows so short/wide windows still give the map
   a real center area instead of letting the top boxes eat the page. */
.team-elimination-board {
  width: 100% !important;
  height: 100% !important;
  grid-template-columns: clamp(300px, 20vw, 400px) minmax(620px, 1fr) clamp(300px, 20vw, 400px) !important;
  grid-template-rows: clamp(130px, 24vh, 230px) minmax(260px, 1fr) clamp(54px, 6vh, 72px) !important;
  grid-template-areas:
    "redScore status blueScore"
    "redRoster map blueRoster"
    "redRoster events blueRoster" !important;
  align-items: stretch !important;
  justify-items: stretch !important;
}

/* Keep the top score boxes readable without forcing the map too short. */
.score-box-card {
  height: 100% !important;
  min-height: 0 !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  padding: clamp(8px, 1vw, 18px) !important;
  row-gap: clamp(4px, 0.7vh, 10px) !important;
}

.score-box-label {
  font-size: clamp(1.15rem, 1.8vw, 1.9rem) !important;
  line-height: 1 !important;
}

.score-box-value {
  font-size: clamp(3.8rem, 8.2vw, 8.8rem) !important;
  line-height: 0.78 !important;
}

.score-box-meta {
  font-size: clamp(0.92rem, 1.1vw, 1.22rem) !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
}

/* Title/timer uses the full center column, but the timer floats above the bar. */
.round-status-shell {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  display: grid !important;
  place-items: center stretch !important;
  padding-top: clamp(42px, 6vh, 76px) !important;
  position: relative !important;
}

.round-status-card {
  width: 100% !important;
  max-width: none !important;
  min-height: clamp(70px, 11vh, 118px) !important;
  height: auto !important;
  align-self: center !important;
}

.round-timer-box {
  top: 0 !important;
  left: 50% !important;
  transform: translate(-50%, -10px) !important;
  min-width: clamp(220px, 18vw, 340px) !important;
  padding: clamp(10px, 1.2vw, 20px) clamp(28px, 2vw, 52px) !important;
  font-size: clamp(2.3rem, 4.8vw, 5.4rem) !important;
}

/* Side player columns must span the map and events rows all the way down. */
.team-roster-red,
.team-roster-blue {
  grid-row: 2 / 4 !important;
}

.team-roster-card {
  height: 100% !important;
  min-height: 0 !important;
  align-self: stretch !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
}

.team-roster-grid {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  align-content: start !important;
}

/* Center column map must fill the whole center row. */
.scoreboard-map-center {
  height: 100% !important;
  min-height: 0 !important;
  align-self: stretch !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
}

.scoreboard-map-title {
  flex: 0 0 auto !important;
}

.scoreboard-map-wrap,
.scoreboard-map-wrap.scoreboard-leaflet-map,
.scoreboard-leaflet-map,
.scoreboard-leaflet-map .leaflet-container {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
}

/* Leaflet absolute panes must be constrained by the full-size map holder. */
.scoreboard-leaflet-map {
  position: relative !important;
  overflow: hidden !important;
}

.scoreboard-leaflet-map .leaflet-container {
  position: relative !important;
}

.scoreboard-event-strip {
  height: 100% !important;
  min-height: 0 !important;
  align-self: stretch !important;
}

/* Very short browser windows still need usable map space. */
@media (max-height: 620px) {
  .team-elimination-board {
    grid-template-rows: clamp(112px, 23vh, 155px) minmax(230px, 1fr) 54px !important;
  }

  .score-box-value {
    font-size: clamp(3.1rem, 7.2vw, 6.4rem) !important;
  }

  .round-timer-box {
    font-size: clamp(2rem, 4vw, 4rem) !important;
    transform: translate(-50%, -8px) !important;
  }

  .round-status-card {
    min-height: 70px !important;
  }
}



/* === Scoreboard hard fullscreen fix: use the full browser height === */

/* Do not let any parent content height decide the scoreboard size.
   This pins the scoreboard grid to the browser window. */
.scoreboard-display-body,
.scoreboard-display,
.scoreboard-content,
#scoreboardApp,
#scoreboardContent {
  width: 100vw !important;
  height: 100vh !important;
  min-width: 100vw !important;
  min-height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* The actual board now fills the screen with only a small safe margin. */
.team-elimination-board {
  position: fixed !important;
  inset: clamp(6px, 0.55vw, 12px) !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;

  display: grid !important;
  grid-template-columns: clamp(300px, 20vw, 410px) minmax(620px, 1fr) clamp(300px, 20vw, 410px) !important;

  /* Top score/title row, large middle map row, bottom events row. */
  grid-template-rows: clamp(150px, 23vh, 250px) minmax(0, 1fr) clamp(54px, 6vh, 74px) !important;

  grid-template-areas:
    "redScore status blueScore"
    "redRoster map blueRoster"
    "redRoster events blueRoster" !important;

  gap: clamp(8px, 0.75vw, 14px) clamp(10px, 0.85vw, 16px) !important;
  align-items: stretch !important;
  justify-items: stretch !important;
}

/* Force the center map card to consume the whole middle grid row. */
.scoreboard-map-center {
  grid-area: map !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  align-self: stretch !important;
  justify-self: stretch !important;
}

/* Make the Leaflet holder fill every pixel left inside the map card. */
.scoreboard-map-wrap,
.scoreboard-map-wrap.scoreboard-leaflet-map,
.scoreboard-leaflet-map,
.scoreboard-leaflet-map .leaflet-container {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  flex: 1 1 auto !important;
}

/* Side roster panels fill from below the score boxes to the bottom. */
.team-roster-red,
.team-roster-blue {
  grid-row: 2 / 4 !important;
  height: 100% !important;
  min-height: 0 !important;
}

.team-roster-card {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
}

/* Events bar stays attached under the map and only in the middle column. */
.scoreboard-event-strip {
  grid-area: events !important;
  height: 100% !important;
  min-height: 0 !important;
}

/* Keep the top boxes from growing so tall that they steal map height. */
.score-box-card {
  min-height: 0 !important;
  height: 100% !important;
}

.round-status-shell {
  min-height: 0 !important;
  height: 100% !important;
}

/* If the browser window is extremely short, protect the map first. */
@media (max-height: 650px) {
  .team-elimination-board {
    grid-template-rows: clamp(118px, 21vh, 165px) minmax(0, 1fr) 54px !important;
  }

  .score-box-value {
    font-size: clamp(3rem, 7vw, 6.8rem) !important;
  }

  .round-status-card {
    min-height: 64px !important;
  }

  .round-timer-box {
    font-size: clamp(1.9rem, 4vw, 4.2rem) !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
}

/* Mobile/narrow fallback should not stay fixed. */
@media (max-width: 900px) {
  .scoreboard-display-body,
  .scoreboard-display,
  .scoreboard-content,
  #scoreboardApp,
  #scoreboardContent {
    height: auto !important;
    min-height: 100vh !important;
    overflow: auto !important;
  }

  .team-elimination-board {
    position: static !important;
    width: 100% !important;
    min-height: 100vh !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }
}



/* === Scoreboard fix: title bar full center-column width === */

/* The center status shell must fill the same center grid column as the playzone. */
.round-status-shell {
  grid-area: status !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  justify-items: stretch !important;
}

/* The visible title bar should use the full width of that center column. */
.round-status-card {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  justify-self: stretch !important;
  align-self: center !important;
  box-sizing: border-box !important;
}

/* Keep the timer centered above the full-width title bar. */
.round-timer-box {
  left: 50% !important;
  right: auto !important;
  transform: translate(-50%, -10px) !important;
}

/* Prevent older responsive rules from shrinking it again. */
@media (max-width: 1200px) {
  .round-status-shell,
  .round-status-card {
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch !important;
  }
}



/* === Scoreboard fix: force title bar to exact playzone column width === */

/* Use one shared variable for side columns and center gap so the status bar
   and playzone column are forced to line up. */
.team-elimination-board {
  --score-side-column-width: clamp(300px, 20vw, 410px);
  --score-column-gap: clamp(10px, 0.85vw, 16px);

  grid-template-columns:
    var(--score-side-column-width)
    minmax(620px, 1fr)
    var(--score-side-column-width) !important;
  column-gap: var(--score-column-gap) !important;
}

/* This is the important part:
   make the title shell and title card explicitly occupy the center grid column. */
.team-elimination-board > .round-status-shell {
  grid-column: 2 / 3 !important;
  grid-row: 1 / 2 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  box-sizing: border-box !important;
}

/* Override all older width:max/min rules by targeting the exact card path. */
.team-elimination-board > .round-status-shell > .round-status-card {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  justify-self: stretch !important;
  align-self: center !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  transform: translateY(40px) !important;
}

/* Make sure the visible card content does not force the card to shrink. */
.team-elimination-board > .round-status-shell > .round-status-card .round-status-primary {
  min-width: 0 !important;
}

.team-elimination-board > .round-status-shell > .round-status-card .round-status-secondary {
  min-width: max-content !important;
}

/* Keep the timer centered over the full center column. */
.team-elimination-board > .round-status-shell > .round-timer-box {
  left: 50% !important;
  right: auto !important;
  transform: translate(-50%, -10px) !important;
}

/* Same logic for medium screens. */
@media (max-width: 1200px) {
  .team-elimination-board {
    --score-side-column-width: 260px;
    --score-column-gap: 12px;

    grid-template-columns:
      var(--score-side-column-width)
      minmax(420px, 1fr)
      var(--score-side-column-width) !important;
  }

  .team-elimination-board > .round-status-shell,
  .team-elimination-board > .round-status-shell > .round-status-card {
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch !important;
  }
}



/* === Scoreboard fix: title bar is direct grid item === */

/*
  Previous fixes still allowed the wrapper to size itself around the title.
  This bypasses that wrapper entirely.

  display: contents makes the timer and title card act like direct children of
  .team-elimination-board, so .round-status-card can truly occupy the same
  center grid column as the playzone.
*/
.team-elimination-board > .round-status-shell {
  display: contents !important;
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
}

/* Title bar: exact same center grid column as the playzone. */
.team-elimination-board > .round-status-shell > .round-status-card {
  grid-column: 2 / 3 !important;
  grid-row: 1 / 2 !important;
  grid-area: status !important;

  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;

  justify-self: stretch !important;
  align-self: center !important;
  box-sizing: border-box !important;

  margin: 0 !important;
}

/* Timer: direct grid item too, centered above the full-width title bar. */
.team-elimination-board > .round-status-shell > .round-timer-box {
  grid-column: 2 / 3 !important;
  grid-row: 1 / 2 !important;

  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: 5 !important;

  justify-self: center !important;
  align-self: start !important;

  transform: translateY(-10px) !important;
  margin: 0 !important;
}

/* Keep the text inside the full-width bar from forcing shrinkage. */
.team-elimination-board > .round-status-shell > .round-status-card .round-status-primary {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.team-elimination-board > .round-status-shell > .round-status-card .round-status-secondary {
  min-width: max-content !important;
}

/* Responsive restore: on narrow/mobile screens the wrapper can behave normally. */
@media (max-width: 900px) {
  .team-elimination-board > .round-status-shell {
    display: grid !important;
    width: 100% !important;
  }

  .team-elimination-board > .round-status-shell > .round-status-card,
  .team-elimination-board > .round-status-shell > .round-timer-box {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}



/* === Scoreboard floating game controls === */
.scoreboard-controls-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
}

.scoreboard-controls-gear {
  position: fixed;
  top: clamp(10px, 1vw, 18px);
  right: clamp(10px, 1vw, 18px);
  width: clamp(42px, 3vw, 56px);
  height: clamp(42px, 3vw, 56px);
  display: grid;
  place-items: center;
  border: 2px solid var(--score-border-strong, rgba(255, 255, 255, 0.45));
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 35%),
    var(--score-card-bg, rgba(18, 10, 26, 0.88));
  color: var(--score-accent, #ff4fd8);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.55), 0 0 16px rgba(255, 79, 216, 0.24);
  font-size: clamp(1.35rem, 1.8vw, 2rem);
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  z-index: 100001;
}

.scoreboard-controls-gear:hover {
  transform: scale(1.06);
}

.scoreboard-controls-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: auto;
  z-index: 100000;
}

.scoreboard-controls-modal.hidden {
  display: none;
}

.scoreboard-controls-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(4px);
}

.scoreboard-controls-panel {
  position: relative;
  width: min(520px, calc(100vw - 42px));
  border: 3px solid var(--score-border-strong, rgba(255, 255, 255, 0.45));
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.12), transparent 34%),
    var(--score-card-bg, rgba(18, 10, 26, 0.96));
  color: var(--score-text, #fff8ed);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.72), 0 0 26px rgba(255, 79, 216, 0.24);
  padding: 22px;
  pointer-events: auto;
}

.scoreboard-controls-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.scoreboard-controls-title {
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scoreboard-controls-subtitle {
  margin-top: 4px;
  color: var(--score-muted, rgba(255, 248, 237, 0.7));
  font-weight: 800;
}

.scoreboard-controls-close {
  width: 42px;
  height: 42px;
  border: 2px solid var(--score-border, rgba(255, 255, 255, 0.25));
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--score-text, #fff8ed);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.scoreboard-controls-message {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--score-border, rgba(255, 255, 255, 0.25));
}

.scoreboard-controls-message.hidden {
  display: none;
}

.scoreboard-controls-message.success {
  color: #9cff9c;
  border-color: rgba(156, 255, 156, 0.5);
}

.scoreboard-controls-message.error {
  color: #ff9c9c;
  border-color: rgba(255, 156, 156, 0.5);
}

.scoreboard-controls-actions {
  display: grid;
  gap: 12px;
}

.scoreboard-control-button {
  width: 100%;
  min-height: 58px;
  border: 2px solid var(--score-border-strong, rgba(255, 255, 255, 0.45));
  border-radius: 18px;
  color: var(--score-text, #fff8ed);
  font-size: 1.08rem;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.scoreboard-control-button.pause {
  background: linear-gradient(135deg, rgba(255, 189, 98, 0.35), rgba(255, 79, 216, 0.18));
}

.scoreboard-control-button.resume {
  background: linear-gradient(135deg, rgba(90, 224, 151, 0.38), rgba(255, 79, 216, 0.18));
}

.scoreboard-control-button.stop {
  background: linear-gradient(135deg, rgba(224, 90, 59, 0.48), rgba(255, 79, 216, 0.18));
}

.scoreboard-control-button:hover {
  filter: brightness(1.12);
}

.scoreboard-control-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 700px) {
  .scoreboard-controls-gear {
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
  }

  .scoreboard-controls-panel {
    padding: 16px;
  }
}



/* === Scoreboard control gear: bottom-right position === */
.scoreboard-controls-gear {
  top: auto !important;
  bottom: clamp(10px, 1vw, 18px) !important;
  right: clamp(10px, 1vw, 18px) !important;
}



/* === Scoreboard game event popup notifications === */
.scoreboard-notification-layer {
  position: fixed;
  top: clamp(18px, 2vh, 28px);
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 40px));
  display: grid;
  gap: 12px;
  pointer-events: none;
  z-index: 100050;
}

.scoreboard-game-notification {
  pointer-events: none;
  border: 3px solid var(--score-border-strong, rgba(255, 255, 255, 0.45));
  border-radius: 24px;
  padding: 16px 22px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(0, 0, 0, 0.90), rgba(28, 16, 44, 0.92));
  color: var(--score-text, #fff8ed);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.72),
    0 0 24px rgba(255, 189, 98, 0.24);
  animation: scoreboardNotificationIn 260ms ease-out both;
}

.scoreboard-game-notification.combat {
  border-color: rgba(224, 90, 59, 0.72);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.72),
    0 0 28px rgba(224, 90, 59, 0.38);
}

.scoreboard-game-notification.objective {
  border-color: rgba(98, 183, 255, 0.72);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.72),
    0 0 28px rgba(98, 183, 255, 0.34);
}

.scoreboard-game-notification.leaving {
  animation: scoreboardNotificationOut 420ms ease-in both;
}

.scoreboard-game-notification-kicker {
  margin-bottom: 4px;
  color: var(--score-accent, #ffbd62);
  font-size: clamp(0.74rem, 0.9vw, 0.95rem);
  font-weight: 1000;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scoreboard-game-notification-message {
  font-size: clamp(1.35rem, 2.2vw, 2.35rem);
  font-weight: 1000;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

@keyframes scoreboardNotificationIn {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes scoreboardNotificationOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-18px) scale(0.96);
  }
}

@media (max-width: 700px) {
  .scoreboard-notification-layer {
    top: 12px;
    width: calc(100vw - 24px);
  }

  .scoreboard-game-notification {
    padding: 13px 16px;
    border-radius: 18px;
  }

  .scoreboard-game-notification-message {
    font-size: 1.25rem;
  }
}



/* === Scoreboard achievement popup notification style === */
.scoreboard-game-notification.achievement {
  border-color: rgba(255, 220, 92, 0.82);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.72),
    0 0 34px rgba(255, 220, 92, 0.42);
}

.scoreboard-game-notification.achievement .scoreboard-game-notification-kicker {
  color: #ffe45c;
}

.scoreboard-game-notification.achievement .scoreboard-game-notification-message::before {
  content: "🏆 ";
}



/* === Scoreboard notification position: center screen === */
.scoreboard-notification-layer {
  top: 50% !important;
  left: 50% !important;
  bottom: auto !important;
  right: auto !important;
  transform: translate(-50%, -50%) !important;
  align-content: center !important;
  justify-items: center !important;
  width: min(760px, calc(100vw - 48px)) !important;
}

.scoreboard-game-notification {
  width: 100% !important;
}

@media (max-width: 700px) {
  .scoreboard-notification-layer {
    top: 50% !important;
    width: calc(100vw - 24px) !important;
  }
}


/* === Admin scroll restore after scoreboard notification/fullscreen patches === */

/*
  Keep normal pages like /admin scrollable.
  The scoreboard page still stays fullscreen because its body has
  class="scoreboard-display-body".
*/
html {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body:not(.scoreboard-display-body) {
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

/* Re-apply fullscreen lock only when the page is actually the scoreboard. */
html:has(body.scoreboard-display-body) {
  width: 100vw !important;
  height: 100vh !important;
  min-width: 100vw !important;
  min-height: 100vh !important;
  overflow: hidden !important;
}

body.scoreboard-display-body {
  width: 100vw !important;
  height: 100vh !important;
  min-width: 100vw !important;
  min-height: 100vh !important;
  overflow: hidden !important;
}

/* Make sure admin wrappers are not accidentally trapped by older fullscreen rules. */
body:not(.scoreboard-display-body) main,
body:not(.scoreboard-display-body) .admin-shell,
body:not(.scoreboard-display-body) .admin-page,
body:not(.scoreboard-display-body) .page,
body:not(.scoreboard-display-body) .container {
  max-height: none !important;
}



/* === Admin teams edit button === */
.team-admin-item .admin-item-title {
  margin-bottom: 4px;
}

.small-button {
  min-height: 0;
  padding: 7px 12px;
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}


/* === Admin teams edit button size/position fix === */
.team-admin-item .admin-item-title {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 6px !important;
}

.team-admin-item .admin-item-title strong {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.team-edit-button,
.team-admin-item .admin-item-title .team-edit-button {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  height: auto !important;
  flex: 0 0 auto !important;

  padding: 4px 9px !important;
  margin: 0 !important;

  font-size: 0.72rem !important;
  line-height: 1 !important;
  letter-spacing: 0.03em !important;

  border-radius: 999px !important;
  white-space: nowrap !important;
}


/* === Admin teams inline edit fields === */
.team-admin-item-editing {
  gap: 10px;
}

.team-edit-fields {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.7fr);
  gap: 10px;
  align-items: end;
}

.team-edit-fields label {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.team-edit-fields input {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 0.95rem;
}

.team-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.team-save-button,
.team-cancel-button,
.team-admin-item .team-save-button,
.team-admin-item .team-cancel-button {
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 6px 12px !important;
  font-size: 0.78rem !important;
  line-height: 1 !important;
  border-radius: 999px !important;
}

@media (max-width: 720px) {
  .team-edit-fields {
    grid-template-columns: 1fr;
  }
}


/* === Scoreboard map no-title fill restore === */
.scoreboard-map-center {
  min-height: 0 !important;
}

.scoreboard-map-center .scoreboard-map-wrap,
.scoreboard-map-center .scoreboard-leaflet-map,
.scoreboard-map-center .leaflet-container {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}


/* === Scoreboard map real restore after removing the title row === */
/* The old layout expected two rows: title + map. Since the title is gone,
   force the map card to have one real row and force the Leaflet element to
   occupy that row. */
.scoreboard-map-center {
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  min-height: 260px !important;
}

.scoreboard-map-center .scoreboard-map-wrap,
.scoreboard-map-center .scoreboard-leaflet-map,
.scoreboard-map-center .scoreboard-map-wrap.scoreboard-leaflet-map,
.scoreboard-map-center .scoreboard-map-wrap.leaflet-container,
.scoreboard-map-center .scoreboard-leaflet-map.leaflet-container {
  display: block !important;
  grid-row: 1 / -1 !important;
  grid-column: 1 / -1 !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 260px !important;
}

.scoreboard-map-center .leaflet-pane,
.scoreboard-map-center .leaflet-map-pane,
.scoreboard-map-center .leaflet-tile-pane,
.scoreboard-map-center .leaflet-overlay-pane,
.scoreboard-map-center .leaflet-marker-pane {
  width: 100% !important;
  height: 100% !important;
}


/* Utility: keep a form control in the normal label structure without showing a redundant label word. */
.no-visible-label {
  gap: 0 !important;
}


/* Play zone primary actions sit together in one even-height row. */
.admin-section .button-row.playzone-action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.admin-section .button-row.playzone-action-row button {
  width: 100%;
  height: 100%;
  min-height: 46px;
  margin-top: 0;
}

@media (max-width: 820px) {
  .admin-section .button-row.playzone-action-row {
    grid-template-columns: 1fr;
  }
}

/* Phase 28I: Capture the Flag pre-game setup tools. */
.ctf-setup-panel.hidden {
  display: none;
}

.ctf-setup-card {
  border: 1px solid rgba(92, 214, 201, 0.35);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(92, 214, 201, 0.14), rgba(255, 189, 98, 0.10));
  padding: 14px;
  margin: 12px 0;
}

.ctf-setup-card p {
  margin: 8px 0;
  color: #d8c8ae;
}

.ctf-setup-card span {
  display: block;
  color: #9fe7df;
  margin-top: 4px;
}

.ctf-objective-item {
  border-color: rgba(92, 214, 201, 0.35);
  background: rgba(92, 214, 201, 0.08);
}

.ctf-objective-badge {
  display: inline-block !important;
  width: fit-content;
  margin-top: 8px !important;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(31, 20, 12, 0.65);
  color: #ffbd62 !important;
  border: 1px solid rgba(255, 189, 98, 0.35);
  font-weight: 700;
}

.objective-location-grid {
  margin-top: 10px;
}

.objective-location-actions {
  align-self: end;
  margin-top: 0;
}

.map-ctf-flag-pin,
.map-ctf-base-pin {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 17px;
  color: #1f140c;
  border-color: #f5eadb;
}

.map-ctf-flag-pin {
  background: #ffbd62;
}

.map-ctf-base-pin {
  background: #5cd6c9;
}

.map-ctf-team-red {
  background: #ff4c4c;
  border-color: #ffd1d1;
  color: #260404;
  box-shadow: 0 0 0 3px rgba(255, 76, 76, 0.22), 0 0 18px rgba(255, 76, 76, 0.55);
}

.map-ctf-team-blue {
  background: #45a3ff;
  border-color: #d3eaff;
  color: #03182b;
  box-shadow: 0 0 0 3px rgba(69, 163, 255, 0.22), 0 0 18px rgba(69, 163, 255, 0.55);
}

/* Phase 28I: team-level colors for admin setup and scoreboard maps. */
.team-color-picker {
  min-height: 40px;
  padding: 4px;
  cursor: pointer;
}

.team-color-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border-radius: 999px;
  border: 2px solid rgba(255, 248, 237, 0.85);
  background: var(--team-color, #ffbd62);
  vertical-align: -2px;
  box-shadow: 0 0 10px color-mix(in srgb, var(--team-color, #ffbd62) 70%, transparent);
}

.map-team-colored {
  background: var(--team-color, #ffbd62) !important;
  border-color: color-mix(in srgb, var(--team-color, #ffbd62) 32%, #fff8ed) !important;
  color: #140b08;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--team-color, #ffbd62) 24%, transparent),
              0 0 18px color-mix(in srgb, var(--team-color, #ffbd62) 62%, transparent) !important;
}

.leaflet-player-marker.team-colored span,
.leaflet-objective-marker.team-colored span {
  background: var(--team-color, #ffbd62) !important;
  box-shadow: 0 0 14px color-mix(in srgb, var(--team-color, #ffbd62) 78%, transparent) !important;
}

.leaflet-player-marker.team-colored.dead span {
  background: #777 !important;
  box-shadow: none !important;
}

/* Phase 28K: selected game-mode-specific admin settings. */
.game-mode-settings-section {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 14px;
  padding: 16px;
  margin-top: 18px;
}

.game-mode-settings-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.game-mode-settings-group {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 12px;
}

.game-mode-settings-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.game-mode-settings-group h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.game-mode-setting-field .field-help,
.game-mode-setting-field.field-help {
  display: block;
  margin-top: 4px;
  line-height: 1.35;
}

/* Phase 28O.4 scoreboard pause/rematch polish */
.round-pause-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 52px auto 8px;
  padding: 8px 18px;
  border: 2px solid rgba(255, 209, 102, 0.95);
  border-radius: 999px;
  background: rgba(20, 10, 10, 0.92);
  color: #ffd166;
  font-size: clamp(1.05rem, 1.8vw, 1.55rem);
  font-weight: 1000;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 0 28px rgba(255, 209, 102, 0.2);
}

.round-pause-banner.hidden {
  display: none;
}

.generic-scoreboard-header .round-pause-banner {
  margin: 8px 0 0;
  width: 100%;
}


/* Phase 28O.8: restore desktop scoreboard gear controls while keeping the full-screen scoreboard layout. */
.scoreboard-controls-layer {
  display: block !important;
}

.scoreboard-controls-gear {
  display: grid !important;
}

.scoreboard-controls-modal:not(.hidden) {
  display: grid !important;
}

/* Phase 28O.5: paused state is a centered overlay and must not consume scoreboard layout space. */
.round-pause-banner {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100060 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(10px, 2vh, 18px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(0, 0, 0, 0.38) !important;
  color: #ffd166 !important;
  font-size: clamp(4rem, 12vw, 13rem) !important;
  font-weight: 1000 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  text-shadow: 0 0 32px rgba(255, 209, 102, 0.75), 0 8px 24px rgba(0, 0, 0, 0.95) !important;
  pointer-events: none !important;
  box-shadow: none !important;
}

.round-pause-banner span {
  color: #fff8e6 !important;
  font-size: clamp(1.2rem, 2.5vw, 2.6rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  text-transform: none !important;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.9) !important;
}

.round-pause-banner.hidden {
  display: none !important;
}

/* Phase 28P.2.13.3: Join lobby start/cancel row.
   This must beat the generic .admin-section .button-row grid rules. */
.admin-section .button-row.join-lobby-start-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 12px;
  width: 100%;
  margin-top: 18px;
}

.admin-section .button-row.join-lobby-start-row #actualStartGameButton {
  flex: 1 1 0;
  width: auto !important;
  min-width: 0;
  min-height: 62px;
  margin-top: 0 !important;
  padding-left: 18px;
  padding-right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
}

.admin-section .button-row.join-lobby-start-row #cancelReadyButton {
  flex: 0 0 108px;
  width: 108px !important;
  min-width: 108px;
  min-height: 62px;
  margin-top: 0 !important;
  padding: 12px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .admin-section .button-row.join-lobby-start-row {
    gap: 8px;
  }

  .admin-section .button-row.join-lobby-start-row #cancelReadyButton {
    flex-basis: 92px;
    width: 92px !important;
    min-width: 92px;
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* === Phase 29A.1 Ghost Hunt scoreboard map support === */
.ghost-hunt-board .score-box-red {
  border-color: color-mix(in srgb, #78f7d0 55%, var(--score-border));
}

.ghost-hunt-board .score-box-blue {
  border-color: color-mix(in srgb, #c78cff 58%, var(--score-border));
}

.ghost-hunt-board .ghost-journal-card {
  border-color: color-mix(in srgb, #c78cff 48%, var(--score-border));
}

.ghost-hunt-board .ghost-hunter-card .roster-player-stats {
  letter-spacing: 0.02em;
}

.ghost-journal-grid {
  gap: 10px;
}

.ghost-journal-row {
  border-color: rgba(199, 140, 255, 0.28);
  background: rgba(199, 140, 255, 0.08);
}

.leaflet-objective-marker.ghost {
  z-index: 640 !important;
}

.leaflet-objective-marker.ghost span {
  left: -19px;
  top: -19px;
  width: 38px;
  height: 38px;
  line-height: 34px;
  border-radius: 999px;
  border-color: rgba(255, 248, 237, 0.92);
  background: rgba(130, 255, 228, 0.92);
  color: #130b1f;
  box-shadow:
    0 0 18px rgba(120, 247, 208, 0.95),
    0 0 38px rgba(199, 140, 255, 0.45);
  animation: ghostMapPulse 1.6s ease-in-out infinite alternate;
}

.leaflet-objective-marker.ghost-shy span {
  background: rgba(155, 220, 255, 0.94);
}

.leaflet-objective-marker.ghost-aggressive span {
  background: rgba(255, 117, 117, 0.94);
}

.leaflet-objective-marker.ghost-trickster span {
  background: rgba(216, 153, 255, 0.94);
}

.leaflet-objective-marker.ghost b {
  top: 28px;
  background: rgba(18, 8, 30, 0.78);
  border-color: rgba(199, 140, 255, 0.35);
  color: #fff8ed;
}

@keyframes ghostMapPulse {
  from {
    transform: scale(0.92);
    opacity: 0.78;
  }
  to {
    transform: scale(1.08);
    opacity: 1;
  }
}


/* === Phase 32B.4 / 45D.2 Zombie Extraction scoreboard and live-map markers === */
.zombie-extraction-board .score-box-red {
  border-color: color-mix(in srgb, #78f7d0 55%, var(--score-border));
}

.zombie-extraction-board .zombie-extraction-horde-score,
.zombie-extraction-board .zombie-extraction-horde-column {
  border-color: color-mix(in srgb, #a8ff3e 58%, var(--score-border));
}

.zombie-extraction-board .zombie-survivor-card .roster-player-stats {
  letter-spacing: 0.02em;
}


.leaflet-objective-marker.zombie-beacon {
  z-index: 650 !important;
}

.leaflet-objective-marker.zombie-beacon span {
  background: #ffd35a;
  color: #171007;
  border-radius: 7px;
  box-shadow: 0 0 18px rgba(255, 211, 90, 0.95);
}

.leaflet-objective-marker.zombie-crate {
  z-index: 645 !important;
}

.leaflet-objective-marker.zombie-crate span {
  background: #b77a3e;
  color: #fff8ed;
  border-radius: 5px;
  box-shadow: 0 0 16px rgba(183, 122, 62, 0.9);
}

.leaflet-objective-marker.zombie-enemy {
  z-index: 655 !important;
}

.leaflet-objective-marker.zombie-enemy span {
  background: #83bd4e;
  color: #111b0a;
  border-color: #e8ffd7;
  box-shadow:
    0 0 16px rgba(131, 189, 78, 0.95),
    0 0 30px rgba(77, 111, 45, 0.55);
}

.leaflet-objective-marker.zombie-beacon b,
.leaflet-objective-marker.zombie-crate b,
.leaflet-objective-marker.zombie-enemy b {
  background: rgba(10, 14, 8, 0.8);
  border: 1px solid rgba(232, 255, 215, 0.24);
}


/* === Phase 32B.5 Zombie Extraction live-map status === */
.zombie-extraction-map-card {
  position: relative;
  min-height: 0;
}

.zombie-extraction-map-card .scoreboard-map-wrap {
  width: 100%;
  height: 100%;
  min-height: 420px;
}

.zombie-live-map-status {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 800;
  padding: 7px 12px;
  border: 1px solid rgba(120, 247, 208, 0.55);
  border-radius: 999px;
  background: rgba(8, 24, 25, 0.84);
  color: #dffff5;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
}

.zombie-live-map-status.warning {
  border-color: rgba(255, 211, 90, 0.65);
  color: #ffe59a;
}


/* === Phase 32C Zombie Extraction playable scoreboard ===
   Zombie Extraction now renders through the exact Ghost Hunt scoreboard shell.
   Keep the existing Ghost Hunt grid; only the unused right-side content is hidden. */
.zombie-extraction-board {
  /* Intentionally inherits every structural grid rule from .ghost-hunt-board. */
}

.leaflet-objective-marker.zombie-extraction-zone { color: #85ffb0; }
.leaflet-objective-marker.zombie-extraction-zone span {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 4px solid #85ffb0; border-radius: 50%; background: rgba(16, 48, 38, .88);
  font-size: 10px; font-weight: 900; box-shadow: 0 0 18px rgba(133, 255, 176, .65);
}
.leaflet-objective-marker.zombie-extraction-zone b { color: #baffd2; }

/* Phase 33B platform status banners */
.platform-status-panel {
  display: grid;
  gap: 0.65rem;
  margin: 0.75rem 0 1rem;
}

.platform-status-panel.hidden {
  display: none;
}

.platform-status-banner {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  background: rgba(0, 0, 0, 0.32);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.20);
}

.platform-status-banner strong,
.platform-status-banner span {
  display: block;
}

.platform-status-banner span {
  margin-top: 0.25rem;
  opacity: 0.86;
}

.platform-status-error {
  border-color: rgba(255, 76, 76, 0.72);
  background: rgba(100, 0, 0, 0.24);
}

.platform-status-warning {
  border-color: rgba(255, 189, 98, 0.72);
  background: rgba(120, 72, 0, 0.22);
}

.platform-status-info {
  border-color: rgba(98, 183, 255, 0.62);
  background: rgba(0, 64, 120, 0.20);
}


/* === Phase 34J Windows Server Admin visual pass === */
.admin-page {
  --oyd-ink: #050505;
  --oyd-paper: #fff1d2;
  --oyd-cream: #f7dfb6;
  --oyd-red: #ff3b30;
  --oyd-orange: #ff9f1c;
  --oyd-yellow: #ffd166;
  --oyd-panel: rgba(18, 12, 10, 0.94);
  --oyd-panel-2: rgba(37, 23, 18, 0.92);
  --oyd-border: rgba(255, 209, 102, 0.78);
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 59, 48, 0.24), transparent 25%),
    radial-gradient(circle at 85% 0%, rgba(255, 209, 102, 0.18), transparent 28%),
    linear-gradient(135deg, #080606 0%, #1f0f0f 42%, #120c08 100%);
}

.admin-page .admin-card {
  position: relative;
  isolation: isolate;
  overflow: visible;
  border: 4px solid var(--oyd-ink);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 241, 210, 0.045), transparent 22%),
    radial-gradient(circle at 12% 2%, rgba(255, 209, 102, 0.13), transparent 24%),
    var(--oyd-panel);
  box-shadow:
    10px 10px 0 rgba(255, 59, 48, 0.34),
    0 22px 50px rgba(0, 0, 0, 0.52);
}

.admin-page .admin-card::before {
  content: "LOCAL HOST CONTROL";
  position: absolute;
  top: -15px;
  left: 22px;
  z-index: 2;
  padding: 6px 12px;
  border: 3px solid var(--oyd-ink);
  border-radius: 3px;
  background: var(--oyd-yellow);
  color: var(--oyd-ink);
  font-size: 0.78rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-1.4deg);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
}

.admin-page .admin-header {
  position: relative;
  margin-bottom: 14px;
  padding: 16px;
  border: 4px solid var(--oyd-ink);
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(255, 59, 48, 0.22), rgba(255, 209, 102, 0.08)),
    rgba(0, 0, 0, 0.34);
  box-shadow: 6px 6px 0 rgba(255, 209, 102, 0.22);
}

.admin-page .admin-header h1 {
  color: var(--oyd-paper);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 1000;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 var(--oyd-ink), 0 0 18px rgba(255, 59, 48, 0.28);
}

.admin-page .admin-status-card,
.admin-page .admin-section,
.admin-page .admin-panel,
.admin-page .admin-item,
.admin-page .join-qr-card,
.admin-page .join-player-card,
.admin-page .ready-requirements,
.admin-page .platform-status-banner {
  position: relative;
  border: 3px solid var(--oyd-ink);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255, 241, 210, 0.055), transparent 28%),
    var(--oyd-panel-2);
  box-shadow: 5px 5px 0 rgba(255, 209, 102, 0.14);
}

.admin-page .admin-section {
  margin-top: 18px;
  padding: 18px;
}

.admin-page .admin-section h2,
.admin-page .join-qr-card h3,
.admin-page .join-player-card h3,
.admin-page .admin-section h3 {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 9px;
  border: 2px solid var(--oyd-ink);
  border-radius: 3px;
  background: rgba(255, 209, 102, 0.92);
  color: var(--oyd-ink);
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  transform: rotate(-0.7deg);
}

.admin-page .admin-tab-panel .admin-section + .admin-section {
  border-top: 3px solid var(--oyd-ink);
}

.admin-page .admin-tabs,
.admin-page .sub-tab-bar {
  border: 3px solid var(--oyd-ink);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.34);
  box-shadow: 5px 5px 0 rgba(255, 59, 48, 0.18);
}

.admin-page .admin-tab-button,
.admin-page .sub-tab-button,
.admin-page button,
.admin-page .button-link {
  border: 3px solid var(--oyd-ink);
  border-radius: 4px;
  background: #2c2118;
  color: var(--oyd-paper);
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.38);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.admin-page .admin-tab-button:hover,
.admin-page .sub-tab-button:hover,
.admin-page button:hover,
.admin-page .button-link:hover {
  filter: brightness(1.1);
  transform: translate(-1px, -1px) rotate(-0.35deg);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.44);
}

.admin-page .admin-tab-button.active,
.admin-page .sub-tab-button.active,
.admin-page button:not(.secondary):not(.danger-button):not(.danger-outline-button):not(.profile-icon-button),
.admin-page .button-link:not(.secondary-link) {
  background: linear-gradient(180deg, var(--oyd-orange), #c8562d);
  color: var(--oyd-ink);
}

.admin-page .secondary,
.admin-page .secondary-link,
.admin-page .danger-outline-button {
  background: #30271f;
  color: var(--oyd-paper);
}

.admin-page .danger-button,
.admin-page .danger-outline-button {
  border-color: var(--oyd-ink);
  background: rgba(255, 59, 48, 0.34);
}

.admin-page .ready-button {
  border: 4px solid var(--oyd-ink);
  border-radius: 5px;
  background: linear-gradient(180deg, #8df58e, #28b461);
  color: var(--oyd-ink);
  text-shadow: none;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.42), 0 0 22px rgba(100, 255, 150, 0.25);
  transform: rotate(0.6deg);
}

.admin-page .status-pill {
  border: 2px solid var(--oyd-ink);
  border-radius: 3px;
  background: rgba(255, 241, 210, 0.10);
  font-weight: 900;
  text-transform: uppercase;
}

.admin-page input,
.admin-page select,
.admin-page textarea {
  border: 3px solid var(--oyd-ink);
  border-radius: 4px;
  background: var(--oyd-paper);
  color: var(--oyd-ink);
  font-weight: 800;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}

.admin-page label {
  color: var(--oyd-paper);
  letter-spacing: 0.01em;
}

.admin-page .muted,
.admin-page .field-help,
.admin-page .input-help {
  color: rgba(247, 223, 182, 0.82);
}

.admin-page code {
  padding: 2px 5px;
  border: 1px solid rgba(255, 209, 102, 0.34);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.26);
  color: var(--oyd-yellow);
}

.admin-page .admin-map,
.admin-page #adminMap {
  border: 4px solid var(--oyd-ink);
  border-radius: 5px;
  box-shadow: 6px 6px 0 rgba(255, 209, 102, 0.18);
}

.admin-page .join-lobby-layout {
  gap: 18px;
}

.admin-page .join-qr-card,
.admin-page .join-player-card {
  padding: 16px;
}

.admin-page .join-qr-placeholder {
  border: 3px dashed rgba(255, 209, 102, 0.66);
  border-radius: 5px;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 209, 102, 0.08) 0 10px, transparent 10px 20px),
    rgba(0, 0, 0, 0.28);
  color: var(--oyd-cream);
  font-weight: 900;
}

.admin-page .join-qr-image {
  border: 5px solid var(--oyd-ink);
  border-radius: 4px;
  box-shadow: 6px 6px 0 rgba(255, 59, 48, 0.28);
}

.admin-page .join-player-row {
  border: 2px solid rgba(255, 209, 102, 0.34);
  border-radius: 4px;
  background: rgba(255, 241, 210, 0.075);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.24);
}

.admin-page .join-player-avatar,
.admin-page .fallback-avatar,
.admin-page .profile-icon-button,
.admin-page .profile-avatar-current-preview,
.admin-page .profile-avatar-option {
  border: 3px solid var(--oyd-ink);
  border-radius: 4px;
  background: var(--oyd-yellow);
}

.admin-page .profile-icon-button {
  box-shadow: 4px 4px 0 rgba(255, 59, 48, 0.28);
  transform: rotate(2deg);
}

.admin-page .profile-modal {
  border: 4px solid var(--oyd-ink);
  border-radius: 7px;
  background: var(--oyd-panel);
  box-shadow: 10px 10px 0 rgba(255, 59, 48, 0.34), 0 22px 50px rgba(0, 0, 0, 0.54);
}

.admin-page .profile-modal-close {
  border: 3px solid var(--oyd-ink);
  border-radius: 4px;
  background: var(--oyd-red);
  color: var(--oyd-paper);
}

.admin-page .ready-requirements ul {
  padding-left: 0;
}

.admin-page .ready-requirements li {
  padding: 8px 10px;
  border: 1px solid rgba(255, 209, 102, 0.18);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.18);
}

@media (max-width: 760px) {
  .admin-page .admin-header,
  .admin-status-row,
  .join-lobby-layout {
    grid-template-columns: 1fr;
  }

  .admin-page .admin-tabs {
    grid-template-columns: 1fr;
  }

  .admin-page .admin-section > .button-row,
  .admin-page .admin-section .button-row:not(.compact-buttons) {
    grid-template-columns: 1fr;
  }
}


/* === Phase 34J.1 Windows Server Admin button + theme chrome pass === */
body[data-admin-theme] {
  --admin-ink: #050505;
  --admin-paper: #fff1d2;
  --admin-text: #fff1d2;
  --admin-muted: rgba(247, 223, 182, 0.82);
  --admin-panel: rgba(18, 12, 10, 0.94);
  --admin-panel-2: rgba(37, 23, 18, 0.92);
  --admin-accent: #ff9f1c;
  --admin-accent-2: #ffd166;
  --admin-danger: #ff3b30;
  --admin-good: #8df58e;
  --admin-shadow: rgba(255, 59, 48, 0.34);
  --admin-page-bg:
    radial-gradient(circle at 14% 8%, rgba(255, 209, 102, 0.16), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(255, 59, 48, 0.16), transparent 27%),
    linear-gradient(135deg, #070606, #19100d 52%, #100907);
}

body[data-admin-theme="neon-80s"],
body[data-admin-theme="retro-arcade"],
body[data-admin-theme="cartoon-chaos"] {
  --admin-accent: #ff4fd8;
  --admin-accent-2: #00e5ff;
  --admin-danger: #ff3864;
  --admin-good: #8dff4f;
  --admin-shadow: rgba(0, 229, 255, 0.35);
  --admin-page-bg:
    radial-gradient(circle at 18% 8%, rgba(255, 79, 216, 0.20), transparent 28%),
    radial-gradient(circle at 86% 16%, rgba(0, 229, 255, 0.18), transparent 25%),
    linear-gradient(135deg, #10021e, #180c33 52%, #050616);
}

body[data-admin-theme="tron-sci-fi"],
body[data-admin-theme="laser-tag-arena"],
body[data-admin-theme="alien-invasion"] {
  --admin-accent: #37f8ff;
  --admin-accent-2: #8a5cff;
  --admin-danger: #ff4fd8;
  --admin-good: #7dffb2;
  --admin-shadow: rgba(55, 248, 255, 0.32);
  --admin-page-bg:
    radial-gradient(circle at 18% 10%, rgba(55, 248, 255, 0.16), transparent 28%),
    radial-gradient(circle at 86% 15%, rgba(138, 92, 255, 0.20), transparent 28%),
    linear-gradient(135deg, #020814, #07182b 52%, #02030a);
}

body[data-admin-theme="zombie-tag"],
body[data-admin-theme="toxic-slime-lab"] {
  --admin-accent: #a8ff3e;
  --admin-accent-2: #ffe45c;
  --admin-danger: #ff4a33;
  --admin-good: #76ff7a;
  --admin-shadow: rgba(168, 255, 62, 0.28);
  --admin-page-bg:
    radial-gradient(circle at 16% 8%, rgba(168, 255, 62, 0.17), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(255, 74, 51, 0.17), transparent 27%),
    linear-gradient(135deg, #071108, #18220c 54%, #050806);
}

body[data-admin-theme="tactical-camo"] {
  --admin-accent: #d7c46a;
  --admin-accent-2: #7fb069;
  --admin-danger: #ff7043;
  --admin-good: #a7e36d;
  --admin-shadow: rgba(127, 176, 105, 0.30);
  --admin-page-bg:
    radial-gradient(circle at 20% 8%, rgba(215, 196, 106, 0.16), transparent 30%),
    linear-gradient(135deg, #0d110a, #26301a 50%, #0b0d08);
}

body[data-admin-theme="candy-apocalypse"],
body[data-admin-theme="superhero-city"] {
  --admin-accent: #ff6fb7;
  --admin-accent-2: #ffd166;
  --admin-danger: #ff3b30;
  --admin-good: #64d8ff;
  --admin-shadow: rgba(255, 111, 183, 0.30);
  --admin-page-bg:
    radial-gradient(circle at 15% 9%, rgba(255, 111, 183, 0.18), transparent 28%),
    radial-gradient(circle at 86% 14%, rgba(100, 216, 255, 0.16), transparent 27%),
    linear-gradient(135deg, #190615, #22204a 54%, #090811);
}

body[data-admin-theme="pirate-treasure"] {
  --admin-accent: #f2c14e;
  --admin-accent-2: #c77d2a;
  --admin-danger: #d1495b;
  --admin-good: #6fcf97;
  --admin-shadow: rgba(242, 193, 78, 0.30);
  --admin-page-bg:
    radial-gradient(circle at 20% 9%, rgba(242, 193, 78, 0.18), transparent 30%),
    linear-gradient(135deg, #100806, #231307 52%, #07100d);
}

body[data-admin-theme] {
  background: var(--admin-page-bg);
}

body[data-admin-theme] .admin-page .card,
body[data-admin-theme] .admin-page .admin-card {
  border-color: var(--admin-ink);
  background:
    radial-gradient(circle at 14% 8%, color-mix(in srgb, var(--admin-accent) 16%, transparent), transparent 30%),
    linear-gradient(180deg, var(--admin-panel), rgba(0, 0, 0, 0.90));
  box-shadow: 10px 10px 0 var(--admin-shadow), 0 20px 60px rgba(0, 0, 0, 0.56);
}

body[data-admin-theme] .admin-page h1,
body[data-admin-theme] .admin-page h2,
body[data-admin-theme] .admin-page h3,
body[data-admin-theme] .admin-page a,
body[data-admin-theme] .admin-page .big-link {
  color: var(--admin-accent-2);
}

body[data-admin-theme] .admin-page .admin-header h1 {
  color: var(--admin-paper);
  text-shadow: 4px 4px 0 var(--admin-ink), 0 0 18px color-mix(in srgb, var(--admin-accent) 35%, transparent);
}

body[data-admin-theme] .admin-page .muted,
body[data-admin-theme] .admin-page .field-help,
body[data-admin-theme] .admin-page .input-help,
body[data-admin-theme] .admin-page .map-help {
  color: var(--admin-muted);
}

body[data-admin-theme] .admin-page .admin-section h2,
body[data-admin-theme] .admin-page .admin-section h3,
body[data-admin-theme] .admin-page .join-qr-card h3,
body[data-admin-theme] .admin-page .join-player-card h3 {
  background: linear-gradient(180deg, var(--admin-accent-2), color-mix(in srgb, var(--admin-accent) 62%, var(--admin-accent-2)));
  color: var(--admin-ink);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--admin-danger) 38%, transparent);
}

body[data-admin-theme] .admin-page .admin-status-card,
body[data-admin-theme] .admin-page .admin-item,
body[data-admin-theme] .admin-page .join-qr-card,
body[data-admin-theme] .admin-page .join-player-card,
body[data-admin-theme] .admin-page .ready-requirements,
body[data-admin-theme] .admin-page .map-status,
body[data-admin-theme] .admin-page .profile-avatar-current-row,
body[data-admin-theme] .admin-page .profile-avatar-grid {
  border: 3px solid var(--admin-ink);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.18)),
    var(--admin-panel-2);
  box-shadow: 5px 5px 0 color-mix(in srgb, var(--admin-accent) 22%, transparent);
}

body[data-admin-theme] .admin-page .admin-tabs,
body[data-admin-theme] .admin-page .sub-tab-bar {
  border-color: var(--admin-ink);
  background: color-mix(in srgb, var(--admin-panel) 88%, black);
  box-shadow: 6px 6px 0 color-mix(in srgb, var(--admin-accent) 25%, transparent);
}

body[data-admin-theme] .admin-page button:not(.profile-icon-button):not(.profile-avatar-option),
body[data-admin-theme] .admin-page .button-link,
body[data-admin-theme] .admin-page .admin-tab-button,
body[data-admin-theme] .admin-page .sub-tab-button {
  position: relative;
  min-height: 46px;
  overflow: visible;
  border: 4px solid var(--admin-ink) !important;
  border-radius: 3px !important;
  background:
    linear-gradient(180deg, var(--admin-accent), color-mix(in srgb, var(--admin-accent) 62%, #000000)) !important;
  color: var(--admin-ink) !important;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  text-shadow: none;
  box-shadow: 5px 5px 0 var(--admin-ink), 8px 8px 0 color-mix(in srgb, var(--admin-danger) 45%, transparent) !important;
  transform: rotate(-0.55deg);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease, background 120ms ease;
}

body[data-admin-theme] .admin-page .button-row button:nth-child(even),
body[data-admin-theme] .admin-page .button-row .button-link:nth-child(even),
body[data-admin-theme] .admin-page .admin-tab-button:nth-child(even),
body[data-admin-theme] .admin-page .sub-tab-button:nth-child(even) {
  transform: rotate(0.55deg);
}

body[data-admin-theme] .admin-page button:not(.profile-icon-button):not(.profile-avatar-option):hover,
body[data-admin-theme] .admin-page .button-link:hover,
body[data-admin-theme] .admin-page .admin-tab-button:hover,
body[data-admin-theme] .admin-page .sub-tab-button:hover {
  filter: saturate(1.12) brightness(1.06);
  transform: translate(-2px, -2px) rotate(-0.85deg);
  box-shadow: 7px 7px 0 var(--admin-ink), 11px 11px 0 color-mix(in srgb, var(--admin-danger) 48%, transparent) !important;
}

body[data-admin-theme] .admin-page button:not(.profile-icon-button):not(.profile-avatar-option):active,
body[data-admin-theme] .admin-page .button-link:active,
body[data-admin-theme] .admin-page .admin-tab-button:active,
body[data-admin-theme] .admin-page .sub-tab-button:active {
  transform: translate(3px, 3px) rotate(0deg);
  box-shadow: 2px 2px 0 var(--admin-ink), 4px 4px 0 color-mix(in srgb, var(--admin-danger) 35%, transparent) !important;
}

body[data-admin-theme] .admin-page .admin-tab-button.active,
body[data-admin-theme] .admin-page .sub-tab-button.active,
body[data-admin-theme] .admin-page .ready-button,
body[data-admin-theme] .admin-page button.primary-button,
body[data-admin-theme] .admin-page button:not(.secondary):not(.danger-button):not(.danger-outline-button):not(.profile-icon-button):not(.profile-avatar-option) {
  background:
    linear-gradient(180deg, var(--admin-accent-2), var(--admin-accent)) !important;
  color: var(--admin-ink) !important;
}

body[data-admin-theme] .admin-page .secondary,
body[data-admin-theme] .admin-page .secondary-link,
body[data-admin-theme] .admin-page .danger-outline-button,
body[data-admin-theme] .admin-page .admin-tab-button:not(.active),
body[data-admin-theme] .admin-page .sub-tab-button:not(.active) {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--admin-panel-2) 78%, var(--admin-accent) 22%), var(--admin-panel-2)) !important;
  color: var(--admin-paper) !important;
}

body[data-admin-theme] .admin-page .danger-button,
body[data-admin-theme] .admin-page .danger-outline-button {
  background:
    linear-gradient(180deg, var(--admin-danger), color-mix(in srgb, var(--admin-danger) 52%, #000000)) !important;
  color: var(--admin-paper) !important;
}

body[data-admin-theme] .admin-page button:disabled,
body[data-admin-theme] .admin-page .disabled-tab,
body[data-admin-theme] .admin-page .admin-tab-button:disabled {
  opacity: 0.52;
  filter: grayscale(0.7) brightness(0.75);
  cursor: not-allowed;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.55) !important;
  transform: rotate(0deg) !important;
}

body[data-admin-theme] .admin-page .ready-button {
  min-height: 104px;
  background:
    linear-gradient(180deg, var(--admin-good), color-mix(in srgb, var(--admin-good) 56%, #0b4e28)) !important;
  color: var(--admin-ink) !important;
  box-shadow: 7px 7px 0 var(--admin-ink), 10px 10px 0 color-mix(in srgb, var(--admin-good) 32%, transparent), 0 0 24px color-mix(in srgb, var(--admin-good) 28%, transparent) !important;
  transform: rotate(0.8deg);
}

body[data-admin-theme] .admin-page input,
body[data-admin-theme] .admin-page select,
body[data-admin-theme] .admin-page textarea {
  border-color: var(--admin-ink);
  background: var(--admin-paper);
  color: var(--admin-ink);
  box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--admin-accent) 23%, transparent), 4px 4px 0 rgba(0, 0, 0, 0.18);
}

body[data-admin-theme] .admin-page .status-pill,
body[data-admin-theme] .admin-page .requirement-icon,
body[data-admin-theme] .admin-page .profile-icon-button,
body[data-admin-theme] .admin-page .profile-avatar-option,
body[data-admin-theme] .admin-page .join-player-avatar,
body[data-admin-theme] .admin-page .fallback-avatar {
  border-color: var(--admin-ink);
  background: var(--admin-accent-2);
  color: var(--admin-ink);
}

body[data-admin-theme] .admin-page .status-pill-good,
body[data-admin-theme] .admin-page .requirement-met .requirement-icon {
  background: var(--admin-good);
  color: var(--admin-ink);
}

body[data-admin-theme] .admin-page .status-pill-waiting,
body[data-admin-theme] .admin-page .requirement-missing .requirement-icon {
  background: var(--admin-accent-2);
  color: var(--admin-ink);
}

body[data-admin-theme] .admin-page .status-pill-paused {
  background: var(--admin-accent);
  color: var(--admin-ink);
}

body[data-admin-theme] .admin-page .status-pill-ended {
  background: var(--admin-danger);
  color: var(--admin-paper);
}

body[data-admin-theme] .admin-page .admin-map,
body[data-admin-theme] .admin-page #adminMap,
body[data-admin-theme] .admin-page .join-qr-image {
  border-color: var(--admin-ink);
  box-shadow: 7px 7px 0 color-mix(in srgb, var(--admin-accent) 25%, transparent), 10px 10px 0 rgba(0, 0, 0, 0.30);
}

body[data-admin-theme] .admin-page .join-player-row {
  border-color: var(--admin-ink);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--admin-accent) 20%, transparent);
}

@media (max-width: 760px) {
  body[data-admin-theme] .admin-page .ready-button {
    min-height: 58px;
  }

  body[data-admin-theme] .admin-page button:not(.profile-icon-button):not(.profile-avatar-option),
  body[data-admin-theme] .admin-page .button-link,
  body[data-admin-theme] .admin-page .admin-tab-button,
  body[data-admin-theme] .admin-page .sub-tab-button {
    box-shadow: 4px 4px 0 var(--admin-ink), 6px 6px 0 color-mix(in srgb, var(--admin-danger) 34%, transparent) !important;
  }
}

/* === Phase 34J.2 Windows Server Admin theme card surface pass === */
body[data-admin-theme] {
  --admin-panel: rgba(18, 12, 10, 0.94);
  --admin-panel-2: rgba(37, 23, 18, 0.92);
  --admin-panel-3: rgba(54, 33, 22, 0.88);
  --admin-card-wash: color-mix(in srgb, var(--admin-accent) 13%, transparent);
  --admin-card-wash-2: color-mix(in srgb, var(--admin-accent-2) 9%, transparent);
  --admin-card-border: color-mix(in srgb, var(--admin-accent) 36%, var(--admin-ink));
  --admin-card-shadow: color-mix(in srgb, var(--admin-accent) 24%, transparent);
}

body[data-admin-theme="neon-80s"],
body[data-admin-theme="retro-arcade"],
body[data-admin-theme="cartoon-chaos"] {
  --admin-panel: rgba(16, 3, 34, 0.96);
  --admin-panel-2: rgba(35, 10, 58, 0.94);
  --admin-panel-3: rgba(58, 16, 84, 0.88);
  --admin-card-wash: rgba(255, 79, 216, 0.16);
  --admin-card-wash-2: rgba(0, 229, 255, 0.11);
}

body[data-admin-theme="tron-sci-fi"],
body[data-admin-theme="laser-tag-arena"],
body[data-admin-theme="alien-invasion"] {
  --admin-panel: rgba(2, 11, 24, 0.96);
  --admin-panel-2: rgba(4, 29, 48, 0.94);
  --admin-panel-3: rgba(8, 44, 69, 0.88);
  --admin-card-wash: rgba(55, 248, 255, 0.14);
  --admin-card-wash-2: rgba(138, 92, 255, 0.13);
}

body[data-admin-theme="zombie-tag"],
body[data-admin-theme="toxic-slime-lab"] {
  --admin-panel: rgba(5, 16, 7, 0.96);
  --admin-panel-2: rgba(17, 34, 11, 0.94);
  --admin-panel-3: rgba(29, 55, 13, 0.88);
  --admin-card-wash: rgba(168, 255, 62, 0.13);
  --admin-card-wash-2: rgba(255, 228, 92, 0.09);
}

body[data-admin-theme="tactical-camo"] {
  --admin-panel: rgba(10, 14, 8, 0.96);
  --admin-panel-2: rgba(30, 39, 20, 0.94);
  --admin-panel-3: rgba(45, 56, 29, 0.88);
  --admin-card-wash: rgba(215, 196, 106, 0.12);
  --admin-card-wash-2: rgba(127, 176, 105, 0.13);
}

body[data-admin-theme="candy-apocalypse"],
body[data-admin-theme="superhero-city"] {
  --admin-panel: rgba(27, 7, 30, 0.96);
  --admin-panel-2: rgba(48, 20, 70, 0.94);
  --admin-panel-3: rgba(65, 30, 91, 0.88);
  --admin-card-wash: rgba(255, 111, 183, 0.15);
  --admin-card-wash-2: rgba(100, 216, 255, 0.10);
}

body[data-admin-theme="pirate-treasure"] {
  --admin-panel: rgba(19, 9, 5, 0.96);
  --admin-panel-2: rgba(45, 24, 8, 0.94);
  --admin-panel-3: rgba(67, 38, 12, 0.88);
  --admin-card-wash: rgba(242, 193, 78, 0.14);
  --admin-card-wash-2: rgba(199, 125, 42, 0.12);
}

body[data-admin-theme] .admin-page {
  --oyd-panel: var(--admin-panel);
  --oyd-panel-2: var(--admin-panel-2);
  --oyd-border: var(--admin-card-border);
  --oyd-yellow: var(--admin-accent-2);
  --oyd-orange: var(--admin-accent);
  --oyd-red: var(--admin-danger);
  --oyd-paper: var(--admin-paper);
  --oyd-cream: var(--admin-muted);
}

body[data-admin-theme] .admin-page .card,
body[data-admin-theme] .admin-page .admin-card {
  background:
    radial-gradient(circle at 14% 8%, var(--admin-card-wash), transparent 32%),
    radial-gradient(circle at 92% 0%, var(--admin-card-wash-2), transparent 28%),
    linear-gradient(180deg, var(--admin-panel), color-mix(in srgb, var(--admin-panel) 72%, #000000));
}

body[data-admin-theme] .admin-page .admin-header,
body[data-admin-theme] .admin-page .admin-section,
body[data-admin-theme] .admin-page .admin-panel,
body[data-admin-theme] .admin-page .admin-status-card,
body[data-admin-theme] .admin-page .admin-item,
body[data-admin-theme] .admin-page .admin-tabs,
body[data-admin-theme] .admin-page .sub-tab-bar,
body[data-admin-theme] .admin-page .nested-admin-section,
body[data-admin-theme] .admin-page .join-qr-card,
body[data-admin-theme] .admin-page .join-player-card,
body[data-admin-theme] .admin-page .ready-requirements,
body[data-admin-theme] .admin-page .ready-requirements-panel,
body[data-admin-theme] .admin-page .platform-status-banner,
body[data-admin-theme] .admin-page .status,
body[data-admin-theme] .admin-page .map-status,
body[data-admin-theme] .admin-page .profile-modal,
body[data-admin-theme] .admin-page .profile-avatar-current-row,
body[data-admin-theme] .admin-page .profile-avatar-grid,
body[data-admin-theme] .admin-page .game-mode-settings-section {
  border-color: var(--admin-ink) !important;
  background:
    radial-gradient(circle at 12% 0%, var(--admin-card-wash), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--admin-panel-2) 82%, var(--admin-accent) 18%), var(--admin-panel-2)) !important;
  color: var(--admin-text);
  box-shadow: 5px 5px 0 var(--admin-card-shadow), 0 14px 36px rgba(0, 0, 0, 0.28);
}

body[data-admin-theme] .admin-page .admin-section .admin-section,
body[data-admin-theme] .admin-page .sub-tab-panel,
body[data-admin-theme] .admin-page .admin-list,
body[data-admin-theme] .admin-page .game-mode-settings-fields,
body[data-admin-theme] .admin-page .join-player-row,
body[data-admin-theme] .admin-page .ready-requirements li,
body[data-admin-theme] .admin-page .profile-showcase-card,
body[data-admin-theme] .admin-page .profile-stat-card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--admin-panel-3) 82%, var(--admin-accent-2) 18%), var(--admin-panel-3)) !important;
  border-color: color-mix(in srgb, var(--admin-accent) 42%, var(--admin-ink)) !important;
  color: var(--admin-text);
}

body[data-admin-theme] .admin-page .join-player-row,
body[data-admin-theme] .admin-page .admin-item,
body[data-admin-theme] .admin-page .ready-requirements li {
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--admin-accent) 18%, transparent);
}

body[data-admin-theme] .admin-page .join-qr-placeholder {
  border-color: color-mix(in srgb, var(--admin-accent-2) 72%, var(--admin-ink)) !important;
  background:
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--admin-accent) 12%, transparent) 0 10px, transparent 10px 20px),
    color-mix(in srgb, var(--admin-panel-3) 86%, black) !important;
  color: var(--admin-text);
}

body[data-admin-theme] .admin-page .admin-map,
body[data-admin-theme] .admin-page #adminMap,
body[data-admin-theme] .admin-page .leaflet-container {
  border-color: var(--admin-ink) !important;
  background:
    radial-gradient(circle at 50% 30%, var(--admin-card-wash), transparent 42%),
    color-mix(in srgb, var(--admin-panel-2) 82%, #000000) !important;
}

body[data-admin-theme] .admin-page label,
body[data-admin-theme] .admin-page .admin-status-title,
body[data-admin-theme] .admin-page .join-player-row,
body[data-admin-theme] .admin-page .admin-item,
body[data-admin-theme] .admin-page .status {
  color: var(--admin-text);
}

body[data-admin-theme] .admin-page code {
  border-color: color-mix(in srgb, var(--admin-accent) 42%, var(--admin-ink));
  background: color-mix(in srgb, var(--admin-panel-3) 76%, black);
  color: var(--admin-accent-2);
}


/* === Phase 34J.4 Windows Server profile modal + scoreboard visual pass === */

/* Profile modal: poster/sticker account file treatment. */
body[data-admin-theme] .profile-modal.card {
  width: min(640px, 96vw) !important;
  padding: 24px 26px 22px !important;
  border: 4px solid var(--admin-ink, #050505) !important;
  border-radius: 6px !important;
  background:
    radial-gradient(circle at 12% 0%, var(--admin-card-wash, rgba(255, 159, 28, 0.14)), transparent 34%),
    radial-gradient(circle at 88% 8%, var(--admin-card-wash-2, rgba(255, 209, 102, 0.11)), transparent 30%),
    linear-gradient(180deg, color-mix(in srgb, var(--admin-panel-2, #251712) 88%, var(--admin-accent, #ff9f1c) 12%), var(--admin-panel, #120c0a)) !important;
  color: var(--admin-text, #fff1d2) !important;
  box-shadow:
    9px 9px 0 var(--admin-ink, #050505),
    13px 13px 0 color-mix(in srgb, var(--admin-accent, #ff9f1c) 35%, transparent),
    0 28px 72px rgba(0, 0, 0, 0.62) !important;
  transform: rotate(-0.45deg);
}

body[data-admin-theme] .profile-modal.card::before {
  content: "PLAYER FILE";
  position: absolute;
  top: -16px;
  left: 20px;
  z-index: 2;
  padding: 6px 12px;
  border: 3px solid var(--admin-ink, #050505);
  border-radius: 3px;
  background: var(--admin-accent-2, #ffd166);
  color: var(--admin-ink, #050505);
  font-size: 0.78rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.44);
  transform: rotate(-2deg);
}

body[data-admin-theme] .profile-modal h2 {
  display: inline-block;
  margin: 4px 48px 14px 0 !important;
  padding: 5px 10px;
  border: 3px solid var(--admin-ink, #050505);
  border-radius: 3px;
  background: var(--admin-accent, #ff9f1c);
  color: var(--admin-ink, #050505) !important;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.36);
  transform: rotate(0.8deg);
}

body[data-admin-theme] .profile-modal label {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 2px solid color-mix(in srgb, var(--admin-accent, #ff9f1c) 48%, var(--admin-ink, #050505));
  border-radius: 5px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--admin-panel-3, #362116) 86%, var(--admin-accent-2, #ffd166) 14%), var(--admin-panel-3, #362116));
  color: var(--admin-text, #fff1d2) !important;
  font-weight: 1000;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--admin-accent, #ff9f1c) 18%, transparent);
}

body[data-admin-theme] .profile-avatar-current-row,
body[data-admin-theme] .profile-avatar-picker-section {
  margin-top: 12px;
  padding: 12px;
  border: 3px solid var(--admin-ink, #050505) !important;
  border-radius: 5px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--admin-panel-3, #362116) 82%, var(--admin-accent, #ff9f1c) 18%), var(--admin-panel-3, #362116)) !important;
  box-shadow: 5px 5px 0 color-mix(in srgb, var(--admin-accent, #ff9f1c) 18%, transparent);
}

body[data-admin-theme] .profile-avatar-current-preview {
  width: 76px;
  height: 76px;
  border: 4px solid var(--admin-ink, #050505) !important;
  border-radius: 5px !important;
  background: var(--admin-accent-2, #ffd166) !important;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.35);
  transform: rotate(-2deg);
}

body[data-admin-theme] .profile-avatar-grid {
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 8px;
  max-height: min(240px, 34vh);
  padding: 12px;
  border: 3px solid var(--admin-ink, #050505) !important;
  border-radius: 5px !important;
  background:
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--admin-accent, #ff9f1c) 8%, transparent) 0 9px, transparent 9px 18px),
    color-mix(in srgb, var(--admin-panel-3, #362116) 84%, #000000) !important;
}

body[data-admin-theme] .profile-avatar-option {
  border-radius: 4px !important;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

body[data-admin-theme] .profile-avatar-option:hover,
body[data-admin-theme] .profile-avatar-option.selected {
  transform: translate(-1px, -1px) rotate(-2deg);
  box-shadow: 5px 5px 0 var(--admin-ink, #050505), 7px 7px 0 color-mix(in srgb, var(--admin-accent, #ff9f1c) 35%, transparent);
  filter: brightness(1.12);
}

body[data-admin-theme] .profile-modal-close {
  top: 12px !important;
  right: 14px !important;
  border: 3px solid var(--admin-ink, #050505) !important;
  border-radius: 4px !important;
  background: var(--admin-danger, #ff3b30) !important;
  color: var(--admin-paper, #fff1d2) !important;
  box-shadow: 4px 4px 0 var(--admin-ink, #050505);
  transform: rotate(3deg);
}

body[data-admin-theme] .profile-actions {
  margin-top: 14px;
}

/* Scoreboard: shared poster/sticker chrome for all mode renderers. */
body.scoreboard-display-body {
  --score-ink: #050505;
  --score-poster-shadow: color-mix(in srgb, var(--score-accent, #ffbd62) 28%, transparent);
  --score-card-glare: color-mix(in srgb, var(--score-accent, #ffbd62) 12%, transparent);
  --score-card-glare-2: color-mix(in srgb, var(--score-border-strong, #ffbd62) 8%, transparent);
}

body.scoreboard-display-body .score-box-card,
body.scoreboard-display-body .round-status-card,
body.scoreboard-display-body .round-timer-box,
body.scoreboard-display-body .team-roster-card,
body.scoreboard-display-body .scoreboard-map-card,
body.scoreboard-display-body .scoreboard-event-strip,
body.scoreboard-display-body .generic-scoreboard-header,
body.scoreboard-display-body .generic-team-card,
body.scoreboard-display-body .scoreboard-controls-panel,
body.scoreboard-display-body .scoreboard-game-notification {
  border: 4px solid var(--score-ink) !important;
  border-radius: 6px !important;
  background:
    radial-gradient(circle at 12% 0%, var(--score-card-glare), transparent 34%),
    radial-gradient(circle at 92% 0%, var(--score-card-glare-2), transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--score-card-bg, rgba(16, 12, 10, 0.82)) 86%, var(--score-accent, #ffbd62) 14%), var(--score-card-bg, rgba(16, 12, 10, 0.82))) !important;
  box-shadow:
    7px 7px 0 var(--score-ink),
    10px 10px 0 var(--score-poster-shadow),
    0 18px 50px rgba(0, 0, 0, 0.42) !important;
}

body.scoreboard-display-body .score-box-card,
body.scoreboard-display-body .team-roster-card,
body.scoreboard-display-body .generic-team-card {
  transform: rotate(-0.35deg);
}

body.scoreboard-display-body .score-box-blue,
body.scoreboard-display-body .team-roster-blue {
  transform: rotate(0.35deg);
}

body.scoreboard-display-body .round-status-card,
body.scoreboard-display-body .scoreboard-map-card,
body.scoreboard-display-body .generic-scoreboard-header {
  transform: rotate(0deg);
}

body.scoreboard-display-body .round-timer-box {
  border-color: var(--score-ink) !important;
  color: var(--score-ink) !important;
  background:
    linear-gradient(180deg, var(--score-accent, #ffbd62), color-mix(in srgb, var(--score-accent, #ffbd62) 66%, #000000)) !important;
  text-shadow: none !important;
}

body.scoreboard-display-body .score-box-label,
body.scoreboard-display-body .team-roster-title,
body.scoreboard-display-body .scoreboard-map-title,
body.scoreboard-display-body .scoreboard-event-strip-label,
body.scoreboard-display-body .generic-team-name {
  display: inline-block;
  justify-self: center;
  padding: 4px 9px;
  border: 2px solid var(--score-ink);
  border-radius: 3px;
  background: var(--score-accent, #ffbd62);
  color: var(--score-ink) !important;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.42);
}

body.scoreboard-display-body .round-status-primary,
body.scoreboard-display-body .score-box-value,
body.scoreboard-display-body .generic-team-score {
  color: var(--score-accent, #ffbd62) !important;
  text-shadow: 3px 3px 0 var(--score-ink), 0 0 18px color-mix(in srgb, var(--score-accent, #ffbd62) 28%, transparent) !important;
}

body.scoreboard-display-body .round-status-secondary,
body.scoreboard-display-body .score-box-meta,
body.scoreboard-display-body .roster-player-stats,
body.scoreboard-display-body .generic-scoreboard-header p,
body.scoreboard-display-body .scoreboard-event-chip {
  color: var(--score-muted, #d2bfaa) !important;
}

body.scoreboard-display-body .roster-player-card,
body.scoreboard-display-body .team-player-row,
body.scoreboard-display-body .scoreboard-event-chip,
body.scoreboard-display-body .scoreboard-event-row {
  border: 2px solid color-mix(in srgb, var(--score-accent, #ffbd62) 34%, var(--score-ink)) !important;
  border-radius: 5px !important;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--score-card-bg-soft, rgba(16, 12, 10, 0.74)) 82%, var(--score-accent, #ffbd62) 18%), var(--score-card-bg-soft, rgba(16, 12, 10, 0.74))) !important;
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--score-accent, #ffbd62) 18%, transparent);
}

body.scoreboard-display-body .scoreboard-map-wrap,
body.scoreboard-display-body .scoreboard-leaflet-map,
body.scoreboard-display-body .scoreboard-map-center .leaflet-container {
  border: 3px solid var(--score-ink) !important;
  border-radius: 5px !important;
  background:
    radial-gradient(circle at 50% 24%, color-mix(in srgb, var(--score-accent, #ffbd62) 12%, transparent), transparent 40%),
    rgba(0, 0, 0, 0.34) !important;
}

body.scoreboard-display-body .scoreboard-map-center,
body.scoreboard-display-body .scoreboard-map-center .scoreboard-leaflet-map,
body.scoreboard-display-body .scoreboard-map-center .leaflet-container {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

body.scoreboard-display-body .scoreboard-event-strip {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

body.scoreboard-display-body .scoreboard-controls-gear,
body.scoreboard-display-body .scoreboard-control-button,
body.scoreboard-display-body .scoreboard-controls-close {
  border: 3px solid var(--score-ink) !important;
  border-radius: 5px !important;
  background: linear-gradient(180deg, var(--score-accent, #ffbd62), color-mix(in srgb, var(--score-accent, #ffbd62) 62%, #000000)) !important;
  color: var(--score-ink) !important;
  font-weight: 1000;
  box-shadow: 5px 5px 0 var(--score-ink), 7px 7px 0 var(--score-poster-shadow) !important;
}

body.scoreboard-display-body .scoreboard-control-button.stop {
  background: linear-gradient(180deg, var(--score-red, #e05a3b), color-mix(in srgb, var(--score-red, #e05a3b) 58%, #000000)) !important;
  color: #fff8ed !important;
}

/* Mode-specific scoreboard personality on top of selected theme variables. */
body.scoreboard-display-body .ghost-hunt-board {
  --score-accent: #b987ff;
  --score-border: rgba(185, 135, 255, 0.46);
  --score-border-strong: rgba(98, 247, 255, 0.78);
  --score-card-bg: rgba(13, 8, 31, 0.86);
  --score-card-bg-soft: rgba(23, 12, 45, 0.78);
  --score-card-glare: rgba(185, 135, 255, 0.13);
  --score-card-glare-2: rgba(98, 247, 255, 0.10);
}

body.scoreboard-display-body .zombie-extraction-board {
  --score-accent: #a8ff3e;
  --score-border: rgba(168, 255, 62, 0.46);
  --score-border-strong: rgba(255, 228, 92, 0.76);
  --score-card-bg: rgba(5, 18, 7, 0.88);
  --score-card-bg-soft: rgba(17, 34, 11, 0.80);
  --score-card-glare: rgba(168, 255, 62, 0.12);
  --score-card-glare-2: rgba(255, 228, 92, 0.09);
}

body.scoreboard-display-body .zombie-live-map-status,
body.scoreboard-display-body .team-roster-empty,
body.scoreboard-display-body .scoreboard-loading,
body.scoreboard-display-body .scoreboard-error,
body.scoreboard-display-body .scoreboard-map-empty,
body.scoreboard-display-body .scoreboard-empty-list {
  border: 3px dashed color-mix(in srgb, var(--score-accent, #ffbd62) 45%, var(--score-ink)) !important;
  border-radius: 5px !important;
  background: color-mix(in srgb, var(--score-card-bg-soft, rgba(16, 12, 10, 0.74)) 78%, #000000) !important;
  color: var(--score-muted, #d2bfaa) !important;
  font-weight: 900;
}

@media (max-width: 900px) {
  body.scoreboard-display-body .scoreboard-map-center,
  body.scoreboard-display-body .scoreboard-map-center .scoreboard-leaflet-map,
  body.scoreboard-display-body .scoreboard-map-center .leaflet-container,
  body.scoreboard-display-body .scoreboard-event-strip {
    border-radius: 5px !important;
  }
}

/* Phase 36D.19: Zombie Tag achievement/stat parity keeps scoreboard role colors. Survivors are green, zombies are red. */
.zombie-tag-board {
  --zombie-tag-survivor: #54d979;
  --zombie-tag-zombie: #ff4c4c;
}

.zombie-tag-board .score-box-zombie-survivors,
.zombie-tag-board .team-roster-zombie-survivors {
  border-color: color-mix(in srgb, var(--zombie-tag-survivor) 68%, var(--score-border)) !important;
}

.zombie-tag-board .score-box-zombie-zombies,
.zombie-tag-board .team-roster-zombie-zombies {
  border-color: color-mix(in srgb, var(--zombie-tag-zombie) 70%, var(--score-border)) !important;
}

.zombie-tag-board .score-box-zombie-survivors .score-box-value,
.zombie-tag-board .team-roster-zombie-survivors .team-roster-empty {
  color: var(--zombie-tag-survivor) !important;
}

.zombie-tag-board .score-box-zombie-zombies .score-box-value,
.zombie-tag-board .team-roster-zombie-zombies .team-roster-empty {
  color: var(--zombie-tag-zombie) !important;
}

.roster-player-card.team-colored {
  border-color: color-mix(in srgb, var(--team-color, var(--score-accent)) 46%, rgba(255,255,255,0.12));
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--team-color, var(--score-accent)) 20%, transparent), transparent 44%),
    rgba(255,255,255,0.05);
}

.roster-player-card.team-colored .roster-player-status {
  border-color: color-mix(in srgb, var(--team-color, var(--score-accent)) 42%, transparent);
  background: color-mix(in srgb, var(--team-color, var(--score-accent)) 18%, transparent);
  color: color-mix(in srgb, var(--team-color, var(--score-accent)) 82%, #ffffff);
}

.zombie-tag-board .roster-player-card.zombie-player .roster-player-name,
.zombie-tag-board .roster-player-card.zombie-player .roster-player-status {
  color: var(--zombie-tag-zombie) !important;
}

.zombie-tag-board .roster-player-card.survivor-player .roster-player-name,
.zombie-tag-board .roster-player-card.survivor-player .roster-player-status {
  color: var(--zombie-tag-survivor) !important;
}

.leaflet-player-marker.zombie-player span {
  background: #ff4c4c !important;
  box-shadow: 0 0 14px rgba(255, 76, 76, 0.9) !important;
}

.leaflet-player-marker.survivor-player span {
  background: #54d979 !important;
  box-shadow: 0 0 14px rgba(84, 217, 121, 0.85) !important;
}


/* === Phase 36D.38.11 Windows Host header version badge === */
.admin-page .admin-header h1 .admin-version-badge {
  display: inline-block;
  margin-left: 0.45rem;
  font-size: clamp(0.58rem, 1.15vw, 0.82rem);
  line-height: 1;
  letter-spacing: 0.08em;
  vertical-align: middle;
  opacity: 0.78;
  text-transform: none;
  white-space: nowrap;
  text-shadow: 2px 2px 0 var(--oyd-ink), 0 0 8px rgba(180, 126, 255, 0.35);
}

/* === Phase 44D.46 server lobby/scoreboard host-control polish === */
.admin-page .join-players-two-column,
.admin-page .join-team-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.admin-page .join-team-column {
  min-width: 0;
  padding: 12px;
  border: 2px solid color-mix(in srgb, var(--team-color, #ffbd62) 64%, rgba(255,255,255,0.24));
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--team-color, #ffbd62) 20%, transparent), transparent 42%),
    rgba(0, 0, 0, 0.18);
}

.admin-page .join-team-column-wide {
  grid-column: 1 / -1;
}

.admin-page .join-team-column h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-page .join-team-column .team-color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--team-color, #ffbd62);
  box-shadow: 0 0 14px color-mix(in srgb, var(--team-color, #ffbd62) 55%, transparent);
}

.admin-page .join-team-empty {
  margin: 8px 0;
}

.admin-confirm-modal,
.scoreboard-confirm-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 100500;
}

.admin-confirm-backdrop,
.scoreboard-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(5px);
}

.admin-confirm-panel,
.scoreboard-confirm-panel {
  position: relative;
  width: min(520px, calc(100vw - 36px));
  padding: 24px;
  border: 3px solid var(--score-border-strong, rgba(255, 255, 255, 0.45));
  border-radius: 26px;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.13), transparent 34%),
    linear-gradient(145deg, rgba(36, 16, 58, 0.98), rgba(14, 8, 25, 0.98));
  color: var(--score-text, #fff8ed);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.78), 0 0 24px rgba(255, 79, 216, 0.24);
  text-align: center;
}

.admin-confirm-kicker,
.scoreboard-confirm-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 209, 102, 0.48);
  border-radius: 999px;
  color: #ffd166;
  font-size: 0.74rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 209, 102, 0.12);
}

.admin-confirm-panel h2,
.scoreboard-confirm-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-confirm-panel p,
.scoreboard-confirm-panel p {
  margin: 0 0 20px;
  color: rgba(255, 248, 237, 0.78);
  font-weight: 800;
  line-height: 1.45;
}

.admin-confirm-actions,
.scoreboard-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.scoreboard-control-button.rematch {
  background: linear-gradient(135deg, rgba(90, 224, 151, 0.42), rgba(69, 163, 255, 0.22));
}

.scoreboard-control-button.secondary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
}

@media (max-width: 700px) {
  .admin-page .join-players-two-column,
  .admin-page .join-team-columns,
  .admin-confirm-actions,
  .scoreboard-confirm-actions {
    grid-template-columns: 1fr;
  }
}

/* Phase 45D.1 — shared inaccessible-report scoreboard delivery and decisions. */
.scoreboard-inaccessible-report-tray {
  position: fixed;
  z-index: 2500;
  top: 76px;
  right: 18px;
  width: min(390px, calc(100vw - 36px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  padding: 10px;
  border: 4px solid var(--score-ink, #050505);
  border-radius: 6px;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--score-accent, #ffbd62) 16%, transparent), transparent 34%),
    color-mix(in srgb, var(--score-card-bg, #17110d) 94%, #000 6%);
  box-shadow: 7px 7px 0 var(--score-ink, #050505), 10px 10px 0 color-mix(in srgb, var(--score-accent, #ffbd62) 28%, transparent);
}

.scoreboard-inaccessible-report-tray.hidden {
  display: none;
}

.scoreboard-inaccessible-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--score-text, #fff);
  font-size: 0.95rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.scoreboard-inaccessible-report-count {
  min-width: 30px;
  padding: 3px 8px;
  border: 2px solid var(--score-ink, #050505);
  border-radius: 999px;
  background: var(--score-accent, #ffbd62);
  color: var(--score-ink, #050505);
  text-align: center;
}

.scoreboard-inaccessible-report-count.pending {
  background: #ffb13b;
  animation: scoreboard-report-pulse 1.1s ease-in-out infinite alternate;
}

.scoreboard-inaccessible-report-list {
  display: grid;
  gap: 8px;
}

.scoreboard-inaccessible-report-card {
  padding: 9px 10px;
  border: 2px solid color-mix(in srgb, var(--score-accent, #ffbd62) 45%, var(--score-ink, #050505));
  border-radius: 5px;
  background: color-mix(in srgb, var(--score-card-bg-soft, #20170f) 88%, var(--score-accent, #ffbd62) 12%);
  color: var(--score-text, #fff);
}

.scoreboard-inaccessible-report-card.status-auto_resolved,
.scoreboard-inaccessible-report-card.status-accepted {
  border-color: #5fe58b;
}

.scoreboard-inaccessible-report-card.status-rejected,
.scoreboard-inaccessible-report-card.status-cooldown_rejected,
.scoreboard-inaccessible-report-card.status-declined {
  border-color: #ff6b61;
}

.scoreboard-inaccessible-report-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
}

.scoreboard-inaccessible-report-title span {
  color: var(--score-accent, #ffbd62);
  font-weight: 900;
  text-transform: uppercase;
}

.scoreboard-inaccessible-report-objective {
  margin-top: 2px;
  font-weight: 900;
}

.scoreboard-inaccessible-report-message {
  margin-top: 4px;
  color: var(--score-muted, #d2bfaa);
  font-size: 0.82rem;
  line-height: 1.25;
}

@keyframes scoreboard-report-pulse {
  from { transform: scale(1); filter: brightness(1); }
  to { transform: scale(1.08); filter: brightness(1.18); }
}

@media (max-width: 700px) {
  .scoreboard-inaccessible-report-tray {
    top: 66px;
    right: 10px;
    width: min(350px, calc(100vw - 20px));
  }
}


/* Phase 45D.1 — host-reviewed Zombie Extraction report decisions. */
.scoreboard-inaccessible-report-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
}

.scoreboard-inaccessible-report-actions button {
  min-height: 38px;
  border: 3px solid var(--score-ink, #050505);
  border-radius: 4px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 1000;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--score-ink, #050505);
}

.scoreboard-inaccessible-report-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
  box-shadow: none;
  transform: translate(2px, 2px);
}

.scoreboard-report-accept { background: #5fe58b; color: #050505; }
.scoreboard-report-decline { background: #ff6b61; color: #050505; }


/* Phase 45D.1.6 — served-scoreboard runtime proof and report-link state. */
.scoreboard-runtime-badge {
  position: fixed;
  left: 10px;
  bottom: 10px;
  z-index: 100200;
  display: grid;
  gap: 2px;
  padding: 6px 9px;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 5px;
  background: rgba(0,0,0,.82);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .04em;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow: 3px 3px 0 rgba(0,0,0,.65);
}
.scoreboard-runtime-badge strong { color: #ffd166; }
.scoreboard-runtime-badge[data-report-state="online"] strong { color: #70ef9b; }
.scoreboard-runtime-badge[data-report-state="pending"] strong { color: #ffb13b; }
.scoreboard-runtime-badge[data-report-state="offline"] strong { color: #ff6b61; }
body.scoreboard-display-body .scoreboard-inaccessible-report-tray {
  z-index: 100150 !important;
}


/* Phase 45D.2 — Named Horde scoreboard roll call. */
.zombie-extraction-board .zombie-horde-grid {
  gap: 7px;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 5px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--score-accent) 70%, #000) rgba(0, 0, 0, 0.25);
}

.zombie-extraction-board .zombie-horde-grid::-webkit-scrollbar {
  width: 8px;
}

.zombie-extraction-board .zombie-horde-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
}

.zombie-extraction-board .zombie-horde-grid::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--score-accent) 70%, #000);
  border-radius: 999px;
}

.zombie-extraction-board .zombie-horde-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name status"
    "stats status";
  align-items: center;
  gap: 3px 8px;
  padding: 8px 9px 7px;
  border-color: color-mix(in srgb, #a8ff3e 38%, var(--score-ink)) !important;
  background:
    linear-gradient(180deg, rgba(168, 255, 62, 0.12), rgba(4, 16, 7, 0.88)) !important;
}

.zombie-extraction-board .zombie-horde-row .roster-player-name {
  grid-area: name;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #efffdc;
}

.zombie-extraction-board .zombie-horde-row .roster-player-stats {
  grid-area: stats;
  font-size: 0.69rem;
}

.zombie-extraction-board .zombie-horde-row .roster-player-status {
  grid-area: status;
  justify-self: end;
  align-self: center;
  padding: 3px 6px;
  color: #dfffc1;
  border-color: rgba(168, 255, 62, 0.42);
  background: rgba(68, 116, 31, 0.28);
}
