/* VIDIO QUIZ — design tokens
   Base: deep chalkboard green + warm marigold accent + off-white ink.
   Display: Bitter (slab serif, exam/certificate feel). Body/UI: Inter. */

@import url('https://fonts.googleapis.com/css2?family=Bitter:wght@500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --ink-deep: #142B26;
  --ink-panel: #1B3630;
  --ink-line: #2C4B44;
  --paper: #F5F1E6;
  --paper-dim: #D9D3C0;
  --marigold: #F0A93C;
  --marigold-dim: #7A5A22;
  --coral: #FF6B5E;
  --mint: #6FCF97;
  --female-accent: #E77FA1;
  --male-accent: #5B9BD5;
  --shadow: rgba(0,0,0,0.28);

  --font-display: 'Bitter', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink-deep);
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-width: 0;
}

img { max-width: 100%; display: block; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

a { color: var(--marigold); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--marigold);
  outline-offset: 2px;
}

p { color: var(--paper-dim); margin: 0 0 1em; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.narrow { max-width: 480px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* Ledger rule — used to underline stat groups instead of a generic card shadow */
.ledger-rule {
  border: none;
  border-top: 1px solid var(--ink-line);
  margin: 20px 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  min-height: 46px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--marigold); color: #1B1204; box-shadow: 0 4px 14px rgba(240,169,60,0.28); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(240,169,60,0.36); }
.btn-secondary { background: transparent; color: var(--paper); border: 1px solid var(--ink-line); }
.btn-secondary:hover { border-color: var(--marigold); }

/* Farm shop: gender + stage cues on animal buy buttons */
.gender-female { border-color: var(--female-accent); color: var(--female-accent); }
.gender-female:hover { border-color: var(--female-accent); background: rgba(231,127,161,0.12); }
.gender-male { border-color: var(--male-accent); color: var(--male-accent); }
.gender-male:hover { border-color: var(--male-accent); background: rgba(91,155,213,0.12); }
.stage-young { border-style: dashed; }
.stage-mature { border-style: solid; border-width: 2px; font-weight: 600; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--paper-dim); margin: 16px 0 6px; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink-line);
  background: var(--ink-panel);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px; /* 16px+ prevents iOS Safari auto-zoom on focus */
  min-height: 46px;
}
textarea { min-height: 80px; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--marigold);
  outline-offset: 1px;
}
.field-error { color: var(--coral); font-size: 13px; margin-top: 4px; }
.form-msg { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-top: 16px; }
.form-msg.error { background: rgba(255,107,94,0.15); color: var(--coral); border: 1px solid rgba(255,107,94,0.35); }
.form-msg.success { background: rgba(111,207,151,0.15); color: var(--mint); border: 1px solid rgba(111,207,151,0.35); }

/* One-on-one support conversation thread (help.html + admin.html) */
.chat-thread { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; padding: 4px 2px; margin: 12px 0; }
.chat-bubble { max-width: 82%; padding: 8px 12px; border-radius: var(--radius-md); font-size: 13.5px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.chat-bubble-user { align-self: flex-end; background: var(--marigold); color: #1B1204; border-bottom-right-radius: 3px; }
.chat-bubble-admin { align-self: flex-start; background: var(--ink-panel); border: 1px solid var(--ink-line); color: var(--paper); border-bottom-left-radius: 3px; }
.chat-bubble-meta { font-size: 10.5px; opacity: 0.7; margin-top: 3px; }
.chat-reply-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-reply-row textarea { flex: 1; min-height: 40px; }

/* Nav */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 16px 0;
}
.brand {
  font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--paper); flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 8px;
}
.brand span { color: var(--marigold); }
.brand-icon { width: 28px; height: 28px; flex-shrink: 0; }
.topnav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: flex-end;
}
.topnav-links a { color: var(--paper-dim); font-weight: 500; font-size: 15px; }
.topnav-links a:hover { color: var(--paper); text-decoration: none; }

