/* Phade's design language: dark-only, Poppins, mint (#46bb93) on near-black,
   rounded gradient cards. Values mirror Phade's globals.css and the Tailwind
   grays it uses, so the two apps read as one family. */
:root {
  --bg: #0a0a0a;
  --fg: #ededed;
  --accent: #46bb93;
  --accent-dark: #05203c;
  --live: #ef6b6b;
  --warn: #fbbf24;
  --white: #ffffff;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --surface: #10161f;
  --surface-hover: #151d29;
  --surface-active: #2a3442;
  --sheet: #111111;
  --card-border: rgb(31 41 55 / 0.6);
  --card-bg: linear-gradient(to bottom, rgb(17 24 39 / 0.8), rgb(3 7 18 / 0.8));
  --hairline: rgb(31 41 55 / 0.4);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 980px;
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* contain: keeps scroll momentum but stops the rubber-band overshoot, which
   shows as jitter under a sticky header in the iOS shell. */
html, body {
  overflow-x: clip;
  overscroll-behavior-y: contain;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { letter-spacing: -0.015em; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

button:disabled { cursor: default; }

img { -webkit-touch-callout: none; }

:where(a, button, [role="tab"], input):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---- Header ---- */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(10 10 10 / 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding-top: env(safe-area-inset-top);
}

.top-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px max(var(--gutter), env(safe-area-inset-right)) 6px max(var(--gutter), env(safe-area-inset-left));
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img { border-radius: 8px; }

.brand-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--white);
}

/* Game and team pages: a back button and the page's title replace the brand,
   and the league pills give way to the page. */
.back-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: -10px;
  border-radius: 10px;
  color: var(--white);
}

/* Hover only with a mouse: a phone keeps :hover on whatever was tapped last. */
@media (hover: hover) {
  .back-btn:hover { background: rgb(255 255 255 / 0.05); }
}
.back-btn[hidden] { display: none; }

.page-title {
  display: none;
  flex: 1;
  min-width: 0;
  margin: 0 8px 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
}

.page-mode .page-title { display: block; }
/* Stop the title short of the LineSteam link in the middle, when it shows. */
.page-mode .top-inner:has(.ls-top:not([hidden])) .page-title { flex: 0 1 auto; max-width: calc(50% - 90px); margin-right: auto; }
.page-mode .brand,
.page-mode #tabs,
.page-mode #main { display: none; }
.page-mode .top-inner { padding-bottom: 10px; }

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px max(var(--gutter), env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}

body:not(.page-mode) .page { display: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* LineSteam's mark over its name, in the middle of the header on every
   screen. */
.ls-top {
  position: absolute;
  left: 50%;
  top: calc(50% + 2px);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 44px;
  height: 44px;
  padding: 0 4px;
  border-radius: 10px;
  color: var(--gray-400);
  text-decoration: none;
}

.ls-top[hidden] { display: none; }
.ls-top img { display: block; }

.ls-top-name { width: 84px; height: auto; }

@media (hover: hover) {
  .ls-top:hover { background: rgb(255 255 255 / 0.05); color: var(--white); }
}
.ls-top:active { transform: translate(-50%, -50%) scale(0.95); }

/* Find a team, then refresh, at the header's right. */
.top-actions {
  flex: none;
  display: flex;
  align-items: center;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: var(--gray-400);
}

@media (hover: hover) {
  .icon-btn:not(:disabled):hover { background: rgb(255 255 255 / 0.05); color: var(--white); }
}
.icon-btn:not(:disabled):active { transform: scale(0.95); }
.icon-btn[hidden] { display: none; }

.spinning svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Pull to refresh (pull.js): the content slides down under the header and a
   puck comes out from beneath it, turning with the pull, mint once letting go
   will refresh, spinning while it does. */
.ptr {
  position: fixed;
  top: var(--ptr-top, 0px);
  left: 50%;
  z-index: 19;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  border: 1px solid var(--gray-800);
  border-radius: 50%;
  background: var(--gray-900);
  color: var(--gray-400);
  box-shadow: 0 6px 16px rgb(0 0 0 / 0.45);
  pointer-events: none;
  visibility: hidden;
  opacity: var(--pull-show, 0);
  transform: translateY(calc(var(--pull, 0px) / 2 - 18px));
}

.ptr svg { transform: rotate(var(--pull-turn, 0deg)); }
.ptr.armed { color: var(--accent); border-color: rgb(70 187 147 / 0.35); }
.ptr.refreshing svg { animation: ptr-spin 0.8s linear infinite; }
@keyframes ptr-spin {
  from { transform: rotate(var(--pull-turn, 0deg)); }
  to { transform: rotate(calc(var(--pull-turn, 0deg) + 360deg)); }
}
.ptr-active .ptr { visibility: visible; }

.ptr-active main,
.ptr-active .page { transform: translateY(var(--pull, 0px)); }

.ptr-settling .ptr,
.ptr-settling main,
.ptr-settling .page { transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 260ms ease; }
.ptr-settling .ptr svg { transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1); }

/* The 2px brand strip under the header (Phade's mobile header). */
.accent-line {
  height: 2px;
  background: linear-gradient(to right, var(--accent-dark), var(--accent), var(--accent-dark));
  opacity: 0.8;
}

/* League pills: Phade's pill group (DayStrip view toggle, calendar button). */
.tabs {
  display: flex;
  gap: 8px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 4px max(var(--gutter), env(safe-area-inset-right)) 12px max(var(--gutter), env(safe-area-inset-left));
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--gray-800);
  border-radius: 999px;
  background: var(--surface);
  color: var(--gray-400);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.tab:hover { color: var(--white); background: var(--surface-hover); }

