/* Bullseye -- shares Greenly's shell (sidebar, mobile tab bar, cards, dialogs,
   leaderboard rows) on a charcoal field with dartboard-green accents. */
:root {
  color-scheme: dark;
  
  --surface-1: #1B1B1E;
  --surface-2: #252528;
  --page: #111113;
  --text-primary: #F3F0F0;
  --text-secondary: #B0AAB0;
  --text-muted: #847E86;
  --border: rgba(255, 255, 255, 0.09);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 28px -12px rgba(0, 0, 0, 0.7);

  
  --accent: #C2503A;
  --accent-2: color-mix(in srgb, #C2503A 80%, white);
  --accent-track: color-mix(in srgb, #C2503A 24%, #1B1B1E);
  --accent-ink: #ffffff;
  --gold: #EDA189;
  --gold-ink: #3D130C;

  
  --under: #c81e2c;
  --over: var(--accent);
  --critical: #c0392b;

  
  --field-ink: #ffffff;
  --field-ink-muted: rgba(255, 255, 255, 0.72);
  --field-border: rgba(255, 255, 255, 0.16);
  --field-glow: #2a2a2e;

  --floor-fill: #f6f2ea;
  --wall-stroke: #3b4a41;
}
* {
  box-sizing: border-box;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter/inter-variable-latin.woff2") format("woff2");
}
:root {
  --font-display: "Oswald", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html,
body {
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
* {
  -webkit-tap-highlight-color: transparent;
}
a,
button,
select,
label,
summary,
[role="button"] {
  touch-action: manipulation;
}
button {
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--text-primary);
  font: 15px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
a {
  color: inherit;
}
@media (prefers-reduced-motion: reduce) {
  *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      scroll-behavior: auto !important;
    }
}
.page-loading {
  min-height: 220px;
  padding: 30px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-mark {
  width: 64px;
  height: 64px;
  overflow: visible;
}
.loading-bar {
  animation-duration: 1.8s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.loading-bar-tb {
  animation-name: clSlideTB;
}
.loading-bar-mid {
  animation-name: clSlideMid;
  animation-delay: 0.22s;
}
.loading-bar-tb-2 {
  animation-delay: 0.43s;
}
@keyframes clSlideTB {
  0% {
    transform: translateX(18px);
    opacity: 0;
  }
  18% {
    transform: translateX(0);
    opacity: 1;
  }
  78% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(18px);
    opacity: 0;
  }
}
@keyframes clSlideMid {
  0% {
    transform: translateX(-18px);
    opacity: 0;
  }
  18% {
    transform: translateX(0);
    opacity: 1;
  }
  78% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-18px);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-bar {
      animation: none;
      opacity: 1;
      transform: none;
    }
}
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes rowIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 220px;
  flex: none;
  background: color-mix(in srgb, var(--page) 70%, black);
  border-right: 1px solid var(--field-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
  transition: width 0.18s ease;
}
@media (prefers-reduced-motion: reduce) {
  .sidebar {
      transition: none;
    }
}
.sidebar-collapse-btn {
  position: absolute;
  top: 22px;
  right: -12px;
  z-index: 10;
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  border: none;
  border-radius: 50%;
  color: var(--gold-ink);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.sidebar-collapse-btn:hover {
  filter: brightness(1.07);
}
.sidebar-collapse-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}
@media (min-width: 761px) {
  .sidebar.collapsed .sidebar-collapse-btn svg {
      transform: rotate(180deg);
    }
  .sidebar.collapsed {
      width: 72px;
    }
  .sidebar.collapsed .brand {
      justify-content: center;
      padding-left: 0;
      padding-right: 0;
    }
  .sidebar.collapsed .brand-name,
    .sidebar.collapsed .nav-item span,
    .sidebar.collapsed .coats-credit-text {
      display: none;
    }
  .sidebar.collapsed .coats-credit {
      justify-content: center;
      padding: 0;
      gap: 0;
    }
  .sidebar.collapsed .nav-item {
      position: relative;
      justify-content: center;
      gap: 0;
      padding-left: 0;
      padding-right: 0;
    }
  .sidebar.collapsed .nav-item:hover span,
    .sidebar.collapsed .nav-item:focus-visible span {
      display: block;
      position: absolute;
      left: calc(100% + 10px);
      top: 50%;
      transform: translateY(-50%);
      background: var(--surface-1);
      color: var(--text-primary);
      font-size: 12.5px;
      font-weight: 600;
      white-space: nowrap;
      padding: 6px 10px;
      border-radius: 8px;
      box-shadow: var(--shadow-md);
      pointer-events: none;
      z-index: 20;
    }
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--field-ink);
}
.brand-mark {
  display: block;
  flex-shrink: 0;
}
.brand-mark-dark {
  display: block;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--field-ink-muted);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--field-ink);
}
.nav-item.active {
  background: var(--gold);
  color: var(--gold-ink);
}
.nav-icon {
  width: 22px;
  height: 22px;
  flex: none;
}
.coats-credit {
  width: 100%;
  margin: 10px 0 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--field-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: left;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.coats-credit:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--field-ink);
}
.coats-credit-mark svg {
  width: 24px;
  height: 24px;
  display: block;
}
.coats-credit-mobile {
  display: none;
  flex: none;
  color: var(--field-ink-muted);
  margin-top: 4px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.coats-credit-mobile:hover {
  color: var(--field-ink);
}
.coats-labs-dialog {
  max-width: 480px;
  padding: 24px 24px 20px;
  gap: 18px;
}
.coats-labs-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.coats-labs-head .event-dialog-title {
  letter-spacing: 0.02em;
}
.coats-labs-mark {
  width: 26px;
  height: 26px;
  flex: none;
  margin-top: 2px;
  color: var(--accent);
}
.coats-labs-tagline {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
}
.coats-labs-divider {
  height: 1px;
  background: var(--border);
}
.coats-labs-apps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.coats-app-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}
.coats-app-link:hover {
  background: var(--surface-2);
}
.coats-app-tile {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.coats-app-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.coats-app-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}
.coats-app-here {
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-track);
  color: var(--accent);
}
.coats-app-desc {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-secondary);
}
.coats-app-out {
  flex: none;
  margin-top: 3px;
  color: var(--text-muted);
}
.coats-credit-mobile svg {
  width: 24px;
  height: 24px;
  display: block;
}
.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  padding: calc(22px + env(safe-area-inset-top, 0px)) 32px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.topbar-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.01em;
  color: var(--field-ink);
}
main {
  max-width: 1600px;
  padding: 24px 32px 56px;
}
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-md);
  margin-bottom: 14px;
  animation: cardIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.card h2,
