/* =========================================================
   PHU DIEN OPEN – "Ember" theme (matches the orange/red/gold banner)
   ========================================================= */
:root {
  --bg: #1d0805;
  --bg2: #260b06;
  --surface: #4a1a0b;
  --surface2: #5c220e;
  --line: #7a3319;
  --line2: #9a4a22;
  --text: #fff6ea;
  --muted: #fbe1c8;
  --dim: #d8ab88;
  --orange: #ff7a1a;
  --orange2: #ff5a1f;
  --gold: #ffc531;
  --gold2: #ffe08a;
  --crimson: #c81e12;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
  /* translucent cards that let the glow behind them show through */
  --card: linear-gradient(165deg, rgba(255, 196, 115, 0.36) 0%, rgba(236, 100, 34, 0.34) 45%, rgba(170, 48, 14, 0.58) 100%);
  --card-solid: linear-gradient(180deg, #6a2610, #451709);
  --card-border: rgba(255, 214, 150, 0.38);
  --card-border-hi: rgba(255, 226, 160, 0.75);
  --card-glow: inset 0 1px 0 rgba(255, 236, 200, 0.28), 0 12px 30px rgba(40, 6, 0, 0.28);
  --inset: rgba(255, 200, 130, 0.1);
  --gold-grad: linear-gradient(135deg, #ffe58f 0%, #ffc531 40%, #ff8a1a 100%);
  --gold-text: linear-gradient(180deg, #fff3c4 0%, #ffd34d 55%, #ff9a1f 100%);
  --radius: 16px;
  --shadow: 0 14px 34px rgba(30, 4, 0, 0.45);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter: 20px;
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}
/* Fixed ember backdrop: warm glows + light rays + sparkles (fixed layer works on iOS too) */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(255, 150, 40, 0.55), transparent 62%),
    radial-gradient(820px 620px at 105% 105%, rgba(220, 38, 18, 0.42), transparent 60%),
    radial-gradient(720px 560px at -8% 62%, rgba(255, 96, 24, 0.3), transparent 60%),
    repeating-conic-gradient(from -90deg at 50% -25%, rgba(255, 214, 130, 0.04) 0deg 3deg, transparent 3deg 11deg),
    linear-gradient(180deg, #6e1c08 0%, #461207 36%, #2a0b05 72%, #1d0805 100%);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.55;
  background:
    radial-gradient(circle, rgba(255, 226, 150, 0.9) 0 1px, transparent 1.6px) 0 0 / 173px 167px,
    radial-gradient(circle, rgba(255, 200, 110, 0.7) 0 1px, transparent 1.6px) 61px 89px / 241px 229px,
    radial-gradient(circle, rgba(255, 240, 200, 0.6) 0 0.8px, transparent 1.4px) 117px 31px / 97px 113px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
  mask-image: linear-gradient(180deg, #000, transparent 85%);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; }
::selection { background: rgba(255, 197, 49, 0.35); }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 1600px) { .container { max-width: 1280px; } }
@media (max-width: 420px) { :root { --gutter: 16px; } }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  padding-top: var(--safe-top);
  background: linear-gradient(180deg, rgba(60, 12, 4, 0.88), rgba(40, 9, 4, 0.8));
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 200, 110, 0.18);
  box-shadow: 0 6px 24px rgba(20, 2, 0, 0.35);
}
.topbar .inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; min-width: 0; }
.brand small { display: block; font-size: 10px; font-weight: 700; color: var(--gold); letter-spacing: 0.2em; line-height: 1; }
.brand span { line-height: 1.1; }
.ball9 {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff8 0 8%, transparent 9%),
    linear-gradient(180deg, #fff 0 22%, var(--gold) 22% 78%, #fff 78%);
  box-shadow: inset -3px -4px 8px rgba(0, 0, 0, 0.3), 0 0 14px rgba(255, 197, 49, 0.45);
  display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #111;
}
.ball9::after { content: '9'; width: 15px; height: 15px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 10px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px; padding: 8px 12px; border-radius: 10px; transition: color 0.2s, background 0.2s; white-space: nowrap; }
.nav a:hover { color: var(--text); background: rgba(255, 200, 120, 0.1); }
.nav a.cta { color: #3a1203; background: var(--gold-grad); font-weight: 700; box-shadow: 0 4px 16px rgba(255, 150, 30, 0.35); }
@media (max-width: 760px) { .nav a:not(.cta) { display: none; } }
@media (max-width: 360px) {
  .brand { font-size: 14px; gap: 8px; }
  .nav a.cta { padding: 7px 10px; font-size: 13px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--card-border); background: rgba(80, 22, 8, 0.6); color: var(--text);
  padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; text-decoration: none;
  transition: transform 0.12s, background 0.2s, border-color 0.2s, filter 0.2s; user-select: none; -webkit-user-select: none; white-space: nowrap;
}
.btn:hover { border-color: var(--card-border-hi); background: rgba(110, 32, 12, 0.7); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--gold-grad); color: #3a1203; border: 0; box-shadow: 0 6px 20px rgba(255, 140, 30, 0.35); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { background: rgba(239, 68, 68, 0.14); color: #fecaca; border-color: rgba(248, 113, 113, 0.45); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 10px; }

/* ---------- landing ---------- */
.hero { position: relative; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(900px 420px at 50% 30%, rgba(255, 170, 60, 0.35), transparent 70%); pointer-events: none; }
.hero .container { position: relative; padding-top: 28px; padding-bottom: 44px; }
.banner { border-radius: 22px; overflow: hidden; box-shadow: 0 30px 90px rgba(255, 100, 20, 0.45), 0 0 0 1px rgba(255, 220, 150, 0.35); }
.banner img { width: 100%; height: auto; aspect-ratio: 1376 / 768; object-fit: cover; }
.hero-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.meta-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.meta-card .k { font-size: 12px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.meta-card .v { font-weight: 700; margin-top: 2px; }
@media (max-width: 860px) { .hero-meta { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 360px) { .meta-card { padding: 12px; } .meta-card .v { font-size: 14px; } }
@media (max-width: 600px) {
  .meta-card.m-fmt { order: 2; }
  .meta-card.m-time { order: 3; grid-column: span 2; }
  .meta-card.m-loc { order: 4; grid-column: span 2; }
}

.countdown { display: flex; gap: clamp(6px, 2vw, 10px); justify-content: center; margin-top: 24px; flex-wrap: nowrap; align-items: center; }
.countdown .unit { flex: 0 1 84px; min-width: 0; text-align: center; background: var(--card); border: 1px solid var(--card-border); border-radius: 14px; padding: 10px 6px; }
.countdown .num { font-size: clamp(22px, 6vw, 30px); font-weight: 800; font-variant-numeric: tabular-nums; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.2; }
.countdown .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.countdown .live-msg { font-weight: 700; color: var(--gold); text-align: center; }
.hero-actions { display: flex; justify-content: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.hero-actions .btn { padding: 13px 22px; font-size: 15px; }
@media (max-width: 360px) { .hero-actions .btn { flex: 1 1 100%; } }

section.block { padding: 72px 0; scroll-margin-top: 50px; position: relative; }
section.block.alt {
  background: linear-gradient(180deg, rgba(255, 150, 60, 0.07), rgba(20, 3, 0, 0.1));
  border-top: 1px solid rgba(255, 200, 110, 0.14); border-bottom: 1px solid rgba(255, 200, 110, 0.14);
}
@media (max-width: 600px) { section.block { padding: 52px 0; } }
.eyebrow { color: var(--gold); font-weight: 800; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: var(--gold-grad); }
h2.title {
  font-size: clamp(26px, 4.4vw, 40px); line-height: 1.15; margin: 8px 0 10px; font-weight: 800;
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--muted); max-width: 700px; margin: 0 0 28px; }
.lead b { color: var(--text); }

/* players */
.players { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 960px) { .players { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .players { grid-template-columns: 1fr; } }
.player {
  position: relative; background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 18px 16px; display: flex; align-items: center; gap: 12px; min-width: 0;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.player:hover { transform: translateY(-2px); border-color: var(--card-border-hi); box-shadow: 0 12px 30px rgba(255, 110, 20, 0.18); }
.player > div:last-child { min-width: 0; }
.avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 16px; box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.25); position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.player .avatar { width: 56px; height: 56px; box-shadow: 0 0 0 2px rgba(255, 210, 140, 0.35), 0 6px 14px rgba(0, 0, 0, 0.3); }
.player.eliminated .avatar img { filter: grayscale(1); }
.player .name { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.player .sub { font-size: 12px; color: var(--muted); }
.player .seed { position: absolute; top: 8px; right: 10px; font-size: 11px; color: var(--dim); font-weight: 700; }
.player.eliminated { opacity: 0.55; }

/* Defending champion card */
.player.defending {
  border: 1.5px solid transparent;
  background:
    linear-gradient(160deg, rgba(120, 50, 6, 0.92), rgba(70, 18, 4, 0.92)) padding-box,
    linear-gradient(135deg, #fff1b8, #ffc531 35%, #ff8a1a 70%, #ffe58f) border-box;
  box-shadow: 0 0 0 1px rgba(255, 215, 120, 0.2), 0 14px 40px rgba(255, 170, 40, 0.35), inset 0 1px 0 rgba(255, 240, 200, 0.25);
  overflow: hidden;
  padding-top: 26px;
}
.player.defending::after { /* moving shine */
  content: ''; position: absolute; inset: -40% auto -40% -60%; width: 40%; transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 245, 210, 0.22), transparent);
  animation: shine 4.5s ease-in-out infinite; pointer-events: none;
}
@keyframes shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.av-wrap { position: relative; flex: none; }
.player.defending .avatar { width: 62px; height: 62px; box-shadow: 0 0 0 2.5px #ffd34d, 0 0 20px rgba(255, 200, 60, 0.75); }
.player.defending .seed { top: 26px; }
.player.defending .crown { position: absolute; right: -8px; bottom: -4px; transform: rotate(14deg); font-size: 20px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45)); z-index: 2; }
.player.defending .name { background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 17px; }
.ribbon {
  position: absolute; top: 0; left: 0; right: 0; height: 20px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #3a1203;
  background: var(--gold-grad);
}
.player.defending.eliminated { opacity: 0.75; }
@media (prefers-reduced-motion: reduce) { .player.defending::after { animation: none; display: none; } }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.tag.out { background: rgba(239, 68, 68, 0.18); color: #fecaca; }
.tag.live { background: rgba(239, 68, 68, 0.22); color: #fee2e2; }
.tag.champ { background: rgba(255, 197, 49, 0.22); color: var(--gold2); }
.tag.second { background: rgba(255, 237, 213, 0.16); color: #ffedd5; }
.tag.in { background: rgba(34, 197, 94, 0.18); color: #bbf7d0; }
.tag.title { background: rgba(255, 197, 49, 0.2); color: var(--gold2); }

/* format */
.format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 860px) { .format-grid { grid-template-columns: 1fr; } }
.stage-card { border-radius: var(--radius); padding: 22px; border: 1px solid var(--card-border); background: var(--card); position: relative; overflow: hidden; }
.stage-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c, var(--orange)); }
.stage-card .step { font-size: 12px; font-weight: 800; color: var(--c); letter-spacing: 0.12em; text-transform: uppercase; }
.stage-card h3 { margin: 6px 0 8px; font-size: 20px; }
.stage-card .race { display: inline-block; margin-top: 10px; font-weight: 800; font-size: 26px; color: var(--c); }
.stage-card .race small { font-size: 13px; color: var(--muted); font-weight: 600; margin-right: 6px; }
.stage-card p { color: var(--muted); margin: 0; font-size: 14px; }

.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; margin-top: 28px; align-items: stretch; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px; }
@media (max-width: 400px) { .panel { padding: 18px 16px; } }
.panel h3 { margin: 0 0 12px; font-size: 18px; color: var(--gold2); }
.rules { list-style: none; padding: 0; margin: 0; counter-reset: r; }
.rules li { counter-increment: r; position: relative; padding: 10px 0 10px 40px; border-bottom: 1px dashed rgba(255, 196, 120, 0.18); color: #ffe9d2; }
.rules li:last-child { border-bottom: 0; }
.rules li::before { content: counter(r); position: absolute; left: 0; top: 9px; width: 26px; height: 26px; border-radius: 8px; background: var(--gold-grad); color: #3a1203; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.life { display: grid; gap: 10px; }
.life div { display: flex; gap: 12px; align-items: flex-start; color: #ffe9d2; }
.life > div > b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; }
.prizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.prize { text-align: center; border-radius: 12px; padding: 16px 6px; background: rgba(255, 200, 120, 0.16); border: 1px solid var(--card-border); }
.prize .medal { font-size: 30px; line-height: 1; }
.prize .t { font-weight: 700; margin-top: 8px; font-size: 14px; }
@media (max-width: 360px) { .prize .t { font-size: 12px; } }

/* fee */
.fee { display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: center; }
@media (max-width: 760px) { .fee { grid-template-columns: 1fr; } }
.qr-wrap { background: #fff; border-radius: 22px; padding: 12px; box-shadow: 0 20px 60px rgba(255, 110, 20, 0.35), 0 0 0 3px rgba(255, 200, 100, 0.5); max-width: 340px; margin: 0 auto; width: 100%; }
.qr-wrap img { border-radius: 12px; width: 100%; height: auto; }
.amount { font-size: clamp(36px, 7vw, 56px); font-weight: 800; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.kv { display: grid; gap: 10px; margin: 20px 0; }
.kv .row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; align-items: center; flex-wrap: wrap; }
.kv .row span { color: var(--muted); font-size: 14px; }
.kv .row b { text-align: right; overflow-wrap: anywhere; margin-left: auto; }
.copy { border: 0; background: var(--gold-grad); color: #3a1203; font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 8px; margin-left: 8px; }
.note { font-size: 13px; color: var(--muted); }

.schedule-cta { text-align: center; padding: 70px 0 44px; }
.schedule-cta a.textlink {
  font-size: clamp(20px, 3.4vw, 28px); font-weight: 800; text-decoration: none; padding-bottom: 4px;
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  border-bottom: 2px solid rgba(255, 197, 49, 0.4); transition: border-color 0.2s;
}
.schedule-cta a.textlink:hover { border-color: var(--gold); }
.footer { text-align: center; color: var(--dim); font-size: 13px; padding: 30px var(--gutter) calc(30px + var(--safe-bottom)); border-top: 1px solid rgba(255, 200, 110, 0.14); background: rgba(20, 3, 0, 0.35); }
.footer .slogan { color: var(--gold2); font-weight: 800; letter-spacing: 0.04em; margin-bottom: 6px; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- modal & toast ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(25, 3, 0, 0.66); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: grid; place-items: center; padding: 16px; animation: fade 0.15s ease; }
.modal { width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow: auto; background: var(--card-solid); border: 1px solid var(--card-border-hi); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 120, 30, 0.15); animation: pop 0.18s ease; }
.modal header { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal header h3 { margin: 0; font-size: 17px; flex: 1; color: var(--gold2); }
.modal .body { padding: 18px; }
.modal footer { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal .close { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; width: 32px; height: 32px; border-radius: 8px; }
.modal .close:hover { background: var(--surface2); color: var(--text); }
@media (max-width: 420px) {
  .modal-backdrop { padding: 10px; align-items: end; }
  .modal { border-radius: 18px; max-height: calc(100dvh - 20px); }
  .modal .body { padding: 14px; }
}
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(30, 6, 0, 0.35); color: var(--text); outline: none; font-size: 16px; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 197, 49, 0.2); }
.err { color: #fecaca; font-size: 13px; min-height: 18px; }
.toast-wrap { position: fixed; left: 50%; bottom: calc(20px + var(--safe-bottom)); transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: #6a2610; border: 1px solid var(--line2); color: var(--text); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; animation: pop 0.2s ease; }
.toast.error { border-color: rgba(248, 113, 113, 0.6); color: #fee2e2; }
.toast.ok { border-color: rgba(255, 197, 49, 0.6); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(6px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: #ff3b30; display: inline-block; animation: pulse 1.2s infinite; box-shadow: 0 0 8px rgba(255, 59, 48, 0.8); }
.hidden { display: none !important; }
@media (max-width: 400px) {
  .players { gap: 10px; }
  .player { padding: 12px 14px; }
  .player .avatar { width: 50px; height: 50px; }
  .player.defending { padding-top: 30px; }
}

/* lifted, brighter content surfaces */
.meta-card, .countdown .unit, .player, .stage-card, .panel, .kv .row { box-shadow: var(--card-glow); }
.meta-card .v, .stage-card h3, .player .name { color: #fff; text-shadow: 0 1px 2px rgba(60, 10, 0, 0.35); }
.player.defending .name { text-shadow: none; }
.stage-card p, .lead, .note { color: var(--muted); }
.rules li, .life div { color: #fff3e4; }
.rules li { border-bottom-color: rgba(255, 214, 150, 0.25); }
.player:hover, .meta-card:hover { border-color: var(--card-border-hi); }
/* keep coloured labels readable on the brighter cards */
.stage-card .step, .stage-card .race span { filter: brightness(1.45) saturate(1.1); text-shadow: 0 1px 2px rgba(40, 6, 0, 0.4); }
/* header never collides on phones: brand may shrink, admin button gets a short label */
.brand > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav { flex: none; }
@media (max-width: 480px) {
  .topbar .inner { gap: 10px; }
  .admin-join { font-size: 0 !important; padding: 7px 10px !important; }
  .admin-join::after { content: 'Admin'; font-size: 12px; }
  .nav a.cta { padding: 7px 11px; font-size: 13px; }
}
@media (max-width: 380px) { .brand small { letter-spacing: 0.12em; } .brand { font-size: 14px; } }

/* prize structure (hero info card + prizes panel) */
.meta-card.m-prize { grid-column: 1 / -1; }
.prize-line { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 6px; }
.pz { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; font-size: 14px; background: rgba(30, 6, 2, 0.28); border: 1px solid rgba(255, 214, 150, 0.3); }
.pz i { font-style: normal; font-size: 18px; line-height: 1; }
.pz b { font-weight: 800; margin-left: 2px; font-variant-numeric: tabular-nums; }
.pz.gold { border-color: rgba(255, 211, 77, 0.65); background: linear-gradient(90deg, rgba(255, 197, 49, 0.22), rgba(255, 197, 49, 0.06)); }
.pz.gold b { color: var(--gold2); }
.pz.silver b { color: #eef2f7; }
.prize .amt { margin-top: 4px; font-weight: 800; font-size: 15px; color: var(--gold2); font-variant-numeric: tabular-nums; }
.prize.p1 { border-color: rgba(255, 211, 77, 0.6); background: linear-gradient(180deg, rgba(255, 197, 49, 0.24), rgba(255, 197, 49, 0.08)); }
.prize.p2 .amt { color: #eef2f7; }
.prize .amt.muted { color: var(--dim); font-weight: 600; font-size: 13px; }
@media (max-width: 600px) { .meta-card.m-prize { order: 5; } }
@media (max-width: 400px) { .pz { font-size: 13px; padding: 5px 10px 5px 7px; } .prize .amt { font-size: 13px; } }
/* full-width prize row under the rules panels */
.prize-panel { margin-top: 24px; }
@media (min-width: 601px) {
  .prize-panel .prizes { gap: 16px; }
  .prize-panel .prize { padding: 22px 12px; }
  .prize-panel .prize .medal { font-size: 40px; }
  .prize-panel .prize .t { font-size: 17px; }
  .prize-panel .prize .amt { font-size: 20px; }
  .prize-panel .prize .amt.muted { font-size: 15px; }
}
@media (max-width: 860px) { .prize-panel { margin-top: 16px; } }
