/* Shared UI: cards, stats, badges, buttons, switches, tables, RSVP, banners, phone frame. */

.card {
  background: var(--color-white);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
}

.card header,
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--space-3);
  margin-block-end: var(--space-3);
}

.stat {
  background: var(--color-white);
  border: 1px solid var(--color-slate-200);
  border-block-start: 4px solid var(--color-emerald-700);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.stat-value {
  display: block;
  margin-block-start: var(--space-2);
  color: var(--color-navy-900);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  color: var(--color-slate-600);
  font-size: var(--text-sm);
  font-weight: 700;
}

.stat-note {
  display: block;
  margin-block-start: var(--space-2);
  color: var(--color-slate-600);
  font-size: var(--text-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--color-slate-100);
  color: var(--color-slate-700);
}

.badge-emerald {
  background: var(--color-emerald-100);
  color: var(--color-emerald-800);
}

.badge-amber {
  background: var(--color-amber-50);
  color: var(--color-amber-800);
}

.badge-navy {
  background: var(--color-navy-900);
  color: var(--color-white);
}

.badge-sky {
  background: var(--color-sky-50);
  color: var(--color-sky-800);
}

.badge-red {
  background: var(--color-red-50);
  color: var(--color-red-800);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.6rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--color-slate-100);
  color: var(--color-navy-900);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--color-slate-200);
  color: var(--color-navy-900);
}

.btn-primary {
  background: var(--color-emerald-700);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-emerald-800);
  color: var(--color-white);
}

.btn-navy {
  background: var(--color-navy-900);
  color: var(--color-white);
}

.btn-navy:hover {
  background: var(--color-navy-800);
  color: var(--color-white);
}

.btn-ghost {
  background: transparent;
  border-color: var(--color-slate-300);
}

.btn-ghost:hover {
  background: var(--color-slate-50);
}

.btn-alert {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fdba74;
}

.btn-small {
  min-height: 2.1rem;
  padding: 0.3rem 0.7rem;
  font-size: var(--text-sm);
}

.btn-block {
  width: 100%;
}

.field {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
  font-weight: 700;
  color: var(--color-navy-900);
  font-size: var(--text-sm);
}

.input,
.select,
.textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--color-slate-300);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-navy-900);
  font: inherit;
  font-weight: 500;
}

.textarea {
  min-height: 7rem;
  resize: vertical;
}

.switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  color: var(--color-navy-900);
}

.switch input {
  position: absolute;
  opacity: 0;
  inline-size: 1px;
  block-size: 1px;
}

.switch-ui {
  width: 2.75rem;
  height: 1.6rem;
  border-radius: var(--radius-pill);
  background: var(--color-slate-300);
  position: relative;
  flex: none;
}

.switch-ui::after {
  content: "";
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.switch input:checked + .switch-ui {
  background: var(--color-emerald-700);
}

.switch input:checked + .switch-ui::after {
  inset-inline-start: 1.3rem;
}

.switch input:focus-visible + .switch-ui {
  box-shadow: var(--focus);
}

.switch span:last-child {
  display: grid;
}

.switch small {
  font-weight: 600;
  color: var(--color-slate-600);
}

.table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-md);
  background: var(--color-white);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

table.data th,
table.data td {
  padding: 0.85rem 1rem;
  text-align: start;
  vertical-align: top;
  border-block-end: 1px solid var(--color-slate-200);
}

