:root {
  --design-width: 1850;
  --design-height: 850;
  --ui-scale: 1;

  --cc-navy-1000: #00101f;
  --cc-navy-950: #001326;
  --cc-navy-925: #01182d;
  --cc-navy-900: #02172c;
  --cc-navy-850: #03213d;
  --cc-navy-800: #063768;
  --cc-navy-760: #06477b;

  --cc-blue-700: #0068d8;
  --cc-blue-600: #087dff;
  --cc-blue-500: #078fe8;
  --cc-blue-400: #06a8f5;

  --cc-cyan: #09c8ff;
  --cc-cyan-bright: #23d7ff;

  --cc-court: #08a761;
  --cc-court-light: #18bd72;
  --cc-court-line: #dcfff6;

  --cc-yellow: #ffc52b;
  --cc-white: #f7fbff;
  --cc-muted: #c4d9ec;

  --ui-font: Inter, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  font-family: var(--ui-font);
  color-scheme: dark;
  background: #000;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 100%;
  min-height: 100%;
  background: #000;
}

body {
  overflow: hidden;
  color: var(--cc-white);
  font-family: var(--ui-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  user-select: none;
}

button {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.referee-viewport {
  position: relative;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(0, 123, 196, 0.11), transparent 42%),
    #000;
}

.referee-stage {
  position: relative;
  width: calc(1850px * var(--ui-scale));
  height: calc(850px * var(--ui-scale));
  flex: 0 0 auto;
}

.referee-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 1850px;
  height: 850px;
  overflow: hidden;
  transform: scale(var(--ui-scale));
  transform-origin: top left;
  background: var(--cc-navy-900);
}

