/* Brighton Varsity Shot Tracker */
:root {
  --bg: #f4f7fb;
  --bg-elevated: #ffffff;
  --bg-panel: #ffffff;
  --bg-soft: #e8eef5;
  --border: #c5d0dc;
  --border-strong: #8fa3b8;
  --text: #0b1f33;
  --text-muted: #3d5570;
  --text-dim: #6a7f94;
  --brand: #1a4d7c;
  --brand-strong: #0f3558;
  --accent: #f15a24;
  --accent-dim: #c4471a;
  --ours: #1a4d7c;
  --ours-stroke: #0b2a47;
  --opp: #a33a3a;
  --opp-stroke: #6b1f1f;
  --correct: #2f7a5a;
  --correct-bg: rgba(47, 122, 90, 0.12);
  --incorrect: #b54545;
  --incorrect-bg: rgba(181, 69, 69, 0.1);
  --hint: #f15a24;
  --pitch-grass: #2d7a4a;
  --pitch-line: rgba(255, 255, 255, 0.92);
  --pitch-shade: #24633c;
  --focus: #1a4d7c;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 6px 22px rgba(11, 31, 51, 0.08);
  --font-display: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --header-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

body {
  margin: 0;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 70% 40% at 50% -8%, rgba(26, 77, 124, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.45;
}

img,
svg {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: var(--brand);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header-h);
  max-width: 100%;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
  min-width: 0;
}

.brand img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  line-height: 1.25;
  max-width: 16rem;
}


.nav-desktop {
  display: none;
  flex: 1;
  justify-content: center;
  gap: 0.15rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-desktop[hidden] {
  display: none !important;
}

.nav-link {
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.nav-link:hover,
.nav-link[aria-current="page"],
.nav-flyout-trigger[aria-current="page"] {
  color: var(--text);
  background: var(--bg-soft);
}

.nav-link[aria-current="page"],
.nav-flyout-trigger[aria-current="page"] {
  color: var(--brand);
  box-shadow: inset 0 -2px 0 var(--brand);
  border-radius: 0;
  background: transparent;
}

.nav-link-primary {
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.nav-link-primary:hover,
.nav-link-primary[aria-current="page"] {
  background: var(--brand-strong);
  color: #fff;
  box-shadow: none;
  border-radius: 999px;
}

.nav-desktop-group {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 0.35rem;
  padding-left: 0.45rem;
  border-left: 1px solid var(--border);
}


.header-actions {
  margin-left: auto;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-shrink: 0;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.menu-btn {
  display: grid;
}

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.nav-drawer[hidden] {
  display: none;
}

.nav-drawer.is-open {
  pointer-events: auto;
}

.nav-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-drawer.is-open .nav-drawer-backdrop {
  opacity: 1;
}

.nav-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  padding: max(1rem, env(safe-area-inset-top, 0px)) 1.1rem calc(1rem + var(--safe-bottom));
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow-y: auto;
}

.nav-drawer.is-open .nav-drawer-panel {
  transform: translateX(0);
}

.nav-drawer-panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.nav-drawer-panel a.nav-drawer-primary {
  margin-bottom: 0.35rem;
  padding: 0.75rem 1rem;
  min-height: 52px;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}

.nav-drawer-panel a.nav-drawer-primary[aria-current="page"] {
  background: var(--brand-strong);
  color: #fff;
}

.nav-drawer-sub {
  display: flex;
  flex-direction: column;
  margin: 0 0 0.35rem 0.7rem;
  padding-left: 0.7rem;
  border-left: 2px solid var(--border);
}

.nav-drawer-heading {
  margin: 0.85rem 0 0.2rem;
  padding: 0 0.15rem;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.nav-drawer-panel a:hover,
.nav-drawer-panel a[aria-current="page"] {
  background: var(--bg-soft);
  color: var(--accent);
}

.nav-drawer-panel a.nav-drawer-primary:hover {
  background: var(--brand-strong);
  color: #fff;
}

/* Main */
.app-main {
  width: min(1100px, 100%);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 1.25rem 1rem calc(2.5rem + var(--safe-bottom));
}

#app-root {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.tracker-view .app-main {
  width: 100%;
  max-width: 28rem;
  overflow-x: hidden;
  overflow-x: clip;
  padding: 0.35rem 0.55rem calc(1.25rem + var(--safe-bottom));
}

body.shots-record-view .app-main {
  width: 100%;
  max-width: 100%;
  padding-left: max(0.55rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.55rem, env(safe-area-inset-right, 0px));
}

body.shot-map-view .app-main {
  max-width: 42rem;
}

body.shots-admin-view .app-main {
  max-width: 44rem;
}

body.tracker-view .brand-sub {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-strong);
}

.btn-secondary {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-danger {
  background: var(--incorrect-bg);
  color: #f0b4b4;
  border-color: rgba(196, 92, 92, 0.45);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  min-height: 36px;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.text-gate {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.35rem;
}

.text-gate-input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  background: var(--bg-panel);
  color: var(--text);
}

.text-gate-input:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

@media (max-width: 719px) {
  .app-header {
    gap: 0.4rem;
    padding: 0.45rem 0.55rem;
  }

  .brand-name {
    display: none;
  }

  body.tracker-view .brand-text {
    display: none;
  }

  .brand {
    gap: 0;
  }

  .nav-desktop {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.modal-panel {
  position: relative;
  width: min(440px, 100%);
  max-height: min(80vh, 640px);
  overflow: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.modal-panel h2 {
  margin: 0 0 0.75rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.role-toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 55;
  padding: 0.65rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 600;
  font-size: 0.9rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.role-toast.is-visible {
  opacity: 1;
}

/* Empty / utility */
.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

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

.step-label {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}

@media (min-width: 720px) {
  .nav-desktop:not([hidden]) {
    display: flex;
  }
}


@media (max-width: 719px) {
  body.tracker-view .app-main {
    max-width: none;
    padding-left: max(0.45rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.45rem, env(safe-area-inset-right, 0px));
  }

  body.tracker-view .tracker-pitch-wrap {
    width: 100%;
    max-width: none;
  }
}

/* Pitch */
.pitch-wrap {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  /* Allow vertical page scroll on phones; drag scenarios opt into none */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.pitch-wrap.is-dragging {
  touch-action: none;
}

.pitch-svg {
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--pitch-grass);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pitch-svg .grass-stripe {
  fill: var(--pitch-shade);
  opacity: 0.35;
}

.player-token {
  cursor: pointer;
  touch-action: manipulation;
}

.player-token.is-draggable {
  touch-action: none;
}

/* Shot tracker (settings-only module) */
.tracker-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.tracker-page > * {
  min-width: 0;
  max-width: 100%;
}

.tracker-stage {
  min-height: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
}

.tracker-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.half-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.35rem;
  align-items: stretch;
}

.half-toggle-btn {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-weight: 750;
  font-size: 0.92rem;
}

.half-toggle-btn.is-et {
  min-width: 2.35rem;
  padding: 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.half-toggle-btn.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.tracker-side-toggle,
.lineup-team-toggle {
  grid-template-columns: 1fr 1fr;
}

.tracker-half-heading {
  margin: 1.15rem 0 0.45rem;
  font-size: 1rem;
}

.tracker-half-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 0.85rem;
  margin: 1.15rem 0 0.45rem;
}

.tracker-half-head .tracker-half-heading {
  margin: 0;
}

.plays-move-half {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
}

.plays-move-half select,
.plays-bulk-dest select {
  min-height: 34px;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
  font-weight: 700;
}

.plays-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  margin: 0 0 0.7rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: rgba(26, 86, 168, 0.08);
}

.plays-bulk-count {
  font-weight: 750;
  font-size: 0.85rem;
}

.plays-bulk-dest {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.plays-bulk-apply {
  min-height: 34px;
  padding: 0.25rem 0.7rem;
}

.tracker-toolbar .btn {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
}

#tracker-record,
#tracker-cancel-record {
  flex: 1 1 8rem;
}

#tracker-record {
  background: #c4453a;
  border-color: #c4453a;
  color: #fff;
}

#tracker-record:hover {
  background: #a3362e;
  border-color: #a3362e;
}

.tracker-status {
  margin: 0;
  font-weight: 650;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.tracker-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
}

.tracker-status-bar .tracker-status {
  flex: 1;
}

.tracker-status-bar .shots-only-switch {
  flex-shrink: 0;
}

.shots-only-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.shots-only-switch-track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #8b97a8;
  box-shadow: inset 0 0 0 1px rgba(11, 31, 51, 0.12);
  transition: background 0.18s ease;
}

.shots-only-switch.is-on .shots-only-switch-track {
  background: var(--brand);
}

.shots-only-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  color: #5a6b7e;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(11, 31, 51, 0.28);
  transition: transform 0.18s ease, color 0.18s ease;
}

.shots-only-switch.is-on .shots-only-switch-thumb {
  transform: translateX(18px);
  color: var(--brand);
}

.shots-only-bullseye {
  display: block;
}

.tracker-status.is-live {
  color: var(--brand);
}

body.is-recording-play {
  background:
    radial-gradient(ellipse 70% 40% at 50% -8%, rgba(184, 134, 11, 0.22), transparent 55%),
    #f3ead2;
}

body.is-recording-play .app-header {
  background: rgba(232, 213, 163, 0.96);
  border-bottom-color: #c9a227;
}

.tracker-page.is-recording-play .tracker-stage {
  background: #fff8e8;
  border: 2px solid #c9a227;
  border-radius: var(--radius);
  padding: 0.55rem 0.45rem 0.7rem;
  box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.2);
}

.tracker-recording-banner {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.6rem 0.7rem;
  background: var(--brand-strong);
  color: #fff;
  border-radius: var(--radius-sm);
  position: sticky;
  top: var(--header-h);
  z-index: 6;
}

.tracker-recording-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tracker-recording-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent);
  color: #0b1f33;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
}

.tracker-recording-cancel {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.25rem 0.7rem;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: transparent;
}

.tracker-recording-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: #fff;
}