.tab[aria-selected="true"] {
  background: var(--surface-active);
  color: #34d399;
  font-weight: 700;
  border-color: rgb(70 187 147 / 0.35);
}

.tab svg { flex: none; }

/* ---- Main ---- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px max(var(--gutter), env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}

/* Segmented control: Phade's Upcoming / Live / Complete tab bar. */
.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: rgb(17 24 39 / 0.8);
}

.segmented button {
  flex: 1;
  min-height: 40px;
  border-radius: 8px;
  color: var(--gray-400);
  font-size: 14px;
  font-weight: 500;
}

.segmented button:hover { color: var(--gray-300); }

.segmented button[aria-selected="true"] {
  background: var(--gray-800);
  color: var(--white);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
}

/* College football's conference picker: a card row that opens the app's own
   dropdown under it (sections, a check on the current one), not the phone's
   select wheel. */
.filter {
  position: relative;
  margin: -4px 0 16px;
}

.filter.open { z-index: 30; }

.filter-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 44px 0 16px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.filter-btn:focus-visible,
.filter.open .filter-btn { border-color: rgb(70 187 147 / 0.6); outline: none; }

.filter-label {
  flex: none;
  width: 72px;
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.filter-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.filter-chevron {
  position: absolute;
  right: 16px;
  display: flex;
  color: var(--accent);
  transition: transform 160ms ease-out;
}

.filter.open .filter-chevron { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(420px, 60svh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--gray-800);
  border-radius: 12px;
  background: var(--sheet);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.7);
  animation: dropdownOpen 160ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.dropdown[hidden] { display: none; }

@keyframes dropdownOpen { from { opacity: 0; transform: translateY(-6px); } }

.dropdown-section + .dropdown-section,
.dropdown-option + .dropdown-section { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--gray-800); }

.dropdown-heading {
  padding: 8px 12px 4px;
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dropdown-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.dropdown-option[aria-selected="true"] { color: var(--accent); font-weight: 600; }
.dropdown-option:focus-visible { outline: none; background: var(--gray-800); }
.dropdown-option:active { background: var(--gray-800); }

@media (hover: hover) {
  .dropdown-option:hover { background: rgb(31 41 55 / 0.6); }
}

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

/* Sub filters (the NFL's standings views, the polls) sit centered; a poll's
   headline goes on its own line under them. */
.toolbar-center {
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.toolbar-center .sub {
  flex-basis: 100%;
  text-align: center;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.sub {
  font-size: 12px;
  color: var(--gray-500);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--gray-800);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.pill-btn:hover { background: var(--surface-active); }

/* ---- Day strip (Phade's DayStrip) ---- */

.nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  margin-bottom: 8px;
}

.strip {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  overflow: hidden;
  border: 1px solid var(--gray-800);
  border-radius: 12px;
  background: var(--surface);
}

.strip-arrow {
  display: grid;
  place-items: center;
  min-height: 56px;
  color: var(--accent);
}

.strip-arrow:not(:disabled):hover { background: var(--surface-hover); }
.strip-arrow:disabled { color: var(--gray-700); }

.strip-window { overflow: hidden; }

.strip-track {
  display: flex;
  transition: transform 300ms ease-out;
}

.day {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1px;
  flex: none;
  padding: 10px 2px;
  color: var(--gray-400);
}

.day:hover { background: var(--surface-hover); }

.day .dow {
  font-size: 12px;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

.day .date {
  font-size: 10px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--gray-500);
  line-height: 1.2;
}

.day.selected { color: var(--white); }
.day.selected .dow { font-weight: 700; }
.day.selected .date { color: var(--white); }

.day.selected::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}

.today-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nav-actions .sub {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Week bar for football, and the week view of the other leagues. */
.week-center {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  padding: 8px 4px;
  text-align: center;
}

.week-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
}

.week-detail {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-500);
}

/* ---- Status ---- */

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--gray-500);
}

.status.error { color: var(--live); }

.status .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

/* ---- Groups ---- */

.group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.group-title.in { color: var(--live); }
.group-title.pre { color: var(--accent); }

.count {
  display: inline-flex;
  align-items: center;
  min-width: 20px;
  height: 18px;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gray-800);
  color: var(--gray-400);
  font-size: 10px;
  letter-spacing: 0;
}

.group-title.in .count { background: rgb(239 68 68 / 0.15); color: var(--live); }
.group-title.pre .count { background: rgb(70 187 147 / 0.15); color: var(--accent); }

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

@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Cards ---- */

.card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.2), 0 4px 6px -4px rgb(0 0 0 / 0.2);
}

.game.live { border-color: rgb(239 107 107 / 0.3); }

.game-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--gray-500);
}

.game-head .tv {
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.clock {
  color: var(--gray-300);
  font-weight: 500;
}

.badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gray-800);
  color: var(--gray-400);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-live { background: rgb(239 68 68 / 0.15); color: var(--live); }
.badge-warn { background: rgb(245 158 11 / 0.15); color: var(--warn); }

.league-chip {
  flex: none;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgb(70 187 147 / 0.15);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: 0.35; } }

.teams { padding: 4px 0; }

.team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
}

.logo {
  flex: none;
  width: 28px;
  height: 28px;
  object-fit: contain;
  /* Lifts dark logos (Raiders, Nets) off the near-black card. */
  filter: drop-shadow(0 0 1px rgb(255 255 255 / 0.35));
}

/* Phade's TeamLogo fallback: team color circle with its abbreviation. */
.logo-fallback {
  display: grid;
  place-items: center;
  border-radius: 50%;
  filter: none;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
}

.rank {
  margin-right: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
}

.star {
  display: inline-block;
  margin-left: 6px;
  color: var(--accent);
  vertical-align: -1px;
}

