/* ============================================================
   POLLAMATIC — Design System
   Black nav, white text, red accent, FWC26 typeface
   ============================================================ */

/* --- Design Tokens --- */
:root {
  --nav-height: 88px;
  --nav-logo-height: 88px;     /* logo fills nav bar on mobile */

  --nav-bg: #000000;
  --nav-text: #ffffff;

  --color-accent:       #e94560;
  --color-accent-hover: #c73550;

  --color-bg:      #f0f0f0;
  --color-surface: #ffffff;
  --color-border:  #e0e0e0;
  --color-text:        #555555;
  --color-text-muted:  #666666;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --max-width: 1100px;

  --font-title: 'FIFASans', 'Poppins', 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-ui: 'FIFASans', system-ui, sans-serif;

  --radius-pill: 999px;

  --color-primary:       #1976D2;
  --color-primary-hover: #1565C0;
  --color-accent-glow: rgba(233, 69, 96, 0.1);

  --color-success:        #1a6b3a;
  --color-success-bg:     #eafaf1;
  --color-success-border: #a9dfbf;

  --color-error:          #c0392b;
  --color-error-bg:       #fdf0ee;
  --color-error-border:   #e74c3c;

  --color-info:           #1a4a7a;
  --color-info-bg:        #e8f4fd;
  --color-info-border:    #90caf9;

  --color-warn:           #7a5c00;
  --color-warn-bg:        #fffbf0;
  --color-warn-border:    #f0e0a0;

  --color-pts-wrong-bg:   #fce8ec;
  --color-pts-outcome-bg: #dce8f5;
  --color-pts-exact-bg:   #d6f0dc;

  --font-display:        'FIFATournament', var(--font-title);
  --font-size-label:     0.72rem;
  --letter-spacing-caps: 0.08em;
  --max-width-reading:   960px;
}

@media (min-width: 768px) {
  :root {
    --nav-height: 60px;
    --nav-logo-height: 104px;  /* extends 44px below nav bar */
  }
}

/* --- Alpine.js cloak --- */
[x-cloak] { display: none !important; }

/* --- Fonts --- */
@font-face {
  font-family: 'FWC26';
  font-weight: 300;
  font-style: normal;
  src: url("../fonts/FWC26-NormalLight.otf") format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'FWC26';
  font-weight: 400;
  font-style: normal;
  src: url("../fonts/FWC26-NormalRegular.otf") format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'FWC26';
  font-weight: 500;
  font-style: normal;
  src: url("../fonts/FWC26-NormalMedium.otf") format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'FWC26';
  font-weight: 700;
  font-style: normal;
  src: url("../fonts/FWC26-NormalBold.otf") format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'FWC26';
  font-weight: 900;
  font-style: normal;
  src: url("../fonts/FWC26-NormalBlack.otf") format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'FWC26Condensed';
  font-weight: 900;
  font-style: normal;
  src: url("../fonts/FWC26-CondensedBlack.otf") format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'FIFATournament';
  font-weight: 900;
  font-style: normal;
  src: url("../fonts/FIFATournament-Black.ttf") format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'FIFASans';
  font-weight: 400;
  font-style: normal;
  src: url("../fonts/FIFASans-Regular.woff2") format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'FIFASans';
  font-weight: 500;
  font-style: normal;
  src: url("../fonts/FIFASans-Medium.woff2") format('woff2');
  font-display: swap;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-title);
  font-weight: 400;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-height); /* offset for fixed header */
  overflow-x: clip; /* prevent 100vw table breakout from causing document h-scroll */
}

body.no-nav {
  padding-top: 0;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
}

.nav {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  position: relative;    /* for mobile logo absolute positioning */
  overflow: visible;     /* let logo stick out below */
}

/* --- Logo --- */
/* Mobile: absolutely centred, sticks out below */
.nav-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  height: var(--nav-logo-height);
  display: flex;
  align-items: flex-start;
  text-decoration: none;
  flex-shrink: 0;
  z-index: 1;
}

.nav-logo-img {
  height: var(--nav-logo-height);
  width: auto;
  display: block;
}

/* --- Hamburger (mobile only) --- */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  z-index: 2;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s, width 0.2s;
}
/* Animated X state */
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Desktop nav links --- */
.nav-links {
  display: none;
  list-style: none;
  flex: 1;
}
.nav-link {
  display: block;
  padding: 0 0.9rem;
  height: var(--nav-height);
  line-height: var(--nav-height);
  color: var(--nav-text);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.9;
  border-bottom: 3px solid transparent;
  transition: opacity 0.15s;
}
.nav-link:hover { opacity: 1; }
.nav-link.active { opacity: 1; border-bottom-color: var(--color-accent); }

/* --- User area --- */
.nav-user {
  position: relative;
  flex-shrink: 0;
  z-index: 2;
}
.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: var(--nav-height);
  background: none;
  border: none;
  color: var(--nav-text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0 0.15rem;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.nav-user-btn:hover { opacity: 1; }

.nav-user-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  overflow: hidden;
  flex-shrink: 0;
}
.nav-user-nickname {
  display: none;
}
.nav-user-chevron {
  font-size: 0.65rem;
  opacity: 0.55;
  margin-left: 0.1rem;
}

/* User dropdown */
.nav-user-menu {
  position: absolute;
  right: 0;
  top: calc(var(--nav-height) + 6px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 190px;
  overflow: hidden;
  z-index: 200;
}
.nav-user-menu-item {
  display: block;
  padding: 0.7rem 1.1rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.1s;
}
.nav-user-menu-item:hover { background: var(--color-bg); }
.nav-user-menu-item + .nav-user-menu-item { border-top: 1px solid var(--color-border); }
.nav-user-menu-item.danger { color: var(--color-error); }

/* Login button (logged out state) */
.nav-login-btn {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.4rem 1rem;
  border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, background 0.15s;
}
.nav-login-btn:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

/* --- Mobile drawer --- */
.nav-drawer {
  background: #111111;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0.5rem 0 1rem;
}
.nav-drawer-link {
  display: block;
  padding: 0.75rem 1.5rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-left: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-drawer-link:hover { color: #fff; }
.nav-drawer-link.active { color: #fff; border-left-color: var(--color-accent); }

@media (min-width: 768px) {
  .nav {
    justify-content: flex-start;
    padding: 0 2rem;
    gap: 0;
  }
  .nav-logo {
    position: static;
    transform: none;
    align-self: flex-start;   /* top-align so overflow goes below */
    margin-right: 2rem;
  }
  .nav-hamburger       { display: none; }
  .nav-links           { display: flex; }
  .nav-user            { margin-left: auto; }
  .nav-user-nickname   { display: inline; }
  .nav-drawer          { display: none !important; }
}

/* ============================================================
   MAIN & FOOTER
   ============================================================ */

.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.1rem 1rem 3rem;  /* extra top for larger logo overflow */
}
@media (min-width: 768px) {
  .site-main { padding: 3rem 2rem 3rem; }
}
body.no-nav .site-main {
  padding-top: 2rem;
}

/* ============================================================
   ERROR PAGES
   ============================================================ */

body.error-page-body .site-main {
  max-width: none;
  margin: 0;
  padding: 0;
}

.error-page {
  width: 100vw;
  min-height: 100vh;
  background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url("../img/error-bg.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.error-page--maintenance {
  background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url("../img/under-maintenance-bg.jpg");
}

.error-page-copy {
  color: #ffffff;
  text-align: center;
  max-width: 760px;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.65);
}

.error-page-logo-link {
  display: inline-block;
  margin-bottom: 1rem;
}

.error-page-logo {
  display: block;
  width: min(68vw, 320px);
  height: auto;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.55));
}

.error-page-code {
  display: block;
  font-family: var(--font-ui);
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.error-page-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6vw, 4.1rem);
  font-weight: 900;
  line-height: 1.05;
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
}

.error-page-message {
  font-family: var(--font-title);
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  line-height: 1.35;
  margin: 0;
}