.card h3 {
  margin-top: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
button.btn.gold {
  background: var(--gold);
  color: var(--gold-ink);
}
button.btn.danger {
  background: var(--critical);
  color: #fff;
}
.text-link,
.text-link-field {
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link {
  color: var(--accent);
}
.text-link-field {
  color: var(--gold);
}
.round-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--field-ink-muted);
  cursor: pointer;
  padding: 8px 0;
}
.back-link:hover {
  color: var(--field-ink);
}
.more-menu-wrap {
  position: relative;
}
.more-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--field-border);
  background: transparent;
  color: var(--field-ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.more-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.more-menu {
  position: absolute;
  right: 0;
  top: 46px;
  min-width: 200px;
  background: var(--surface-1);
  border-radius: 10px;
  box-shadow: 0 16px 40px -12px rgba(0, 20, 12, 0.55);
  padding: 6px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.more-menu-item {
  text-align: left;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.more-menu-item:hover {
  background: var(--surface-2);
}
.more-menu-item.danger {
  color: var(--critical);
}
.more-menu-item.danger:hover {
  background: color-mix(in srgb, var(--critical) 12%, var(--surface-1));
}
.more-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}
.round-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 20px;
  margin-top: 14px;
}
.round-title-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.round-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.round-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.05;
  color: var(--field-ink);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.event-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 22, 14, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.event-dialog {
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface-1);
  border-radius: 12px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.event-dialog-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  text-transform: uppercase;
  color: var(--text-primary);
}
.event-dialog-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.event-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
.stat-card {
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.stat-card .value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: var(--accent);
}
.stat-card .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
form.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}
.checkbox-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: none;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--accent);
  cursor: pointer;
}
input,
select,
textarea {
  font: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-primary);
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.row > * {
  flex: 1;
  min-width: 140px;
}
button.btn {
  font: inherit;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.15s ease;
}
button.btn:hover {
  filter: brightness(1.07);
}
button.btn:active {
  transform: translateY(1px) scale(0.98);
}
button.btn.secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
button.btn-sm {
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 8px;
}
.standings-card {
  padding: 0;
  overflow: hidden;
}
.standings-card-header {
  padding: 16px 18px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}