.poss {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgb(70 187 147 / 0.2);
}

.record {
  flex: none;
  font-size: 12px;
  color: var(--gray-500);
}

.score {
  flex: none;
  margin-left: auto;
  min-width: 2ch;
  text-align: right;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
}

.win-mark {
  flex: none;
  width: 8px;
  margin-right: -6px;
  color: var(--accent);
}

.team.lost .name { color: var(--gray-400); }
.team.lost .score { color: var(--gray-500); font-weight: 600; }
.team.lost .logo { opacity: 0.7; }

/* Phade's "@" rule between the two teams. */
.divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-600);
}

.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgb(31 41 55 / 0.5);
}

/* Pre-game moneyline in the score's place: a cell, as in Phade's pick grid,
   so it never reads as a score. */
.ml {
  display: inline-block;
  min-width: 56px;
  padding: 4px 8px;
  border: 1px solid var(--gray-700);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--gray-300);
  text-align: center;
  vertical-align: middle;
}

.game-odds {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  padding: 8px 16px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-300);
}

.odd-label {
  margin-right: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.book {
  margin-left: auto;
  font-size: 11px;
  font-weight: 400;
  color: var(--gray-600);
}

.game-foot {
  padding: 8px 16px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--gray-400);
}

/* A detailed card's live situation: baseball's diamond, football's field,
   the last play. */
.game-live {
  display: grid;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--gray-400);
}

.game-live p { margin: 0; }

.live-last {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.live-last span,
.card-who span {
  margin-right: 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.card-diamond {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.card-bases {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.card-bases svg { width: 48px; height: 34px; }
.card-bases .base { fill: rgb(255 255 255 / 0.06); stroke: var(--gray-500); stroke-width: 1.5; }
.card-bases .base.on { fill: var(--warn); stroke: var(--warn); }

.card-count {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.card-count b { font-size: 15px; font-weight: 700; color: var(--white); }

.card-outs { display: flex; gap: 4px; }

.card-outs i {
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--gray-500);
  border-radius: 50%;
}

.card-outs i.on { background: var(--white); border-color: var(--white); }

.card-who {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.card-who p {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-who b { font-weight: 600; color: var(--gray-300); }

.field.card-field {
  height: 16px;
  margin: 0;
  border-radius: 4px;
}

.card-field .turf .ball { width: 18px; margin-left: -9px; }
.card-field .turf .ball svg { width: 16px; height: 10px; }

.card-field-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-300);
}

.game-moments {
  display: grid;
  gap: 4px;
  padding: 8px 16px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--gray-400);
}

.game-moments p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  margin: 0;
}

.game-moments b {
  min-width: 3ch;
  font-weight: 700;
  color: var(--gray-300);
}

.moment { white-space: nowrap; }
.game-moments .play-icon { margin-right: 4px; }

/* Compact cards: the teams, the score and the time, two across on a phone. */
.grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 720px) {
  .grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.game.compact {
  display: grid;
  gap: 2px;
  padding: 8px 10px 6px;
}

.compact-status {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
}

.compact-status.on { color: var(--live); }
.compact-status .warn { color: var(--warn); }

.compact-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.compact-team .logo { width: 20px; height: 20px; }
.compact-team .logo-fallback { font-size: 7px; }
.compact-team .name { font-size: 13px; }
.compact-team .rank { margin-right: 4px; font-size: 10px; }
.compact-team .score { min-width: 2ch; font-size: 16px; }
.compact-team.lost .name { color: var(--gray-400); }
.compact-team.lost .score { color: var(--gray-500); font-weight: 600; }
.compact-team.lost .logo { opacity: 0.7; }

/* ---- Standings ---- */

.table-wrap { overflow-x: auto; }

.standings {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.standings th,
.standings td {
  height: 40px;
  padding: 0 6px;
  text-align: center;
  white-space: nowrap;
}

.standings thead th {
  height: 34px;
  border-bottom: 1px solid var(--hairline);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.standings tbody tr + tr > * { border-top: 1px solid rgb(31 41 55 / 0.35); }

.standings td { color: var(--gray-300); }
.standings td.key { color: var(--white); font-weight: 600; }

.standings .col-team {
  width: 100%;
  max-width: 0;
  padding-left: 12px;
  text-align: left;
}

.standings tbody .col-team {
  font-weight: 500;
  color: var(--white);
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.team-cell .logo { width: 22px; height: 22px; }
.team-cell .logo-fallback { font-size: 7px; }

.team-cell .team-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos {
  flex: none;
  position: relative;
  width: 22px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-align: left;
}

/* Zone marker (playoffs, Europe, relegation) from the feed's entry notes. */
.pos[style]::before {
  content: "";
  position: absolute;
  left: -12px;
  top: -11px;
  bottom: -11px;
  width: 3px;
  background: var(--note);
}

.standings tr.followed .team-name { color: var(--accent); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 10px 2px 0;
  font-size: 11px;
  color: var(--gray-500);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--note);
}

/* ---- Team stats ---- */

.stats-season {
  margin: 10px 2px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--gray-500);
}

/* The key stats: tiles in threes, the value big, the league rank in mint. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-tile {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 3px;
  padding: 14px 6px;
  text-align: center;
}

.stat-tile:nth-child(3n + 2) { border-inline: 1px solid var(--hairline); }
.stat-tile:nth-child(n + 4) { border-top: 1px solid var(--hairline); }

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
}

.stat-label {
  font-size: 11px;
  line-height: 1.3;
  color: var(--gray-400);
}

.stat-rank {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}

/* Every stat, by category, folded. */
.stat-list { padding: 4px 0; }

.stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px 52px;
  align-items: baseline;
  gap: 10px;
  padding: 8px 16px;
  font-size: 13px;
}

.stat-row + .stat-row { border-top: 1px solid var(--hairline); }
.stat-row-label { color: var(--gray-300); }
.stat-row-value { font-weight: 600; text-align: right; color: var(--white); }

.stat-row-rank {
  font-size: 11px;
  text-align: right;
  color: var(--gray-500);
}

/* ---- News ---- */

/* The newest article leads with its picture and summary; the rest are rows
   with a thumbnail. Each opens on ESPN. */
.news-lead,
.news-row {
  color: inherit;
  text-decoration: none;
}

.news-lead {
  display: block;
  overflow: hidden;
  margin-bottom: 12px;
}

.news-lead-img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--gray-900);
}

