:root {
  --bg-0: #f4f7fb;
  --bg-1: #ffffff;
  --ink-0: #0f172a;
  --ink-1: #334155;
  --ink-2: #64748b;
  --line: #dbe3ee;
  --accent: #ff5a1f;
  --accent-2: #0a84ff;
  --ok: #17a34a;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink-0);
  background: radial-gradient(circle at 10% 10%, #ffffff 0%, var(--bg-0) 35%, #e6edf8 100%);
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(120deg, rgba(255, 90, 31, 0.09), transparent 35%),
    linear-gradient(240deg, rgba(10, 132, 255, 0.1), transparent 40%);
}

.loading-widget {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px dashed #cddff7;
  border-radius: 12px;
  background: #f8fbff;
}

.loading-widget.compact {
  width: 100%;
  justify-content: center;
}

.loading-label {
  color: #476287;
  font-size: 13px;
  font-weight: 800;
}

.basketball-loader {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle at 30% 30%, #ffb46f 0%, #ff8a3d 45%, #ea5f1b 100%);
  box-shadow: 0 3px 8px rgba(234, 95, 27, 0.35);
  animation: basketball-bounce 0.95s ease-in-out infinite;
}

.basketball-loader::before,
.basketball-loader::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.basketball-loader::before {
  border: 1.6px solid rgba(44, 29, 17, 0.55);
  border-top-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(24deg);
}

.basketball-loader::after {
  width: 1.6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(44, 29, 17, 0.55);
}

@keyframes basketball-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.site-header {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 18px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.brand-wrap {
  width: 100%;
}

.main-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.header-main-menu {
  margin-top: 0;
  margin-left: auto;
}

.menu-button {
  border: 1px solid #d8e4f5;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.menu-button.active {
  border-color: #0a84ff;
  background: #ebf5ff;
  color: #0553a3;
}

.install-app-button {
  border-color: rgba(255, 90, 31, 0.34);
  background: linear-gradient(135deg, #fffcf4, #fff1ea);
  color: #b94817;
}

.install-app-button:hover {
  border-color: rgba(255, 90, 31, 0.48);
  color: #933712;
}

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.header-carousel {
  min-width: 0;
  flex: 1;
  margin-left: auto;
  padding-left: 8px;
}

.header-carousel-head {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.header-carousel-title {
  margin: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.header-carousel-nav {
  display: inline-flex;
  gap: 6px;
}

.header-carousel-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #cfe0f6;
  border-radius: 8px;
  background: #fff;
  color: #1e3a5f;
  font-weight: 900;
  cursor: pointer;
}

.header-games-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 2px;
}

.header-games-track::-webkit-scrollbar {
  height: 8px;
}

.header-games-track::-webkit-scrollbar-thumb {
  background: #c8d8ee;
  border-radius: 999px;
}

.header-day-marker {
  width: 64px;
  border: 1px solid #d7e5f8;
  border-radius: 8px;
  background: linear-gradient(160deg, #ffffff, #eff5ff);
  padding: 8px 6px;
  text-align: center;
}

.header-day-marker-dow {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

.header-day-marker-date {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
}

.header-tournament-marker {
  width: 100%;
  border: 1px dashed #c9d9ef;
  border-radius: 8px;
  background: #f8fbff;
  padding: 8px 7px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.header-tournament-marker p {
  margin: 0;
  font-size: 10px;
  font-weight: 900;
  color: #35567f;
  text-transform: uppercase;
  line-height: 1.25;
}

.header-tournament-series-line {
  font-weight: 900;
  color: #35567f;
  letter-spacing: 0.2px;
}

.header-tournament-series {
  font-weight: 800;
  color: #7a94b3;
}

.header-tournament-group {
  width: max-content;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.header-tournament-games {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
}

.header-game-card {
  width: 250px;
  border: 1px solid #d7e5f8;
  border-radius: 8px;
  background: #fff;
  padding: 7px 8px;
  text-align: left;
  cursor: pointer;
}

.header-game-card:hover {
  border-color: #9cc4ff;
}

.header-game-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.header-game-tournament {
  margin: 0;
  font-size: 9px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-game-status {
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.header-game-status.is-final {
  background: #eaf7ef;
  color: #116530;
}

.header-game-status.is-pending {
  background: #ebf5ff;
  color: #0b5aa9;
}

.header-game-series-meta {
  margin: 6px 0 0;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
  color: #64748b;
}

.header-game-league {
  margin-left: auto;
  font-size: 9px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.header-team-row+.header-team-row {
  margin-top: 5px;
}

.header-team-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.header-team-inline span {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-team-record {
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  border: 1px solid #d7e5f8;
  background: #f2f7ff;
  color: #4a6382;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
}

.header-team-logo-mini,
.header-team-fallback {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #d5dfec;
  background: #fff;
  flex-shrink: 0;
}

.header-team-logo-mini {
  object-fit: cover;
}

.header-team-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 900;
  color: #334155;
}

.header-team-score {
  font-size: 23px;
  font-weight: 900;
  color: #0f172a;
  min-width: 18px;
  text-align: right;
  line-height: 1;
}

.header-team-score.is-loser {
  color: #6b7c93;
}

.header-game-sub {
  margin: 6px 0 0;
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.brand-logo {
  width: 180px;
  max-width: 45vw;
  height: auto;
}

.brand-pill {
  display: inline-block;
  margin-bottom: 14px;
  background: var(--ink-0);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.site-header h1 {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1rem, 2vw, 1.4rem);
  letter-spacing: 0.4px;
  line-height: 1.1;
  max-width: 920px;
  white-space: nowrap;
}

.site-header p {
  margin: 12px 0 0;
  max-width: 700px;
  color: var(--ink-1);
}

.refresh-button {
  border: 0;
  background: linear-gradient(130deg, var(--accent), #ff834f);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.layout {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 34px;
  display: grid;
  grid-template-columns: 1fr 360px;
  grid-template-areas:
    "news news"
    "details list"
    "standings standings";
  gap: 16px;
}

.panel {
  background: color-mix(in srgb, var(--bg-1) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.tournaments-panel {
  grid-area: list;
  padding: 18px;
}

.details-panel {
  grid-area: details;
}

.standings-bottom-panel {
  grid-area: standings;
  padding: 18px;
}

.news-panel {
  grid-area: news;
  padding: 18px;
}

.players-panel {
  padding: 18px;
}

.admin-panel {
  padding: 18px;
}

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

.admin-title {
  margin: 0;
  font-size: 1.2rem;
}

.account-shell {
  padding: 18px;
  border: 1px solid #d7e5f8;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(26, 115, 232, 0.08), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f6f9fe 100%);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.06);
}

.account-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 24px 26px;
  border-radius: 24px;
  background: linear-gradient(135deg, #10233f 0%, #183a63 55%, #20558f 100%);
  color: #fff;
  margin-bottom: 22px;
}

.account-auth-hero {
  min-height: 220px;
  align-items: flex-end;
}

.account-hero-main {
  display: flex;
  gap: 18px;
  align-items: center;
}

.account-avatar-wrap {
  flex: 0 0 auto;
}

.account-avatar {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.24);
  background: #e9eef5;
}

.account-avatar-large {
  width: 96px;
  height: 96px;
  border-color: rgba(16, 35, 63, 0.08);
}

.account-hero-copy {
  display: grid;
  gap: 10px;
  max-width: 720px;
}

.account-hero-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.account-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.72);
}

.account-eyebrow-dark {
  color: #4e6686;
}

.account-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.05;
  font-weight: 900;
  color: #fff;
}

.account-subtitle {
  margin: 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.98rem;
}

.account-plan-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.account-plan-badge.is-premium {
  background: linear-gradient(135deg, #ffd76a 0%, #ffb300 100%);
  color: #412400;
}

.account-plan-badge.is-free {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.account-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.account-hero-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.account-hero .admin-btn {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
}

.account-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid #dbe6f4;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
}

.account-section-tab {
  border: 0;
  background: transparent;
  color: #5f728f;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.account-section-tab:hover {
  background: #eef5ff;
  color: #153b67;
}

.account-section-tab.is-active {
  background: #10233f;
  color: #fff;
  box-shadow: 0 10px 20px rgba(16, 35, 63, 0.18);
}

.account-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
}

.account-layout-full {
  grid-template-columns: minmax(0, 1fr);
}

.account-sidebar,
.account-main,
.account-admin-grid,
.account-auth-grid {
  display: grid;
  gap: 18px;
}

.account-main,
.account-sidebar {
  min-width: 0;
}

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

.account-card {
  border: 1px solid #d6e2f2;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  padding: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.account-card-accent {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.account-card-muted {
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fd 100%);
}

.account-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.account-card h3 {
  margin: 0;
  font-size: 1.12rem;
  color: #10233f;
}

.account-shell .info {
  margin: 0;
  color: #5f728f;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.account-profile-block {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.account-profile-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  color: #10233f;
}

.account-profile-meta {
  margin: 4px 0 0;
  color: #5f728f;
  font-size: 0.88rem;
}

.account-quick-actions,
.account-shortcut-list {
  display: grid;
  gap: 10px;
}

.account-shortcut {
  width: 100%;
  text-align: left;
  border: 1px solid #dbe6f4;
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  display: grid;
  gap: 4px;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.account-shortcut:hover {
  border-color: #a9c8ef;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.account-shortcut strong {
  color: #10233f;
  font-size: 0.95rem;
}

.account-shortcut span {
  color: #5f728f;
  font-size: 0.84rem;
  line-height: 1.4;
}

.account-stats-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.account-stats-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ebf1f8;
}

.account-stats-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.account-stats-list dt {
  color: #5f728f;
  font-size: 0.84rem;
  font-weight: 700;
}

.account-stats-list dd {
  margin: 0;
  text-align: right;
  color: #10233f;
  font-size: 0.88rem;
  font-weight: 800;
}

.account-form-grid,
.account-compact-form {
  display: grid;
  gap: 14px;
}

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

.account-field {
  display: grid;
  gap: 8px;
}

.account-field-full {
  grid-column: 1 / -1;
}

.account-field-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #4e6686;
}

.account-form-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-top: 6px;
}

.account-form-footer .info {
  margin: 0;
}

.account-inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.account-inline-actions-tight {
  flex-wrap: nowrap;
}

.account-avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-avatar-row input[type="file"] {
  min-width: 0;
  flex: 1;
}

.account-section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4e6686;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.account-section-divider::before,
.account-section-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(150, 174, 205, 0), rgba(150, 174, 205, 0.9), rgba(150, 174, 205, 0));
}

.account-secondary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.account-secondary-grid-duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-view-layout {
  display: grid;
  gap: 18px;
}

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

.account-overview-tile {
  border: 1px solid #dbe6f4;
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  min-height: 140px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.account-overview-tile strong {
  font-size: 1.2rem;
  line-height: 1.15;
  color: #10233f;
}

.account-overview-label {
  color: #4e6686;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-activity-card {
  border: 1px solid #dbe6f4;
  border-radius: 18px;
  padding: 16px;
  background: #f8fbff;
}

.account-feature-list {
  display: grid;
  gap: 12px;
}

.account-feature-item {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid #ebf1f8;
}

.account-feature-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.account-feature-item strong {
  color: #10233f;
  font-size: 0.95rem;
}

.account-feature-item span {
  color: #5f728f;
  font-size: 0.88rem;
  line-height: 1.45;
}

.account-card-narrow {
  max-width: 560px;
}

.account-admin-zone {
  display: grid;
  gap: 18px;
}

.account-section-heading {
  display: grid;
  gap: 6px;
  padding: 8px 2px 0;
}

.account-section-heading h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #10233f;
}

.account-selected-user {
  margin-bottom: 8px;
}

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

.account-card .admin-users-list {
  max-height: 300px;
}

.account-card .admin-item {
  border-radius: 14px;
  padding: 12px 14px;
  background: #f8fbff;
}

.account-card .admin-item-title {
  font-size: 14px;
}

.account-card .admin-item-meta {
  font-size: 12px;
}

.account-admin-table {
  display: grid;
  gap: 10px;
}

.account-admin-table-head,
.admin-item-table {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 180px 180px;
  gap: 12px;
  align-items: center;
}

.account-admin-table-head {
  padding: 0 4px;
  color: #4e6686;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-users-list-table {
  gap: 10px;
}

.admin-item-table {
  padding: 14px 16px;
}

.account-admin-user-cell,
.account-admin-subscription-cell,
.account-admin-action-cell {
  min-width: 0;
}

.account-admin-subscription-cell {
  display: grid;
  gap: 4px;
  justify-items: start;
}

.account-admin-action-cell {
  display: flex;
  justify-content: flex-end;
}

.account-admin-action-cell .admin-btn {
  width: 100%;
}

.account-auth-grid-single {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
}

.account-auth-card {
  min-width: 0;
}

.account-auth-switch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
}

.account-auth-switch:has(.account-text-link:only-child) {
  justify-content: flex-start;
}

.account-text-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: #0a66d9;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-text-link:hover {
  color: #084fa8;
}

.account-profile-modal-panel {
  width: min(1120px, calc(100% - 24px));
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.account-modal-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .account-hero {
    flex-direction: column;
  }

  .account-layout,
  .account-secondary-grid,
  .account-overview-grid,
  .account-modal-layout,
  .account-admin-table-head,
  .admin-item-table,
  .account-admin-grid,
  .account-auth-grid,
  .account-form-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .account-shell {
    padding: 12px;
    border-radius: 22px;
  }

  .account-hero {
    padding: 18px;
    border-radius: 20px;
  }

  .account-section-nav {
    padding: 6px;
    gap: 6px;
  }

  .account-hero-main,
  .account-profile-block {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-card {
    padding: 18px;
    border-radius: 18px;
  }

  .account-form-footer,
  .account-inline-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .account-inline-actions-tight,
  .account-avatar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .account-auth-switch {
    flex-direction: column;
    align-items: stretch;
  }

  .account-quick-actions {
    grid-template-columns: 1fr;
  }

  .account-inline-actions .admin-btn,
  .account-form-footer .admin-btn,
  .account-quick-actions .admin-btn {
    width: 100%;
  }
}

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

.admin-card {
  border: 1px solid #dbe6f5;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.admin-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.admin-form {
  display: grid;
  gap: 8px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1px solid #d8e2ef;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: 0;
  border-color: #78a7e3;
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.12);
  background: #fff;
}

.admin-news-list,
.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.admin-item {
  border: 1px solid #dce7f5;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8fbff;
}

.admin-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.admin-item-title {
  margin: 0;
  font-weight: 800;
  font-size: 13px;
}

.admin-item-meta {
  margin: 2px 0 0;
  font-size: 11px;
  color: #64748b;
}

.admin-actions {
  display: inline-flex;
  gap: 6px;
}

.admin-btn {
  border: 1px solid #cfe0f6;
  background: #fff;
  color: #1e3a5f;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.admin-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16, 35, 63, 0.08);
}

.admin-btn.primary {
  border-color: #1672e5;
  background: linear-gradient(135deg, #1672e5 0%, #0a84ff 100%);
  color: #fff;
}

.admin-btn.danger {
  border-color: #ef9a9a;
  background: linear-gradient(135deg, #fff1f1 0%, #ffe6e6 100%);
  color: #b42318;
}

.admin-login-wrap {
  max-width: 460px;
  margin: 0 auto;
}

.contact-panel {
  padding: 18px;
}

.players-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 30px;
}

/* Coach Mode is a focused tablet workspace rather than a public content page. */
body:has(#coachPage:not(.hidden)) {
  overflow-x: hidden;
  background: #eef3f8;
}

body:has(#coachPage:not(.hidden)) .site-footer {
  display: none;
}

#coachPage:has(.coach-dashboard),
#coachPage:has(.coach-context-card) {
  width: 100%;
  max-width: none;
  padding: 0 16px 20px;
}

#coachPage:has(.coach-dashboard) > .coach-panel,
#coachPage:has(.coach-context-card) > .coach-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.live-menu-link {
  color: #d94841;
  text-decoration: none;
}

.live-games-page {
  min-height: 55vh;
}

.live-games-layout {
  width: min(100%, 1240px);
  max-width: none;
  padding: 0 16px 34px;
  display: block;
}

.live-games-panel {
  min-height: 360px;
}

.live-games-header {
  align-items: flex-start;
  padding: 2px 2px 0;
}

.live-games-kicker {
  margin: 0 0 4px;
  color: #d94841;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.live-games-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.live-game-card {
  display: block;
  padding: 18px;
  border: 1px solid #cfe0f4;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, #f4f8fd);
  color: var(--ink-0);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(23, 52, 87, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.live-game-card:hover,
.live-game-card:focus-visible {
  border-color: #1e90ff;
  box-shadow: 0 12px 28px rgba(30, 144, 255, .14);
  transform: translateY(-2px);
}

.live-game-card-top,
.live-game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.live-game-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #159957;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.live-game-pulse,
.live-games-empty-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #18a957;
  box-shadow: 0 0 0 4px rgba(24, 169, 87, .12);
}

.live-game-kind {
  color: #64748b;
  font-size: .72rem;
  font-weight: 800;
}

.live-game-matchup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 24px 0 20px;
}

.live-game-team strong,
.live-game-team span {
  display: block;
}

.live-game-team strong {
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.live-game-team span {
  margin-top: 3px;
  color: #718096;
  font-size: .78rem;
}

.live-game-team-away {
  text-align: right;
}

.live-game-vs {
  color: #94a3b8;
  font-size: .75rem;
  font-weight: 800;
}

.live-game-card-footer {
  border-top: 1px solid #e1eaf4;
  padding-top: 12px;
  color: #5d7089;
  font-size: .78rem;
}

.live-game-card-footer span:last-child {
  color: #0a66c2;
  font-weight: 800;
}

.live-games-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 72px 20px;
  border: 1px dashed #c7d8eb;
  border-radius: 14px;
  color: #344861;
  text-align: center;
}

.live-games-empty p {
  margin: 0;
  color: #718096;
  font-size: .9rem;
}

.players-tools {
  margin-bottom: 10px;
}

.players-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}

.teams-browser {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
}

.teams-tournament-list {
  display: grid;
  gap: 10px;
}

.teams-tournament-button.is-selected {
  border-color: #1e90ff;
  box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.12);
}

