:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef6f2;
  --ink: #122032;
  --muted: #667085;
  --line: #dce3ea;
  --navy: #122032;
  --green: #16a36a;
  --green-dark: #08764a;
  --coral: #ec6b57;
  --gold: #f4bf45;
  --blue-soft: #e9f1ff;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(18, 32, 50, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(233, 241, 255, .9) 0, rgba(245, 247, 251, 0) 340px),
    var(--bg);
  color: var(--ink);
  font-family: Arial, "Noto Sans KR", sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

.container {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid rgba(220, 227, 234, .9);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 220px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #39485a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.nav a:hover {
  background: var(--blue-soft);
  color: var(--navy);
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
}

.hero {
  padding: 54px 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .75fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy {
  min-height: 430px;
  padding: clamp(34px, 5vw, 64px);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(18, 32, 50, .92), rgba(8, 118, 74, .86)),
    url("https://images.unsplash.com/photo-1626224583764-f87db24ac4ea?auto=format&fit=crop&w=1400&q=80") center/cover;
  color: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 16px 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, .86);
  font-size: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #b9f6d4;
}

.hero-actions,
.form-actions,
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-actions { margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(22, 163, 106, .18);
}

.btn:hover { background: var(--green-dark); }

.btn.secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.ghost {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .34);
  box-shadow: none;
}

.btn.small {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.btn.full { width: 100%; }

.hero-panel,
.card,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 22px;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-top span,
.metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.panel-top strong {
  color: var(--green-dark);
}

.schedule-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfe;
}

.schedule-card + .schedule-card { margin-top: 10px; }

.schedule-card time {
  display: grid;
  place-items: center;
  min-height: 64px;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
}

.schedule-card time strong,
.schedule-card time span {
  display: block;
}

.schedule-card time span {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.schedule-card h3,
.schedule-card p {
  margin: 0;
}

.schedule-card p {
  margin-top: 4px;
  color: var(--muted);
}

.metric-grid,
.finance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 20px;
}

.metric-card strong {
  display: block;
  margin: 8px 0 2px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
}

.metric-card small {
  color: var(--muted);
  font-weight: 700;
}

.metric-card.accent {
  background: var(--navy);
  color: #fff;
}

.metric-card.accent span,
.metric-card.accent small {
  color: rgba(255, 255, 255, .72);
}

.section {
  padding: 28px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading.slim {
  display: block;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
  letter-spacing: 0;
}

.card {
  padding: clamp(18px, 3vw, 28px);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }

label {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(22, 163, 106, .18);
  border-color: var(--green);
}

.input-row { margin-bottom: 16px; }

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.game-analysis-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin: 18px 0;
  overflow-x: auto;
  padding-bottom: 6px;
}

.game-analysis-dashboard .dash-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.game-analysis-dashboard .dash-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--blue-soft);
  font-size: 22px;
}

