/* =========================================================
   Big Guys Pool - cleaned stylesheet
   Purpose: desktop + mobile layout, centered app, scrollable tables
   ========================================================= */

/* =========================================================
   1. Theme variables
   ========================================================= */

:root {
  --pool-navy: #202f6f;
  --pool-blue: #26358c;
  --pool-red: #c83227;
  --pool-red-soft: #fde8e6;
  --pool-green: #2f6b3c;
  --pool-green-soft: #e8f4eb;
  --pool-cream: #f7f8f4;
  --pool-card: #ffffff;
  --pool-border: #d9e0e5;
  --pool-grey: #5f6873;
  --pool-grey-soft: #eef1f6;
  --pool-grey-dark: #4b5563;
  --pool-amber: #c98714;
  --pool-amber-soft: #fff4db;
  --pool-shadow: rgba(20, 35, 65, 0.12);
}

:root {
  --bg: #f7f8f4;
  --panel: #ffffff;
  --logo-blue: #28347f;
  --logo-blue-soft: #eef1ff;
  --logo-red: #cf3028;
  --logo-green: #2f6f3e;
  --border: #d9dfeb;
  --row-alt: #f4f6f8;
  --text: #142033;
}

/* Legacy aliases retained so older rules/classes still work */
:root {
  --pool-teal: var(--pool-red);
  --pool-teal-dark: var(--pool-navy);
  --pool-teal-soft: var(--pool-cream);
}

/* =========================================================
   2. Base layout and typography
   ========================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--pool-cream);
  color: #18232b;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

body:not(.logged-in) .container {
  max-width: 760px;
}

#appShell,
#userPanel,
#adminLinkWrap,
#pickemView,
#survivorView,
#historyView {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

h1 {
  color: var(--pool-navy);
  font-weight: 650;
  letter-spacing: -0.035em;
  margin-bottom: 0.25rem;
}

h2 {
  color: var(--pool-navy);
  font-weight: 620;
  letter-spacing: -0.025em;
  margin-top: 1.5rem;
}

h3,
h4,
h5 {
  color: var(--pool-navy);
}

a {
  color: var(--pool-navy);
}

a:hover {
  color: var(--pool-blue);
}

/* =========================================================
   3. Header logo
   ========================================================= */

.app-header-logo {
  display: flex;
  justify-content: center;
  margin: 12px 0 28px;
}

.app-logo {
  display: block;
  width: clamp(240px, 34vw, 460px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* =========================================================
   4. Panels and wrappers
   ========================================================= */

.card-panel,
.table-wrap {
  background: var(--pool-card);
  border: 1px solid var(--pool-border);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(20, 50, 70, 0.07);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.card-panel {
  max-width: 460px;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* =========================================================
   5. Login
   ========================================================= */

#loginPanel {
  margin: 0 auto;
  max-width: 460px;
}

#loginPanel h2 {
  margin-top: 0;
  text-align: left;
}

#loginPanel select,
#loginPanel input {
  width: 100%;
  min-height: 44px;
  font-size: 16px;
}

#loginPanel button {
  min-height: 44px;
  padding-inline: 18px;
}

/* =========================================================
   6. Pool and section tabs
   ========================================================= */

#poolTabs {
  display: inline-flex;
  flex-wrap: nowrap;
  vertical-align: middle;
}

#historyTab {
  margin-left: 10px !important;
  margin-top: 0 !important;
  vertical-align: middle;
}

.nav-pills {
  margin-bottom: 1.5rem;
}

.nav-pills .nav-link {
  color: var(--pool-navy);
  font-weight: 600;
}

#pickemTabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

#pickemTabs .nav-item {
  flex: 0 0 auto;
}

.tab-content {
  margin-top: 1rem;
}

.nav-pills .nav-link.active,
.btn-primary,
.pool-tab.active,
#historyTab.active {
  background: var(--logo-blue);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--logo-red);
}

.nav-pills .nav-link,
.pool-tab {
  color: var(--logo-blue);
  border: 1px solid var(--border);
  background: #fff;
}

/* =========================================================
   7. Buttons, actions and status text
   ========================================================= */

.btn-success,
#savePicksBtn,
#saveSurvivorPickBtn {
  background: var(--pool-green);
  border-color: var(--pool-green);
  color: #fff;
}

.btn-success:hover,
.btn-primary:hover {
  background: var(--pool-navy);
  border-color: var(--pool-navy);
}

.btn-outline-primary {
  color: var(--pool-blue);
  border-color: var(--pool-blue);
}

.btn-outline-primary:hover,
.btn-outline-primary.active {
  background: var(--pool-blue);
  border-color: var(--pool-blue);
  color: #fff;
}

.btn,
.game-status {
  font-weight: 600;
}

#lockStatus,
#survivorLockStatus {
  color: #155d65;
  font-weight: 700;
}