.teams-results-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.team-browser-card-shell {
  display: grid;
  gap: 10px;
  align-content: start;
}

.team-browser-card {
  border: 1px solid #d7e5f8;
  border-radius: 18px;
  background: #fff;
  padding: 18px 14px;
  display: grid;
  gap: 12px;
  justify-items: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.team-browser-card:hover {
  transform: translateY(-2px);
  border-color: #1e90ff;
  box-shadow: 0 12px 30px rgba(30, 64, 175, 0.08);
}

.team-browser-card-logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  border: 1px solid #d7e5f8;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #38598a;
  font-weight: 900;
  font-size: 1.4rem;
}

.team-browser-card-logo img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.team-browser-card-name {
  font-size: 1rem;
  font-weight: 800;
  color: #13203b;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  text-align: center;
}

.team-browser-card-actions,
.player-row-actions {
  display: flex;
  justify-content: flex-end;
}

.team-browser-card-actions .admin-btn,
.player-row-actions .admin-btn {
  width: 100%;
}

.player-row-shell {
  display: grid;
  gap: 8px;
}

.player-row-button {
  width: 100%;
  border: 1px solid #dbe6f5;
  background: #fff;
  border-radius: 10px;
  padding: 9px 10px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
}

.player-row-button:hover {
  border-color: #9dc4ff;
  background: #f7fbff;
}