.news-lead .news-body { padding: 14px 16px 16px; }
.news-lead .news-headline { font-size: 17px; -webkit-line-clamp: 3; }

.news-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.news-headline {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--white);
}

.news-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.45;
  color: var(--gray-400);
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 12px;
  color: var(--gray-500);
}

/* My Teams: which followed team a story is about. */
.news-team {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--gray-300);
}

.news-team .logo { width: 16px; height: 16px; }
.news-team .logo-fallback { font-size: 6px; }

.news-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 12px 16px;
}

.news-row + .news-row { border-top: 1px solid var(--hairline); }
.news-row .news-body { flex: 1; }

.news-thumb {
  flex: none;
  width: 96px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--gray-900);
}

@media (hover: hover) {
  .news-row:hover,
  .news-lead:hover { background-color: rgb(255 255 255 / 0.03); }
}

.team-tabs { margin: 16px 0 4px; }

/* ---- Rankings ---- */

.pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--gray-800);
  border-radius: 999px;
  background: var(--surface);
}

.pills button {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 500;
}

.pills button:hover { color: var(--white); }

.pills button[aria-pressed="true"] {
  background: var(--surface-active);
  color: #34d399;
  font-weight: 700;
}

.poll-row {
  display: grid;
  grid-template-columns: 30px 34px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 14px;
}

.poll-row + .poll-row { border-top: 1px solid rgb(31 41 55 / 0.35); }

.poll-rank {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  text-align: right;
}

.trend {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-600);
}

.trend.up { color: #34d399; }
.trend.down { color: var(--live); }

.poll-team { min-width: 0; }

.poll-team .name { display: block; }
.poll-team .record { display: block; }

.poll-points {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-300);
}

.poll-points small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--gray-500);
}

.poll-row.followed .name { color: var(--accent); }

.others {
  margin: 12px 2px 0;
  font-size: 12px;
  color: var(--gray-500);
}

/* ---- Empty / error states (Phade's EmptyState) ---- */

.empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 32px 24px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 10px;
  border-radius: 18px;
  background: rgb(70 187 147 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(70 187 147 / 0.25);
  color: var(--accent);
}

.empty.error .empty-icon {
  background: rgb(239 68 68 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(239 68 68 / 0.25);
  color: var(--live);
}

.empty h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
}

.empty p {
  max-width: 34ch;
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--gray-400);
}

.empty .link-btn {
  min-height: 40px;
  font-size: 13px;
  color: var(--gray-400);
}

.empty .link-btn:hover { color: var(--white); }

/* Phade's primary button: navy-to-mint gradient that slides on hover. */
.btn-primary {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 24px;
  border-radius: 10px;
  color: var(--white);
  font-weight: 500;
  background: linear-gradient(to right, var(--accent-dark) 0%, var(--accent-dark) 50%, var(--accent) 100%);
  background-size: 200% 100%;
  background-position: right center;
  transition: background-position 400ms ease, transform 150ms ease;
}

.btn-primary:hover { background-position: left center; }
.btn-primary:active { transform: scale(0.95); }

/* ---- Loading skeletons ---- */

.skeleton {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, rgb(31 41 55 / 0.6) 0%, rgb(55 65 81 / 0.45) 50%, rgb(31 41 55 / 0.6) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card { padding: 14px 16px; display: grid; gap: 14px; }
.skeleton-row { display: flex; align-items: center; gap: 10px; }
.skeleton-row .skeleton:last-child { margin-left: auto; }

/* ---- Entrance animation, only when the view changes (not on refresh) ---- */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.stagger-in .card { animation: fadeInUp 400ms ease both; }
.stagger-in .group:nth-child(2) .card { animation-delay: 80ms; }
.stagger-in .group:nth-child(3) .card { animation-delay: 160ms; }

/* ---- Team picker sheet ---- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(0 0 0 / 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fadeIn 200ms ease-out both;
}

.sheet {
  position: fixed;
  z-index: 41;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100svh - env(safe-area-inset-top) - 24px);
  height: 88svh;
  padding-bottom: env(safe-area-inset-bottom);
  border: 1px solid var(--gray-800);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: var(--sheet);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
  animation: sheetRise 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@media (min-width: 720px) {
  .sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: 520px;
    height: min(720px, 85svh);
    border-bottom: 1px solid var(--gray-800);
    border-radius: 16px;
    transform: translate(-50%, -50%);
    animation: sheetSettle 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .sheet-grabber { display: none; }
}

@keyframes fadeIn { from { opacity: 0; } }
@keyframes sheetRise { from { opacity: 0.6; transform: translateY(24px); } }
@keyframes sheetSettle { from { opacity: 0.6; transform: translate(-50%, -50%) scale(0.97); } }

.sheet-grabber {
  flex: none;
  width: 36px;
  height: 4px;
  margin: 8px auto 0;
  border-radius: 2px;
  background: var(--gray-700);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 4px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}

/* auto margins would stop the row stretching to the sheet, and it would
   grow to fit every league instead of scrolling. */
.sheet .tabs {
  flex: none;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 8px 16px;
}

.tab .count { margin-left: 2px; }
.tab[aria-selected="true"] .count { background: rgb(70 187 147 / 0.2); color: var(--accent); }

/* 16px so iOS doesn't zoom the page when the field gets focus. */
.search {
  margin: 4px 16px 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--gray-700);
  border-radius: 10px;
  background: var(--gray-900);
  color: var(--white);
  font: 16px var(--font);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(70 187 147 / 0.25);
}

