/* =========================================================
   Debug Cuộc Đời – Trang tải game
   Thuần CSS. Tông điện ảnh tối + vàng hoàng hôn (khớp với game).
   ========================================================= */

:root {
  --bg: #0d0b09;
  --bg-2: #15120f;
  --bg-3: #1d1915;
  --ink: #f5eee2;
  --muted: #bcb2a3;
  --faint: #847b6f;
  --line: rgba(255, 240, 220, 0.1);
  --line-2: rgba(255, 240, 220, 0.2);
  --gold: #f0bd6a;
  --gold-2: #e39a4b;
  --ember: #d9744a;
  --ok: #7fd49a;
  --err: #ff8a7a;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 68px;
  --bar-h: 36px;
  --rose: #e8607a;
  --rose-2: #b8344f;
  --petal: #ffb3c1;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--bar-h) + 12px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;   /* chống trượt ngang trên mọi trình duyệt */
}
@supports (overflow: clip) { body { overflow-x: clip; } }

/* Khóa cuộn khi mở modal/menu: dùng position:fixed để hoạt động cả trên iOS Safari */
body.is-locked {
  position: fixed;
  left: 0;
  right: 0;
  overflow: hidden;
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
code, pre { font-family: ui-monospace, "JetBrains Mono", Consolas, monospace; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(240, 189, 106, 0.35); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 820px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--gold); color: #1a1208; padding: 10px 16px; border-radius: 10px; font-weight: 700;
}
.skip:focus { top: 12px; }

.text-gradient {
  background: linear-gradient(100deg, #ffe2a8 0%, var(--gold) 35%, var(--ember) 70%, #ffd394 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

/* ───────── Hiệu ứng nền ───────── */
#dust {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1; opacity: 0.8;
}
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px;
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(240, 189, 106, 0.09), transparent 65%);
  transform: translate3d(-999px, -999px, 0);
  transition: opacity 0.3s;
}
@media (hover: none) { .cursor-glow { display: none; } }

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 120;
  background: linear-gradient(90deg, var(--gold), var(--ember));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ───────── Nút ───────── */
.btn {
  --h: 48px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 22px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 15px; letter-spacing: 0.01em; cursor: pointer; white-space: nowrap;
  text-decoration: none !important; isolation: isolate; overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn--lg { --h: 56px; padding: 0 28px; font-size: 16px; }
.btn--sm { --h: 40px; padding: 0 16px; font-size: 14px; }
.btn:active { transform: scale(0.97); }

.btn--shine {
  color: #1d1307;
  background: linear-gradient(135deg, #ffdca0, var(--gold) 45%, var(--gold-2));
  box-shadow: 0 10px 30px -8px rgba(240, 160, 80, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn--shine::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.65) 50%, transparent 70%);
  transform: translateX(-120%); animation: sweep 3.6s var(--ease) infinite;
}
@keyframes sweep { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.btn--shine:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(240, 160, 80, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.6); }

.btn--ghost {
  color: var(--ink); background: rgba(255, 245, 230, 0.06);
  box-shadow: inset 0 0 0 1px var(--line-2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: rgba(255, 245, 230, 0.12); transform: translateY(-2px); }

.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; filter: grayscale(0.6); }

/* ───────── Header ───────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding-top: env(safe-area-inset-top);
  transition: background 0.3s, box-shadow 0.3s, -webkit-backdrop-filter 0.3s, backdrop-filter 0.3s;
}
.nav.is-scrolled {
  background: rgba(13, 11, 9, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
}
.nav__inner { height: var(--nav-h); display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 17px; text-decoration: none !important; }
.brand img { border-radius: 9px; box-shadow: 0 0 0 1px var(--line-2); }
.brand b { color: var(--gold); font-weight: 800; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  color: var(--muted); font-size: 14.5px; font-weight: 500; padding: 8px 12px; border-radius: 999px;
  text-decoration: none; transition: color 0.2s, background 0.2s;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); background: rgba(255, 245, 230, 0.07); }
.nav__cta { margin-left: 8px; }

.burger {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 0; cursor: pointer;
  background: rgba(255, 245, 230, 0.07); position: relative; flex: none;
}
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.burger span:nth-child(1) { top: 15px; } .burger span:nth-child(2) { top: 21px; } .burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ───────── Hero ───────── */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; padding: calc(var(--nav-h) + var(--bar-h) + 40px) 0 90px; overflow: hidden; z-index: 2;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__img { position: absolute; inset: -6% 0 auto; width: 100%; height: 112%; object-fit: cover; object-position: 60% 35%; filter: saturate(1.05); will-change: transform; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 11, 9, 0.94) 0%, rgba(13, 11, 9, 0.78) 38%, rgba(13, 11, 9, 0.35) 70%, rgba(13, 11, 9, 0.6) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%),
    radial-gradient(60% 60% at 70% 30%, rgba(255, 190, 110, 0.18), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, rgba(232, 96, 122, 0.22), transparent 70%);
}