table.data th {
  background: var(--color-slate-50);
  color: var(--color-slate-600);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

table.data tr:last-child td {
  border-block-end: 0;
}

table.data caption {
  caption-side: bottom;
  text-align: start;
  padding: var(--space-3) var(--space-4);
  color: var(--color-slate-600);
  font-size: var(--text-sm);
}

.rsvp {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  border: 0;
  padding: 0;
  margin: 0;
  min-inline-size: 0;
}

.rsvp legend {
  padding: 0;
}

.rsvp label {
  position: relative;
  border: 1px solid var(--color-slate-300);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.75rem;
  background: var(--color-white);
  color: var(--color-navy-900);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
}

.rsvp input {
  position: absolute;
  opacity: 0;
}

.rsvp label:has(input[value="going"]:checked) {
  background: var(--color-emerald-700);
  border-color: var(--color-emerald-700);
  color: var(--color-white);
}

.rsvp label:has(input[value="maybe"]:checked) {
  background: var(--color-amber-800);
  border-color: var(--color-amber-800);
  color: var(--color-white);
}

.rsvp label:has(input[value="out"]:checked) {
  background: var(--color-slate-700);
  border-color: var(--color-slate-700);
  color: var(--color-white);
}

.rsvp label:has(input:focus-visible) {
  box-shadow: var(--focus);
}

.segment {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  border: 0;
  margin: 0;
  padding: 0;
}

.segment label {
  position: relative;
  border: 1px solid var(--color-slate-300);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.75rem;
  background: var(--color-white);
  color: var(--color-navy-900);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
}

.segment input {
  position: absolute;
  opacity: 0;
}

.segment label:has(input:checked) {
  background: var(--color-navy-900);
  border-color: var(--color-navy-900);
  color: var(--color-white);
}

.segment label:has(input:focus-visible) {
  box-shadow: var(--focus);
}

.priority {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid #f3d7a1;
  border-inline-start: 6px solid var(--color-amber-800);
  background: var(--color-amber-50);
  color: var(--color-navy-900);
}

.priority strong {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: var(--text-xs);
  color: var(--color-amber-800);
}

.choice {
  position: relative;
  display: grid;
  gap: var(--space-3);
  align-content: start;
  height: 100%;
  padding: var(--space-4);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-md);
  background: var(--color-white);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.choice input {
  position: absolute;
  opacity: 0;
}

.choice:has(input:checked) {
  border-color: var(--color-emerald-700);
  box-shadow: 0 0 0 3px var(--color-emerald-100);
}

.choice:has(input:focus-visible) {
  box-shadow: var(--focus);
}

.swatch {
  height: 4.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-slate-200);
}

.swatch-crest {
  background:
    linear-gradient(var(--color-navy-900), var(--color-navy-900)) top / 100% 1.3rem no-repeat,
    var(--color-white);
}

.swatch-night {
  background:
    linear-gradient(var(--color-emerald-600), var(--color-emerald-600)) center / 100% 4px no-repeat,
    var(--color-navy-950);
}

.swatch-board {
  background:
    linear-gradient(90deg, var(--color-emerald-600) 0 8px, transparent 8px),
    var(--color-navy-900);
}

.swatch-family {
  background:
    radial-gradient(circle at 30% 40%, var(--color-white) 0 18px, transparent 19px),
    linear-gradient(160deg, var(--color-emerald-100), var(--color-slate-100));
}

.swatch-gazette {
  background:
    repeating-linear-gradient(
      var(--color-slate-200),
      var(--color-slate-200) 2px,
      var(--color-white) 2px,
      var(--color-white) 10px
    );
}

.news {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
}

.news-photo {
  height: 5.5rem;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(145deg, rgba(11, 31, 58, 0.15), transparent 55%),
    var(--color-emerald-100);
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}

.store-item {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-md);
  background: var(--color-slate-50);
}

.jersey {
  height: 5.5rem;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(90deg, transparent 42%, rgba(255, 255, 255, 0.35) 42% 58%, transparent 58%),
    var(--color-navy-900);
}

.jersey-away {
  background:
    linear-gradient(90deg, transparent 42%, var(--color-navy-900) 42% 58%, transparent 58%),
    var(--color-white);
  border: 1px solid var(--color-slate-300);
}

.jersey-train {
  background: var(--color-emerald-700);
}

.jersey-ball {
  background:
    radial-gradient(circle at 50% 50%, var(--color-white) 0 18px, var(--color-navy-900) 19px 22px, var(--color-white) 23px);
  background-color: var(--color-slate-200);
}