.referee-header {
  position: absolute;
  inset: 0 0 auto 0;
  width: 1850px;
  height: 127px;
  border-bottom: 2px solid #08b9f4;
  background:
    radial-gradient(circle at 13% -40%, rgba(0, 156, 241, 0.42), transparent 43%),
    linear-gradient(90deg, #074f88 0%, #052b51 31%, #031b33 61%, #02172d 100%);
}

.icon-button {
  display: grid;
  place-items: center;
  background: transparent;
}

.menu-button {
  position: absolute;
  left: 42px;
  top: 31px;
  width: 79px;
  height: 66px;
}

.hamburger {
  width: 53px;
  display: grid;
  gap: 9px;
}

.hamburger i {
  display: block;
  height: 7px;
  border-radius: 8px;
  background: white;
}

.brand-wrap {
  position: absolute;
  left: 168px;
  top: 24px;
  width: 421px;
  height: 81px;
  display: flex;
  align-items: center;
}

.referee-brand {
  display: block;
  width: 411px;
  height: 74px;
  object-fit: contain;
  object-position: left center;
}

.referee-title {
  position: absolute;
  left: 746px;
  top: 23px;
  width: 380px;
  text-align: center;
}

.referee-title__sport {
  font-size: 44px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 3.8px;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}

.referee-title__role {
  margin-top: 10px;
  color: #dceeff;
  font-size: 24px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 8.5px;
}

.match-format {
  position: absolute;
  left: 1187px;
  top: 30px;
  width: 220px;
  height: 70px;
  display: grid;
  place-items: center;
  border: 2px solid #1c5b90;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(4, 42, 77, 0.96), rgba(1, 24, 46, 0.96));
  color: #f6fbff;
  font-size: 30px;
  font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(105, 198, 255, 0.05);
}

.mode-switch {
  position: absolute;
  left: 1425px;
  top: 29px;
  width: 167px;
  height: 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid #008fe9;
  border-radius: 13px;
  overflow: hidden;
  background: #02152a;
}

.mode-switch__item {
  background: transparent;
  font-size: 30px;
  font-weight: 760;
}

.mode-switch__item + .mode-switch__item {
  border-left: 1px solid #007acc;
}

.mode-switch__item.is-active {
  color: #00162a;
  background: linear-gradient(180deg, #1fb9ff, #0b8ee7);
}

.settings-button {
  position: absolute;
  left: 1612px;
  top: 28px;
  width: 80px;
  height: 73px;
  border: 2px solid #3b6b9a;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(5, 37, 69, 0.95), rgba(1, 20, 38, 0.98));
}

.settings-button svg {
  width: 43px;
  height: 43px;
  fill: none;
  stroke: white;
  stroke-width: 2.5;
}

.device-time {
  position: absolute;
  right: 44px;
  top: 49px;
  min-width: 96px;
  color: white;
  font-size: 31px;
  line-height: 1;
  font-weight: 520;
  text-align: right;
}

.score-strip {
  position: absolute;
  left: 0;
  top: 127px;
  width: 1622px;
  height: 159px;
  background:
    radial-gradient(circle at 50% 5%, #09a9fb 0%, #088fe6 40%, #0766a8 100%);
}

.games-card {
  position: absolute;
  top: 13px;
  height: 137px;
  display: grid;
  align-content: center;
  justify-items: center;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(2, 35, 65, 0.99), rgba(0, 20, 39, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 1px 0 rgba(255, 255, 255, 0.03);
}

.games-card--left {
  left: 43px;
  width: 175px;
}

.games-card--right {
  left: 1458px;
  width: 144px;
}

.games-card__value {
  font-size: 93px;
  line-height: 0.82;
  font-weight: 850;
  letter-spacing: -4px;
}

.games-card__label {
  margin-top: 8px;
  color: #d2e7f7;
  font-size: 22px;
  line-height: 1;
  font-weight: 650;
}

.spoken-score-card {
  position: absolute;
  left: 589px;
  top: 13px;
  width: 673px;
  height: 133px;
  display: grid;
  justify-items: center;
  align-content: center;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(2, 35, 64, 0.99), rgba(0, 18, 35, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 1px 0 rgba(255, 255, 255, 0.03);
}

.spoken-score {
  margin-top: -2px;
  color: #fff;
  font-size: 87px;
  line-height: 0.9;
  font-weight: 850;
  letter-spacing: 15px;
  text-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
}

.spoken-score-labels {
  margin-top: 8px;
  width: 453px;
  display: grid;
  grid-template-columns: 1fr 36px 1fr 36px 1fr;
  align-items: center;
  justify-items: center;
  color: #d2e6f7;
  font-size: 21px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: 1.4px;
}

.spoken-score-labels b {
  font-weight: 500;
}

.live-body {
  position: absolute;
  left: 0;
  top: 286px;
  width: 1622px;
  height: 379px;
  display: grid;
  grid-template-columns: 505px 720px 397px;
}

.team-zone {
  position: relative;
  height: 379px;
  padding: 13px 13px 15px;
  background:
    radial-gradient(circle at 50% 0%, rgba(7, 89, 157, 0.94), rgba(3, 48, 91, 0.98) 66%, rgba(2, 40, 77, 1));
}

.team-zone--left {
  border-right: 2px solid #15c9ff;
}

.team-zone--right {
  border-left: 2px solid #15c9ff;
}

.player-card {
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(6, 71, 126, 0.8), rgba(4, 53, 100, 0.9));
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.12);
}

.player-row {
  height: 50%;
  padding: 15px 23px 10px;
  display: flex;
  align-items: flex-start;
}

.player-row + .player-row {
  border-top: 2px solid rgba(80, 213, 255, 0.85);
}

.player-copy {
  width: 100%;
  min-width: 0;
}

.player-name {
  color: white;
  font-size: 36px;
  line-height: 1.12;
  font-weight: 760;
  letter-spacing: -0.8px;
  white-space: nowrap;
}

.player-meta {
  margin-top: 14px;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 17px;
}

.player-badge {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  padding: 3px 17px 4px;
  border-radius: 18px;
  font-size: 23px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.player-badge--band {
  border: 4px solid var(--cc-yellow);
  color: #ffe12f;
  background: rgba(0, 24, 47, 0.92);
}

.player-badge--no-band {
  border: 4px solid #9bb8da;
  color: #eef6ff;
  background: rgba(0, 24, 47, 0.86);
}

.player-badge--server {
  min-width: 144px;
  border: 3px solid #0dc7ff;
  color: white;
  background: linear-gradient(180deg, #087dff, #0064d6);
  box-shadow: 0 0 18px rgba(0, 149, 255, 0.38);
}

.band-dots {
  display: inline-flex;
  align-items: center;
  gap: 15px;
}

.band-dots i {
  display: block;
  width: 41px;
  height: 41px;
  border-radius: 50%;
  background: var(--cc-yellow);
  box-shadow: inset 0 0 0 1px rgba(86, 57, 0, 0.2);
}

.court-stage {
  position: relative;
  width: 720px;
  height: 379px;
  padding: 0 12px;
  background:
    linear-gradient(90deg, rgba(0, 130, 73, 0.34), transparent 5%, transparent 95%, rgba(0, 130, 73, 0.34)),
    #08a761;
  box-shadow:
    inset 4px 0 8px rgba(36, 255, 194, 0.68),
    inset -4px 0 8px rgba(36, 255, 194, 0.68),
    0 0 14px rgba(0, 247, 185, 0.28);
}

.court-inner {
  position: absolute;
  inset: 0 13px;
  border: 3px solid rgba(229, 255, 249, 0.92);
  background:
    radial-gradient(circle at 50% 43%, rgba(27, 196, 115, 0.95), rgba(9, 168, 97, 0.99) 58%, rgba(6, 153, 88, 1) 100%);
}

.court-center-line {
  position: absolute;
  left: 50%;
  top: 0;
  width: 3px;
  height: 100%;
  transform: translateX(-50%);
  background: rgba(231, 255, 250, 0.95);
}

.court-short-line {
  position: absolute;
  left: 50%;
  width: 3px;
  height: 113px;
  transform: translateX(-50%);
  background: rgba(231, 255, 250, 0.95);
}

.court-short-line--top {
  top: 0;
}

.court-short-line--bottom {
  bottom: 0;
}

.court-watermark {
  position: absolute;
  left: 50%;
  top: 127px;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  opacity: 0.24;
}

.court-watermark img {
  width: 53px;
  height: 53px;
}

.court-watermark span {
  font-size: 22px;
  line-height: 1;
  font-weight: 850;
}

.court-score {
  position: absolute;
  top: 118px;
  color: white;
  font-size: 132px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -5px;
  text-shadow: 0 3px 3px rgba(0, 0, 0, 0.12);
}

.court-score--left {
  left: 135px;
}

.court-score--right {
  right: 136px;
}

.match-action-rail {
  position: absolute;
  left: 1622px;
  top: 127px;
  width: 228px;
  height: 538px;
  padding: 13px 20px 22px;
  display: grid;
  grid-template-rows: 139px 148px 166px;
  gap: 21px;
  border-left: 2px solid #079ee3;
  background:
    linear-gradient(180deg, #001c35 0%, #00152a 100%);
}

.rail-action {
  width: 188px;
  border: 2px solid #2c679c;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(3, 35, 65, 0.99), rgba(0, 18, 36, 0.99));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.015);
}

.rail-action strong {
  display: block;
  color: white;
  font-size: 61px;
  line-height: 0.96;
  font-style: italic;
  font-weight: 850;
}

.rail-action span {
  display: block;
  margin-top: 13px;
  color: #d6e6f4;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: .8px;
}

.rail-action--pip {
  border-color: #03b8ff;
  box-shadow:
    inset 0 0 0 1px rgba(0, 199, 255, 0.25),
    0 0 14px rgba(0, 170, 255, 0.11);
}

.rail-action--pip.is-active strong {
  text-shadow:
    0 0 10px rgba(16, 136, 255, 0.95),
    0 0 22px rgba(16, 136, 255, 0.75);
}

.rail-action--pip.is-active span {
  color: #36d2ff;
}

.rail-action--change svg {
  width: 55px;
  height: 55px;
  fill: none;
  stroke: white;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-action--change span {
  margin-top: 5px;
}

.referee-controls {
  position: absolute;
  left: 0;
  top: 665px;
  width: 1850px;
  height: 185px;
  border-top: 2px solid #00a9ed;
  background:
    radial-gradient(circle at 45% 115%, rgba(0, 86, 143, 0.24), transparent 34%),
    linear-gradient(180deg, #041d35 0%, #001326 100%);
}

.control {
  position: absolute;
  top: 24px;
  height: 124px;
  display: grid;
  align-content: center;
  justify-items: center;
  border: 1.5px solid #068cdb;
  border-radius: 21px;
  background:
    linear-gradient(180deg, #04213d, #011629);
}

.control:active,
.rail-action:active,
.icon-button:active,
.mode-switch__item:active {
  transform: translateY(1px);
  filter: brightness(1.12);
}

.control--start {
  left: 40px;
  width: 268px;
  border-color: #00bfff;
  background:
    radial-gradient(circle at 50% 0%, rgba(24, 182, 255, 0.32), transparent 45%),
    linear-gradient(135deg, #118cff, #006df7);
  box-shadow: 0 0 22px rgba(0, 142, 255, 0.28);
}

.control--undo {
  left: 333px;
  width: 196px;
}

.control--left {
  left: 562px;
  width: 233px;
}

.control--right {
  left: 969px;
  width: 254px;
}

.control--end {
  left: 1271px;
  width: 239px;
}

.control--more {
  left: 1560px;
  width: 248px;
}

.control-icon {
  width: 54px;
  height: 54px;
  fill: none;
  stroke: white;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.control-icon--play {
  width: 52px;
  height: 52px;
  fill: white;
  stroke: none;
}

.control-value {
  color: white;
  font-size: 43px;
  line-height: 1;
  font-weight: 850;
}

.control-label {
  margin-top: 11px;
  color: white;
  font-size: 22px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: .7px;
}

.control--score .control-label {
  margin-top: 14px;
}

.stop-glyph {
  display: block;
  width: 39px;
  height: 39px;
  border-radius: 5px;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}

.more-glyph {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.more-glyph i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
}

.control-divider {
  position: absolute;
  top: 33px;
  width: 2px;
  height: 103px;
  background:
    linear-gradient(transparent, rgba(46, 153, 216, 0.74) 12%, rgba(46, 153, 216, 0.74) 88%, transparent);
}

.control-divider--center {
  left: 880px;
}

.control-divider--end {
  left: 1534px;
}

.demo-toast {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 30;
  max-width: 620px;
  min-height: 0;
  padding: 0;
  transform: translateX(-50%) translateY(16px);
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: transparent;
  font-size: 19px;
  font-weight: 650;
  pointer-events: none;
  opacity: 0;
  transition: opacity .16s ease, transform .16s ease;
}

.demo-toast.is-visible {
  min-height: 48px;
  padding: 12px 18px;
  transform: translateX(-50%) translateY(0);
  border-color: rgba(62, 185, 255, .45);
  background: rgba(1, 25, 47, .96);
  color: white;
  box-shadow: 0 8px 24px rgba(0,0,0,.32);
  opacity: 1;
}

.demo-sheet {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
}

.demo-sheet.is-open {
  display: block;
}

.demo-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 9, 18, .72);
  backdrop-filter: blur(4px);
}

.demo-sheet__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 740px;
  min-height: 258px;
  transform: translate(-50%, -50%);
  padding: 38px 42px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  border: 2px solid rgba(71, 205, 255, .7);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(17, 75, 119, .95), rgba(1, 26, 49, .97));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .52);
}

.demo-sheet__panel h2 {
  margin: 8px 0 8px;
  font-size: 36px;
}

.demo-sheet__panel p {
  max-width: 510px;
  margin: 0;
  color: #cfe3f4;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 500;
}

.eyebrow {
  color: #24ccff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 2.4px;
}

.sheet-close {
  min-width: 130px;
  height: 54px;
  border: 2px solid #1ba9ec;
  border-radius: 14px;
  background: #053a68;
  font-size: 19px;
  font-weight: 750;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* ============================================================
   FINAL SCORE CONFIRMATION MODAL
   Reference coordinate system: 1850 x 850
   UI-only frontend prototype.
   ============================================================ */

.final-score-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(0, 10, 25, 0.69);
  -webkit-backdrop-filter: blur(2px) brightness(0.62);
  backdrop-filter: blur(2px) brightness(0.62);
}

.final-score-overlay[hidden] {
  display: none;
}

.final-score-design {
  position: relative;
  flex: none;
  width: 1850px;
  height: 850px;
  transform: scale(var(--ui-scale));
  transform-origin: center center;
  overflow: hidden;
  background: transparent;
}

.final-score-modal {
  position: absolute;
  left: 468px;
  top: 130px;
  width: 917px;
  height: 529px;
  padding: 36px 60px 33px;
  border: 2px solid rgba(116, 226, 255, 0.95);
  border-radius: 32px;
  color: #f7fbff;
  background:
    radial-gradient(circle at 12% 92%, rgba(25, 220, 235, 0.28), transparent 32%),
    radial-gradient(circle at 94% 3%, rgba(79, 196, 255, 0.34), transparent 36%),
    linear-gradient(145deg, rgba(10, 59, 101, 0.91), rgba(1, 20, 43, 0.97) 55%, rgba(5, 55, 96, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 38px rgba(68, 187, 255, 0.14),
    0 0 24px rgba(49, 197, 255, 0.36),
    0 26px 80px rgba(0, 0, 0, 0.52);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  backdrop-filter: blur(22px) saturate(1.35);
}

.final-score-close {
  position: absolute;
  left: 20px;
  top: 18px;
  width: 82px;
  height: 68px;
  display: grid;
  place-items: center;
  padding: 0 0 5px;
  border: 2px solid rgba(111, 213, 255, 0.95);
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(145deg, rgba(73, 142, 202, 0.58), rgba(28, 82, 136, 0.68));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 0 17px rgba(35, 194, 255, 0.50);
  font: inherit;
  font-size: 54px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.final-score-heading {
  text-align: center;
}

.final-score-heading h2 {
  margin: 0;
  font-size: 48px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -1px;
}

.final-score-heading p {
  margin: 19px 0 0;
  color: #c7d9ec;
  font-size: 29px;
  line-height: 1;
  font-weight: 500;
}

.final-score-card {
  width: 695px;
  height: 221px;
  margin: 25px auto 23px;
  padding: 17px 22px;
  border: 2px solid rgba(88, 181, 235, 0.73);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(0, 25, 47, 0.92), rgba(0, 45, 61, 0.80));
  box-shadow: inset 0 0 18px rgba(31, 159, 212, 0.10);
}

.final-score-team {
  height: 91px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: center;
  gap: 22px;
}

.final-score-names {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-left: 14px;
  font-size: 29px;
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.final-score-names span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.final-score-value {
  width: 120px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(57, 129, 206, 0.54);
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(145deg, rgba(26, 73, 135, 0.92), rgba(18, 48, 99, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 5px 14px rgba(0, 0, 0, 0.18);
  font-size: 50px;
  line-height: 1;
  font-weight: 800;
}

.final-score-divider {
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(31, 137, 207, 0.45),
    rgba(31, 137, 207, 0.94),
    rgba(31, 137, 207, 0.45)
  );
}

.final-score-actions {
  width: 795px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.final-score-button {
  height: 90px;
  border-radius: 21px;
  font: inherit;
  font-size: 29px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.final-score-button--cancel {
  border: 2px solid rgba(93, 189, 240, 0.72);
  color: #ffffff;
  background: linear-gradient(145deg, rgba(46, 115, 161, 0.82), rgba(30, 78, 115, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 9px 20px rgba(0, 0, 0, 0.18);
}

.final-score-button--save {
  border: 2px solid rgba(160, 248, 255, 0.96);
  color: #001d3a;
  background: linear-gradient(145deg, #6be8ff, #12bdf8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    0 0 19px rgba(37, 222, 255, 0.64),
    0 10px 24px rgba(0, 78, 124, 0.32);
}

.final-score-close:focus-visible,
.final-score-button:focus-visible {
  outline: 3px solid rgba(92, 221, 255, 0.95);
  outline-offset: 3px;
  box-shadow: 0 0 16px rgba(33, 216, 255, 0.58);
}

@media (hover: hover) and (pointer: fine) {
  .final-score-close:hover,
  .final-score-button--cancel:hover {
    filter: brightness(1.12);
  }

  .final-score-button--save:hover {
    filter: brightness(1.07);
  }
}

@media (orientation: portrait) {
  .final-score-overlay {
    display: none !important;
  }
}

/* ============================================================
   FINAL SCORE CANVAS ALIGNMENT FIX
   Modal now shares the referee 1850 x 850 coordinate system.
   ============================================================ */
.final-score-overlay {
  position: absolute;
  inset: 0;
  width: 1850px;
  height: 850px;
  z-index: 1000;
  overflow: hidden;
}

.final-score-design {
  position: absolute;
  inset: 0;
  width: 1850px;
  height: 850px;
  transform: none;
  transform-origin: top left;
}
