/* =========================================================
   MAIN – bố cục & component (dùng token trong theme.css)
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
html { overflow-x: clip; }
body.is-locked { overflow: hidden; }

img, svg, canvas { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0; text-wrap: balance; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 10px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Tuyết rơi (canvas cố định phía sau nội dung) ---------- */
#snow { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
main, .topbar, footer { position: relative; z-index: 1; }

/* ---------- Nút ---------- */
.btn {
  --btn-bg: var(--berry);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px;
  border: 0; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 0 var(--berry-deep), var(--shadow-pop);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-out), filter 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--berry-deep), var(--shadow-pop); }
.btn svg { width: 22px; height: 22px; }
.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--on-night);
  box-shadow: inset 0 0 0 2px rgba(243, 248, 245, 0.35);
}
.btn--ghost:active { box-shadow: inset 0 0 0 2px rgba(243, 248, 245, 0.6); }
.btn--gold { --btn-bg: var(--gold); --btn-fg: var(--ink); box-shadow: 0 6px 0 #d99b12, 0 18px 40px -14px rgba(255, 197, 61, 0.6); }
.btn--soft { --btn-bg: var(--frost); --btn-fg: var(--ink); box-shadow: 0 4px 0 #c7dcd3; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.65; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em;
  background: var(--frost); color: var(--ink);
}
.chip--live { background: #ffe1e2; color: var(--berry-deep); }
.chip--live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--berry); animation: pulse 1.6s infinite; }
.chip--soon { background: #fff1cc; color: #8a5a00; }
.chip--sample { background: transparent; color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px var(--frost); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.75); } }

/* ---------- Thanh trên ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  padding: 10px 16px 8px; padding-top: max(10px, env(safe-area-inset-top));
  transition: background 0.35s var(--ease-out), box-shadow 0.35s;
}
.topbar.is-solid { background: rgba(11, 51, 40, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 30px -20px #000; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-night); text-decoration: none; }
.brand__sep { width: 1.5px; height: 28px; background: rgba(255, 255, 255, 0.18); border-radius: 2px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text b { font-family: var(--font-display); font-size: 1.1rem; }
.brand__text small { font-size: 0.72rem; color: var(--on-night-soft); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.topnav { display: none; gap: 4px; }
.topnav a { color: var(--on-night-soft); text-decoration: none; font-weight: 600; font-size: 0.92rem; padding: 8px 12px; border-radius: 999px; transition: color 0.2s, background 0.2s; }
.topnav a:hover { color: var(--on-night); background: rgba(255, 255, 255, 0.08); }
.topbar .btn { white-space: nowrap; min-height: 42px; padding: 0 18px; font-size: 0.98rem; box-shadow: 0 4px 0 var(--berry-deep); }

/* Dây đèn Noel dưới thanh trên */
.lights { position: absolute; left: 0; right: 0; bottom: -10px; height: 16px; display: flex; justify-content: space-around; pointer-events: none; }
.lights::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; border-bottom: 1.5px solid rgba(169, 203, 191, 0.35); border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.lights i { width: 7px; height: 10px; margin-top: 6px; border-radius: 50% 50% 45% 45%; background: var(--c); box-shadow: 0 0 10px 2px var(--c); animation: twinkle 2.4s ease-in-out infinite; animation-delay: var(--d); }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- Bản nháp ---------- */
.draft-note { position: relative; z-index: 1; margin: 6px 16px 0; padding: 8px 14px; border-radius: 14px; background: rgba(255, 197, 61, 0.12); color: var(--gold); font-size: 0.8rem; font-weight: 600; line-height: 1.45; }