.addon-board:not(:has(#addon-store:checked)) .store-preview {
  display: none;
}

#reg-open:checked ~ span .reg-closed,
#reg-open:not(:checked) ~ span .reg-open-copy {
  display: none;
}

.rules {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-navy-900);
  color: var(--color-slate-100);
}

.rules h3,
.rules strong {
  color: var(--color-white);
}

.scorebug {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-navy-950);
  color: var(--color-white);
}

.scorebug h2,
.scorebug h3,
.scorebug p {
  color: inherit;
}

.scorebug .btn,
.scorebug .btn:hover,
.scorebug .btn:active {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.opponent-goal {
  margin: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border-inline-start: 4px solid #c2410c;
  background: #fff7ed;
  color: #7c2d12;
  font-weight: 700;
}

.badge-opponent {
  background: #ffedd5;
  color: #9a3412;
}

.scorebug .opponent-goal {
  background: rgba(251, 146, 60, 0.18);
  color: #ffedd5;
}

.score-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.score-line b {
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: live-pulse 1.6s infinite;
}

@keyframes live-pulse {
  70% {
    box-shadow: 0 0 0 8px transparent;
  }
}

.pill-counts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.pill-counts span {
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.6rem;
  font-size: var(--text-xs);
  font-weight: 800;
}

.pill-going {
  background: var(--color-emerald-100);
  color: var(--color-emerald-800);
}

.pill-maybe {
  background: var(--color-amber-50);
  color: var(--color-amber-800);
}

.pill-out {
  background: var(--color-slate-200);
  color: var(--color-slate-700);
}

.device {
  width: min(var(--phone), 100%);
  min-height: min(760px, calc(100vh - 6rem));
  max-height: min(860px, calc(100vh - 6rem));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  background: var(--color-slate-50);
  border: 12px solid var(--color-navy-950);
  border-radius: 36px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.device-status {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 1rem 0;
  background: var(--color-white);
  color: var(--color-navy-900);
  font-size: var(--text-xs);
  font-weight: 700;
}

.device-screen {
  display: grid;
  align-content: start;
  flex: 1;
  min-height: 0;
  gap: var(--space-3);
  padding: var(--space-3);
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(4, 120, 87, 0.1), transparent 140px),
    var(--color-slate-50);
}

.device-screen h1 {
  font-size: 1.55rem;
}

.tabbar {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--color-white);
  border-block-start: 1px solid var(--color-slate-200);
}

.tabbar.tabs-4 {
  grid-template-columns: repeat(4, 1fr);
}

.tabbar.tabs-5 {
  grid-template-columns: repeat(5, 1fr);
}

.app-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-block-end: var(--space-4);
}

.app-tabs a,
.app-tabs button {
  border: 1px solid var(--color-slate-300);
  background: var(--color-white);
  color: var(--color-navy-900);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.app-tabs a.is-active,
.app-tabs button.is-active,
.app-tabs a[aria-current="page"] {
  background: var(--color-navy-900);
  border-color: var(--color-navy-900);
  color: var(--color-white);
}

.bar-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr auto;
  gap: 0.6rem;
  align-items: center;
}

.bar {
  height: 0.7rem;
  border-radius: 999px;
  background: var(--color-slate-200);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--color-emerald-700);
}

.profile-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}

.profile-side {
  display: grid;
  gap: 0.35rem;
}

.profile-side button {
  text-align: start;
  border: 1px solid var(--color-slate-200);
  background: var(--color-white);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-weight: 700;
  color: var(--color-navy-900);
  cursor: pointer;
}

.profile-side button.is-active {
  background: var(--color-navy-900);
  color: var(--color-white);
  border-color: var(--color-navy-900);
}

tr.is-clickable {
  cursor: pointer;
}

@media (max-width: 800px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-side {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
  }

  .profile-side button {
    flex: none;
  }
}