/* Mặt đường 3D chạy về phía người xem */
.road { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; perspective: 340px; overflow: hidden; opacity: 0.55; pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 95%); mask-image: linear-gradient(to top, #000 10%, transparent 95%); }
.road__plane {
  position: absolute; left: -50%; right: -50%; bottom: -10%; height: 240%;
  transform: rotateX(72deg); transform-origin: 50% 100%;
  background-image:
    linear-gradient(90deg, transparent 49.6%, rgba(255, 210, 140, 0.7) 49.6%, rgba(255, 210, 140, 0.7) 50.4%, transparent 50.4%),
    linear-gradient(rgba(240, 189, 106, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 189, 106, 0.16) 1px, transparent 1px);
  background-size: 100% 90px, 60px 60px, 60px 60px;
  animation: drive 1.6s linear infinite;
}
@keyframes drive { to { background-position: 0 90px, 0 60px, 0 0; } }

.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero__copy { max-width: 620px; min-width: 0; }

.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  background: rgba(255, 245, 230, 0.07); box-shadow: inset 0 0 0 1px var(--line-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(127, 212, 154, 0.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(127, 212, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 212, 154, 0); } }

.hero__title { margin-top: 22px; font-size: clamp(48px, 9vw, 112px); font-weight: 800; line-height: 0.95; letter-spacing: -0.04em; }
.hero__title span { display: block; }
.hero__kicker { color: var(--ink); text-shadow: 0 6px 40px rgba(0, 0, 0, 0.5); }
.hero__script { font-family: "Dancing Script", cursive; color: var(--gold); font-size: clamp(28px, 4vw, 42px); margin-top: 8px; line-height: 1.2; }
.hero__lead { margin-top: 18px; color: var(--muted); font-size: clamp(16px, 1.6vw, 18px); max-width: 540px; }
.hero__lead b { color: var(--ink); }
.hero__lead em { color: var(--gold); font-style: normal; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero__os { margin-top: 14px; font-size: 13.5px; color: var(--faint); }

.stats { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 34px 0 0; }
.stats div { min-width: 90px; }
.stats dt { font-size: 34px; font-weight: 800; color: var(--ink); line-height: 1; }
.stats dd { margin: 6px 0 0; font-size: 13px; color: var(--faint); }

/* Hộp game 3D */
.box-stage { position: relative; height: 520px; perspective: 1400px; display: grid; place-items: center; }
.box3d {
  --w: 300px; --h: 420px; --d: 46px;
  position: relative; width: var(--w); height: var(--h);
  transform-style: preserve-3d;
  transform: rotateY(-24deg) rotateX(8deg);
  animation: float 6s ease-in-out infinite;
  transition: transform 0.6s var(--ease);
}
@keyframes float { 50% { translate: 0 -16px; } }
.box3d__face { position: absolute; border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.box3d__front {
  inset: 0; overflow: hidden; transform: translateZ(calc(var(--d) / 2));
  background: #222; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.box3d__front > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.box3d__front::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(10, 8, 6, 0.92) 100%);
}
.box3d__label { position: absolute; left: 18px; right: 18px; bottom: 18px; z-index: 2; display: flex; align-items: center; gap: 12px; text-align: left; }
.box3d__label > div { min-width: 0; }
.box3d__label img { border-radius: 8px; }
.box3d__label b { display: block; font-size: 19px; line-height: 1.1; }
.box3d__label small { color: var(--gold); font-family: "Dancing Script", cursive; font-size: 18px; }
.box3d__glare {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: overlay;
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, 0.55), transparent 50%);
}
.box3d__back { inset: 0; transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); background: #1a1511; }
.box3d__side {
  top: 0; width: var(--d); height: var(--h);
  left: calc(50% - var(--d) / 2);
  transform: rotateY(-90deg) translateZ(calc(var(--w) / 2));
  background: linear-gradient(180deg, #3a2a18, #1b140d);
  display: grid; place-items: center; border-radius: 4px;
}
.box3d__side span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; letter-spacing: 0.3em; color: var(--gold); font-weight: 700; }
.box3d__top {
  left: 0; width: var(--w); height: var(--d); top: calc(50% - var(--d) / 2);
  transform: rotateX(90deg) translateZ(calc(var(--h) / 2));
  background: linear-gradient(90deg, #4a3520, #241a10); border-radius: 4px;
}
.box-shadow {
  position: absolute; bottom: 30px; width: 260px; height: 40px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.75), transparent);
  animation: shadow 6s ease-in-out infinite;
}
@keyframes shadow { 50% { transform: scale(0.85); opacity: 0.6; } }

