:root {
  --bg: #083b2d;
  --bg-alt: #0d5a3f;
  --bg-deep: #062a20;
  --card: #ffffff;
  --ink: #0b1020;
  --muted: #5d6880;
  --line: #e6eaf2;
  --accent: #2fd37b;
  --accent-2: #18b8d9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: #fff;
  font-family: "Manrope", sans-serif;
  position: relative;
  background: linear-gradient(160deg, rgba(6, 22, 17, 0.86), rgba(7, 33, 25, 0.88)), #0b1f1a;
  min-height: 100vh;
}

body.page-tips {
  background:
    linear-gradient(160deg, rgba(6, 22, 17, 0.86), rgba(7, 33, 25, 0.88)),
    url("/static/img/fotball.png") center / cover no-repeat fixed,
    #0b1f1a;
}

body.page-leaderboard,
body.page-login {
  background:
    linear-gradient(160deg, rgba(6, 22, 17, 0.86), rgba(7, 33, 25, 0.88)),
    url("/static/img/leaderboard-bg.png") center / cover no-repeat fixed,
    #0b1f1a;
}

body::before {
  content: none;
}

body::after {
  content: none;
}

.site-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem;
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: rgba(7, 40, 27, 0.58);
  backdrop-filter: blur(10px);
}

.kicker {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: #99e3ff;
}

h1, h2, h3 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.02em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.9rem; margin-bottom: 0.25rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

nav a {
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 0.9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.nav-league-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 0.45rem;
  padding: 0.28rem 0.2rem;
  border: none;
  background: transparent;
  color: #f2f8ff;
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
}

.nav-league-link.active {
  background: transparent;
  color: #ffffff;
  text-shadow: 0 0 16px rgba(92, 248, 195, 0.42);
}

.nav-league-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.nav-logout-form {
  margin: 0;
}