/* ---------- Hero ---------- */
.hero { padding: 28px 18px 36px; color: var(--on-night); display: grid; gap: 34px; max-width: 1180px; margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.hero__title { margin-top: 14px; font-size: clamp(2.5rem, 10.5vw, 4.6rem); font-weight: 800; letter-spacing: -0.015em; }
.hl { position: relative; color: var(--gold); white-space: nowrap; }
.hl svg { position: absolute; left: -2%; bottom: -0.12em; width: 104%; height: 0.36em; overflow: visible; }
.hl path { stroke: var(--berry); stroke-width: 6; fill: none; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 0.9s 0.5s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero__lead { margin-top: 18px; font-size: 1.06rem; color: var(--on-night-soft); max-width: 34em; }
.hero__cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__cta .btn { flex: 1 1 210px; }
.hero__facts { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero__facts li { padding: 12px 10px; border-radius: var(--r-m); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); display: flex; flex-direction: column; gap: 2px; }
.hero__facts b { font-family: var(--font-display); font-size: 1.08rem; color: var(--on-night); line-height: 1.15; }
.hero__facts span { font-size: 0.76rem; color: var(--on-night-soft); line-height: 1.3; }

/* Load sequence cho hero */
.enter { animation: rise 0.8s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* Bảng giải đố (mô phỏng 1 lượt Solo Speedrun) */
.stage { position: relative; justify-self: center; width: min(100%, 440px); }
.stage__card {
  position: relative; padding: 16px 12px 16px; border-radius: var(--r-xl);
  background: linear-gradient(160deg, #16594a, var(--night-2) 60%);
  box-shadow: 0 30px 60px -30px #000, inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.stage__head { padding: 0 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.stage__label { display: flex; flex-direction: column; line-height: 1.2; }
.stage__label small { font-size: 0.72rem; color: var(--on-night-soft); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.stage__label b { font-family: var(--font-display); font-size: 1.05rem; white-space: nowrap; }
.timer {
  font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; font-variant-numeric: tabular-nums;
  padding: 2px 14px; border-radius: 14px; background: #082a21; color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(255, 197, 61, 0.25); min-width: 7.4ch; text-align: center;
}
.timer.is-done { color: #fff; background: var(--p-green); box-shadow: 0 0 0 4px rgba(34, 179, 107, 0.25); transition: background 0.3s, color 0.3s; }
/* Bảng IQ Puzzler 11×5: khay đen, lỗ tròn, mảnh bi nối liền */
.pz { position: relative; padding: 9px 9px 0; }
.pz__grid {
  position: relative; aspect-ratio: 11 / 5; border-radius: 8px;
  background-color: #1b2024;
  background-image: radial-gradient(circle at 50% 50%, #06080a 0 31%, #323a41 34% 39%, transparent 41%);
  background-size: calc(100% / 11) calc(100% / 5);
  box-shadow: 0 0 0 8px #1b2024, 0 0 0 10px #353e45, 0 22px 34px -14px rgba(0, 0, 0, 0.8);
}
.pz--tray .pz__grid { margin-bottom: 27.8%; }           /* chừa khay mảnh ghép (≈3 ô) */
.pz--tray::after {
  content: "Khay mảnh ghép"; position: absolute; left: 9px; right: 9px; bottom: 0; height: 31%;
  border-radius: 14px; border: 1.5px dashed rgba(255, 255, 255, 0.28); background: rgba(0, 0, 0, 0.2);
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5);
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 6px 10px; box-sizing: border-box; z-index: 0;
}
.pz-piece { position: absolute; z-index: 1; opacity: 0; transform-origin: 50% 50%; will-change: transform, opacity; }
.pz-piece svg { width: 100%; height: 100%; overflow: visible; }
.pz.is-static .pz-piece { opacity: 1; }
.pz__grid::after { content: ""; position: absolute; inset: -8px; border-radius: 12px; pointer-events: none; z-index: 6;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%) -150% 0 / 60% 100% no-repeat; }
.pz.is-solved .pz__grid::after { animation: shine 1.1s var(--ease-out); }
@keyframes shine { to { background-position: 250% 0; } }

/* Đề mẫu theo level */
.challenges { display: grid; grid-auto-flow: column; grid-auto-columns: 88%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 18px 16px; margin: 0 -18px; scrollbar-width: none; }
.challenges::-webkit-scrollbar { display: none; }
.ch-card { scroll-snap-align: start; display: grid; gap: 14px; align-content: start; padding: 18px 16px; border-radius: var(--r-l); background: #fff; box-shadow: var(--shadow-card); }
.ch-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ch-card__head h3 { font-size: 1.25rem; }
.ch-card__head small { display: block; font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; font-family: var(--font-body); }
.ch-card .pz { margin: 4px 4px 6px; padding: 8px; }
.pz-need { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 44px; }
.pz-need__lbl { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); width: 100%; }
.pz-chip { display: inline-block; width: calc(var(--w) * 15px); height: calc(var(--h) * 15px); }
.pz-chip svg { width: 100%; height: 100%; overflow: visible; }
.ch-card .btn { min-height: 46px; font-size: 1rem; }
.ch-note { margin-top: 6px; font-size: 0.82rem; color: var(--ink-soft); }

/* Logo Funnyland */
.logo-chip { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 12px; background: #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18); }
.logo-chip img { height: 24px; width: auto; }
.logo-chip--lg img { height: 34px; }
.logo-chip--sm { padding: 4px 8px; border-radius: 9px; }
.logo-chip--sm img { height: 16px; }

.stage__foot { padding: 0 6px; margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.82rem; color: var(--on-night-soft); }
.done-badge {
  position: absolute; top: -16px; right: -6px; padding: 8px 14px; border-radius: 16px;
  background: var(--gold); color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 0.98rem;
  box-shadow: 0 10px 24px -8px rgba(255, 197, 61, 0.7); transform: scale(0) rotate(-12deg); transform-origin: 80% 100%;
  transition: transform 0.45s var(--ease-spring);
}
.done-badge.is-on { transform: scale(1) rotate(-6deg); }
.stage__glow { position: absolute; inset: 12% -6% -8%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 197, 61, 0.28), transparent); filter: blur(10px); }

/* ---------- Đếm ngược ---------- */
.countdown { max-width: 1180px; margin: 0 auto; padding: 4px 18px 36px; color: var(--on-night); }
.countdown__box { border-radius: var(--r-xl); padding: 20px 18px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); display: grid; gap: 14px; }
.countdown__label { font-weight: 600; color: var(--on-night-soft); }
.countdown__label b { color: var(--on-night); }
.ticks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tick { border-radius: var(--r-m); padding: 10px 4px 8px; text-align: center; background: var(--night-2); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2); }
.tick b { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 8vw, 2.6rem); line-height: 1.05; font-variant-numeric: tabular-nums; color: #fff; }
.tick b.bump { animation: bump 0.4s var(--ease-spring); }
@keyframes bump { 0% { transform: translateY(-30%); opacity: 0.2; } 100% { transform: none; opacity: 1; } }
.tick span { font-size: 0.74rem; color: var(--on-night-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Tấm tuyết (section sáng) ---------- */
.sheet {
  position: relative; margin: 0 8px 12px; padding: 54px 18px 56px;
  border-radius: var(--r-xl); background: var(--snow);
}
.sheet::before { /* mép tuyết gợn sóng phía trên */
  content: ""; position: absolute; left: 22px; right: 22px; top: -9px; height: 18px;
  background: radial-gradient(circle at 10px 10px, var(--snow) 9px, transparent 10px) 0 0 / 28px 18px repeat-x;
}
.wrap { max-width: 1100px; margin: 0 auto; }
.sec-head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 40em; }
.sec-head .eyebrow { color: var(--berry); }
.sec-head h2 { font-size: clamp(2rem, 8vw, 3rem); font-weight: 800; color: var(--ink); }
.sec-head p { color: var(--ink-soft); }

/* Hiện dần khi cuộn */
[data-reveal] { transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
[data-reveal].is-pre { opacity: 0; transform: translateY(30px) scale(0.98); }

/* ---------- 3 bước ---------- */
.steps { display: grid; gap: 14px; counter-reset: step; }
.step {
  position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start;
  padding: 18px; border-radius: var(--r-l); background: #fff; box-shadow: var(--shadow-card);
}
.step__num {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; color: #fff; background: var(--sc);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.15);
}
.step h3 { font-size: 1.3rem; font-weight: 700; }
.step p { margin-top: 6px; color: var(--ink-soft); font-size: 0.96rem; }
.step a { color: var(--berry-deep); font-weight: 700; }

/* ---------- Bảng xếp hạng kiểu F1 ---------- */
.lb { border-radius: var(--r-l); background: #fff; box-shadow: var(--shadow-card); overflow: hidden; }
.lb__top { display: grid; gap: 12px; padding: 16px 16px 14px; background: var(--ink); color: var(--on-night); }
.lb__title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lb__title b { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: 0.01em; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--on-night-soft);
  font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: background 0.25s, color 0.25s, transform 0.25s var(--ease-spring);
}
.tab i { width: 10px; height: 10px; border-radius: 50%; background: var(--lc, var(--gold)); }
.tab[aria-selected="true"] { background: #fff; color: var(--ink); }
.tab:active { transform: scale(0.95); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.seg button { border: 0; background: transparent; color: var(--on-night-soft); font-weight: 700; font-size: 0.82rem; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.lb__record { display: flex; align-items: baseline; gap: 10px; font-size: 0.85rem; color: var(--on-night-soft); }
.lb__record b { font-family: var(--font-display); font-size: 1.5rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.lb__list { list-style: none; margin: 0; padding: 6px 0; }
.lb-row {
  position: relative; display: grid; grid-template-columns: 34px 42px 1fr 40px 52px; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--frost);
  animation: rowIn 0.55s var(--ease-out) both; animation-delay: calc(var(--i) * 45ms);
}
.lb-row:last-child { border-bottom: 0; }
.lb-row::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--lc); }
@keyframes rowIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.lb-pos { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; text-align: center; font-variant-numeric: tabular-nums; }
.lb-row[data-pos="1"] .lb-pos, .lb-row[data-pos="2"] .lb-pos, .lb-row[data-pos="3"] .lb-pos {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 1.05rem; color: var(--ink); background: var(--medal);
}
.lb-row[data-pos="1"] { --medal: var(--medal-1); background: linear-gradient(90deg, rgba(255, 197, 61, 0.16), transparent 70%); }
.lb-row[data-pos="2"] { --medal: var(--medal-2); }
.lb-row[data-pos="3"] { --medal: var(--medal-3); }
.lb-ava { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; color: #fff; background: var(--ava); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.15); }
.lb-who { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.lb-who b { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.lb-who small { color: var(--ink-soft); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-time { text-align: right; display: flex; flex-direction: column; line-height: 1.2; }
.lb-time b { font-family: var(--font-display); font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.lb-time small { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.lb-row[data-pos="1"] .lb-time small { color: var(--berry-deep); }
.lb__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px 16px; font-size: 0.8rem; color: var(--ink-soft); border-top: 1px dashed var(--frost); }
.skeleton { height: 62px; margin: 0 16px; border-bottom: 1px solid var(--frost); background: linear-gradient(90deg, transparent, rgba(225, 238, 232, 0.9), transparent) 0 0 / 50% 100% no-repeat; animation: shimmer 1.1s infinite; }
@keyframes shimmer { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.lb__error { padding: 26px 16px; text-align: center; color: var(--ink-soft); }

/* ---------- Kỹ năng (vuốt ngang trên điện thoại) ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 18px 16px; margin: 0 -18px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.skill {
  scroll-snap-align: start; display: grid; gap: 12px; align-content: start;
  padding: 20px; border-radius: var(--r-l); background: #fff; box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-spring);
}
.skill:hover { transform: translateY(-6px) rotate(-0.6deg); }
.skill__art { height: 86px; border-radius: 18px; background: var(--sk); display: grid; place-items: center; overflow: hidden; }
.skill__art svg { width: 70px; height: 70px; transition: transform 0.6s var(--ease-spring); }
.skill:hover .skill__art svg { transform: rotate(90deg) scale(1.08); }
.skill h3 { font-size: 1.28rem; }
.skill p { color: var(--ink-soft); font-size: 0.94rem; }
.skill small { font-weight: 700; color: var(--ink); font-size: 0.8rem; }
.rail-hint { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }
.rail-hint i { width: 7px; height: 7px; border-radius: 50%; background: var(--frost); transition: background 0.3s, width 0.3s; }
.rail-hint i.is-on { width: 20px; border-radius: 4px; background: var(--berry); }

/* ---------- Hộp quà thương hiệu ---------- */
.gifts { display: grid; gap: 14px; }
.gift {
  display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center;
  padding: 18px; border-radius: var(--r-l); background: #fff; box-shadow: var(--shadow-card); cursor: pointer;
  -webkit-tap-highlight-color: transparent; outline-offset: 4px;
}
.gift__box { position: relative; width: 112px; height: 104px; }
.gift__body {
  position: absolute; left: 8px; right: 8px; bottom: 0; height: 66px; border-radius: 10px 10px 14px 14px;
  background:
    linear-gradient(90deg, transparent 42%, var(--ribbon) 42%, var(--ribbon) 58%, transparent 58%),
    var(--box);
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.14);
}
.gift__lid {
  position: absolute; left: 2px; right: 2px; top: 22px; height: 24px; border-radius: 9px;
  background:
    linear-gradient(90deg, transparent 42%, var(--ribbon) 42%, var(--ribbon) 58%, transparent 58%),
    var(--box);
  filter: brightness(1.08); box-shadow: 0 6px 0 rgba(0, 0, 0, 0.12);
  transform-origin: 20% 100%; transition: transform 0.55s var(--ease-spring); z-index: 2;
}
.gift__lid::before, .gift__lid::after { /* nơ */
  content: ""; position: absolute; top: -16px; width: 26px; height: 20px; border: 6px solid var(--ribbon); border-radius: 50% 50% 10% 50%;
}
.gift__lid::before { left: calc(50% - 28px); transform: rotate(-18deg); }
.gift__lid::after { right: calc(50% - 28px); transform: scaleX(-1) rotate(-18deg); }
.gift__pop {
  position: absolute; left: 50%; top: 40px; z-index: 1; translate: -50% 0;
  font-family: var(--font-display); font-weight: 800; font-size: 0.78rem; white-space: nowrap; color: var(--ink);
  padding: 3px 10px; border-radius: 999px; background: var(--gold);
  opacity: 0; transform: translateY(10px) scale(0.6); transition: transform 0.5s var(--ease-spring), opacity 0.3s;
}
.gift:hover .gift__lid, .gift:focus-visible .gift__lid, .gift.is-open .gift__lid { transform: translateY(-20px) rotate(-14deg); }
.gift:hover .gift__pop, .gift:focus-visible .gift__pop, .gift.is-open .gift__pop { opacity: 1; transform: translateY(-34px) scale(1); }
.gift__info { display: grid; gap: 6px; justify-items: start; }
.gift__info h3 { font-size: 1.35rem; }
.gift__info p { color: var(--ink-soft); font-size: 0.93rem; }
.gift__info a { font-weight: 700; color: var(--berry-deep); font-size: 0.9rem; }

/* ---------- Lịch thi ---------- */
.sched { display: grid; gap: 10px; }
.sched-item { display: grid; grid-template-columns: 74px 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: var(--r-l); background: #fff; box-shadow: var(--shadow-card); }
.sched-date { border-radius: 16px; overflow: hidden; text-align: center; background: var(--frost); }
.sched-date small { display: block; padding: 3px 0; background: var(--sc, var(--berry)); color: #fff; font-weight: 700; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }
.sched-date b { display: block; padding: 6px 2px 8px; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.1; }
.sched-info { display: grid; gap: 4px; justify-items: start; }
.sched-info h3 { font-size: 1.12rem; }
.sched-info p { font-size: 0.86rem; color: var(--ink-soft); }

/* ---------- Chung kết (dark section) ---------- */
.final { max-width: 1100px; margin: 0 auto; padding: 50px 18px 56px; color: var(--on-night); }
.final .sec-head h2 { color: var(--on-night); }
.final .sec-head p { color: var(--on-night-soft); }
.final .sec-head .eyebrow { color: var(--gold); }
.bracket { display: grid; gap: 12px; }
.round { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-l); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.dots { display: grid; grid-template-columns: repeat(var(--cols), 12px); gap: 5px; }
.dots i { width: 12px; height: 12px; border-radius: 4px; background: var(--dc); animation: twinkle 3s ease-in-out infinite; animation-delay: calc(var(--k) * 0.15s); }
.trophy { width: 52px; height: 52px; }
.round h3 { font-size: 1.2rem; }
.round p { font-size: 0.9rem; color: var(--on-night-soft); }
.round b.tag { display: inline-block; margin-top: 6px; font-family: var(--font-display); font-size: 0.85rem; color: var(--ink); background: var(--gold); padding: 1px 10px; border-radius: 999px; }

/* ---------- Thể lệ & Hỏi đáp ---------- */
.acc { display: grid; gap: 10px; }
.acc details { border-radius: var(--r-m); background: #fff; box-shadow: var(--shadow-card); overflow: hidden; }
.acc summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; line-height: 1.25;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary .plus { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--frost); position: relative; transition: transform 0.4s var(--ease-spring), background 0.3s; }
.acc summary .plus::before, .acc summary .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2.5px; border-radius: 2px; background: var(--ink); translate: -50% -50%; }
.acc summary .plus::after { rotate: 90deg; }
.acc details[open] .plus { transform: rotate(45deg); background: var(--gold); }
.acc .acc__body { padding: 0 18px 18px; color: var(--ink-soft); font-size: 0.96rem; display: grid; gap: 8px; }
.acc details[open] .acc__body { animation: rise 0.45s var(--ease-out); }
.acc ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.pending { color: var(--berry-deep); font-weight: 700; }
.two-col { display: grid; gap: 40px; }

/* ---------- CTA cuối ---------- */
.cta-end { max-width: 760px; margin: 0 auto; padding: 56px 18px 64px; text-align: center; color: var(--on-night); display: grid; gap: 18px; justify-items: center; }
.cta-end h2 { font-size: clamp(2.1rem, 9vw, 3.4rem); font-weight: 800; }
.cta-end p { color: var(--on-night-soft); max-width: 30em; }
.cta-end .btn { min-width: 260px; }

footer .logo-chip { margin: 0 auto 12px; }
footer { padding: 26px 18px calc(110px + env(safe-area-inset-bottom)); text-align: center; font-size: 0.82rem; color: var(--on-night-soft); border-top: 1px solid rgba(255, 255, 255, 0.08); }
footer a { color: var(--on-night); font-weight: 600; }

/* ---------- Thanh đăng ký dính đáy (mobile) ---------- */
.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 25;
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 999px;
  background: rgba(18, 36, 30, 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--on-night); box-shadow: 0 18px 40px -16px #000;
  transform: translateY(140%); transition: transform 0.5s var(--ease-spring);
}
.sticky-cta.is-on { transform: none; }
.sticky-cta p { flex: 1; font-size: 0.85rem; line-height: 1.3; color: var(--on-night-soft); }
.sticky-cta p b { color: var(--on-night); display: block; font-family: var(--font-display); font-size: 1rem; }
.sticky-cta .btn { min-height: 46px; padding: 0 20px; font-size: 1rem; box-shadow: 0 4px 0 var(--berry-deep); }

/* ---------- Bottom sheet đăng ký ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(5, 20, 16, 0.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity 0.35s; }
.overlay.is-on { opacity: 1; pointer-events: auto; }
.sheet-modal {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 18px calc(24px + env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background: var(--snow);
  transform: translateY(105%); visibility: hidden;
  transition: transform 0.5s var(--ease-out), visibility 0s linear 0.5s;
}
.sheet-modal.is-on { transform: none; visibility: visible; transition-delay: 0s; }
.sheet-modal__grab { width: 46px; height: 5px; border-radius: 5px; background: #c7dcd3; margin: 0 auto 10px; }
.sheet-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sheet-modal__head h2 { font-size: 1.5rem; }
.icon-btn { width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--frost); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 20px; }
.progress i { height: 6px; border-radius: 6px; background: var(--frost); overflow: hidden; position: relative; }
.progress i::after { content: ""; position: absolute; inset: 0; background: var(--berry); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease-out); }
.progress i.is-on::after { transform: none; }
.view { display: grid; gap: 14px; animation: rise 0.45s var(--ease-out); }
.view[hidden] { display: none; }
.q { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.choice { display: grid; gap: 10px; }
.choice-btn {
  display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; text-align: left;
  padding: 14px; border: 0; border-radius: var(--r-m); background: #fff; box-shadow: var(--shadow-card); cursor: pointer;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}
.choice-btn:hover { transform: translateY(-2px); }
.choice-btn:active { transform: scale(0.98); }
.choice-btn .ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--ic); color: #fff; }
.choice-btn .ico svg { width: 26px; height: 26px; }
.choice-btn b { display: block; font-family: var(--font-display); font-size: 1.12rem; }
.choice-btn small { color: var(--ink-soft); font-size: 0.86rem; }
.callout { padding: 14px 16px; border-radius: var(--r-m); background: #fff4d6; color: #6b4700; font-size: 0.92rem; display: grid; gap: 10px; }
.callout--err { background: #ffe5e6; color: var(--berry-deep); }

.field { display: grid; gap: 6px; }
.field label, .field .lbl { font-weight: 700; font-size: 0.92rem; }
.field label span, .field .lbl span { font-weight: 500; color: var(--ink-soft); }
.input {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 16px; border: 2px solid var(--frost); background: #fff;
  font-size: 1.05rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { outline: none; border-color: var(--p-blue); box-shadow: 0 0 0 4px rgba(59, 143, 228, 0.15); }
.field.has-err .input { border-color: var(--berry); }
.field .err { font-size: 0.82rem; color: var(--berry-deep); font-weight: 600; min-height: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 .btn { padding: 0 12px; font-size: 1rem; white-space: nowrap; }
.ages { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.age { min-height: 44px; border: 2px solid var(--frost); border-radius: 14px; background: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; cursor: pointer; transition: transform 0.25s var(--ease-spring), background 0.2s, border-color 0.2s; }
.age[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); transform: scale(1.06); }
.level-hint { font-size: 0.84rem; color: var(--ink-soft); }
.level-hint b { color: var(--ink); }
.photo { display: flex; align-items: center; gap: 12px; }
.photo__prev { width: 58px; height: 58px; border-radius: 18px; background: var(--frost) center / cover no-repeat; display: grid; place-items: center; color: var(--ink-soft); flex: 0 0 auto; }
.photo__prev svg { width: 26px; height: 26px; }
.photo label.btn { min-height: 44px; font-size: 0.95rem; padding: 0 16px; }
.checks { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-m); background: #fff; }
.check { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: 0.9rem; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 26px; height: 26px; margin: 0; border-radius: 9px; border: 2px solid #b9cfc6; background: #fff; display: grid; place-items: center; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.check input::after { content: ""; width: 10px; height: 6px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; rotate: -45deg; translate: 0 -2px; transform: scale(0); transition: transform 0.25s var(--ease-spring); }
.check input:checked { background: var(--p-green); border-color: var(--p-green); }
.check input:checked::after { transform: scale(1); }
.check em { font-style: normal; color: var(--berry-deep); font-weight: 700; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Vé thi */
.ticket { position: relative; border-radius: 26px; background: #fff; box-shadow: var(--shadow-card); overflow: hidden; animation: ticketIn 0.7s var(--ease-spring); }
@keyframes ticketIn { from { opacity: 0; transform: translateY(40px) rotate(-3deg) scale(0.92); } to { opacity: 1; transform: none; } }
.ticket__top { padding: 18px 18px 22px; background: var(--berry); color: #fff; display: grid; gap: 4px; position: relative; overflow: hidden; }
.ticket__top::after { content: ""; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 70%); }
.ticket__top .logo-chip { position: absolute; right: 14px; top: 14px; z-index: 1; }
.ticket__top small { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.72rem; opacity: 0.85; }
.ticket__top b { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.1; }
.ticket__cut { height: 0; border-top: 2px dashed var(--frost); margin: 0 18px; position: relative; }
.ticket__cut::before, .ticket__cut::after { content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--snow); }
.ticket__cut::before { left: -30px; }
.ticket__cut::after { right: -30px; }
.ticket__body { padding: 18px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.ticket__meta { display: grid; gap: 8px; }
.ticket__meta div small { display: block; font-size: 0.72rem; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.ticket__meta div b { font-family: var(--font-display); font-size: 1.12rem; }
.ticket__qr { width: 132px; height: 132px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--frost); overflow: hidden; }
.ticket__qr svg, .kid__qr svg { width: 100%; height: 100%; display: block; }
.ticket__note { padding: 0 18px 18px; font-size: 0.82rem; color: var(--ink-soft); }
.confetti { position: fixed; inset: 0; z-index: 60; pointer-events: none; }

.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 70; translate: -50% 0; padding: 12px 18px; border-radius: 16px; background: var(--ink); color: #fff; font-weight: 600; font-size: 0.92rem; box-shadow: 0 14px 30px -12px #000; opacity: 0; transform: translateY(20px); transition: opacity 0.3s, transform 0.4s var(--ease-spring); pointer-events: none; max-width: calc(100vw - 32px); }
.toast.is-on { opacity: 1; transform: none; }

/* =================== Tablet & desktop =================== */
@media (max-width: 419px) { .brand__sep, .brand__text { display: none; } }
@media (min-width: 640px) {
  .challenges { grid-auto-columns: 62%; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { grid-template-columns: 1fr; }
  .rail { grid-auto-columns: 46%; }
  .gifts { grid-template-columns: repeat(3, 1fr); }
  .gift { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 26px 20px; }
  .gift__info { justify-items: center; }
  .sched { grid-template-columns: repeat(2, 1fr); }
  .lb__top { grid-template-columns: 1fr auto; align-items: center; }
  .lb__title, .lb__record { grid-column: 1 / -1; }
  .sheet-modal { left: 50%; right: auto; bottom: 50%; width: min(520px, 94vw); max-height: 90vh; border-radius: 30px; translate: -50% 50%; transform: translateY(30px) scale(0.96); opacity: 0; transition: transform 0.45s var(--ease-spring), opacity 0.3s, visibility 0s linear 0.45s; }
  .sheet-modal.is-on { transition-delay: 0s; }
  .sheet-modal.is-on { transform: none; opacity: 1; }
  .sheet-modal__grab { display: none; }
}
@media (min-width: 960px) {
  .topnav { display: flex; }
  .hero { grid-template-columns: 1.1fr 0.9fr; align-items: center; padding: 56px 32px 56px; }
  .countdown { padding-inline: 32px; }
  .countdown__box { grid-template-columns: 1fr 1.3fr; align-items: center; padding: 22px 28px; }
  .sheet { margin: 0 16px 16px; padding: 80px 40px; }
  .rail { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 4px 0 0; }
  .challenges { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 4px 0 0; }
  .stage { width: min(100%, 500px); }
  .logo-chip img { height: 28px; }
  .rail-hint { display: none; }
  .bracket { grid-template-columns: repeat(3, 1fr); }
  .round { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 48px; }
  .sticky-cta { display: none; }
  .lb-row, .lb__cols { grid-template-columns: 44px 46px 1fr 70px 80px; padding-left: 22px; padding-right: 22px; }
  .lb__top { padding: 20px 22px; }
}

/* =================== Smart Challenge – bổ sung theo Proposal =================== */
.topbar__act { display: flex; gap: 8px; align-items: center; }
.btn--sm { min-height: 42px; padding: 0 16px; font-size: 0.95rem; }
.topbar .btn--ghost { box-shadow: inset 0 0 0 2px rgba(243, 248, 245, 0.3); }
@media (max-width: 419px) { .topbar__act .btn { padding: 0 12px; } }



/* BXH theo điểm */
.lb__cols { display: grid; grid-template-columns: 34px 42px 1fr 40px 52px; gap: 10px; padding: 8px 16px 0; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.lb__cols span:nth-child(4), .lb__cols span:nth-child(5) { text-align: right; }
.lb-w { text-align: right; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.lb-cut { list-style: none; position: relative; margin: 4px 16px; height: 22px; display: flex; align-items: center; }
.lb-cut::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--berry); }
.lb-cut span { position: relative; margin: 0 auto; padding: 2px 12px; border-radius: 999px; background: var(--berry); color: #fff; font-size: 0.75rem; font-weight: 700; }

/* Hồ sơ bé */
.kids { display: grid; gap: 14px; }
.kid { padding: 18px; border-radius: var(--r-l); background: #fff; box-shadow: var(--shadow-card), inset 0 5px 0 var(--dc, var(--berry)); display: grid; gap: 14px; text-align: left; }
.kid__head { display: flex; align-items: center; gap: 12px; }
.kid__head h3 { font-size: 1.6rem; margin-bottom: 4px; }
.kid__head .lb-ava { width: 56px; height: 56px; font-size: 1.5rem; }
.kid__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.kid__stats div { padding: 10px 6px; border-radius: 14px; background: var(--snow); text-align: center; }
.kid__stats b { display: block; font-family: var(--font-display); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.kid__stats span { font-size: 0.72rem; color: var(--ink-soft); font-weight: 600; }
.kid__final { padding: 10px 14px; border-radius: 14px; background: #fff4d6; color: #7a5200; font-weight: 700; font-size: 0.92rem; }
.kid__ticket { display: grid; grid-template-columns: 116px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 18px; background: var(--snow); }
.kid__qr { width: 116px; height: 116px; border-radius: 12px; background: #fff; overflow: hidden; }
.kid__ticket small { display: block; font-size: 0.72rem; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.kid__ticket b { font-family: var(--font-display); font-size: 1.35rem; }
.kid__ticket p { font-size: 0.85rem; color: var(--ink-soft); }
.kid__hist h4 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.05rem; }
.kid__hist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.kid__hist li { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--snow); font-size: 0.88rem; }
.kid__hist li span:first-child { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.kid__hist li b { font-family: var(--font-display); color: var(--berry-deep); }
.kid__hist li b.is-zero { color: var(--ink-soft); }
.kid--add { border: 2px dashed #c7dcd3; background: transparent; box-shadow: none; cursor: pointer; display: grid; place-items: center; align-content: center; gap: 4px; min-height: 140px; font: inherit; color: var(--ink-soft); }
.kid--add b { font-family: var(--font-display); font-size: 2.6rem; color: var(--berry); line-height: 1; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--berry-deep); font-weight: 700; text-decoration: underline; cursor: pointer; font: inherit; }

/* Form đăng ký: PIN & hạng */
.field .hint { font-size: 0.82rem; color: var(--ink-soft); }
.field .hint a { color: var(--berry-deep); font-weight: 700; }
.divchips { display: grid; gap: 8px; margin-top: 6px; }
.divchip { display: grid; gap: 2px; text-align: left; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--frost); background: #fff; cursor: pointer; font: inherit; transition: border-color 0.2s, background 0.2s; }
.divchip b { font-family: var(--font-display); font-size: 1.1rem; }
.divchip small { color: var(--ink-soft); font-size: 0.8rem; }
.divchip[aria-pressed="true"] { border-color: var(--dc); background: color-mix(in srgb, var(--dc) 10%, #fff); }

@media (min-width: 640px) {
  .kids { grid-template-columns: repeat(2, 1fr); }
}

/* =================== Bố cục nhiều trang (19/11) =================== */
.topbar__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topnav a[aria-current="page"] { color: var(--on-night); background: rgba(255, 255, 255, 0.1); }
.topbar__act .btn[aria-current="page"] { box-shadow: inset 0 0 0 2px var(--gold); color: var(--gold); }
.subnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 8px -16px 0; padding: 0 16px 4px; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--on-night-soft); font-weight: 700; font-size: 0.86rem; text-decoration: none; white-space: nowrap; }
.subnav a[aria-current="page"] { background: #fff; color: var(--ink); }
.lights { bottom: -12px; }
.draft-note a { color: inherit; font-weight: 700; }

/* Hero: đếm ngược gọn ngay dưới nút */
.hero__cd { margin-top: 26px; display: grid; gap: 8px; max-width: 420px; }
.hero__cd .countdown__label { font-size: 0.9rem; }
.hero__cd .tick { padding: 8px 4px 6px; }
.hero__cd .tick b { font-size: clamp(1.5rem, 6vw, 2rem); }
.steps { list-style: none; margin: 0; padding: 0; }

/* Trang con */
.page-hero { max-width: 1100px; margin: 0 auto; padding: 30px 18px 40px; color: var(--on-night); }
.page-hero__title { margin-top: 12px; font-size: clamp(2.4rem, 9vw, 4rem); font-weight: 800; }
.page-hero__lead { margin-top: 14px; color: var(--on-night-soft); max-width: 36em; font-size: 1.05rem; }
.wrap--narrow { max-width: 760px; }
.acc--rules .acc__body ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* Luật chơi gọn */
.pts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-l); background: #fff; box-shadow: var(--shadow-card); }
.pt b { font-family: var(--font-display); font-weight: 800; font-size: 2.3rem; line-height: 1; color: var(--pc); min-width: 1.6em; }
.pt span { font-weight: 700; font-size: 0.92rem; line-height: 1.3; }
.pts-note { margin-top: 12px; color: var(--ink-soft); font-size: 0.92rem; }
.rules-grid { display: grid; gap: 26px; margin-top: 32px; }
.sub-h { font-size: 1.35rem; margin-bottom: 12px; }
.sub-note { margin-top: 10px; color: var(--ink-soft); font-size: 0.88rem; }
.divs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dv { display: grid; gap: 2px; padding: 14px 12px; border-radius: var(--r-m); background: #fff; box-shadow: var(--shadow-card), inset 0 4px 0 var(--dc); }
.dv b { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1.1; color: var(--dc); }
.dv span { font-weight: 700; font-size: 0.86rem; }
.dv em { font-style: normal; font-size: 0.78rem; color: var(--ink-soft); }
.modes-web { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mw { display: grid; gap: 4px; padding: 14px; border-radius: var(--r-m); background: #fff; box-shadow: var(--shadow-card); border-left: 5px solid var(--mc); }
.mw b { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.15; }
.mw span { font-size: 0.82rem; color: var(--ink-soft); }
.mw em { justify-self: start; font-style: normal; font-size: 0.72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--frost); color: var(--ink-soft); margin-top: 2px; }
.mw em.is-on { background: #ffe1e2; color: var(--berry-deep); }
.more-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; font-weight: 700; color: var(--berry-deep); text-decoration: none; }
.more-link::after { content: "→"; transition: transform 0.25s var(--ease-spring); }
.more-link:hover::after { transform: translateX(4px); }
.more-link--light { color: var(--gold); margin-top: 4px; }

/* BXH: link chân bảng */
.lb__foot a { font-weight: 700; color: var(--berry-deep); }

/* Lịch thi: chung kết nổi bật */

/* Hỏi đáp + kết */
.faq-wrap { display: grid; gap: 28px; }
.end-card { align-self: start; display: grid; gap: 14px; justify-items: start; padding: 28px 24px; border-radius: var(--r-xl); background: var(--night); color: var(--on-night); }
.end-card h2 { font-size: clamp(1.9rem, 7vw, 2.6rem); font-weight: 800; }
.end-card p { color: var(--on-night-soft); }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 4px 0 14px; }
.foot-nav a { color: var(--on-night); font-weight: 600; text-decoration: none; }

/* Hồ sơ */
.login-card { max-width: 440px; margin: 0 auto; display: grid; gap: 14px; padding: 24px 20px; border-radius: var(--r-xl); background: #fff; box-shadow: var(--shadow-card); }
.login-card h2 { font-size: 1.8rem; }
.login-card__alt { text-align: center; color: var(--ink-soft); font-size: 0.92rem; }
.login-card__alt a { color: var(--berry-deep); font-weight: 700; }
.prof-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--r-m); background: #fff; box-shadow: var(--shadow-card); font-size: 0.92rem; }
a.kid--add { text-decoration: none; }

@media (min-width: 640px) {
  .pts { grid-template-columns: repeat(4, 1fr); }
  .pt { flex-direction: column; align-items: flex-start; gap: 6px; }
  .modes-web { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .subnav { display: none; }
  .rules-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .faq-wrap { grid-template-columns: 1.4fr 1fr; gap: 40px; }
  .page-hero { padding: 56px 32px 56px; }
  .hero__cd { margin-top: 30px; }
}

.callout[hidden] { display: none; }
/* Lịch thi dạng danh sách gọn */
.sched-list { border-radius: var(--r-l); background: #fff; box-shadow: var(--shadow-card); overflow: hidden; }
.srow { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--frost); }
.srow:last-child { border-bottom: 0; }
.srow__d { text-align: center; line-height: 1.1; }
.srow__d b { display: block; font-family: var(--font-display); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.srow__d small { font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; }
.srow__i { min-width: 0; display: grid; }
.srow__i b { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.2; }
.srow__i small { color: var(--ink-soft); font-size: 0.82rem; }
.srow__s { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #dff5e9; color: #137a46; white-space: nowrap; }
.srow__s.is-wait { background: #fff1cc; color: #8a5a00; }
.srow--store { background: color-mix(in srgb, var(--berry) 5%, #fff); }
.srow--final { background: var(--night); color: var(--on-night); }
.srow--final .srow__d small, .srow--final .srow__i small { color: var(--on-night-soft); }
.srow--final .srow__s { background: var(--gold); color: var(--ink); }
.pt { flex-direction: column; align-items: flex-start; gap: 4px; }