.game-status {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.status-open {
  background: var(--pool-green-soft);
  color: var(--pool-green);
}

.status-locked {
  background: var(--pool-grey-soft);
  color: var(--pool-grey);
}

.status-final {
  background: var(--pool-navy);
  color: #fff;
}

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

/* =========================================================
   8. Tables
   ========================================================= */

.table {
  margin-bottom: 0;
}

.table thead th {
  background: var(--logo-blue-soft);
  color: var(--logo-blue);
  border-bottom: 2px solid var(--logo-red);
  font-weight: 700;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: var(--pool-cream);
}

#gamesTable {
  width: max-content;
  min-width: 920px;
}

#gamesTable th:nth-child(1),
#gamesTable td:nth-child(1) {
  min-width: 230px;
}

#gamesTable th:nth-child(2),
#gamesTable td:nth-child(2) {
  min-width: 230px;
}


#standingsTable,
#seasonStandingsTable,
#survivorStandingsTable {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1200px;
}

#standingsTable th,
#standingsTable td,
#seasonStandingsTable th,
#seasonStandingsTable td {
  min-width: 150px;
}

#standingsTable .sticky-player-col,
#seasonStandingsTable .sticky-player-col,
#survivorStandingsTable .sticky-player-col {
  position: sticky;
  left: 0;
  z-index: 5;
  min-width: 150px;
  width: 150px;
  max-width: 150px;
  background: #fff;
  box-shadow: 4px 0 8px rgba(20, 50, 70, 0.12);
}

#standingsTable tbody tr:nth-of-type(odd) .sticky-player-col,
#seasonStandingsTable tbody tr:nth-of-type(odd) .sticky-player-col,
#survivorStandingsTable tbody tr:nth-of-type(odd) .sticky-player-col {
  background: var(--pool-cream);
}

#standingsTable thead .sticky-player-col,
#seasonStandingsTable thead .sticky-player-col,
#survivorStandingsTable thead .sticky-player-col {
  z-index: 8;
  background: var(--pool-navy);
  color: #fff;
}

.season-points-cell {
  font-size: 1rem;
  font-weight: 500;
  color: #18232b;
  text-align: left;
  vertical-align: middle;
}

.survivor-entry-grid {
  display: grid;
  gap: 1rem;
}

.survivor-entry-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1rem;
}

.survivor-entry-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.survivor-week-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.survivor-week-card {
  min-width: 105px;
  min-height: 110px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  display: grid;
  place-items: center;
  gap: 0.25rem;
  padding: 0.75rem;
}

.survivor-week-card span {
  font-size: 0.8rem;
  color: #667085;
}

.survivor-week-card em {
  font-size: 0.75rem;
  font-style: normal;
  color: #667085;
}

.survivor-week-card small {
  color: var(--logo-red);
  font-weight: 700;
}

.survivor-week-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.survivor-week-card-open {
  border-color: var(--logo-blue);
  background: var(--logo-blue-soft);
}

.survivor-week-card-has-pick {
  border-color: #9ec5a8;
  background: #f0faf3;
}

.survivor-week-card-missing {
  opacity: 0.6;
  background: #f5f5f5;
}

.survivor-week-card:disabled {
  cursor: not-allowed;
}

.survivor-entry-card {
  overflow: hidden;
}

.survivor-week-strip {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.survivor-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.survivor-game-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
}

.survivor-game-meta {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.survivor-game-meta strong {
  color: var(--logo-blue);
}

.survivor-game-meta span {
  color: #667085;
  font-size: 0.9rem;
}

.survivor-game-picks {
  display: grid;
  gap: 0.6rem;
}

.survivor-game-picks .team-card {
  justify-content: flex-start;
  width: 100%;
}

.team-card:has(input[type="radio"]:checked) {
  border-color: var(--logo-blue);
  background: var(--logo-blue-soft);
  box-shadow: 0 0 0 3px rgba(40, 52, 127, 0.16);
}

.team-card:has(input[type="radio"]:checked) .team-card-text strong {
  color: var(--logo-blue);
}

/* =========================================================
   9. Matchups and pick cards
   ========================================================= */

.pick-card-group,
.survivor-card-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.matchup-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 150px;
}

.matchup-logos {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.matchup-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.matchup-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.matchup-code {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pool-navy);
  line-height: 1;
}

.matchup-vs {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  padding-top: 0.1rem;
}

.matchup-subtext {
  font-size: 0.74rem;
  color: #6b7280;
  text-align: center;
  line-height: 1.1;
  font-weight: 400;
}

.pick-card {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 118px;
  padding: 0.55rem 0.65rem;
  border: 2px solid var(--pool-border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: 0.15s ease;
}

.pick-card:hover {
  border-color: var(--pool-navy);
  box-shadow: 0 0 0 3px rgba(32, 47, 111, 0.12);
}

.pick-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pick-card:has(input:checked) {
  border-color: var(--pool-navy);
  background: #f2f5fb;
  box-shadow: inset 0 0 0 1px var(--pool-navy);
}

.pick-card:has(input:disabled) {
  pointer-events: none;
  cursor: not-allowed;
  border-color: var(--pool-grey);
  background: #f1f3f4;
}

.pick-card:has(input:disabled):hover {
  box-shadow: none;
  border-color: var(--pool-grey);
}

.team-pick-card {
  min-width: 118px;
  padding: 0.55rem 0.65rem;
}

.team-pick-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.team-pick-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}