/* Bottom mobile nav */
.bottomnav {
  position: fixed;
  left: 12px; right: 12px;
  bottom: max(70px, calc(56px + env(safe-area-inset-bottom)));
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(27,54,48,0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg);
  padding: 6px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.03);
}
.bottomnav a {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 8px 2px;
  min-height: 46px;
  color: var(--paper-dim);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  border-radius: var(--radius-md);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.bottomnav a:hover { color: var(--paper); text-decoration: none; background: rgba(255,255,255,0.05); }
.bottomnav a.active { color: var(--marigold); background: rgba(240,169,60,0.12); }
.bottomnav a.active::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--marigold);
  box-shadow: 0 0 6px rgba(240,169,60,0.7);
}
.bottomnav svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-width 0.15s ease;
}
.bottomnav a.active svg { stroke-width: 2.2; }
.page-with-bottomnav { padding-bottom: 150px; }

/* Cards */
.card {
  background: var(--ink-panel);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.stat-block { padding: 16px 0; }
.stat-value { font-family: var(--font-display); font-size: clamp(22px, 6vw, 30px); font-weight: 700; color: var(--paper); }
#rpm-ticker { transition: color 0.4s ease; }
#rpm-ticker.rpm-up { color: #3ddc84; }
#rpm-ticker.rpm-down { color: #ff6b6b; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--paper-dim); margin-top: 2px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px) { .grid-2, .grid-3 { grid-template-columns: 1fr 1fr; gap: 10px; } .card { padding: 14px; } }

/* Progress bar */
.progress-track { height: 10px; background: var(--ink-line); border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--marigold); border-radius: 6px; transition: width 0.4s ease; }

/* Badges */
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-mint { background: rgba(111,207,151,0.18); color: var(--mint); }
.badge-coral { background: rgba(255,107,94,0.18); color: var(--coral); }
.badge-marigold { background: rgba(240,169,60,0.18); color: var(--marigold); }

/* Avatars */
.avatar-wrap { position: relative; flex-shrink: 0; width: 84px; height: 84px; }
.avatar-lg {
  width: 84px; height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ink-line);
  background: var(--ink-panel);
}
.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--marigold);
  background: var(--ink-panel);
}
.avatar-edit-btn {
  position: absolute; bottom: -2px; right: -2px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--marigold);
  color: #1B1204;
  border-radius: 50%;
  border: 2px solid var(--ink-deep);
  font-size: 14px;
  cursor: pointer;
}
.avatar-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--ink-line);
  vertical-align: middle;
}
.avatar-wrap-md { position: relative; flex-shrink: 0; width: 52px; height: 52px; }
.avatar-md {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ink-line);
  background: var(--ink-panel);
}
.avatar-md.avatar-fallback { font-size: 20px; border: 2px solid var(--ink-line); }
.level-badge {
  position: absolute; bottom: -3px; right: -3px;
  min-width: 20px; height: 20px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink-deep); color: var(--marigold);
  border: 2px solid var(--marigold);
  border-radius: 999px;
  font-family: var(--font-display); font-weight: 700;
  font-size: 10px; line-height: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.45);
}

/* Monetized-creator verification treatment: marigold ring on the
   avatar itself + a small filled checkmark badge. Badge sits at
   top-right so it never collides with the level-badge (bottom-right)
   or per-page corner elements (avatar-edit-btn, hero-role-badge). */
.avatar-lg.is-verified,
.avatar-md.is-verified,
.avatar-sm.is-verified {
  border-color: var(--marigold);
  box-shadow: 0 0 0 2px rgba(240,169,60,0.35);
}
.verified-badge {
  position: absolute; top: -3px; right: -3px;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--marigold); color: #1B1204;
  border: 2px solid var(--ink-deep);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.45);
}
.verified-badge svg { width: 10px; height: 10px; display: block; }
.badge-monetized-pill { margin-top: 6px; }

/* Nav status cluster: online presence + notification bell */
.nav-status { display: flex; align-items: center; gap: 12px; margin-right: 4px; }
.online-pill {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--paper-dim);
  background: rgba(111,207,151,0.12);
  border: 1px solid rgba(111,207,151,0.3);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}