.orbit {
  position: absolute; display: grid; place-items: center; border-radius: 16px;
  font-weight: 800; color: var(--gold);
  background: rgba(30, 24, 18, 0.7); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: bob 7s ease-in-out infinite;
}
.orbit--1 { width: 84px; height: 54px; top: 14%; right: 2%; font-size: 18px; }
.orbit--2 { width: 58px; height: 58px; bottom: 22%; left: 4%; font-family: ui-monospace, monospace; animation-delay: -2s; }
.orbit--3 { width: 44px; height: 44px; bottom: 8%; right: 14%; animation-delay: -4s; }
@keyframes bob { 50% { transform: translateY(-14px) rotate(4deg); } }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; translate: -50% 0; width: 26px; height: 42px; border-radius: 14px; box-shadow: inset 0 0 0 2px var(--line-2); }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ───────── Marquee ───────── */
.marquee { position: relative; z-index: 2; overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-2); padding: 16px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; gap: 28px; width: max-content; animation: marquee 40s linear infinite; }
.marquee span { font-weight: 700; font-size: 18px; color: var(--muted); white-space: nowrap; }
.marquee i { color: var(--gold); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ───────── Section chung ───────── */
.section { position: relative; z-index: 2; padding: clamp(72px, 10vw, 130px) 0; }
.section--alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 20%, var(--bg-2) 80%, var(--bg) 100%); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto clamp(36px, 5vw, 60px); }
.section__head h2 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 800; text-wrap: balance; }
.section__head p { margin-top: 14px; color: var(--muted); font-size: 17px; }
.eyebrow { display: inline-block; margin-bottom: 14px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold); }

/* Hiện dần khi cuộn */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ───────── Card (spotlight + tilt) ───────── */
.card {
  position: relative; padding: 28px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 245, 230, 0.05), rgba(255, 245, 230, 0.015));
  box-shadow: inset 0 0 0 1px var(--line);
  transform-style: preserve-3d;
}
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }
.card__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; font-size: 24px; margin-bottom: 18px;
  background: rgba(240, 189, 106, 0.1); box-shadow: inset 0 0 0 1px rgba(240, 189, 106, 0.25); }
.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(240, 189, 106, 0.14), transparent 45%);
}
.spot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity 0.3s;
  padding: 1px; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(240, 189, 106, 0.8), transparent 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.spot:hover::before, .spot:hover::after { opacity: 1; }
.tilt { transition: transform 0.5s var(--ease); will-change: transform; }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.bento__a { grid-column: span 4; grid-row: span 2; display: flex; flex-direction: column; }
.bento__b, .bento__c { grid-column: span 2; }
.bento__d, .bento__e { grid-column: span 3; }
.bento__a::marker { content: none; }
.bento__a .card__bg { position: absolute; inset: 0 0 0 40%; z-index: -1; pointer-events: none;
  background: url("../assets/img/shot2.jpg") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); opacity: 0.35; }
.bento__a { isolation: isolate; min-height: 340px; }
.bento__a h3 { font-size: clamp(22px, 2.6vw, 30px); }
.bento__a p { font-size: 16px; max-width: 460px; }
.typing { margin-top: auto; padding-top: 26px; }
.typing code {
  display: inline-block; max-width: 100%; overflow: hidden; white-space: nowrap; vertical-align: bottom;
  padding: 14px 18px; border-radius: 12px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--gold); font-size: clamp(12px, 1.5vw, 15px);
  border-right: 2px solid var(--gold);
  animation: type 4.5s steps(34) infinite alternate, caret 0.8s step-end infinite;
}
@keyframes type { 0% { width: 2ch; } 70%, 100% { width: 38ch; } }
@keyframes caret { 50% { border-right-color: transparent; } }