.team-pick-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.08;
}

.team-code,
.team-pick-text .team-code {
  font-size: 1rem;
  font-weight: 600;
  color: var(--pool-navy);
  line-height: 1;
}

.team-spread {
  font-size: 0.86rem;
  color: #64748b;
  font-weight: 400;
}

.team-label {
  display: none;
}

/* =========================================================
   10. Matrix/team cards
   ========================================================= */

.matrix-pick {
  display: inline-flex;
  flex-direction: column;
  min-width: 92px;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 2px solid #d1d5db;
  background: #fff;
  font-size: 0.9rem;
}

.matrix-pick span {
  font-size: 0.78rem;
  color: var(--pool-grey);
  font-weight: 400;
}

.team-matrix-pick {
  min-width: 96px;
  padding: 0.48rem 0.58rem;
}

.team-matrix-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.team-matrix-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 auto;
}

.team-matrix-top strong,
.player-cell strong,
.team-card-text strong {
  font-weight: 600;
}

.player-cell {
  vertical-align: middle;
  padding: 1rem;
}

.player-cell strong,
.player-cell span {
  display: block;
}

.player-cell span {
  margin-top: 0.35rem;
  color: var(--pool-grey);
  font-size: 0.9rem;
  font-weight: 500;
}

.team-card {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 135px;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--pool-border);
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.team-card input {
  display: none;
}

.team-card-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}

.team-card-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.team-card-text strong {
  color: var(--pool-navy);
}

.team-card-text span {
  font-size: 0.85rem;
  color: #5f6b76;
}

.team-card-text em {
  font-size: 0.75rem;
  color: #6c757d;
  font-style: normal;
}

.team-card-selected {
  border-color: var(--pool-navy);
  background: #f2f5fb;
}

.team-card-disabled,
.team-card-used,
.pick-card.team-used {
  opacity: 0.45;
  background: #e9ecef;
  cursor: not-allowed;
}

.team-card-compact {
  min-width: 95px;
  padding: 0.45rem 0.55rem;
}

.team-card-compact .team-card-logo {
  width: 26px;
  height: 26px;
}

.team-card-compact .team-card-text span {
  display: none;
}

/* =========================================================
   11. Result states
   ========================================================= */

.pick-card.pick-correct,
.pick-card.pick-correct:has(input:disabled),
.pick-card.pick-correct:has(input:checked:disabled),
.team-card.pick-correct,
.team-card.matrix-correct,
.matrix-correct {
  border-color: var(--pool-green);
  background: var(--pool-green-soft);
  box-shadow: inset 0 0 0 1px var(--pool-green);
  opacity: 1;
}

.pick-card.pick-wrong,
.pick-card.pick-wrong:has(input:disabled),
.pick-card.pick-wrong:has(input:checked:disabled),
.team-card.pick-wrong,
.team-card.matrix-wrong,
.matrix-wrong {
  border-color: var(--pool-red);
  background: var(--pool-red-soft);
  box-shadow: inset 0 0 0 1px var(--pool-red);
  opacity: 1;
}

.pick-card.pick-push,
.pick-card.pick-push:has(input:disabled),
.pick-card.pick-push:has(input:checked:disabled),
.team-card.pick-push,
.team-card.matrix-push,
.matrix-push {
  border-color: var(--pool-amber);
  background: var(--pool-amber-soft);
  box-shadow: inset 0 0 0 1px var(--pool-amber);
  opacity: 1;
}

.team-card.pick-pending,
.team-card.matrix-pending,
.matrix-pending {
  border-color: var(--pool-navy);
  background: #f2f5fb;
  box-shadow: inset 0 0 0 1px var(--pool-navy);
}

.matrix-hidden {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
}

.matrix-missing {
  border-color: var(--pool-grey);
  background: #f3f4f6;
}

/* =========================================================
   12. Tiebreaker and rules
   ========================================================= */

.tiebreaker-panel {
  max-width: 520px;
}

.tiebreaker-input {
  width: 130px;
  max-width: 100%;
}

.rules-list {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.rules-list li {
  margin-bottom: 0.45rem;
}

/* =========================================================
   13. History page
   ========================================================= */

.btn-admin {
  background: #f6c945;
  border: 1px solid #d99b12;
  color: #1f2937;
  font-weight: 700;
}

.btn-admin:hover {
  background: #eeb82f;
  border-color: #c4830d;
  color: #111827;
}

.home-quick-actions {
  justify-content: center;
}

.history-hero h3,
#historyView h3,
#historyView h4,
#historyView h5 {
  color: var(--pool-navy);
  font-weight: 600;
}


.history-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

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

.history-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.75fr);
  gap: 3rem;
  align-items: start;
}

.history-hero h3 {
  margin-top: 0;
}

.history-hero p {
  max-width: 760px;
  line-height: 1.65;
  margin-top: 1rem;
}

.history-scoreboard-img {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  object-position: top center;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #f8fafc;
  box-shadow: 0 10px 25px rgba(20, 32, 51, 0.08);
}

@media (max-width: 900px) {
  .history-hero-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .history-scoreboard-img {
    max-height: 320px;
    object-fit: contain;
  }
}