.tabbar.tabs-6 {
  grid-template-columns: repeat(6, 1fr);
}

.tabbar.tabs-7 {
  grid-template-columns: repeat(7, 1fr);
}

.tabbar.tabs-7 .tab {
  font-size: 0.62rem;
  padding-inline: 0.05rem;
}

.tabbar.tabs-8 {
  grid-template-columns: repeat(4, 1fr);
}

.tabbar.tabs-8 .tab {
  font-size: 0.68rem;
  padding-inline: 0.1rem;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--color-amber-800);
  color: var(--color-white);
  font-size: 0.65rem;
  line-height: 1;
}

.tabbar.tabs-6 .tab {
  font-size: 0.68rem;
  padding-inline: 0.12rem;
}

.tab {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.7rem 0.3rem 0.85rem;
  color: var(--color-slate-600);
  text-decoration: none;
  font-size: var(--text-xs);
  font-weight: 800;
}

.tab[aria-current="page"] {
  color: var(--color-emerald-800);
  box-shadow: inset 0 3px 0 var(--color-emerald-700);
}

.child-radio {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  opacity: 0;
}

.child-switch label,
.child-switch button,
.team-switch button {
  border: 1px solid var(--color-slate-300);
  background: var(--color-white);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-weight: 700;
  color: var(--color-navy-900);
  cursor: pointer;
}

.child-switch button.is-active,
.team-switch button.is-active {
  background: var(--color-navy-900);
  border-color: var(--color-navy-900);
  color: var(--color-white);
}

#child-maya:checked ~ .child-switch label[for="child-maya"],
#child-leo:checked ~ .child-switch label[for="child-leo"],
#m-child-maya:checked ~ .child-switch label[for="m-child-maya"],
#m-child-leo:checked ~ .child-switch label[for="m-child-leo"] {
  background: var(--color-navy-900);
  border-color: var(--color-navy-900);
  color: var(--color-white);
}

.child-panel.leo {
  display: none;
}

#child-leo:checked ~ .child-panel.leo,
#m-child-leo:checked ~ .child-panel.leo {
  display: grid;
}

#child-leo:checked ~ .child-panel.maya,
#m-child-leo:checked ~ .child-panel.maya {
  display: none;
}

.child-panel {
  display: grid;
  gap: var(--space-4);
}

.screen-card {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-slate-200);
  border-inline-start: 6px solid var(--color-navy-900);
  background: var(--color-white);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
}

.screen-card:hover {
  border-color: var(--color-emerald-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.screen-card.mobile {
  border-inline-start-color: var(--color-emerald-700);
}

.screen-card.admin {
  border-inline-start-color: var(--color-slate-600);
}

.span-all {
  grid-column: 1 / -1;
}

.block-gap {
  margin-block-start: var(--space-4);
}

.on-dark {
  color: var(--color-slate-300);
}

.topbar .fine {
  margin: 0;
  color: var(--color-slate-200);
}

.stat-row-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.device .stat-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.device .stat {
  padding: var(--space-3);
}

.device .stat-value {
  font-size: 1.35rem;
}

.event {
  display: grid;
  gap: var(--space-3);
  padding-block: var(--space-3);
  border-block-end: 1px solid var(--color-slate-200);
}

.event:last-child {
  border-block-end: 0;
  padding-block-end: 0;
}

.player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
}

.avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  background: var(--color-navy-900);
  color: var(--color-white);
  font-weight: 800;
}

.avatar img,
img.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar.avatar-sm {
  width: 2.25rem;
  height: 2.25rem;
}

.avatar.avatar-lg {
  width: 4.75rem;
  height: 4.75rem;
}

.identity,
.with-avatar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.action-grid .btn {
  min-height: 4.4rem;
  white-space: normal;
  text-align: center;
}

.is-tappable {
  cursor: pointer;
}

.timer-readout {
  margin: 0;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--color-navy-900);
}