.standings-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  text-transform: uppercase;
  color: var(--text-primary);
}
.standings-list {
  display: flex;
  flex-direction: column;
}
.standings-row-block {
  border-top: 1px solid var(--border);
}
.standings-row {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
}
.standings-row:hover {
  background: var(--surface-2);
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--field-ink);
}
.live-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  animation: livePulse 2s ease-in-out infinite;
}
.live-pill.offline::before {
  background: var(--gold);
  animation: none;
}
@keyframes livePulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
.standings-row-static {
  cursor: default;
}
.standings-row-static:hover {
  background: none;
}
.rank-badge {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  background: var(--surface-2);
  color: var(--text-secondary);
}
.rank-badge.gold {
  background: #fdf1c7;
  color: #8a6d00;
}
.rank-badge.silver {
  background: #eef0ee;
  color: #4a544e;
}
.rank-badge.bronze {
  background: #f5e4d7;
  color: #8a4a1f;
}
.standings-row-identity {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.standings-row-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.standings-row-sub {
  font-size: 12px;
  color: var(--text-secondary);
}
.standings-row-points {
  flex: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--text-primary);
  min-width: 56px;
  text-align: right;
}
.standings-row-points .unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 3px;
}
.standings-row-chevron {
  flex: none;
  color: var(--text-muted);
  display: flex;
  transition: transform 0.15s ease;
}
.standings-row-chevron.is-open {
  transform: rotate(90deg);
}
.standings-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.standings-header > .season-pills {
  margin-right: auto;
}
.manage-players-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--field-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
}
.manage-players-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.manage-player-list {
  display: flex;
  flex-direction: column;
}
.manage-player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--border);
}
.manage-player-name {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}
.manage-player-add {
  display: flex;
  gap: 8px;
}
.manage-player-add input {
  flex: 1;
  height: 40px;
}
.manage-player-add button {
  flex: none;
  height: 40px;
}
@media (max-width: 480px) {
  .standings-header {
      align-items: stretch;
    }
  .manage-players-btn {
      justify-content: center;
    }
}
@media (max-width: 720px) {
  .sidebar-panel {
      flex: 1;
      min-width: 0;
    }
}
.empty {
  color: var(--text-muted);
  text-align: center;
  padding: 30px 10px;
}
@media (max-width: 760px) {
  .app-shell {
      flex-direction: column;
    }
  .sidebar {
      position: fixed;
      top: auto;
      bottom: 0;
      left: 0;
      right: 0;
      width: 100%;
      height: auto;
      flex-direction: row;
      align-items: center;
      gap: 2px;
      padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
      border-right: none;
      border-top: 1px solid var(--field-border);
      background: color-mix(in srgb, color-mix(in srgb, var(--page) 70%, black) 92%, transparent);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
    }
  .sidebar-collapse-btn,
    .brand,
    .coats-credit {
      display: none;
    }
  .coats-credit-mobile {
      display: flex;
    }
  .side-nav {
      flex-direction: row;
      flex: 1;
      gap: 0;
    }
  .nav-item {
      flex: 1;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2px;
      padding: 6px 2px;
      font-size: 10.5px;
      text-align: center;
      white-space: nowrap;
    }
  .nav-icon {
      width: 20px;
      height: 20px;
    }
  .nav-item:hover {
      background: transparent;
      color: var(--field-ink-muted);
    }
  .nav-item.active,
    .nav-item.active:hover {
      background: transparent;
      color: var(--gold);
    }
  input,
    select,
    textarea {
      font-size: 16px;
    }
  main {
      padding-bottom: calc(90px + env(safe-area-inset-bottom));
    }
}
@media (max-width: 760px) {
  .topbar {
      padding-top: 14px;
    }
}