.search::placeholder { color: var(--gray-500); }

.team-list {
  flex: 1;
  margin: 0;
  padding: 0 8px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}

.team-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 10px;
  border-radius: 10px;
  text-align: left;
}

.team-option:hover { background: rgb(255 255 255 / 0.04); }

.team-option .name { flex: 1; }

.follow-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--gray-700);
  border-radius: 50%;
  color: var(--gray-500);
}

.team-option[aria-pressed="true"] .follow-mark {
  border-color: transparent;
  background: var(--accent);
  color: var(--bg);
}

.team-option[aria-pressed="true"] .name { color: var(--accent); }

.list-label {
  padding: 12px 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.team-option .league-chip { margin-left: auto; }

/* A player result's team and position, under the name. */
.option-meta {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  font-weight: 400;
  color: var(--gray-500);
}

.list-note {
  padding: 24px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--gray-400);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

.clinch {
  flex: none;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-500);
}

/* Phones: seven days share ~280px. */
@media (max-width: 420px) {
  .day .dow { font-size: 11px; letter-spacing: 0.03em; }
  .day .date { font-size: 9px; letter-spacing: 0; }
}

/* ---- Links into the game and team pages ---- */

a.card,
a.poll-row,
a.team-cell,
a.sched-row,
a.matchup-team,
a.chip,
a.player,
a.lineup-name,
a.roster-row,
a.player-team {
  color: inherit;
  text-decoration: none;
  -webkit-touch-callout: none;
}

a.card { display: block; transition: border-color 150ms ease, transform 150ms ease; }
a.card:hover { border-color: rgb(55 65 81 / 0.8); }
a.card:active { transform: scale(0.99); }
a.card.live:hover { border-color: rgb(239 107 107 / 0.5); }

a.poll-row:hover,
a.sched-row:hover { background: rgb(255 255 255 / 0.03); }

a.team-cell:hover .team-name { color: var(--accent); }

.chips {
  display: flex;
  gap: 8px;
  margin: -4px 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px 0 6px;
  border: 1px solid var(--gray-800);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-300);
}

.chip .logo { width: 22px; height: 22px; }
.chip .logo-fallback { font-size: 7px; }
.chip:hover { background: var(--surface-hover); color: var(--white); }

/* ---- Game page ---- */

.matchup {
  position: relative;
  padding: 14px 16px 16px;
  text-align: center;
}

/* The gear, top left of the matchup card: arranges the sport's cards. */
.arrange-btn {
  position: absolute;
  top: 4px;
  left: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--gray-400);
  cursor: pointer;
}

.arrange-circle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--gray-800);
  border-radius: 50%;
  background: var(--bg);
  transition: border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.arrange-btn:active .arrange-circle { transform: scale(0.94); }

@media (hover: hover) {
  .arrange-btn:hover .arrange-circle { border-color: rgb(70 187 147 / 0.45); color: var(--fg); }
}

.matchup.live { border-color: rgb(239 107 107 / 0.3); }

.matchup-status {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  font-size: 12px;
}

.matchup-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.matchup-team {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  padding: 6px 4px;
  border-radius: 12px;
}

.matchup-team:hover { background: rgb(255 255 255 / 0.03); }
.matchup-team .logo { width: 56px; height: 56px; }
.matchup-team .logo-fallback { font-size: 15px; }
.matchup-team.lost .logo { opacity: 0.7; }

.matchup-name {
  max-width: 100%;
  /* Up to two lines, so a long name keeps its followed star. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
}

.matchup-team.lost .matchup-name { color: var(--gray-400); }

.matchup-score {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
}

.matchup-score .lost { color: var(--gray-500); }
.matchup-score .dash { font-size: 22px; font-weight: 500; color: var(--gray-600); }

.matchup-vs {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.matchup-meta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--gray-500);
}

/* Live football's field, as on the Lock Screen cards: 10-yard end zones
   either side of the 100-yard field. */
.field {
  display: grid;
  grid-template-columns: 1fr 10fr 1fr;
  height: 26px;
  margin: 14px 2px 0;
  border-radius: 6px;
  overflow: hidden;
}

.end-zone {
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* Above the end zones, so a ball on the goal line isn't covered. */
.turf {
  position: relative;
  z-index: 1;
  background: #1e5c38;
}

.turf i,
.turf .ball {
  position: absolute;
  top: 0;
  bottom: 0;
}

.turf .yard { width: 1px; margin-left: -0.5px; background: rgb(255 255 255 / 0.22); }
.turf .yard.mid { background: rgb(255 255 255 / 0.45); }
.turf .to-go { background: rgb(255 255 255 / 0.16); }
.turf .first-down { width: 2px; margin-left: -1px; background: var(--warn); }
.turf .scrimmage { width: 2px; margin-left: -1px; background: rgb(255 255 255 / 0.9); }

.turf .ball {
  display: grid;
  place-items: center;
  width: 24px;
  margin-left: -12px;
}

.turf .ball svg {
  width: 22px;
  height: 13px;
  transform: rotate(-25deg);
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.5));
}

.field-detail {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-300);
}