.match-timer {
  background: var(--color-navy-900);
  color: var(--color-white);
}

.match-timer .timer-readout,
.match-timer .fine,
.match-timer .nameplate,
.match-timer h3,
.match-timer .field,
.match-timer .timer-label {
  color: #ffffff;
}

.match-timer .input,
.match-timer .select {
  background: #ffffff;
  color: #0b1f3a;
  border-color: rgba(255, 255, 255, 0.45);
}

.match-timer .input::placeholder {
  color: #64748b;
}

.match-timer .btn,
.match-timer .btn:hover,
.match-timer .btn:active,
.match-timer .btn:focus-visible {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.match-timer .btn:hover,
.match-timer .btn:active {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.6);
}

.match-timer .btn-primary,
.match-timer .btn-primary:hover,
.match-timer .btn-primary:active,
.match-timer .btn-primary:focus-visible {
  color: #ffffff;
  background: var(--color-emerald-700);
  border-color: #065f46;
}

.match-timer .btn-primary:hover,
.match-timer .btn-primary:active {
  background: var(--color-emerald-800);
}

.match-timer .btn-alert,
.match-timer .btn-alert:hover,
.match-timer .btn-alert:active,
.match-timer .btn-alert:focus-visible {
  color: #ffffff;
  background: rgba(180, 83, 9, 0.45);
  border: 1px solid rgba(253, 186, 116, 0.95);
}

.match-timer .btn-alert:hover,
.match-timer .btn-alert:active {
  background: rgba(153, 27, 27, 0.72);
  border-color: #fecaca;
}

.timer-pill {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: var(--color-navy-900);
  color: var(--color-white);
  text-decoration: none;
  font-weight: 800;
}

.timer-pill[hidden] {
  display: none;
}

.live-match .timer-readout {
  font-size: 2.4rem;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.scoreboard {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: baseline;
  font-size: 1.15rem;
}

.scoreboard b {
  font-size: 2rem;
}

.own-goal {
  outline: 2px solid var(--color-emerald-700);
  border-radius: 12px;
  padding: 0.25rem;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: end;
  background: rgba(7, 20, 34, 0.55);
}

.sheet-backdrop[hidden] {
  display: none !important;
}

.sheet,
.modal {
  overflow-x: hidden;
}

.sheet {
  width: min(430px, 100%);
  max-height: 88vh;
  margin-inline: auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: var(--space-4);
  background: var(--color-white);
  border-radius: 18px 18px 0 0;
  min-width: 0;
}

.sheet input,
.sheet select,
.sheet textarea,
.modal input,
.modal select,
.modal textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
}

.toast {
  position: fixed;
  z-index: 50;
  inset-inline: 1rem;
  bottom: 5.5rem;
  margin-inline: auto;
  width: min(420px, calc(100% - 2rem));
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--color-navy-900);
  color: var(--color-white);
  text-align: center;
  font-weight: 700;
}

.toast[hidden] {
  display: none !important;
}

.team-banner {
  width: 100%;
  height: 9.5rem;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
  background: var(--color-slate-200);
}

.team-banner-sm {
  height: 6.25rem;
}

.notice-unread {
  border-inline-start: 6px solid var(--color-amber-800);
}

.notice-read {
  border-inline-start: 6px solid var(--color-slate-300);
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.search-bar .input {
  flex: 1 1 16rem;
}

.search-hit {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-3);
  border-block-end: 1px solid var(--color-slate-200);
}

.search-hit:last-child {
  border-block-end: 0;
  padding-block-end: 0;
}

.team-thumb {
  width: 4.75rem;
  height: 3.1rem;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
  flex: none;
  background: var(--color-slate-200);
}

details.goal-log {
  display: grid;
  gap: var(--space-3);
}

details.goal-log summary {
  list-style: none;
}

details.goal-log summary::-webkit-details-marker {
  display: none;
}

.price {
  display: grid;
  gap: var(--space-2);
}