/* ==== Bullseye-specific ================================================= */
:root {
  --hot: #9C3524;
}

/* Wordmark in the brand package is Inter 500, tight tracking. */
.brand {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 10px;
  color: var(--field-ink);
}
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
button.btn.hot {
  background: var(--hot);
  color: #fff;
}
button.btn.lg {
  font-size: 16px;
  padding: 12px 20px;
}
button.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  transform: none;
}
.on-field-link {
  color: var(--field-ink-muted);
  font-size: 13px;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.on-field-link:hover {
  color: var(--field-ink);
}

/* ---- Match list rows ---- */
.match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.match-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.match-row:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.match-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.match-row-title {
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.match-row-title .vs {
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 5px;
}
.match-row-meta {
  font-size: 12.5px;
  color: var(--text-secondary);
}
.match-score {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--text-primary);
  white-space: nowrap;
}
.match-score .dash {
  color: var(--text-muted);
  margin: 0 3px;
}
.badge-live {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hot) 14%, var(--surface-1));
  color: var(--hot);
  white-space: nowrap;
}

/* ---- Live match: scoreboard ---- */
.scoreboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.side-card {
  position: relative;
  background: var(--surface-1);
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 14px 16px 14px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.side-card.active {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.side-card.winner {
  border-color: var(--accent);
}
.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.side-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.throwing-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--gold-ink);
  white-space: nowrap;
}
.side-remaining {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 72px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.side-remaining.checkable {
  color: var(--hot);
}
.side-players {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 13px;
  color: var(--text-secondary);
}
.side-players .p {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.side-players .p.now {
  color: var(--text-primary);
  font-weight: 700;
}
.side-players .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.side-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.side-meta b {
  color: var(--text-primary);
  font-weight: 700;
}
.legs-dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.legs-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: inline-block;
}
.legs-dots i.won {
  background: var(--accent);
  border-color: var(--accent);
}

/* ---- Live match: body ---- */
.match-body {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}
.match-body > .card {
  margin-bottom: 0;
}
.keeper-card {
  flex: 1 1 360px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.history-card {
  flex: 1 1 300px;
  max-width: 480px;
}
.keeper-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.keeper-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.keeper-thrower {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--text-primary);
}
.seg {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.seg button {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.seg button.on {
  background: var(--accent);
  color: var(--accent-ink);
}
.checkout-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--gold) 22%, var(--surface-1));
  color: var(--gold-ink);
  font-size: 13.5px;
  font-weight: 600;
}
.checkout-hint b {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.03em;
}
.entry-display {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  min-height: 64px;
}
.entry-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.entry-value.empty-val {
  color: var(--text-muted);
}
.entry-after {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: right;
}
.entry-after b {
  color: var(--text-primary);
}
.entry-after .bad {
  color: var(--hot);
  font-weight: 700;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.key {
  font: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.key:active {
  transform: scale(0.97);
  background: var(--surface-2);
}
.key.fn {
  font-size: 15px;
  font-family: inherit;
  font-weight: 700;
  color: var(--text-secondary);
}
.key.go {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  font-size: 17px;
  font-family: inherit;
}
.key:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.quick-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quick-scores button {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-primary);
  cursor: pointer;
}
.keeper-actions {
  display: flex;
  gap: 8px;
}
.keeper-actions button {
  flex: 1;
}
.dart-chips {
  display: flex;
  gap: 8px;
  min-height: 40px;
}
.dart-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px dashed var(--border);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--text-muted);
}
.dart-chip.filled {
  border-style: solid;
  background: var(--surface-1);
  color: var(--text-primary);
}
.dart-chip.filled.t {
  border-color: var(--hot);
  color: var(--hot);
}
.dart-chip.filled.d {
  border-color: var(--accent);
  color: var(--accent);
}
.mult-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mult-row button {
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-primary);
  cursor: pointer;
}
.mult-row button.on {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}
.mult-row button.on.t {
  background: var(--hot);
}