.tracker-page.is-recording-play .tracker-status.is-live {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.tracker-page.is-recording-play .lineup-section,
.tracker-page.is-recording-play .tracker-panel-tabs,
.tracker-page.is-recording-play .tracker-panel {
  opacity: 0.34;
  pointer-events: none;
}

.tracker-page.is-recording-play .tracker-pitch-block.is-active {
  outline: 4px solid #c9a227;
  outline-offset: 2px;
  background: rgba(240, 193, 75, 0.14);
}

.tracker-page.is-recording-play .tracker-pitch-block:not(.is-active) {
  opacity: 0.42;
  filter: grayscale(0.4);
}

.tracker-pitch-wrap {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr) 1.7rem;
  align-items: stretch;
  min-height: 0;
  position: relative;
  touch-action: pan-y;
}

.tracker-pitch-handle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  touch-action: pan-y;
  cursor: grab;
  border-radius: 999px;
  background: rgba(11, 31, 51, 0.06);
}

.tracker-pitch-handle span {
  display: block;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: rgba(11, 31, 51, 0.28);
}

.tracker-pitch-field {
  position: relative;
  min-width: 0;
  overflow: visible;
}

.tracker-pitch-wrap.is-recording {
  touch-action: none;
  cursor: crosshair;
}

.tracker-pitch-wrap.is-recording .tracker-pitch-field {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: calc(var(--radius) + 3px);
}

.tracker-pitch-svg {
  cursor: inherit;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  overflow: hidden;
  max-height: min(46vh, 26rem);
  touch-action: pan-y;
}

.tracker-pitch-wrap.is-recording .tracker-pitch-svg {
  touch-action: none;
}

.tracker-cell {
  fill: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.tracker-cell-deep {
  fill: rgba(0, 0, 0, 0.16);
}

.tracker-grid-line {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 0.18;
  stroke-dasharray: 0.7 0.7;
  pointer-events: none;
}

.tracker-grid-label {
  fill: rgba(255, 255, 255, 0.6);
  font-size: 1.5px;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}

.tracker-goal-label {
  fill: rgba(255, 255, 255, 0.78);
  font-size: 1.55px;
  font-weight: 750;
  letter-spacing: 0.18px;
  text-anchor: middle;
}

.tracker-assist-line {
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 0.28;
  stroke-dasharray: 1.1 0.7;
  fill: none;
  pointer-events: none;
}

.tracker-assist-dot {
  fill: #7ec8e3;
  stroke: #0b1f33;
  stroke-width: 0.2;
  pointer-events: none;
}

.tracker-assist-dot.is-second {
  fill: #c5a3e8;
}

.tracker-assist-line.is-second {
  stroke: rgba(197, 163, 232, 0.9);
  stroke-dasharray: 0.7 0.7;
}

.tracker-pending.second-assist {
  stroke: #c5a3e8;
}

.tracker-shot-dot {
  stroke: #0b1f33;
  stroke-width: 0.28;
  pointer-events: none;
}

.tracker-shot-dot.goal {
  fill: var(--accent);
}

.tracker-shot-dot.on-target {
  fill: #ffffff;
}

.tracker-shot-dot.blocked {
  fill: #6d5a8c;
}

.tracker-shot-dot.missed {
  fill: none;
  stroke: #ffffff;
  stroke-width: 0.4;
}

.tracker-shot-dot.foul {
  fill: #9b59b6;
}

.tracker-shot-dot.corner {
  fill: #3498db;
}

.tracker-shot-dot.pk-goal {
  fill: var(--accent);
  stroke-width: 0.45;
}

.tracker-shot-dot.pk-missed {
  fill: rgba(11, 31, 51, 0.4);
  stroke: var(--accent);
  stroke-width: 0.4;
}

.tracker-event.is-opp .tracker-shot-dot {
  stroke: #c0392b;
  stroke-width: 0.45;
}

.tracker-event.is-opp .tracker-shot-dot.missed {
  fill: none;
  stroke: #c0392b;
  stroke-width: 0.45;
}

.tracker-event.is-opp .tracker-assist-dot {
  stroke: #c0392b;
}

.tracker-event.is-opp .tracker-shot-num {
  fill: #fff;
}

.tracker-shot-dot.on-target + .tracker-shot-num,
.tracker-event.is-opp .tracker-shot-dot.on-target + .tracker-shot-num {
  fill: #0b1f33;
}

.tracker-shot-num {
  fill: #0b1f33;
  font-size: 1.25px;
  font-weight: 750;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.tracker-shot-dot.missed + .tracker-shot-num {
  fill: #ffffff;
}

.tracker-event.shots-hidden {
  display: none;
}

.shots-emphasis-normal {
  opacity: 0.4;
}

.shots-emphasis-high {
  opacity: 1;
}

.shots-emphasis-super {
  opacity: 1;
  filter: drop-shadow(0 0 2px rgba(241, 90, 36, 0.8));
}

.shots-emphasis-super .tracker-shot-dot,
.shots-emphasis-super circle,
.shots-emphasis-super rect {
  stroke-width: 0.5;
}

.tracker-inspect-hit {
  fill: transparent;
  pointer-events: auto;
  cursor: pointer;
}

.tracker-inspect-hit.is-on {
  fill: rgba(244, 247, 251, 0.18);
  stroke: rgba(244, 247, 251, 0.9);
  stroke-width: 0.28;
}

.tracker-event.is-inspecting .tracker-shot-dot,
.tracker-event.is-inspecting .tracker-assist-dot {
  stroke: #f4f7fb;
  stroke-width: 0.5;
}

.pitch-inspect-popup {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 4;
  width: max-content;
  max-width: min(16.5rem, 86%);
  padding: 0.55rem 1.7rem 0.6rem 0.75rem;
  background: #0b1f33;
  color: #f4f7fb;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(11, 31, 51, 0.35);
  transform: translate(-50%, calc(-100% - 10px));
  pointer-events: auto;
}

.pitch-inspect-popup.is-below {
  transform: translate(-50%, 12px);
}

.pitch-inspect-popup.is-start {
  transform: translate(0, calc(-100% - 10px));
}

.pitch-inspect-popup.is-start.is-below {
  transform: translate(0, 12px);
}

.pitch-inspect-popup.is-end {
  transform: translate(-100%, calc(-100% - 10px));
}

.pitch-inspect-popup.is-end.is-below {
  transform: translate(-100%, 12px);
}

.pitch-inspect-popup p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.pitch-inspect-popup-kicker {
  color: rgba(244, 247, 251, 0.72);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.pitch-inspect-popup-player,
.pitch-inspect-popup-result {
  font-weight: 750;
}

.pitch-inspect-popup-close {
  position: absolute;
  top: 0.15rem;
  right: 0.2rem;
  width: 1.6rem;
  height: 1.6rem;
  color: #f4f7fb;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 4px;
}

.pitch-inspect-popup-close:hover,
.pitch-inspect-popup-close:focus-visible {
  background: rgba(244, 247, 251, 0.12);
}

.pitch-inspect-edit {
  margin-top: 0.45rem;
  min-height: 36px;
  padding: 0.25rem 0.65rem;
  color: #f4f7fb;
  border-color: rgba(244, 247, 251, 0.28);
}

.pitch-inspect-edit:hover {
  color: #ffffff;
  border-color: rgba(244, 247, 251, 0.55);
}

.pitch-inspect-popup .pitch-inspect-edit + .pitch-inspect-edit {
  margin-left: 0.4rem;
}

.tracker-pending {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.4;
  pointer-events: none;
}

.tracker-log {
  margin-top: 1.75rem;
  padding-top: 0.25rem;
  min-width: 0;
  max-width: 100%;
}

.tracker-log h2 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
}

.plays-filters {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0 0 0.55rem;
}

.plays-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.plays-filter-label {
  flex: 0 0 3.4rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.plays-filter-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 0;
}

.plays-filter-btn {
  min-height: 34px;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  font-weight: 700;
  font-size: 0.78rem;
}

.plays-filter-btn.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.plays-filter-count {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
}

.team-chip {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
}

.team-chip.is-us {
  background: rgba(26, 86, 168, 0.14);
  color: var(--brand);
}

.team-chip.is-opp {
  background: rgba(192, 57, 43, 0.14);
  color: #a93226;
}

.lineup-section {
  margin: 2rem 0 2.5rem;
  padding: 1.15rem 0.85rem 1.35rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lineup-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lineup-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.lineup-help,
.lineup-count {
  margin: 0.45rem 0 0.7rem;
  font-size: 0.82rem;
}

.lineup-count {
  font-weight: 700;
}

.lineup-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lineup-row {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
}

.lineup-pos {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.lineup-pos strong {
  display: inline-block;
  min-width: 1.15rem;
  color: var(--text);
}

.lineup-select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 1rem;
  padding: 0 0.5rem;
}

.lineup-select option:disabled {
  color: #b0b8c2;
}

.lineup-swap {
  min-height: 44px;
  padding: 0 0.7rem;
}

.lineup-swap:disabled {
  opacity: 0.4;
}

.lineup-swap.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.lineup-gesture-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.75rem;
  margin: 0.35rem 0 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(26, 77, 124, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(26, 77, 124, 0.08);
}

.lineup-gesture-banner p {
  margin: 0;
  flex: 1 1 12rem;
  font-size: 0.92rem;
  line-height: 1.35;
}

.lineup-gesture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.formation-card.is-swap-from {
  box-shadow: 0 0 0 2px var(--brand);
  z-index: 2;
}

.formation-card.is-gesture-target {
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(26, 77, 124, 0.35);
}

.formation-card-hit {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}

.lineup-dual-pitches {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 0.55rem;
}

.lineup-dual-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0.1rem 0.2rem;
}

.lineup-dual-head .tracker-pitch-caption {
  margin: 0;
}

.lineup-dual-head .lineup-count {
  margin: 0;
  font-size: 0.82rem;
}

.lineup-dual-pitches .formation-pitch {
  max-width: none;
  margin-top: 0.2rem;
  aspect-ratio: 68 / 100;
}

.lineup-section.is-gesturing .lineup-dual-block.is-gesturing-pitch .formation-pitch {
  outline: 2px dashed rgba(26, 77, 124, 0.35);
  outline-offset: 4px;
  border-radius: 12px;
}

.lineup-section.is-gesturing .lineup-dual-block.is-dimmed {
  opacity: 0.45;
  pointer-events: none;
}

/* 4-3-3 formation card pitch (attacking goal on top) */
.formation-pitch {
  position: relative;
  width: 100%;
  max-width: 28rem;
  margin: 0.65rem auto 0;
  aspect-ratio: 68 / 105;
  border-radius: 14px;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      180deg,
      var(--pitch-grass) 0 18px,
      var(--pitch-shade) 18px 36px
    );
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35), var(--shadow);
}