.online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 rgba(111,207,151,0.5);
  animation: online-pulse 2s infinite;
}
@keyframes online-pulse {
  0% { box-shadow: 0 0 0 0 rgba(111,207,151,0.5); }
  70% { box-shadow: 0 0 0 6px rgba(111,207,151,0); }
  100% { box-shadow: 0 0 0 0 rgba(111,207,151,0); }
}
.notif-wrap { position: relative; }
.notif-bell {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: var(--ink-deep);
  border: 1px solid var(--ink-line);
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: var(--paper);
}
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 3px;
  display: none; align-items: center; justify-content: center;
  background: var(--coral);
  color: #2A0E09;
  font-size: 10px; font-weight: 700;
  border-radius: 999px;
  border: 2px solid var(--ink-deep);
}
.notif-panel {
  position: fixed;
  width: 300px;
  max-width: calc(100vw - 24px);
  max-height: 380px;
  background: var(--ink-panel);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
  z-index: 200;
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.notif-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-line);
  font-size: 13px;
}
.notif-panel-head a { font-size: 12px; color: var(--marigold); }
#notif-list { overflow-y: auto; flex: 1; }
.notif-empty { padding: 24px 14px; text-align: center; color: var(--paper-dim); font-size: 13px; }
.notif-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--ink-line);
  cursor: pointer;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(240,169,60,0.08); }
.notif-item-title { font-size: 13px; font-weight: 700; color: var(--paper); overflow-wrap: break-word; }
.notif-item-body { font-size: 12px; color: var(--paper-dim); margin-top: 2px; overflow-wrap: break-word; }
.notif-item-time { font-size: 11px; color: var(--paper-dim); margin-top: 4px; opacity: 0.7; }

/* Empty states */
.empty-state { text-align: center; padding: 48px 20px; color: var(--paper-dim); }
.empty-state .icon { font-size: 36px; margin-bottom: 12px; }

/* Loading */
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--ink-line); border-top-color: var(--marigold);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

footer { border-top: 1px solid var(--ink-line); padding: 32px 0; margin-top: 60px; color: var(--paper-dim); font-size: 13px; }
footer a { color: var(--paper-dim); margin-right: 16px; }

.section { padding: 56px 0; }
.section-title { font-size: clamp(22px, 5vw, 30px); margin-bottom: 8px; }
.section-sub { color: var(--paper-dim); margin-bottom: 32px; max-width: 60ch; }

/* Small-screen refinements */
@media (max-width: 480px) {
  .container, .narrow { padding: 0 16px; }
  .btn { padding: 12px 18px; font-size: 14.5px; }
  .section { padding: 40px 0; }
  table { font-size: 13px; }
}

/* Make any table-based content scroll horizontally instead of breaking layout */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ===== Leaderboard ===== */
.lb-sortbar { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.lb-sortbar .btn-secondary.active { background: var(--marigold); color: #1B1204; border-color: var(--marigold); }

.lb-livepill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--mint);
  margin-left: 10px;
}
.lb-livepill .online-dot { width: 6px; height: 6px; }