/* ---- History ---- */
.visit-list {
  display: flex;
  flex-direction: column;
}
.visit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.visit-row:first-child {
  border-top: none;
}
.visit-who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.visit-who b {
  font-weight: 700;
}
.visit-who span {
  font-size: 12px;
  color: var(--text-secondary);
}
.visit-total {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  min-width: 44px;
  text-align: right;
}
.visit-total.bust {
  color: var(--hot);
  font-size: 15px;
  font-family: inherit;
  font-weight: 700;
  text-transform: uppercase;
}
.visit-total.big {
  color: var(--hot);
}
.visit-left {
  min-width: 52px;
  text-align: right;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.winner-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--gold);
  color: var(--gold-ink);
  margin-bottom: 16px;
}
.winner-banner .w-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  text-transform: uppercase;
}
.winner-banner .w-sub {
  font-size: 13.5px;
  font-weight: 600;
}
.winner-banner .btn {
  background: var(--gold-ink);
  color: var(--gold);
}

/* ---- New match dialog ---- */
.dialog-wide {
  max-width: 520px;
}
.side-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.side-picker-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.side-picker select {
  width: 100%;
}
.form-note {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 0;
}
.form-error {
  font-size: 13px;
  font-weight: 600;
  color: var(--hot);
  margin: 0;
}
.inline-add {
  display: flex;
  gap: 8px;
}
.inline-add input {
  flex: 1;
  min-width: 0;
}
.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.stat-table th,
.stat-table td {
  padding: 10px 8px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.stat-table th:first-child,
.stat-table td:first-child {
  text-align: left;
}
.stat-table th {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-table td.name {
  font-weight: 700;
}
.table-scroll {
  overflow-x: auto;
}

@media (max-width: 760px) {
  .side-remaining {
    font-size: 56px;
  }
  .keeper-card,
  .history-card {
    max-width: none;
  }
  .scoreboard {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .scoreboard.one-col {
    grid-template-columns: 1fr;
  }
  .side-card {
    padding: 12px;
  }
}

.round-subline {
  margin-top: 4px;
  font-size: 14px;
  color: var(--field-ink-muted);
}
.quick-scores {
  margin-top: 2px;
}

/* ---- Cricket ---- */
.cricket-card {
  margin-bottom: 16px;
  padding: 10px 14px 6px;
}
.cricket-grid {
  display: grid;
  align-items: center;
  justify-items: center;
}
.cg-head {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 4px 0 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cg-head.active {
  color: var(--hot);
}
.cg-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--text-primary);
  width: 100%;
  text-align: center;
  padding: 7px 0;
  border-top: 1px solid var(--border);
}
.cg-cell {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
}
.cg-cell.scoring {
  color: var(--hot);
}
.cg-cell.dead,
.cg-num.dead {
  opacity: 0.35;
}

.cricket-card .cricket-grid {
  max-width: 560px;
  margin: 0 auto;
}

/* ---- New match: format controls ---- */
.seg {
  flex-wrap: wrap;
}
.side-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.side-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.side-remove {
  color: var(--text-muted);
}
.mini-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mini-stepper button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-primary);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.mini-stepper button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.mini-stepper span {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
}

/* ---- Tap-to-score: cricket table + dartboard ---- */
.cricket-turn {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.cricket-status {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: right;
}
.cricket-status b {
  color: var(--text-primary);
}
.cricket-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 6px;
}
.cricket-hint {
  margin: 8px 0 2px;
  text-align: center;
}
.cricket-card .dart-chips {
  min-height: 34px;
}
.cricket-card .dart-chip {
  font-size: 17px;
}
.cg-cell.mine {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.cg-cell.tap,
.cg-num.tap {
  cursor: pointer;
  transition: background 0.12s ease, transform 0.08s ease;
  -webkit-user-select: none;
  user-select: none;
}
.cg-cell.tap:hover,
.cg-num.tap:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}
.cg-cell.tap:active,
.cg-num.tap:active {
  transform: scale(0.96);
  background: color-mix(in srgb, var(--accent) 34%, transparent);
}
.cg-cell.tap {
  min-height: 52px;
}
.cg-cell.fresh {
  color: var(--gold);
}
.cg-cell.fresh svg {
  filter: drop-shadow(0 0 9px rgba(237, 161, 137, 0.95));
}

.dartboard {
  display: block;
  width: 100%;
  max-width: 430px;
  margin: 2px auto;
  touch-action: manipulation;
  filter: drop-shadow(0 0 22px rgba(194, 80, 58, 0.28));
}
.db-back {
  fill: #0c0c0e;
  stroke: rgba(220, 115, 89, 0.35);
  stroke-width: 2;
}
.db-wire {
  fill: none;
  stroke: rgba(17, 17, 19, 0.55);
  stroke-width: 1.2;
  pointer-events: none;
}
.db-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  fill: #ece6e6;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}
.dartboard .hit {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.dartboard:not(.locked) .hit:hover {
  filter: brightness(1.35);
}
.dartboard:not(.locked) .hit:active {
  filter: brightness(1.7);
}
.dartboard.locked .hit {
  cursor: default;
  pointer-events: none;
}
.dartboard.locked {
  opacity: 0.75;
}
.db-marker {
  pointer-events: none;
}
.db-marker circle {
  fill: var(--gold);
  stroke: #3d130c;
  stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(237, 161, 137, 0.9));
}
.db-marker text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  fill: #3d130c;
}