.player-row-meta {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.player-row-info {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.player-row-meta-block {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}

.player-tournament-toggle {
  border: 0;
  background: transparent;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.player-tournament-toggle.expanded {
  color: #0a84ff;
}

.player-tournament-row {
  cursor: pointer;
}

.player-tournament-row:hover td {
  background: #f8fbff;
}

.player-tournament-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.player-tournament-indicator {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.player-tournament-expand-row td {
  background: #f8fbff;
}

.player-games-table th,
.player-games-table td {
  font-size: 13px;
}

.player-game-row {
  cursor: pointer;
}

.player-game-row:hover td {
  background: #f3f8ff;
}

.player-game-link {
  color: #0a84ff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.player-game-meta {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
}

.contact-form {
  display: grid;
  gap: 10px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  font-family: "Manrope", sans-serif;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(10, 132, 255, 0.22);
  border-color: #8fc2ff;
}

.news-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.news-grid::-webkit-scrollbar {
  height: 8px;
}

.news-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.news-carousel-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-archive-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.news-archive-head h2 {
  margin: 0;
}

.news-archive-panel {
  display: grid;
  gap: 14px;
}

.news-archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.news-archive-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-card {
  display: block;
  flex: 0 0 calc((100% - 24px) / 3);
  text-decoration: none;
  color: inherit;
  border: 1px solid #dbe6f5;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  scroll-snap-align: start;
}

.news-card-button {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  border-color: #9dc4ff;
}

.news-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f9ff 0%, #e8f0fb 100%);
}

.news-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-category {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.news-card-body {
  display: block;
  padding: 10px 12px 12px;
}

.news-card-title {
  display: block;
  margin: 0 0 6px;
  font-size: 0.98rem;
  line-height: 1.25;
  font-weight: 800;
  color: #0f172a;
}

.news-card-summary {
  display: block;
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-detail-panel {
  display: grid;
  gap: 16px;
}

.news-detail-hero {
  border-radius: 16px;
  overflow: hidden;
}

.news-detail-hero img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.news-detail-content {
  color: #1e293b;
  font-size: 1rem;
  line-height: 1.75;
}

.news-detail-content p:first-child {
  margin-top: 0;
}

.news-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

.news-detail-content iframe {
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: 14px;
}

.site-footer {
  margin-top: 22px;
  border-top: 1px solid #d7e3f2;
  background: linear-gradient(180deg, #f8fbff, #eef4fb);
}

.app-loading {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(248, 250, 252, 0.95);
  z-index: 200;
}

.app-loading.hidden {
  display: none;
}

.app-loading img {
  width: 120px;
  height: 120px;
  animation: appPulse 1.6s ease-in-out infinite;
}

@keyframes appPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }

  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.contact-modal-panel {
  width: min(640px, calc(100% - 24px));
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 26px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.site-footer-brand {
  margin: 0;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

.site-footer-brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-footer-logo {
  width: 56px;
  height: auto;
}

.site-footer-copy {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.site-footer-links {
  display: flex;
  gap: 12px;
}

.site-footer-links a {
  color: #0a4f9e;
  font-weight: 700;
  text-decoration: none;
}

.site-footer-links a:hover {
  text-decoration: underline;
}

.legal-panel {
  max-width: 920px;
  margin: 0 auto 24px;
}

.legal-content {
  display: grid;
  gap: 14px;
  color: var(--ink-1);
  line-height: 1.7;
}

.legal-content h3 {
  margin: 10px 0 0;
  color: var(--ink-0);
  font-size: 1rem;
}

.legal-content p,
.legal-content ul {
  margin: 0;
}

.legal-content ul {
  padding-left: 20px;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.panel h2 {
  margin: 0;
  font-size: 1.1rem;
}

.badge {
  padding: 5px 10px;
  background: #ebf5ff;
  color: #0553a3;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.active-tournaments-top {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
}

.active-top-card {
  border: 1px solid #b8d9ff;
  background: linear-gradient(140deg, #ecf5ff, #d7ebff);
  color: #0f2f57;
  border-radius: 12px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease;
  flex: 1;
  min-width: 0;
}

.active-top-card:hover {
  transform: translateY(-2px);
}

.active-top-card.selected {
  border-color: #ffc8b3;
  background: linear-gradient(140deg, #ff6128, #ff8f4f);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 170, 140, 0.45), 0 14px 30px rgba(255, 96, 40, 0.28);
}



.active-top-kicker {
  margin: 0;
  font-size: 11px;
  opacity: 0.9;
}

.active-top-name {
  margin: 6px 0 4px;
  font-weight: 800;
}

.active-top-meta {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
}

.tournaments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 600px;
  overflow: auto;
}

.completed-tools {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.completed-search-input {
  width: 100%;
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
}

.completed-search-input:focus {
  outline: 2px solid rgba(10, 132, 255, 0.22);
  border-color: #8fc2ff;
}

.tournament-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 12px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.tournament-card:hover {
  transform: translateY(-2px);
  border-color: #9fc7ff;
}

.tournament-card.is-active-tournament {
  border-color: #b8d9ff;
  background: linear-gradient(140deg, #ecf5ff, #d7ebff);
  color: #0f2f57;
}

.tournament-card.active {
  border-color: #ffc8b3;
  background: linear-gradient(140deg, #ff6128, #ff8f4f);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 170, 140, 0.45), 0 14px 30px rgba(255, 96, 40, 0.28);
}

.tournament-card.active .category,
.tournament-card.active .name,
.tournament-card.active .meta {
  color: #fff !important;
}

.tournament-card.active .live.inactive {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}



.tournament-card .category {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
}

.tournament-card .name {
  margin: 4px 0;
  font-size: 15px;
  font-weight: 800;
}

.tournament-card .meta {
  margin: 0;
  color: var(--ink-1);
  font-size: 12px;
}

.live {
  background: #e9faef;
  color: var(--ok);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.live.inactive {
  background: #f1f5f9;
  color: #334155;
}

.details-panel {
  padding: 18px;
}

.empty-state {
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-1);
}

.hidden {
  display: none;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.detail-category {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
}

.details-header h3 {
  margin: 4px 0;
  font-size: 1.5rem;
}

.detail-meta {
  margin: 0;
  color: var(--ink-1);
}

.status-chip {
  background: #fff0ea;
  color: #bf360c;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 14px;
  overflow: hidden;
}

.standings-card {
  grid-column: 1 / -1;
}

.card h4 {
  margin: -14px -14px 12px;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
  border-bottom: 1px solid #d7e6fb;
  letter-spacing: 0.2px;
}

.card h4::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0a84ff, #49a6ff);
}

.standings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.standings-split {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
}

.standings-split.hidden {
  display: none !important;
}

.standings-series-wrap {
  padding: 10px;
  border: 1px solid #dfe8f5;
  border-radius: 12px;
  background: #fbfdff;
}

.series-table-section+.series-table-section {
  margin-top: 12px;
}

.series-table-section h5 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: #334155;
}

.series-particular-table {
  width: 100%;
  border-collapse: collapse;
}

.series-particular-table th,
.series-particular-table td {
  text-align: center;
  padding: 8px;
  border-bottom: 1px solid #e8eef8;
}

.series-head-label {
  width: 42%;
  background: #4a8dc0;
}

.series-head-team {
  background: #4a8dc0;
}

.series-head-team .team-logo-xs {
  width: 28px;
  height: 28px;
}

.series-team-cell {
  text-align: left !important;
  color: #2f7db4;
  font-weight: 700;
}

.series-diagonal {
  background: #eef0f4;
}

.standings-mode-tabs {
  display: flex;
  gap: 8px;
  margin: -14px -14px 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f8fbff, #eef5ff);
  border-bottom: 1px solid #d7e6fb;
}

.standings-mode-tabs .planilla-tab {
  background: #ffffff;
  border-color: #cfe2ff;
  color: #334155;
  font-weight: 800;
}

.standings-mode-tabs .planilla-tab.active {
  background: linear-gradient(130deg, #0a84ff, #3ea0ff);
  border-color: #0a84ff;
  color: #fff;
}

.list-mode-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
}

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

.leaders-grid.hidden {
  display: none !important;
}

.leader-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.leader-card h5 {
  margin: 0;
  padding: 12px;
  border-left: 4px solid #f97316;
  background: #f8fafc;
  text-transform: uppercase;
  font-size: 1rem;
  color: #334155;
}

.leader-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.leader-card-title span {
  min-width: 0;
}

.leader-criteria-button {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.leader-criteria-button:hover,
.leader-criteria-button:focus-visible {
  border-color: #f97316;
  color: #c2410c;
  outline: none;
}

.leader-card table th,
.leader-card table td {
  font-size: 12px;
}

.leader-team {
  color: var(--ink-2);
  font-size: 11px;
}

.team-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.team-logo-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #dbe3ee;
  background: #fff;
}

.team-logo-xs {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #dbe3ee;
  background: #fff;
}

.leader-player-link {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: #f97316;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.leader-player-link:hover {
  text-decoration: underline;
}

.player-profile-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.player-profile-head {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.player-profile-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-icon-button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-2);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.share-icon-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.player-compare-toggle {
  min-width: 170px;
}

.player-back-button {
  min-width: 120px;
}

.player-profile-head h2 {
  margin: 6px 0 8px;
  font-size: clamp(2.6rem, 4vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.player-profile-summary {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  margin-bottom: 18px;
  border: 1px solid rgba(117, 154, 198, 0.22);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88) 44%),
    linear-gradient(135deg, rgba(232, 242, 255, 0.88), rgba(246, 250, 255, 0.98));
  box-shadow: 0 22px 50px rgba(37, 61, 99, 0.12);
}

.player-profile-summary-media {
  display: grid;
  place-items: center;
  align-self: center;
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
  padding: 34px;
  margin-inline: auto;
  border-radius: 40px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.98), rgba(231, 240, 252, 0.92));
  border: 1px solid rgba(138, 168, 207, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 30px rgba(73, 108, 154, 0.12);
}

.player-profile-photo,
.player-profile-photo-fallback {
  display: grid;
  place-items: center;
  width: min(100%, 280px);
  height: min(100%, 280px);
  aspect-ratio: 1 / 1;
  border-radius: 32px;
}

.player-profile-photo {
  display: block;
  object-fit: contain;
  border: 1px solid rgba(138, 168, 207, 0.24);
  background: #f7fbff;
  box-shadow: 0 18px 35px rgba(19, 34, 62, 0.12);
}

.player-profile-photo.hidden,
.player-profile-photo-fallback.hidden {
  display: none;
}

.player-profile-photo-fallback {
  display: grid;
  place-items: center;
  color: #3f5f84;
  font-size: 3rem;
  font-weight: 900;
  border: 1px solid #dbe6f5;
  background: #f7fbff;
}

.player-profile-summary-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  align-content: center;
}

.player-profile-summary-info p {
  margin: 0;
  color: #334155;
  font-size: 0.98rem;
}

@media (max-width: 900px) {
  .player-profile-summary {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .player-profile-summary-media {
    width: min(100%, 360px);
    padding: 28px;
  }

  .player-profile-photo,
  .player-profile-photo-fallback {
    width: min(100%, 230px);
    height: min(100%, 230px);
  }
}

@media (max-width: 720px) {
  .pbp-edit-shot-grid {
    grid-template-columns: 1fr;
  }

  .pbp-edit-shot-court-wrap {
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  .player-profile-head {
    align-items: flex-start;
    gap: 14px;
  }

  .player-profile-summary {
    padding: 18px;
    gap: 18px;
  }

  .player-profile-summary-media {
    width: min(100%, 300px);
    padding: 22px;
    border-radius: 28px;
  }

  .player-profile-photo,
  .player-profile-photo-fallback {
    width: min(100%, 200px);
    height: min(100%, 200px);
    border-radius: 24px;
  }

  .player-profile-head h2 {
    font-size: 2rem;
  }
}

.player-compare-panel {
  padding: 14px;
  margin-bottom: 12px;
}

.player-compare-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.player-compare-controls label {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.player-compare-controls input {
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
}

.player-compare-controls input:focus {
  outline: 2px solid rgba(10, 132, 255, 0.22);
  border-color: #8fc2ff;
}

.player-compare-add-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  margin-bottom: 8px;
}

.player-compare-add-item {
  width: 100%;
  border: 1px solid #dbe6f5;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 3px;
}

.player-compare-add-item:hover {
  border-color: #9dc4ff;
  background: #f7fbff;
}

.player-compare-add-name {
  font-weight: 800;
  color: #0f172a;
}

.player-compare-add-meta {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.player-compare-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.player-compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cfe2ff;
  background: #f0f7ff;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
  color: #1e3a5f;
}

.player-compare-chip button {
  border: 0;
  background: transparent;
  color: #1e3a5f;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
}

.player-compare-result .loading-widget {
  width: 100%;
  justify-content: center;
}

.player-compare-table th,
.player-compare-table td {
  text-align: center;
  font-size: 13px;
}

.player-compare-table th:first-child,
.player-compare-table td:first-child {
  text-align: left;
  font-weight: 800;
}

.player-compare-main-row {
  cursor: pointer;
}

.player-compare-main-row:hover td {
  background: #f6faff;
}

.player-compare-detail-row>td {
  background: #fbfdff;
}

.player-compare-tournaments-table th,
.player-compare-tournaments-table td {
  font-size: 12px;
}

.compare-player-tournament-row {
  cursor: pointer;
}

.compare-player-tournament-row:hover td {
  background: #f2f8ff;
}

.compare-win {
  color: #0a84ff;
  font-weight: 900;
}

.player-profile-card {
  padding: 16px;
}

.player-profile-card h3 {
  margin: 0;
}

.player-profile-legend {
  margin: 10px 2px 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.player-profile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}

.player-profile-view-tabs {
  display: inline-flex;
  gap: 8px;
}

.player-profile-view-tabs .planilla-tab {
  background: #fff;
  border-color: #cfe2ff;
  color: #334155;
}

.player-profile-view-tabs .planilla-tab.active {
  background: linear-gradient(130deg, #0a84ff, #3ea0ff);
  border-color: #0a84ff;
  color: #fff;
}

.player-group-row td {
  background: #f4f8ff;
  border-top: 1px solid #dbe6f5;
  border-bottom: 1px solid #dbe6f5;
  font-size: 12px;
  font-weight: 800;
  color: #3f5f84;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.day-pager {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.day-nav-button {
  border: 1px solid var(--line);
  background: #f8fbff;
  color: #334155;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.day-nav-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.day-nav-label {
  margin: 0;
  text-align: center;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.game-item {
  border: 1px solid #d9e5f4;
  border-radius: 10px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  background: linear-gradient(180deg, #ffffff, #f6faff);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.game-item>div {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.game-item-button {
  width: 100%;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-item-button:hover {
  transform: translateY(-2px);
  border-color: #95c1ff;
  box-shadow: 0 10px 20px rgba(10, 132, 255, 0.12);
}

.game-item-button:focus-visible {
  outline: 3px solid rgba(10, 132, 255, 0.25);
  outline-offset: 1px;
}

.teams {
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: left;
  line-height: 1.25;
  color: #10243f;
}

.list-game-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.list-game-status {
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.list-game-status.is-final {
  background: #eaf7ef;
  color: #116530;
}

.list-game-status.is-pending {
  background: #ebf5ff;
  color: #0b5aa9;
}

.list-game-tournament {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-game-series-meta {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  color: #64748b;
}

.list-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.list-team-row+.list-team-row {
  margin-top: 5px;
}

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

.game-team-inline span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 800;
}

.list-team-record {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid #d7e5f8;
  background: #f2f7ff;
  color: #4a6382;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

.list-team-score {
  min-width: 18px;
  text-align: right;
  font-size: 23px;
  line-height: 1;
  font-weight: 900;
  color: #0f172a;
}

.list-team-score.is-loser {
  color: #6b7c93;
}

.game-team-vs {
  margin: 0 8px;
  color: #5f7591;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.game-team-logo {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #cfe0f4;
  background: #fff;
}

.game-team-fallback {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #cfe0f4;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 900;
  color: #334155;
}

.info {
  margin: 6px 0 0;
  color: #58708c;
  font-size: 10px;
  text-align: left;
  font-weight: 700;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score {
  margin: 0;
  font-weight: 900;
  min-width: 86px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #102c52;
  color: #fff;
  text-align: center;
  letter-spacing: 0.3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  font-size: 11px;
  text-transform: uppercase;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid #edf1f7;
  font-size: 14px;
}

th {
  color: var(--ink-2);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.standings-section-row td {
  background: #eef5ff;
  color: #0f3f75;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.4px;
}

.standings-spacer-row td {
  border-bottom: 0;
  height: 8px;
  padding: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.58);
}

.modal-panel {
  position: relative;
  width: min(1280px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-weight: 800;
}

.modal-share-button {
  position: absolute;
  right: 50px;
  top: 10px;
}

.share-modal-panel {
  width: min(520px, calc(100% - 24px));
}

.share-modal-title {
  margin: 4px 0 6px;
  font-size: 1.4rem;
}

.share-apps-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.share-app-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.share-app-button svg {
  width: 22px;
  height: 22px;
  display: block;
}

.share-app-button.is-whatsapp {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

.share-app-button.is-telegram {
  background: #2aabee;
  border-color: #2aabee;
  color: #fff;
}

.share-app-button.is-facebook {
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
}

.share-app-button.is-x {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.share-app-button.is-email {
  background: #f97316;
  border-color: #f97316;
  color: #fff;
}

.share-app-button.is-copy,
.share-app-button.is-native {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.modal-hero {
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.modal-team-col {
  text-align: center;
}

.modal-team-col-away {
  text-align: center;
}

.modal-team-logo-wrap {
  min-height: 92px;
  display: grid;
  place-items: center;
}

.modal-team-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.modal-team-logo-fallback {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd9eb;
  border-radius: 18px;
  color: #0f172a;
  background: #eef4fc;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.modal-score-col {
  text-align: center;
}

.modal-tournament-label {
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #334155;
}

.modal-final-label {
  margin: 6px 0 0;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.modal-series-label {
  margin: 4px 0 0;
  color: #475569;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.score-label {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
}

.score-team {
  margin: 4px 0 0;
  font-weight: 800;
}

.modal-score {
  margin: 0;
  font-size: 3rem;
  font-weight: 800;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 1px;
}

.modal-stats-strip {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.pre-game-summary {
  display: grid;
  gap: 6px;
}

.pre-game-summary p {
  margin: 0;
  color: #334155;
  font-size: 13px;
}

.modal-stats-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.fiba-boxscore-layout {
  gap: 14px;
}

.fiba-scoreboard-wrap {
  background: #f8fbff;
  width: min(100%, 1000px);
  margin-inline: auto;
}

.modal-period-table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
}

.modal-period-table {
  width: 100%;
  border-collapse: collapse;
}

.modal-period-table th,
.modal-period-table td {
  border-bottom: 1px solid #e7edf7;
  padding: 8px 10px;
  text-align: center;
}

.modal-period-table th:first-child,
.modal-period-table td:first-child {
  text-align: left;
  min-width: 190px;
}

.modal-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.modal-card h4 {
  margin: 0 0 8px;
}

.modal-premium-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.premium-gate,
.premium-analysis-output,
.premium-analysis-controls,
.premium-analysis-result {
  display: grid;
  gap: 10px;
}

.premium-gate {
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.12), rgba(255, 255, 255, 0.03));
}

.premium-analysis-controls {
  margin-bottom: 12px;
}

.premium-analysis-output {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.premium-analysis-output p,
.premium-gate p {
  margin: 0;
}

.planilla-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.planilla-tab {
  border: 1px solid var(--line);
  background: #f8fbff;
  color: var(--ink-1);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;

}

.planilla-tab.active {
  border-color: var(--accent-2);
  background: #ebf5ff;
  color: #0553a3;
}

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

.boxscore-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.boxscore-mobile-table-wrap {
  display: none;
}

.boxscore-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
  --boxscore-cell-padding-y: 6px;
  --boxscore-cell-padding-x: 5px;
  --boxscore-cell-font-size: 11px;
  --boxscore-header-font-size: 10px;
  --boxscore-subheader-font-size: 11px;
}

.boxscore-table th,
.boxscore-table td {
  border-bottom: 1px solid #e6edf6;
  padding: var(--boxscore-cell-padding-y) var(--boxscore-cell-padding-x);
  text-align: left;
  font-size: var(--boxscore-cell-font-size);
  white-space: nowrap;
}

.boxscore-table th:not(:first-child):not(:nth-child(2)),
.boxscore-table td:not(:first-child):not(:nth-child(2)) {
  text-align: right;
}

.boxscore-table th {
  background: #f4f8ff;
  color: #4a5f7f;
  font-weight: 800;
}

.boxscore-table thead tr:first-child th {
  text-transform: uppercase;
  font-size: var(--boxscore-header-font-size);
  letter-spacing: 0.2px;
  text-align: right;
}

.boxscore-table thead tr:nth-child(2) th {
  font-size: var(--boxscore-subheader-font-size);
  text-align: right;
}

.boxscore-table td:nth-child(2) {
  font-weight: 700;
}

.game-boxscore-table {
  min-width: 100%;
}

.game-boxscore-mobile-table {
  table-layout: fixed;
}

.game-boxscore-mobile-table th,
.game-boxscore-mobile-table td {
  text-align: right;
}

.game-boxscore-mobile-table th:first-child,
.game-boxscore-mobile-table td:first-child,
.game-boxscore-mobile-table th:nth-child(2),
.game-boxscore-mobile-table td:nth-child(2) {
  text-align: left;
}

.game-boxscore-mobile-table td:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-boxscore-mobile-table td:nth-child(2) > * {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-boxscore-mobile-table col.game-mobile-col-number {
  width: 34px;
}

.game-boxscore-mobile-table col.game-mobile-col-player {
  width: auto;
}

.game-boxscore-mobile-table col.game-mobile-col-min,
.game-boxscore-mobile-table col.game-mobile-col-stat {
  width: 48px;
}

.game-boxscore-table th,
.game-boxscore-table td {
  padding: 5px 4px;
  font-size: 10.5px;
}

.game-boxscore-table thead tr:first-child th,
.game-boxscore-table thead tr:nth-child(2) th {
  font-size: 10px;
}

.team-series-stats-section .boxscore-table {
  min-width: 100%;
}

.team-series-stats-section .boxscore-table th,
.team-series-stats-section .boxscore-table td {
  padding: 5px 4px;
  font-size: 10.5px;
}

.team-series-stats-section .boxscore-table thead tr:first-child th,
.team-series-stats-section .boxscore-table thead tr:nth-child(2) th {
  font-size: 10px;
}

.game-boxscore-table th.game-number-col,
.game-boxscore-table th.game-player-name-col,
.game-boxscore-table td:nth-child(1),
.game-boxscore-table td:nth-child(2),
.team-series-stats-section .boxscore-table th.team-number-col,
.team-series-stats-section .boxscore-table th.team-player-name-col,
.team-series-stats-section .boxscore-table td.team-number-col,
.team-series-stats-section .boxscore-table td.team-player-name-col {
  text-align: left;
}

.game-boxscore-table td:nth-child(2),
.team-series-stats-section .boxscore-table td.team-player-name-col {
  overflow: visible;
  text-overflow: clip;
}

.game-boxscore-table td:nth-child(2) > *,
.team-series-stats-section .boxscore-table td.team-player-name-col > * {
  display: block;
  max-width: 100%;
}

.game-boxscore-table thead th.game-number-col,
.game-boxscore-table thead th.game-player-name-col,
.team-series-stats-section .boxscore-table thead th.team-number-col,
.team-series-stats-section .boxscore-table thead th.team-player-name-col {
  text-align: left;
}

.game-boxscore-table thead tr:first-child th[colspan],
.team-series-stats-section .boxscore-table thead tr:first-child th[colspan] {
  text-align: center;
}

.game-boxscore-table thead tr:first-child th[rowspan="2"]:not(.game-number-col):not(.game-player-name-col),
.team-series-stats-section .boxscore-table thead tr:first-child th:not(.team-number-col):not(.team-player-name-col),
.game-boxscore-table thead tr:nth-child(2) th,
.team-series-stats-section .boxscore-table thead tr:nth-child(2) th,
.game-boxscore-table .boxscore-total-row td:not(:first-child),
.team-series-stats-section .boxscore-table tfoot td:not(:first-child) {
  text-align: right;
}

.game-boxscore-table col.game-col-number {
  width: var(--game-number-col-width, 42px);
}

.game-boxscore-table col.game-col-player {
  width: var(--game-player-col-width, 180px);
}

.game-boxscore-table col.game-col-min {
  width: 64px;
}

.game-boxscore-table col.game-col-stat {
  width: calc((100% - var(--game-number-col-width, 42px) - var(--game-player-col-width, 180px) - 64px) / 20);
}

.team-series-stats-section .boxscore-table col.team-col-number {
  width: var(--team-number-col-width, 40px);
}

.team-series-stats-section .boxscore-table col.team-col-player {
  width: var(--team-player-col-width, 210px);
}

.team-series-stats-section .boxscore-table col.team-col-stat {
  width: calc((100% - var(--team-number-col-width, 40px) - var(--team-player-col-width, 210px)) / 11);
}

@media (max-width: 960px) {
  .boxscore-table {
    --boxscore-cell-padding-y: 4px;
    --boxscore-cell-padding-x: 3px;
    --boxscore-cell-font-size: 10px;
    --boxscore-header-font-size: 9px;
    --boxscore-subheader-font-size: 9.5px;
  }

  .boxscore-table-wrap {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .game-boxscore-table {
    min-width: calc(var(--game-number-col-width, 42px) + var(--game-player-col-width, 180px) + 64px + (20 * 44px));
  }

  .game-boxscore-table col.game-col-min,
  .game-boxscore-table col.game-col-stat {
    width: 44px;
  }

  .team-series-stats-section .boxscore-table {
    min-width: calc(var(--team-number-col-width, 40px) + var(--team-player-col-width, 210px) + (11 * 44px));
  }

  .team-series-stats-section .boxscore-table col.team-col-stat {
    width: 44px;
  }

  .game-boxscore-table thead th.game-number-col,
  .game-boxscore-table tbody td:nth-child(1),
  .team-series-stats-section .boxscore-table thead th.team-number-col,
  .team-series-stats-section .boxscore-table tbody td.team-number-col {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
  }

  .game-boxscore-table thead th.game-player-name-col,
  .game-boxscore-table tbody td:nth-child(2),
  .team-series-stats-section .boxscore-table thead th.team-player-name-col,
  .team-series-stats-section .boxscore-table tbody td.team-player-name-col {
    position: sticky;
    left: var(--game-number-col-width, 42px);
    z-index: 3;
    background: #fff;
    box-shadow: 1px 0 0 #e6edf6;
  }

  .game-boxscore-table td:nth-child(2),
  .team-series-stats-section .boxscore-table td.team-player-name-col {
    white-space: normal;
    line-height: 1.15;
    min-width: 0;
    overflow: hidden;
  }

  .game-boxscore-table td:nth-child(2) .leader-player-link,
  .team-series-stats-section .boxscore-table td.team-player-name-col .leader-player-link {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
  }

  .game-boxscore-table td:nth-child(2) > *:not(.leader-player-link),
  .team-series-stats-section .boxscore-table td.team-player-name-col > *:not(.leader-player-link) {
    white-space: normal;
    word-break: break-word;
    overflow: hidden;
  }

  .game-boxscore-table td:nth-child(2),
  .team-series-stats-section .boxscore-table td.team-player-name-col {
    max-width: var(--game-player-col-width, 180px);
  }

  .team-series-stats-section .boxscore-table td.team-player-name-col {
    max-width: var(--team-player-col-width, 210px);
  }

  .team-series-stats-section .boxscore-table thead th.team-player-name-col,
  .team-series-stats-section .boxscore-table tbody td.team-player-name-col {
    left: var(--team-number-col-width, 40px);
  }

  .game-boxscore-table thead th.game-number-col,
  .game-boxscore-table thead th.game-player-name-col,
  .team-series-stats-section .boxscore-table thead th.team-number-col,
  .team-series-stats-section .boxscore-table thead th.team-player-name-col {
    background: #f4f8ff;
    z-index: 4;
  }
}

@media (max-width: 600px) {
  .modal-panel {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    padding: 10px;
    border-radius: 14px;
  }

  .modal-hero {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    padding: 46px 8px 12px;
  }

  .modal-team-logo-wrap {
    min-height: 0;
    height: 48px;
  }

  .modal-team-logo {
    width: 42px;
    height: 42px;
  }

  .modal-team-logo-fallback {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 0.85rem;
  }

  .score-label {
    font-size: 10px;
  }

  .score-team {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .modal-score-col {
    min-width: 92px;
  }

  .modal-tournament-label {
    margin-bottom: 3px;
    font-size: 11px;
    white-space: nowrap;
  }

  .modal-score {
    font-size: 2.2rem;
    line-height: 0.95;
  }

  .modal-final-label,
  .modal-series-label {
    font-size: 9px;
  }

  .modal-stats-strip {
    padding: 8px;
    border-radius: 12px;
  }

  .fiba-scoreboard-wrap {
    overflow-x: auto;
  }

  .modal-period-table {
    min-width: 360px;
  }

  .modal-period-table th,
  .modal-period-table td {
    padding: 7px 6px;
    font-size: 11px;
  }

  .boxscore-summary-section {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
  }

  .boxscore-summary-table-wrap {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fbff;
  }

  .boxscore-summary-table {
    min-width: 0;
    table-layout: fixed;
  }

  .boxscore-summary-table th,
  .boxscore-summary-table td {
    border: 1px solid #dce6f2;
    padding: 8px 6px;
    font-size: 11px;
    line-height: 1.15;
  }

  .boxscore-summary-table thead th {
    background: #eef6ff;
    color: #17243a;
    font-size: 10px;
  }

  .boxscore-summary-table thead th:first-child {
    width: 52%;
  }

  .boxscore-summary-table thead th:not(:first-child) {
    width: 24%;
  }

  .boxscore-summary-table tbody th {
    color: #526275;
    font-size: 10px;
    font-weight: 800;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .boxscore-summary-table tbody td {
    color: #17243a;
    font-size: 12px;
  }

  .boxscore-table-wrap {
    display: none;
  }

  .boxscore-mobile-table-wrap {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
  }

  .game-boxscore-mobile-table {
    min-width: calc(var(--game-number-col-width, 42px) + var(--game-player-col-width, 180px) + 64px + (20 * 44px));
    table-layout: fixed;
    --boxscore-cell-padding-y: 7px;
    --boxscore-cell-padding-x: 5px;
    --boxscore-cell-font-size: 12px;
    --boxscore-header-font-size: 10px;
  }

  .game-boxscore-mobile-table col.game-col-min,
  .game-boxscore-mobile-table col.game-col-stat {
    width: 44px;
  }

  .game-boxscore-mobile-table thead th.game-number-col,
  .game-boxscore-mobile-table tbody td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
  }

  .game-boxscore-mobile-table thead th.game-player-name-col,
  .game-boxscore-mobile-table tbody td:nth-child(2) {
    position: sticky;
    left: var(--game-number-col-width, 42px);
    z-index: 3;
    background: #fff;
    box-shadow: 1px 0 0 #e6edf6;
  }

  .game-boxscore-mobile-table th,
  .game-boxscore-mobile-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .game-boxscore-mobile-table td:nth-child(2) {
    font-weight: 800;
  }
}

.team-player-number-inline {
  color: #7b8ca6;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
}

.team-profile-sort-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 0;
  width: 100%;
  text-align: inherit;
  cursor: pointer;
}

@media (max-width: 640px) {
  .boxscore-table {
    --boxscore-cell-font-size: 9.5px;
    --boxscore-header-font-size: 8.5px;
    --boxscore-subheader-font-size: 9px;
  }
}

.boxscore-team-section+.boxscore-team-section {
  margin-top: 16px;
}

.boxscore-summary-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
  max-width: 1120px;
}

.boxscore-summary-table-wrap {
  overflow: auto;
}

.boxscore-summary-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 100%;
  table-layout: fixed;
  background: #fff;
  font-family: "Manrope", sans-serif;
}

.boxscore-summary-table th,
.boxscore-summary-table td {
  border: 1px solid #e6edf6;
  padding: 5px 8px;
  font-size: 11px;
  line-height: 1.05;
}

.boxscore-summary-table thead th {
  background: #f4f8ff;
  font-weight: 900;
  text-align: center;
  color: #4a5f7f;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.boxscore-summary-table tbody th {
  font-weight: 500;
  text-align: center;
  color: #526275;
  font-size: 11px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.boxscore-summary-table tbody td {
  text-align: center;
  font-weight: 700;
  color: #111827;
  font-size: 11px;
  white-space: nowrap;
}

.boxscore-summary-table th:first-child {
  width: 58%;
}

.boxscore-summary-table th:not(:first-child),
.boxscore-summary-table td:not(:first-child) {
  width: 21%;
}

.boxscore-team-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
}

.boxscore-table td:nth-child(14),
.boxscore-table td:nth-child(15),
.boxscore-table td:nth-child(22),
.boxscore-table td:nth-child(23),
.boxscore-table th:nth-child(14),
.boxscore-table th:nth-child(15),
.boxscore-table th:nth-child(22),
.boxscore-table th:nth-child(23) {
  font-weight: 800;
  color: #0f172a;
}

.boxscore-total-row td {
  background: #f9fbff;
  font-weight: 800;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "news"
      "details"
      "list"
      "standings";
  }

  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-row {
    flex-wrap: wrap;
  }

  .header-carousel {
    width: 100%;
    min-width: 0;
    margin-left: 0;
    padding-left: 0;
  }

  .header-carousel-head {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .header-main-menu {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .refresh-button {
    width: 100%;
  }

  /* Removed grid override to keep single line */
}

@media (max-width: 720px) {
  .details-grid {
    grid-template-columns: 1fr;
  }

  .news-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .news-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .brand-row {
    flex-direction: column;
    align-items: stretch;
  }

  .active-tournaments-top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex-wrap: wrap;
  }

  .active-top-card {
    min-width: 0;
  }

  .site-header {
    padding-top: 20px;
  }

  .brand-logo {
    width: 150px;
    max-width: 100%;
  }

  .site-header h1 {
    white-space: normal;
  }

  .header-main-menu {
    gap: 6px;
  }

  .header-carousel {
    width: 100%;
    max-width: 100%;
  }

  .header-carousel-head {
    justify-content: space-between;
    align-items: flex-start;
  }

  .header-games-track {
    grid-auto-columns: max-content;
    width: 100%;
    max-width: 100%;
  }

  /* Removed grid override to keep single line */

  .leaders-grid {
    grid-template-columns: 1fr;
  }

  .standings-split {
    grid-template-columns: 1fr;
  }

  .news-carousel-controls {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .news-archive-head {
    flex-direction: column;
  }

  .news-archive-list {
    grid-template-columns: 1fr;
  }

  .game-item {
    grid-template-columns: 1fr;
  }

  .player-profile-head {
    flex-direction: column;
    align-items: stretch;
  }

  .player-profile-actions {
    margin-left: 0;
    justify-content: flex-end;
  }

  .player-profile-summary {
    grid-template-columns: 1fr;
  }

  .player-profile-summary-info {
    grid-template-columns: 1fr;
  }

  .player-compare-controls {
    grid-template-columns: 1fr;
  }

  .player-profile-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .share-apps-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-hero {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
  }

  .modal-stats-layout {
    grid-template-columns: 1fr;
  }

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

  .planilla-tabs {
    flex-wrap: wrap;
  }

}

@media (max-width: 520px) {
  .boxscore-summary-section {
    grid-template-columns: 1fr;
  }

  .active-tournaments-top {
    grid-template-columns: 1fr;
  }
}

.team-page-link,
.team-profile-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.team-page-link:hover,
.team-profile-link-btn:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.playbyplay-page {
  width: 100%;
  max-width: var(--layout-max, 1280px);
  margin: 16px auto;
  padding: 16px 20px 24px;
  font-family: "Barlow Condensed", "Oswald", "Segoe UI", sans-serif;
}

.playbyplay-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.playbyplay-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 20px;
  box-sizing: border-box;
}

.playbyplay-control-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 240px;
  margin: 0;
}

.playbyplay-control-row select {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-weight: 700;
}

.playbyplay-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.playbyplay-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.playbyplay-detail-meta-wrap {
  margin-left: auto;
  text-align: right;
  min-width: 0;
}

.playbyplay-detail-title-hidden {
  display: none;
}

.playbyplay-detail-head .detail-meta {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.2;
  color: #64748b;
  white-space: nowrap;
}

.pbp-settings-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 16px;
}

.playbyplay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 10px;
  margin-top: 8px;
}

.playbyplay-matches h3,
.playbyplay-detail h3 {
  margin: 0 0 12px;
}

.playbyplay-matches {
  padding: 16px 18px 18px;
  box-sizing: border-box;
}

.playbyplay-detail {
  grid-column: 1 / -1;
  width: 100%;
  padding: 14px 14px 16px;
  box-sizing: border-box;
}

.playbyplay-matches.full-width {
  grid-column: 1 / -1;
}

.playbyplay-match-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.playbyplay-match-grid-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.playbyplay-match-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.playbyplay-match-searchbar,
.playbyplay-match-toolbar-actions,
.playbyplay-pagination,
.playbyplay-pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.playbyplay-match-searchbar {
  flex: 1 1 620px;
}

.playbyplay-match-toolbar-actions {
  justify-content: flex-end;
  flex: 0 1 auto;
}

.playbyplay-grid-search {
  min-width: min(360px, 100%);
  flex: 1 1 360px;
  border: 1px solid #d7e5f8;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: #0f172a;
  background: #fff;
}

.playbyplay-date-filter {
  display: grid;
  gap: 4px;
  min-width: 150px;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 800;
}

.playbyplay-date-filter input {
  min-height: 38px;
  border: 1px solid #d7e5f8;
  border-radius: 10px;
  padding: 8px 10px;
  color: #0f172a;
  font: inherit;
  background: #fff;
}

.ghost-button.compact {
  min-height: 34px;
  border: 1px solid #cfe0f5;
  border-radius: 999px;
  padding: 7px 12px;
  background: #f8fbff;
  color: #1e3a5f;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.ghost-button.compact:hover:not(:disabled),
.ghost-button.compact:focus-visible {
  border-color: #1d7ff0;
  color: #0b5aa9;
  outline: none;
}

.ghost-button.compact:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.playbyplay-grid-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
}

.playbyplay-match-grid-wrap {
  overflow: auto;
  border: 1px solid #d7e5f8;
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px 10px;
  box-sizing: border-box;
}

.playbyplay-match-grid-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.playbyplay-match-grid-table th,
.playbyplay-match-grid-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e6eef8;
  text-align: left;
  white-space: nowrap;
}

.playbyplay-match-grid-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbff;
}

.playbyplay-grid-sort {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font: inherit;
  font-weight: 800;
  color: #1e3a5f;
  cursor: pointer;
}

.playbyplay-grid-sort.active {
  color: #0b5aa9;
}

.playbyplay-match-filter-row th {
  background: #fff;
}

.playbyplay-grid-filter {
  width: 100%;
  min-width: 110px;
  border: 1px solid #d7e5f8;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.85rem;
  color: #0f172a;
  background: #fff;
}

.playbyplay-match-row {
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.playbyplay-match-row:hover,
.playbyplay-match-row:focus-visible {
  background: #f8fbff;
  outline: none;
}

.playbyplay-match-row.active {
  background: rgba(11, 90, 169, 0.08);
}

.playbyplay-match-row.is-unavailable {
  cursor: not-allowed;
  opacity: 0.62;
}

.playbyplay-match-empty {
  text-align: center !important;
  color: #64748b;
  padding: 18px 12px !important;
}

.playbyplay-pagination {
  justify-content: space-between;
  padding: 2px 2px 0;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 700;
}

.playbyplay-pagination-controls strong {
  color: #334155;
  font-size: 0.8rem;
}

.playbyplay-detail-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1400px;
  margin: 0 auto;
}

.playbyplay-rosters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.playbyplay-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.playbyplay-roster-head h4 {
  margin: 0;
  flex: 1 1 auto;
}

.pbp-starters-count {
  border: 1px solid #d7e5f8;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f8fbff;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.pbp-starters-count.complete {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.playbyplay-roster-list {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.playbyplay-roster-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pbp-player-request-panel {
  grid-column: 1 / -1;
  border: 1px solid #d7e5f8;
  border-radius: 10px;
  background: #f8fbff;
  padding: 12px;
}

.pbp-player-request-form {
  display: grid;
  gap: 12px;
}

.pbp-player-request-title,
.pbp-player-request-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pbp-player-request-close {
  border: 1px solid #d7e5f8;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.pbp-player-request-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pbp-player-request-form label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 900;
}

.pbp-player-request-form input,
.pbp-player-request-form textarea {
  width: 100%;
  border: 1px solid #d7e5f8;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-weight: 700;
}

.pbp-player-request-notes,
.pbp-player-request-message {
  grid-column: 1 / -1;
}

.pbp-player-request-message {
  color: #475569;
  font-size: 0.84rem;
  font-weight: 800;
}

.playbyplay-roster-row {
  display: grid;
  grid-template-columns: 28px 64px 40px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.pbp-roster-line-number {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 8px;
  background: #eef5ff;
  color: #1e3a5f;
  font-size: 0.8rem;
  font-weight: 900;
}

.playbyplay-roster-row input,
.playbyplay-roster-row select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d7e5f8;
  font-weight: 700;
}

.pbp-player-name {
  width: 100%;
  min-width: 260px;
}

.pbp-player-lookup {
  position: relative;
  min-width: 260px;
}

.pbp-player-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #d7e5f8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  padding: 6px;
}

.pbp-player-suggestion {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.pbp-player-suggestion:hover,
.pbp-player-suggestion:focus-visible {
  background: #eef5ff;
  outline: none;
}

.pbp-player-suggestion-name {
  color: #111827;
  font-size: 0.88rem;
  font-weight: 900;
}

.pbp-player-suggestion-meta {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
}

.pbp-player-suggestion-id {
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
}

.pbp-starter-toggle {
  display: grid;
  place-items: center;
  cursor: pointer;
}

.playbyplay-roster-remove {
  border: none;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 800;
}

.playbyplay-event-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.playbyplay-event-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}

.playbyplay-event-form select,
.playbyplay-event-form input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d7e5f8;
  font-weight: 700;
}

.playbyplay-event-note {
  grid-column: span 2;
}

.playbyplay-event-log {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 6px;
  max-height: var(--pbp-log-max-height, 520px);
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.playbyplay-court {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.court-surface {
  position: relative;
  width: 100%;
  max-width: 820px;
  aspect-ratio: 94 / 50;
  border-radius: 12px;
  border: 1px solid #d7e5f8;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.4) 49.5%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0.4) 50.5%),
    repeating-linear-gradient(90deg, #f2c89b 0, #f2c89b 22px, #e8b989 22px, #e8b989 44px);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
  cursor: crosshair;
}

.court-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.court-marker {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0b5aa9;
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 10px rgba(11, 90, 169, 0.35);
}

.playbyplay-event-item {
  border: 1px solid #9ca3af;
  border-radius: 2px;
  padding: 0;
  display: grid;
  gap: 0;
  background: #f5f5f5;
}

.playbyplay-event-item strong {
  font-size: 12px;
}

.pbp-actions-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 300px);
  gap: 12px;
  align-items: stretch;
}

.pbp-actions-left,
.pbp-actions-right {
  background: #f4f6f8;
  border: 1px solid #d6dde8;
  border-radius: 12px;
  padding: 12px;
  min-height: 100%;
}

.pbp-actions-right {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

.pbp-actions-center {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.pbp-actions-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pbp-actions-title h4 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.4px;
}

.pbp-actions-status {
  background: #0f172a;
  color: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: 0.6px;
}

.pbp-event-form-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pbp-event-form-compact label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pbp-event-form-compact select,
.pbp-event-form-compact input {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #cfd8e3;
  padding: 8px 10px;
  font-weight: 700;
}

.pbp-primary-action {
  grid-column: span 2;
  background: #0f172a;
  color: #fff;
  border: none;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.pbp-scoreboard {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  gap: 10px;
  width: 100%;
  align-items: stretch;
}

.pbp-scorebox {
  background: #fff;
  border: 1px solid #d7e5f8;
  border-radius: 10px;
  padding: 14px 12px;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 110px;
}

.pbp-scorebox-wide {
  background: #101827;
  color: #fff;
  border-radius: 10px;
  padding: 10px;
  width: 250px;
  justify-self: center;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  min-height: 110px;
  height: 100%;
}

.pbp-score-team-btn {
  width: auto;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-decoration: none !important;
}

.pbp-scorebox.is-clickable {
  cursor: pointer;
}

.pbp-score-team-btn:hover {
  opacity: 1;
  transform: none;
  text-decoration: none !important;
}

.pbp-scorebox.is-clickable:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 6px 18px rgba(15, 23, 42, 0.08);
}

.pbp-score-team-media {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid #d7e5f8;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  flex: 0 0 auto;
}

.pbp-score-team-logo,
.pbp-score-team-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.pbp-score-team-logo {
  object-fit: cover;
}

.pbp-score-team-fallback {
  display: grid;
  place-items: center;
  background: #1f3b64;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.pbp-score-team-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #0f172a;
  max-width: 100%;
  font-size: 1.1rem;
  line-height: 1.05;
  font-weight: 500;
  text-transform: uppercase;
}

.pbp-score-value {
  margin: 0;
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  flex: 0 0 auto;
  color: #0f172a;
}

.pbp-scorebox-home .pbp-score-value {
  order: 2;
}

.pbp-scorebox-home .pbp-score-team-btn {
  order: 1;
}

.pbp-scorebox-away .pbp-score-team-btn {
  order: 2;
  align-items: flex-end;
}

.pbp-scorebox-away .pbp-score-value {
  order: 1;
}

.pbp-scorebox-away .pbp-score-team-name {
  text-align: right;
}

.pbp-clock-top {
  background: #1f2937;
  color: #fff;
  padding: 4px 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 6px;
  text-align: center;
}

.pbp-clock-main {
  display: grid;
  grid-template-columns: 26px 1fr 26px;
  gap: 6px;
  align-items: center;
  justify-items: center;
}

.pbp-clock-stepper {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
}

.pbp-clock-value {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
}

.pbp-clock-toggle {
  background: #dc2626;
  border: none;
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}


.pbp-clock-shortcut {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  opacity: 0.85;
}

.pbp-clock-arrow {
  background: #1f2937;
  color: #fff;
  border: 1px solid #374151;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 900;
}

.pbp-court-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-top: 10px;
}

.pbp-log-title {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
}

.pbp-log-all {
  border: 1px solid #c8d6ee;
  background: #f5f7fb;
  color: #1f3b66;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  max-width: 100%;
}

.pbp-event-group.is-clickable {
  cursor: pointer;
}

.pbp-log-all:hover {
  background: #e9f0fb;
}

.pbp-log-all.pbp-icon-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 12px;
}

.pbp-log-all.pbp-icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.pbp-log-all.pbp-icon-button:hover {
  border-color: #7da5df;
  color: #123b70;
  transform: translateY(-1px);
}

.pbp-touch-mode-toggle.is-active { background: #dbeafe; border-color: #3b82f6; color: #1d4ed8; }
.pbp-touch-mode { user-select: none; -webkit-user-select: none; }
.pbp-touch-mode .pbp-side-btn,
.pbp-touch-mode .pbp-side-action { min-height: 56px; padding: 14px 8px; font-size: 14px; touch-action: manipulation; }
.pbp-touch-mode .pbp-side-player,
.pbp-touch-mode .pbp-player-btn { min-height: 58px; font-size: 16px; touch-action: manipulation; }
.pbp-touch-mode .pbp-clock-arrow { width: 42px; height: 42px; font-size: 18px; touch-action: manipulation; }
.pbp-touch-mode .pbp-clock-toggle,
.pbp-touch-mode .pbp-court-secondary-action { min-height: 48px; padding: 12px 16px; font-size: 13px; touch-action: manipulation; }
.pbp-touch-mode .pbp-court-board,
.pbp-touch-mode .pbp-side-actions,
.pbp-touch-mode .pbp-side-panel { gap: 10px; }
@media (pointer: coarse) and (min-width: 700px) {
  .pbp-touch-mode .pbp-actions-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 360px); }
  .pbp-touch-mode .pbp-log-all { min-height: 42px; padding: 8px 12px; font-size: 12px; }
  .pbp-touch-mode .pbp-log-all.pbp-icon-button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; }
}

.pbp-all-modal-panel {
  width: min(860px, calc(100% - 24px));
  height: min(82vh, 820px);
  max-height: min(82vh, 820px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pbp-all-modal-head {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 22px;
  align-items: flex-end;
  padding-right: 48px;
}

.pbp-all-modal-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  white-space: nowrap;
}

.pbp-all-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: end;
  justify-content: flex-end;
  min-width: 0;
}

.pbp-all-filters label {
  display: grid;
  gap: 4px;
  min-width: 150px;
  color: #526275;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.pbp-all-filters label:nth-child(1) { min-width: 132px; }
.pbp-all-filters label:nth-child(2) { min-width: 176px; }
.pbp-all-filters label:nth-child(3) { min-width: 190px; }

.pbp-all-filters select {
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 30px 6px 10px;
}

.pbp-redflag-filter {
  display: inline-grid;
  place-items: center;
  align-items: center;
  width: 42px;
  min-width: 42px;
  min-height: 34px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.pbp-redflag-filter .pbp-event-redflag-icon {
  position: relative;
  inset: auto;
  display: block;
  width: 18px;
  height: 22px;
  flex: 0 0 18px;
  pointer-events: none;
}

.pbp-redflag-filter .pbp-event-redflag-icon::before {
  left: 4px;
  top: 3px;
}

.pbp-redflag-filter .pbp-event-redflag-icon::after {
  left: 6px;
  top: 3px;
}

.pbp-redflag-filter[aria-pressed="true"] {
  border-color: #dc2626;
  background: #fef2f2;
  color: #b91c1c;
}

.pbp-redflag-filter[aria-pressed="true"] .pbp-event-redflag-icon {
  background: #dc2626;
}

.pbp-substitution-modal-panel {
  width: min(1180px, calc(100% - 20px));
  height: auto;
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(12px, 1.8vw, 20px);
}

.pbp-substitution-modal-panel .modal-header {
  flex: 0 0 auto;
  padding-right: 46px;
}

.pbp-substitution-modal-panel .modal-header h3 {
  margin-bottom: 4px;
}

.pbp-substitution-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid #d6dde8;
  border-radius: 16px;
  overflow: auto;
  align-items: start;
  background: #edf2f8;
  padding: 10px;
  max-height: min(68vh, 650px);
  max-height: min(68dvh, 650px);
  overscroll-behavior: contain;
}

.pbp-substitution-team-column {
  background: #f8fafc;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  padding: clamp(10px, 1.4vw, 14px);
  display: grid;
  gap: 10px;
  align-content: start;
  align-items: start;
  min-height: 0;
}

.pbp-substitution-team-column:last-child {
  border-right: 1px solid #dbe4ef;
}

.pbp-substitution-team-head h4 {
  margin: 0;
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 900;
  color: #12223b;
  text-transform: uppercase;
  text-align: center;
}

.pbp-substitution-team-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.pbp-substitution-multi-btn {
  width: auto;
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.pbp-substitution-section {
  display: grid;
  gap: 6px;
  align-content: start;
  width: 100%;
}

.pbp-substitution-section-label {
  margin: 0;
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 900;
  color: #1e293b;
}

.pbp-substitution-oncourt {
  display: grid;
  grid-template-columns: repeat(5, minmax(38px, 1fr));
  gap: 6px;
  align-items: start;
  min-height: 0;
}

.pbp-substitution-outgoing,
.pbp-substitution-bench {
  display: grid;
  grid-template-columns: repeat(5, minmax(42px, 1fr));
  gap: 6px;
  align-items: start;
  align-content: start;
  min-height: 46px;
}

.pbp-substitution-bench {
  grid-template-columns: repeat(var(--pbp-substitution-bench-columns, 5), minmax(42px, 1fr));
  max-height: min(190px, 30dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.pbp-substitution-tile {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: linear-gradient(180deg, #e2e8f0, #cbd5e1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  text-align: center;
  width: 100%;
  aspect-ratio: 1 / 0.82;
  max-width: none;
  justify-self: stretch;
  margin: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.pbp-substitution-tile span {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 900;
  line-height: 1;
  color: #0f172a;
}

.pbp-substitution-tile.is-empty {
  opacity: 0.4;
}

.pbp-substitution-tile.is-changed,
.pbp-substitution-tile.is-active {
  border-color: #f97316;
  background: linear-gradient(180deg, #fb923c, #f97316);
}

.pbp-substitution-tile.is-changed span,
.pbp-substitution-tile.is-active span {
  color: #fff;
}

.pbp-substitution-tile.is-bench {
  background: linear-gradient(180deg, #d3d9e0, #b8c0ca);
}

.pbp-substitution-tile.is-outgoing {
  background: linear-gradient(180deg, #cbd5e1, #aeb7c4);
}

.pbp-substitution-tile.is-outgoing span {
  color: #111827;
}

.pbp-substitution-footer-note {
  flex: 0 0 auto;
  margin: 10px 0 0;
  text-align: center;
  font-size: clamp(13px, 1.5vw, 18px);
  line-height: 1.3;
}

.pbp-substitution-modal-panel .pbp-edit-actions {
  flex: 0 0 auto;
  padding-top: 8px;
  background: #fff;
  justify-content: center;
}

@media (max-width: 780px) {
  .pbp-all-modal-head {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .pbp-all-filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pbp-substitution-layout {
    grid-template-columns: 1fr;
    max-height: min(66vh, 620px);
    max-height: min(66dvh, 620px);
  }

  .pbp-substitution-team-column {
    border-right: 1px solid #dbe4ef;
  }

  .pbp-substitution-oncourt {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .pbp-substitution-outgoing,
  .pbp-substitution-bench {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .pbp-substitution-modal-panel {
    width: calc(100% - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 14px;
  }

  .pbp-substitution-modal-panel .modal-header h3 {
    font-size: 24px;
  }

  .pbp-substitution-modal-panel .detail-meta {
    font-size: 14px;
  }

  .pbp-substitution-layout {
    padding: 8px;
    gap: 8px;
  }

  .pbp-substitution-team-head {
    gap: 8px;
  }

  .pbp-substitution-multi-btn {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .pbp-substitution-oncourt {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .pbp-substitution-outgoing,
  .pbp-substitution-bench {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-height: 760px) {
  .pbp-substitution-modal-panel {
    padding: 12px;
  }

  .pbp-substitution-layout {
    margin-top: 6px;
    max-height: min(64vh, 560px);
    max-height: min(64dvh, 560px);
  }

  .pbp-substitution-team-column {
    gap: 7px;
    padding: 9px;
  }

  .pbp-substitution-team-head {
    gap: 8px;
  }

  .pbp-substitution-section {
    gap: 5px;
  }

  .pbp-substitution-outgoing,
  .pbp-substitution-bench {
    min-height: 42px;
  }

  .pbp-substitution-tile {
    min-height: 34px;
  }

  .pbp-substitution-footer-note {
    margin-top: 6px;
  }
}

.pbp-all-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 10px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 6px;
}

.pbp-all-events-summary {
  flex: 0 0 auto;
  margin-top: 10px;
  padding: 10px 2px 0;
  border-top: 1px solid #d6dde8;
  color: #526275;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.pbp-all-period {
  background: #f7f9fc;
  border: 1px solid #d6dde8;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.pbp-all-period h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #12223b;
}

.pbp-court-board {
  width: 100%;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 180px;
  gap: 6px;
  align-items: start;
}

.pbp-side-panel {
  background: #f3f5f7;
  border: 1px solid #d6dde8;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.pbp-side-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.pbp-side-btn {
  background: #e5e7eb;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 0;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.4px;
}

.pbp-side-stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: stretch;
  width: 100%;
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #e5e7eb;
}

.pbp-foul-stat {
  grid-template-rows: minmax(0, 1fr) auto;
  background: #eef2f7;
  border-color: #c4d0df;
}

.pbp-foul-stat .pbp-side-stat-label {
  font-size: 9px;
  letter-spacing: 0.25px;
  white-space: nowrap;
}

.pbp-foul-stat .pbp-side-left-stat-value,
.pbp-foul-stat .pbp-side-right-stat-value {
  min-width: 34px;
  font-size: 14px;
  font-weight: 900;
  color: #17243a;
}

.pbp-side-bonus {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 15px;
  border-radius: 4px;
  background: #dcfce7;
  color: #166534;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.pbp-side-stat-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 900;
  color: #111827;
  letter-spacing: 0.4px;
}

.pbp-side-right-stat-value {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-right: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}

.pbp-side-left-stat-value {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-left: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 900;
  color: #334155;
}

.pbp-side-btn.is-active,
.pbp-side-action.is-active,
.pbp-player-btn.is-active,
.pbp-side-player.is-active {
  background: #1d4ed8;
  color: #fff;
  border-color: #1e40af;
}

.pbp-side-players {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #c0c5cd;
}

.pbp-side-player {
  background: #d9dce1;
  border: 1px solid #c0c5cd;
  border-radius: 0;
  padding: 12px 0;
  font-weight: 800;
  min-height: 44px;
}

.pbp-side-player.is-empty {
  color: transparent;
}

.pbp-side-player.is-bench,
.pbp-side-player.is-coach {
  background: #cfd3d8;
  font-size: 11px;
  letter-spacing: 0.4px;
  grid-column: 1 / -1;
}


.pbp-side-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pbp-side-right .pbp-side-body {
  grid-template-areas: "actions players";
}

.pbp-side-right .pbp-side-actions {
  grid-area: actions;
}

.pbp-side-right .pbp-side-players {
  grid-area: players;
}

.pbp-side-actions {
  display: grid;
  gap: 8px;
}

.pbp-side-action {
  background: #cfd3d8;
  border: 1px solid #bcc2ca;
  border-radius: 8px;
  padding: 14px 0;
  font-weight: 900;
  letter-spacing: 0.4px;
  font-size: 12px;
}

.pbp-side-action:disabled,
.pbp-side-btn:disabled,
.pbp-side-player:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.2);
  box-shadow: none;
}

@media (max-width: 1100px) {
  .pbp-court-board {
    grid-template-columns: 1fr;
  }
}

.pbp-court-players {
  width: 100%;
  max-width: 820px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.pbp-court-side {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.pbp-court-side-right {
  justify-items: stretch;
}

.pbp-action-label {
  position: absolute;
  bottom: 46px;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 90%);
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  pointer-events: none;
}

.pbp-action-cancel {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  pointer-events: auto;
}

.pbp-court-secondary-action {
  flex: 0 0 auto;
  border: none;
  background: #374151;
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  pointer-events: auto;
}

.pbp-court-secondary-action.is-active {
  background: #f59e0b;
  color: #111827;
}

.pbp-court-secondary-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pbp-below-court-actions {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.pbp-shot-toggle {
  min-width: 140px;
  position: relative;
  padding-left: 44px;
  text-align: left;
}

.pbp-shot-toggle::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid currentColor;
  transform: translateY(-50%);
  opacity: 0.75;
}

.pbp-shot-toggle.active::before {
  background: currentColor;
  box-shadow: inset 0 0 0 4px #ffffff;
}

.pbp-player-btn {
  background: #f1f5f9;
  border: 1px solid #d7e5f8;
  border-radius: 6px;
  padding: 0;
  aspect-ratio: 1 / 1;
  font-weight: 800;
  cursor: pointer;
}

.pbp-player-btn-home {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #0f172a;
}

.pbp-player-btn-away {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #0f172a;
}

.pbp-player-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.pbp-player-btn.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.pbp-court-wrap .detail-meta {
  margin: 0;
}

.pbp-log-head {
  position: relative;
  display: block;
  margin-bottom: 8px;
}

.pbp-log-head h4 {
  margin: 0;
  flex: 0 0 100%;
  padding-right: 78px;
  margin-bottom: 8px;
  line-height: 1.05;
}

.pbp-log-status {
  border: 0;
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 0;
  background: #dc2626;
  color: #fff;
  min-width: 72px;
  height: 30px;
  padding: 0 8px;
  border-radius: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.pbp-log-status.is-live { background: #16a34a; }
.pbp-log-status.is-offline { background: #dc2626; }
.pbp-log-status:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.35); outline-offset: 2px; }
.pbp-live-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.pbp-live-label {
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
}

.pbp-event-log .playbyplay-event-item {
  background: #f5f5f5;
  border: 1px solid #9ca3af;
}

.pbp-rebound-wrap {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #eef2f7;
  border: 1px solid #d6dde8;
}

.pbp-rebound-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: end;
}

.pbp-rebound-controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.pbp-rebound-controls select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #cfd8e3;
  background: #fff;
  font-weight: 700;
}

.pbp-followup-wrap {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #eef2f7;
  border: 1px solid #d6dde8;
  width: 100%;
  max-width: 820px;
}

.pbp-followup-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pbp-followup-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pbp-followup-controls select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #cfd8e3;
  background: #fff;
  font-weight: 700;
}

.pbp-skip {
  background: #cbd5e1;
}

.pbp-event-group.is-clickable {
  cursor: pointer;
}

.pbp-event-group.is-clickable:hover {
  background: #eceff3;
}

.pbp-edit-actions {
  display: flex;
  gap: 10px;
}

.pbp-edit-shot-section {
  grid-column: 1 / -1;
  border: 1px solid #dbe6f5;
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, #f9fbff, #f2f7ff);
}

.pbp-edit-shot-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.pbp-edit-shot-heading,
.pbp-edit-shot-field label {
  display: block;
  margin: 0 0 10px;
  font-weight: 800;
  color: #22334d;
}

.pbp-edit-shot-court {
  position: relative;
  width: 100%;
  aspect-ratio: 47 / 50;
  border-radius: 16px;
  border: 1px solid #d7e5f8;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 49.5%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.22) 50.5%),
    repeating-linear-gradient(90deg, #f2c89b 0, #f2c89b 18px, #e8b989 18px, #e8b989 36px);
  cursor: crosshair;
  overflow: hidden;
}

.pbp-edit-shot-court-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pbp-edit-shot-options {
  display: grid;
  gap: 16px;
}

.pbp-edit-shot-result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pbp-edit-shot-result-actions .planilla-tab {
  min-width: 120px;
  justify-content: center;
}

.pbp-edit-shot-field {
  display: grid;
  gap: 10px;
}

.pbp-edit-shot-field select {
  width: 100%;
}

.pbp-jumpball-winner-block {
  grid-column: 1 / -1;
}

.pbp-jumpball-layout {
  display: grid;
  gap: 18px;
}

.pbp-jumpball-players-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pbp-jumpball-team-column {
  display: grid;
  gap: 12px;
}

.pbp-jumpball-players {
  grid-template-columns: repeat(5, minmax(46px, 1fr));
}

.pbp-jumpball-team-pick {
  width: 72px;
  min-height: 54px;
  border: 1px solid #d7e5f8;
  background: #fff;
  color: #1e293b;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
}

.pbp-jumpball-team-pick.is-selected {
  background: #f97316;
  border-color: #f97316;
  color: #fff;
}

.pbp-jumpball-team-pick-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.pbp-jumpball-winner-grid {
  display: grid;
  gap: 12px;
}

.pbp-jumpball-winner-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.pbp-jumpball-winner-row .pbp-jumpball-players {
  grid-template-columns: repeat(5, minmax(46px, 1fr));
}

.pbp-jumpball-winner-player-wrap {
  display: grid;
  gap: 12px;
}

.pbp-jumpball-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #475569;
}

@media (max-width: 720px) {
  .pbp-jumpball-players-grid {
    grid-template-columns: 1fr;
  }

  .pbp-jumpball-players {
    grid-template-columns: repeat(5, minmax(40px, 1fr));
  }

  .pbp-jumpball-winner-row {
    grid-template-columns: 1fr;
  }

  .pbp-jumpball-team-pick {
    width: 100%;
  }
}

.pbp-delete-action {
  border: 1px solid #dc2626;
  background: #fff1f2;
  color: #b91c1c;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

.pbp-event-group {
  position: relative;
  font-size: 11px;
  display: flex;
  flex-direction: column;
}

.pbp-event-head {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border-bottom: 1px solid #d1d5db;
  background: #fafafa;
}

.pbp-event-head-main {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 10px;
}

.pbp-event-period {
  font-size: 12px;
  font-weight: 800;
  color: #1d4ed8;
}

.pbp-event-time {
  position: static;
  font-size: 11px;
  color: #334155;
}

.pbp-event-score {
  font-size: 11px;
  font-weight: 500;
  color: #0f172a;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.2;
}

.pbp-event-score-part {
  font-weight: 500;
}

.pbp-event-score-part.is-updated {
  font-weight: 900;
}

.pbp-event-score-separator {
  margin: 0 2px;
  font-weight: 500;
}

.pbp-event-head-side {
  display: flex;
  align-items: stretch;
}

.pbp-event-redflag {
  width: 30px;
  min-height: 28px;
  border: 0;
  border-left: 1px solid #9ca3af;
  background: #e5e7eb;
  color: #64748b;
  cursor: pointer;
  position: relative;
}

.pbp-event-redflag:hover {
  background: #fee2e2;
  color: #dc2626;
}

.pbp-event-redflag.is-active {
  background: #dc2626;
  color: #fff;
}

.pbp-event-redflag-icon {
  position: absolute;
  inset: 0;
}

.pbp-event-redflag-icon::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 6px;
  width: 2px;
  height: 16px;
  background: currentColor;
  border-radius: 999px;
}

.pbp-event-redflag-icon::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 6px;
  width: 11px;
  height: 8px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 14%, 76% 52%, 100% 90%, 0 76%);
}

.pbp-event-title {
  padding: 6px 10px 1px;
  font-size: 12px;
  line-height: 1.05;
  font-weight: 500;
  color: #111827;
  text-transform: uppercase;
}

.pbp-event-line {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 10px;
}

.pbp-event-main {
  font-weight: 500;
}

.pbp-event-player {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  font-size: 11px;
  font-weight: 500;
  color: #111827;
}

.pbp-event-player-number {
  flex: 0 0 auto;
}

.pbp-event-player-name {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pbp-action-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: #64748b;
  letter-spacing: 0;
  margin-right: 2px;
  min-width: 58px;
  height: 18px;
  line-height: 18px;
  text-transform: uppercase;
}

.pbp-action-badge-home {
  background: #f97316;
}

.pbp-action-badge-away {
  background: #f97316;
}

.pbp-action-badge-neutral {
  background: #9ca3af;
  color: #111827;
}

.pbp-action-badge-sub-out {
  background: #ef4444;
  color: #fff;
}

.pbp-action-badge-sub-in {
  background: #22c55e;
  color: #fff;
}

.pbp-event-note {
  font-size: 11px;
  color: #64748b;
  padding: 1px 10px 0;
}

.pbp-free-game-form {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #fff;
}

.pbp-free-game-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.pbp-free-game-grid label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #334155;
}

.pbp-free-game-grid input,
.pbp-free-game-grid select {
  width: 100%;
  min-width: 0;
}

.pbp-coach-combobox {
  min-width: 0;
}

.pbp-coach-combobox input {
  width: 100%;
}

.pbp-free-game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-btn.danger {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}

.playbyplay-row-link {
  border: 0;
  background: transparent;
  color: #2563eb;
  padding: 0;
  font-size: 12px;
  cursor: pointer;
}

.pbp-related {
  margin-top: 0;
  padding-bottom: 4px;
  margin-top: auto;
  padding-top: 0;
  border-top: none;
  display: grid;
  gap: 1px;
}

.pbp-related-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 10px;
  font-size: 11px;
  color: #334155;
}

.pbp-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #1f2937;
}

@media (max-width: 1100px) {
  .pbp-actions-layout {
    grid-template-columns: 1fr;
  }

  .pbp-actions-right,
  .pbp-actions-left {
    order: 1;
  }

  .pbp-actions-center {
    order: 0;
  }
}

/* Keep play-by-play layout consistent across screen sizes */
.playbyplay-detail .pbp-actions-layout {
  grid-template-columns: minmax(0, 1fr) minmax(270px, 300px);
}

.playbyplay-detail .pbp-court-board {
  grid-template-columns: minmax(160px, 180px) minmax(0, 1fr) minmax(160px, 180px);
}

.pbp-edit-modal-panel {
  width: min(560px, calc(100% - 24px));
}

.pbp-edit-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
}

.pbp-edit-form {
  margin-top: 6px;
}

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

  .playbyplay-detail .pbp-actions-layout,
  .pbp-actions-layout {
    grid-template-columns: 1fr;
  }

  .playbyplay-detail .pbp-court-board,
  .pbp-court-board {
    grid-template-columns: 1fr;
  }

  .playbyplay-rosters {
    grid-template-columns: 1fr;
  }

  .pbp-actions-right {
    height: auto !important;
    min-height: 0;
    overflow: visible;
  }

  .playbyplay-event-log {
    max-height: none;
    overflow: visible;
    padding-bottom: 14px;
  }

  .playbyplay-event-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playbyplay-event-note {
    grid-column: span 2;
  }
}

.leader-team.team-page-link {
  font-size: 11px;
  display: inline-block;
  margin-top: 2px;
}

.player-reinforcement-tag {
  color: #b45309;
  font-weight: 800;
}

#teamProfilePage .details-grid {
  margin-top: 20px;
}

#teamProfilePage .card {
  min-height: 300px;
}

.team-profile-page .player-profile-head {
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.team-profile-page .player-profile-head h2 {
  font-size: clamp(2.6rem, 4vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin: 6px 0 8px;
}

.team-profile-page .detail-meta {
  font-size: 1.25rem;
  color: #4a6486;
}

.team-profile-hero {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  padding: 28px;
  margin-bottom: 18px;
  border: 1px solid rgba(117, 154, 198, 0.22);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88) 44%),
    linear-gradient(135deg, rgba(232, 242, 255, 0.88), rgba(246, 250, 255, 0.98));
  box-shadow: 0 22px 50px rgba(37, 61, 99, 0.12);
}

.team-profile-hero-media {
  align-self: center;
}

.team-profile-logo-shell {
  width: 100%;
  min-height: 230px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.98), rgba(231, 240, 252, 0.92));
  border: 1px solid rgba(138, 168, 207, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 30px rgba(73, 108, 154, 0.12);
}

.team-profile-logo {
  width: 190px;
  height: 190px;
  border-radius: 28px;
  background: transparent;
  border: 0;
  box-shadow: 0 18px 35px rgba(19, 34, 62, 0.12);
}

.team-profile-hero-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  align-content: stretch;
}

.team-profile-kicker,
.team-profile-record-title,
.team-profile-meta-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 800;
  color: #6c83a3;
}

.team-profile-full-name {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.35rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: #10203c;
  text-transform: uppercase;
}

.team-profile-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.team-profile-tournament-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1b66ff, #0ea5e9);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 12px 24px rgba(27, 102, 255, 0.24);
}

.team-profile-record-block {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(191, 210, 235, 0.8);
}

.team-profile-series-record {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.team-profile-series-record p {
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: #eef5ff;
  color: #163559;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(188, 208, 235, 0.72);
}

.team-roster-stats-card {
  margin-top: 14px;
}

.team-roster-stats-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.team-roster-stats-head h4 {
  margin: 0;
}

.team-series-stats-section+.team-series-stats-section {
  margin-top: 18px;
}

.team-series-stats-title {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #1e3a5f;
}

.team-profile-pager-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.team-profile-pager-inline .day-nav-label {
  margin: 0;
  text-align: center;
  flex: 1;
}

@media (max-width: 900px) {
  .team-profile-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .team-profile-logo-shell {
    min-height: 200px;
  }

  .team-profile-logo {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 640px) {
  .team-profile-page .player-profile-head {
    align-items: flex-start;
    gap: 14px;
  }

  .team-profile-page .detail-meta {
    font-size: 1rem;
  }

  .team-profile-hero {
    padding: 18px;
    gap: 18px;
  }

  .team-profile-logo-shell {
    min-height: 170px;
    border-radius: 24px;
  }

  .team-profile-logo {
    width: 136px;
    height: 136px;
  }

  .team-profile-full-name {
    font-size: 2rem;
  }
}

/* ─── Foul Type Modal ─────────────────────────────── */
.pbp-foul-modal-panel {
  width: min(700px, calc(100% - 24px));
}

.pbp-foul-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pbp-turnover-subtitle {
  margin: 0 0 14px;
  font-weight: 700;
  color: #475569;
}

.pbp-turnover-section h4 {
  margin: 0 0 10px;
  color: #1e293b;
  font-size: 14px;
}

.pbp-turnover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pbp-turnover-team-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pbp-turnover-grid .pbp-foul-btn.is-selected {
  background: #172235;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28);
}

@media (max-width: 620px) {
  .pbp-turnover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pbp-shot-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.pbp-missed-shot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.pbp-court-overlay {
  position: absolute;
  inset: 72px 18px auto 18px;
  z-index: 12;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

#pbpMissedShotModal.hidden {
  display: none;
}

.pbp-court-overlay-panel {
  width: min(720px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  padding: 16px 18px 14px;
  pointer-events: auto;
  backdrop-filter: blur(6px);
}

.pbp-shot-type-footer {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.pbp-foul-btn {
  background: #5c6068;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 18px 8px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  letter-spacing: 0.6px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.pbp-foul-btn:hover:not(:disabled) {
  background: #3e4249;
  transform: scale(1.02);
}

.pbp-foul-btn.is-shooting {
  background: #111;
  color: #fff;
}

.pbp-foul-btn.is-shooting:hover {
  background: #000;
}

.pbp-foul-btn.is-inactive {
  background: #b8bcc4;
  color: #fff;
}

.pbp-foul-btn.is-placeholder {
  background: transparent;
  border: none;
  cursor: default;
  pointer-events: none;
}

/* ─── Free Throw Modal ───────────────────────────── */
.pbp-freethrow-modal-panel {
  width: min(1120px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pbp-freethrow-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.25fr) minmax(220px, 0.9fr);
  gap: 18px;
  align-items: start;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.pbp-freethrow-left {
  border-right: 1px solid #e2e8f0;
  padding-right: 16px;
}

.pbp-freethrow-center {
  min-width: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
}

.pbp-freethrow-right {
  border-left: 1px solid #e2e8f0;
  padding-left: 16px;
}

.pbp-freethrow-section-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #1f2937;
}

.pbp-freethrow-committed-info {
  margin-bottom: 6px;
}

.pbp-freethrow-players {
  display: grid;
  gap: 10px;
  margin-bottom: 6px;
}

.pbp-freethrow-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin: 0 0 8px;
  color: #17243a;
  font-size: 14px;
  font-weight: 900;
}

.pbp-freethrow-team-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}

.pbp-freethrow-team-logo.is-placeholder {
  display: block;
  border: 1px solid #cbd5e1;
  background: #e2e8f0;
}

.pbp-freethrow-player-group {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.pbp-freethrow-player-group.is-court {
  background: #eef6ff;
  border-color: #bfdbfe;
}

.pbp-freethrow-group-label {
  margin: 0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #526275;
}

.pbp-freethrow-player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 6px;
}

.pbp-freethrow-empty {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.pbp-freethrow-player-btn {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border-radius: 6px;
  border: 2px solid #d6dde8;
  background: #f7f9fc;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s;
  padding: 0 8px;
}

.pbp-freethrow-player-group.is-court .pbp-freethrow-player-btn {
  background: #f7f9fc;
  border-color: #d6dde8;
}

.pbp-freethrow-player-group.is-court .pbp-freethrow-player-btn.is-selected {
  background: #ffedd5;
  border-color: #ea580c;
  color: #9a3412;
}

.pbp-freethrow-player-btn:hover:not(:disabled) {
  border-color: #60a5fa;
  background: #eff6ff;
}

.pbp-freethrow-player-btn.is-selected {
  background: #ffedd5;
  border-color: #ea580c;
  color: #9a3412;
  font-weight: 900;
}

.pbp-freethrow-player-btn.is-committed:not(.is-selected) {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
}

.pbp-freethrow-player-btn.is-sub {
  background: #6b7280;
  border-color: #6b7280;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.3px;
}

.pbp-freethrow-player-btn.is-disabled {
  cursor: default;
}

.pbp-freethrow-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.pbp-freethrow-opt {
  background: #fff;
  color: #111827;
  border: 2px solid #d6dde8;
  border-radius: 8px;
  padding: 14px 6px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s;
}

.pbp-freethrow-opt:last-child {
  grid-column: span 1;
}

.pbp-freethrow-opt:hover {
  background: #f8fafc;
}

.pbp-freethrow-opt.is-selected {
  background: #fff7ed;
  color: #c2410c;
  border-color: #f97316;
}

.pbp-freethrow-attempts {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.pbp-freethrow-assist-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.pbp-freethrow-fast-break-toggle {
  width: 100%;
  margin-top: 14px;
  text-align: center;
}

.pbp-freethrow-assist-field label {
  color: #22334d;
  font-size: 14px;
  font-weight: 800;
}

.pbp-freethrow-assist-field select {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  font-weight: 700;
}

.pbp-freethrow-attempt {
  display: grid;
  gap: 8px;
}

.pbp-freethrow-attempt-label {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #111827;
}

.pbp-freethrow-attempt-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pbp-freethrow-result-btn {
  min-height: 66px;
  border-radius: 10px;
  border: 2px solid #d6dde8;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
}

.pbp-freethrow-result-btn.is-made {
  border-color: #4caf50;
  color: #1f7a1f;
}

.pbp-freethrow-result-btn.is-missed {
  border-color: #ef4444;
  color: #b91c1c;
}

.pbp-freethrow-result-btn.is-selected.is-made {
  background: #ecfdf3;
  box-shadow: inset 0 0 0 2px #4caf50;
}

.pbp-freethrow-result-btn.is-selected.is-missed {
  background: #fef2f2;
  box-shadow: inset 0 0 0 2px #ef4444;
}

.pbp-freethrow-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.pbp-freethrow-actions #pbpFreeThrowSubstitution {
  border-color: #2563eb;
  color: #1d4ed8;
}

.pbp-freethrow-actions #pbpFreeThrowSubstitution:hover {
  background: #eff6ff;
}

.pbp-freethrow-validation {
  flex: 0 0 auto;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 800;
}

.pbp-freethrow-actions .pbp-primary-action,
.pbp-freethrow-actions .pbp-delete-action {
  width: auto;
  min-width: 128px;
}

@media (max-width: 900px) {
  .pbp-freethrow-layout {
    grid-template-columns: 1fr;
  }

  .pbp-freethrow-left {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding-right: 0;
    padding-bottom: 16px;
  }

  .pbp-freethrow-right {
    border-left: none;
    border-top: 1px solid #e2e8f0;
    padding-left: 0;
    padding-top: 16px;
  }

  .pbp-freethrow-actions {
    justify-content: stretch;
  }

  .pbp-freethrow-actions .pbp-primary-action,
  .pbp-freethrow-actions .pbp-delete-action {
    flex: 1 1 0;
  }

  .pbp-foul-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pbp-shot-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pbp-missed-shot-grid {
    grid-template-columns: 1fr;
  }

  .pbp-court-overlay {
    inset: 56px 10px auto 10px;
  }

  .teams-browser {
    grid-template-columns: 1fr;
  }

  .live-games-header {
    gap: 12px;
    align-items: stretch;
  }

  .live-games-header .refresh-button {
    align-self: flex-start;
  }

  .live-games-list {
    grid-template-columns: 1fr;
  }

  .live-game-card {
    padding: 15px;
  }

  .pbp-player-request-grid {
    grid-template-columns: 1fr;
  }
}

.pbp-validation-status {
  display: inline-flex;
  align-self: flex-start;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pbp-validation-status:disabled {
  cursor: default;
}

#pbpValidationStatus[data-status="error"] {
  color: #dc2626;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#pbpValidationStatus[data-status="ok"] {
  color: #16a34a;
}

.pbp-validation-list {
  display: grid;
  gap: 10px;
  max-height: min(72vh, 760px);
  overflow: auto;
  padding-right: 10px;
}

.pbp-validation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  padding: 14px 16px;
}

.pbp-validation-card-main {
  min-width: 0;
}

.pbp-validation-code {
  display: inline-flex;
  margin-bottom: 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 900;
}

.pbp-validation-card h4 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
}

.pbp-validation-event-meta,
.pbp-validation-event-detail {
  margin: 4px 0 0;
  color: #475569;
  font-size: 13px;
}

.pbp-validation-edit {
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
}
.coach-panel {
  display: block;
}

.coach-head {
  align-items: center;
  gap: 12px;
}
.coach-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.coach-section {
  margin-top: 18px;
}

.coach-match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.coach-match-card,
.coach-context-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.coach-dashboard {
  margin-top: 14px;
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  background: #f8fbff;
  overflow: hidden;
}

.coach-live-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "info score actions";
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  background: #10213a;
  color: #fff;
}

.coach-live-header h3 { margin: 5px 0 2px; color: #fff; font-size: 1.35rem; }
.coach-live-header h3 span { color: #9fb0c7; font-weight: 500; }
.coach-live-header p { margin: 0; color: #b9c7d9; font-size: .86rem; }
.coach-live-header-info { min-width: 0; }
.coach-live-header-info { grid-area: info; }
.coach-game-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; color: #c7d3e3; font-size: .68rem; }
.coach-score { display: grid; justify-items: center; gap: 5px; text-align: center; }
.coach-score { grid-area: score; }
.coach-live-header-actions { grid-area: actions; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-end; gap: 6px; min-width: 0; }
.coach-header-btn { border-color: #6d829f; background: rgba(255, 255, 255, .08); color: #fff; padding: 7px 10px; font-size: .72rem; }
.coach-header-btn:hover { border-color: #fff; background: rgba(255, 255, 255, .18); color: #fff; }
.coach-score strong { font-size: 2rem; line-height: 1; }
.coach-score small { color: #c7d3e3; }
.coach-live-pill { border-radius: 999px; background: #18a957; color: #fff; padding: 5px 10px; font-size: .75rem; font-weight: 900; }
.coach-live-pill.is-offline { background: #d92d3a; }
.coach-tabs { display: flex; gap: 8px; padding: 12px 18px; border-bottom: 1px solid #dbe5f2; background: #fff; overflow-x: auto; }
.coach-tabs button { border: 1px solid #c9d8ec; border-radius: 8px; background: #fff; color: #334b6b; padding: 9px 14px; font: inherit; font-size: .78rem; font-weight: 900; cursor: pointer; white-space: nowrap; }
.coach-tabs button.active { border-color: #1e6fe8; background: #eaf3ff; color: #1257b5; }
.coach-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, .8fr); gap: 18px; padding: 18px; }
.coach-dashboard-main { min-width: 0; }
.coach-dashboard-section + .coach-dashboard-section { margin-top: 18px; }
.coach-panel-title.coach-roster-section-title { min-height: 12px; margin-bottom: 2px; padding: 0 2px 2px; border-bottom: 1px solid #dbe5f2; }
.coach-panel-title.coach-roster-section-title h4 { font-size: .78rem; }
.coach-roster-section-title span { padding: 1px 6px; font-size: .6rem; }
.coach-panel-title { display: flex; justify-content: space-between; align-items: center; margin: 0 0 8px; }
.coach-panel-title h4, .coach-alerts h4 { margin: 0; color: #10213a; font-size: 1rem; }
.coach-panel-title span { border-radius: 999px; background: #e7effa; color: #476486; padding: 3px 8px; font-size: .75rem; font-weight: 900; }
.coach-player-table { margin-bottom: 18px; overflow-x: auto; border: 1px solid #dbe5f2; border-radius: 8px; background: #fff; }
.coach-player-header,
.coach-player-row { display: grid; grid-template-columns: 38px minmax(112px, 1.45fr) repeat(6, minmax(38px, .55fr)) minmax(78px, .8fr); align-items: center; width: 100%; min-width: 0; }
.coach-player-header { border-bottom: 1px solid #cbd8e8; background: #edf4fc; color: #526985; }
.coach-player-header > div { min-width: 0; }
.coach-sort-button { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; min-height: 38px; border: 0; background: transparent; color: inherit; padding: 8px 9px; font: inherit; font-size: .68rem; font-weight: 900; text-align: center; text-transform: uppercase; cursor: pointer; }
.coach-sort-button:hover,
.coach-sort-button.active { background: #dfeaf8; color: #1257b5; }
.coach-player-header > div:nth-child(2) .coach-sort-button { justify-content: flex-start; text-align: left; }
.coach-player-list { display: grid; margin: 0; }
.coach-player-row { width: 100%; border: 0; border-bottom: 1px solid #e4ebf4; border-radius: 0; background: #fff; color: #243954; padding: 0; text-align: center; font: inherit; font-size: .75rem; cursor: pointer; }
.coach-player-row:last-child { border-bottom: 0; }
.coach-player-row > span { min-width: 0; padding: 10px 9px; }
.coach-player-row:hover { background: #f3f8ff; }
.coach-player-row.is-critical { position: relative; z-index: 0; animation: coach-critical-pulse 1.2s ease-in-out infinite; }
.coach-player-row.is-critical:hover { background: #fff0f1; }
.coach-player-number { color: #1257b5; font-weight: 900; }
.coach-player-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; text-align: left; }
.coach-player-status { color: #627590; font-size: .7rem; font-weight: 800; }
.coach-foul-count { display: inline-grid; place-items: center; min-width: 27px; height: 27px; border-radius: 6px; background: #edf1f6; color: #64748b; font-weight: 900; }
.coach-foul-count.foul-1 { background: #dcfce7; color: #16743b; }
.coach-foul-count.foul-2 { background: #ecfccb; color: #4d7c0f; }
.coach-foul-count.foul-3 { background: #ffedd5; color: #c05609; }
.coach-foul-count.foul-4 { background: #fee2d5; color: #c2410c; }
.coach-foul-count.foul-5 { background: #fee2e2; color: #b4232d; }
.coach-lineup-list { display: grid; gap: 8px; }
.coach-lineup-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; border: 1px solid #dbe5f2; border-radius: 8px; background: #fff; padding: 12px; color: #405875; font-size: .78rem; }
.coach-lineup-card strong { color: #1257b5; }
.coach-lineup-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coach-lineup-card b { color: #168449; font-size: 1rem; }
.coach-lineup-card small { grid-column: 2 / -1; color: #7a8da6; }
.coach-dashboard-side { min-width: 0; }
.coach-period-cards, .coach-comparison-cards { display: grid; gap: 10px; }
.coach-period-cards { grid-template-columns: 1fr 1fr; margin-bottom: 10px; }
.coach-period-card { border: 1px solid #dbe5f2; border-radius: 10px; background: #fff; padding: 10px; }
.coach-period-card > h4 { margin: 0 0 8px; color: #10213a; font-size: .85rem; }
.coach-period-team + .coach-period-team { margin-top: 9px; border-top: 1px solid #e7edf5; padding-top: 8px; }
.coach-period-team > strong { display: block; margin-bottom: 4px; color: #526985; font-size: .62rem; text-transform: uppercase; }
.coach-period-values { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; color: #7a8da6; font-size: .55rem; text-align: center; }
.coach-period-numbers { color: #10213a; font-size: .68rem; }
.coach-period-numbers b { font-weight: 900; }
.coach-comparison-cards { grid-template-columns: 1fr; }
.coach-alerts { border-left: 1px solid #dbe5f2; padding-left: 18px; }
.coach-alerts article, .coach-insights article { display: flex; align-items: flex-start; gap: 9px; margin-top: 10px; border: 1px solid #dbe5f2; border-radius: 8px; background: #fff; padding: 11px; color: #405875; font-size: .8rem; }
.coach-alerts article strong, .coach-insights article strong { display: inline-grid; place-items: center; flex: 0 0 20px; height: 20px; border-radius: 50%; background: #fff0d8; color: #b76b00; }
.coach-updated { margin: 18px 0 0; color: #7a8da6; font-size: .7rem; }
.coach-comparison { margin-top: 20px; border: 1px solid #e5e0d8; border-radius: 14px; background: #fff; padding: 14px 12px; }
.coach-comparison > h4 { margin: 0 0 14px; color: #10213a; font-size: 1.2rem; }
.coach-comparison-header, .coach-comparison-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 10px; align-items: center; }
.coach-comparison-header { grid-template-columns: 62px minmax(0, 1fr) 62px; margin-bottom: 10px; color: #62718a; font-size: .62rem; font-weight: 900; text-align: center; text-transform: uppercase; }
.coach-comparison-header strong:first-child { color: #f15a24; }
.coach-comparison-tabs { display: flex; gap: 4px; margin-bottom: 8px; border-bottom: 1px solid #e5e0d8; padding-bottom: 5px; }
.coach-comparison-tab { border: 0; border-bottom: 2px solid transparent; background: transparent; color: #62718a; padding: 5px 7px; font: inherit; font-size: .62rem; font-weight: 900; cursor: pointer; }
.coach-comparison-tab.active, .coach-comparison-tab:hover { border-bottom-color: #f15a24; color: #f15a24; }
.coach-comparison-list[hidden] { display: none; }
.coach-comparison-row { margin-top: 8px; }
.coach-comparison-row > strong { color: #10213a; font-size: .9rem; text-align: center; }
.coach-comparison-row > strong:first-child { color: #f15a24; }
.coach-comparison-bars { min-width: 0; }
.coach-comparison-label { margin-bottom: 4px; color: #10213a; font-size: .72rem; font-weight: 900; text-align: center; }
.coach-comparison-track { display: flex; align-items: center; gap: 3px; height: 7px; }
.coach-comparison-bar { display: block; height: 100%; min-width: 3px; border-radius: 999px; }
.coach-comparison-bar-left { margin-left: auto; background: #f15a24; }
.coach-comparison-bar-right { background: #242022; }
.coach-insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; padding: 18px; min-height: 230px; align-content: start; }
.coach-player-detail { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(15, 31, 54, .48); }
.coach-player-detail-card { width: min(620px, 100%); max-height: min(720px, calc(100vh - 40px)); overflow: auto; border: 1px solid #c8d9ee; border-radius: 12px; background: #fff; padding: 20px; box-shadow: 0 18px 55px rgba(15, 33, 58, .24); }
.coach-player-detail .coach-panel-title { align-items: flex-start; }
.coach-player-detail .coach-panel-title h4 { margin-top: 4px; font-size: 1.15rem; }
.coach-icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid #c9d8ec; border-radius: 50%; background: #fff; color: #294a75; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.coach-detail-status { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 14px; border-left: 4px solid #28a866; border-radius: 6px; background: #eefbf3; padding: 10px 12px; color: #176c3b; }
.coach-detail-status.warning { border-left-color: #d88a18; background: #fff7e8; color: #96580b; }
.coach-detail-status.critical { border-left-color: #d92d3a; background: #fff0f1; color: #a51f2a; }
.coach-detail-status span { font-size: .72rem; font-weight: 800; opacity: .8; }
.coach-detail-stats { display: grid; grid-template-columns: repeat(5, minmax(70px, 1fr)); gap: 8px; margin-top: 14px; }
.coach-detail-stats span { display: grid; gap: 3px; border: 1px solid #dbe5f2; border-radius: 6px; background: #f8fbff; padding: 9px 5px; color: #5b7190; text-align: center; }
.coach-detail-stats b { color: #10213a; font-size: 1rem; }
.coach-detail-stats small { font-size: .65rem; font-weight: 900; }
.coach-detail-suggestions { margin-top: 16px; border-top: 1px solid #dbe5f2; padding-top: 13px; }
.coach-detail-suggestions h5 { margin: 0 0 8px; color: #10213a; font-size: .85rem; }
.coach-detail-suggestions ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; color: #405875; font-size: .8rem; }
@keyframes coach-critical-pulse { 0%, 100% { box-shadow: inset 4px 0 0 #d92d3a; } 50% { box-shadow: inset 4px 0 0 #ff8b94; } }
@media (prefers-reduced-motion: reduce) { .coach-player-row.is-critical { animation: none; box-shadow: inset 4px 0 0 #d92d3a; } }

@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape) {
  .players-page:has(.coach-dashboard) {
    max-width: none;
    padding: 0 12px 18px;
  }

  .coach-dashboard {
    margin-top: 8px;
  }

  .coach-live-header {
    gap: 12px;
    padding: 14px 16px;
  }

  .coach-live-header h3 { margin-top: 3px; font-size: 1.15rem; }
  .coach-live-header p { font-size: .78rem; }
  .coach-score { gap: 3px; }
  .coach-game-meta { gap: 3px 8px; font-size: .62rem; }
  .coach-score strong { font-size: 1.65rem; }
  .coach-header-btn { padding: 6px 8px; font-size: .68rem; }

  .coach-dashboard-grid {
    grid-template-columns: minmax(0, 1fr) minmax(220px, .38fr);
    gap: 12px;
    padding: 12px;
  }

  .coach-dashboard-section + .coach-dashboard-section { margin-top: 12px; }
  .coach-player-table { margin-bottom: 12px; }
  .coach-player-header,
  .coach-player-row { min-width: 0; }
  .coach-player-header .coach-sort-button { min-height: 34px; padding: 6px 7px; }
  .coach-player-row > span { padding: 8px 4px; }
  .coach-alerts { padding-left: 12px; }
  .coach-dashboard-side { border-left: 1px solid #dbe5f2; padding-left: 12px; }
  .coach-period-card { padding: 8px; }
  .coach-alerts article { margin-top: 8px; padding: 9px; font-size: .74rem; }
  .coach-updated { margin-top: 12px; }
  .coach-comparison { margin-top: 14px; padding: 11px 8px; }
  .coach-comparison > h4 { margin-bottom: 10px; font-size: 1rem; }
  .coach-comparison-header, .coach-comparison-row { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; }
  .coach-comparison-header { font-size: .54rem; }
  .coach-comparison-tab { padding: 4px 5px; font-size: .54rem; }
  .coach-comparison-row { margin-top: 6px; }
  .coach-comparison-row > strong { font-size: .75rem; }
  .coach-comparison-label { margin-bottom: 3px; font-size: .62rem; }
  .coach-comparison-track { height: 6px; }
}

@media (max-width: 760px) {
  .coach-live-header { grid-template-columns: 1fr auto; grid-template-areas: "info score" "actions actions"; align-items: start; }
  .coach-score { justify-items: start; }
  .coach-live-header-actions { justify-content: flex-start; }
  .coach-dashboard-grid { grid-template-columns: 1fr; }
  .coach-dashboard-side { border-left: 0; border-top: 1px solid #dbe5f2; padding: 16px 0 0; }
  .coach-period-cards { gap: 6px; }
  .coach-player-table { max-width: calc(100vw - 72px); }
  .coach-player-header,
  .coach-player-row { grid-template-columns: 34px minmax(96px, 1.35fr) repeat(7, minmax(34px, .55fr)) minmax(64px, .75fr); font-size: .68rem; }
  .coach-player-row > span { padding: 8px 3px; }
  .coach-detail-stats { grid-template-columns: repeat(3, 1fr); }
}

.coach-match-card {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  gap: 10px;
}

.coach-match-card h3,
.coach-context-card h3 {
  margin: 0;
  color: #0f172a;
  font-family: "Manrope", sans-serif;
  font-size: 1.05rem;
  line-height: 1.25;
}

.coach-match-card .admin-btn {
  margin-top: auto;
  width: fit-content;
}

.coach-match-top,
.coach-context-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.coach-mode-kicker,
.coach-team-line {
  color: #f15a24;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.coach-status-chip,
.coach-context-meta span {
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.coach-context-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 680px) {
  .coach-context-card {
    grid-template-columns: 1fr;
  }

  .coach-match-card .admin-btn {
    width: 100%;
  }
}