.site-footer {
  background: #000;
  color: rgba(255,255,255,0.75);
  padding: 1.25rem 2rem;
  font-family: var(--font-ui);
  font-size: var(--font-size-label);
  font-weight: 400;
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}
.site-footer a { color: rgba(255,255,255,0.8); text-decoration: none; transition: color 0.15s; }
.site-footer a:hover { color: #fff; }
.site-footer-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.site-footer-item {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
}
a.site-footer-item:hover { color: #fff; }
.site-footer-right {
  color: rgba(255,255,255,0.6);
  text-transform: none;
  letter-spacing: 0;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--color-surface);
  border-radius: 0;
  border: 1px solid var(--color-border);
  padding: 1.5rem;
}
.card-narrow  { max-width: 480px; margin: 0 auto; }
.card-medium  { max-width: 560px; margin: 0 auto; }
.card-wide    { max-width: 980px; margin: 0 auto; }
.card-full    { max-width: var(--max-width); margin: 0 auto; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 400; }
h1 { font-size: 2rem;   line-height: 1.2; }
h2 { font-size: 1.75rem; line-height: 1.3; }
h3 { font-size: 1.25rem; line-height: 1.4; }
h4 { font-size: 0.95rem; }

.page-title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.section-title {
  font-size: var(--font-size-label);
  font-weight: 700;
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}
.subtitle {
  color: var(--color-text-muted);
  font-size: 0.93rem;
  margin-bottom: 1.5rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-block;
  padding: 0.58rem 1.35rem;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-outline { background: transparent; color: var(--color-text); border: 1.5px solid var(--color-text); }
.btn-outline:hover { background: var(--color-text); color: var(--color-surface); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn-outline:hover { border-color: var(--color-text-muted); }

.btn-dark { background: #1a1a1a; color: #fff; }
.btn-dark:hover { background: #333; }

.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1dba58; }
.btn-email { background: var(--color-accent); color: #fff; }
.btn-email:hover { background: #cc3349; }
.btn-sms { background: #3551ff; color: #fff; }
.btn-sms:hover { background: #2040ff; }

.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.82rem; }

/* ============================================================
   FORMS
   ============================================================ */

.form-field { margin-bottom: 1.1rem; }

.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-text);
  margin-bottom: 0.35rem;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}
.form-field input:disabled {
  background: #f5f5f5;
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.form-hint.text-error {
  color: var(--color-error);
  font-weight: 600;
  text-align: center;
  margin-top: 0.75rem;
}
.avatar-preview-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 8px;
  border: 2px dashed transparent;
  transition: all 0.2s ease-in-out;
}
.avatar-preview-row.is-dragging {
  border-color: var(--color-accent);
  background-color: var(--color-bg-hover);
  opacity: 0.8;
}
.avatar-profile {
  width: 200px;
  height: 200px;
  font-size: 5rem;
}
.profile-card .avatar-profile {
  margin: 0 auto 1rem;
}
.avatar-preview {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

/* Alerts */
.alert {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.alert-success { color: var(--color-success); background: var(--color-success-bg); border: 1px solid var(--color-success-border); }
.alert-invite  { border-radius: 0; color: #fff; border: none; font-size: 1.15rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.4rem 1rem; }
.alert-invite a { color: #fff; text-decoration: underline; }
.alert-invite .user-nickname-avatar { width: 3rem; height: 3rem; font-size: 1.2rem; border: 3px solid rgba(255,255,255,0.4); margin-right: 0.15rem; }
.alert-error   { color: var(--color-error);   background: var(--color-error-bg);   border: 1px solid var(--color-error-border); }
.alert-info    { color: var(--color-info);     background: var(--color-info-bg);    border: 1px solid var(--color-info-border); }
.alert-warn    { color: var(--color-warn);     background: var(--color-warn-bg);    border: 1px solid var(--color-warn-border); }
.alert-error--scores { border-radius: 0; background: #e00; border-color: #e00; color: #000; font-size: 1rem; }
.alert-warn--scores { border-radius: 0; background: #f0d000; border-color: #f0d000; color: #000; font-size: 1rem; }

/* Admin flag toggles (inside form card) */
.admin-flags {
  margin-top: 1.5rem;
  padding: 1rem 1.5rem 1.5rem;
  background: var(--color-warn-bg);
  border-top: 2px solid var(--color-warn-border);
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  margin-bottom: -1.5rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.admin-flags-title,
.admin-panel-title {
  font-size: var(--font-size-label);
  font-weight: 700;
  color: var(--color-warn);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-caps);
  margin-bottom: 0.75rem;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.93rem;
}
.toggle-row label { font-weight: 500; cursor: pointer; }
.toggle-row input[type=checkbox] {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
  accent-color: var(--color-accent);
}

/* ============================================================
   STAT BOXES
   ============================================================ */

.stats-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.stat-box {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  text-align: center;
  flex: 1;
  min-width: 120px;
}
.stat-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-accent);
  line-height: 1;
}
.stat-label {
  font-size: var(--font-size-label);
  color: var(--color-text-muted);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-caps);
}

/* ============================================================
   AVATAR
   ============================================================ */

.avatar {
  border-radius: 50%;
  object-fit: cover;
}

/* Base styles for smooth hover transitions on avatars */
.avatar,
.standings-avatar {
  transition: transform 0.2s ease-in-out;
  position: relative;
  z-index: 1;
}

@media (any-hover: hover) {
  .avatar:hover,
  .standings-avatar:hover {
    transform: scale(5.0);
    transition-delay: 0.50s;
    z-index: 50;
  }
}

/* Fix z-index stacking context so hovering avatars inside sticky table cells aren't covered by adjacent cells/rows */
.standings-sticky-player:has(.avatar:hover),
.standings-sticky-player:has(.standings-avatar:hover) {
  z-index: 100;
}

/* Inline nickname pill used by the nickname() macro */
.user-nickname {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  text-decoration: none;
  font-weight: bold;
  color: inherit;
}
a.user-nickname:hover { text-decoration: underline; }
.user-nickname-avatar {
  width: 1.4em;
  height: 1.4em;
  flex-shrink: 0;
  font-size: 0.65em;
  font-weight: 700;
}

.avatar-initials {
  border-radius: 50%;
  background: var(--nav-bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */

.profile-page-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
}

.profile-page-cards .card { max-width: none; margin: 0; margin-bottom: 1rem; }
.profile-page-cards .card.admin-panel { background: var(--color-warn-bg); border-color: var(--color-warn-bg); margin-top: 0; }

.profile-card-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 400;
  color: #000;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

.profile-card { text-align: center; }
.profile-handle { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.25rem; }
.profile-name  { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 0.15rem; }
.profile-email { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 1.25rem; }
.profile-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.profile-stats-link {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}
.profile-stats-link:hover .profile-stat-value {
  opacity: 0.7;
}
.profile-stat  { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.profile-stat-value { font-size: 1.4rem; font-weight: 700; }
.profile-stat-label {
  font-size: var(--font-size-label);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-caps);
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: -1.5rem;
  width: calc(100% + 3rem);
  table-layout: fixed;
}
.profile-table th,
.profile-table td {
  padding: 0.65rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-table td { color: #000; }
.profile-table th {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-muted);
}
/* paid column — fixed narrow width */
.profile-table .col-paid { width: 4rem; text-align: center; padding-left: 0.25rem; padding-right: 0.25rem; }
@media (max-width: 480px) {
  .profile-table th,
  .profile-table td { padding: 0.5rem 1rem; font-size: 0.8rem; }
  .profile-page-cards .card { padding: 1rem; }
  .profile-table { margin: -1rem; width: calc(100% + 2rem); }
}
.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: inherit;
  text-decoration: none;
}
.sort-link:hover { color: var(--color-text); }
.sort-link.active { color: var(--color-text); }
.sort-arrow {
  font-size: 0.9em;
  line-height: 1;
}
.profile-table tbody tr:last-child td { border-bottom: none; }

.paid-check  { color: var(--color-success); }
.invited-empty { color: #aaa; font-size: 0.88rem; font-style: italic; }

.admin-panel {
  background: var(--color-warn-bg);
  border: 1px solid var(--color-warn-bg);
  border-radius: 0;
  padding: 1rem 1.2rem;
  margin-top: 1.5rem;
  text-align: left;
}
.admin-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 0.3rem 0;
}
.admin-row-wrap {
  align-items: flex-start;
  gap: 0.75rem;
}
.admin-mono {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  word-break: break-all;
  text-align: right;
}
.admin-row .label { color: #000; }
.badge-yes { color: var(--color-success); font-weight: 600; }
.badge-no  { color: #bbb; }

/* ============================================================
   ADMIN DASHBOARD
   ============================================================ */

.users-table-wrap {
  overflow-x: auto;
  /* bleed to reading-body edges (mirrors card-bleed) */
  margin: 0 -1.5rem -3rem;
}
@media (min-width: 768px) {
  .users-table-wrap {
    margin: 0 -2.5rem -3.5rem;
  }
}

.users-table {
  /* override profile-table's card-bleed sizing */
  margin: 0;
  width: 100%;
  min-width: 760px;
  /* natural column widths instead of equal-width fixed layout */
  table-layout: auto;
}

.users-table th,
.users-table td {
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
}

.users-table th {
  font-size: 0.84rem;
}

@media (max-width: 480px) {
  .users-table th,
  .users-table td {
    padding: 0.38rem 0.55rem;
    font-size: 0.76rem;
  }
}

.admin-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-link-card {
  position: relative;
  display: block;
  min-height: 160px;
  padding: 1.25rem 1.1rem 1.15rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.admin-link-title {
  font-family: var(--font-ui);
  font-size: 1.35rem;
  line-height: 1.05;
  margin-bottom: 0.55rem;
  color: inherit;
}

.admin-link-description {
  max-width: 24ch;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

.automatic-updates-status-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #25d366;
  border: 1px solid #25d366;
  color: #000;
  padding: 1.5rem;
  border-radius: 0;
  margin-bottom: 2rem;
  gap: 1.5rem;
  transition: background-color 0.2s, border-color 0.2s;
}
.automatic-updates-status-card.is-paused {
  background: #d32f2f;
  border-color: #d32f2f;
  color: #fff;
}
.automatic-updates-status-card.is-paused .automatic-updates-status-title,
.automatic-updates-status-card.is-paused .automatic-updates-status-title span {
  color: #fff;
}
.automatic-updates-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.automatic-updates-status-info {
  flex: 1;
}
.automatic-updates-status-title {
  font-size: 1.15rem;
  margin-bottom: 0;
  color: inherit;
}
.automatic-updates-status-title span {
  color: inherit;
}
.automatic-updates-status-actions {
  flex-shrink: 0;
}
.automatic-updates-status-log-wrap {
  margin-top: 0.25rem;
}
.automatic-updates-status-log-label {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 0.45rem;
  color: inherit;
}
.automatic-updates-status-log {
  margin: 0;
  max-height: 220px;
  overflow-y: auto;
  overflow-x: auto;
  max-width: 100%;
  padding: 0.8rem;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  border-radius: 0;
  box-sizing: border-box;
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: pre;
}
.automatic-updates-status-card .btn-danger {
  background: #d32f2f;
  color: #fff;
}
.automatic-updates-status-card .btn-danger:hover {
  background: #b61f1f;
}
.automatic-updates-status-card .btn-primary {
  background: #25d366;
  color: #000;
}
.automatic-updates-status-card .btn-primary:hover {
  background: #1eb85a;
}

.page-status-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 0.5rem 0.75rem;
  margin-bottom: 2rem;
}

.page-status-copy {
  margin: 0 0 0.75rem;
  color: #000;
}

.page-status-error {
  margin: 0 0 0.75rem;
  color: var(--color-accent);
  font-weight: 600;
}

.page-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.page-status-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.12rem 0;
}

.page-status-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-status-toggle input {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  accent-color: #25d366;
  vertical-align: middle;
}

.page-status-toggle input:disabled {
  cursor: not-allowed;
}

.page-status-saving {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #000;
}

.page-status-card .page-status-line {
  margin: 0.08rem 0;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-status-title {
  color: #000;
}

.page-status-path {
  margin-left: 0.3rem;
  color: #6f6f6f;
  font-family: ui-monospace, 'Cascadia Code', monospace;
}

@media (max-width: 640px) {
  .page-status-row {
    gap: 0.35rem;
  }
}

.text-success { color: #25d366; }
.btn-danger { background: var(--color-accent); color: #fff; }
.btn-danger:hover { background: var(--color-accent-hover); }

@media (max-width: 640px) {
  .admin-link-card {
    min-height: 140px;
  }

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

@media (max-width: 932px) {
  .automatic-updates-status-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    border: 0;
  }

  .automatic-updates-status-card.is-paused {
    border: 0;
  }

  .automatic-updates-status-top {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .automatic-updates-status-log {
    max-height: 180px;
    font-size: 0.69rem;
    border-left: 0;
    border-right: 0;
  }

  .automatic-updates-status-log-wrap {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
  }
}

/* ============================================================
   INVITE PAGE
   ============================================================ */

.invite-box {
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.invite-link-text {
  flex: 1;
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 0.88rem;
  word-break: break-all;
  color: var(--color-text);
}
.share-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.invite-stats .stat-number { color: #3551ff; }

/* ============================================================
   HERO / COUNTDOWN (home page)
   ============================================================ */

.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: #000000;
  margin-bottom: 0.5rem;
  padding: 0 1rem;
}
.hero-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  padding: 0 1rem;
}
/* Featured news card on homepage */
.hero-featured-wrap {
  width: 100%;
  max-width: var(--max-width-reading);
  margin: 0 auto 2rem;
  background: #111;
  text-align: left;
}
@media (max-width: 767px) {
  .hero-featured-wrap {
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
    max-width: none;
  }
}
@media (min-width: 768px) {
  .hero-featured-wrap {
    margin-left: -2rem;
    margin-right: -2rem;
    width: calc(100% + 4rem);
    max-width: none;
  }
}
.hero-featured {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  background: transparent;
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  transition: opacity 0.15s;
}
.hero-featured:hover { opacity: 0.9; }
.hero-featured-body {
  flex: 1;
  padding: 2rem 2rem 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  min-width: 0;
}
.hero-featured-text {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.hero-featured-label {
  font-size: 0.78rem;
  font-family: var(--font-ui);
  letter-spacing: 0.04em;
  color: #fff;
  margin: 0;
}
.hero-featured-title {
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.25;
  color: #fff;
  margin: 0;
}
.hero-featured-excerpt a { color: #fff; }
.hero-featured-btn {
  display: inline-block;
  padding: 0.35rem 1rem;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-family: var(--font-title);
  font-weight: 400;
  color: #111;
  background: #fff;
  width: fit-content;
  margin-top: auto;
}
.hero-featured-img-wrap {
  width: 300px;
  height: 300px;
  flex-shrink: 0;
}
.hero-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-featured-right-bar {
  width: 5rem;
  flex-shrink: 0;
  background: #111;
}
/* Shared prev/next nav strip (homepage hero + detail page) */
.post-nav {
  display: flex;
  background: #111;
  color: #fff;
  min-height: 5rem;
}
.reading-page .post-nav {
  max-width: var(--max-width-reading);
  margin: 0 auto;
}
.post-nav-side {
  flex: 1;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
}
.post-nav-right {
  justify-content: flex-end;
  text-align: right;
}
.post-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
}
.post-nav-link-right {
  flex-direction: row;
}
.post-nav-link:hover .post-nav-title {
  text-decoration: underline;
}
.post-nav-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  flex-shrink: 0;
}
.post-nav-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.post-nav-dir {
  font-size: 0.72rem;
  font-family: var(--font-ui);
  color: #aaa;
  letter-spacing: 0.04em;
}
.post-nav-title {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.3;
  color: #fff;
}
@media (max-width: 600px) {
  .hero-featured {
    flex-direction: column-reverse;
  }
  .hero-featured-img-wrap {
    width: 100%;
    height: 180px;
  }
  .hero-featured-body {
    padding: 1.25rem 1.25rem 1.5rem;
  }
  .hero-featured-title {
    font-size: 1.25rem;
  }
}
.hero-cta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 760px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
  box-sizing: border-box;
}
.hero-cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 5 / 3;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero-logo {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  margin: 0 auto 1.5rem;
}
.hero-wide {
  display: block;
  width: 100vw;
  max-height: clamp(420px, 25vw, 620px);
  object-fit: cover;
  object-position: center;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-top: calc(var(--nav-logo-height) - var(--nav-height) + 1rem);
  margin-bottom: 0;
}
.hero-wide-home {
  margin-top: 0;
}

/* City button palette — 16 cities, 16 colors, 16 animations */
/* .city-atl { background-color: #00C2CC; --city-img: url('/static/img/cities/atl.avif'); } */
.city-bos { background-color: #1A6B3C; --city-img: url("../img/cities/bos.avif"); }
.city-dal { background-color: #1B4D3E; --city-img: url("../img/cities/dal.avif"); }
.city-gua { background-color: #E8007D; --city-img: url("../img/cities/gua.avif"); }
.city-hou { background-color: #1976D2; --city-img: url("../img/cities/hou.avif"); }
.city-kan { background-color: #D32F2F; --city-img: url("../img/cities/kan.avif"); }
.city-la  { background-color: #FF6B6B; --city-img: url("../img/cities/la.avif");  }
.city-mex { background-color: #8B2FC9; --city-img: url("../img/cities/mex.avif"); }
.city-mia { background-color: #EE6EA0; --city-img: url("../img/cities/mia.avif"); }
.city-mon { background-color: #00C9A7; --city-img: url("../img/cities/mon.avif"); }
.city-nynj{ background-color: #12213A; --city-img: url("../img/cities/nynj.avif");}
.city-phi { background-color: #1B4FCC; --city-img: url("../img/cities/phi.avif"); }
.city-sea { background-color: #6E7A2C; --city-img: url("../img/cities/sea.avif"); }
.city-sf  { background-color: #D94D1A; --city-img: url("../img/cities/sf.avif");  }
.city-tor { background-color: #4D7EF7; --city-img: url("../img/cities/tor.avif"); }
.city-van { background-color: #163C35; --city-img: url("../img/cities/van.avif"); }

.city-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  max-width: 720px;
  margin: 0 auto 1.5rem;
  padding: 0 1rem;
}
.city-grid-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 5 / 3;
  border-radius: var(--radius-lg);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.city-grid-btn::before,
.hero-cta-btn::before,
.admin-link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--city-img);
  background-size: cover;
  background-position: center;
  opacity: 0;
  filter: brightness(1) contrast(1.2) saturate(1) opacity(0.9);
  transition: opacity 0.4s ease;
  z-index: -1;
}
.city-grid-btn:hover::before,
.hero-cta-btn:hover::before,
.admin-link-card:hover::before { opacity: 1; }

.admin-link-card--disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}
@media (max-width: 480px) {
  .city-grid { grid-template-columns: repeat(2, 1fr); }
}
.info-bar {
  position: relative;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #2040ff 0%, #3551ff 52%, #2743f0 100%);
  color: #ffffff;
  margin-bottom: 0;
}
.info-bar-home {
  margin-top: -2.1rem;
}
.info-bar-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0.5rem 1rem 0.55rem;
}
.info-bar-status {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-family: var(--font-ui);
  font-size: 1rem;
  letter-spacing: 0.03em;
}
.info-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}
.info-bar-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}
.info-bar-kicker {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.8;
}
.info-bar-matchup-link {
  text-decoration: none;
  color: inherit;
}
.info-bar-matchup {
  display: grid;
  grid-template-columns: auto min-content auto;
  align-items: start;
  justify-content: start;
  column-gap: 0.65rem;
}
.info-bar-matchup-kicker {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 0.15rem;
}
.info-bar-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 3.25rem;
}
.info-bar-flag {
  width: 52px;
  height: 34px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  display: block;
}
.info-bar-team-name {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}
.info-bar-versus {
  font-family: 'FWC26', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
  align-self: start;
  padding-top: 0.55rem;
}
.info-bar-countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(26px, 36px));
  justify-content: end;
  gap: 0.1rem;
}
.info-bar-countdown-unit {
  text-align: center;
}
.info-bar-countdown-value {
  display: block;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.info-bar-countdown-label {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-ui);
  font-size: 0.5rem;
  letter-spacing: 0.05em;
  opacity: 0.8;
}
@media (min-width: 768px) {
  .info-bar-home {
    margin-top: -3rem;
  }
  .info-bar-inner {
    padding: 0.52rem 1.5rem 0.58rem;
  }
  .info-bar-home .info-bar-inner {
    padding-top: 0.52rem;
    padding-left: calc(2rem + 78px + 1rem); /* clear logo: nav padding + logo width + gap */
  }
  .info-bar-content {
    gap: 1.5rem;
  }
  .info-bar-matchup {
    column-gap: 0.85rem;
  }
  .info-bar-countdown {
    grid-template-columns: repeat(4, minmax(42px, 56px));
    gap: 0.25rem;
  }
  .info-bar-countdown-value {
    font-size: 1.5rem;
  }
  .info-bar-countdown-label {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }
}

/* ============================================================
   READING / INFORMATIONAL PAGES
   ============================================================ */

/* Break out of site-main padding for a full-bleed header */
.reading-page {
  margin: -2.1rem -1rem -3rem;
}
@media (min-width: 768px) {
  .reading-page {
    margin: -3rem -2rem -3rem;
  }
}

/* Dark blue page banner */
.reading-header,
.reading-body {
  max-width: var(--max-width-reading);
  margin-left: auto;
  margin-right: auto;
}

.reading-header {
  background: #0b1e3d;
  color: #fff;
  padding: 2rem 1.5rem 1.75rem;
}
@media (min-width: 768px) {
  .reading-header {
    padding: 2.5rem 2.5rem 2rem;
  }
}
.reading-header h1 {
  color: #fff;
  margin: 0;
}



/* White content area */
.reading-body {
  background: var(--color-surface);
  padding: 2rem 1.5rem 3rem;
}
@media (min-width: 768px) {
  .reading-body {
    padding: 2.5rem 2.5rem 3.5rem;
  }
}

/* TOC section-jump buttons — reusable on reading pages */
.toc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.toc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #fff;
  transition: opacity 0.15s;
  border: none;       /* reset for <button> */
  cursor: pointer;    /* reset for <button> */
}
.toc-btn:hover { opacity: 0.82; }

/* Red accent line between sections */
.reading-body section + section {
  margin-top: 2.5rem;
  border-top: 1px solid var(--color-accent);
  padding-top: 1.75rem;
}
.reading-body section {
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

/* Section headings */
.reading-body h2 {
  margin-bottom: 0.75rem;
}

.admin-page .reading-body > h2 {
  color: #000;
}

.reading-body h2 a {
  color: inherit;
  text-decoration: none;
}
.reading-body h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
  font-size: 1.25rem;
  font-weight: 400;
  color: #333333;
}
.reading-body h4 {
  margin-top: 0.1rem;
  margin-bottom: 0.2rem;
}

/* Points table */
.points-legend {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.points-legend li {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-size: 0.95rem;
}
.points-legend-icon {
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
  width: 1.1em;
  text-align: center;
}
.points-legend-wrong   .points-legend-icon { color: var(--color-error); }
.points-legend-outcome .points-legend-icon { color: #0b1e3d; }
.points-legend-exact   .points-legend-icon { color: var(--color-success); }
.points-legend-wrong   b { color: var(--color-error); }
.points-legend-outcome b { color: #0b1e3d; }
.points-legend-exact   b { color: var(--color-success); }

.points-table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
}
.points-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.points-table th,
.points-table td {
  padding: 0.5rem 0.75rem;
  text-align: center;
  border: 1px solid var(--color-border);
}
.points-table th {
  background: var(--color-surface);
  font-weight: 600;
  color: #333;
}
.points-table th.th-pts-group { color: #333; font-weight: 600; border-bottom: none; }
.points-table col.col-pts      { width: 4rem; }
.points-table th.th-wrong   { color: var(--color-error); }
.points-table th.th-outcome { color: #0b1e3d; }
.points-table th.th-exact   { color: var(--color-success); }
.points-table td:first-child { text-align: left; }
.pts-multiplier { color: var(--color-text-muted); font-weight: 500; }
.pts-zero       { font-weight: 600; background: var(--color-pts-wrong-bg);   color: var(--color-error); }
.pts-outcome    { font-weight: 600; background: var(--color-pts-outcome-bg); color: #0b1e3d; }
.pts-exact      { font-weight: 700; background: var(--color-pts-exact-bg);   color: var(--color-success); }

/* Image placeholder */
.reading-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 7;
  background: var(--color-bg);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.reading-img {
  display: block;
  width: calc(100% + 3rem);
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  height: auto;
  margin-bottom: 1.25rem;
}
@media (min-width: 768px) {
  .reading-img {
    width: calc(100% + 5rem);
    margin-left: -2.5rem;
    margin-right: -2.5rem;
  }
}

/* Content */
.reading-body p {
  margin-bottom: 0.75rem;
  line-height: 1.65;
}
.reading-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.reading-body ol > li {
  margin-bottom: 0.3rem;
  line-height: 1.6;
}

/* FAQ items */
.reading-body ol > li > b {
  font-weight: 600;
}
.reading-body ol > li > p {
  margin-top: 0.15rem;
  margin-bottom: 0.65rem;
  color: var(--color-text-muted);
}

/* Sign-off */
.goodluck {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: #000000;
}
.goodluck p { margin: 0; }

/* Prizes Rules Custom Layout */
.prize-rules-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin: 1.5rem 0 2rem 0;
}
.prize-rules-img {
  flex-shrink: 0;
}
.prize-rules-img img {
  display: block;
}
.prize-rules-text {
  flex-grow: 1;
}
@media (min-width: 768px) {
  .prize-rules-layout {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }
}

.prize-chart-formula {
  font-size: 0.8rem !important;
  color: var(--color-text-muted) !important;
  border-bottom: none !important;
  padding-top: 0.6rem !important;
}

/* ============================================================
   PAYMENT METHODS
   ============================================================ */
.banner {
  padding: 1rem;
  border-radius: 0;
  color: #fff !important;
  font-weight: normal;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.banner a {
  color: #fff;
  text-decoration: underline;
  font-weight: bold;
}
.banner-error {
  background-color: var(--color-error);
}
.banner-invite {
  background-color: #E8820C;
}
.banner-info {
  background-color: #8B2FC9;
}
.banner-success {
  background-color: var(--color-success);
}

.payment-methods {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
  justify-content: center;
  align-items: center;
}
.payment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  max-width: 216px;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  transition: opacity 0.15s;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
}
.payment-btn:hover { opacity: 0.85; }
.payment-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ============================================================
   PREDICTIONS PAGE
   ============================================================ */

.pred-page {
  padding-bottom: 6rem; /* room for floating save bar */
}

/* --- Winners section --- */

.pred-winners-section {
  margin-bottom: 2rem;
}

.pred-section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.pred-section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  margin: 0;
  color: #fff;
}

.pred-section-meta {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

.pred-winners {
  background: #111 url("../img/predictions/fifa-cup.jpg") no-repeat -3rem center / auto 120%;
  padding: 0.75rem 0.5rem 0;
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-columns: 2rem 1fr auto 1fr;
  grid-template-rows: auto auto auto;
  gap: 0.5rem;
  align-items: start;
}

.pred-winners--locked {
  opacity: 0.6;
  pointer-events: none;
}

.pred-winners-locked-banner {
  background: var(--color-error-bg);
  color: var(--color-error);
  border-bottom: 1px solid var(--color-error-border);
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.pred-winner-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0;
}

.pred-winner-row:last-of-type {
}

.pred-winner-row--inactive {
}

/* Trophy via background-image on section — no element needed */
.pred-winners-cup { display: none; }

/* Centered content column */
.pred-winners-content {
  grid-column: 3;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

.pred-winners-dropdowns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  grid-column: 1 / -1;
  padding-top: 0.5rem;
}

.pred-winner-medal {
  font-size: 2.8rem;
  line-height: 1;
  flex-shrink: 0;
  width: 3.25rem;
  text-align: center;
}

.pred-winner-flag img {
  width: 40px;
  height: 27px;
  object-fit: cover;
  border-radius: 2px;
  vertical-align: middle;
}

.pred-winner-name {
  font-weight: 500;
  font-size: 0.95rem;
}

.pred-winner-select {
  width: 14rem;
  flex: none;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 0;
  font-family: inherit;
  font-size: 1.1rem;
  color: #fff;
  background: rgba(255,255,255,0.12);
  transition: border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.pred-winner-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.pred-winner-select:disabled {
  background: rgba(255,255,255,0.07);
  opacity: 1;
  cursor: default;
}

/* --- Floating save bar --- */

.pred-save-bar {
  position: sticky;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
  width: fit-content;
  pointer-events: none;
}

.pred-save-bar > * {
  pointer-events: auto;
}

.pred-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.75rem;
  background: #bbb;
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: default;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transition: background 0.2s, box-shadow 0.2s, opacity 0.15s, color 0.4s;
}

.pred-save-btn--dirty {
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.pred-save-btn--dirty:hover {
  opacity: 0.88;
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.4);
}

.pred-save-btn--dirty:active {
  opacity: 0.72;
}

.pred-save-btn--saving {
  background: #bbb;
  cursor: default;
}

.pred-save-btn--saved {
  background: var(--color-success);
  cursor: default;
}

.pred-save-btn--error {
  background: #d32f2f;
  cursor: default;
}

/* Round header --- */

.pred-round-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 1.5rem 0 0.5rem;
  border-bottom: 2px solid #0b1e3d;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.pred-round-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pred-round-pts {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.pred-round-pts-centered {
  justify-content: center;
  flex-wrap: wrap;
}

.pred-pts-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-decoration: none;
}

.pred-pts-wrong   { background: var(--color-pts-wrong-bg);   color: var(--color-error); }
.pred-pts-outcome { background: var(--color-pts-outcome-bg); color: #0b1e3d; }
.pred-pts-exact   { background: var(--color-pts-exact-bg);   color: var(--color-success); }

/* --- Match row --- */

.pred-match {
  display: grid;
  grid-template-columns: 3rem 1fr auto 1fr;
  align-items: start;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: background 0.15s;
  position: relative;
}

.pred-match-countdown {
  grid-column: 2 / -1;
  font-size: 0.82rem;
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-weight: 700;
  color: #111;
  text-align: center;
  padding-bottom: 0;
}

.pred-match-countdown-main {
  display: block;
}

.pred-match-actions {
  margin-top: 0.35rem;
  display: flex;
  justify-content: center;
}

.pred-match-edit-link {
  font-family: var(--font-ui);
}

.pred-match:hover {
  background: #fafafa;
}

.pred-match--inactive {
  opacity: 0.45;
}

.pred-match--inactive:hover {
  background: var(--color-surface);
}

.pred-match-id {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 111px;
}

.pred-match-id-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: #111;
  color: #fff;
  border-radius: 5px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
}

/* Team columns */

.pred-match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.pred-match-flag-link {
  display: block;
  line-height: 0;
}

.pred-match-team--local  { /* left column */ }
.pred-match-team--visitor { /* right column */ }

.pred-match-flag {
  width: 168px;
  height: 111px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.pred-match-team-name {
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* Centre column: inputs + meta */

.pred-match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 120px;
  max-width: 180px;
}

.pred-match-inputs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: center;
}

.pred-score-input {
  width: 2.8rem;
  padding: 0.3rem 0.25rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  color: var(--color-text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  /* hide spin buttons */
  -moz-appearance: textfield;
}

.pred-score-input::-webkit-outer-spin-button,
.pred-score-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pred-score-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.pred-score-input[readonly],
.pred-score-input:disabled {
  background: var(--color-bg);
  color: var(--color-text-muted);
  cursor: default;
  border-color: transparent;
}

.pred-score-input--error {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15) !important;
}

.form-error {
  color: var(--color-accent);
  background: rgba(233, 69, 96, 0.08);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.pred-match-vs {
  font-size: var(--font-size-label);
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
}

.pred-match-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.pred-match-date,
.pred-match-stadium-name,
.pred-match-stadium-city {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  text-align: center;
  white-space: nowrap;
}

.pred-match-countdown-value {
  letter-spacing: 0.03em;
}

.pred-winners-countdown {
  padding-bottom: 0.5rem;
}

.pred-winners .pred-match-countdown-value {
  color: #fff;
}

.pred-match-started-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.pred-match-no-prediction {
  font-size: 0.72rem;
  color: var(--color-accent);
  margin: 0;
  font-style: italic;
}

/* --- Toast --- */

.pred-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  z-index: 500;
  pointer-events: none;
}

.pred-toast--saved  { background: var(--color-success-bg); color: var(--color-success); border: 1px solid var(--color-success-border); }
.pred-toast--saving { background: var(--color-info-bg);    color: var(--color-info);    border: 1px solid var(--color-info-border); }
.pred-toast--error  { background: var(--color-error-bg);   color: var(--color-error);   border: 1px solid var(--color-error-border); }

/* --- Responsive --- */

@media (max-width: 600px) {
  /* Full-bleed cards by cancelling reading-body horizontal padding */
  .pred-page {
    margin: 0 -1.5rem;
  }

  .pred-round-header {
    padding: 1.1rem 1rem 0.4rem;
  }

  .pred-round-name {
    font-size: 1.2rem;
  }

  .pred-pts-pill {
    font-size: 0.65rem;
    min-width: 4rem;
    padding: 0.15rem 0.4rem;
  }

  .pred-winners {
    padding: 0.75rem 0.75rem 0;
  }

  .pred-winner-select {
    width: 11rem;
    font-size: 0.95rem;
  }

  .pred-winner-medal {
    font-size: 2rem;
    width: 2.5rem;
  }

  /* Match card: countdown goes absolute at top, grid centers flags with inputs */
  .pred-match {
    grid-template-columns: 1.5rem 1fr auto 1fr;
    align-items: center;
    gap: 0.3rem;
    padding: 0.75rem 0.5rem 1.4rem;
  }

  .pred-match-countdown {
    font-size: 0.82rem;
  }

  .pred-match-flag {
    width: 14vw;
    height: 9.3vw;
  }

  .pred-match-id {
    min-height: unset;
  }

  .pred-match-id-badge {
    font-size: 0.8rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
  }

  .pred-match-team-name {
    font-size: 0;
    width: 14vw;
    max-width: 14vw;
    overflow: visible;
    text-overflow: clip;
  }

  .pred-match-team-name::before {
    content: attr(data-short);
    display: inline-block;
    width: 100%;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: center;
  }

  .pred-score-input {
    width: 2.2rem;
    font-size: 1rem;
  }

  .pred-match-center {
    min-width: 90px;
  }

  .pred-match-date {
    font-size: 0.65rem;
  }

  .pred-match-stadium {
    display: none;
  }

  .pred-save-bar {
    bottom: 1.25rem;
  }
}

/* ============================================================
   STANDINGS
   ============================================================ */

.standings-page {
  /* inherits reading-page layout */
}

.standings-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.standings-filter-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.standings-filter-select {
  flex: 1;
  min-width: 10rem;
  max-width: 22rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  font-size: 0.9rem;
  cursor: pointer;
}

.standings-legend {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.standings-legend-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
}

.standings-legend-jump {
  white-space: nowrap;
  background-color: #f7d547;
  color: #111 !important;
}

.standings-scroll-hint {
  display: none;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  padding-left: 0.5rem;
}
@media (min-width: 1024px) {
  .standings-scroll-hint {
    display: block;
  }
}

/* Cell color classes (also used by legend pills via pred-pts-* reuse) */
.standings-row td.standings-wrong   { background: var(--color-pts-wrong-bg);   color: var(--color-error); }
.standings-row td.standings-outcome { background: var(--color-pts-outcome-bg); color: #0b1e3d; }
.standings-row td.standings-exact   { background: var(--color-pts-exact-bg);   color: var(--color-success); }

/* --- Scroll wrapper --- */
/* The wrapper breaks out of the central reading body column to flush against viewport edges at all sizes */
.standings-scroll-outer {
  width: 100vw;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  /* Intentionally no touch-action here: pan-x blocks native page vertical scroll on iPhone. */
  overscroll-behavior-x: contain;
  margin-left: calc(50% - 50vw);
  margin-bottom: -3rem; /* Push down to flush entirely against the footer (negates reading-body mobile padding) */
}

@media (max-width: 767px) {
  .standings-scroll-outer {
    margin-left: calc(50% - 50vw);
    width: 100vw;
  }
}

/* On wide screens we just override the previous min-width media query bounds safely */
@media (min-width: 768px) {
  .standings-scroll-outer {
    margin-left: calc(50% - 50vw);
    width: 100vw;
    margin-bottom: -3.5rem; /* Negates reading-body desktop padding */
  }
}

.standings-table-header-shell {
  position: sticky;
  top: var(--nav-height);
  z-index: 20;
  border-top: 1px solid var(--color-border);
  width: 100vw;
  overflow: hidden;
  margin-left: calc(50% - 50vw);
}

.standings-header-scroll {
  width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  pointer-events: auto;
}

.standings-header-scroll::-webkit-scrollbar {
  display: none;
}

@media (max-width: 767px) {
  .standings-table-header-shell {
    margin-left: calc(50% - 50vw);
    width: 100vw;
  }
}

.standings-chart-outer {
  border-top: 1px solid var(--color-border);
  width: 100vw;
  overflow-x: clip;
  margin-left: calc(50% - 50vw);
  margin-bottom: -3rem;
  padding: 1rem 1rem 2rem;
  background: var(--color-surface);
}

.standings-chart-shell {
  position: relative;
  width: 100%;
  min-height: 420px;
  height: clamp(420px, 62vh, 620px);
}

.standings-chart-shell canvas {
  width: 100%;
  height: 100%;
}

.standings-surface {
  transition: opacity 0.2s ease;
}

.standings-surface.is-loading {
  opacity: 0.4;
}

/* --- Table --- */
.standings-table {
  --standings-player-col-width: 172px;
  --standings-player-nickname-max: 92px;
  border-collapse: separate;
  border-spacing: 0;
  white-space: nowrap;
  font-size: 0.8rem;
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
}

.standings-table thead {
  position: static;
}

.standings-round-row th {
  background: var(--nav-bg);
  color: var(--nav-text);
  font-family: var(--font-title);
  text-align: center;
  padding: 0.1rem 0.2rem 0.06rem;
  border-right: 1px solid rgba(255,255,255,1);
  border-bottom: none;
}

.standings-round-cell {
  white-space: nowrap;
  vertical-align: middle;
}

/* Sticky cells span both header rows — use dark border to separate from content columns */
.standings-round-row .standings-sticky-player,
.standings-round-row .standings-sticky-total,
.standings-thead-row .standings-sticky-player,
.standings-thead-row .standings-sticky-total {
  border-right: 1px solid var(--color-border);
}

.standings-round-name {
  display: block;
  font-weight: 700;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.standings-round-mult {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  opacity: 0.85;
  margin-top: 0;
  white-space: nowrap;
}

.standings-thead-row th {
  background: var(--nav-bg);
  color: var(--nav-text);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.72rem;
  text-align: center;
  padding: 0.3rem 0.12rem;
  border-right: 1px solid rgba(255,255,255,1);
  vertical-align: bottom;
}

/* Columns that just have a single label — center it vertically */
.standings-thead-row .standings-vcenter {
  vertical-align: middle;
}

/* --- Sticky columns --- */
.standings-sticky-player {
  position: sticky;
  z-index: 3;
  left: 0;
  text-align: left;
}

/* Header sticky bg */
.standings-thead-row .standings-sticky-player,
.standings-round-row .standings-sticky-player {
  background: var(--nav-bg);
  z-index: 12;
}

.standings-thead-row .standings-sticky-player,
.standings-round-row .standings-sticky-player {
  box-shadow: 4px 0 8px rgba(0,0,0,0.35);
}

.standings-row .standings-sticky-player {
  box-shadow: 4px 0 8px rgba(0,0,0,0.12);
}

.standings-row--highlighted .standings-sticky-player {
  box-shadow: inset 3px 0 0 var(--color-primary);
}

/* --- Column widths --- */
.standings-table th.standings-col-player,
.standings-table td.standings-col-player {
  min-width: var(--standings-player-col-width);
  width: var(--standings-player-col-width);
  max-width: var(--standings-player-col-width);
  padding: 0;
}

@media (min-width: 1280px) {
  .standings-table {
    --standings-player-col-width: 220px;
    --standings-player-nickname-max: 140px;
  }

  .standings-table th.standings-col-player,
  .standings-table td.standings-col-player {
    min-width: var(--standings-player-col-width);
    width: var(--standings-player-col-width);
    max-width: var(--standings-player-col-width);
  }
}

.standings-table th.standings-col-match,
.standings-table td.standings-col-match {
  width: 3rem;
  min-width: 3rem;
  max-width: 3rem;
  line-height: 1.3;
  text-align: center;
  font-family: monospace;
}

.standings-thead-row th.standings-col-match {
  padding-left: 0.05rem;
  padding-right: 0.05rem;
}

.standings-col-match a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  color: inherit;
  text-decoration: none;
}

.standings-match-num {
  font-weight: 700;
  font-size: 0.82rem;
}

.standings-match-teams {
  font-size: 0.63rem;
  letter-spacing: 0.02em;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.02rem;
}

.standings-match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.standings-match-team-code {
  font-size: 0.4rem;
  text-align: center;
  line-height: 1;
}

.standings-match-sep {
  font-size: 0.55rem;
  opacity: 0.6;
  align-self: center;
}

.standings-match-flag {
  width: 0.95rem;
  height: 0.65rem;
  object-fit: cover;
  border-radius: 1px;
  display: block;
}

.standings-match-result {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
}

.standings-match-result-local,
.standings-match-result-visitor {
  min-width: 0.72rem;
  text-align: center;
}

.standings-match-result-sep {
  min-width: 0.35rem;
  text-align: center;
  font-size: 0.55rem;
}

.standings-col-match--scored .standings-match-result {
  color: #fff;
}

.standings-table th.standings-col-winner,
.standings-table td.standings-cell--winner {
  width: 2.75rem;
  min-width: 2.75rem;
  max-width: 2.75rem;
  text-align: center;
  line-height: 1.3;
  vertical-align: middle;
}

.standings-winner-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
}

.standings-winner-medal {
  font-size: 1.3rem;
  line-height: 1;
}

.standings-col-winner .standings-match-team {
  gap: 0.05rem;
}

.standings-col-winner .standings-match-team-code {
  font-size: 0.4rem;
}

.standings-col-winner .standings-match-flag {
  width: 0.95rem;
  height: 0.65rem;
}

/* --- Total sticky column (rightmost) --- */
.standings-table th.standings-col-total,
.standings-table td.standings-col-total {
  min-width: 3.2rem;
  width: 3.2rem;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.standings-sticky-total {
  position: sticky;
  right: 0;
  z-index: 3;
}

/* Header sticky bg */
.standings-thead-row .standings-sticky-total,
.standings-round-row .standings-sticky-total {
  background: var(--nav-bg);
  z-index: 12;
  box-shadow: -4px 0 8px rgba(0,0,0,0.35);
}

/* Body cell bg — covered by .standings-row td */
.standings-row .standings-sticky-total {
  box-shadow: -4px 0 8px rgba(0,0,0,0.12);
}

.standings-row--highlighted .standings-sticky-total {
  /* background inherited from .standings-row--highlighted td */
}

.standings-cell-total {
  font-size: 0.85rem;
  padding: 0.06rem 0.22rem;
  border-left: 2px solid var(--color-border);
}
/* --- Rows --- */
.standings-row {
  border-bottom: 1px solid var(--color-border);
}

.standings-row:last-child {
  border-bottom: none;
}

.standings-row td {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.standings-row:last-child td {
  border-bottom: none;
}

.standings-row--highlighted td,
.standings-row:has(a[id^="player_"]:target) td {
  /* Keep score color fills visible and highlight the row via a gold frame. */
  box-shadow: inset 0 2px 0 #d4a017, inset 0 -2px 0 #d4a017;
}

.standings-row--highlighted td:first-child,
.standings-row:has(a[id^="player_"]:target) td:first-child {
  box-shadow: inset 3px 0 0 #d4a017, inset 0 2px 0 #d4a017, inset 0 -2px 0 #d4a017;
}

.standings-row--highlighted td:last-child,
.standings-row:has(a[id^="player_"]:target) td:last-child {
  box-shadow: inset -3px 0 0 #d4a017, inset 0 2px 0 #d4a017, inset 0 -2px 0 #d4a017;
}

.standings-row--highlighted .standings-sticky-player,
.standings-row:has(a[id^="player_"]:target) .standings-sticky-player {
  box-shadow: inset 0 2px 0 #d4a017, inset 0 -2px 0 #d4a017, 4px 0 8px rgba(0,0,0,0.12);
}

td.standings-col-player {
  padding: 0;
}

.standings-player-link {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  min-width: 0;
  padding: 0.12rem 0.4rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 400;
  font-size: 0.72rem;
}

.standings-player-rank {
  width: 1.0rem;
  min-width: 1.0rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text);
}

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

.standings-avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.standings-avatar--initial {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-text-muted);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.standings-player-pts {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  min-width: 2ch;
  text-align: right;
  flex-shrink: 0;
}

.standings-nickname {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: var(--standings-player-nickname-max);
}

.standings-cell {
  text-align: center;
  padding: 0.08rem;
  font-variant-numeric: tabular-nums;
  font-family: monospace;
  font-size: 0.78rem;
  font-weight: 600;
  min-width: 2.75rem;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.standings-row td.standings-cell--na {
  background: #c0c0c0;
  color: #333;
  font-weight: 400;
  font-size: 0.65rem;
}

.standings-cell--winner {
  min-width: 2.75rem;
  max-width: 2.75rem;
  white-space: nowrap;
}

.standings-flag {
  width: 1rem;
  height: 0.7rem;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 0.15rem;
  border-radius: 1px;
}

.standings-winner-team {
  font-size: 0.7rem;
  font-weight: 600;
  vertical-align: middle;
}

.standings-winner-unknown {
  opacity: 0.3;
  font-size: 0.85rem;
}

.standings-empty {
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
  padding: 3rem 0;
}

/* --- Mobile adjustments --- */
@media (max-width: 767px) {
  .standings-table {
    --standings-player-col-width: 106px;
    --standings-player-nickname-max: 65px;
  }

  .standings-col-player {
    min-width: var(--standings-player-col-width);
  }

  .standings-player-link {
    gap: 0.12rem;
    padding-left: 0.0rem;
    padding-right: 0.0rem;
  }

  .standings-player-rank {
    width: 1rem;
    min-width: 1rem;
  }

  .standings-nickname {
    max-width: var(--standings-player-nickname-max);
  }

  .standings-player-pts {
    display: none;
  }

  .standings-table th.standings-col-match,
  .standings-table td.standings-col-match {
    width: 2.5rem;
    min-width: 2.5rem;
    max-width: 2.5rem;
  }

  .standings-match-sep {
    display: none;
  }

  .standings-match-teams {
    gap: 0.25rem;
  }

  .standings-chart-outer {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    width: auto;
    padding: 0.75rem 0.75rem 1.5rem;
    margin-bottom: -2rem;
  }

  .standings-chart-shell {
    min-height: 320px;
    height: clamp(320px, 54vh, 440px);
  }
}

/* ============================================================
   NEWS
   ============================================================ */

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.news-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.news-card-img-wrap {
  width: 100%;
  max-height: 280px;
  overflow: hidden;
  flex-shrink: 0;
}
.news-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-body {
  padding: 1rem 1.25rem 1.25rem;
}
.news-card-date {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
  font-family: var(--font-ui);
  letter-spacing: 0.04em;
}
.news-card-title {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
}

@media (min-width: 640px) {
  .news-card {
    flex-direction: row;
  }
  .news-card-img-wrap {
    width: 220px;
    max-height: none;
    flex-shrink: 0;
  }
  .news-card-img {
    height: 100%;
  }
  .news-card-body {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* Rendered Markdown body */
.news-detail-cover {
  width: calc(100% + 3rem);
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  margin-top: -2rem;
  max-height: 420px;
  object-fit: cover;
  display: block;
  margin-bottom: 2rem;
  border-radius: 0;
}
@media (min-width: 768px) {
  .news-detail-cover {
    width: calc(100% + 5rem);
    margin-left: -2.5rem;
    margin-right: -2.5rem;
    margin-top: -2.5rem;
  }
}
.news-body-html h1,
.news-body-html h2,
.news-body-html h3,
.news-body-html h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.news-body-html p {
  margin-bottom: 1rem;
  line-height: 1.7;
}
.news-body-html ul,
.news-body-html ol {
  margin: 0.5rem 0 1rem 1.5rem;
  line-height: 1.7;
}
.news-body-html a {
  color: var(--color-primary);
}
.news-body-html img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
}
.news-body-html blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 1rem;
  color: var(--color-text-muted);
  margin: 1rem 0;
}
.news-body-html code {
  background: var(--color-bg);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.9em;
}
.news-body-html pre {
  background: var(--color-bg);
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 1rem;
}
.news-body-html pre code {
  background: none;
  padding: 0;
}

/* -------------------------------------------------------------------------
   Standings Segmented Control
------------------------------------------------------------------------- */
.standings-segmented-control {
  display: flex;
  width: 100%;
  margin-bottom: 1.5rem;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 9999px;
  padding: 4px;
}
.standings-segmented-control a {
  flex: 1;
  text-align: center;
  padding: 0.4rem 0;
  text-decoration: none;
  font-weight: 400;
  font-size: 0.9em;
  border-radius: 9999px;
  transition: background-color 0.2s, color 0.2s;
}
.standings-segmented-control a.active {
  background-color: #8B2FC9;
  color: #fff;
}
.standings-segmented-control a:not(.active) {
  color: #000;
  background-color: transparent;
}
.standings-segmented-control a:not(.active):hover {
  background-color: #f8f8f8;
}

.standings-chart-prune-note {
  margin: -0.75rem 0 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ============================================================
   UTILITY CLASSES (Added during cleanup)
   ============================================================ */

/* Text & Colors */
.text-center { text-align: center !important; }
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }
.text-muted { color: var(--color-text-muted); }
.text-warn { color: var(--color-warn, #d97706); }
.text-success { color: var(--color-success); }
.text-accent { color: var(--color-accent); }
.text-inherit { color: inherit; }
.text-no-decoration { text-decoration: none; }
.bg-gold { background: #C9A84C; }
.bg-silver { background: #9BA4AF; }
.bg-bronze { background: #A0522D; }
.fw-normal { font-weight: 400; }
.fw-600 { font-weight: 600; }

/* Layout & Flexbox */
.d-flex { display: flex; }
.d-contents { display: contents; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.max-w-xs { max-width: 280px; }
.object-fit-cover { object-fit: cover; }
.cursor-pointer { cursor: pointer; }
.ml-auto { margin-left: auto; }

/* Spacing Components */
.gap-xs { gap: 0.35rem; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }

.mb-sm { margin-bottom: 0.5rem; }
.mb-md { margin-bottom: 1rem; }
.mb-lg { margin-bottom: 1.5rem; }

.mt-xs { margin-top: 0.4rem; }
.mt-sm { margin-top: 0.5rem; }
.mt-md { margin-top: 1rem; }
.mt-md-lg { margin-top: 1.25rem; }
.mt-lg { margin-top: 1.5rem; }
.mt-xl { margin-top: 2rem; }

/* Interactive & Forms */
.sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.input-disabled { background: #f0f0f0; color: #666; cursor: not-allowed; }
.is-uploading { opacity: 0.4; pointer-events: none; }
.custom-checkbox { width: 1.1rem; height: 1.1rem; cursor: pointer; accent-color: var(--color-accent); flex-shrink: 0; }

/* Page Components */
.page-title { font-size: 1.5rem; margin-bottom: 0.25rem; }
.admin-page-title { font-size: 1.5rem; margin-bottom: 1.5rem; }
.admin-cover-preview { height: 80px; object-fit: cover; border-radius: var(--radius-sm); }
.btn-join { background: #1976D2; color: #fff; border-radius: 999px; padding: 0.55rem 1.75rem; font-size: 1rem; font-weight: 500; letter-spacing: 0.04em; }

.onboarding-logo { max-width: 140px; height: auto; }
.onboarding-title { font-family: 'FIFATournament', var(--font-title); font-weight: 900; font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1; margin-bottom: 0.5rem; color: #000000; text-align: center; }

.avatar-profile-lg { font-size: 5rem; }

/* Filter Form Table */
.filter-table { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; font-size: 1rem; }
.filter-table col.col-cb { width: 2.2rem; }
.filter-table col.col-info { width: 2.5rem; }
.filter-table td { padding: 0.35rem 0.5rem; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-table td.td-cb { padding-left: 0.5rem; padding-right: 0.25rem; text-align: center; }
.filter-table td.td-info { padding-left: 0.25rem; padding-right: 0.5rem; text-align: center; }
.filter-table .cb-input { display: inline-block; margin: 0; pointer-events: auto; }
.filter-table .avatar-wrap { width: 2rem; height: 2rem; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.filter-table .text-wrap { display: flex; align-items: center; height: 2rem; }
.filter-table .nick-gap { display: flex; align-items: center; gap: 0.5rem; height: 100%; pointer-events: none; }
@media (max-width: 480px) {
  .filter-table { font-size: 0.75rem; }
  .filter-table col.col-cb { width: 1.4rem; }
  .filter-table col.col-info { width: 1.4rem; }
  .filter-table td { padding: 0.25rem 0.2rem; }
  .filter-table td.td-cb { padding-left: 0; padding-right: 0.15rem; }
  .filter-table td.td-info { padding-left: 0.15rem; padding-right: 0; }
  .filter-table .avatar-wrap { width: 1.35rem; height: 1.35rem; font-size: 0.65rem; }
  .filter-table .text-wrap { height: 1.35rem; }
  .filter-table .nick-gap { gap: 0.3rem; }
}

/* ---------------------------------------------------------------------------
   Match Detail
--------------------------------------------------------------------------- */

.match-meta-text {
  font-size: 0.8rem;
}

.match-round-title {
  color: #000;
  font-size: 1rem;
}

.match-teams-container {
  width: 100%;
  margin: 0 auto;
  overflow: visible;
}

/* Mobile: columns narrowed so ~15% space exists on each outer edge for the arrows */
.match-teams-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1%;
  width: 100%;
}

.match-flag-wrapper {
  position: relative;
  width: 100%;
}

.match-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  font-weight: 400;
  color: #6600cc;
  text-decoration: none;
  line-height: 1;
  user-select: none;
  z-index: 1;
}

.match-nav-arrow--prev {
  right: 100%;
  padding-right: 0.75rem;
}

.match-nav-arrow--next {
  left: 100%;
  padding-left: 0.75rem;
}

.match-nav-arrow:hover {
  color: #4400aa;
}

.match-team-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 26%;
  text-align: center;
}

.match-team-name {
  font-size: 1.5rem;
  color: #000;
  min-height: 4rem; /* reserve 2-line height so scores stay aligned */
  display: flex;
  align-items: center;
  justify-content: center;
}

.match-score {
  font-size: 4rem;
  line-height: 1;
  color: #000;
}

.match-center-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 16%;
  text-align: center;
}

.match-vs {
  font-size: 2rem;
  font-weight: 300;
}

.match-edit-meta-field {
  display: block;
  width: min(680px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.match-edit-meta-field select,
.match-edit-meta-field input[type="datetime-local"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.match-edit-side-field {
  text-align: center;
  width: min(260px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.match-edit-side-field select,
.match-edit-side-field input[type="number"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .match-edit-form .match-team-col {
    width: 44%;
  }

  .match-edit-form .match-center-col {
    width: 8%;
  }

  .match-edit-side-field {
    width: 100%;
  }

  .match-edit-side-field select,
  .match-edit-side-field input[type="number"] {
    font-size: 0.8rem;
    padding: 0.45rem 0.5rem;
  }

  .match-edit-meta-field .profile-field-label,
  .match-edit-side-field .profile-field-label {
    display: none;
  }
}

.match-flag {
  width: 100%;
  height: auto;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  display: block;
}

.match-chart-outer {
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding-bottom: 2rem;
}

#chart-wrapper-card {
  width: 100%;
  padding: 0;
}

.match-chart-canvas-wrap {
  position: relative;
  width: 100%;
}

.match-chart-pie-wrap {
  position: relative;
  width: min(220px, 80%);
  margin: 0 auto;
}

.match-bar-section {
  width: 100%;
  margin-top: 3rem;
}

.match-bar-title {
  font-size: 1.2rem;
}

/* ── Other matches section ─────────────────────────────────────────────────── */

.other-matches-section {
  margin-bottom: 2rem;
}

.other-matches-cols {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1%;
}

.other-matches-spacer {
  width: 4%;
  flex-shrink: 0;
}

.other-matches-col {
  width: 47%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.other-matches-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

a.other-match-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  text-decoration: none;
  color: inherit;
  padding: 0.15rem 0;
  font-size: 0.8rem;
  transition: color 0.15s;
}

a.other-match-row:hover {
  color: #6600cc;
}

.other-match-flag {
  width: 1.75rem;
  height: auto;
  flex-shrink: 0;
}

.other-match-score,
.other-match-date {
  width: 2.5rem;
  flex-shrink: 0;
  text-align: center;
  font-size: 0.75rem;
}

.other-match-score {
  font-weight: 700;
}

.other-match-date {
  color: var(--color-text-muted, #666);
  font-size: 0.68rem;
}

/* ── End other matches ─────────────────────────────────────────────────────── */

.match-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1.25rem;
}

.match-countdown-units {
  display: flex;
  gap: 0.4rem;
}

.match-countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.25rem;
}

.match-countdown-value {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #111;
}

.match-countdown-label {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

@media (min-width: 600px) {
  #chart-wrapper-card {
    padding: 2rem;
    max-width: 800px;
  }

  .match-round-title {
    font-size: 1.5rem;
  }

  .match-teams-container {
    max-width: 600px;
    padding: 0 1rem;
  }

  .other-match-flag {
    width: 3rem;
  }

  .other-match-score,
  .other-match-date {
    width: 3rem;
    font-size: 0.8rem;
  }

  .other-match-date {
    font-size: 0.72rem;
  }

  .other-matches-col {
    width: 26%;
  }

  .other-matches-spacer {
    width: 16%;
  }

  /* 600–900px: keep center layout, moderate arrow size so they stay inside row margins */
  .match-teams-row {
    justify-content: center;
    gap: 0;
  }

  .match-team-col {
    width: 30%;
  }

  .match-center-col {
    width: 14%;
  }

  .match-nav-arrow {
    font-size: 2.5rem;
  }

  .match-nav-arrow--prev {
    padding-right: 1rem;
  }

  .match-nav-arrow--next {
    padding-left: 1rem;
  }

  .match-countdown-value {
    font-size: 2rem;
  }

  .match-countdown-unit {
    min-width: 3rem;
  }
}

@media (min-width: 900px) {
  /* Wide viewport: page margins absorb arrow overflow, use larger arrows */
  .match-team-col {
    width: 35%;
  }

  .match-nav-arrow {
    font-size: 3.5rem;
  }

  .match-nav-arrow--prev {
    padding-right: 1.5rem;
  }

  .match-nav-arrow--next {
    padding-left: 1.5rem;
  }
}