.formation-pitch.is-opp-pitch {
  background:
    repeating-linear-gradient(
      180deg,
      #6b7280 0 18px,
      #4b5563 18px 36px
    );
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22), var(--shadow);
}

.lineup-section .formation-pitch {
  max-width: none;
  aspect-ratio: 68 / 100;
}

.formation-pitch-lines {
  position: absolute;
  inset: 3.2%;
  border: 1.5px solid var(--pitch-line);
  border-radius: 2px;
  pointer-events: none;
}

.fp-outline {
  display: none;
}

.fp-halfway {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 0;
  border-top: 1.5px solid var(--pitch-line);
}

.fp-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1.5px solid var(--pitch-line);
  border-radius: 50%;
}

.fp-box {
  position: absolute;
  left: 50%;
  width: 58%;
  height: 15.5%;
  transform: translateX(-50%);
  border: 1.5px solid var(--pitch-line);
}

.fp-box-att {
  top: 0;
  border-top: none;
}

.fp-box-def {
  bottom: 0;
  border-bottom: none;
}

.fp-six {
  position: absolute;
  left: 50%;
  width: 28%;
  height: 6.5%;
  transform: translateX(-50%);
  border: 1.5px solid var(--pitch-line);
}

.fp-six-att {
  top: 0;
  border-top: none;
}

.fp-six-def {
  bottom: 0;
  border-bottom: none;
}

.formation-card {
  position: absolute;
  z-index: 1;
  transform: translate(-50%, -50%);
  width: min(30%, 5.6rem);
  min-height: 2.55rem;
  padding: 0.28rem 0.22rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  text-align: center;
  border: 1px solid rgba(11, 31, 51, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 8px rgba(11, 31, 51, 0.18);
  color: var(--text);
  font: inherit;
  line-height: 1.1;
  cursor: default;
}

button.formation-card {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button.formation-card:active {
  transform: translate(-50%, -50%) scale(0.97);
}

.formation-card.is-empty {
  background: rgba(255, 255, 255, 0.55);
  border-style: dashed;
  color: var(--text-dim);
}

.formation-card.is-pos-on {
  box-shadow: 0 0 0 2px var(--brand);
  border-color: var(--brand);
  z-index: 2;
}

button.formation-card.is-empty {
  cursor: pointer;
}

.formation-card.is-editor {
  width: min(32%, 6.4rem);
  min-height: 3.6rem;
  padding: 0.22rem 0.18rem 0.18rem;
  gap: 0.12rem;
}

.formation-card-pick {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  width: 100%;
  min-width: 0;
  min-height: 1.55rem;
  padding: 0 0.1rem;
}

.formation-card-name {
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
  font-size: 0.72rem;
  line-height: 1.25;
  padding-top: 0.05rem;
  text-align: center;
}

.formation-card-pick .formation-card-name {
  font-size: 0.7rem;
}

.formation-card-chevron {
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid var(--text-dim);
  border-bottom: 1.5px solid var(--text-dim);
  transform: translateY(-0.12rem) rotate(45deg);
  opacity: 0.75;
}

.formation-card-meta {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}

.formation-card-select {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 5px;
  opacity: 0;
  cursor: pointer;
  font-size: 1rem;
  /* Keep native menu usable; visible label is .formation-card-name */
  color: transparent;
  background: transparent;
}

.formation-card-select:focus {
  outline: none;
}

.formation-card-pick:focus-within {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-radius: 5px;
  background: var(--bg);
}

.formation-card .lineup-swap {
  min-height: 1.35rem;
  padding: 0 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

.formation-extras {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.shot-team-bar {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.15rem;
}

.shot-team-toggle {
  grid-template-columns: 1fr 1fr;
}

.shot-team-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.shot-bar-btn {
  min-height: 40px;
  flex: 1 1 auto;
  padding: 0 0.7rem;
  font-size: 0.88rem;
}

.shot-bar-btn.is-sub-in {
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 750;
}

.shot-player-grid .formation-pitch,
.shot-player-grid .formation-extras,
.shot-player-grid .shot-team-bar,
.shot-player-grid .shot-empty-roster,
.shot-player-grid .shot-quick-label,
.shot-player-grid .shot-opp-select,
.shot-player-grid .shot-recent-nums,
.shot-player-grid .shot-dual-pitches,
.shot-player-grid .shot-dual-pitch-block,
.shot-player-grid .shot-dual-actions {
  grid-column: 1 / -1;
}

.shot-opp-select {
  width: 100%;
  min-height: 52px;
  margin: 0.15rem 0 0.2rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 1.05rem;
  font-weight: 650;
}

.shot-empty-roster {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
}

.shot-player-grid.is-formation {
  display: flex;
  flex-direction: column;
  align-content: stretch;
  gap: 0.45rem;
}

.shot-modal-panel.is-player-phase .formation-pitch,
.shot-player-grid .shot-dual-pitch-block .formation-pitch {
  width: 100%;
  max-width: none;
  aspect-ratio: 68 / 92;
  margin: 0.25rem 0 0;
}

@media (max-width: 420px) {
  .formation-card {
    width: min(31%, 5.1rem);
    min-height: 2.35rem;
    padding: 0.22rem 0.15rem;
  }

  .formation-card-name {
    font-size: 0.64rem;
  }

  .formation-card-meta {
    font-size: 0.55rem;
  }

  .formation-card.is-editor {
    width: min(33%, 5.8rem);
    min-height: 3.35rem;
  }

  .formation-card-pick .formation-card-name {
    font-size: 0.64rem;
  }
}

.lineup-pos {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 4.5rem;
}

.tracker-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.tracker-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tracker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.tracker-table th,
.tracker-table td {
  padding: 0.65rem 0.7rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.tracker-table .tracker-coord-cell {
  white-space: normal;
  min-width: 9.5rem;
}

.tracker-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: var(--bg-soft);
}

.tracker-table tbody tr:last-child td {
  border-bottom: none;
}

.tracker-table tbody tr:nth-child(even) {
  background: rgba(232, 238, 245, 0.45);
}

.tracker-table .tracker-select-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 2.1rem;
  padding-left: 0.45rem;
  padding-right: 0.2rem;
  background: var(--bg-panel);
  vertical-align: middle;
}

.tracker-table .tracker-select-cell input {
  width: 1.05rem;
  height: 1.05rem;
}

.tracker-table .tracker-edit-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 2.75rem;
  padding-left: 0.35rem;
  padding-right: 0.25rem;
  background: var(--bg-panel);
  box-shadow: 8px 0 8px -8px rgba(11, 31, 51, 0.18);
}

.tracker-table.is-bulk-select .tracker-edit-cell {
  left: 2.1rem;
}

.tracker-table thead .tracker-select-cell {
  background: var(--bg-soft);
  z-index: 2;
}

.tracker-table tbody tr:nth-child(even) .tracker-select-cell {
  background: #eef3f8;
}

.tracker-table thead .tracker-edit-cell {
  background: var(--bg-soft);
  z-index: 2;
}

.tracker-table tbody tr:nth-child(even) .tracker-edit-cell {
  background: #eef3f8;
}

.tracker-edit {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  padding: 0;
  color: var(--brand);
}

.tracker-edit:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.tracker-table .tracker-delete-cell {
  width: 2.75rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.tracker-delete {
  min-width: 44px;
  min-height: 44px;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text-dim);
}

.tracker-delete:hover {
  color: var(--incorrect);
}

.shot-result-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-soft);
}

.shot-result-pill.goal {
  background: rgba(241, 90, 36, 0.2);
  color: #b33d12;
}

.shot-result-pill.on-target {
  background: rgba(26, 77, 124, 0.12);
  color: var(--brand);
}

.shot-result-pill.blocked {
  background: rgba(109, 90, 140, 0.2);
  color: #4a3a68;
}

.shot-result-pill.missed {
  background: var(--bg-soft);
  color: var(--text-muted);
}

.shot-result-pill.foul {
  background: rgba(155, 89, 182, 0.18);
  color: #6c3483;
}

.shot-result-pill.corner {
  background: rgba(52, 152, 219, 0.18);
  color: #1a5276;
}

.shot-result-pill.pk-goal {
  background: rgba(240, 193, 75, 0.35);
  color: #7a5a00;
}

.shot-result-pill.pk-missed {
  background: var(--bg-soft);
  color: var(--text-muted);
}

#shot-event-modal {
  padding: 0.55rem;
  place-items: stretch;
}

.shot-modal-panel {
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  padding: 0.9rem 0.9rem calc(0.9rem + var(--safe-bottom));
  display: flex;
  flex-direction: column;
}

.shot-modal-panel [hidden] {
  display: none !important;
}

.shot-modal-panel h2 {
  margin: 0 0 0.2rem;
  font-size: 1.45rem;
}

.shot-modal-location {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.35;
}

.lineup-nudge {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.7rem;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  line-height: 1.35;
}

.lineup-nudge .btn {
  display: inline-flex;
  margin-top: 0.35rem;
  min-height: 36px;
  padding: 0.25rem 0.65rem;
}

.number-pick-panel {
  width: min(100%, 22rem);
}

.number-pick-select {
  display: block;
  width: 100%;
  min-height: 11rem;
  margin: 0.75rem 0 1rem;
  font-size: 1.45rem;
  font-weight: 700;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.number-pick-select option:disabled {
  color: #c5ccd4;
}

.shot-modal-heading {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
}

.shot-player-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  min-height: 0;
  overflow-y: auto;
}

.shot-player-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-height: 0;
  min-width: 0;
  padding: 0.45rem 0.25rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.15;
}

.shot-player-btn .num {
  flex: none;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.shot-player-btn .name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
  font-size: 0.95rem;
}