.price b {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-navy-900);
  letter-spacing: -0.04em;
}

.check-list {
  margin: 0;
  padding-inline-start: 1.1rem;
  display: grid;
  gap: var(--space-2);
}

@media (max-width: 980px) {
  .stat-row-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .store-grid,
  .news {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .stat-row-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .device {
    border-width: 0;
    border-radius: 0;
    min-height: 100vh;
    max-height: none;
    box-shadow: none;
    overflow: visible;
  }

  .device,
  .device-screen {
    overflow-x: hidden;
  }

  .device-screen {
    overflow-y: visible;
  }

  .tabbar {
    position: sticky;
    inset-block-end: 0;
  }

  .stage {
    padding: 0;
  }

  .stage-bar {
    padding: var(--space-3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot,
  .screen-card {
    animation: none;
    transition: none;
  }
}

.session-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding: 0.55rem 1rem;
  background: var(--color-white);
  color: var(--color-navy-900);
  border-block-end: 1px solid var(--color-slate-200);
  font-size: var(--text-sm);
}

.session-bar p {
  margin: 0;
  font-weight: 700;
}

.session-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.bell {
  position: relative;
}

.bell-button {
  position: relative;
  min-width: 2.5rem;
}

.bell-icon {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bell-count {
  position: absolute;
  top: -0.35rem;
  inset-inline-end: -0.35rem;
  min-width: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #b91c1c;
  color: white;
  font-size: 0.65rem;
  line-height: 1.1rem;
  font-weight: 800;
}

.bell-count[hidden] {
  display: none;
}

.bell-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.4rem);
  inset-inline-end: 0;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(26rem, 70vh);
  overflow: auto;
  padding: 0.75rem;
  background: white;
  color: var(--color-navy-900);
  border: 1px solid var(--color-slate-200);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.bell-panel[hidden] {
  display: none;
}

.login-code {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--color-navy-900);
  color: var(--color-white);
  font-weight: 800;
  letter-spacing: 0.08em;
}

html.auth-lock body {
  visibility: hidden;
}

button.choice {
  width: 100%;
  text-align: start;
  font: inherit;
}

body.access-open {
  overflow: hidden;
}

.access-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(7, 20, 34, 0.55);
}

.access-modal {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: 90dvh;
  background: var(--color-white);
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.access-modal-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 90dvh;
}

.access-modal-head,
.access-modal-foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--color-white);
}

.access-modal-head {
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--color-slate-200);
}

.access-modal-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.access-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
}

.access-modal-foot {
  justify-content: flex-end;
  padding: 0.75rem 1rem calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-slate-200);
}

.access-modal fieldset {
  border: 1px solid var(--color-slate-200);
  border-radius: 12px;
  margin: 0;
  padding: 0.75rem;
  min-inline-size: 0;
}

.access-modal legend,
fieldset legend {
  font-weight: 800;
  padding: 0 0.25rem;
}

.scope-box {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #064e3b;
  font-weight: 700;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 700;
}

.check-row input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  flex: none;
}

table.data.scope-table {
  min-width: 0;
  table-layout: fixed;
}

table.data.scope-table th,
table.data.scope-table td {
  overflow-wrap: anywhere;
}

@media (min-width: 720px) {
  .access-backdrop {
    align-items: center;
    padding: 1.25rem;
  }

  .access-modal {
    border-radius: 18px;
  }
}

@media (max-width: 720px) {
  table.data.scope-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  table.data.scope-table,
  table.data.scope-table tbody,
  table.data.scope-table tr,
  table.data.scope-table td {
    display: block;
    width: 100%;
  }

  table.data.scope-table tr {
    padding-block: 0.65rem;
    border-bottom: 1px solid var(--color-slate-200);
  }

  table.data.scope-table td {
    border: 0;
    padding: 0.2rem 0.85rem;
  }

  table.data.scope-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.1rem;
    color: var(--color-slate-600);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}