.game-analysis-dashboard .dash-value {
  margin: 2px 0 0;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.game-analysis-scroll {
  max-height: 575px;
  overflow: auto;
}

.partner-count-scroll {
  margin-top: 14px;
  max-height: 575px;
}

.game-analysis-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.partner-summary-list {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
}

.partner-summary-scroll {
  display: grid;
  gap: 12px;
  max-height: 820px;
  overflow-y: auto;
  padding-right: 4px;
}

.partner-summary-list strong {
  color: var(--green-dark);
}

.partner-summary-list span {
  min-width: 0;
  font-weight: 800;
}

.level-history-chart {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfe;
  padding: 16px;
}

.level-chart-head,
.level-chart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.level-chart-head strong {
  color: var(--green-dark);
  font-size: 18px;
}

.level-chart-head span,
.level-chart-foot {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.level-history-chart svg {
  display: block;
  width: 100%;
  height: 220px;
  margin: 12px 0 8px;
  overflow: visible;
}

.level-history-chart line {
  stroke: #dce3ea;
  stroke-width: .6;
}

.level-history-chart polyline {
  fill: none;
  stroke: var(--green);
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.level-history-chart circle {
  fill: #fff;
  stroke: var(--green-dark);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.level-history-chart text {
  fill: var(--navy);
  font-size: 3.4px;
  font-weight: 900;
  text-anchor: middle;
}

.level-history-scroll {
  max-height: 575px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

th {
  background: #f2f6fa;
  color: #526174;
  font-weight: 900;
}

tr:last-child td { border-bottom: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.muted-text {
  color: var(--muted);
}

.notice-box,
.soft-panel {
  border-radius: 16px;
  padding: 16px;
}

.notice-box {
  background: #fff8e1;
  border: 1px solid #f6dc88;
  color: #5c4300;
}

.soft-panel {
  background: #f7fafc;
  border: 1px solid var(--line);
}

.member-check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.check-tile {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.check-tile:hover {
  border-color: rgba(22, 163, 106, .45);
  background: #f4fbf7;
}

.check-tile input,
.inline-check input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.check-tile span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.check-tile em {
  color: var(--green-dark);
  font-style: normal;
}

.akpc-list-collapsed {
  display: none !important;
}

.akpc-five-list-frame {
  max-height: 238px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.chip-list,
.history-names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.data-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid #cfe8dc;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.data-chip strong {
  color: var(--green-dark);
}

.history-group {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
}

.history-group + .history-group { margin-top: 10px; }

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.history-header span {
  border-radius: 999px;
  background: var(--blue-soft);
  color: #2454a6;
  padding: 5px 10px;
  font-weight: 900;
}

.game-selected-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.player-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 7px;
}

.player-clear-btn {
  min-height: 44px;
  border: 1px solid #f6c6be;
  border-radius: 12px;
  background: #fff1ee;
  color: var(--danger);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

.subhead {
  margin-top: 26px;
}

.gamma-embed-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.gamma-embed-wrap iframe {
  display: block;
  min-height: 420px;
}

.big-number {
  margin: 0 0 12px;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.alert {
  margin-top: 18px;
  border-radius: 14px;
  padding: 13px 16px;
  background: #dcfce7;
  color: var(--green-dark);
  font-weight: 900;
}

.alert.error {
  background: #fee4e2;
  color: var(--danger);
}

.footer {
  margin-top: 28px;
  padding: 30px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .header-inner {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .menu-button {
    display: inline-flex;
    margin-left: auto;
  }

  .nav {
    display: none;
    width: 100%;
    justify-content: stretch;
    padding-top: 12px;
  }

  .nav.show {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav a {
    background: #f6f8fb;
  }

  .hero-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 360px;
  }

  .metric-grid,
  .finance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-analysis-dashboard {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .nav.show,
  .metric-grid,
  .finance-grid,
  .grid-2,
  .grid-4,
  .member-check-grid,
  .game-selected-grid {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-4 {
    grid-column: auto;
  }

  .hero {
    padding-top: 24px;
  }

  .hero-copy {
    min-height: 0;
    border-radius: 20px;
    padding: 28px 22px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-actions .btn,
  .form-actions .btn {
    width: 100%;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .schedule-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .card,
  .hero-panel {
    border-radius: 16px;
  }

  .data-chip {
    width: 100%;
    border-radius: 12px;
    justify-content: flex-start;
  }

  .partner-summary-list {
    grid-template-columns: 1fr;
  }

  .game-analysis-dashboard {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
  }
}

/* ===== AKPC Electronic Scoreboard ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header .brand h1 {
  margin: 0;
  font-size: 22px;
}

.header .brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.mobile-menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
}

.page-top {
  padding-top: 28px;
}

.scoreboard-player-section,
.scoreboard-teams-grid,
.scoreboard-settings,
.scoreboard-display-card {
  margin-top: 22px;
}

.scoreboard-player-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  max-height: 238px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.scoreboard-player-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  cursor: pointer;
}

.scoreboard-player-check input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.scoreboard-player-check span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.scoreboard-teams-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.scoreboard-team-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcfe;
  padding: 18px;
}

.scoreboard-team-card.serving {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 106, .12);
}

.scoreboard-large-score {
  margin-top: 16px;
  border-radius: 16px;
  background: var(--navy);
  color: #fff;
  text-align: center;
  font-size: 56px;
  font-weight: 900;
  line-height: 1.15;
}

.scoreboard-start-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, .4fr) auto;
  gap: 10px;
  align-items: end;
}

.scoreboard-mobile-compact-panel {
  border: 0;
  border-radius: 24px;
  background: #07111f;
  color: #fff;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(7, 17, 31, .24);
}

.scoreboard-call-label {
  color: #a7f3d0;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.scoreboard-compact-call-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 12px;
  align-items: stretch;
  margin-top: 8px;
}

.scoreboard-call-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 116px;
  border-radius: 20px;
  background: #fff;
  color: #07111f;
  font-size: clamp(58px, 10vw, 96px);
  font-weight: 900;
  line-height: 1;
}

.scoreboard-compact-status {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .1);
  color: #d7dee8;
  text-align: center;
  font-weight: 900;
}

.scoreboard-compact-teams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.scoreboard-compact-team {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  padding: 14px;
}

.scoreboard-compact-serving.team-a {
  background: #dcfce7;
  color: #07111f;
}

.scoreboard-compact-serving.team-b {
  background: #fee2e2;
  color: #07111f;
}

.scoreboard-compact-team-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.scoreboard-server-dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--coral);
}

.scoreboard-compact-player-list {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.scoreboard-compact-player-list div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
  font-weight: 900;
}

.scoreboard-compact-score-row {
  display: grid;
  grid-template-columns: 1fr 1fr .62fr;
  gap: 12px;
  margin-top: 12px;
}

.scoreboard-compact-score-box {
  display: grid;
  gap: 3px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .12);
  padding: 12px;
  text-align: center;
}

.scoreboard-compact-score-box small {
  color: #bfcedd;
  font-size: 12px;
  font-weight: 900;
}

.scoreboard-compact-score-box span {
  color: #fff;
  font-size: clamp(46px, 8vw, 72px);
  font-weight: 900;
  line-height: 1;
}

.scoreboard-help-text {
  margin: 12px 0 0;
  color: #bfcedd;
  text-align: center;
}

.scoreboard-control-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.scoreboard-control-grid .btn {
  min-height: 60px;
  border-radius: 16px;
  font-size: 15px;
}

@media (max-width: 980px) {
  .mobile-menu-btn {
    display: inline-flex;
  }

  #mainNav.nav {
    display: none;
    width: 100%;
  }

  #mainNav.nav.show {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scoreboard-player-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scoreboard-start-settings,
  .scoreboard-control-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) and (orientation: portrait) {
  body:has(.scoreboard-page) {
    background: #07111f;
  }

  .scoreboard-page {
    width: 100%;
    padding: 0 8px 10px;
  }

  .scoreboard-page > .alert,
  .scoreboard-page > section.card:not(.scoreboard-play-card) {
    display: none;
  }

  .scoreboard-play-card {
    display: block;
    margin: 0;
    padding: 8px;
    border: 0;
    border-radius: 0;
    background: #07111f;
    box-shadow: none;
  }

  .scoreboard-play-card > h2,
  .scoreboard-play-card > p.muted-text,
  .scoreboard-play-card form > .grid,
  .scoreboard-player-section,
  .scoreboard-teams-grid,
  .scoreboard-start-settings,
  .scoreboard-play-card .notice-box {
    max-height: 30vh;
    overflow: auto;
    border-radius: 14px;
  }

  .scoreboard-play-card > h2,
  .scoreboard-play-card > p.muted-text {
    display: none;
  }

  .scoreboard-mobile-compact-panel {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 6px;
    min-height: calc(100svh - 174px);
    margin: 0;
    padding: 8px;
    border-radius: 14px;
    box-shadow: none;
  }

  .scoreboard-call-label,
  .scoreboard-help-text {
    display: none;
  }

  .scoreboard-compact-call-main {
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 6px;
    margin: 0;
  }

  .scoreboard-call-inline {
    min-height: 58px;
    border-radius: 12px;
    font-size: clamp(38px, 15vw, 64px);
  }

  .scoreboard-compact-status {
    gap: 1px;
    border-radius: 12px;
    padding: 4px;
    font-size: 12px;
    line-height: 1.05;
  }

  .scoreboard-compact-teams {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 0;
  }

  .scoreboard-compact-team {
    min-height: 78px;
    border-radius: 12px;
    padding: 7px;
  }

  .scoreboard-compact-team-title {
    gap: 4px;
    margin-bottom: 3px;
    font-size: 9px;
    line-height: 1;
  }

  .scoreboard-server-dot {
    width: 8px;
    height: 8px;
  }

  .scoreboard-compact-player-list {
    gap: 2px;
  }

  .scoreboard-compact-player-list div {
    font-size: clamp(13px, 4.2vw, 18px);
    line-height: 1.05;
  }

  .scoreboard-compact-score-row {
    grid-template-columns: 1fr 1fr .58fr;
    gap: 6px;
    margin: 0;
  }

  .scoreboard-compact-score-box {
    align-content: center;
    min-height: 96px;
    border-radius: 12px;
    padding: 6px;
  }

  .scoreboard-compact-score-box small {
    font-size: 9px;
    line-height: 1;
  }

  .scoreboard-compact-score-box span {
    font-size: clamp(52px, 18vw, 82px);
  }

  .scoreboard-control-grid {
    position: sticky;
    bottom: 0;
    z-index: 40;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 6px;
    margin: 6px -2px 0;
    padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
    background: #07111f;
  }

  .scoreboard-control-grid .btn {
    min-height: 52px;
    padding: 6px 4px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.05;
    box-shadow: none;
  }

  .scoreboard-control-grid .btn:first-child {
    grid-row: span 2;
    min-height: 110px;
    background: #22c55e;
    font-size: 20px;
  }

  .scoreboard-control-grid .btn:nth-child(2),
  .scoreboard-control-grid .btn:nth-child(3) {
    background: #fff;
    color: #07111f;
  }

  .scoreboard-control-grid .btn:nth-child(4),
  .scoreboard-control-grid .btn:nth-child(5) {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border-color: rgba(255, 255, 255, .2);
  }

  .scoreboard-play-card form > p:last-child {
    margin: 8px 0 0;
  }

  .scoreboard-play-card form > p:last-child .btn {
    min-height: 44px;
    border-radius: 12px;
    background: #f4bf45;
    color: #07111f;
    box-shadow: none;
  }
}

@media (max-width: 390px) and (orientation: portrait) {
  .scoreboard-mobile-compact-panel {
    min-height: calc(100svh - 160px);
  }

  .scoreboard-call-inline {
    min-height: 50px;
    font-size: clamp(34px, 14vw, 54px);
  }

  .scoreboard-compact-team {
    min-height: 68px;
  }

  .scoreboard-compact-score-box {
    min-height: 82px;
  }

  .scoreboard-compact-score-box span {
    font-size: clamp(44px, 17vw, 70px);
  }

  .scoreboard-control-grid .btn {
    min-height: 46px;
    font-size: 11px;
  }

  .scoreboard-control-grid .btn:first-child {
    min-height: 98px;
    font-size: 18px;
  }
}