.shot-player-btn.is-selected {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.shot-player-btn.is-selected .num {
  color: rgba(255, 255, 255, 0.62);
}

.shot-action-grid {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
  overflow-y: auto;
}

.shot-action-heading {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.shot-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.shot-action-row-3 {
  flex: 1.1;
  grid-template-columns: repeat(auto-fit, minmax(5.75rem, 1fr));
}

.shot-action-row-fill {
  flex: 1.4;
}

.shot-action-btn {
  min-height: 72px;
  height: 100%;
  padding: 0.7rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-panel);
  font-weight: 750;
  font-size: 1.12rem;
}

.shot-player-btn.is-sub-in {
  border-color: var(--brand);
  background: rgba(26, 77, 124, 0.08);
}

.shot-player-btn.is-sub-in .name {
  color: var(--brand);
}

.shot-action-btn.is-goal {
  background: rgba(240, 193, 75, 0.22);
}

.shot-action-btn.is-foul {
  background: rgba(155, 89, 182, 0.14);
}

.shot-action-btn.is-corner {
  background: rgba(52, 152, 219, 0.14);
}

.shot-action-btn.is-pk-goal {
  background: rgba(240, 193, 75, 0.28);
}

.shot-action-btn.is-pk-missed,
.shot-action-btn.is-miss-dir {
  background: rgba(11, 31, 51, 0.06);
}

.shot-action-btn:hover {
  border-color: var(--border-strong);
}

.lineup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.85rem 0 0;
}

.units-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 0.5rem;
}

.units-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.units-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.tracker-panel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1rem 0 0.75rem;
}

