/* ===== Font Be Vietnam Pro (nhúng sẵn, chạy ngoại tuyến) ===== */
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:400;src:url(/fonts/bvp-vietnamese-400.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:400;src:url(/fonts/bvp-latin-ext-400.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:400;src:url(/fonts/bvp-latin-400.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:500;src:url(/fonts/bvp-vietnamese-500.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:500;src:url(/fonts/bvp-latin-ext-500.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:500;src:url(/fonts/bvp-latin-500.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:600;src:url(/fonts/bvp-vietnamese-600.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:600;src:url(/fonts/bvp-latin-ext-600.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:600;src:url(/fonts/bvp-latin-600.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:700;src:url(/fonts/bvp-vietnamese-700.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:700;src:url(/fonts/bvp-latin-ext-700.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:700;src:url(/fonts/bvp-latin-700.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:800;src:url(/fonts/bvp-vietnamese-800.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:800;src:url(/fonts/bvp-latin-ext-800.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:800;src:url(/fonts/bvp-latin-800.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:900;src:url(/fonts/bvp-vietnamese-900.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:900;src:url(/fonts/bvp-latin-ext-900.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-display:swap;font-weight:900;src:url(/fonts/bvp-latin-900.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root {
  /* Thương hiệu */
  --purple: #7c3aed; --purple-d: #5b21b6; --purple-dd: #2e1065;
  --pink: #ec4899; --cyan: #22d3ee; --gold: #fbbf24; --gold-d: #d97706;
  /* Giao diện sáng (trang quản lý) */
  --bg: #f5f3fb; --card: #fff; --text: #1e1633; --muted: #6e6787; --line: #e7e2f2; --soft: #f7f5fc;
  --green: #10b981; --green-d: #059669; --red: #f43f5e; --red-d: #e11d48; --yellow: #f59e0b;
  /* Màu ô đáp án */
  --c0: #3b82f6; --c1: #14b8a6; --c2: #f59e0b; --c3: #f43f5e; --c4: #a855f7; --c5: #22c55e;
  --c0d: #1d4ed8; --c1d: #0f766e; --c2d: #b45309; --c3d: #be123c; --c4d: #7e22ce; --c5d: #15803d;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(30,16,70,.06), 0 2px 8px rgba(30,16,70,.05);
  --shadow: 0 2px 4px rgba(30,16,70,.05), 0 12px 32px -8px rgba(30,16,70,.14);
  --shadow-lg: 0 30px 80px -20px rgba(10,0,40,.55), 0 10px 30px -10px rgba(10,0,40,.35);
  --glass: rgba(255,255,255,.09); --glass-b: rgba(255,255,255,.16);
  --ease: cubic-bezier(.2,.8,.2,1); --spring: cubic-bezier(.34,1.56,.64,1);
  font-family: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { color: var(--text); background: var(--bg); -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--purple-d); }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.2; }
::selection { background: #c4b5fd; color: #1e1633; }
:focus-visible { outline: 3px solid #a78bfa; outline-offset: 2px; }

/* ---------- Nút ---------- */
.btn { --b: #ece8f6; --bd: #d3cce6; border: 0; border-radius: 12px; padding: 10px 18px; background: var(--b); color: var(--text); font-weight: 700;
  box-shadow: 0 4px 0 var(--bd), 0 6px 14px -6px rgba(30,16,70,.25); transition: transform .12s var(--ease), box-shadow .12s var(--ease), filter .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; white-space: nowrap; position: relative; letter-spacing: -.005em; }
.btn:hover { filter: brightness(1.06) saturate(1.05); transform: translateY(-1px); box-shadow: 0 5px 0 var(--bd), 0 10px 20px -8px rgba(30,16,70,.3); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--bd), 0 2px 6px -2px rgba(30,16,70,.2); }
.btn.primary { --b: linear-gradient(180deg, #8b5cf6, #7c3aed); --bd: #5b21b6; background: var(--b); color: #fff; }
.btn.green { --bd: #047857; background: linear-gradient(180deg, #34d399, #10b981); color: #fff; }
.btn.red { --bd: #be123c; background: linear-gradient(180deg, #fb7185, #f43f5e); color: #fff; }
.btn.yellow { --bd: #b45309; background: linear-gradient(180deg, #fcd34d, #f59e0b); color: #3b2300; }
.btn.white { --bd: #c9bfe6; background: #fff; color: var(--purple-d); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(124,58,237,.08); box-shadow: none; transform: none; }
.btn.sm { padding: 6px 12px; font-size: .86rem; border-radius: 9px; box-shadow: 0 3px 0 var(--bd); }
.btn.sm:active { box-shadow: 0 0 0 var(--bd); }
.btn.big { padding: 15px 28px; font-size: 1.15rem; border-radius: 16px; box-shadow: 0 5px 0 var(--bd), 0 12px 24px -10px rgba(20,0,60,.45); }
.btn.big:active { box-shadow: 0 1px 0 var(--bd); transform: translateY(4px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.4); }
.icon-btn { border: 1px solid var(--glass-b); background: var(--glass); color: #fff; width: 42px; height: 42px; border-radius: 12px; font-size: 1.1rem;
  display: inline-flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); transition: background .2s, transform .15s var(--ease); }
.icon-btn:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.94); }

/* ---------- Ô nhập ---------- */
.input, input.input, select.input, textarea.input { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 13px; background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s; box-shadow: inset 0 1px 2px rgba(30,16,70,.04); }
.input:hover { border-color: #d6cdea; }
.input:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(124,58,237,.14); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--purple); flex: none; }
.check small { display: block; color: var(--muted); }
.err { color: #ffd6dc; min-height: 1.3em; margin-top: 8px; font-weight: 600; white-space: pre-line; }
.muted { color: var(--muted); }
.grow { flex: 1; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ================= NỀN SÂN KHẤU ================= */
.play-bg { color: #fff; min-height: 100vh; background-color: #1a0b45;
  background-image:
    radial-gradient(60vmax 50vmax at 0% 0%, rgba(168,85,247,.55), transparent 60%),
    radial-gradient(50vmax 45vmax at 100% 10%, rgba(236,72,153,.38), transparent 60%),
    radial-gradient(60vmax 50vmax at 80% 100%, rgba(34,211,238,.25), transparent 60%),
    radial-gradient(50vmax 40vmax at 10% 100%, rgba(79,70,229,.45), transparent 60%),
    linear-gradient(160deg, #24105c, #12082f);
  background-attachment: fixed; position: relative; isolation: isolate; }
.play-bg::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1.2px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%); }
.play-bg::after { content: ''; position: fixed; width: 70vmax; height: 70vmax; left: 50%; top: 50%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg, rgba(124,58,237,.0), rgba(236,72,153,.16), rgba(34,211,238,.12), rgba(124,58,237,.0));
  border-radius: 50%; filter: blur(60px); transform: translate(-50%,-50%); animation: aurora 24s linear infinite; }
@keyframes aurora { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ================= NGƯỜI CHƠI ================= */
.screen { display: none; min-height: 100vh; min-height: 100dvh; flex-direction: column; }
.screen.active { display: flex; animation: screenIn .45s var(--ease); }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } }
.center { align-items: center; justify-content: center; padding: 24px 16px; text-align: center; }
.brand { margin-bottom: 26px; display: flex; flex-direction: column; align-items: center; }
.brand img { background: #fff; border-radius: 50%; padding: 4px; width: 88px; height: 88px; object-fit: contain; margin-bottom: 14px;
  box-shadow: 0 0 0 6px rgba(255,255,255,.12), 0 0 0 12px rgba(255,255,255,.05), 0 16px 40px -8px rgba(0,0,0,.5); animation: logoIn .8s var(--spring) both; }
@keyframes logoIn { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
.brand .org { font-weight: 700; letter-spacing: .16em; font-size: .78rem; opacity: .8; text-transform: uppercase; }
.brand h1 { margin: 8px 0 0; font-size: clamp(1.4rem, 6.6vw, 3.2rem); font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; text-wrap: balance;
  background: linear-gradient(180deg, #fff 30%, #e9d5ff); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(168,85,247,.55)); }
.brand p { margin: 10px 0 0; }
.join-card { background: rgba(255,255,255,.97); color: var(--text); border-radius: 26px; padding: 22px; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,.6); position: relative; animation: cardIn .6s var(--spring) both .1s; }
.join-card::before { content: ''; position: absolute; inset: -2px; border-radius: 28px; z-index: -1;
  background: linear-gradient(135deg, #f0abfc, #a78bfa 40%, #67e8f9); opacity: .9; filter: blur(14px); }
@keyframes cardIn { from { transform: translateY(24px) scale(.96); opacity: 0; } }
.join-card input { width: 100%; text-align: center; font-size: 1.5rem; font-weight: 800; padding: 15px; border: 2px solid var(--line); border-radius: 16px;
  margin-bottom: 12px; outline: none; background: var(--soft); transition: border-color .15s, box-shadow .15s, background .15s; }
.join-card input::placeholder { color: #a59fbb; font-weight: 600; }
.join-card input:focus, .join-card select:focus { border-color: var(--purple); background: #fff; box-shadow: 0 0 0 5px rgba(124,58,237,.15); }
.join-card select { width: 100%; font-size: 1.1rem; padding: 13px; border: 2px solid var(--line); border-radius: 16px; margin-bottom: 12px; background: var(--soft); outline: none; }
.join-card .btn { width: 100%; justify-content: center; }
.join-card .err { color: var(--red-d); }
.join-card h2 { margin: 0 0 16px; font-size: 1.15rem; }
#pin { letter-spacing: .3em; font-variant-numeric: tabular-nums; }
#pin:placeholder-shown { letter-spacing: 0; }

.avatar { font-size: 4.6rem; width: 132px; height: 132px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), rgba(255,255,255,.08) 60%);
  box-shadow: 0 0 0 8px rgba(255,255,255,.07), 0 0 60px rgba(236,72,153,.45), inset 0 0 0 1px rgba(255,255,255,.3); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-3deg); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; max-width: 760px; }
.chip { background: var(--glass); border: 1px solid var(--glass-b); padding: 7px 14px; border-radius: 99px; font-weight: 600; backdrop-filter: blur(8px); }
.chip.new { animation: pop .45s var(--spring); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.dots::after { content: ''; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.spinner { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 22px;
  background: conic-gradient(from 0deg, transparent, #f0abfc, #fff); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.count-num { font-size: 10rem; font-weight: 900; line-height: 1; animation: zoom 1s var(--ease) infinite; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #fde68a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 30px rgba(251,191,36,.55)); }
@keyframes zoom { from { transform: scale(1.8); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 85% { opacity: 1; } to { transform: scale(.85); opacity: 0; } }

.topbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(10,0,40,.28); border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(12px); }
.pill { background: var(--glass); border: 1px solid var(--glass-b); border-radius: 99px; padding: 6px 13px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; backdrop-filter: blur(8px); }
.timer { position: relative; height: 8px; background: rgba(255,255,255,.1); }
.timer > i { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: 0 99px 99px 0;
  background: linear-gradient(90deg, #67e8f9, #a78bfa, #f0abfc); box-shadow: 0 0 16px rgba(167,139,250,.8); }
.timer > i.low { background: linear-gradient(90deg, #fbbf24, #fb7185); box-shadow: 0 0 16px rgba(251,113,133,.9); }
.q-box { margin: 14px 12px; padding: 22px 18px; border-radius: 22px; text-align: center; flex: none;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06)); border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.2); backdrop-filter: blur(14px); animation: cardIn .5s var(--spring) both; }
.q-box img { max-height: 32vh; border-radius: 14px; margin-bottom: 12px; display: block; margin-inline: auto; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); }
.q-text { font-size: clamp(1.2rem, 3.6vw, 1.8rem); font-weight: 700; white-space: pre-wrap; word-break: break-word; line-height: 1.35; letter-spacing: -.01em; }
.q-hint { margin-top: 10px; opacity: .8; font-size: .92rem; }
.q-hint:empty { display: none; }
.answers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 12px 14px; flex: 1; counter-reset: opt; }
.answers.n3 { grid-template-columns: repeat(3, 1fr); }
.answers.n5, .answers.n6 { grid-template-columns: repeat(3, 1fr); }
.tile { --c: var(--c0); --cd: var(--c0d); border: 0; border-radius: 20px; color: #fff; font-size: clamp(1.05rem, 3vw, 1.45rem); font-weight: 700; padding: 18px; min-height: 96px;
  display: flex; align-items: center; justify-content: center; text-align: center; position: relative; word-break: break-word; line-height: 1.3;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 82%, #fff), var(--c) 45%, var(--cd));
  box-shadow: 0 6px 0 var(--cd), 0 16px 30px -12px var(--cd), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .14s var(--ease), box-shadow .14s var(--ease), opacity .25s, filter .25s; text-shadow: 0 1px 2px rgba(0,0,0,.2); animation: tileIn .45s var(--spring) both; }
.answers .tile:nth-child(2) { animation-delay: .05s; } .answers .tile:nth-child(3) { animation-delay: .1s; } .answers .tile:nth-child(4) { animation-delay: .15s; }
.answers .tile:nth-child(5) { animation-delay: .2s; } .answers .tile:nth-child(6) { animation-delay: .25s; }
@keyframes tileIn { from { transform: translateY(20px) scale(.92); opacity: 0; } }
.answers .tile { padding-left: 58px; }
.answers .tile::before { counter-increment: opt; content: counter(opt, upper-alpha); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: .95rem; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.tile:hover { filter: brightness(1.07); }
.tile:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--cd), 0 6px 12px -8px var(--cd); }
.tile.sel { transform: translateY(2px) scale(.98); box-shadow: 0 4px 0 var(--cd), 0 0 0 4px #fff, 0 0 36px rgba(255,255,255,.55); }
.tile.sel::after { content: '✓'; position: absolute; top: -9px; right: -9px; background: #fff; color: var(--green-d); width: 32px; height: 32px; border-radius: 50%;
  font-size: 1.05rem; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,.3); animation: pop .3s var(--spring); }
.tile.dim { opacity: .3; filter: grayscale(.5); }
.c0 { --c: var(--c0); --cd: var(--c0d); background-color: var(--c0); } .c1 { --c: var(--c1); --cd: var(--c1d); background-color: var(--c1); }
.c2 { --c: var(--c2); --cd: var(--c2d); background-color: var(--c2); } .c3 { --c: var(--c3); --cd: var(--c3d); background-color: var(--c3); }
.c4 { --c: var(--c4); --cd: var(--c4d); background-color: var(--c4); } .c5 { --c: var(--c5); --cd: var(--c5d); background-color: var(--c5); }
.fill-box { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 14px; max-width: 560px; width: 100%; margin: 0 auto; }
.fill-box input { font-size: 1.4rem; font-weight: 700; padding: 18px; border-radius: 18px; border: 2px solid transparent; text-align: center; color: var(--text); outline: none;
  background: #fff; box-shadow: 0 16px 40px -14px rgba(0,0,0,.5); transition: border-color .15s, box-shadow .15s; }
.fill-box input:focus { border-color: #c4b5fd; box-shadow: 0 0 0 6px rgba(196,181,253,.3), 0 16px 40px -14px rgba(0,0,0,.5); }
.submit-bar { padding: 0 12px 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); display: flex; justify-content: center; }
@media (max-width: 640px) {
  .answers, .answers.n3, .answers.n5, .answers.n6 { grid-template-columns: 1fr; gap: 10px; }
  .answers.n2 { grid-template-columns: 1fr 1fr; }
  .answers.n2 .tile { padding-left: 18px; padding-top: 46px; }
  .answers.n2 .tile::before { top: 12px; left: 50%; transform: translateX(-50%); }
  .tile { min-height: 66px; justify-content: flex-start; text-align: left; }
  .answers.n2 .tile { justify-content: center; text-align: center; }
}

.intro { background: radial-gradient(circle at 50% 35%, rgba(251,191,36,.55), rgba(244,63,94,.35) 45%, transparent 75%); }
.intro h1 { font-size: clamp(2.2rem, 8vw, 4.6rem); font-weight: 900; margin: 10px 0 18px; animation: pop .6s var(--spring);
  background: linear-gradient(180deg, #fff 40%, #fde68a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 24px rgba(251,191,36,.5)); }
.intro .intro-step { font-weight: 800; letter-spacing: .3em; text-transform: uppercase; opacity: .9; font-size: .9rem; }
.sec-pill { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: .85rem; }
.fb { transition: background .4s; }
.fb.ok { background: radial-gradient(circle at 50% 30%, #34d399, #059669 55%, #064e3b); }
.fb.bad { background: radial-gradient(circle at 50% 30%, #fb7185, #e11d48 55%, #6b0f2a); }
.fb.neutral { background: radial-gradient(circle at 50% 30%, #a78bfa, #6d28d9 55%, #2e1065); }
.fb .big-icon { font-size: 5.5rem; line-height: 1; margin-bottom: 10px; animation: bigPop .7s var(--spring); filter: drop-shadow(0 10px 20px rgba(0,0,0,.3)); }
@keyframes bigPop { 0% { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.2) rotate(8deg); } }
.fb h2 { font-size: 2.4rem; font-weight: 900; margin: 0 0 8px; }
.fb .pts { font-size: 1.8rem; font-weight: 900; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); padding: 8px 22px; border-radius: 99px; display: inline-block; margin: 6px 0; animation: pop .5s var(--spring) .15s both; }
.fb .meme { font-size: 1.2rem; font-weight: 600; margin: 10px 0; opacity: .95; }
.fb .info { background: rgba(0,0,0,.2); border: 1px solid rgba(255,255,255,.15); border-radius: 16px; padding: 14px 18px; margin-top: 14px; max-width: 540px; text-align: left; white-space: pre-wrap; line-height: 1.5; }
.fb .btn { margin-top: 20px; }

.end-card { background: #fff; color: var(--text); border-radius: 26px; padding: 24px; width: 100%; max-width: 580px; box-shadow: var(--shadow-lg); text-align: left; animation: cardIn .6s var(--spring) both; }
.end-card h2 { margin: 0 0 6px; text-align: center; font-weight: 900; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 16px 0; }
.stat { background: linear-gradient(180deg, #faf8ff, #f2eefb); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 1.6rem; font-weight: 900; color: var(--purple-d); font-variant-numeric: tabular-nums; }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 500; }
.medal { font-size: 4.5rem; text-align: center; animation: bigPop .8s var(--spring); }
.lb-list { list-style: none; padding: 0; margin: 8px 0; }
.lb-list li { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; align-items: center; }
.lb-list li:nth-child(odd) { background: var(--soft); }
.lb-list li.me { background: linear-gradient(90deg, #ede9fe, #fae8ff); font-weight: 700; box-shadow: inset 0 0 0 1.5px #c4b5fd; }
.lb-list .r { width: 30px; font-weight: 900; color: var(--purple); }
.lb-list li:nth-child(1) .r { color: #d97706; } .lb-list li:nth-child(2) .r { color: #64748b; } .lb-list li:nth-child(3) .r { color: #b45309; }
.review { margin-top: 12px; }
.review div { border-left: 4px solid var(--line); padding: 8px 12px; margin: 8px 0; font-size: .93rem; background: var(--soft); border-radius: 0 10px 10px 0; }
.review div.ok { border-color: var(--green); background: #ecfdf5; } .review div.bad { border-color: var(--red); background: #fff1f2; }
.net-warn { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); background: #fbbf24; color: #3b2300; text-align: center; padding: 8px 18px; border-radius: 99px;
  font-weight: 700; z-index: 99; box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: pop .3s var(--spring); white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }

/* ================= MÀN HÌNH NGƯỜI DẪN ================= */
.host { color: #fff; }
.host-top { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: rgba(10,0,40,.3); border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(14px); flex-wrap: wrap; position: relative; z-index: 6; }
.host-top .title { font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; white-space: nowrap; }
.host-top .logo { height: 54px; width: 54px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; flex: none; box-shadow: 0 0 0 4px rgba(255,255,255,.12); }
.host-top .org-line { font-size: .72rem; letter-spacing: .14em; opacity: .75; font-weight: 700; text-transform: uppercase; }
.host-top .center-title { text-align: center; font-weight: 700; font-size: 1.05rem; opacity: .95; padding: 0 10px; min-width: 0; }
@media (max-width: 800px) { .host-top .center-title { display: none; } }
.join-panel { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; background: #fff; color: var(--text); border-radius: 28px; padding: 26px 32px;
  margin: 22px auto; max-width: 1000px; width: calc(100% - 32px); box-shadow: var(--shadow-lg); position: relative; animation: cardIn .7s var(--spring) both; }
.join-panel::before { content: ''; position: absolute; inset: -3px; border-radius: 31px; z-index: -1; background: linear-gradient(120deg, #f0abfc, #a78bfa, #67e8f9, #fde68a); filter: blur(18px); opacity: .7; }
.join-panel .step { font-size: 1.05rem; color: var(--muted); margin: 4px 0; font-weight: 500; }
.join-panel .url { font-size: clamp(1.4rem, 3.4vw, 2.3rem); font-weight: 800; word-break: break-all; letter-spacing: -.02em;
  background: linear-gradient(90deg, #6d28d9, #db2777); -webkit-background-clip: text; background-clip: text; color: transparent; }
.join-panel .pin { font-size: clamp(3rem, 8vw, 5.8rem); font-weight: 900; letter-spacing: .1em; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums;
  display: inline-block; padding: 8px 18px 10px; margin: 4px 0; border-radius: 18px; background: var(--soft); border: 2px dashed #d6cdea; }
.join-panel img.qr { width: 220px; height: 220px; padding: 10px; background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px var(--line), 0 12px 30px -12px rgba(30,16,70,.35); }
@media (max-width: 700px) { .join-panel { grid-template-columns: 1fr; text-align: center; } .join-panel img.qr { margin: auto; } }
.lobby-title { text-align: center; padding: 22px 16px 0; }
.lobby-title h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 900; filter: drop-shadow(0 4px 18px rgba(168,85,247,.55)); }
.lobby-title p { margin: 8px auto 0; font-size: clamp(1rem, 1.8vw, 1.3rem); white-space: pre-line; max-width: 1000px; opacity: .9; }
.lobby-title + .join-panel { margin-top: 16px; }
.live-intro { margin: auto; text-align: center; }
.live-intro .step { font-size: 1.4rem; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; opacity: .85; }
.live-intro h1 { font-size: clamp(2.8rem, 7.5vw, 6rem); font-weight: 900; margin: 12px 0 22px; animation: pop .7s var(--spring);
  background: linear-gradient(180deg, #fff 40%, #fde68a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 8px 30px rgba(251,191,36,.5)); }
.lobby-area { flex: 1; padding: 0 16px 110px; text-align: center; }
.lobby-area .count { font-size: 1.4rem; font-weight: 800; display: inline-flex; padding: 8px 20px; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-b); }
.chip.kick { cursor: pointer; font-size: 1.1rem; padding: 9px 16px; transition: background .2s, transform .15s; }
.chip.kick:hover { background: var(--red); border-color: transparent; text-decoration: line-through; transform: scale(1.04); }
.host-bottom { position: fixed; bottom: 0; left: 0; right: 0; display: flex; gap: 10px; padding: 14px 20px; padding-bottom: max(14px, env(safe-area-inset-bottom));
  background: rgba(10,0,40,.45); border-top: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(16px) saturate(1.3); align-items: center; flex-wrap: wrap; z-index: 5; }

.board { max-width: 1140px; width: calc(100% - 32px); margin: 18px auto 110px; display: grid; grid-template-columns: 1fr 310px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
.panel { background: #fff; color: var(--text); border-radius: 22px; padding: 18px 20px; box-shadow: var(--shadow-lg); animation: cardIn .5s var(--spring) both; }
.panel h3 { margin: 2px 0 12px; font-weight: 800; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; max-width: 1140px; width: calc(100% - 32px); margin: 18px auto 0; }
.kpi { background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06)); border: 1px solid var(--glass-b); border-radius: 20px; padding: 14px 18px; backdrop-filter: blur(10px); }
.kpi span { font-size: .85rem; opacity: .8; font-weight: 600; }
.kpi b { font-size: 2rem; font-weight: 900; display: block; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ptable { width: 100%; border-collapse: collapse; }
.ptable td, .ptable th { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.ptable th { font-size: .78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.ptable tr { transition: background .3s; }
.ptable tbody tr:hover td { background: var(--soft); }
.ptable tbody tr:nth-child(1) td:first-child b, .ptable tbody tr:nth-child(1) td:first-child { color: #d97706; }
.prog { display: flex; height: 12px; background: #eeebf5; border-radius: 99px; overflow: hidden; min-width: 120px; box-shadow: inset 0 1px 2px rgba(0,0,0,.06); }
.prog i { display: block; height: 100%; transition: width .5s var(--ease); }
.prog .g { background: linear-gradient(90deg, #34d399, #10b981); } .prog .r { background: linear-gradient(90deg, #fb7185, #f43f5e); } .prog .s { background: #c7c2d6; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); margin-right: 6px; box-shadow: 0 0 0 3px rgba(16,185,129,.2); }
.dot.off { background: #bbb; box-shadow: none; }
.badge { display: inline-block; font-size: .74rem; padding: 3px 9px; border-radius: 99px; background: #d1fae5; color: #047857; font-weight: 700; }
.badge.gray { background: #eeecf3; color: #5f5a70; }
.badge.purple { background: #ede9fe; color: var(--purple-d); }
.badge.yellow { background: #fef3c7; color: #a16207; }

.live-wrap { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 104px; max-width: 1320px; width: 100%; margin: 0 auto; }
.live-q { background: #fff; color: var(--text); border-radius: 24px; padding: 26px 28px; text-align: center; font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 800; white-space: pre-wrap;
  box-shadow: var(--shadow-lg); line-height: 1.3; letter-spacing: -.02em; animation: cardIn .55s var(--spring) both; }
.live-mid { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 18px 0; }
.live-mid.compact { margin: 10px 0; }
.live-mid.compact .circle { width: 88px; height: 88px; font-size: 1.5rem; }
.live-mid.compact img { max-height: 16vh; }
.live-mid img { max-height: 34vh; border-radius: 16px; box-shadow: 0 20px 40px -16px rgba(0,0,0,.6); }
.circle { width: 118px; height: 118px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.8rem; font-weight: 900; flex: none; font-variant-numeric: tabular-nums;
  background: radial-gradient(circle at 30% 25%, #8b5cf6, #4c1d95); box-shadow: 0 0 0 6px rgba(255,255,255,.14), 0 0 40px rgba(139,92,246,.6), inset 0 2px 0 rgba(255,255,255,.25); transition: background .3s; }
.circle > div { text-align: center; line-height: 1.05; }
.circle.low { background: radial-gradient(circle at 30% 25%, #fb7185, #be123c) !important; box-shadow: 0 0 0 6px rgba(255,255,255,.14), 0 0 50px rgba(244,63,94,.8); animation: pulse .5s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.06); } }
.answered { text-align: center; font-size: 1.05rem; flex: none; opacity: .95; font-weight: 600; }
.answered b { font-size: 2.8rem; font-weight: 900; display: block; font-variant-numeric: tabular-nums; }
.live-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.live-opts .tile { min-height: 84px; cursor: default; font-size: clamp(1.1rem, 2.2vw, 1.75rem); justify-content: flex-start; text-align: left; gap: 14px; }
.live-opts .tile:nth-child(2) { animation-delay: .07s; } .live-opts .tile:nth-child(3) { animation-delay: .14s; } .live-opts .tile:nth-child(4) { animation-delay: .21s; }
.live-opts .tile:nth-child(5) { animation-delay: .28s; } .live-opts .tile:nth-child(6) { animation-delay: .35s; }
.live-opts .tile .k { background: rgba(255,255,255,.24); border-radius: 12px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; flex: none; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.live-opts .tile .n { margin-left: auto; font-weight: 900; background: rgba(0,0,0,.22); padding: 4px 14px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.live-opts .tile.right { box-shadow: 0 6px 0 var(--cd), 0 0 0 4px #fff, 0 0 50px rgba(255,255,255,.5); }
.live-opts .tile.right::after { content: '✔'; position: absolute; top: -12px; right: -10px; background: #fff; color: var(--green-d); width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 900; box-shadow: 0 4px 12px rgba(0,0,0,.35); animation: bigPop .6s var(--spring); }
.bars { display: flex; justify-content: center; align-items: flex-end; gap: 20px; height: 15vh; margin: 0 0 12px; }
.bar { width: 92px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bar i { display: block; width: 100%; border-radius: 12px 12px 4px 4px; min-height: 6px; transition: height 1s var(--ease);
  background-image: linear-gradient(180deg, rgba(255,255,255,.3), transparent); box-shadow: 0 0 24px -4px var(--c); }
.bar b { font-size: 1.5rem; font-weight: 900; margin-bottom: 6px; }
.explain { background: linear-gradient(180deg, rgba(251,191,36,.18), rgba(251,191,36,.08)); border: 1px solid rgba(251,191,36,.4); border-radius: 18px; padding: 14px 18px; margin-top: 16px; font-size: 1.15rem; white-space: pre-wrap; line-height: 1.5; }
.lb-big { max-width: 780px; width: 100%; margin: 10px auto; list-style: none; padding: 0; counter-reset: none; }
.lb-big li { display: flex; align-items: center; gap: 14px; background: #fff; color: var(--text); border-radius: 18px; padding: 14px 20px; margin-bottom: 10px; font-size: 1.35rem; font-weight: 700;
  animation: slidein .5s var(--spring) both; box-shadow: 0 12px 30px -14px rgba(0,0,0,.6); }
.lb-big li:nth-child(1) { background: linear-gradient(90deg, #fef3c7, #fff 60%); box-shadow: 0 0 0 3px #fbbf24, 0 16px 40px -12px rgba(251,191,36,.6); }
.lb-big li:nth-child(2) { background: linear-gradient(90deg, #f1f5f9, #fff 60%); box-shadow: 0 0 0 2px #cbd5e1, 0 12px 30px -14px rgba(0,0,0,.6); }
.lb-big li:nth-child(3) { background: linear-gradient(90deg, #ffedd5, #fff 60%); box-shadow: 0 0 0 2px #fdba74, 0 12px 30px -14px rgba(0,0,0,.6); }
.lb-big li .r { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--soft); color: var(--purple-d); font-size: 1.3rem; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.lb-big li:nth-child(1) .r { background: linear-gradient(180deg, #fde68a, #f59e0b); color: #fff; }
.lb-big li:nth-child(2) .r { background: linear-gradient(180deg, #e2e8f0, #94a3b8); color: #fff; }
.lb-big li:nth-child(3) .r { background: linear-gradient(180deg, #fdba74, #c2410c); color: #fff; }
.lb-big li .s { margin-left: auto; font-weight: 900; color: var(--purple-d); font-variant-numeric: tabular-nums; }
.lb-big li small { font-weight: 500; color: var(--muted); font-size: .9rem; }
@keyframes slidein { from { transform: translateX(-50px); opacity: 0; } }

.podium { display: flex; justify-content: center; align-items: flex-end; gap: 16px; margin: 30px auto 10px; max-width: 780px; width: 100%; padding: 0 16px; }
.podium .pl { flex: 1; max-width: 230px; text-align: center; animation: rise 1s var(--spring) both; }
.podium .pl .nm { font-weight: 800; font-size: 1.3rem; margin-bottom: 4px; word-break: break-word; }
.podium .pl .sc { opacity: .9; margin-bottom: 10px; font-weight: 600; }
.podium .pl .blk { border-radius: 18px 18px 4px 4px; display: flex; align-items: flex-start; justify-content: center; padding-top: 14px; font-size: 3.2rem;
  box-shadow: inset 0 -10px 0 rgba(0,0,0,.15), inset 0 2px 0 rgba(255,255,255,.5); position: relative; overflow: hidden; }
.podium .pl .blk::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.5) 50%, transparent 60%); transform: translateX(-100%); animation: shine 3s ease-in-out infinite 2s; }
@keyframes shine { 40%, 100% { transform: translateX(100%); } }
.podium .p1 .blk { height: 240px; background: linear-gradient(#fde68a, #f59e0b); box-shadow: inset 0 -10px 0 rgba(0,0,0,.15), 0 0 60px rgba(251,191,36,.55); }
.podium .p2 .blk { height: 175px; background: linear-gradient(#f1f5f9, #94a3b8); }
.podium .p3 .blk { height: 135px; background: linear-gradient(#fdba74, #c2410c); }
.podium .p1 { animation-delay: 1.2s; } .podium .p2 { animation-delay: .6s; } .podium .p3 { animation-delay: 0s; }
@keyframes rise { from { transform: translateY(100px); opacity: 0; } }

/* ================= QUẢN LÝ ================= */
body:not(.play-bg) { background: radial-gradient(1200px 500px at 100% -10%, #efe7ff, transparent 60%), radial-gradient(900px 400px at -10% 0%, #fde7f3, transparent 60%), var(--bg); background-attachment: fixed; }
.admin-head { display: flex; align-items: center; gap: 14px; padding: 12px 24px; color: #fff; flex-wrap: wrap; position: sticky; top: 0; z-index: 20;
  background: linear-gradient(100deg, #2e1065, #5b21b6 55%, #9d174d); box-shadow: 0 10px 30px -12px rgba(46,16,101,.6); }
.admin-head img { height: 46px; width: 46px; object-fit: contain; background: #fff; border-radius: 50%; padding: 2px; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.admin-head .org { white-space: nowrap; font-size: .7rem; letter-spacing: .14em; opacity: .75; text-transform: uppercase; font-weight: 700; }
.admin-head .app { font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.admin-head .btn { --b: rgba(255,255,255,.14); --bd: rgba(0,0,0,.2); background: var(--b); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; padding-left: 10px; }
.nav a { color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 12px; font-weight: 600; opacity: .78; transition: background .2s, opacity .2s; font-size: .95rem; }
.nav a:hover { background: rgba(255,255,255,.1); opacity: 1; }
.nav a.on { background: rgba(255,255,255,.2); opacity: 1; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.admin-main { max-width: 1180px; margin: 0 auto; padding: 26px 18px 80px; animation: screenIn .4s var(--ease); }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar h2 { margin: 0; font-size: 1.6rem; font-weight: 900; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.qz { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; border: 1px solid var(--line);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease); animation: cardIn .5s var(--spring) both; }
.qz:hover { transform: translateY(-4px); box-shadow: 0 4px 8px rgba(30,16,70,.05), 0 24px 48px -16px rgba(91,33,182,.3); }
.qz .cv { height: 130px; background: linear-gradient(135deg, #7c3aed, #db2777 70%, #f59e0b); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 3.2rem; font-weight: 900; text-shadow: 0 4px 20px rgba(0,0,0,.3); position: relative; }
.qz .bd { padding: 14px 16px; flex: 1; }
.qz h3 { margin: 0 0 4px; font-size: 1.08rem; font-weight: 800; }
.qz .act { display: flex; gap: 6px; padding: 0 16px 16px; flex-wrap: wrap; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); background: #fff; border-radius: 22px; border: 2px dashed var(--line); }
.empty .ic { font-size: 3.2rem; margin-bottom: 6px; }
.card { background: #fff; border-radius: 20px; padding: 18px 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); margin-bottom: 16px; }
.card h3 { font-weight: 800; }
.table-wrap { overflow-x: auto; }
.table-wrap.card { overflow: auto; }
table.tbl { width: 100%; border-collapse: collapse; background: #fff; }
table.tbl th, table.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.tbl th { background: var(--soft); font-size: .76rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tr:hover td { background: #faf8ff; }

.ed-head { position: sticky; top: 70px; z-index: 4; background: rgba(245,243,251,.85); backdrop-filter: blur(12px); padding: 12px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.ed-head .title-in { flex: 1; min-width: 220px; font-size: 1.25rem; font-weight: 800; }
.ed-info { display: grid; grid-template-columns: 1fr 230px; gap: 16px; }
@media (max-width: 700px) { .ed-info { grid-template-columns: 1fr; } .ed-head { top: 0; } .admin-head { position: static; } }
.cover-box { border: 2px dashed #d6cdea; border-radius: 16px; height: 136px; display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center;
  cursor: pointer; color: var(--muted); position: relative; background-color: var(--soft); transition: border-color .2s, background-color .2s; font-weight: 600; }
.cover-box:hover { border-color: var(--purple); background-color: #f3eeff; }
.qcard { background: #fff; border-radius: 20px; padding: 16px 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm); border: 1.5px solid var(--line); transition: box-shadow .2s, border-color .2s; }
.qcard:focus-within { border-color: #c4b5fd; box-shadow: 0 0 0 4px rgba(124,58,237,.08), var(--shadow); }
.qcard.invalid { border-color: #fda4af; background: linear-gradient(180deg, #fff5f6, #fff 80px); }
.qcard.sec-start { border-top: 6px solid var(--yellow); margin-top: 28px; }
.qcard.sec-start .q-sec { border-color: var(--yellow); background: #fffbeb; font-weight: 700; }
.qhead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.qhead .no { background: linear-gradient(180deg, #8b5cf6, #6d28d9); color: #fff; border-radius: 10px; padding: 5px 11px; font-weight: 800; box-shadow: 0 4px 10px -4px rgba(109,40,217,.6); }
.qhead select { border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 9px; background: #fff; outline: none; }
.qhead select:focus { border-color: var(--purple); }
.qhead .tools { margin-left: auto; display: flex; gap: 4px; }
.qhead .tools button { border: 0; background: var(--soft); border-radius: 10px; width: 36px; height: 36px; transition: background .15s, transform .15s; }
.qhead .tools button:hover { background: #ebe4fb; transform: translateY(-1px); }
.q-in { width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; min-height: 66px; resize: vertical; font-size: 1.05rem; font-weight: 500; outline: none; background: var(--soft); transition: border-color .15s, background .15s, box-shadow .15s; }
.q-in:focus { border-color: var(--purple); background: #fff; box-shadow: 0 0 0 4px rgba(124,58,237,.12); }
.q-imgrow { margin: 10px 0; display: flex; gap: 10px; align-items: center; }
.q-imgrow img { max-height: 120px; border-radius: 12px; }
.opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
@media (max-width: 700px) { .opts { grid-template-columns: 1fr; } }
.opt { display: flex; align-items: center; gap: 8px; border-radius: 14px; padding: 7px; background-image: linear-gradient(160deg, rgba(255,255,255,.18), transparent); box-shadow: 0 3px 0 var(--cd); }
.opt input.o-in { flex: 1; border: 0; border-radius: 10px; padding: 10px 12px; background: rgba(255,255,255,.95); outline: none; min-width: 0; font-weight: 500; }
.opt input.o-in:focus { box-shadow: 0 0 0 3px rgba(255,255,255,.6); }
.opt .mark { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; background: rgba(255,255,255,.2); color: #fff; flex: none; font-weight: 900; transition: transform .15s var(--spring), background .15s; }
.opt .mark:hover { transform: scale(1.1); }
.opt .mark.on { background: #fff; color: var(--green-d); }
.opt .mark.sq { border-radius: 9px; }
.opt .x { border: 0; background: transparent; color: #fff; font-size: 1.1rem; width: 28px; opacity: .8; }
.opt .x:hover { opacity: 1; }
.q-foot { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.q-foot input { flex: 1; min-width: 200px; }
.addbar { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 18px; border: 2px dashed #d6cdea; border-radius: 20px; background: rgba(255,255,255,.5); }

.modal-bg { position: fixed; inset: 0; background: rgba(20,8,50,.45); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { background: #fff; color: var(--text); border-radius: 24px; width: 100%; max-width: 620px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px 26px; box-shadow: 0 40px 100px -20px rgba(20,0,60,.5); animation: cardIn .35s var(--spring); }
.modal h3 { margin: 0 0 16px; font-size: 1.3rem; font-weight: 800; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.seg label { border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.seg label:hover { border-color: #c4b5fd; }
.seg label:has(input:checked) { border-color: var(--purple); background: #f5f0ff; box-shadow: 0 0 0 4px rgba(124,58,237,.1); }
.seg input { accent-color: var(--purple); }
.seg b { display: block; }
.seg small { color: var(--muted); }
@media (max-width: 560px) { .seg { grid-template-columns: 1fr; } }
.toast-box { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; width: calc(100% - 32px); max-width: 520px; pointer-events: none; }
.toast { background: rgba(30,22,51,.94); color: #fff; padding: 12px 20px; border-radius: 14px; box-shadow: 0 16px 40px -10px rgba(0,0,0,.5); white-space: pre-line; animation: toastIn .35s var(--spring); font-weight: 600; backdrop-filter: blur(10px); }
@keyframes toastIn { from { transform: translateY(20px) scale(.95); opacity: 0; } }
.toast.err { background: var(--red-d); } .toast.ok { background: var(--green-d); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-wrap .join-card input { letter-spacing: 0; }
.accbar { height: 10px; background: #eeebf5; border-radius: 99px; overflow: hidden; min-width: 90px; }
.accbar i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
pre.sample { background: var(--soft); border: 1px solid var(--line); padding: 12px; border-radius: 12px; font-size: .85rem; white-space: pre-wrap; margin: 6px 0 10px; }

/* Trang trao giải dùng chung nền sân khấu */
.aw-card { border-radius: 22px !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Chọn thời gian mở phòng */
.dur { display: flex; flex-wrap: wrap; gap: 8px; }
.dur label { cursor: pointer; }
.dur input { position: absolute; opacity: 0; pointer-events: none; }
.dur span { display: inline-block; padding: 9px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; transition: border-color .15s, background .15s, color .15s; }
.dur label:hover span { border-color: #c4b5fd; }
.dur input:checked + span { border-color: var(--purple); background: #f5f0ff; color: var(--purple-d); box-shadow: 0 0 0 4px rgba(124,58,237,.1); }
.dur input:focus-visible + span { outline: 3px solid #a78bfa; outline-offset: 2px; }
#q-left.warn { background: var(--red); border-color: transparent; animation: pulse .5s ease-in-out infinite alternate; }

/* ================= TRANG ĐIỀU KHIỂN (/host) ================= */
.ctl-main { padding-bottom: 120px; }
.ctl-status { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; }
.ctl-pin { text-align: center; padding: 10px 18px; border-radius: 18px; background: linear-gradient(160deg, #8b5cf6, #5b21b6); color: #fff; box-shadow: 0 12px 30px -12px rgba(91,33,182,.7); }
.ctl-pin small { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; font-weight: 700; }
.ctl-pin b { font-size: 2.6rem; font-weight: 900; letter-spacing: .06em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ctl-info .row { gap: 6px; }
.ctl-url { font-size: 1.3rem; font-weight: 800; margin: 8px 0 2px; word-break: break-all; color: var(--purple-d); }
.ctl-qr { width: 110px; height: 110px; border-radius: 12px; border: 1px solid var(--line); padding: 4px; background: #fff; }
@media (max-width: 640px) { .ctl-status { grid-template-columns: 1fr; text-align: center; } .ctl-info .row { justify-content: center; } .ctl-qr { margin: auto; } }
.ctl-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ctl-kpi { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px 16px; box-shadow: var(--shadow-sm); }
.ctl-kpi span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.ctl-kpi b { display: block; font-size: 1.8rem; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ctl-q { font-size: 1.25rem; font-weight: 700; white-space: pre-wrap; margin: 4px 0 12px; }
.ctl-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 640px) { .ctl-opts { grid-template-columns: 1fr; } }
.ctl-opt { display: flex; gap: 10px; align-items: center; color: #fff; border-radius: 12px; padding: 9px 12px; font-weight: 600; background: var(--c); }
.ctl-opt b { width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; flex: none; }
.ctl-opt em { margin-left: auto; font-style: normal; font-weight: 900; background: rgba(0,0,0,.2); padding: 1px 10px; border-radius: 99px; }
.ctl-opt.right { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--green); }
.ctl-opt.right::after { content: '✔'; font-weight: 900; }
.ctl-timer { font-weight: 900; font-variant-numeric: tabular-nums; padding: 3px 12px; border-radius: 99px; background: var(--purple); color: #fff; }
.ctl-timer.low { background: var(--red); }
.ctl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ctl-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border: 1px solid var(--line); border-radius: 99px; padding: 5px 6px 5px 12px; font-weight: 600; animation: pop .3s var(--spring); }
.ctl-chip small { color: var(--muted); font-weight: 500; }
.ctl-chip button { border: 0; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--muted); font-weight: 800; transition: background .15s, color .15s; }
.ctl-chip button:hover { background: var(--red); color: #fff; }
.ctl .host-bottom { background: rgba(255,255,255,.85); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -16px rgba(30,16,70,.25); }

/* Màn "lêu lêu" khi trả lời sai */
.fb.tease { background: radial-gradient(circle at 50% 30%, #fb923c, #e11d48 55%, #6b0f2a); overflow: hidden; position: relative; animation: teaseShake .5s ease-in-out .1s; }
.fb.tease .big-icon { font-size: 7rem; animation: teaseWobble 1s ease-in-out infinite; }
.fb.tease h2 { font-size: clamp(2.2rem, 9vw, 3.4rem); letter-spacing: -.02em; text-shadow: 0 4px 0 rgba(0,0,0,.18); animation: bigPop .6s var(--spring); }
.fb.tease .meme { font-size: 1.35rem; font-weight: 800; background: rgba(255,255,255,.16); border: 1px dashed rgba(255,255,255,.5); padding: 8px 18px; border-radius: 99px; display: inline-block; transform: rotate(-2deg); }
.fb.tease > *:not(.tease-fx) { position: relative; z-index: 1; }
.tease-fx { position: absolute; bottom: -60px; z-index: 0; pointer-events: none; animation: teaseUp 3s ease-in both; opacity: .85; }
@keyframes teaseUp { to { transform: translateY(-115vh) rotate(40deg); opacity: 0; } }
@keyframes teaseWobble { 0%, 100% { transform: rotate(-14deg) scale(1); } 50% { transform: rotate(14deg) scale(1.12); } }
@keyframes teaseShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-12px); } 40% { transform: translateX(10px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
.ctl .admin-head .app { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.brand h1[data-app] { white-space: nowrap; overflow-wrap: normal; }
#quiz-title { font-size: clamp(1.35rem, 5.6vw, 2.4rem); max-width: min(620px, 100%); padding: 0 4px; }
.log-list { font-size: .9rem; max-height: 70vh; overflow: auto; }
.log-list > div { display: flex; gap: 10px; align-items: baseline; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.log-list time { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.log-list .badge { flex: none; }
.badge.red { background: #ffe4e6; color: #be123c; }

/* Màn hình chiếu – chế độ tự do: bảng xếp hạng nằm giữa trang */
.screen-view #h-self .board:has(#unit-panel[hidden]) { grid-template-columns: minmax(0, 960px); justify-content: center; }
.screen-view #h-self .board:has(#unit-panel[hidden]) #side { display: none; }
.screen-view #h-self .panel h3 { text-align: center; font-size: 1.6rem; margin-bottom: 14px; }
.screen-view #h-self .kpis { max-width: 960px; }
.screen-view #h-self .ptable td { font-size: 1.1rem; }

/* Mã nhận thưởng */
.claim { margin: 14px auto 6px; text-align: center; padding: 16px 14px 14px; border-radius: 20px; border: 2.5px dashed #f59e0b;
  background: linear-gradient(180deg, #fffbeb, #fef3c7); position: relative; animation: bigPop .7s var(--spring) .2s both; }
.claim small { display: block; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; color: #b45309; }
.claim b { display: block; font-size: clamp(2.2rem, 11vw, 3rem); font-weight: 900; letter-spacing: .12em; color: #1e1633; font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Be Vietnam Pro", monospace; margin: 2px 0; user-select: all; }
.claim span { display: block; font-weight: 700; color: #57534e; font-size: .92rem; }
.claim em { display: block; font-style: normal; font-size: .82rem; color: #92400e; margin-top: 8px; line-height: 1.4; }
code.claim-sm { font-family: ui-monospace, Consolas, monospace; font-weight: 800; letter-spacing: .06em; background: #fef3c7; color: #92400e; padding: 2px 7px; border-radius: 7px; font-size: .88em; white-space: nowrap; }
.aw-claim { margin-top: 6px; font-size: 1.05rem; color: #92400e; }
.aw-claim b { font-family: ui-monospace, Consolas, monospace; letter-spacing: .08em; background: #fef3c7; padding: 2px 10px; border-radius: 8px; }

/* Căn giữa các ô số liệu */
.kpi, .ctl-kpi { text-align: center; }

/* Bắn tim khi trả lời đúng: bàn tay búng ngón, tim bay ra từ đầu ngón */
#fb-icon { position: relative; }
.fb.ok .big-icon { font-size: 6.5rem; }
.finger { display: inline-block; transform-origin: 60% 80%; animation: fingerSnap .65s ease-in-out .3s 4; filter: drop-shadow(0 10px 20px rgba(0,0,0,.25)); }
@keyframes fingerSnap { 0%, 100% { transform: rotate(0) scale(1); } 30% { transform: rotate(-12deg) scale(.92); } 55% { transform: rotate(8deg) scale(1.12); } }
.heart-fx { position: absolute; left: 56%; top: 18%; pointer-events: none; z-index: 2; display: block; transform: translate(-50%, -50%) scale(0);
  animation: heartShoot 1.6s cubic-bezier(.2,.75,.35,1) both; filter: drop-shadow(0 3px 6px rgba(190,18,60,.45)); }
.heart-fx svg { width: 100%; height: 100%; fill: currentColor; display: block; }
@keyframes heartShoot {
  0% { transform: translate(-50%, -50%) scale(0) rotate(0); opacity: 1; }
  18% { transform: translate(calc(-50% + var(--x) * .35), calc(-50% + var(--y) * .3)) scale(1.25) rotate(calc(var(--r) * .5)); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(.75) rotate(var(--r)); opacity: 0; }
}
.my-code { margin: 10px auto 14px; font-weight: 700; opacity: .95; }
.my-code b { font-family: ui-monospace, Consolas, monospace; letter-spacing: .1em; font-size: 1.4rem; background: #fef3c7; color: #92400e; padding: 4px 12px; border-radius: 10px; margin-left: 6px; }
.lb-big li code.claim-sm { font-size: .85rem; flex: none; }
.fb.ok { overflow: hidden; position: relative; }
.fb.ok > *:not(.tease-fx) { position: relative; z-index: 1; }

/* Hào quang lan tỏa từ từ quanh logo */
.host-top .logo, .admin-head img, .brand img { animation: halo 3.2s ease-out infinite; }
.brand img { animation: logoIn .8s var(--spring) both, halo 3.2s ease-out .8s infinite; }
@keyframes halo {
  0%   { box-shadow: 0 0 14px 2px rgba(253,224,71,.55), 0 0 0 0 rgba(253,224,71,.55), 0 0 0 0 rgba(255,255,255,.35); }
  60%  { box-shadow: 0 0 22px 6px rgba(253,224,71,.35), 0 0 0 14px rgba(253,224,71,0), 0 0 0 7px rgba(255,255,255,.12); }
  100% { box-shadow: 0 0 14px 2px rgba(253,224,71,.55), 0 0 0 22px rgba(253,224,71,0), 0 0 0 14px rgba(255,255,255,0); }
}

/* Nút Quản trị góc phải trang chủ (chỉ ở màn nhập mã phòng) */
.admin-link { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 5; color: #fff; text-decoration: none; font-weight: 700; font-size: .9rem;
  padding: 8px 14px; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-b); backdrop-filter: blur(10px); transition: background .2s, transform .15s; }
.admin-link:hover { background: rgba(255,255,255,.22); transform: translateY(-1px); }
#s-join { position: relative; }

/* Khung báo giải trên điện thoại người đạt giải */
.prize { margin: 14px auto 4px; text-align: center; padding: 18px 14px 16px; border-radius: 22px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #f59e0b, #dc2626 70%, #9d174d); box-shadow: 0 14px 34px -12px rgba(220,38,38,.6), inset 0 1px 0 rgba(255,255,255,.35); animation: bigPop .8s var(--spring) .15s both; }
.prize::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%); transform: translateX(-100%); animation: shine 2.6s ease-in-out infinite 1s; }
.prize-ic { font-size: 3.2rem; line-height: 1; animation: heartBeatP 1.2s ease-in-out infinite; }
@keyframes heartBeatP { 0%, 100% { transform: scale(1); } 20% { transform: scale(1.18) rotate(-6deg); } 40% { transform: scale(1); } }
.prize small { display: block; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; opacity: .95; margin-top: 6px; }
.prize b { display: block; font-size: clamp(1.9rem, 9vw, 2.6rem); font-weight: 900; margin: 2px 0 6px; text-shadow: 0 3px 0 rgba(0,0,0,.18); }
.prize span { display: block; font-size: .9rem; font-weight: 600; opacity: .95; line-height: 1.4; }

/* Đường đua: con thú chạy trên thanh tiến độ (màn hình chiếu, trang điều khiển) */
.race { position: relative; padding: 16px 22px 2px 0; min-width: 140px; }
.race .prog { position: relative; }
.race .flag { position: absolute; right: 0; bottom: -4px; font-size: 1.05rem; line-height: 1; }
.race .runner { position: absolute; bottom: 4px; transform: translateX(-60%); font-size: 1.35rem; line-height: 1; transition: left .7s cubic-bezier(.3,.8,.3,1); pointer-events: none; z-index: 1;
  animation: run .56s ease-in-out infinite; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.race .runner i { display: inline-block; font-style: normal; transform: scaleX(-1); } /* quay mặt về phía vạch đích */
.race .runner.done { animation: cheer 1.2s ease-in-out infinite; }
@keyframes run { 0%, 100% { transform: translateX(-60%) translateY(0) rotate(-6deg); } 50% { transform: translateX(-60%) translateY(-5px) rotate(6deg); } }
@keyframes cheer { 0%, 100% { transform: translateX(-60%) scale(1); } 50% { transform: translateX(-60%) scale(1.25) rotate(-8deg); } }
.screen-view .race .runner { font-size: 1.6rem; }

/* Điện thoại: con thú chạy ở đầu thanh đếm giờ */
.timer { overflow: visible; }
.t-runner { position: absolute; top: 50%; left: 100%; transform: translate(-50%, -55%); font-size: 1.5rem; line-height: 1; z-index: 2; pointer-events: none;
  animation: tRun .5s ease-in-out infinite; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.t-runner.hurry { animation-duration: .25s; }
@keyframes tRun { 0%, 100% { transform: translate(-50%, -55%) rotate(-8deg); } 50% { transform: translate(-50%, -85%) rotate(8deg); } }