.nav-link-button {
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 0.9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

main { padding: 1rem 0 2rem; }

.hero {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.8rem;
}

.hero-final-pick {
  text-align: right;
  display: inline-flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-final-pick span {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9fd9bf;
  font-weight: 800;
}

.hero-final-pick strong {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  color: #f5fff9;
}

.hero p { margin: 0.25rem 0 0; color: #d7e7ff; }

.winner-pick-panel {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(17, 79, 56, 0.92), rgba(11, 35, 29, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.winner-pick-copy {
  max-width: 520px;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7cf2bf;
  font-weight: 800;
}

.winner-pick-panel p {
  margin: 0.3rem 0 0;
  color: #d8f2e4;
}

.winner-pick-form {
  display: flex;
  align-items: end;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.winner-pick-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #d9e7ff;
  font-weight: 700;
}

.winner-pick-form select {
  min-width: 220px;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
  color: #f2f7ff;
  font-weight: 700;
}

.winner-pick-locked {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
  color: #effaf3;
  font-weight: 700;
}

.winner-mini-flag {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

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

.stat-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}

.stat-card span { display: block; font-size: 0.8rem; color: #c6d8f9; }
.stat-card strong { font-size: 1.4rem; color: #fff; }

.day-section {
  margin: 1rem 0 1.35rem;
}

.day-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0.25rem 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.day-chip {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  background: #152b4f;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.day-weekday {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  font-family: "Barlow Condensed", sans-serif;
}

.day-chip strong {
  margin-top: 0.2rem;
  font-size: 2.35rem;
  font-family: "Barlow Condensed", sans-serif;
}

.day-title h3 {
  margin: 0;
  font-size: 2.2rem;
  color: #f3f7ff;
}

.day-title p {
  margin: 0.08rem 0 0;
  font-size: 1.55rem;
  color: #a3b5d1;
  font-family: "Barlow Condensed", sans-serif;
}

.day-count {
  margin: 0 0 0 auto;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: #1d8f7c;
  color: #ebfffb;
  font-weight: 800;
  font-size: 1.15rem;
}

.match-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
  align-items: end;
  margin: 0.9rem 0 1rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.match-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #d9e7ff;
  font-weight: 700;
}

.match-filters input[type="text"],
.match-filters input[type="date"],
.match-filters select {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
  color: #f2f7ff;
  font-weight: 700;
}

.match-filters input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.filter-reset {
  width: 100%;
  height: 40px;
  background: linear-gradient(120deg, #cfd8ea, #b3bfd8);
  color: #1a2640;
}

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

.match-card {
  background: #f2f3f6;
  color: #252a34;
  border-radius: 16px;
  border: 1px solid #e2e5eb;
  padding: 0.9rem 0.95rem;
  min-height: 238px;
  box-shadow: 0 10px 20px rgba(20, 36, 60, 0.08);
}

.match-card.locked { border-left: 5px solid #ff7a59; }

.match-card.locked,
.match-tile.runtime-locked {
  opacity: 0.86;
}

.match-card.result-exact {
  background: rgba(22, 163, 74, 0.2);
  border-color: rgba(22, 163, 74, 0.35);
}

.match-card.result-partial {
  background: rgba(250, 204, 21, 0.24);
  border-color: rgba(202, 138, 4, 0.36);
}

.match-card.result-miss {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(185, 28, 28, 0.34);
}

.match-tile {
  cursor: pointer;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.match-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(20, 36, 60, 0.12);
}

.tile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
}

.tile-round {
  margin: 0;
  font-weight: 700;
  font-size: 0.98rem;
  color: #888e98;
}

.tile-location {
  color: #8b8f97;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.pin-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #8a909b;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

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

.tile-team p {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #202632;
  line-height: 1.12;
  text-align: center;
  max-width: 108px;
}

.tile-team-left {
  justify-self: start;
}

.tile-team-right {
  justify-self: end;
}

.tile-center {
  text-align: center;
}

.tile-date {
  margin: 0;
  font-size: 2.35rem;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  color: #222630;
  line-height: 1;
}

.tile-date-result {
  color: #111827;
  letter-spacing: 0.02em;
}

.tile-time {
  margin: 0.1rem 0 0;
  font-size: 1rem;
  color: #838a95;
}

.tile-clock {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: #0f4a8b;
  font-weight: 700;
  white-space: nowrap;
}

.clock-value {
  display: inline-block;
  min-width: 12ch;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.teams-versus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.team-home,
.team-away {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.12rem;
}

.team-away {
  justify-content: flex-end;
}

.meta {
  margin: 0.55rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.83rem;
}

.whistle-icon {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #0a4fa0;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inline {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
}

.prediction-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
  padding: 0.35rem 0 0.45rem;
}

.prediction-row:not(.locked-row) {
  background: rgba(22, 184, 217, 0.08);
  border: 1px solid rgba(24, 184, 217, 0.18);
  border-radius: 12px;
}

.locked-row {
  background: #fff6f2;
  border: 1px solid #ffd4c8;
  border-radius: 10px;
  padding: 0.32rem 0.45rem;
}

.dash {
  font-weight: 800;
  color: #4d5b78;
}

.locked-score {
  color: #0c355c;
  min-width: 14px;
  text-align: center;
}

input[type="number"], input[type="text"] {
  width: 58px;
  padding: 0.38rem;
  border: 1px solid #b9c8de;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(15, 35, 60, 0.08);
}

button {
  border: none;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #03243f;
  border-radius: 10px;
  padding: 0.42rem 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  background: #9ca3af;
  color: #f3f4f6;
  cursor: not-allowed;
}

.lock-pill {
  display: inline-block;
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  color: #fff;
  background: #ff7a59;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
}

.tile-footer-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.score-meta {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.score-line {
  margin: 0;
  font-size: 0.95rem;
  color: #2d3d5b;
}

.score-breakdown {
  font-size: 0.84rem;
  font-weight: 700;
  color: #5f6b80;
}

.save-line {
  margin: 0;
  font-size: 0.78rem;
  color: #6d7a8d;
  font-weight: 700;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #16a34a;
  flex: 0 0 auto;
}

.status-clock-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-countdown {
  font-size: 0.8rem;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  min-width: 12ch;
  text-align: right;
}

.match-tile.status-closed .status-indicator {
  color: #dc2626;
}

.match-tile.status-closed .clock-value,
.match-tile.status-closed .tile-clock .whistle-icon {
  color: #c81e1e;
  stroke: #c81e1e;
}

.panel {
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.logout-hero {
  margin-top: 1rem;
  padding: 1.2rem 1.25rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(17, 79, 56, 0.92), rgba(11, 35, 29, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.logout-hero h2 {
  margin: 0.2rem 0 0.25rem;
}

.logout-hero p {
  margin: 0;
  color: #d8f2e4;
  max-width: 720px;
}

.logout-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.logout-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #eef6ff;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.logout-action-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #03243f;
  border-color: transparent;
}

.leaderboard-stage {
  position: relative;
  border-radius: 18px;
  padding: 0;
  overflow: visible;
}

.create-user-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: end;
}

.create-user-form label {
  display: flex;
  flex-direction: column;
  color: #32425f;
  font-weight: 700;
  gap: 0.25rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem;
  text-align: left;
}

th {
  background: #f0f4fb;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.05rem;
}

.lead-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #0b5f4f;
  white-space: nowrap;
}

.tie-col {
  width: 84px;
  text-align: center;
}

.final-bonus-col {
  width: 110px;
  text-align: center;
}

td.final-bonus-col,
td.tie-break-col {
  text-align: center;
}

.lead-time-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.table-wrap {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(6, 24, 19, 0.58);
  box-shadow: 0 18px 32px rgba(3, 12, 10, 0.35);
  backdrop-filter: blur(10px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.leaderboard-table {
  min-width: 860px;
  background: transparent;
  color: #eaf6ff;
}

.leaderboard-table th,
.leaderboard-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.leaderboard-table th {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08));
  color: #f8fcff;
}

.leaderboard-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.03);
}

.leaderboard-table tbody tr:hover {
  background: rgba(50, 208, 139, 0.14);
}

.leaderboard-table tbody td:first-child {
  font-weight: 800;
  color: #9ef2c4;
}

.rank-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  line-height: 1;
}

.rank-gold {
  background: rgba(255, 215, 0, 0.2);
}

.rank-silver {
  background: rgba(209, 213, 219, 0.24);
}

.rank-bronze {
  background: rgba(205, 127, 50, 0.24);
}

.leaderboard-table strong {
  color: #ffffff;
}

.league-tabs {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 1rem 0 0.8rem;
}

.league-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #d7e7ff;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.league-tab:hover {
  background: rgba(255, 255, 255, 0.18);
}

.league-tab.active {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #03243f;
  border-color: transparent;
}

.league-tab-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
}

.league-banner {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0.6rem 0 1rem;
}

.league-banner-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
}

.league-banner-name,
.league-title {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: #f0f6ff;
}

.user-details > summary {
  cursor: pointer;
  font-weight: 800;
  color: #f4fbff;
}

.user-details-trigger {
  border: none;
  background: transparent;
  color: #f4fbff;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0;
  cursor: pointer;
}

.user-details-trigger:hover {
  color: #9ef2c4;
}

.user-lightbox {
  width: min(980px, 92vw);
  border: none;
  padding: 0;
  background: transparent;
}

.user-lightbox::backdrop {
  background: rgba(2, 10, 8, 0.68);
  backdrop-filter: blur(2px);
}

.user-lightbox-card {
  position: relative;
  border-radius: 16px;
  padding: 1rem;
  background: linear-gradient(150deg, rgba(9, 31, 26, 0.95), rgba(5, 18, 14, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 46px rgba(1, 8, 6, 0.56);
}

.user-lightbox-close {
  position: absolute;
  top: 0.4rem;
  right: 0.55rem;
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  font-size: 1.3rem;
  line-height: 1;
}

.user-lightbox-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 0.85rem;
}

.user-lightbox-header h3 {
  color: #f8fcff;
  margin: 0;
}

.user-lightbox-grouping {
  display: inline-flex;
  flex-direction: column;
  gap: 0.24rem;
  color: #cfe4f4;
  font-weight: 700;
  font-size: 0.8rem;
}

.user-lightbox-grouping select {
  min-width: 190px;
  padding: 0.44rem 0.55rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #f2f7ff;
  font-weight: 700;
}

.user-group-section {
  margin-top: 0.6rem;
}

.user-group-section h4 {
  margin: 0 0 0.45rem;
  color: #9ef2c4;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.grouped-panel {
  margin-top: 0;
}

.user-details > summary::-webkit-details-marker {
  display: none;
}

.user-details-panel {
  margin-top: 0.45rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(5, 22, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  min-width: 420px;
}

.user-details-head,
.user-details-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 0.5fr;
  gap: 0.5rem;
  align-items: center;
}

.user-details-head {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a9c3d8;
  margin-bottom: 0.35rem;
}

.user-details-row {
  padding: 0.28rem 0;
  font-size: 0.86rem;
  color: #e4f2ff;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.user-details-empty {
  grid-template-columns: 1fr;
  color: #b7cad7;
}

.flag {
  width: 92px;
  height: 64px;
  object-fit: cover;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.flag.small {
  width: 30px;
  height: 22px;
  border-radius: 4px;
}

.flag-fallback {
  width: 92px;
  height: 64px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e0e4ec;
  color: #5b6474;
  font-weight: 800;
  border: 1px solid #c8ced9;
}

.flag-fallback.small {
  width: 30px;
  height: 22px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.msg {
  background: #ecfeff;
  color: #0a3443;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
}

.rules-note {
  color: #dbe9ff;
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .site-header { align-items: start; flex-direction: column; }
  nav { width: 100%; }
  nav a { flex: 1 1 150px; text-align: center; }
  .nav-league-link { flex: 1 1 100%; justify-content: flex-start; }
  .nav-league-logo { width: 34px; height: 34px; }
  .hero-top { flex-direction: column; align-items: start; }
  .hero-final-pick { text-align: left; }
  .winner-pick-panel { flex-direction: column; align-items: stretch; }
  .winner-pick-form { width: 100%; }
  .winner-pick-form select { min-width: 0; width: 100%; }
  .day-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .match-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-title h3 { font-size: 1.75rem; }
  .day-title p { font-size: 1.25rem; }
  .day-count { font-size: 1rem; }
  .match-card { min-height: 240px; }
  .tile-date { font-size: 2.1rem; }
  .tile-time { font-size: 1.05rem; }
  .flag,
  .flag-fallback {
    width: 74px;
    height: 52px;
  }
  .leaderboard-table {
    min-width: 680px;
  }
  .user-lightbox {
    width: 95vw;
  }
  .user-details-head,
  .user-details-row {
    grid-template-columns: 1.6fr 0.8fr 0.8fr 0.45fr;
  }
}

@media (max-width: 600px) {
  .match-filters { grid-template-columns: 1fr; }
  .day-header {
    align-items: start;
    flex-wrap: wrap;
  }
  .day-count {
    margin-left: 0;
  }
  .tile-main {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .tile-team-left,
  .tile-team-right {
    justify-self: center;
  }
  .tile-footer-line {
    flex-wrap: wrap;
  }
}