/* every cell in a row stretches to the same height so borders line up */
.cricket-grid {
  align-items: stretch;
}
.cg-head {
  align-self: center;
}
.cg-cell {
  min-height: 52px;
}
.cg-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0;
}

.cg-cell.fresh.dead {
  opacity: 0.95;
}

/* ---- Floating undo (all scorekeeping) ---- */
.undo-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(237, 161, 137, 0.45);
  background: var(--surface-2);
  color: var(--gold);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 24px rgba(194, 80, 58, 0.4);
}
.undo-fab:hover {
  background: color-mix(in srgb, var(--accent) 24%, var(--surface-2));
}
.undo-fab:active {
  transform: scale(0.96);
}

/* ---- Wide dartboard layout (301/501/701, Dartboard mode) ---- */
.keeper-card.wide,
.history-card.wide {
  flex: 1 1 100%;
  max-width: none;
}
.keeper-wide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.kw-info,
.kw-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.kw-board .dartboard {
  max-width: 660px;
}
@media (min-width: 900px) {
  .keeper-wide {
    grid-template-columns: minmax(240px, 1fr) minmax(400px, 660px) minmax(240px, 1fr);
    align-items: start;
    gap: 24px;
  }
  .kw-side .keeper-actions {
    flex-direction: column;
  }
}
@media (max-width: 760px) {
  .cg-cell,
  .cg-cell.tap,
  .cg-num {
    min-height: 46px;
  }
  .undo-fab {
    right: 14px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    padding: 11px 16px;
  }
}