/* ───────── Thẻ lật nhân vật ───────── */
.chars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; max-width: 900px; margin: 0 auto; }
.flip { all: unset; display: block; cursor: pointer; perspective: 1600px; aspect-ratio: 4 / 5; -webkit-tap-highlight-color: transparent; border-radius: var(--radius); }
.flip:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.flip__inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.9s var(--ease); }
@media (hover: hover) { .flip:hover .flip__inner { transform: rotateY(180deg); } }
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }
.flip__face { position: absolute; inset: 0; border-radius: var(--radius); overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); }
.flip__front img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 40%; }
.flip__front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(10, 8, 6, 0.95)); }
.flip__front--mono { background: radial-gradient(circle at 50% 35%, #4a2f3a, #1a1214 70%); }
.mono { position: absolute; inset: 0 0 25%; display: grid; place-items: center; font-size: clamp(120px, 20vw, 220px); font-weight: 800; color: rgba(255, 220, 230, 0.12); font-family: "Dancing Script", cursive; }
.flip__info { position: absolute; left: 24px; right: 24px; bottom: 24px; z-index: 2; }
.flip__info h3 { font-size: clamp(32px, 4vw, 44px); margin-top: 10px; }
.flip__info h3 small { font-size: 16px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.flip__info p { color: var(--muted); }
.flip__hint { position: absolute; top: 18px; right: 18px; z-index: 2; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); color: var(--ink); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.flip__back {
  transform: rotateY(180deg); padding: clamp(22px, 3vw, 34px); display: flex; flex-direction: column; gap: 14px;
  background: radial-gradient(120% 80% at 100% 0%, rgba(240, 189, 106, 0.16), transparent 60%), var(--bg-3);
  overflow: auto;
}
.flip__back h3 { font-size: clamp(22px, 2.6vw, 28px); color: var(--gold); }
.flip__back p { color: var(--muted); font-size: 15px; }
.flip__back ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14.5px; }
.flip__back li { padding: 10px 12px; border-radius: 10px; background: rgba(255, 245, 230, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.flip__back li b { display: inline-block; min-width: 64px; color: var(--ink); }
.flip__back .tag { margin-top: auto; align-self: flex-start; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgba(255, 245, 230, 0.1); color: var(--ink); }
.tag--gold { background: rgba(240, 189, 106, 0.16); color: var(--gold); }

/* ───────── Timeline ───────── */
.timeline { list-style: none; padding: 0; margin: 0 auto; max-width: 860px; position: relative; display: grid; gap: 14px; }
.timeline::before { content: ""; position: absolute; left: 31px; top: 20px; bottom: 20px; width: 2px; background: linear-gradient(var(--gold), var(--ember) 60%, transparent); opacity: 0.5; }
.timeline li { position: relative; display: flex; gap: 22px; align-items: flex-start; padding: 18px 22px 18px 0; border-radius: var(--radius-sm); transition: background 0.3s; }
.timeline li:hover { background: rgba(255, 245, 230, 0.03); }
.timeline__n { flex: none; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 18px; color: var(--gold); background: var(--bg-3); box-shadow: inset 0 0 0 2px rgba(240, 189, 106, 0.35), 0 0 0 6px var(--bg); position: relative; z-index: 1; }
.timeline h3 { font-size: 20px; margin: 4px 0 6px; }
.timeline p { color: var(--muted); }

/* ───────── Carousel 3D ───────── */
.carousel {
  --item-w: clamp(200px, 30vw, 340px);
  --radius3d: clamp(300px, 46vw, 560px);
  position: relative; height: clamp(300px, 42vw, 460px); perspective: 1600px;
  display: grid; place-items: center; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  overflow: hidden;
}
.carousel:active { cursor: grabbing; }
.carousel:focus-visible { outline-offset: -4px; }
.carousel__ring { position: relative; width: var(--item-w); aspect-ratio: 16 / 10; transform-style: preserve-3d; will-change: transform; }
.carousel__item {
  position: absolute; inset: 0; margin: 0; border-radius: 16px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line-2), 0 20px 50px -10px rgba(0, 0, 0, 0.8);
  -webkit-box-reflect: below 10px linear-gradient(transparent 70%, rgba(255, 255, 255, 0.18));
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.carousel__item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.carousel__nav {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 5; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  font-size: 28px; line-height: 1; color: var(--ink); background: rgba(20, 16, 12, 0.7); box-shadow: inset 0 0 0 1px var(--line-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background 0.2s;
}
.carousel__nav:hover { background: rgba(240, 189, 106, 0.25); }
.carousel__nav--prev { left: max(16px, calc(50% - 600px)); }
.carousel__nav--next { right: max(16px, calc(50% - 600px)); }

/* ───────── Tải game ───────── */
.download { overflow: hidden; }
.download__glow { position: absolute; left: 50%; top: 0; width: min(1100px, 140vw); height: 600px; translate: -50% -30%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(240, 160, 80, 0.2), transparent); filter: blur(20px); }

.notice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: 16px 18px; border-radius: var(--radius-sm); margin: 0 auto 26px; max-width: 900px;
  background: rgba(240, 189, 106, 0.08); box-shadow: inset 0 0 0 1px rgba(240, 189, 106, 0.3); color: var(--muted);
}
.notice strong { color: var(--ink); width: 100%; }
.notice[hidden] { display: none; }

.dl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dl {
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 245, 230, 0.06), rgba(255, 245, 230, 0.02));
  box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; min-width: 0;
}
.dl.is-recommended { box-shadow: inset 0 0 0 1px rgba(240, 189, 106, 0.55), 0 30px 70px -30px rgba(240, 160, 80, 0.55); }
.dl.is-recommended::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 60%, var(--gold) 75%, var(--ember) 85%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 5s linear infinite;
}
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --ang: 360deg; } }
.dl__badge { position: absolute; top: 18px; right: 18px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em; padding: 5px 10px; border-radius: 999px; background: var(--gold); color: #1d1307; }
.dl__os { display: flex; align-items: center; gap: 14px; }
.dl__logo { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 14px; background: rgba(255, 245, 230, 0.06); box-shadow: inset 0 0 0 1px var(--line-2); }
.dl__logo svg { width: 28px; height: 28px; fill: var(--ink); }
.dl__os h3 { font-size: 20px; }
.dl__os p { font-size: 13.5px; color: var(--faint); }
.dl__desc { color: var(--muted); font-size: 14.5px; }
.dl__meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; }
.dl__meta dt { color: var(--faint); }
.dl__meta dd { margin: 0; color: var(--ink); font-weight: 600; min-width: 0; }
.dl__hash { display: flex; align-items: center; gap: 8px; }
.dl__hash code { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dl__hash button { flex: none; border: 0; cursor: pointer; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(255, 245, 230, 0.08); color: var(--gold); }
.dl .btn { margin-top: auto; width: 100%; }
.dl__status { font-size: 13px; min-height: 20px; color: var(--faint); text-align: center; }
.dl__status.is-ok { color: var(--ok); }
.dl__status.is-err { color: var(--err); }
.dl__bar { height: 4px; border-radius: 4px; background: rgba(255, 245, 230, 0.08); overflow: hidden; display: none; }
.dl__bar.is-on { display: block; }
.dl__bar span { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, var(--gold), var(--ember)); animation: indet 1.2s var(--ease) infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Hướng dẫn cài đặt */
.install { min-width: 0; overflow: hidden; margin: 56px auto 0; max-width: 900px; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.tabs { position: relative; display: inline-flex; padding: 5px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 22px; }
.tabs__btn { position: relative; z-index: 1; border: 0; background: none; cursor: pointer; padding: 9px 20px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--muted); transition: color 0.25s; }
.tabs__btn[aria-selected="true"] { color: #1d1307; }
.tabs__ink.no-anim { transition: none; }
.tabs__ink { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: linear-gradient(135deg, #ffdca0, var(--gold)); transition: transform 0.35s var(--ease), width 0.35s var(--ease); }
.tabs__panel[hidden] { display: none; }
.steps { margin: 0; padding-left: 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; color: var(--muted); }
.steps li { min-width: 0; }
.steps b { color: var(--ink); }
.steps em { color: var(--gold); font-style: normal; }
.steps code { font-size: 0.9em; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.35); color: var(--gold); word-break: break-word; }
.code { position: relative; margin-top: 10px; border-radius: 12px; background: #090706; box-shadow: inset 0 0 0 1px var(--line); }
.code pre { margin: 0; padding: 16px 92px 16px 16px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(240, 189, 106, 0.4) transparent; font-size: 13.5px; color: #f6d69a; }
.code pre code { background: none; padding: 0; color: inherit; word-break: normal; }
.copy { position: absolute; top: 10px; right: 10px; border: 0; cursor: pointer; font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 8px; background: rgba(255, 245, 230, 0.1); color: var(--ink); }
.copy:hover { background: rgba(240, 189, 106, 0.25); }

.req { margin: 24px auto 0; max-width: 900px; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
.req h3 { font-size: 18px; margin-bottom: 14px; }
.req dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.req dt { font-size: 12.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; }
.req dd { margin: 2px 0 0; font-weight: 600; font-size: 14.5px; }
.req__sum { margin-top: 16px; font-size: 14px; color: var(--faint); }

/* ───────── FAQ ───────── */
.faq { display: grid; gap: 12px; }
.faq details { border-radius: var(--radius-sm); background: rgba(255, 245, 230, 0.03); box-shadow: inset 0 0 0 1px var(--line); transition: background 0.3s, box-shadow 0.3s; }
.faq details[open] { background: rgba(255, 245, 230, 0.05); box-shadow: inset 0 0 0 1px rgba(240, 189, 106, 0.35); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 56px 18px 22px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; translate: 0 -50%; font-size: 24px; font-weight: 400; color: var(--gold); transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 22px 20px; color: var(--muted); }

/* ───────── CTA & footer ───────── */
.cta { position: relative; z-index: 2; padding: clamp(80px, 12vw, 150px) 0; text-align: center; overflow: hidden;
  background: radial-gradient(60% 70% at 50% 100%, rgba(240, 160, 80, 0.22), transparent 70%); }
.cta h2 { font-size: clamp(32px, 5.4vw, 62px); font-weight: 800; margin: 6px 0 34px; }
.footer { position: relative; z-index: 2; border-top: 1px solid var(--line); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); }
.footer__inner { display: grid; gap: 10px; justify-items: center; text-align: center; color: var(--muted); font-size: 14.5px; }
.footer__small { color: var(--faint); font-size: 13px; }

/* ───────── Modal ───────── */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(5, 4, 3, 0.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade 0.3s; }
.modal__box { position: relative; width: min(1000px, 100%); border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--shadow); animation: pop 0.4s var(--ease); }
.modal__box video { width: 100%; max-height: 80vh; background: #000; }
.modal__box--img { background: var(--bg-2); }
.modal__box--img img { width: 100%; max-height: 78vh; object-fit: contain; background: #000; }
.modal__box--img p { padding: 12px 16px; color: var(--muted); font-size: 14.5px; }
.modal__close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; font-size: 18px; background: rgba(0, 0, 0, 0.6); color: #fff; }
.modal__close:hover { background: rgba(240, 189, 106, 0.4); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(10px); } }

/* ───────── Toast ───────── */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 400;
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px; font-size: 14.5px; font-weight: 600;
  background: rgba(30, 24, 18, 0.95); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow);
  translate: -50% 20px; opacity: 0; pointer-events: none; transition: opacity 0.3s, translate 0.3s var(--ease);
}
.toast.is-on { opacity: 1; translate: -50% 0; }
.toast.is-err { box-shadow: inset 0 0 0 1px rgba(255, 138, 122, 0.6), var(--shadow); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .nav__links a { padding: 8px 9px; font-size: 14px; }
  .box3d { --w: 260px; --h: 364px; --d: 40px; }
  .box-stage { height: 460px; }
}

@media (max-width: 920px) {
  .burger { display: block; }
  .nav__cta { display: none; }
  .nav__links {
    position: fixed; top: calc(var(--nav-h) + var(--bar-h) + env(safe-area-inset-top)); left: 0; right: 0; bottom: 0;
    flex-direction: column; gap: 4px; margin: 0; padding: 18px var(--gutter) calc(24px + env(safe-area-inset-bottom));
    background: rgba(13, 11, 9, 0.97); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0.25s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { font-size: 20px; font-weight: 700; padding: 14px 12px; color: var(--ink); border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav.menu-open { background: rgba(13, 11, 9, 0.97); }

  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__copy { margin: 0 auto; }
  .hero__lead { margin-left: auto; margin-right: auto; }
  .hero__actions, .stats { justify-content: center; }
  .box-stage { height: 400px; order: -1; margin-top: -10px; }
  .box3d { --w: 220px; --h: 308px; --d: 34px; }
  .hero__shade { background: linear-gradient(180deg, rgba(13, 11, 9, 0.55) 0%, rgba(13, 11, 9, 0.85) 45%, var(--bg) 100%); }
  .scroll-cue { display: none; }

  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento__a { grid-column: span 2; grid-row: auto; }
  .bento__a .card__bg { inset: 0; opacity: 0.18; -webkit-mask-image: none; mask-image: none; }
  .bento__b, .bento__c, .bento__d, .bento__e { grid-column: span 1; }

  .dl-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
}

@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  .brand span { font-size: 16px; }
  .hero { padding-bottom: 60px; }
  .box-stage { height: 330px; }
  .box3d { --w: 190px; --h: 266px; --d: 30px; }
  .orbit--1 { right: 0; } .orbit--2 { left: 0; } .orbit--3 { display: none; }
  .box3d__label { left: 12px; right: 12px; bottom: 12px; }
  .box3d__label img { display: none; }
  .box3d__label b { font-size: 16px; }
  .box3d__label small { font-size: 15px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .stats { gap: 14px 26px; }
  .stats dt { font-size: 28px; }

  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento__a, .bento__b, .bento__c, .bento__d, .bento__e { grid-column: auto; }
  .card { padding: 22px; }

  .chars { grid-template-columns: minmax(0, 1fr); max-width: 400px; }
  .flip { aspect-ratio: 4 / 5.4; }

  .timeline::before { left: 23px; }
  .timeline li { gap: 16px; padding-right: 8px; }
  .timeline__n { width: 48px; height: 48px; font-size: 15px; }
  .timeline h3 { font-size: 18px; }

  .carousel__nav { width: 42px; height: 42px; font-size: 24px; }
  .dl { padding: 22px; }
  .tabs { display: flex; }
  .tabs__btn { flex: 1; }
  .code pre { padding-right: 16px; padding-top: 48px; }
  .marquee span { font-size: 15px; }
}

@media (max-width: 360px) {
  .hero__title { font-size: 44px; }
  .box3d { --w: 170px; --h: 238px; }
}

/* Màn hình thấp (laptop nằm ngang, điện thoại xoay ngang) */
@media (max-height: 560px) and (orientation: landscape) {
  .hero { min-height: auto; }
  .box-stage { display: none; }
  .hero__grid { grid-template-columns: 1fr; }
}

/* Người dùng bật giảm chuyển động */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  #dust { display: none; }
}


/* =========================================================
   SỰ KIỆN 20-11 · Ngày Nhà giáo Việt Nam
   ========================================================= */
.eyebrow--rose { color: var(--petal); }
.hide-sm { display: inline; }

/* Thanh sự kiện trên cùng */
.event-bar {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--bar-h); padding: 0 16px; overflow: hidden;
  font-size: 13.5px; color: #fff4e6; text-decoration: none !important; white-space: nowrap;
  background: linear-gradient(90deg, #7a1c2e, var(--rose-2) 30%, #c2563c 60%, #8a2a1f);
}
.event-bar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 230, 190, 0.35) 50%, transparent 65%);
  transform: translateX(-100%); animation: barShine 5s ease-in-out infinite;
}
@keyframes barShine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.event-bar__text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.event-bar__text b { color: #ffe1a6; }
.event-bar__medal { display: inline-flex; flex: none; }
.event-bar__count {
  flex: none; font-weight: 700; font-size: 12.5px; padding: 3px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.28); box-shadow: inset 0 0 0 1px rgba(255, 225, 166, 0.4); color: #ffe1a6;
  font-variant-numeric: tabular-nums;
}
.event-bar:hover .event-bar__text { text-decoration: underline; }

/* Pill + dải băng hero */
.pill--event { background: rgba(184, 52, 79, 0.25); box-shadow: inset 0 0 0 1px rgba(255, 179, 193, 0.45); }
.pill--event .pill__dot { background: var(--petal); animation-name: pingRose; }
@keyframes pingRose { 70% { box-shadow: 0 0 0 10px rgba(255, 179, 193, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 179, 193, 0); } }

.ribbon {
  position: relative; display: inline-flex; align-items: center; gap: 12px; margin-top: 16px;
  padding: 10px 28px 10px 14px; max-width: 100%;
  background: linear-gradient(90deg, rgba(122, 28, 46, 0.95), rgba(184, 52, 79, 0.85) 60%, rgba(184, 52, 79, 0));
  border-left: 3px solid #ffd27a; border-radius: 4px 0 0 4px;
  box-shadow: 0 10px 30px -10px rgba(184, 52, 79, 0.6);
}
.ribbon__medal { display: inline-flex; flex: none; filter: drop-shadow(0 0 10px rgba(255, 210, 122, 0.7)); animation: medal 3s ease-in-out infinite; }
@keyframes medal { 50% { transform: rotate(-8deg) scale(1.08); } }
.ribbon b { display: block; font-size: 15px; color: #ffe1a6; line-height: 1.3; }
.ribbon span { display: block; font-size: 15px; font-weight: 600; color: #fff4e6; line-height: 1.35; }

/* Tem tri ân trên hộp game */
.stamp {
  position: absolute; left: 8%; top: 8%; width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-items: center; text-align: center; transform: rotate(-14deg);
  color: #ffd9de; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.35;
  background: radial-gradient(circle, rgba(184, 52, 79, 0.92) 55%, rgba(122, 28, 46, 0.95));
  box-shadow: 0 0 0 3px rgba(255, 179, 193, 0.5), 0 0 0 7px rgba(184, 52, 79, 0.35), var(--shadow);
  z-index: 2;
  animation: stampIn 0.9s var(--ease);
}
.stamp b { font-size: 22px; letter-spacing: 0.04em; color: #fff; }
@keyframes stampIn { from { transform: rotate(-40deg) scale(1.6); } to { transform: rotate(-14deg) scale(1); } }

/* Mục sự kiện */
.event { background: radial-gradient(70% 60% at 50% 0%, rgba(184, 52, 79, 0.18), transparent 70%); }
.countdown { display: flex; justify-content: center; gap: clamp(10px, 2.4vw, 22px); margin: 0 auto; }
.countdown__cell {
  position: relative; width: clamp(70px, 17vw, 132px); padding: clamp(14px, 2.4vw, 22px) 0 clamp(12px, 2vw, 18px);
  border-radius: 18px; text-align: center; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 245, 230, 0.08), rgba(255, 245, 230, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 179, 193, 0.25), 0 20px 40px -20px rgba(184, 52, 79, 0.6);
}
.countdown__cell::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, 0.35); }
.countdown__cell b {
  display: block; font-size: clamp(32px, 7vw, 64px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #ffd9a0); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.countdown__cell b.tick { animation: tick 0.5s var(--ease); }
@keyframes tick { from { transform: translateY(-30%); opacity: 0.2; } }
.countdown__cell span { display: block; margin-top: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.countdown__today { margin: 20px auto 0; text-align: center; font-size: 18px; color: var(--petal); }
.countdown__today[hidden] { display: none; }

.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: clamp(40px, 6vw, 64px); }
.event-card { display: flex; flex-direction: column; }
.event-card__n { position: absolute; top: 14px; right: 20px; font-size: 44px; font-weight: 800; color: rgba(255, 179, 193, 0.1); line-height: 1; }
.event-card__link { margin-top: auto; padding-top: 16px; align-self: flex-start; font-weight: 700; color: var(--petal); background: none; border: 0; cursor: pointer; font-size: 15px; }
.event-card__link:hover { text-decoration: underline; }
.event-card .card__icon { background: rgba(232, 96, 122, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 179, 193, 0.3); }

/* Thiệp tri ân */
.thiep { background: linear-gradient(180deg, var(--bg) 0%, #1a0f11 30%, #1a0f11 70%, var(--bg) 100%); }
.thiep__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.thiep__form {
  display: grid; gap: 16px; padding: clamp(20px, 3vw, 30px); border-radius: var(--radius);
  background: rgba(255, 245, 230, 0.04); box-shadow: inset 0 0 0 1px var(--line);
}
.thiep__form > label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); position: relative; }
.thiep__form input[type="text"], .thiep__form input:not([type]), .thiep__form textarea {
  width: 100%; font: inherit; font-size: 16px; font-weight: 500; color: var(--ink); /* 16px: tránh iOS tự phóng to */
  padding: 12px 14px; border-radius: 12px; border: 0; resize: vertical; min-height: 48px;
  background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow 0.2s;
}
.thiep__form textarea { min-height: 110px; line-height: 1.5; }
.thiep__form input:focus, .thiep__form textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--petal); }
.thiep__count { position: absolute; right: 10px; bottom: 8px; font-size: 12px; color: var(--faint); font-weight: 500; }
.thiep__themes { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.thiep__themes legend { font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; padding: 0; }
.thiep__themes label {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 999px; background: rgba(255, 245, 230, 0.05); box-shadow: inset 0 0 0 1px var(--line);
}
.thiep__themes input { position: absolute; opacity: 0; pointer-events: none; }
.thiep__themes label:has(input:checked) { box-shadow: inset 0 0 0 2px var(--petal); color: var(--ink); }
.thiep__themes label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.sw { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.sw--rose { background: linear-gradient(135deg, #ffd1da, #e8607a); }
.sw--gold { background: linear-gradient(135deg, #ffe7b8, #e39a4b); }
.sw--board { background: linear-gradient(135deg, #3c5a48, #1f3328); }
.thiep__suggest { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--faint); }
.thiep__suggest button {
  border: 0; cursor: pointer; font-size: 13px; padding: 6px 10px; border-radius: 999px; color: var(--ink);
  background: rgba(232, 96, 122, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 179, 193, 0.25);
}
.thiep__suggest button:hover { background: rgba(232, 96, 122, 0.24); }
.thiep__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.thiep__actions .btn { flex: 1 1 160px; }
.thiep__preview { perspective: 1400px; min-width: 0; }
.thiep__frame { border-radius: 16px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--line-2); background: #2a1a1c; }
.thiep__frame canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; }

/* Bảng đen */
.board-band { position: relative; z-index: 2; padding: clamp(40px, 6vw, 80px) 0; }
.board {
  position: relative; margin: 0 auto; max-width: 980px; padding: clamp(36px, 6vw, 70px) clamp(22px, 5vw, 70px) clamp(44px, 6vw, 70px);
  text-align: center; border-radius: 10px;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(255, 255, 255, 0.06), transparent 60%),
    repeating-linear-gradient(-12deg, rgba(255, 255, 255, 0.015) 0 2px, transparent 2px 7px),
    linear-gradient(160deg, #2f4a3b, #1d3127 70%);
  box-shadow: 0 0 0 12px #6b4428, 0 0 0 14px #3c2615, 0 40px 80px -20px rgba(0, 0, 0, 0.8), inset 0 0 60px rgba(0, 0, 0, 0.45);
}
.board blockquote {
  margin: 0; font-family: "Dancing Script", cursive; font-size: clamp(26px, 4.6vw, 50px); line-height: 1.35;
  color: rgba(255, 255, 255, 0.92); text-shadow: 0 0 2px rgba(255, 255, 255, 0.35);
}
.board figcaption { margin-top: 18px; color: rgba(255, 255, 255, 0.55); font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; }
.board__date { position: absolute; top: 16px; right: 22px; font-size: 13px; color: rgba(255, 255, 255, 0.45); font-style: italic; }
.board__chalk { position: absolute; bottom: -4px; left: 12%; width: 54px; height: 10px; border-radius: 3px; background: #f4f1ea; box-shadow: 70px 0 0 -1px #f4b6c2, 0 3px 6px rgba(0, 0, 0, 0.5); }

@media (max-width: 920px) {
  .event-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-left: auto; margin-right: auto; }
  .thiep__grid { grid-template-columns: minmax(0, 1fr); }
  .thiep__preview { order: -1; }
  .stamp { width: 76px; height: 76px; font-size: 8.5px; left: 4%; top: 2%; }
  .stamp b { font-size: 16px; }
  .ribbon { text-align: left; }
}
@media (max-width: 640px) {
  :root { --bar-h: 34px; }
  .hide-sm { display: none; }
  .event-bar { font-size: 12.5px; gap: 8px; }
  .ribbon { padding-right: 18px; }
  .ribbon b, .ribbon span { font-size: 13.5px; }
  .countdown__cell { border-radius: 14px; }
  .board { box-shadow: 0 0 0 8px #6b4428, 0 0 0 10px #3c2615, 0 30px 60px -20px rgba(0, 0, 0, 0.8), inset 0 0 40px rgba(0, 0, 0, 0.45); }
  .board__date { display: none; }
}
@media (prefers-reduced-motion: reduce) { .stamp { opacity: 1; } }
.countdown[hidden] { display: none; }
.thiep__themes label { position: relative; }