#historyIntroText p {
  margin-bottom: 1rem;
}

#historyIntroText p:last-child {
  margin-bottom: 0;
}

.history-summary-card,
.history-season-card {
  background: #fff;
  border: 1px solid var(--pool-border);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(20, 50, 70, 0.07);
  padding: 1rem;
}

.history-summary-card span {
  display: block;
  color: var(--pool-grey);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.history-summary-card > strong {
  display: block;
  color: var(--pool-navy);
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.history-hero {
  padding: 1rem 1.25rem;
}

.history-hero-layout {
  grid-template-columns: minmax(0, 1.3fr) 260px;
  gap: 1.25rem;
}

.history-scoreboard-img {
  max-height: 220px;
}

#historyIntroText p {
  margin-bottom: 0.5rem;
}

@media (max-width: 700px) {
  .history-hero {
    display: block;
    padding: 18px;
  }

  .history-hero h3 {
    font-size: 1.8rem;
    line-height: 1.15;
    margin-bottom: 12px;
  }

  .history-hero p {
    max-width: none;
    font-size: 1rem;
    line-height: 1.45;
    margin-bottom: 16px;
  }

  .history-hero img,
  .history-hero .history-hero-image {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    margin: 12px auto 0;
  }
}

.history-season-card {
  margin-bottom: 1rem;
}

.history-season-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.history-season-title-row h4 {
  margin: 0;
}

.history-season-status {
  font-size: 0.8rem;
  color: var(--pool-grey);
}

.history-season-section {
  padding: 0.75rem 0;
  border-top: 1px solid #edf2f4;
}

.history-season-section:first-of-type {
  border-top: none;
}

.history-season-section h5 {
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.history-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.history-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.55rem;
  border: 1px solid var(--pool-border);
  border-radius: 999px;
  background: #fff;
  font-size: 0.9rem;
}

.history-chip strong {
  font-weight: 550;
}

.history-chip em {
  font-style: normal;
  color: var(--pool-grey);
  font-size: 0.82rem;
}

.history-playoff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.history-subhead {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--pool-grey);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.history-achievement-cell {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
}

.history-scroll-table {
  max-height: 420px;
  overflow: auto;
}

.history-scroll-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
}

#hallOfFameTable,
#tripleCrownWatchTable,
#tripleCrownCompletedTable {
  min-width: 950px;
}

/* =========================================================
   14. Print page
   ========================================================= */

.print-page {
  background: #f4f7f8;
  color: #18232b;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.print-sheet {
  max-width: 850px;
  margin: 2rem auto;
  background: #fff;
  border: 1px solid var(--pool-border);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 4px 14px rgba(20, 50, 70, 0.07);
}

.print-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.print-header h1 {
  margin: 0;
  font-size: 1.7rem;
}

.print-header p {
  margin: 0.25rem 0 0;
  color: var(--pool-grey);
}

#printNowBtn {
  border: 1px solid var(--pool-navy);
  background: var(--pool-navy);
  color: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
}

.print-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.print-meta div {
  border: 1px solid var(--pool-border);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  background: #f8fbfc;
}

.print-meta span {
  display: block;
  color: var(--pool-grey);
  font-size: 0.78rem;
}

.print-meta strong {
  display: block;
  font-size: 1.1rem;
  color: var(--pool-navy);
}

.print-picks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.print-picks-table th {
  background: var(--pool-navy);
  color: #fff;
  text-align: left;
  padding: 0.55rem;
}

.print-picks-table td {
  border-bottom: 1px solid #dde7ea;
  padding: 0.55rem;
  vertical-align: top;
}

.print-picks-table td span {
  display: block;
  color: var(--pool-grey);
  font-size: 0.78rem;
}

.print-pick-code {
  font-weight: 700;
  color: var(--pool-navy);
}

/* =========================================================
   15. Mobile section
   ========================================================= */

.mobile-games {
  display: none;
}