/* ---- Boot splash (design_handoff_bullseye_loading) ---- */
#bootSplash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--page);
  background-image: radial-gradient(90% 55% at 82% -8%, rgba(194, 80, 58, 0.2), transparent 62%),
    radial-gradient(70% 45% at -5% 105%, rgba(122, 42, 30, 0.24), transparent 70%);
  transition: opacity 0.3s ease;
}
.bs-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.bs-mark {
  width: 220px;
  height: 220px;
  overflow: visible;
}
.bs-word {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
}
.bs-name {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-primary);
}
.bs-dots {
  display: flex;
  gap: 7px;
}
.bs-dots i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text-primary);
  display: inline-block;
  opacity: 0.25;
}
@media (max-width: 480px) {
  .bs-mark {
    width: 180px;
    height: 180px;
  }
  .bs-name {
    font-size: 28px;
  }
}

/* ---- Mobile top bar: app logo + name, Coats Labs on the right ---- */
.mobile-appbar {
  display: none;
}
@media (max-width: 760px) {
  .mobile-appbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 9;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
    background: color-mix(in srgb, var(--page) 86%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(220, 115, 89, 0.14);
  }
  .mobile-appbar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: "Inter", system-ui, sans-serif;
    font-weight: 500;
    font-size: 20px;
    letter-spacing: -0.02em;
    color: var(--field-ink);
    text-shadow: 0 0 20px rgba(220, 115, 89, 0.4);
  }
  .mobile-appbar-brand img {
    display: block;
    filter: drop-shadow(0 0 6px rgba(220, 115, 89, 0.7)) drop-shadow(0 0 14px rgba(194, 80, 58, 0.4));
  }
  .mobile-appbar .coats-credit-mobile {
    display: flex;
    margin: 0;
  }
  .topbar {
    padding-top: 14px;
  }
}

.kw-info .keeper-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

/* ==== Glow theme ========================================================
   Charcoal/black surfaces with the brand's red ramp doing the lighting:
   500 #C2503A fills, 400 #DC7359 / #E0755C text + halos, 300 #EDA189 highlight. */
:root {
  --hot: #E0755C;
  --shadow-md: 0 14px 34px -14px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Page bloom: a soft red light from the top-right and a deeper one bottom-left. */
body {
  background-color: var(--page);
  background-image: radial-gradient(90% 55% at 82% -8%, rgba(194, 80, 58, 0.2), transparent 62%),
    radial-gradient(70% 45% at -5% 105%, rgba(122, 42, 30, 0.24), transparent 70%);
  background-attachment: fixed;
}

/* Logo + wordmark */
.brand-mark {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 6px rgba(220, 115, 89, 0.7)) drop-shadow(0 0 16px rgba(194, 80, 58, 0.45));
}
.brand-name {
  text-shadow: 0 0 20px rgba(220, 115, 89, 0.4);
}
.sidebar {
  box-shadow: 1px 0 0 rgba(220, 115, 89, 0.1), 14px 0 44px -22px rgba(194, 80, 58, 0.3);
}
.topbar-title {
  text-shadow: 0 0 26px rgba(220, 115, 89, 0.28);
}

/* Nav */
.nav-item.active {
  box-shadow: 0 0 20px rgba(237, 161, 137, 0.32);
}
.nav-item.active .nav-icon {
  filter: drop-shadow(0 0 4px rgba(61, 19, 12, 0.25));
}

/* Cards + dialogs */
.card {
  border-color: rgba(255, 255, 255, 0.07);
}
.event-dialog-backdrop {
  background: rgba(6, 6, 8, 0.74);
}
.event-dialog {
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px -20px #000, 0 0 70px -24px rgba(194, 80, 58, 0.4);
}