.prize-banner {
  background: linear-gradient(135deg, rgba(240,169,60,0.14), rgba(240,169,60,0.02));
  border: 1px solid rgba(240,169,60,0.35);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 18px 0;
}
.prize-banner-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  margin-bottom: 14px;
}
.prize-banner-title {
  font-family: var(--font-display); font-size: 16px; color: var(--marigold);
  display: flex; align-items: center; gap: 8px;
}
.prize-tabs { display: flex; gap: 6px; }
.prize-tab {
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--ink-deep); border: 1px solid var(--ink-line); color: var(--paper-dim);
  cursor: pointer; transition: all 0.15s ease;
}
.prize-tab.active { background: var(--marigold); color: #1B1204; border-color: var(--marigold); }
.prize-list { display: flex; gap: 12px; flex-wrap: wrap; }
.prize-chip {
  flex: 1; min-width: 140px;
  background: var(--ink-deep); border: 1px solid var(--ink-line);
  border-radius: var(--radius-md); padding: 12px 14px;
}
.prize-chip .rank { font-size: 11px; font-weight: 700; color: var(--paper-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.prize-chip .amount { font-family: var(--font-display); font-size: 19px; color: var(--marigold); margin-top: 3px; }
.prize-chip .desc { font-size: 12px; color: var(--paper-dim); margin-top: 3px; }
.prize-holder {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--ink-line);
}
.prize-holder .avatar-sm { width: 28px; height: 28px; flex-shrink: 0; }
.prize-holder-fallback { font-size: 12px; }
.prize-holder-name { font-size: 13px; font-weight: 600; color: var(--paper); }
.prize-holder-empty { font-size: 12px; color: var(--paper-dim); font-style: italic; border-top: 1px solid var(--ink-line); }
.prize-note { font-size: 12px; color: var(--paper-dim); margin-top: 12px; opacity: 0.85; }

/* Leaderboard category tabs (Overall / Quiz / Wrestling) */
.cat-tabs { display: flex; gap: 8px; margin: 16px 0 6px; flex-wrap: wrap; }
.cat-tab {
  flex: 1; min-width: 100px; text-align: center;
  padding: 10px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: var(--ink-panel); border: 1px solid var(--ink-line); color: var(--paper-dim);
  cursor: pointer; transition: all 0.15s ease;
}
.cat-tab.active { background: var(--marigold); color: #1B1204; border-color: var(--marigold); }
.cat-subnote { font-size: 12.5px; color: var(--paper-dim); margin: 4px 0 14px; opacity: 0.9; }
.lb-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: middle;
}
.lb-badge-quiz { background: rgba(111,207,151,0.16); color: var(--mint); border: 1px solid rgba(111,207,151,0.35); }
.lb-badge-wrestling { background: rgba(255,107,94,0.16); color: var(--coral); border: 1px solid rgba(255,107,94,0.35); }
.lb-badge-farmer { background: rgba(240,169,60,0.16); color: #D9A441; border: 1px solid rgba(240,169,60,0.35); }
.lb-badge-leader { background: rgba(240,169,60,0.18); color: var(--marigold); border: 1px solid rgba(240,169,60,0.4); }
.lb-badge-belt { background: rgba(240,169,60,0.16); color: var(--marigold); border: 1px solid rgba(240,169,60,0.35); }
.lb-sub-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.lb-sub-badges .lb-badge { margin-left: 0; }

/* Level pill on the dashboard welcome header */
.level-pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 6px; padding: 3px;
  background: var(--ink-panel); border: 1px solid var(--ink-line);
  border-radius: 999px;
}
.level-pill-num {
  display: inline-flex; align-items: center;
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  color: #1B1204; background: var(--marigold);
  padding: 4px 11px; border-radius: 999px; letter-spacing: 0.02em;
}
.level-pill-name {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--paper-dim); padding-right: 12px;
}

/* Help / contact */
.contact-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--ink-panel); border: 1px solid var(--ink-line);
  border-radius: var(--radius-md); padding: 16px 18px; margin: 12px 0;
}
.contact-card .contact-icon { font-size: 24px; flex-shrink: 0; }
.contact-card .contact-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--paper-dim); font-weight: 700; }
.contact-card .contact-value { font-family: var(--font-display); font-size: 17px; color: var(--paper); margin-top: 2px; word-break: break-word; }
.contact-card a.contact-value { color: var(--marigold); }

.prize-countdown {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink-deep); border: 1px solid var(--ink-line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
}
.prize-countdown .cd-icon { font-size: 15px; flex-shrink: 0; }
.prize-countdown .cd-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--paper-dim); font-weight: 700; }
.prize-countdown .cd-time {
  font-family: var(--font-display); font-size: 16px; color: var(--marigold);
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
}
.prize-countdown.ended .cd-time { color: var(--coral); }
.prize-countdown.unset .cd-time { color: var(--paper-dim); font-family: var(--font-body); font-size: 13px; }