@media (max-width: 700px) {
  .container {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  body:not(.logged-in) .container {
    max-width: 100%;
  }

  #appShell,
  #userPanel,
  #adminLinkWrap,
  #pickemView,
  #survivorView,
  #historyView {
    max-width: 100%;
  }

  .app-header-logo {
    margin: 8px 0 24px;
  }

  .app-logo {
    width: min(78vw, 360px);
  }

  .card-panel {
    max-width: none;
    width: 100%;
  }

  #loginPanel {
    max-width: none;
  }

  #loginPanel button {
    width: 100%;
  }

  #poolTabs,
  #pickemTabs,
  #survivorTabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  #historyTab {
    margin-left: 8px !important;
    margin-top: 0 !important;
  }

  #pickemTabs .nav-link,
  #survivorTabs .nav-link,
  #poolTabs .btn,
  #historyTab {
    min-height: 44px;
    padding-left: 18px;
    padding-right: 18px;
  }

  #weekSelect {
    width: 100% !important;
    max-width: 180px;
    min-height: 44px;
    font-size: 16px;
  }

  #gamesTable {
    min-width: 880px;
  }

  #gamesTable th:nth-child(1),
  #gamesTable td:nth-child(1) {
    min-width: 210px;
  }

  #gamesTable th:nth-child(2),
  #gamesTable td:nth-child(2) {
    min-width: 210px;
  }

  #gamesTable th:nth-child(3),
  #gamesTable td:nth-child(3) {
    min-width: 350px;
  }

  #gamesTable th:nth-child(4),
  #gamesTable td:nth-child(4) {
    min-width: 110px;
  }

  .table-wrap {
    padding: 0.75rem;
  }

  .history-summary-grid,
  .history-playoff-grid {
    grid-template-columns: 1fr;
  }

  .print-meta {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   16. Optional mobile card layout support
   This CSS is ready for a future JS-rendered mobile picks view.
   It does nothing unless .mobile-games/.game-card markup is added.
   ========================================================= */

@media (max-width: 700px) {
  .mobile-games {
    display: block;
  }

  .game-card {
    background: #fff;
    border: 1px solid var(--pool-border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  }

  .game-card-kickoff {
    font-size: 0.85rem;
    color: #5c667a;
    margin-bottom: 8px;
  }

  .mobile-pick-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .pick-btn {
    min-height: 58px;
    font-size: 1rem;
    border-radius: 10px;
  }
}

/* =========================================================
   17. Print rules
   ========================================================= */

@media print {
  @page {
    size: letter portrait;
    margin: 0.45in;
  }

  body.print-page {
    background: #fff;
  }

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

  .print-sheet {
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .print-header h1 {
    font-size: 1.35rem;
  }

  .print-meta {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .print-meta div {
    padding: 0.45rem 0.55rem;
  }

  .print-picks-table {
    font-size: 0.78rem;
  }

  .print-picks-table th,
  .print-picks-table td {
    padding: 0.32rem 0.38rem;
  }
}

.main-panel {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 48px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--pool-border);
  border-radius: 18px;
  box-shadow: 0 6px 22px rgba(20, 35, 65, 0.10);
}

#appShell,
#pickemView,
#survivorView,
#historyView {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

#poolTabs {
  display: inline-flex;
  flex-wrap: nowrap;
}

#poolTabsWrap,
#appShell > .my-3:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

#historyTab {
  margin-left: 0 !important;
  margin-top: 0 !important;
  flex: 0 0 auto;
}

#pickemTabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
}

#pickemTabs .nav-item {
  flex: 0 0 auto;
}

.table-wrap {
  padding: 0.75rem;
  border-color: #dfe5eb;
  box-shadow: 0 3px 12px rgba(20, 35, 65, 0.06);
}

#gamesTable {
  min-width: 980px;
  width: 100%;
}

@media (max-width: 700px) {
  .main-panel {
    padding: 16px 12px;
    border-radius: 16px;
  }

  #appShell > .my-3:first-child {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  #poolTabs {
    flex: 0 0 auto;
  }

  #historyTab {
    white-space: nowrap;
  }

  #pickemTabs {
    padding-bottom: 4px;
  }

  #gamesTable {
    min-width: 980px;
  }
}

.app-panel-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.pool-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 2px;
}

#poolTabs {
  display: inline-flex;
  flex-wrap: nowrap;
}

#historyTab {
  margin: 0 !important;
  flex: 0 0 auto;
}

.user-status {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #18232b;
}

#pickemTabs,
#survivorTabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  margin-top: 8px;
  padding-bottom: 4px;
  border-top: 1px solid #e5eaf0;
  padding-top: 16px;
}

#pickemTabs .nav-item,
#survivorTabs .nav-item {
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .app-panel-topbar {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12px;
  }

  .user-status {
    justify-content: flex-end;
  }

  .pool-nav {
    width: 100%;
  }
}

.pool-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e3e8ef;
}

.pool-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  white-space: nowrap;
  flex: 1 1 auto;
}

.pool-tabs .btn,
.pool-nav-btn {
  min-height: 52px;
  padding: 0 24px;
  font-size: 1.05rem;
  font-weight: 700;
}

#historyTab {
  margin: 0 !important;
}

.user-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.pool-control-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 22px;
}

.pool-control-row label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--pool-grey);
  margin-bottom: 4px;
}

#weekSelect {
  min-width: 140px;
  min-height: 44px;
}

@media (max-width: 700px) {
  .pool-navbar {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 14px;
  }

  .user-status {
    justify-content: flex-end;
  }

  .pool-nav {
    width: 100%;
  }

  .pool-tabs .btn,
  .pool-nav-btn {
    min-height: 50px;
    padding: 0 20px;
    font-size: 1rem;
  }

  .pool-control-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

#pickemTabs,
#survivorTabs {
  border-top: 1px solid #e3e8ef;
  padding-top: 18px;
  margin-top: 18px;
}

#pickemTabs .nav-link,
#survivorTabs .nav-link {
  background: transparent;
  border: 0;
  color: var(--pool-navy);
  font-weight: 650;
}

#pickemTabs .nav-link.active,
#survivorTabs .nav-link.active {
  background: #f2f5fb;
  color: var(--pool-navy);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px #d8deec;
}

.pool-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 28px 0 8px;
}