.tracker-panel-tab {
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

.tracker-panel-tab.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.tracker-panel {
  margin: 0 0 1.5rem;
}

.tracker-map-wrap {
  position: relative;
}

.tracker-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.tracker-settings-card {
  padding: 0.85rem 0.75rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tracker-settings-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.tracker-settings-panel .stamp-offset-card {
  margin-top: 0;
}

.tracker-units {
  margin: 0.25rem 0 0.5rem;
}

.loc-flag {
  display: inline-block;
  margin: 0 0 0.2rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--brand-strong);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.tracker-coord-cell .loc-flag {
  display: table;
}

.lane-matrix-wrap {
  overflow-x: auto;
  margin: 0.25rem 0 0.75rem;
}

.lane-matrix {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.78rem;
}

.lane-matrix th {
  padding: 0.3rem 0.1rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.lane-matrix tbody th {
  width: 3rem;
  text-align: left;
  white-space: nowrap;
}

.lane-matrix-cell {
  padding: 0.3rem 0.1rem;
  border: 1px solid var(--border);
  text-align: center;
  line-height: 1.15;
  background: rgba(26, 77, 124, calc(var(--heat, 0) * 0.35));
}

.lane-matrix-cell strong {
  display: block;
  font-size: 0.8rem;
}

.lane-matrix-cell span {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.lane-matrix .is-total {
  font-weight: 700;
  background-color: var(--bg-soft);
}

.tracker-units h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.shot-modal-panel .modal-actions {
  margin-top: auto;
  padding-top: 0.5rem;
}

.shot-modal-panel .modal-actions .btn {
  min-height: 48px;
  flex: 1;
}

#tracker-clear {
  margin-top: 0.75rem;
}

.shot-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.shot-map-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.shot-map-header p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
}

.shot-map-header input {
  width: 10rem;
  margin-left: 0.25rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
}

.shot-map-vs-print {
  display: none;
}

.shot-map-pitch {
  background: #24633c;
  border-radius: var(--radius);
  padding: 0.35rem;
}

.shot-map-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.shot-map-caption {
  margin: 0.65rem 0 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.shot-map-dual {
  display: grid;
  gap: 1.25rem;
  margin: 0.75rem 0 0.35rem;
}

.shot-map-team-block h2 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.shot-map-team-pitch {
  background: #24633c;
  border-radius: 12px;
  padding: 0.35rem;
}

.shot-map-team-block.is-opp .shot-map-team-pitch {
  background: #4b5563;
}

.shot-map-team-pitch .pitch-svg {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.shot-map-team-block .tracker-summary {
  margin-top: 0.55rem;
}

.shot-map-combined {
  margin-top: 1.25rem;
}

.shot-map-combined h2 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.shot-map-stat-split {
  margin: 0.55rem 0 0.2rem;
  font-size: 0.78rem;
}

.shot-map-stats {
  display: grid;
  gap: 1rem;
}

.shot-map-stats h2 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

@media (min-width: 720px) {
  .shot-map-dual {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (min-width: 640px) {
  .shot-map-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-height: 700px) {
  .shot-modal-panel h2 {
    font-size: 1.15rem;
  }

  .shot-player-btn {
    padding: 0.28rem 0.12rem;
    font-size: 0.78rem;
  }

  .shot-player-btn .num {
    font-size: 0.62rem;
  }

  .shot-player-btn .name {
    font-size: 0.82rem;
  }

  .shot-action-btn {
    min-height: 48px;
    font-size: 0.95rem;
  }
}

@media print {
  body {
    background: #fff;
  }

  .app-header,
  .no-print {
    display: none !important;
  }

  .shot-map-vs-print {
    display: inline;
  }

  .app-main,
  body.shot-map-view .app-main {
    max-width: none;
    padding: 0;
    width: 100%;
  }

  .shot-map-pitch {
    background: #24633c;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

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

/* Phase 2 shot tracker */
.shots-game-label {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text-muted);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.shots-gate {
  padding: 1.25rem 0.25rem 2rem;
}

.shots-gate h1 {
  margin: 0 0 0.5rem;
}

.shots-pin-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 16rem;
}

.shots-error {
  color: var(--incorrect);
  font-weight: 650;
}

.shots-admin h1 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
}

.shots-admin h2 {
  margin: 1.35rem 0 0.4rem;
  font-size: 1.05rem;
}

.shots-form {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.shots-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  font-weight: 650;
  margin: 0 0 0.65rem;
}

.shots-field select,
.shots-field input[type="date"],
.shots-field input[type="number"],
.shots-field input[type="text"] {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font: inherit;
  font-size: 1rem;
  padding: 0 0.55rem;
}

#shot-edit-modal .modal-panel {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 820px);
  overflow: hidden;
  padding-bottom: 0;
}

#shot-edit-modal .shot-edit-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 0.15rem;
}

#shot-edit-modal .modal-actions {
  flex: 0 0 auto;
  margin: 0 -1.25rem 0;
  padding: 0.75rem 1.25rem calc(0.85rem + var(--safe-bottom));
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
}

#shot-edit-modal .modal-actions .btn {
  flex: 1 1 0;
  min-height: 44px;
}

.edit-loc-block {
  margin: 0.15rem 0 0.85rem;
}

.edit-loc-label {
  margin: 0 0 0.2rem;
  font-size: 0.82rem;
  font-weight: 750;
}

.edit-loc-hint {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
}

.edit-loc-pitch {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #24633c;
}

.edit-loc-pitch .tracker-pitch-svg {
  max-height: min(28vh, 14rem);
  cursor: crosshair;
}

.shots-game-section {
  margin: 1rem 0 0.25rem;
}

.shots-game-section-title {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 750;
}

.shots-game-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.shots-game-btn {
  width: 100%;
  text-align: left;
  min-height: 52px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.shots-game-btn span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.shots-game-row.is-past .shots-game-btn {
  opacity: 0.45;
  color: var(--text-muted);
  background: var(--bg-soft);
  border-color: transparent;
}

.shots-game-row.is-past .shots-game-btn strong {
  font-weight: 500;
}

.shots-confirm {
  margin: 0.75rem 0;
  padding: 0.85rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
}

.shots-explore .explore-starters {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}

.explore-starter {
  text-align: left;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.35;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  color: var(--text);
  cursor: pointer;
}

.explore-starter:hover {
  border-color: var(--accent, #2d7a4a);
}

.explore-transcript {
  max-height: min(55vh, 28rem);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.25rem 0 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.explore-msg.is-user {
  align-self: flex-end;
  max-width: 92%;
  padding: 0.55rem 0.75rem;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}

.explore-msg.is-user p {
  margin: 0;
  font-weight: 650;
}

.explore-msg.is-assistant {
  align-self: stretch;
}

.explore-answer {
  margin: 0 0 0.65rem;
  font-size: 1.02rem;
  line-height: 1.45;
}

.explore-loading {
  margin: 0;
  color: var(--text-muted);
  font-style: italic;
}

.explore-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.explore-input {
  width: 100%;
  min-height: 4.5rem;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
  line-height: 1.4;
}

.explore-form-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.explore-sql {
  margin-top: 0.75rem;
  font-size: 0.82rem;
}

.explore-sql summary {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 650;
}

.explore-sql pre {
  margin: 0.4rem 0 0;
  padding: 0.65rem 0.75rem;
  overflow: auto;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.explore-pitch-wrap {
  margin: 0 0 0.75rem;
  max-width: 22rem;
}

.explore-pitch-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

.explore-pitch-caption {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.explore-table-wrap {
  margin-top: 0.35rem;
}

.shot-dual-pitches {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.shot-dual-pitch-block {
  width: 100%;
  border-radius: calc(var(--radius) + 2px);
  padding: 0.1rem 0.1rem 0.25rem;
}

.shot-dual-pitch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0.15rem 0.15rem;
}

.shot-dual-pitch-head .tracker-pitch-caption {
  margin: 0;
}

.shot-dual-pitch-head .shot-bar-btn {
  flex: none;
  min-height: 34px;
  padding: 0 0.65rem;
  font-size: 0.78rem;
}

.shot-dual-actions {
  margin-top: 0.15rem;
}

.shot-dual-pitches .formation-pitch {
  max-width: none;
  margin-top: 0.25rem;
  aspect-ratio: 68 / 92;
}

.tracker-pitches {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  max-width: 100%;
}

.tracker-pitch-block {
  border-radius: calc(var(--radius) + 2px);
  padding: 0.35rem 0.1rem 0.45rem;
  min-width: 0;
  max-width: 100%;
}

.tracker-pitch-block.is-active {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.tracker-pitch-block.is-opp.is-active {
  outline-color: #6b7280;
}

.tracker-pitch-caption {
  margin: 0 0 0.15rem 0.15rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tracker-corner-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.4rem 0.15rem;
}

.tracker-corner-btns .shot-bar-btn {
  min-height: 32px;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
}

@media (min-width: 720px) {
  .tracker-pitches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem 1.1rem;
    align-items: start;
  }

  .tracker-pitch-svg {
    max-height: min(64vh, 34rem);
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .tracker-pitches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem 0.75rem;
  }

  .tracker-pitch-wrap {
    grid-template-columns: 1.15rem minmax(0, 1fr) 1.15rem;
  }

  .tracker-pitch-svg {
    max-height: min(78vh, 24rem);
  }
}

.tracker-pitch-svg.is-opp-pitch {
  background: #6b7280;
}

.tracker-pitch-svg.is-opp-pitch .grass-stripe {
  fill: #4b5563;
}

.shot-pos-lock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(26, 77, 124, 0.28);
  border-radius: 8px;
  background: rgba(26, 77, 124, 0.08);
  font-size: 0.88rem;
}

.shot-pos-lock .shot-bar-btn {
  flex: none;
  min-height: 34px;
  padding: 0 0.65rem;
}

.shot-position-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.55rem;
}

.shot-pos-btn {
  min-height: 36px;
  min-width: 2.6rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  font-size: 0.75rem;
  font-weight: 750;
}

.shot-pos-btn.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.shot-quick-label {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.shot-recent-nums {
  grid-column: 1 / -1;
  margin: 0 0 0.15rem;
}

.shot-recent-num-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.3rem;
}

.shot-recent-num {
  min-width: 2.4rem;
  min-height: 2.4rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 0.95rem;
  font-weight: 750;
}

.shot-recent-num:hover,
.shot-recent-num:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
}

.linkish {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  font: inherit;
  font-weight: 650;
  text-align: left;
  min-height: 0;
}

tr.is-unsaved td {
  background: rgba(155, 34, 38, 0.08);
}

.shots-retry {
  display: block;
  margin-top: 0.25rem;
  min-height: 36px;
  font-size: 0.75rem;
}

.score-strip-block {
  margin: 0 0 0.45rem;
  position: relative;
  z-index: 8;
  min-width: 0;
  max-width: 100%;
}

.score-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.15rem 0.45rem;
  align-items: center;
  background: #0b1f33;
  color: #f4f7fb;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.7rem 0.7rem;
  min-width: 0;
  max-width: 100%;
}

.score-strip-team {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.score-strip-team.is-us {
  align-items: flex-start;
}

.score-strip-team.is-opp {
  align-items: flex-end;
  text-align: right;
}

.score-strip .score-name {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 247, 251, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.score-strip .score-num {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.score-strip-team.is-us .score-num {
  color: var(--accent);
}

.score-strip-team.is-opp .score-num {
  color: #f4f7fb;
}

.score-strip-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
}

.score-clock-face,
.clock-edit-btn {
  font: inherit;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-height: 36px;
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-sm);
}

.score-clock-face {
  font-size: 1.45rem;
  min-width: 4.5rem;
  background: transparent;
  border: none;
  color: #f4f7fb;
  min-height: 0;
  padding: 0;
}

.clock-edit-btn {
  font-size: 0.9rem;
  min-height: 40px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
}

.score-strip-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.35rem;
  margin-top: 0.45rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  align-items: stretch;
  min-width: 0;
}

.score-strip-menu {
  position: relative;
}

.score-strip-gear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-height: 42px;
  padding: 0;
  color: #f4f7fb;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.score-strip-gear:hover,
.score-strip-gear[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.score-strip-menu-pop {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  z-index: 16;
  min-width: 11rem;
  padding: 0.35rem;
  background: #13283f;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.score-strip-menu-item {
  display: block;
  width: 100%;
  padding: 0.7rem 0.85rem;
  color: #f4f7fb;
  text-align: left;
  font: inherit;
  font-weight: 700;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.score-strip-menu-item:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.score-strip-menu-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.score-strip-btn {
  min-width: 0;
  min-height: 42px;
  padding: 0.45rem 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  color: #f4f7fb;
  border-color: rgba(255, 255, 255, 0.22);
}

.score-strip-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.score-strip-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.score-strip.is-final .score-clock-face {
  letter-spacing: 0.06em;
}

.score-strip-goto {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.score-strip-goto:hover {
  background: rgba(255, 255, 255, 0.16);
}

.scoreboard-mini-svg {
  width: 40px;
  height: 24px;
  display: block;
}

.clock-input {
  width: 5.5rem;
  min-height: 36px;
  font: inherit;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: center;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.3rem;
}

.stamp-offset-card {
  margin-top: 1.25rem;
  padding: 0.85rem 0.75rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stamp-offset-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.game-open-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.game-open-actions .btn {
  width: 100%;
}

body.scoreboard-view {
  background: #0b1f33;
}

body.scoreboard-view .app-header,
body.scoreboard-view .nav-drawer {
  display: none !important;
}

body.scoreboard-view .app-main {
  max-width: none;
  width: 100%;
  padding: 0;
  min-height: 100dvh;
}

.scoreboard-page {
  position: relative;
  min-height: 100dvh;
  padding: 0;
  background: #0b1f33;
  color: #f4f7fb;
}

.scoreboard-page.is-public-live .scoreboard-live-hint,
.scoreboard-page.is-public-live .scoreboard-live-refresh {
  display: block;
  width: min(100% - 2rem, 22rem);
  margin: 0.75rem auto;
  text-align: center;
}

.scoreboard-page.is-public-live .scoreboard-live-hint {
  margin-top: 1rem;
  color: rgba(244, 247, 251, 0.65);
}

.scoreboard-page.is-public-live .scoreboard-live-refresh {
  margin-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  color: #f4f7fb;
  border-color: rgba(244, 247, 251, 0.28);
}

.scoreboard-hero-pin {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #0b1f33;
  overflow: hidden;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  transform: translateZ(0);
}

.scoreboard-hero-spacer {
  height: 100dvh;
  pointer-events: none;
}

.scoreboard-hero-pin.is-compact {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
}

.scoreboard-hero {
  width: min(42rem, 100%);
  margin: 0 auto;
  padding: 0.55rem 0.85rem 0.7rem;
  box-sizing: border-box;
}

.scoreboard-hero .scoreboard-board {
  flex: none;
  transform-origin: top center;
  will-change: transform;
  backface-visibility: hidden;
}

body.scoreboard-view .half-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #f4f7fb;
  border-color: rgba(255, 255, 255, 0.22);
}

body.scoreboard-view .half-toggle-btn.is-on {
  background: var(--accent);
  color: #0b1f33;
  border-color: var(--accent);
}

.scoreboard-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem 0.75rem;
  align-items: center;
}

.scoreboard-team {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.scoreboard-team.is-us {
  align-items: flex-start;
}

.scoreboard-team.is-opp {
  align-items: flex-end;
  text-align: right;
}

.scoreboard-board .score-name {
  font-size: clamp(0.8rem, 3.2vw, 1.15rem);
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 247, 251, 0.7);
}

.scoreboard-board .score-num {
  font-size: clamp(3rem, 16vw, 7.5rem);
  font-weight: 800;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.scoreboard-team.is-us .score-num {
  color: var(--accent);
}

.scoreboard-team.is-opp .score-num {
  color: #e8eef5;
}

.scoreboard-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}

.scoreboard-clock-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: max-content;
  max-width: 100%;
}

.scoreboard-poll-line {
  width: 100%;
  height: 4px;
  margin: 0 0 0.4rem;
  background: rgba(244, 247, 251, 0.14);
  border-radius: 99px;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
}

.scoreboard-poll-line-fill {
  display: block;
  width: 100%;
  height: 4px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(241, 90, 36, 0.55);
  border-radius: inherit;
  font-size: 0;
  line-height: 0;
  transform: none;
  transform-origin: left center;
  transition: width 0.25s linear, opacity 0.2s ease;
}

.scoreboard-poll-line.is-syncing .scoreboard-poll-line-fill {
  opacity: 0.45;
}

.scoreboard-clock-face {
  font: inherit;
  font-size: clamp(2.4rem, 12vw, 5.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #f4f7fb;
  background: transparent;
  border: none;
  padding: 0.1rem 0.2rem;
  min-height: 0;
  line-height: 1;
}

.scoreboard-board.is-final .scoreboard-clock-face {
  font-size: clamp(1.7rem, 9vw, 3.8rem);
  letter-spacing: 0.08em;
}

.scoreboard-clock-input {
  width: min(12rem, 70vw);
  font-size: clamp(2rem, 10vw, 4rem);
  min-height: 3rem;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f7fb;
  border-color: var(--accent);
}

.scoreboard-period {
  margin: 0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(244, 247, 251, 0.65);
  background: none;
  border: none;
  padding: 0.15rem 0.4rem;
  cursor: pointer;
}

button.scoreboard-period:hover,
button.scoreboard-period:focus-visible {
  color: #f4f7fb;
}

.scoreboard-clock-off {
  margin: 0;
  text-align: center;
}

.scoreboard-box {
  padding: 0.35rem 0.85rem calc(1.35rem + var(--safe-bottom));
  max-width: 42rem;
  margin: 0 auto;
}

.scoreboard-table-wrap {
  border: 1px solid rgba(244, 247, 251, 0.2);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.scoreboard-stat-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}

.scoreboard-stat-table th,
.scoreboard-stat-table td {
  padding: 0.55rem 0.45rem;
  text-align: center;
  border-bottom: 1px solid rgba(244, 247, 251, 0.12);
  font-size: 0.92rem;
}

.scoreboard-stat-table thead th {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(244, 247, 251, 0.55);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
}

.scoreboard-stat-table th:first-child,
.scoreboard-stat-table td:first-child,
.scoreboard-stat-table th[scope="row"] {
  text-align: left;
  padding-left: 0.7rem;
  width: 32%;
}

.scoreboard-stat-table tbody tr:last-child th,
.scoreboard-stat-table tbody tr:last-child td {
  border-bottom: none;
}

.scoreboard-stat-table tbody tr:first-child th[scope="row"] {
  color: var(--accent);
}

.scoreboard-recap {
  margin: 0.85rem 0 1.1rem;
  color: rgba(244, 247, 251, 0.78);
  line-height: 1.45;
  font-size: 0.95rem;
}

.scoreboard-field-wrap {
  width: 100%;
  margin: 0;
}

.scoreboard-field-svg {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.scoreboard-refresh-foot {
  margin: 1.15rem 0 0;
  text-align: center;
}

.scoreboard-refresh-link {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  color: rgba(244, 247, 251, 0.55);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  background: none;
  border: none;
  padding: 0.35rem;
}

.scoreboard-refresh-link:hover {
  color: #f4f7fb;
}

.scoreboard-menu {
  position: fixed;
  top: calc(0.45rem + env(safe-area-inset-top, 0px));
  right: 0.55rem;
  z-index: 20;
}

.scoreboard-menu-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(244, 247, 251, 0.75);
  border-radius: 999px;
}

.scoreboard-menu-btn:hover,
.scoreboard-menu-btn[aria-expanded="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.scoreboard-menu-pop {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 10.5rem;
  padding: 0.35rem;
  background: #13283f;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.scoreboard-menu-item {
  display: block;
  width: 100%;
  padding: 0.7rem 0.85rem;
  color: #f4f7fb;
  text-decoration: none;
  text-align: left;
  font: inherit;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.scoreboard-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.clock-setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
}

.clock-setup-grid .plays-filter-btn {
  min-height: 42px;
}

.clock-setup-reset {
  width: 100%;
  margin: 0 0 0.5rem;
}

@media (min-width: 720px) {
  .scoreboard-board {
    grid-template-columns: 1fr minmax(10rem, 1fr) 1fr;
  }
}

.prep-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
}

.prep-tab {
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
}

.prep-tab.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.prep-empty {
  padding: 1.25rem 0.15rem 2rem;
}

.prep-empty-title {
  margin: 0 0 0.35rem;
  font-size: 1.12rem;
  font-weight: 750;
}

.prep-empty .muted {
  margin: 0 0 1rem;
  max-width: 28rem;
}

.prep-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prep-session.prep-locked-banner {
  background: var(--bg-soft);
}

.prep-session-copy {
  min-width: 0;
}

.prep-session-opp {
  margin: 0;
  font-weight: 750;
  font-size: 1.02rem;
}

.prep-session-meta {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.prep-session-setup {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0.4rem 0.85rem;
}

.prep-board {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  padding-bottom: 2rem;
}

.prep-scope {
  margin: 0;
}

.prep-config-panel {
  width: min(28rem, 100%);
}

.prep-config-panel .prep-game-set {
  max-height: 12rem;
  overflow: auto;
  padding-right: 0.15rem;
}

.prep-friendly-check,
.prep-game-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0 0 0.4rem;
}

.prep-game-set {
  margin: 0.5rem 0 0;
}

.prep-game-set-label {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.prep-locked-banner {
  margin: 0.25rem 0 0;
}

.prep-pitch-section {
  margin: 0;
}

.prep-pitch-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
  padding-block: 0.35rem 0.55rem;
}

.prep-pitch-field {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #24633c;
}

.prep-pitch-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(78vh, 42rem);
}

.prep-pitch-toolbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-self: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.prep-pitch-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 36px;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(11, 31, 51, 0.78);
  color: #f4f7fb;
  border: 1px solid rgba(244, 247, 251, 0.22);
  font-weight: 750;
  font-size: 0.8rem;
  backdrop-filter: blur(8px);
}

.prep-pitch-tool-icon {
  justify-content: center;
  min-width: 36px;
  padding: 0.25rem 0.55rem;
}

.prep-pitch-tool:hover,
.prep-pitch-tool.is-on {
  background: rgba(11, 31, 51, 0.92);
  border-color: rgba(244, 247, 251, 0.45);
}

.prep-pitch-tool.is-filtered {
  border-color: #f7e27c;
}

.prep-tool-icon {
  display: block;
}

.prep-tool-hash {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.prep-pitch-toolbar .shots-only-switch-track {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.prep-pitch-toolbar .shots-only-switch:not(.is-on) .shots-only-switch-track {
  background: #6b7788;
}

.prep-tool-badge {
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #f7e27c;
  color: #0b1f33;
  font-size: 0.7rem;
  line-height: 1.15rem;
  text-align: center;
}

.prep-pitch-panel {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  right: 0.55rem;
  z-index: 5;
  max-height: min(22rem, 62%);
  overflow: auto;
  padding: 0.75rem 0.8rem 0.85rem;
  background: rgba(11, 31, 51, 0.94);
  color: #f4f7fb;
  border: 1px solid rgba(244, 247, 251, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(11, 31, 51, 0.35);
}

.prep-pitch-panel .plays-filters {
  margin: 0;
  gap: 0.55rem;
}

.prep-pitch-panel .plays-filter-label {
  color: rgba(244, 247, 251, 0.7);
}

.prep-pitch-panel .plays-filter-btn {
  background: rgba(244, 247, 251, 0.08);
  border-color: rgba(244, 247, 251, 0.22);
  color: #f4f7fb;
}

.prep-pitch-panel .plays-filter-btn.is-on {
  background: #f7e27c;
  border-color: #f7e27c;
  color: #0b1f33;
}

.prep-stats-grid {
  display: grid;
  gap: 0.85rem;
}

.prep-stat-split {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(244, 247, 251, 0.7);
}

.prep-pitch-panel .tracker-summary {
  margin: 0;
  gap: 0.3rem;
}

.prep-pitch-panel .pill {
  display: inline-flex;
  gap: 0.25rem;
  align-items: baseline;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(244, 247, 251, 0.1);
  font-size: 0.75rem;
}

.prep-legend {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(244, 247, 251, 0.72);
}

.prep-pitch-caption {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.prep-shot-dot,
.prep-pitch-svg text[data-prep-shot] {
  cursor: pointer;
}

.prep-shot-popup {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 3;
  width: max-content;
  max-width: min(16.5rem, 86%);
  padding: 0.55rem 1.7rem 0.6rem 0.75rem;
  background: #0b1f33;
  color: #f4f7fb;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(11, 31, 51, 0.35);
  transform: translate(-50%, calc(-100% - 10px));
  pointer-events: auto;
}

.prep-shot-popup.is-below {
  transform: translate(-50%, 12px);
}

.prep-shot-popup.is-start {
  transform: translate(0, calc(-100% - 10px));
}

.prep-shot-popup.is-start.is-below {
  transform: translate(0, 12px);
}

.prep-shot-popup.is-end {
  transform: translate(-100%, calc(-100% - 10px));
}

.prep-shot-popup.is-end.is-below {
  transform: translate(-100%, 12px);
}

.prep-shot-popup p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.prep-shot-popup-kicker {
  color: rgba(244, 247, 251, 0.72);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.prep-shot-popup-player,
.prep-shot-popup-result {
  font-weight: 750;
}

.prep-shot-popup-date {
  color: rgba(244, 247, 251, 0.78);
}

.prep-shot-popup-close {
  position: absolute;
  top: 0.15rem;
  right: 0.2rem;
  width: 1.6rem;
  height: 1.6rem;
  color: #f4f7fb;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 4px;
}

.prep-shot-popup-close:hover,
.prep-shot-popup-close:focus-visible {
  background: rgba(244, 247, 251, 0.12);
}

.prep-game-link {
  margin: 1.5rem 0 0;
  padding: 0.75rem 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.prep-game-link a {
  font-weight: 750;
}

.prep-gemini {
  background: linear-gradient(180deg, #1c2744 0%, #12192c 100%);
  color: #f4f7fb;
  border-radius: var(--radius);
  padding: 1rem 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.prep-gemini-head {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0 0 0.35rem;
}

.prep-gemini-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f15a24;
}

.prep-gemini h2 {
  margin: 0;
  color: #f4f7fb;
  font-size: 1.15rem;
}

.prep-gemini-lede {
  margin: 0 0 0.85rem;
  color: rgba(244, 247, 251, 0.72);
  font-size: 0.88rem;
}

.prep-gemini-transcript {
  border-bottom-color: rgba(244, 247, 251, 0.12);
}

.prep-gemini .explore-msg.is-user {
  background: rgba(241, 90, 36, 0.22);
  color: #f4f7fb;
}

.prep-gemini .explore-loading {
  color: rgba(244, 247, 251, 0.72);
}

.prep-gemini .explore-input {
  background: rgba(8, 12, 22, 0.55);
  border-color: rgba(244, 247, 251, 0.18);
  color: #f4f7fb;
}

.prep-gemini .explore-input::placeholder {
  color: rgba(244, 247, 251, 0.45);
}

.prep-gemini .btn-primary {
  background: var(--accent);
  color: #fff;
}

.prep-gemini > .btn-primary {
  width: 100%;
}

.prep-gemini .btn-primary:hover {
  background: var(--accent-dim);
}

.prep-gemini .btn-ghost {
  color: rgba(244, 247, 251, 0.82);
  border-color: rgba(244, 247, 251, 0.22);
}

.prep-gemini .btn-ghost:hover {
  color: #fff;
  border-color: rgba(244, 247, 251, 0.4);
}

.prep-gemini .shots-error {
  color: #f0b4b4;
}

.prep-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}

.prep-followup {
  min-height: 34px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 247, 251, 0.22);
  background: rgba(244, 247, 251, 0.08);
  color: #f4f7fb;
  font-weight: 650;
  font-size: 0.82rem;
}

.prep-followup:hover {
  border-color: #f15a24;
  background: rgba(241, 90, 36, 0.18);
}

.prep-gemini-answer {
  margin: 0;
}

.prep-gemini-answer h3 {
  margin: 0.6rem 0 0.3rem;
  font-size: 1.02rem;
  color: #f4f7fb;
}

.prep-gemini-answer p {
  margin: 0 0 0.55rem;
  line-height: 1.45;
}

.prep-notes {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 0.95rem 1rem;
}

.prep-section-head h2 {
  margin: 0;
}

.prep-note-add-btn {
  min-height: 38px;
  margin: 0.45rem 0 0.75rem;
  padding: 0.3rem 0.75rem;
}

.prep-note-form {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.prep-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.65rem;
}

.prep-tag-suggest,
.prep-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 650;
  background: var(--bg);
}

.prep-tag-suggest {
  cursor: pointer;
}

.prep-note {
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.prep-note:last-child {
  margin-bottom: 0;
}

.prep-note-meta {
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 650;
}

.prep-note-body {
  margin: 0 0 0.4rem;
  white-space: pre-wrap;
}

.prep-note-tags {
  margin: 0 0 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.prep-note-del {
  min-height: 36px;
  padding: 0.2rem 0.55rem;
}

.prep-unlock {
  font-weight: 700;
}

.shots-scenarios .scenario-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.55rem 0 0.25rem;
}

.shots-scenarios .scenario-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 650;
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}

.scenario-delta {
  margin-left: 0.25rem;
  font-weight: 750;
}

.scenario-delta.is-up {
  color: #0f7b3a;
}

.scenario-delta.is-down {
  color: #b42318;
}

.scenario-delta.is-flat {
  color: var(--text-muted);
}

.shots-scenarios .scenario-meta {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}

.shots-scenarios .scenario-freshness {
  margin: -0.25rem 0 0.75rem;
  font-size: 0.85rem;
}

.mp-refresh-modal {
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
}

.mp-refresh-panel {
  text-align: center;
}

.mp-refresh-panel h2 {
  font-size: 1.1rem;
  line-height: 1.35;
}

.mp-refresh-panel .modal-actions {
  justify-content: center;
}

.mp-refresh-panel .modal-actions .btn {
  min-height: 44px;
}

.mp-refresh-step {
  margin: 0 0 0.25rem;
  font-weight: 650;
}

.mp-refresh-sub {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
}

.mp-ball {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0.25rem auto 1rem;
  color: var(--brand);
  animation: mp-ball-roll 1.1s linear infinite;
}

@keyframes mp-ball-roll {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mp-ball {
    animation-duration: 4s;
  }
}

.bracket-rounds {
  position: sticky;
  top: var(--header-h);
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0.75rem 0 0.6rem;
  padding: 0.4rem 0;
  background: var(--bg);
}

.bracket-round-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.25rem 0.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  line-height: 1.15;
}

.bracket-round-label {
  font-size: 0.8rem;
  font-weight: 750;
  white-space: nowrap;
}

.bracket-round-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.bracket-round-btn.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.bracket-round-btn.is-on .bracket-round-date {
  color: rgba(255, 255, 255, 0.8);
}

.bracket-scroller {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  scroll-snap-type: x mandatory;
  background: #eee;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.bracket-track {
  position: relative;
}

.bracket-snap {
  position: absolute;
  top: 0;
  width: 1px;
  height: 1px;
  scroll-snap-align: start;
}

.bracket-frame {
  display: block;
  border: 0;
}

.bracket-open {
  width: 100%;
  margin-top: 0.85rem;
}

.shots-bracket .prep-tab {
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
}

.rankings-table th,
.rankings-table td {
  padding: 0.5rem 0.4rem;
  vertical-align: middle;
}

.rankings-table th:first-child,
.rankings-table td:first-child {
  padding-left: 0.6rem;
}

.rankings-table td:nth-child(2) {
  white-space: normal;
}

.rankings-table .rank-cell {
  width: 2.2rem;
  line-height: 1.1;
}

.rank-num {
  display: block;
  font-weight: 750;
}

.rank-move {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
}

.rank-move.is-up {
  color: var(--correct);
}

.rank-move.is-down {
  color: var(--incorrect);
}

.rank-team {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: normal;
  font-weight: 650;
  line-height: 1.15;
}

.rank-team img,
.rank-team-blank {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
}

.rankings-table .rank-num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rankings-table tbody tr.is-us {
  background: rgba(26, 77, 124, 0.12);
  box-shadow: inset 3px 0 0 var(--brand);
}

.rankings-meta {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
}

@media (min-width: 640px) {
  .prep-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* Postseason meeting scheduler (#schedule, #schedule-admin) */
body.schedule-view .app-main {
  max-width: 34rem;
  padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
}

.schedule-page {
  padding: 0.75rem 0 1.5rem;
}

.schedule-hero {
  margin: 0.25rem 0 1rem;
}

.schedule-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.schedule-hero h1 {
  margin: 0.1rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1.15;
}

.schedule-hero p {
  margin: 0;
}

.schedule-card,
.schedule-step {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin: 0 0 0.85rem;
}

.schedule-card h2,
.schedule-step h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.schedule-step-num {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  flex: none;
}

.schedule-hint {
  margin: -0.35rem 0 0.65rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.schedule-select {
  width: 100%;
  min-height: 48px;
  padding: 0 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  font: inherit;
  font-size: 1rem;
  color: var(--text);
}

.schedule-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.schedule-field .text-gate-input {
  width: 100%;
  min-height: 48px;
  flex: none;
}

.schedule-optional {
  font-weight: 500;
  color: var(--text-dim);
}

.schedule-day + .schedule-day {
  margin-top: 0.85rem;
}

.schedule-day h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  color: var(--brand-strong);
}

.schedule-times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.schedule-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0.35rem 0.25rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  color: var(--text);
  line-height: 1.15;
}

.schedule-time-clock {
  font-size: 1.02rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.schedule-time-state {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--correct);
}

.schedule-time.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(26, 77, 124, 0.22);
}

.schedule-time.is-on .schedule-time-state {
  color: #fff;
}

.schedule-time.is-booked {
  background: var(--bg-soft);
  border-color: var(--border);
  border-style: dashed;
  color: var(--text-dim);
  cursor: not-allowed;
}

.schedule-time.is-booked .schedule-time-clock {
  text-decoration: line-through;
  font-weight: 600;
}

.schedule-time.is-booked .schedule-time-state {
  color: var(--text-dim);
}

.schedule-consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-size: 0.86rem;
  line-height: 1.4;
}

.schedule-consent input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0.05rem 0 0;
  accent-color: var(--brand);
}

.schedule-submit {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 0 -0.85rem;
  padding: 0.65rem 0.85rem calc(0.65rem + var(--safe-bottom));
  background: rgba(244, 247, 251, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
}

.schedule-selected {
  margin: 0 0 0.45rem;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.3;
}

.schedule-submit .shots-error {
  margin: 0 0 0.45rem;
  text-align: center;
  font-size: 0.9rem;
}

.schedule-submit-btn,
.schedule-wide {
  width: 100%;
  min-height: 52px;
  font-size: 1.05rem;
}

.schedule-empty {
  text-align: center;
}

.schedule-empty p {
  margin: 0 0 0.35rem;
}

.schedule-footer {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.85rem;
}

.schedule-footer a {
  color: var(--text-dim);
}

.schedule-done {
  text-align: center;
  padding: 1.5rem 1rem;
}

.schedule-done-check {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 0.65rem;
  border-radius: 50%;
  background: var(--correct-bg);
  color: var(--correct);
}

.schedule-done h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.schedule-done-player {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand);
}

.schedule-done-when {
  margin: 0.5rem 0 1rem;
  font-size: 1.05rem;
  line-height: 1.35;
}

.schedule-done-notes {
  margin: 0 0 1.1rem;
  padding: 0.75rem 0.9rem;
  list-style: none;
  text-align: left;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.schedule-done-notes li + li {
  margin-top: 0.35rem;
}

.schedule-done-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Coach view */
.schedule-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.schedule-admin-head h1 {
  margin: 0;
}

.schedule-public-link {
  min-height: 38px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  flex: none;
}

.schedule-summary {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.88rem;
}

.schedule-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.3rem;
}

.schedule-tabs .prep-tab {
  justify-content: center;
  padding: 0.4rem 0.25rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.schedule-admin-day h2 {
  margin: 1.1rem 0 0.45rem;
  font-size: 1rem;
  color: var(--brand-strong);
}

.schedule-slot {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
  margin: 0 0 0.5rem;
}

.schedule-slot.is-booked {
  border-left: 4px solid var(--brand);
}

.schedule-slot.is-closed {
  opacity: 0.75;
}

.schedule-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.schedule-slot-time {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.schedule-chip {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--bg-soft);
  color: var(--text-muted);
  flex: none;
}

.schedule-chip.is-booked {
  background: rgba(26, 77, 124, 0.12);
  color: var(--brand);
}

.schedule-chip.is-open {
  background: var(--correct-bg);
  color: var(--correct);
}

.schedule-booked-name {
  margin: 0.35rem 0 0.15rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.schedule-contact {
  margin: 0;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.schedule-small {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
}

.schedule-text-day {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.schedule-text-day h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}

.schedule-text-day h3 .muted {
  font-weight: 500;
}

.schedule-copy {
  display: block;
  width: 100%;
  box-sizing: border-box;
  resize: none;
  font-size: 16px;
  line-height: 1.35;
}

.schedule-warn {
  color: var(--incorrect);
  font-weight: 700;
}

.schedule-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.schedule-row-actions .btn {
  min-height: 40px;
  padding: 0.4rem 0.8rem;
  font-size: 0.88rem;
}

.btn.schedule-danger {
  color: var(--incorrect);
  border-color: rgba(181, 69, 69, 0.4);
}

.schedule-inline {
  margin-top: 0.6rem;
}

.schedule-unbooked summary,
.schedule-cancelled summary {
  cursor: pointer;
  font-weight: 700;
}

.schedule-unbooked p {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
}

.schedule-cancelled ul {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
}

.schedule-cancelled li + li {
  margin-top: 0.45rem;
}

.schedule-allset {
  margin: 0 0 0.5rem;
  font-weight: 700;
  color: var(--correct);
}

.schedule-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 0.6rem;
}

.schedule-add-date .btn {
  min-height: 48px;
  width: 100%;
}

.schedule-date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: -0.25rem 0 0.75rem;
}

.schedule-preview {
  min-height: 1.3em;
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.schedule-player-add {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.schedule-player-add .schedule-field {
  flex: 1;
  margin: 0;
}

.schedule-player-add > .text-gate-input {
  min-height: 44px;
}

.schedule-player-add .btn {
  min-height: 48px;
  flex: none;
}

.schedule-players {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.schedule-player {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}

.schedule-player.is-inactive .text-gate-input {
  color: var(--text-dim);
  text-decoration: line-through;
}

.schedule-player-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
}

.schedule-player-form .text-gate-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  padding: 0.45rem 0.6rem;
}

.schedule-player-form .btn {
  min-height: 42px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  flex: none;
}

.schedule-active {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  flex: none;
}

.schedule-active input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.schedule-feed {
  width: 100%;
  font-size: 0.8rem;
  font-family: ui-monospace, Menlo, monospace;
}

/* blue26/schedule/: parent-only page, no tracker chrome */
.schedule-standalone-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: calc(0.55rem + env(safe-area-inset-top, 0px)) 1rem 0.55rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.schedule-standalone-header img {
  width: 32px;
  height: 32px;
}

.schedule-coach-back {
  display: flex;
  align-items: center;
  gap: inherit;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* ---- Club Player Visitation Planner ---- */
body.club-view .app-main {
  padding-bottom: calc(1.5rem + var(--safe-bottom));
}

.club-shell {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0.75rem 1rem 2rem;
}

.club-hero {
  margin: 0 0 0.85rem;
}

.club-hero h1 {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  color: var(--brand-strong);
}

.club-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.club-tabs {
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.club-tabs .prep-tab {
  flex: 1 1 0;
  justify-content: center;
  min-width: 0;
}

.club-data-link {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  text-decoration: none;
}

.club-data-link svg {
  width: 18px;
  height: 18px;
}

.club-data-link.is-on {
  color: var(--brand);
  background: var(--bg-soft);
  border-color: var(--border);
}

.club-data-head {
  margin: 0 0 0.75rem;
}

.club-data-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  color: var(--brand-strong);
}

.club-data-head p {
  margin: 0;
  font-size: 0.85rem;
}

.club-pin-form {
  display: grid;
  gap: 0.5rem;
  max-width: 16rem;
}

.club-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
  min-width: 0;
}

.club-filter-toggle {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
}

.club-filter-toggle svg {
  width: 15px;
  height: 15px;
}

.club-filter-toggle[aria-expanded="true"] {
  border-color: var(--brand);
  color: var(--brand-strong);
}

.club-filter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.club-filter-summary {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.club-filters {
  display: none;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  padding: 0.7rem;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}

.club-filters.is-open {
  display: grid;
}

.club-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.club-split > * {
  min-width: 0;
}

.club-finder {
  margin: 0 0 0.75rem;
}

.club-find-games {
  width: 100%;
}

.club-picker {
  margin-top: 0.55rem;
  padding: 0.65rem 0.65rem 0.2rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
}

.club-picker .club-game-card {
  background: var(--bg-elevated);
}

.club-game-card.is-added {
  background: rgba(26, 77, 124, 0.1);
  border-color: var(--brand);
}

.club-add-btn {
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.85rem;
  font-size: 1.35rem;
  line-height: 1;
}

.club-working {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem 0.55rem 0.85rem;
  background: rgba(26, 77, 124, 0.1);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
}

.club-working p {
  margin: 0;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.club-working .btn {
  flex: 0 0 auto;
  min-height: 44px;
}

.club-add-choice {
  background: var(--bg-panel);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  margin: 0 0 0.75rem;
  scroll-margin-top: 5.5rem;
}

.club-add-choice h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.club-add-choice p {
  margin: 0 0 0.65rem;
}

.club-add-choice .btn,
.club-add-choice select {
  width: 100%;
  min-height: 44px;
  margin-top: 0.45rem;
}

.club-add-choice label {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.club-filters label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.club-filters input,
.club-filters select,
.club-itin-form input,
.club-itin-form textarea,
.club-mini-form input,
.club-mini-form select,
.club-mini-form textarea {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  min-height: 44px;
  width: 100%;
  min-width: 0;
}

.club-picker .club-filters.is-open {
  background: var(--bg-elevated);
}

.club-filters .club-check input {
  width: 1.15rem;
  min-width: 1.15rem;
  max-width: 1.15rem;
  min-height: 1.15rem;
  padding: 0;
  flex: 0 0 auto;
}

.club-check {
  display: flex !important;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}

.club-count {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
}

.club-day h2 {
  margin: 1rem 0 0.45rem;
  font-size: 1rem;
  color: var(--brand-strong);
}

.club-game-card,
.club-stop-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  margin: 0 0 0.55rem;
  box-shadow: var(--shadow);
}

.club-stop-card h3 {
  margin: 0.25rem 0;
  font-size: 1.02rem;
  line-height: 1.25;
}

.club-game-card h3 {
  margin: 0.15rem 0 0.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-muted);
}

.club-game-card h3 span {
  font-weight: 600;
  color: var(--text-dim);
}

.club-game-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.club-players {
  margin: 0.2rem 0;
  font-size: 0.9rem;
}

.club-game-card .club-players {
  margin: 0.55rem 0 0.35rem;
}

.club-game-card .club-players.is-empty {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
}

.club-game-card .club-player-names {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--brand-strong);
}

.club-game-card .club-player-names .is-roster {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.14em;
}

.club-player-aside,
.club-side-label {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.club-side-group + .club-side-group {
  margin-top: 0.45rem;
}

.club-venue {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-dim);
}

.club-game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.55rem;
}

.club-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--brand-strong);
}

.club-badge-both {
  background: rgba(241, 90, 36, 0.14);
  color: var(--accent-dim);
}

.club-badge-changed {
  background: rgba(181, 69, 69, 0.12);
  color: var(--incorrect);
}

.club-status {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.club-itin-actions,
.club-data-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}

.club-itin-actions .btn[hidden] {
  display: none;
}

.club-itin-feed {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.club-itin-feed h2 {
  margin: 0;
  font-size: 1.05rem;
}

.club-itin-feed > .muted {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.35;
}

.club-itin-feed-url {
  width: 100%;
  min-height: 44px;
  font: inherit;
  font-size: 0.78rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
}

.club-itin-feed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.club-itin-feed-actions .btn,
.club-itin-feed-actions a.btn {
  flex: 1 1 auto;
  min-height: 44px;
  text-align: center;
}

.club-itin-picker {
  display: grid;
  gap: 0.75rem;
}

.club-itin-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.club-itin-picker-head h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
  color: var(--text);
  min-width: 0;
}

.club-itin-picker-head .btn {
  flex: 0 0 auto;
  min-height: 40px;
}

.club-itin-picker > .muted {
  margin: -0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

.club-itin-pick-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.club-itin-pick-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  align-items: stretch;
}

.club-itin-pick {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.club-itin-pick.is-static {
  cursor: default;
  pointer-events: none;
}

.club-itin-pick:not(.is-static):active {
  border-color: var(--brand);
}

.club-itin-pick-name {
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.25;
  min-width: 0;
}

.club-itin-pick-meta {
  flex: 0 0 auto;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.club-itin-pick-del {
  min-height: 52px;
  min-width: 4.75rem;
  padding-inline: 0.65rem;
  color: var(--incorrect, #b54545);
  font-weight: 600;
}

.club-itin-create {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.club-itin-create label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.club-itin-create input {
  width: 100%;
  min-height: 44px;
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
}

.club-itin-create .btn {
  width: 100%;
  min-height: 44px;
}

.club-itin-head {
  display: grid;
  gap: 0.25rem;
  margin: 0 0 0.75rem;
}

.club-itin-head #club-itin-back {
  justify-self: start;
  min-height: 40px;
  padding-inline: 0.35rem;
  margin-left: -0.35rem;
}

.club-itin-title input {
  width: 100%;
  min-height: 44px;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.35rem 0;
  border: none;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text);
}

.club-itin-title input:focus {
  outline: none;
  border-bottom-color: var(--brand);
}

.club-itin-sub {
  margin: 0;
  font-size: 0.82rem;
}

.club-itin-form {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.club-itin-form label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.club-stop-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.55rem;
}

.club-stop-ord {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.club-leg {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.club-leg a {
  color: inherit;
  font-weight: 600;
}

.club-leg.is-warn {
  color: var(--incorrect);
}

.club-start-status {
  margin: -0.15rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.club-start-prompt {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(181, 69, 69, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(181, 69, 69, 0.08);
  display: grid;
  gap: 0.45rem;
}

.club-start-prompt h2 {
  margin: 0;
  font-size: 1.02rem;
}

.club-start-prompt p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.club-start-prompt label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.club-start-prompt input {
  width: 100%;
  min-height: 44px;
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
}

.club-start-leg {
  margin: 0 0 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.club-start-from {
  margin: 0 0 0.2rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.club-start-leg .club-leg {
  grid-column: auto;
}

.club-fac-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.65rem;
}

.club-fac-list li.club-fac-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.club-fac-main strong {
  margin-right: 0.35rem;
}

.club-fac-main p {
  margin: 0.2rem 0 0;
}

.club-fac-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.club-pin-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  vertical-align: middle;
}

.club-pin-badge.is-ok {
  background: rgba(46, 125, 50, 0.12);
  color: #2e7d32;
}

.club-pin-badge.is-miss {
  background: rgba(181, 69, 69, 0.12);
  color: var(--incorrect);
}

.club-warn-list {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  color: var(--incorrect);
  font-size: 0.88rem;
}

.club-warn.is-bad {
  font-weight: 700;
}

.club-gemini {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.club-gemini h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.club-gemini .explore-transcript {
  max-height: none;
  overflow: visible;
}

.club-md h3 {
  margin: 0.9rem 0 0.35rem;
  font-size: 1.02rem;
  line-height: 1.3;
}

.club-md p,
.club-md li {
  margin: 0;
  line-height: 1.4;
}

/* Gap before the next game title, not under the name before Kickoff. */
.club-md ul + p,
.club-md p + p {
  margin-top: 0.85rem;
}

.club-md ul {
  margin: 0.2rem 0 0;
  padding-left: 1.15rem;
}

.club-md li + li {
  margin-top: 0.15rem;
}

.club-md hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0.75rem 0;
}

.club-md code {
  font-size: 0.78rem;
  word-break: break-all;
}

/* Flex keeps Add on the name row — float+flow-root left a 44px hole under the title. */
.club-md p,
.club-md li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.45rem;
  row-gap: 0.15rem;
}

.club-md-add {
  float: none;
  margin: 0 0 0 auto;
  min-height: 44px;
  min-width: 44px;
  padding: 0.2rem 0.75rem;
}

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

.club-mini-form {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.75rem;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}

.club-mini-form h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.club-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.club-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.club-import-out {
  white-space: pre-wrap;
  font-size: 0.78rem;
  background: var(--bg-soft);
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  max-height: 220px;
  overflow: auto;
}

.club-banner-error {
  margin: 0 0 0.65rem;
}

.club-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  margin: 0.15rem 0 0.85rem;
  font-weight: 650;
  line-height: 1.3;
}

.club-spin {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 3px solid var(--border);
  border-top-color: var(--brand-strong);
  border-radius: 50%;
  animation: club-spin 0.7s linear infinite;
}

@keyframes club-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .club-spin { animation: none; }
}

.club-match {
  background: var(--bg-panel);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  margin: 0 0 0.75rem;
  scroll-margin-top: 5.5rem;
}

.club-match h2 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.club-match-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.club-match-row {
  padding: 0.55rem 0;
  border-top: 1px solid var(--border);
}

.club-match-row p {
  margin: 0 0 0.45rem;
}

.club-match-row select,
.club-match-actions .btn,
.club-match > .btn {
  min-height: 44px;
}

.club-match-actions {
  display: flex;
  gap: 0.5rem;
}

.club-match-actions .btn {
  flex: 1;
}

.club-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  margin-right: 0.5rem;
}

.club-inline input {
  width: 4.5rem;
  min-height: 36px;
  padding: 0.3rem 0.4rem;
}