.lb-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 12px 16px; margin-bottom: 8px;
  background: var(--ink-panel); border: 1px solid var(--ink-line);
  border-radius: var(--radius-md);
  transition: background 0.5s ease;
}
.lb-xp-progress { flex-basis: 100%; padding-left: 40px; margin-top: -2px; }
.lb-xp-progress-track { height: 5px; border-radius: 3px; background: var(--ink-line); overflow: hidden; }
.lb-xp-progress-fill { height: 100%; background: var(--mint); border-radius: 3px; }
.lb-xp-progress-label { font-size: 11px; color: var(--paper-dim); margin-top: 3px; }
.lb-row.top-1 { border-color: rgba(240,169,60,0.55); background: linear-gradient(90deg, rgba(240,169,60,0.12), var(--ink-panel) 70%); }
.lb-row.top-2 { border-color: rgba(217,211,192,0.4); }
.lb-row.top-3 { border-color: rgba(255,107,94,0.35); }
.lb-rank { width: 26px; flex-shrink: 0; text-align: center; font-family: var(--font-display); font-size: 16px; color: var(--paper-dim); }
.lb-rank.medal { font-size: 21px; }
.lb-info { min-width: 0; flex: 1; }
.lb-name { font-weight: 700; color: var(--paper); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-sub { font-size: 12px; color: var(--paper-dim); margin-top: 1px; }
.lb-value { margin-left: auto; flex-shrink: 0; font-family: var(--font-display); font-size: 17px; color: var(--paper); text-align: right; }
.lb-flash { animation: lb-flash-anim 1.1s ease; }
@keyframes lb-flash-anim {
  0% { background: rgba(240,169,60,0.28); }
  100% { background: var(--ink-panel); }
}

/* ===== Admin: prizes ===== */
.prize-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  background: var(--ink-deep); border: 1px solid var(--ink-line); border-radius: var(--radius-md);
  flex-wrap: wrap;
}
.prize-row.inactive { opacity: 0.5; }
.prize-row-main { display: flex; align-items: center; gap: 12px; }
.prize-row-rank {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(240,169,60,0.15); color: var(--marigold);
  font-family: var(--font-display); font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.prize-row-actions { display: flex; gap: 6px; }
.prize-row-actions .btn { padding: 8px 12px; min-height: 34px; font-size: 13px; }
.prize-period-filter.active { background: var(--marigold); color: #1B1204; border-color: var(--marigold); }
.prize-cat-filter.active { background: var(--marigold); color: #1B1204; border-color: var(--marigold); }

.wrestler-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 8px;
  background: var(--ink-deep); border: 1px solid var(--ink-line); border-radius: var(--radius-md);
}
.wrestler-row.inactive { opacity: 0.5; }
.wrestler-row-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 160px; }
.win-stepper { display: flex; align-items: center; gap: 6px; }
.win-stepper input {
  width: 64px; min-height: 34px; padding: 6px 8px; text-align: center;
}
.win-stepper .btn { padding: 8px 12px; min-height: 34px; font-size: 13px; }

/* ===== Nav buttons (topnav links styled as pills instead of bare text) ===== */
.topnav-links { gap: 8px 10px; }
.nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink-panel);
  border: 1px solid var(--ink-line);
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.nav-btn:hover { border-color: var(--marigold); color: var(--marigold); text-decoration: none; background: rgba(240,169,60,0.08); }
.nav-btn:active { transform: scale(0.97); }
.nav-btn-primary { background: var(--marigold); color: #1B1204; border-color: var(--marigold); }
.nav-btn-primary:hover { color: #1B1204; opacity: 0.9; background: var(--marigold); }
.nav-btn-accent { border-color: rgba(240,169,60,0.5); color: var(--marigold); background: rgba(240,169,60,0.08); }
.nav-btn-accent:hover { background: rgba(240,169,60,0.18); border-color: var(--marigold); }
.nav-btn-danger { border-color: rgba(255,107,94,0.35); color: var(--coral); background: rgba(255,107,94,0.06); }
.nav-btn-danger:hover { border-color: var(--coral); color: var(--coral); background: rgba(255,107,94,0.15); }
.nav-btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 999px; }
@media (max-width: 480px) {
  .nav-btn { padding: 8px 12px; font-size: 12.5px; }
}


/* Cookie consent banner */
#vidio-cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: var(--ink-panel);
  border-top: 1px solid var(--ink-line);
  box-shadow: 0 -8px 24px var(--shadow);
  padding: 16px 20px;
  /* Reserve space clear of the bottom-right corner at all screen widths,
     since that's where Netlify's "Powered by Netlify" badge renders
     (free-plan and Personal/Pro-with-badge-enabled deploys) and would
     otherwise sit on top of the Accept/Reject buttons. */
  padding-right: max(20px, 210px);
}
.cookie-banner-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  /* Buttons stay left-aligned within their flex space so they never drift
     into the reserved bottom-right corner (see padding-right above). */
  justify-content: flex-start;
}
.cookie-banner-text {
  color: var(--paper-dim);
  font-size: 13.5px;
  margin: 0;
  flex: 1 1 320px;
}
.cookie-banner-text a { color: var(--marigold); }
.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
  justify-content: flex-start;
}
@media (max-width: 480px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: flex-start; }
  /* On narrow phones the reserved right padding would eat too much width,
     so drop it and rely on the stacked column layout instead — buttons
     end up above the badge's row entirely. */
  #vidio-cookie-banner { padding-right: 20px; }
}
.btn-ghost { background: transparent; color: var(--paper-dim); border: 1px solid var(--ink-line); }
.btn-ghost:hover { color: var(--paper); border-color: var(--paper-dim); }