.section-eyebrow {
  display: block;
  color: var(--pool-grey);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.pool-section-heading h2 {
  margin: 0;
}

.pool-control-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 170px;
}

.pool-control-row label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--pool-grey);
}

#weekSelect {
  min-height: 46px;
  font-size: 1rem;
}

@media (max-width: 700px) {
  .pool-section-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .pool-control-row {
    min-width: 0;
    width: 100%;
  }

  #weekSelect {
    width: 100% !important;
  }
}

.team-spread {
  font-weight: 700;
  color: var(--pool-navy);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: #f6f7f4;
}

.table-striped > tbody > tr:nth-of-type(even) > * {
  background-color: #ffffff;
}

#gamesTable tbody tr {
  border-bottom: 1px solid #e4e8ed;
}

#gamesTable td {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  vertical-align: middle;
}

#gamesTable tbody tr:hover > * {
  background-color: #f1f4fb;
}

#gamesTable td,
#gamesTable th {
  border-color: #e2e7ec;
}

/* Softer pick table rows */
#gamesTable.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-bg-type: #fbfcfa;
  background-color: #fbfcfa !important;
}

#gamesTable.table-striped > tbody > tr:nth-of-type(even) > * {
  --bs-table-bg-type: #ffffff;
  background-color: #ffffff !important;
}

#gamesTable tbody tr:hover > * {
  --bs-table-bg-type: #f6f8fc;
  background-color: #f6f8fc !important;
}


/* Keep pick cards softer and squarer */
#gamesTable .team-pick-card {
  border-radius: 12px !important;
  border: 2px solid #d9e1e5 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

#gamesTable .team-pick-card:hover {
  border-color: var(--pool-navy) !important;
  box-shadow: 0 0 0 2px rgba(32, 47, 111, 0.10) !important;
}

#gamesTable .team-pick-card:has(input:checked) {
  border-color: var(--pool-navy) !important;
  background: #f2f5fb !important;
  box-shadow: inset 0 0 0 1px var(--pool-navy) !important;
}

#gamesTable td:nth-child(3) {
  text-align: center;
}

#gamesTable td:nth-child(3) .pick-card-group {
  justify-content: center;
  align-items: center;
}

#gamesTable .team-pick-card {
  width: 118px !important;
  height: 72px !important;
  min-width: 118px !important;
  min-height: 64px !important;
  padding: 0.5rem 0.65rem !important;
  border-radius: 12px !important;
}

#gamesTable .team-pick-header {
  justify-content: center;
}

#gamesTable .team-pick-logo {
  width: 32px;
  height: 32px;
}


.pick-card:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}


#historyView .card-panel,
.history-hero,
.history-summary-grid {
  max-width: none;
  width: 100%;
}

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

.home-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.home-dashboard-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
}

.home-dashboard-card span {
  display: block;
  color: #667085;
  margin-bottom: 0.35rem;
}

.home-dashboard-card strong {
  color: var(--logo-blue);
  font-size: 1.35rem;
}

#historyView .table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-bg-type: transparent;
  background-color: #fff;
}

#historyView .table-striped > tbody > tr:nth-of-type(even) > * {
  background-color: #f8fafc;
}

#historyView .table > :not(caption) > * > * {
  border-color: var(--border);
}

#historyView .table thead th {
  background: var(--logo-blue-soft);
  color: var(--logo-blue);
  border-bottom: 2px solid var(--logo-red);
}

.home-dashboard-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #e7ebf3;
}

.home-dashboard-section h3,
.home-history-section h3 {
  color: var(--logo-blue);
  margin-bottom: 1rem;
}

.home-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.home-history-section {
  margin-top: 2rem;
}

#hallOfFameTable th:first-child,
#hallOfFameTable td:first-child {
  width: 52px;
  text-align: center;
  font-weight: 700;
  color: var(--logo-blue);
}

.history-hero p {
  width: min(100%, 1100px);
  line-height: 1.6;
}

@media (max-width: 700px) {
  .history-hero-layout {
    display: block !important;
  }

  .history-hero {
    padding: 18px !important;
    overflow: hidden;
  }

  .history-hero h3 {
    font-size: 2rem;
    line-height: 1.15;
    margin-bottom: 14px;
  }

  #historyIntroText {
    width: 100%;
    max-width: 100%;
  }

  #historyIntroText p {
    font-size: 1rem;
    line-height: 1.45;
    margin-bottom: 12px;
  }

  .history-scoreboard-img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 16px auto 0;
  }
}

@media (max-width: 700px) {
  .tiebreaker-panel {
    max-width: none;
    width: 100%;
    padding: 18px;
  }

  #tiebreakerLabel {
    font-size: 1rem;
    line-height: 1.35;
  }

  #tiebreakerInput {
    width: 110px !important;
    min-height: 48px;
    font-size: 1rem;
    margin-top: 8px;
  }

  #tiebreakerHelp {
    font-size: 0.95rem;
    line-height: 1.4;
  }
}

#gamesTable {
  width: 100%;
  min-width: 0;
}

#gamesTable th:nth-child(1),
#gamesTable td:nth-child(1) {
  width: 42%;
  min-width: 280px;
}