.field-ball {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.field-ball svg { width: 16px; height: 10px; }

/* Live baseball's diamond: the bases taken in amber, the count and the outs
   beside it, then who's batting and pitching. */
.diamond {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.diamond-svg { width: 72px; height: 52px; }

.diamond-svg .base {
  fill: rgb(255 255 255 / 0.06);
  stroke: var(--gray-500);
  stroke-width: 1.5;
}

.diamond-svg .base.on { fill: var(--warn); stroke: var(--warn); }

.diamond-side {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.diamond-count {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}

.diamond-outs { display: flex; gap: 5px; }

.diamond-outs i {
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--gray-500);
  border-radius: 50%;
}

.diamond-outs i.on { background: var(--white); border-color: var(--white); }

.diamond-who {
  margin-top: 6px;
  font-size: 12px;
  color: var(--gray-400);
}

.diamond-who span { color: var(--gray-500); }
.diamond-who b { font-weight: 600; color: var(--gray-300); }

.page-odds { margin-top: 12px; }

/* A playoff series: the round over each side's wins (dots toward the wins
   it takes), ESPN's summary and the series' games. */
.series-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px 16px;
}

.series-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.series-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.series-best { font-size: 12px; color: var(--gray-500); }

.series-team {
  display: flex;
  align-items: center;
  gap: 10px;
}

.series-team .logo { width: 24px; height: 24px; }
.series-team .logo-fallback { font-size: 7px; }

.series-abbr {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}

.series-pips { display: flex; gap: 5px; }

.series-pips i {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--gray-600);
  border-radius: 50%;
}

.series-pips i.on { background: var(--accent); border-color: var(--accent); }

.series-wins {
  min-width: 14px;
  text-align: right;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
}

.series-summary {
  margin: 0;
  font-size: 13px;
  color: var(--gray-300);
}

.series-games {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.series-game {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--gray-800);
  border-radius: 999px;
  font-size: 12px;
  color: var(--gray-400);
  text-decoration: none;
}

.series-game[aria-current] {
  border-color: rgb(70 187 147 / 0.5);
  color: var(--accent);
  font-weight: 600;
}

@media (hover: hover) {
  a.series-game:hover { color: var(--white); border-color: var(--gray-600); }
}
.page-odds .game-odds:first-child { border-top: 0; }

/* The apps: the game on the Lock Screen, a lock and a small switch top
   right of the matchup card, in a 44px tap target. */
.lock-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  height: 44px;
  padding: 0 0 0 4px;
  border: 0;
  background: none;
  color: var(--gray-400);
  cursor: pointer;
}

.lock-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 6px 0 9px;
  border: 1px solid var(--gray-800);
  border-radius: 999px;
  background: var(--bg);
  transition: border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.lock-pill svg { width: 18px; height: 18px; }
.lock-toggle.on { color: var(--accent); }
.lock-toggle.on .lock-pill { border-color: rgb(70 187 147 / 0.45); }
.lock-toggle:disabled { opacity: 0.6; }
.lock-toggle:not(:disabled):active .lock-pill { transform: scale(0.94); }

/* Beats .switch, which comes later in the file. */
.switch.switch-small { width: 32px; height: 20px; }
.switch.switch-small::after { top: 2px; left: 2px; width: 16px; height: 16px; }

@media (hover: hover) {
  .lock-toggle:not(:disabled):hover .lock-pill { border-color: rgb(70 187 147 / 0.45); }
}

/* Narrow phones: the lock alone (its check says it's on), so the status
   between the corners keeps its room. */
@media (max-width: 400px) {
  .lock-pill { width: 36px; padding: 0; justify-content: center; }
  .lock-pill .switch-small { display: none; }
}

.lock-note {
  max-width: 320px;
  margin: 10px auto 0;
  color: var(--live);
  font-size: 13px;
}

/* Android: Open settings, under an error that says notifications are off. */
.settings-help {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.settings-help .pill-btn { min-height: 44px; }

/* Team page: Follow, and in the iPhone app the alerts bell beside it. */
.team-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.alert-btn { color: var(--gray-400); }

.alert-btn.on {
  color: var(--accent);
  border-color: rgb(70 187 147 / 0.35);
}

/* The team's three alert switches, under its buttons. */
.alert-panel {
  max-width: 360px;
  margin: 14px auto 0;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: rgb(10 10 10 / 0.35);
  overflow: hidden;
}

.alert-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  border-top: 1px solid var(--hairline);
  text-align: left;
}

.alert-row:first-child { border-top: 0; }
.alert-row:hover { background: rgb(255 255 255 / 0.03); }

.alert-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.alert-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}

.alert-sub {
  font-size: 12px;
  color: var(--gray-500);
}

.switch {
  flex: none;
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--gray-700);
  transition: background-color 150ms ease;
}

.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.4);
  transition: transform 150ms ease;
}

[role="switch"][aria-checked="true"] .switch { background: var(--accent); }

/* The spoiler delay under the switches: Off, 15s, 30s, 60s or Custom. */
.alert-delay {
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--hairline);
  text-align: left;
}

.delay-choices { margin: 0; }
.delay-choices button { min-height: 44px; font-size: 13px; }

.segmented button[aria-checked="true"] {
  background: var(--gray-800);
  color: var(--white);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
}

.delay-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--gray-300);
}