/* Buttons + controls */
button.btn.hot {
  background: var(--accent);
  color: #fff;
}
button.btn:not(.secondary):not(:disabled),
.key.go:not(:disabled) {
  box-shadow: 0 0 18px rgba(194, 80, 58, 0.45);
}
button.btn:not(.secondary):not(:disabled):hover,
.key.go:not(:disabled):hover {
  box-shadow: 0 0 28px rgba(220, 115, 89, 0.62);
}
.seg button.on {
  box-shadow: 0 0 16px rgba(194, 80, 58, 0.5);
}
.mult-row button.on {
  box-shadow: 0 0 16px rgba(194, 80, 58, 0.5);
}
.mult-row button.on.t {
  background: #dc7359;
  color: #3d130c;
  box-shadow: 0 0 20px rgba(220, 115, 89, 0.65);
}
input:focus-visible,
select:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(194, 80, 58, 0.28);
  outline: none;
}
button:focus-visible,
a:focus-visible {
  box-shadow: 0 0 0 4px rgba(237, 161, 137, 0.22);
}

/* Live indicator + tags */
.live-pill {
  background: rgba(255, 255, 255, 0.08);
}
.live-pill::before {
  background: var(--hot);
  box-shadow: 0 0 8px 2px rgba(224, 117, 92, 0.7);
}
.live-pill.offline::before {
  background: var(--text-muted);
  box-shadow: none;
}
.badge-live {
  box-shadow: 0 0 12px rgba(224, 117, 92, 0.35);
}
.throwing-tag {
  box-shadow: 0 0 14px rgba(237, 161, 137, 0.55);
}

/* Scoreboard */
.side-card {
  border-color: rgba(255, 255, 255, 0.07);
}
.side-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(237, 161, 137, 0.45), 0 0 36px rgba(220, 115, 89, 0.4), var(--shadow-md);
}
.side-card.active .side-remaining {
  text-shadow: 0 0 28px rgba(220, 115, 89, 0.6);
}
.side-card.winner {
  border-color: var(--accent);
  box-shadow: 0 0 34px rgba(194, 80, 58, 0.45), var(--shadow-md);
}
.side-remaining.checkable {
  text-shadow: 0 0 24px rgba(224, 117, 92, 0.65);
}
.entry-value:not(.empty-val) {
  text-shadow: 0 0 20px rgba(220, 115, 89, 0.45);
}
.checkout-hint {
  background: color-mix(in srgb, var(--accent) 22%, var(--surface-1));
  color: var(--gold);
}
.checkout-hint b {
  text-shadow: 0 0 14px rgba(237, 161, 137, 0.6);
}
.winner-banner {
  box-shadow: 0 0 44px rgba(237, 161, 137, 0.38);
}
.dart-chip.filled.t {
  box-shadow: 0 0 14px rgba(224, 117, 92, 0.35);
}
.dart-chip.filled.d {
  box-shadow: 0 0 12px rgba(194, 80, 58, 0.3);
}
.visit-total.big {
  text-shadow: 0 0 14px rgba(224, 117, 92, 0.5);
}

/* Cricket marks */
.cg-cell svg {
  filter: drop-shadow(0 0 4px rgba(243, 240, 240, 0.22));
}
.cg-cell.scoring svg {
  filter: drop-shadow(0 0 7px rgba(224, 117, 92, 0.9));
}
.cg-head.active {
  text-shadow: 0 0 12px rgba(224, 117, 92, 0.75);
}
.cg-num {
  text-shadow: 0 0 14px rgba(243, 240, 240, 0.12);
}

@media (max-width: 760px) {
  .nav-item.active {
    box-shadow: none;
  }
  .nav-item.active .nav-icon {
    filter: drop-shadow(0 0 6px rgba(237, 161, 137, 0.75));
  }
  .sidebar {
    box-shadow: 0 -1px 0 rgba(220, 115, 89, 0.16), 0 -14px 40px -20px rgba(194, 80, 58, 0.3);
  }
}