#gamesTable th:nth-child(2),
#gamesTable td:nth-child(2) {
  width: 58%;
  min-width: 360px;
}

.game-info-cell {
  display: grid;
  gap: 0.5rem;
  align-items: center;
}

.game-kickoff {
  font-weight: 600;
  color: #18232b;
}

.game-info-cell .game-status {
  width: fit-content;
}

@media (max-width: 700px) {
  #gamesTable {
    min-width: 0 !important;
    width: 100%;
  }

  #gamesTable th:nth-child(1),
  #gamesTable td:nth-child(1) {
    width: 42%;
    min-width: 0 !important;
  }

  #gamesTable th:nth-child(2),
  #gamesTable td:nth-child(2) {
    width: 58%;
    min-width: 0 !important;
  }

  #gamesTable td {
    padding: 0.75rem 0.5rem;
  }

  .game-kickoff {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  #gamesTable .matchup-subtext {
    display: none;
  }

  #gamesTable .matchup-header {
    min-width: 0;
  }

  #gamesTable .matchup-logo {
    width: 24px;
    height: 24px;
  }

  #gamesTable td:nth-child(2) .pick-card-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  #gamesTable .team-pick-card {
    width: 100% !important;
    min-width: 0 !important;
    height: 58px !important;
  }

  #gamesTable .team-pick-header {
    justify-content: flex-start;
  }

  #gamesTable .team-pick-logo {
    width: 30px;
    height: 30px;
  }
}

@media (min-width: 701px) {
  #gamesTable {
    width: auto !important;
    min-width: 760px !important;
    max-width: 900px;
  }

  #gamesTable th:nth-child(1),
  #gamesTable td:nth-child(1) {
    width: 360px;
    min-width: 320px !important;
  }

  #gamesTable th:nth-child(2),
  #gamesTable td:nth-child(2) {
    width: 360px;
    min-width: 320px !important;
  }

  #gamesTable td:nth-child(2) .pick-card-group {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .game-info-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .game-kickoff {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
  }

  #gamesTable .matchup-header {
    align-items: flex-start;
    gap: 4px;
  }

  #gamesTable .matchup-logos {
    justify-content: flex-start;
    gap: 8px;
  }

  #gamesTable .matchup-team {
    min-width: 42px;
  }

  #gamesTable .matchup-logo {
    width: 26px;
    height: 26px;
  }

  #gamesTable .matchup-code {
    font-size: 0.85rem;
  }

  #gamesTable .matchup-subtext {
    display: none;
  }

  .game-info-cell .game-status {
    margin-top: 2px;
  }
}

@media (max-width: 700px) {
  .pool-nav,
  #pickemTabs,
  #survivorTabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 10px 10px 8px;
    border-radius: 14px;
    background:
      linear-gradient(to right, #fff 0%, rgba(255,255,255,0) 18px),
      linear-gradient(to left, rgba(32,47,111,0.12), rgba(255,255,255,0) 42px),
      #fff;
    background-attachment: local, scroll, scroll;
  }

  .pool-nav::-webkit-scrollbar,
  #pickemTabs::-webkit-scrollbar,
  #survivorTabs::-webkit-scrollbar {
    display: none;
  }
}

.pick-card-group-with-vs {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  justify-content: center;
  column-gap: 18px;
}

.pick-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  line-height: 1;
}

@media (max-width: 700px) {
  .pick-card-group-with-vs {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .pick-vs {
    display: none;
  }
}

#tiebreakerLabel {
  display: grid;
  gap: 4px;
}

#tiebreakerLabel strong {
  color: var(--pool-navy);
}


/* Pick Em games table: 2-column grouped day blocks */

#gamesTable {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: auto !important;
  min-width: 760px !important;
  max-width: 900px;
}

#gamesTable th:nth-child(1),
#gamesTable td:nth-child(1) {
  width: 360px;
  min-width: 320px !important;
}

#gamesTable th:nth-child(2),
#gamesTable td:nth-child(2) {
  width: 360px;
  min-width: 320px !important;
  text-align: center;
}

#gamesTable thead th {
  border-top: 1.5px solid rgba(40, 52, 127, 0.65) !important;
  border-bottom: 1.5px solid rgba(40, 52, 127, 0.65) !important;
}

#gamesTable thead th:first-child {
  border-left: 1.5px solid rgba(40, 52, 127, 0.65) !important;
  border-top-left-radius: 14px !important;
  border-bottom-left-radius: 14px !important;
}

#gamesTable thead th:last-child {
  border-right: 1.5px solid rgba(40, 52, 127, 0.65) !important;
  border-top-right-radius: 14px !important;
  border-bottom-right-radius: 14px !important;
}

#gamesTable tr.game-day-spacer td {
  height: 18px;
  padding: 0 !important;
  background: #ffffff !important;
  border: 0 !important;
}

#gamesTable tr.game-day-row td:first-child {
  border-left: 1.5px solid rgba(40, 52, 127, 0.65) !important;
}

#gamesTable tr.game-day-row td:last-child {
  border-right: 1.5px solid rgba(40, 52, 127, 0.65) !important;
}

