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

/* --- Design Tokens --- */
:root {
  --nav-height: 52px;
  --nav-logo-height: 88px;     /* extends 36px below nav bar */

  --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('/static/fonts/FWC26-NormalLight.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'FWC26';
  font-weight: 400;
  font-style: normal;
  src: url('/static/fonts/FWC26-NormalRegular.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'FWC26';
  font-weight: 500;
  font-style: normal;
  src: url('/static/fonts/FWC26-NormalMedium.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'FWC26';
  font-weight: 700;
  font-style: normal;
  src: url('/static/fonts/FWC26-NormalBold.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'FWC26';
  font-weight: 900;
  font-style: normal;
  src: url('/static/fonts/FWC26-NormalBlack.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'FWC26Condensed';
  font-weight: 900;
  font-style: normal;
  src: url('/static/fonts/FWC26-CondensedBlack.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'FIFATournament';
  font-weight: 900;
  font-style: normal;
  src: url('/static/fonts/FIFATournament-Black.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'FIFASans';
  font-weight: 400;
  font-style: normal;
  src: url('/static/fonts/FIFASans-Regular.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'FIFASans';
  font-weight: 500;
  font-style: normal;
  src: url('/static/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 */
}

/* ============================================================
   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; }
}

.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-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 {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}
.avatar-preview-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.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-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); }

/* 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;
}

/* Inline nickname pill used by the nickname() macro */
.user-nickname {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  text-decoration: none;
  color: inherit;
}
.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-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-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;
}
.profile-table th,
.profile-table td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.profile-table th {
  font-size: var(--font-size-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-caps);
  color: var(--color-text-muted);
}
.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-border);
  border-radius: var(--radius-md);
  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 .label { color: var(--color-text-muted); }
.badge-yes { color: var(--color-success); font-weight: 600; }
.badge-no  { color: #bbb; }

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

.admin-page {
  max-width: var(--max-width);
  margin: 0 auto;
}

.users-table-wrap {
  overflow-x: auto;
}

.users-table {
  min-width: 760px;
}

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

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

.admin-link-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.admin-link-kind {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  padding: 0.1rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.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);
}

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

  .admin-link-topline {
    margin-bottom: 2rem;
  }

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

/* ============================================================
   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 1rem 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;
}
.hero-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}
.hero-cta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 760px;
  margin: 0 auto 2rem;
}
.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('/static/img/cities/bos.avif'); }
.city-dal { background-color: #1B4D3E; --city-img: url('/static/img/cities/dal.avif'); }
.city-gua { background-color: #E8007D; --city-img: url('/static/img/cities/gua.avif'); }
.city-hou { background-color: #1976D2; --city-img: url('/static/img/cities/hou.avif'); }
.city-kan { background-color: #D32F2F; --city-img: url('/static/img/cities/kan.avif'); }
.city-la  { background-color: #FF6B6B; --city-img: url('/static/img/cities/la.avif');  }
.city-mex { background-color: #8B2FC9; --city-img: url('/static/img/cities/mex.avif'); }
.city-mia { background-color: #EE6EA0; --city-img: url('/static/img/cities/mia.avif'); }
.city-mon { background-color: #00C9A7; --city-img: url('/static/img/cities/mon.avif'); }
.city-nynj{ background-color: #12213A; --city-img: url('/static/img/cities/nynj.avif');}
.city-phi { background-color: #1B4FCC; --city-img: url('/static/img/cities/phi.avif'); }
.city-sea { background-color: #6E7A2C; --city-img: url('/static/img/cities/sea.avif'); }
.city-sf  { background-color: #D94D1A; --city-img: url('/static/img/cities/sf.avif');  }
.city-tor { background-color: #4D7EF7; --city-img: url('/static/img/cities/tor.avif'); }
.city-van { background-color: #163C35; --city-img: url('/static/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; }
@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-home .info-bar-inner {
  padding-top: calc(var(--nav-logo-height) - var(--nav-height) + 0.48rem);
}
.info-bar-status {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 1rem;
  letter-spacing: 0.03em;
}
.info-bar-content {
  display: grid;
  gap: 1rem;
  align-items: center;
}
.info-bar-side {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.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 {
  display: grid;
  grid-template-columns: auto min-content auto;
  align-items: start;
  justify-content: start;
  column-gap: 0.85rem;
}
.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(42px, 56px));
  justify-content: start;
  gap: 0.25rem;
}
.info-bar-countdown-unit {
  text-align: center;
}
.info-bar-countdown-value {
  display: block;
  font-family: var(--font-ui);
  font-size: 1.5rem;
  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.68rem;
  letter-spacing: 0.1em;
  opacity: 0.8;
}
@media (min-width: 900px) {
  .info-bar-inner {
    padding: 0.52rem 1.5rem 0.58rem;
  }
  .info-bar-content {
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
  }
  .info-bar-matchup {
    grid-column: 1;
  }
  .info-bar-side {
    grid-column: 2;
    justify-self: end;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }
  .info-bar-countdown {
    justify-content: end;
  }
}

@media (min-width: 768px) {
  .info-bar-home {
    margin-top: -3rem;
  }
  .info-bar-home .info-bar-inner {
    padding-top: 0.52rem;
  }
}

@media (max-width: 899px) {
  .info-bar-content {
    grid-template-columns: 1fr auto 1fr;
    gap: 0.6rem;
    width: 100%;
  }
  .info-bar-matchup {
    grid-column: 2;
  }
  .info-bar-side {
    grid-column: 3;
    justify-self: end;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0;
  }
  .info-bar-countdown {
    justify-content: end;
    grid-template-columns: repeat(4, minmax(28px, 40px));
    gap: 0.1rem;
  }
  .info-bar-countdown-value {
    font-size: 1rem;
  }
  .info-bar-countdown-label {
    font-size: 0.5rem;
    letter-spacing: 0.03em;
  }
  .info-bar-button {
    display: none;
  }
}

@media (max-width: 540px) {
  .info-bar-inner {
    padding: 0.48rem 0.85rem 0.5rem;
  }
  .info-bar-matchup {
    column-gap: 0.65rem;
  }
  .info-bar-side {
    gap: 0;
  }
  .info-bar-team {
    gap: 0.35rem;
  }
  .info-bar-team-name {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
  }
  .info-bar-countdown {
    grid-template-columns: repeat(4, minmax(24px, 32px));
    width: auto;
    max-width: none;
    gap: 0.08rem;
  }
  .info-bar-countdown-value {
    font-size: 0.9rem;
  }
  .info-bar-countdown-label {
    font-size: 0.46rem;
  }
}

/* ============================================================
   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;
}
.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;
}
.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-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-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; }

/* ============================================================
   PRIZE CHART
   ============================================================ */

.prize-chart-wrap {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.prize-chart-img {
  width: 220px;
  height: 220px;
  flex-shrink: 0;
}

.prize-chart-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  min-width: 180px;
}

.prize-chart-legend li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.prize-chart-legend li:last-child { border-bottom: none; }

.prize-chart-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

.prize-chart-rank { flex: 1; font-weight: 500; }

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

.prize-chart-amt  { font-weight: 600; color: var(--color-accent); margin-left: auto; }

.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
   ============================================================ */
.payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
  justify-content: center;
}
.payment-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: opacity 0.15s;
}
.payment-btn:hover { opacity: 0.85; }
.payment-logo {
  height: 4rem;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.payment-venmo  { background: #3D95CE; color: #fff; }
.payment-paypal { background: #fff; color: #003087; border: 2px solid #003087; }

/* ============================================================
   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('/static/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;
}

/* 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-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;
}

.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: 2rem 1fr auto 1fr;
  grid-template-rows: auto auto;
  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:hover {
  background: #fafafa;
}

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

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

.pred-match-id {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-align: center;
  min-height: 111px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Team columns */

.pred-match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 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 {
    font-size: 0.8rem;
    min-height: unset;
  }

  .pred-match-team-name {
    font-size: 0;
    max-width: 5vw;
  }

  .pred-match-team-name::before {
    content: attr(data-short);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
  }

  .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;
  }
}