.delay-custom input {
  width: 96px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: rgb(17 24 39 / 0.8);
  color: var(--white);
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.delay-custom input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
[role="switch"][aria-checked="true"] .switch::after { transform: translateX(18px); }
[role="switch"][aria-checked="true"] .switch.switch-small::after { transform: translateX(12px); }

.team-head .alert-note {
  max-width: 320px;
  margin: 10px auto 0;
  color: var(--live);
}

.box-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.box-table th,
.box-table td {
  height: 38px;
  padding: 0 7px;
  text-align: center;
  white-space: nowrap;
  color: var(--gray-300);
}

.box-table thead th {
  height: 32px;
  border-bottom: 1px solid var(--hairline);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.box-table tbody tr + tr > * { border-top: 1px solid rgb(31 41 55 / 0.35); }

/* The name column stays put while the stats scroll sideways. */
.box-table .col-name {
  position: sticky;
  left: 0;
  z-index: 1;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 12px;
  text-align: left;
  font-weight: 500;
  color: var(--white);
  background: #0f141e;
  box-shadow: 1px 0 0 rgb(31 41 55 / 0.6);
}

.box-table thead .col-name { color: var(--gray-500); }
.box-table .player { vertical-align: middle; }

.pos-tag {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-500);
}

.box-table tfoot th,
.box-table tfoot td {
  border-top: 1px solid var(--hairline);
  font-weight: 600;
  color: var(--white);
}

.box-table .divider-row th {
  height: 28px;
  padding-left: 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  background: rgb(255 255 255 / 0.02);
}

.line-score td.total,
.line-score th.total { font-weight: 700; color: var(--white); }
.line-score thead th.total { color: var(--gray-400); }
.line-score .col-name .logo { width: 20px; height: 20px; }
.line-score .col-name .logo-fallback { font-size: 6px; }
.line-score tr.lost .col-name,
.line-score tr.lost td { color: var(--gray-500); }

.box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 6px 2px 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-300);
  cursor: pointer;
  list-style: none;
}

.box-title::-webkit-details-marker { display: none; }

/* A chevron that turns when the group opens. */
.box-title::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-right: 2px solid var(--gray-500);
  border-bottom: 2px solid var(--gray-500);
  transform: rotate(-45deg);
  transition: transform 150ms ease;
}

.box-group[open] > .box-title::after { transform: rotate(45deg); }
.box-group > .box-title:hover { color: var(--white); }
.box-group + .box-group { margin-top: 4px; }

.box-switch { margin-bottom: 4px; }
.box-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.box-switch .logo { width: 20px; height: 20px; }
.box-switch .logo-fallback { font-size: 6px; }

.dnp {
  margin: 8px 2px 0;
  font-size: 12px;
  color: var(--gray-500);
}

.list-card > * + * { border-top: 1px solid rgb(31 41 55 / 0.35); }

.play {
  display: grid;
  grid-template-columns: 54px 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 14px;
  font-size: 13px;
}

.play-when {
  display: grid;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
}

.play-team {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.play-text { color: var(--gray-300); }
.play-icon { display: inline-block; margin-right: 6px; vertical-align: -2px; color: var(--white); }
.play-icon.red { color: var(--live); }

.play-score {
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
}

.stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}

.stat-row > :first-child { text-align: left; }
.stat-row > :last-child { text-align: right; }

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
  text-align: center;
}

.stat-head {
  min-height: 44px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-400);
}

.stat-head > span { display: inline-flex; align-items: center; gap: 8px; }
.stat-head > span:last-child { justify-content: flex-end; }
.stat-head .logo { width: 20px; height: 20px; }
.stat-head .logo-fallback { font-size: 6px; }

/* ---- Team page ---- */

.team-head {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 20px 16px;
  text-align: center;
}

.team-head .logo { width: 72px; height: 72px; margin-bottom: 6px; }
.team-head .logo-fallback { font-size: 18px; }

.team-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}

.team-head .sub { margin: 0; }


.follow-btn.on {
  border-color: transparent;
  background: var(--accent);
  color: var(--bg);
}

.sched-row {
  display: grid;
  grid-template-columns: 40px 22px 24px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 6px 14px;
}

.sched-row .logo { width: 24px; height: 24px; }
.sched-row .logo-fallback { font-size: 7px; }
.sched-row .name { font-size: 14px; }

.sched-date {
  display: grid;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--gray-400);
}

.sched-date > :first-child {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.sched-vs {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-600);
  text-align: center;
}

.sched-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-600);
}

.sched-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 64px;
}

.result {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.result.w { background: rgb(70 187 147 / 0.15); color: var(--accent); }
.result.l { background: rgb(239 68 68 / 0.15); color: var(--live); }
.result.t,
.result.d { background: var(--gray-800); color: var(--gray-400); }

.result-score {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}

.sched-time {
  display: grid;
  justify-items: end;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-300);
}

.sched-time small {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 400;
  color: var(--gray-500);
}

@media (max-width: 420px) {
  .sched-label { display: none; }
  .sched-row { grid-template-columns: 40px 22px 24px minmax(0, 1fr) auto; }
}

/* ---- Players: links in the box score, soccer lineups, rosters ---- */

/* A row whose name links to the player: tall enough to tap. */
.box-table tr.linked > * { height: 44px; }

.box-table a.player {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
}

/* Headshots: ESPN's cutouts, cropped round from the top on a wash of the
   team's color (inline). */
.logo.headshot {
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  filter: none;
  background: var(--gray-800);
}

.lineup-title {
  margin: 12px 2px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-300);
}

.lineup-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 14px;
}

.lineup-num {
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  color: var(--gray-500);
}

.lineup-name {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 36px;
  color: inherit;
}

.lineup-name .name { font-size: 14px; }

.lineup-events {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 8px;
}

/* Goals, assists, cards and substitutions, each with its minute. */
.ev {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--gray-400);
}

.ev::before { font-size: 11px; line-height: 1; }
.ev-goal::before { content: "\26BD"; }
.ev-assist::before { content: "A"; font-weight: 800; color: var(--gray-300); }
.ev-on::before { content: "\2191"; font-weight: 800; color: var(--accent); }
.ev-off::before { content: "\2193"; font-weight: 800; color: var(--live); }