#gamesTable tr.game-day-start td {
  border-top: 1.5px solid rgba(40, 52, 127, 0.65) !important;
}

#gamesTable tr.game-day-end td {
  border-bottom: 1.5px solid rgba(40, 52, 127, 0.65) !important;
}

#gamesTable tr.game-day-start td:first-child {
  border-top-left-radius: 14px !important;
}

#gamesTable tr.game-day-start td:last-child {
  border-top-right-radius: 14px !important;
}

#gamesTable tr.game-day-end td:first-child {
  border-bottom-left-radius: 14px !important;
}

#gamesTable tr.game-day-end td:last-child {
  border-bottom-right-radius: 14px !important;
}

#gamesTable td:nth-child(2) .pick-card-group {
  justify-content: center !important;
}

@media (max-width: 700px) {
  #gamesTable {
    min-width: 0 !important;
    width: 100% !important;
    max-width: none;
  }

  #gamesTable th:nth-child(1),
  #gamesTable td:nth-child(1) {
    width: 42%;
    min-width: 0 !important;
  }

  #gamesTable th:nth-child(2),
  #gamesTable td:nth-child(2) {
    width: 58%;
    min-width: 0 !important;
  }
}

/* Rounded table shells for standings and survivor tables */

#standingsTable,
#seasonStandingsTable,
#survivorStandingsTable {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1.5px solid rgba(40, 52, 127, 0.65) !important;
  border-radius: 14px !important;
  overflow: hidden;
}

#standingsTable thead th:first-child,
#seasonStandingsTable thead th:first-child,
#survivorStandingsTable thead th:first-child {
  border-top-left-radius: 12px !important;
}

#standingsTable thead th:last-child,
#seasonStandingsTable thead th:last-child,
#survivorStandingsTable thead th:last-child {
  border-top-right-radius: 12px !important;
}

#standingsTable tbody tr:last-child td:first-child,
#seasonStandingsTable tbody tr:last-child td:first-child,
#survivorStandingsTable tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px !important;
}

#standingsTable tbody tr:last-child td:last-child,
#seasonStandingsTable tbody tr:last-child td:last-child,
#survivorStandingsTable tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px !important;
}

/* modal styling */
.player-profile-modal {
  border-radius: 18px;
  overflow: hidden;
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.profile-meta-card,
.profile-section {
  border: 1px solid rgba(40, 52, 127, 0.18);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}

.profile-meta-card span {
  display: block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--pool-grey);
  font-weight: 700;
}

.profile-meta-card strong {
  display: block;
  margin-top: 4px;
  color: var(--pool-navy);
  font-size: 1.05rem;
}

.profile-section {
  margin-top: 14px;
}

.profile-section h3 {
  margin: 0 0 10px;
  color: var(--pool-navy);
  font-size: 1rem;
}

.profile-bio-text {
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-stat-card {
  border-radius: 12px;
  background: var(--logo-blue-soft);
  padding: 12px;
  text-align: center;
}

.profile-stat-card span {
  display: block;
  font-size: .75rem;
  color: var(--pool-grey);
  font-weight: 700;
}

.profile-stat-card strong {
  display: block;
  color: var(--pool-navy);
  font-size: 1.1rem;
}

.profile-result-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.profile-result-table th,
.profile-result-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(40, 52, 127, 0.12);
  font-size: .9rem;
}

.player-profile-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.player-profile-link:hover {
  color: var(--logo-blue);
  text-decoration: underline;
}

@media (max-width: 700px) {
  .profile-meta-grid,
  .profile-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.profile-hero {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(40, 52, 127, 0.18);
  border-radius: 16px;
  background: var(--logo-blue-soft);
  padding: 14px;
}

.profile-logo-wrap {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: #fff;
  display: grid;
  place-items: center;
  border: 1px solid rgba(40, 52, 127, 0.18);
}

.profile-team-logo {
  max-width: 62px;
  max-height: 62px;
  object-fit: contain;
}

#profileHeroName {
  margin: 0;
  color: var(--pool-navy);
  font-size: 1.25rem;
}

#profileHeroSubtext {
  margin: 4px 0 0;
  color: var(--pool-grey);
  font-size: .9rem;
}

.player-hover-card {
  position: fixed;
  z-index: 2000;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 220px;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(40, 52, 127, 0.18);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.player-hover-card[hidden] {
  display: none;
}

.player-hover-card img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 999px;
  background: var(--logo-blue-soft);
  padding: 6px;
}

.player-hover-card strong {
  display: block;
  color: var(--pool-navy);
  font-size: .95rem;
  line-height: 1.1;
}

.player-hover-card span {
  display: block;
  color: var(--pool-grey);
  font-size: .8rem;
  margin-top: 2px;
}

.player-hover-card em {
  display: block;
  color: var(--pool-grey);
  font-size: .72rem;
  font-style: normal;
  font-weight: 600;
  margin-top: 3px;
}

.current-user-profile-link {
  font-weight: 800;
  color: var(--pool-navy);
}

.current-user-profile-link:hover {
  color: var(--logo-blue);
  text-decoration: underline;
}