.ev-yellow::before,
.ev-red::before {
  content: "";
  width: 8px;
  height: 11px;
  border-radius: 2px;
  background: var(--warn);
}

.ev-red::before { background: var(--live); }

.roster-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 14px;
}

.roster-row .logo { width: 40px; height: 40px; }
.roster-row .logo-fallback { font-size: 13px; }

.roster-main {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.roster-main .name { font-size: 14px; }

.roster-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--gray-500);
}

/* ---- Player page ---- */

.player-head {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 20px 16px;
  text-align: center;
}

.player-head > .logo { width: 96px; height: 96px; margin-bottom: 6px; }
.player-head > .logo-fallback { font-size: 28px; }

.player-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}

.player-head .sub { margin: 0; }

.player-team {
  min-height: 44px;
  margin-top: 8px;
  color: var(--gray-300);
}

.player-team .logo { width: 20px; height: 20px; }
.player-team .logo-fallback { font-size: 6px; }

.player-injury {
  display: grid;
  justify-items: center;
  gap: 6px;
  max-width: 34ch;
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--gray-400);
}

/* ESPN gives four key stats: in a row, or two by two on a narrow phone. */
.player-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.player-stats .stat-tile:nth-child(n) { border: 0; }
.player-stats .stat-tile + .stat-tile { border-left: 1px solid var(--hairline); }
.player-stats .stat-value { font-size: 20px; }

@media (max-width: 359px) {
  .player-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player-stats .stat-tile:nth-child(odd) { border-left: 0; }
  .player-stats .stat-tile:nth-child(n + 3) { border-top: 1px solid var(--hairline); }
}

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

.bio-item {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.bio-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.bio-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
}

/* Recent games: the result, opponent and score over the date (and the
   round, or another competition). */
.box-table .game-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.box-table .game-line .result {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-size: 10px;
}

.box-table .game-note {
  display: block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--gray-500);
}

@media (hover: hover) {
  .box-table a.player:hover,
  .lineup-name:hover .name,
  .roster-row:hover .name { color: var(--accent); }
}

/* ---- Account sheet ---- */

/* Sized to its content (sign-in form or account), not the picker's 88%. */
.sheet.sheet-short { height: auto; }
@media (min-width: 720px) { .sheet.sheet-short { height: auto; max-height: min(720px, 85svh); } }

.account-body {
  overflow-y: auto;
  padding: 4px 16px 20px;
}

.account-intro {
  margin: 4px 0 12px;
  color: var(--gray-300);
  font-size: 14px;
  line-height: 1.5;
}

.account-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 12px;
}

.account-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: var(--white);
  font-weight: 700;
}

.account-label {
  margin: 0;
  color: var(--gray-400);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.account-email {
  margin: 2px 0 0;
  color: var(--white);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.account-note {
  margin: 8px 0;
  color: var(--gray-400);
  font-size: 13px;
  line-height: 1.5;
}

.account-error { color: var(--warn); }

.account-done {
  color: var(--accent);
  font-weight: 600;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}

.account-delete {
  min-height: 44px;
  margin-top: 8px;
  color: var(--live);
  font-size: 14px;
}

.account-delete:disabled { opacity: 0.6; }

/* ---- Menu sheet ---- */

.menu-list {
  margin: 0;
  padding: 4px 8px 16px;
  list-style: none;
}

.menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--fg);
  text-align: left;
  text-decoration: none;
}

@media (hover: hover) {
  .menu-row:hover { background: rgb(255 255 255 / 0.04); }
}

.menu-text { flex: 1; min-width: 0; }

.menu-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
}

.menu-chevron { flex: none; color: var(--gray-600); }

/* The Score Cards row's Detailed / Compact switch. */
.menu-row .pills { flex: none; flex-wrap: nowrap; }

/* The Delay Score Alerts row: its value and chevron on the right, and the
   app's dropdown list opening in place under it (inside the sheet, so it
   pushes the rows below down instead of floating over them). */
.menu-delay .menu-row { position: relative; padding-right: 40px; }
.menu-delay .filter-chevron { right: 12px; }
.menu-delay.open .filter-chevron { transform: rotate(180deg); }

.menu-value {
  flex: none;
  max-width: 45%;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.dropdown.menu-dropdown {
  position: static;
  max-height: none;
  margin: 4px 2px 8px;
  box-shadow: none;
}

/* Signed in: a mint dot on the header's menu button. */
.menu-btn { position: relative; }
.menu-btn.signed-in::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg);
}

/* ---- Order sheet ---- */

.toolbar-actions {
  display: flex;
  flex: none;
  gap: 8px;
}

.order-tabs {
  flex: none;
  margin: 4px 16px 0;
}

.order-list {
  position: relative;
  flex: 1;
  margin: 0;
  padding: 0 8px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}

.order-list .order-hint { padding: 14px 16px 10px; font-size: 13px; }

.order-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding-left: 10px;
  border-radius: 10px;
  background: var(--sheet);
}

.order-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.order-list.sorting .order-row { transition: transform 160ms ease; }
.order-list.sorting .order-row.dragging {
  z-index: 1;
  transition: none;
  background: var(--gray-800);
  box-shadow: 0 10px 24px -8px rgb(0 0 0 / 0.7);
}

.order-grip {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: var(--gray-500);
  cursor: grab;
  touch-action: none;
}

/* The game page's cards: a switch to show or hide each. */
.order-row.off .name { color: var(--gray-500); }

.card-switch {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.order-row.dragging .order-grip { color: var(--accent); cursor: grabbing; }

.order-list .link-btn {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .order-list.sorting .order-row { transition: none; }
}
