/* HVSC Game — trang chủ. Cảm hứng bố cục kính mờ + aurora; màu nhấn đỏ HVSC / san hô / cam / tím, không nút xanh dương. */
@font-face { font-family: "Be Vietnam Pro"; src: url("../assets/fonts/BeVietnamPro-Medium.ttf") format("truetype"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("../assets/fonts/BeVietnamPro-Bold.ttf") format("truetype"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("../assets/fonts/BeVietnamPro-ExtraBold.ttf") format("truetype"); font-weight: 800 900; font-display: swap; }

:root {
  --ink: #143352; --ink-2: #2b4766; --muted: #5a6a86; --muted-2: #8190aa;
  --red: #e31e25; --coral: #ff5b45; --orange: #ff9a3d; --amber: #ffb347;
  --violet: #7c3aed; --violet-2: #8b5cf6; --pink: #f0508f; --teal: #12a594;
  --bg: #f3f6fe;
  --grad-main: linear-gradient(135deg, #e31e25 0%, #ff5b45 48%, #ff8f3d 100%);
  --grad-text: linear-gradient(100deg, #7c3aed 0%, #f0508f 45%, #ff5b45 75%, #ff9a3d 100%);
  --glass: rgba(255, 255, 255, .72);
  --glass-line: rgba(255, 255, 255, .8);
  --sh-glass: 0 0 0 .5px rgba(124, 58, 237, .10), 0 1px 3px rgba(20, 51, 82, .06), 0 14px 36px -10px rgba(124, 58, 237, .16), 0 40px 90px -30px rgba(255, 91, 69, .18), inset 0 0 0 1.5px rgba(255, 255, 255, .7);
  --sh-float: 0 0 0 .5px rgba(20, 51, 82, .08), 0 2px 6px rgba(20, 51, 82, .06), 0 18px 40px -12px rgba(20, 51, 82, .22);
  --r-xl: 40px; --r-lg: 32px; --r-md: 22px; --r-sm: 14px;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { position: relative; margin: 0; font-family: var(--font); font-weight: 500; color: var(--ink); background: var(--bg); line-height: 1.55; overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.022em; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid rgba(124, 58, 237, .55); outline-offset: 3px; border-radius: 12px; }
.skip { position: absolute; left: 12px; top: 8px; z-index: 100; background: #fff; padding: 10px 16px; border-radius: 12px; min-height: 44px; display: inline-flex; align-items: center; transform: translateY(-300%); }
.skip:focus { transform: none; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }

/* ---------- Aurora ---------- */
.aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, #f3f6fe 0%, #f6f2ff 35%, #fff4ef 70%, #f2f7fe 100%); }
.aurora .b { position: absolute; border-radius: 50%; opacity: .9; will-change: transform; transform: translate3d(0, calc(var(--sy, 0) * var(--k, 0) * -0.4px), 0); }
.aurora .b1 { --k: .05; width: 70vmax; height: 60vmax; left: -22vmax; top: -24vmax; background: radial-gradient(closest-side, rgba(196, 214, 255, .95), rgba(196, 214, 255, 0)); }
.aurora .b2 { --k: .09; width: 60vmax; height: 55vmax; right: -20vmax; top: -10vmax; background: radial-gradient(closest-side, rgba(231, 214, 255, .9), rgba(231, 214, 255, 0)); }
.aurora .b3 { --k: .13; width: 60vmax; height: 52vmax; left: 8vw; top: 9%; background: radial-gradient(closest-side, rgba(255, 217, 230, .85), rgba(255, 217, 230, 0)); }
.aurora .b4 { --k: .07; width: 58vmax; height: 50vmax; right: -14vmax; top: 24%; background: radial-gradient(closest-side, rgba(255, 226, 205, .9), rgba(255, 226, 205, 0)); }
.aurora .b5 { --k: .11; width: 56vmax; height: 50vmax; left: -16vmax; top: 40%; background: radial-gradient(closest-side, rgba(208, 244, 236, .8), rgba(208, 244, 236, 0)); }
.aurora .b6 { --k: .03; width: 40vmax; height: 36vmax; left: 35vw; top: -12vmax; background: radial-gradient(closest-side, rgba(255, 236, 214, .75), rgba(255, 236, 214, 0)); }
.aurora .b7 { --k: .06; width: 60vmax; height: 52vmax; right: -18vmax; top: 56%; background: radial-gradient(closest-side, rgba(226, 214, 255, .85), rgba(226, 214, 255, 0)); }
.aurora .b8 { --k: .09; width: 58vmax; height: 50vmax; left: -10vmax; top: 70%; background: radial-gradient(closest-side, rgba(255, 220, 228, .8), rgba(255, 220, 228, 0)); }
.aurora .b9 { --k: .04; width: 60vmax; height: 50vmax; right: -12vmax; top: 84%; background: radial-gradient(closest-side, rgba(255, 228, 206, .85), rgba(255, 228, 206, 0)); }
.aurora .grain { position: absolute; inset: 0; opacity: .25; background-image: radial-gradient(rgba(20, 51, 82, .05) 1px, transparent 1px); background-size: 3px 3px; }
@media (prefers-reduced-motion: no-preference) {
  .aurora .b1 { animation: drift1 26s ease-in-out infinite alternate; }
  .aurora .b2 { animation: drift2 32s ease-in-out infinite alternate; }
  .aurora .b3 { animation: drift1 38s ease-in-out infinite alternate-reverse; }
  .aurora .b4 { animation: drift2 30s ease-in-out infinite alternate-reverse; }
}
@keyframes drift1 { to { translate: 6vw 4vh; scale: 1.08; } }
@keyframes drift2 { to { translate: -5vw 6vh; scale: .94; } }

/* ---------- Nút ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border-radius: 999px; font-weight: 700; padding: 12px 22px; font-size: 16px; line-height: 1.2; border: 0; cursor: pointer; white-space: nowrap; min-height: 44px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s; }
.btn-sm { padding: 9px 18px; font-size: 15px; min-height: 42px; }
.btn-lg { padding: 16px 28px; font-size: 18px; min-height: 56px; }
.btn-block { width: 100%; }
.btn-main { color: #fff; background: var(--grad-main); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 8px 22px -8px rgba(227, 30, 37, .55), 0 2px 6px rgba(227, 30, 37, .25); }
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 14px 30px -10px rgba(227, 30, 37, .6), 0 3px 8px rgba(227, 30, 37, .25); }
.btn-white { background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: 0 0 0 1px rgba(20, 51, 82, .08), 0 6px 16px -8px rgba(20, 51, 82, .25); }
.btn-white:hover { transform: translateY(-2px); background: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(255, 255, 255, .6); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.kbd { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #7c3aed, #f0508f); color: #fff; font-size: 14px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; padding: 12px 0; transition: background-color .3s, box-shadow .3s, backdrop-filter .3s; }
.nav.scrolled { background: rgba(246, 247, 255, .7); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); box-shadow: 0 1px 0 rgba(20, 51, 82, .06); }
.nav-in { width: min(1360px, 100% - 40px); margin-inline: auto; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { width: 256px; height: 64px; }
.links { display: flex; gap: 4px; margin-inline: auto; }
.links a { padding: 9px 11px; white-space: nowrap; border-radius: 999px; font-size: 15px; color: var(--ink-2); transition: background-color .2s; }
.links a:hover { background: rgba(255, 255, 255, .7); }
.nav-cta { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.links + .nav-cta { margin-left: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 44px 0 0; }
.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
.chip-new { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .8); box-shadow: 0 0 0 1px rgba(255, 255, 255, .9), 0 4px 14px -6px rgba(124, 58, 237, .3); font-size: 14.5px; color: var(--ink-2); }
.chip-new b { background: linear-gradient(135deg, #7c3aed, #f0508f); color: #fff; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; }
.hero h1 { margin-top: 26px; font-size: clamp(40px, 5.6vw, 92px); line-height: 1.08; letter-spacing: -.035em; }
.grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.lead { margin-top: 22px; max-width: 720px; font-size: clamp(17px, 1.35vw, 21px); color: var(--muted); line-height: 1.6; }
.ctas { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.trust { list-style: none; padding: 0; margin: 26px 0 0; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.trust li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); padding: 6px 14px 6px 8px; border-radius: 999px; background: rgba(255, 255, 255, .55); box-shadow: 0 0 0 1px rgba(255, 255, 255, .8); }
.ti { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; font-size: 11px; color: var(--violet); font-weight: 800; }

/* Sân khấu: đơn vị cqw theo bề ngang sân khấu */
.stage-wrap { position: relative; width: min(1240px, 100% - 32px); margin: 72px auto 0; padding-bottom: 40px; }
.stage { position: relative; container-type: inline-size; aspect-ratio: 16 / 9.2; }
.par { will-change: transform; }
.screen { position: absolute; left: 5%; top: 4%; width: 72%; aspect-ratio: 16 / 9; border-radius: 2.6cqw; background: #fff; box-shadow: 0 0 0 .6cqw rgba(255, 255, 255, .7), 0 0 0 calc(.6cqw + 1px) rgba(20, 51, 82, .08), 0 4cqw 8cqw -2cqw rgba(76, 52, 160, .3); overflow: hidden; display: flex; flex-direction: column; }
.screen-bar { display: flex; align-items: center; gap: 1.2cqw; padding: .9cqw 1.6cqw; font-size: 1.05cqw; color: var(--muted); background: #f7f7fd; border-bottom: 1px solid #eceaf7; }
.screen-bar .sb-r { margin-left: auto; font-weight: 700; color: var(--violet); }
.dots { display: flex; gap: .45cqw; }
.dots i { width: .75cqw; height: .75cqw; border-radius: 50%; background: #e3e1ef; }
.dots i:first-child { background: #ff8a7a; }
.screen-body { flex: 1; padding: 2.4cqw 3cqw 1.8cqw; display: flex; flex-direction: column; background: radial-gradient(60% 80% at 100% 0%, #fff0e8 0, transparent 60%), radial-gradient(60% 80% at 0% 100%, #f1ebff 0, transparent 60%), #fff; }
.q-top { display: flex; align-items: center; gap: 2cqw; }
.ring { position: relative; width: 5.2cqw; height: 5.2cqw; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: #f0ecfb; stroke-width: 3.2; }
.ring .fg { stroke: url(#none); stroke: var(--coral); stroke-linecap: round; stroke-dasharray: 97.4; stroke-dashoffset: calc(97.4 * (1 - var(--p))); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.9cqw; }
.q { font-size: 3.1cqw; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.q-ans { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 1.3cqw; }
.qa { display: flex; align-items: center; gap: 1.2cqw; padding: 1.5cqw 1.8cqw; border-radius: 1.6cqw; color: #fff; font-weight: 700; font-size: 2.1cqw; box-shadow: 0 .45cqw 0 rgba(20, 51, 82, .14); }
.qa i { font-style: normal; display: grid; place-items: center; width: 3cqw; height: 3cqw; border-radius: .9cqw; background: rgba(255, 255, 255, .25); font-size: 1.5cqw; }
.qa1 { background: linear-gradient(135deg, #ff6a4d, #ff8f5a); }
.qa2 { background: linear-gradient(135deg, #7c3aed, #9b6bff); }
.qa3 { background: linear-gradient(135deg, #f0508f, #ff7ab0); }
.qa4 { background: linear-gradient(135deg, #0fa08f, #2cc4ae); }
.qa.ok { box-shadow: 0 0 0 .45cqw #fff, 0 0 0 .8cqw #22c55e, 0 .8cqw 1.8cqw -.4cqw rgba(34, 197, 94, .5); }
.screen-foot { margin-top: 1.6cqw; display: flex; justify-content: space-between; align-items: center; font-size: 1.1cqw; color: var(--muted-2); }
.code-pill { padding: .45cqw 1.1cqw; border-radius: 999px; background: #fff3ee; color: var(--red); }
.code-pill b { letter-spacing: .08em; }

.phone { position: absolute; right: 3%; top: 16%; width: 21%; aspect-ratio: 9 / 18.5; border-radius: 3.6cqw; background: #0f1d33; padding: .7cqw; box-shadow: 0 3cqw 6cqw -2cqw rgba(20, 51, 82, .45), inset 0 0 0 .2cqw #2d3d5a; }
.ph-notch { position: absolute; top: 1.4cqw; left: 50%; width: 5.5cqw; height: 1.4cqw; border-radius: 1cqw; background: #0f1d33; transform: translateX(-50%); z-index: 2; }
.ph-screen { position: relative; height: 100%; border-radius: 3cqw; overflow: hidden; padding: 4cqw 1.4cqw 1.4cqw; display: flex; flex-direction: column; gap: .9cqw;
  background: linear-gradient(180deg, #fff6f1 0%, #f6f0ff 100%); }
.ph-top { display: flex; align-items: center; gap: .7cqw; font-size: 1.1cqw; font-weight: 700; }
.av { display: grid; place-items: center; width: 2.3cqw; height: 2.3cqw; border-radius: 50%; background: var(--grad-main); color: #fff; font-size: .85cqw; }
.ph-pts { margin-left: auto; color: #16a34a; }
.ph-q { font-size: 1.45cqw; font-weight: 800; line-height: 1.3; margin: .6cqw 0 .4cqw; }
.pb { display: block; padding: 1.15cqw 1.2cqw; border-radius: 1.2cqw; color: #fff; font-weight: 700; font-size: 1.3cqw; box-shadow: 0 .3cqw 0 rgba(20, 51, 82, .14); }
.pb1 { background: #ff7457; } .pb2 { background: #8b5cf6; } .pb3 { background: #f0508f; } .pb4 { background: #17a998; }
.pb.ok { box-shadow: 0 0 0 .3cqw #fff, 0 0 0 .55cqw #22c55e; }

.float { position: absolute; z-index: 3; background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); border-radius: 2.4cqw; box-shadow: var(--sh-float), inset 0 0 0 1.5px rgba(255, 255, 255, .7); }
.f-ok { left: -1%; top: 30%; display: flex; align-items: center; gap: 1.1cqw; padding: 1.1cqw 1.6cqw 1.1cqw 1.1cqw; font-size: 1.2cqw; }
.f-ok b { display: block; font-size: 1.5cqw; }
.f-ok small { color: var(--muted); font-size: 1.05cqw; }
.tick { display: grid; place-items: center; width: 3.4cqw; height: 3.4cqw; border-radius: 50%; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; font-size: 1.8cqw; font-weight: 800; }
.f-board { left: 1%; bottom: 0; width: 22cqw; padding: 1.4cqw 1.6cqw; }
.fb-h { font-weight: 800; font-size: 1.45cqw; display: flex; align-items: center; justify-content: space-between; }
.fb-h span { font-size: .95cqw; font-weight: 700; color: var(--red); background: #ffeceb; padding: .2cqw .8cqw; border-radius: 999px; }
.f-board ol { list-style: none; padding: 0; margin: .9cqw 0 0; display: grid; gap: .55cqw; }
.f-board li { display: flex; align-items: center; gap: .9cqw; font-size: 1.25cqw; }
.f-board li b { margin-left: auto; }
.f-board i, .board i { font-style: normal; display: grid; place-items: center; width: 2.1cqw; height: 2.1cqw; border-radius: 50%; font-size: 1cqw; font-weight: 800; background: #eef0f6; }
.m1 { background: linear-gradient(135deg, #ffcf4a, #ffa62b) !important; color: #5a3a00; }
.m2 { background: linear-gradient(135deg, #e6e9f2, #c7cddc) !important; }
.m3 { background: linear-gradient(135deg, #ffc9a8, #f39a6b) !important; color: #5a2a10; }
.f-wheel { right: 20%; top: 1%; padding: 1cqw; display: flex; align-items: center; gap: 1cqw; font-weight: 800; font-size: 1.3cqw; padding-right: 1.8cqw; }
.f-wheel .wheel { width: 6.2cqw; height: 6.2cqw; }
.spin, .spin2 { transform-origin: 50px 50px; }
@media (prefers-reduced-motion: no-preference) {
  .spin { animation: spin 9s linear infinite; }
  .spin2 { animation: spin 7s cubic-bezier(.3, .1, .2, 1) infinite; }
  .f-ok { animation: bob 6s ease-in-out infinite; }
  .f-wheel { animation: bob 7s ease-in-out -2s infinite; }
  .f-box { animation: bob 8s ease-in-out -4s infinite; }
  .f-board { animation: bob 9s ease-in-out -1s infinite; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { translate: 0 -0.9cqw; } }
.f-box { right: 0; bottom: 6%; display: flex; align-items: center; gap: .7cqw; padding: 1cqw 1.4cqw; }
.f-box small { font-weight: 800; font-size: 1.2cqw; margin-left: .4cqw; }
.bx { display: grid; place-items: center; width: 4cqw; height: 4cqw; border-radius: 1.1cqw; background: linear-gradient(135deg, #7c3aed, #a46bff); color: #fff; font-weight: 800; font-size: 1.6cqw; box-shadow: 0 .35cqw 0 rgba(76, 29, 149, .35); }
.bx.open { background: #fff; color: var(--ink); font-size: 1.15cqw; box-shadow: 0 0 0 .2cqw #ffb347, 0 .35cqw 0 rgba(255, 140, 50, .4); transform: rotate(-6deg); }

.bridge { position: relative; z-index: 4; display: flex; align-items: center; gap: 12px; width: fit-content; max-width: calc(100% - 16px); margin: -6px auto 0; padding: 12px 20px 12px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--sh-glass); font-size: 15px; font-weight: 700; color: var(--ink-2); transition: transform .3s var(--ease); }
.bridge:hover { transform: translateY(-2px); }
.bridge-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--grad-main); box-shadow: 0 0 0 5px rgba(255, 91, 69, .18); }
.bridge .arr { color: var(--coral); }

/* ---------- Hành trình ---------- */
.journey { position: relative; padding: 110px 0 60px; }
.thread { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.thread path { fill: none; stroke-linecap: round; }
.t-bg { stroke: rgba(124, 58, 237, .28); stroke-width: 2.5; stroke-dasharray: 2 10; }
.t-fg { stroke-width: 4; }
.t-head { fill: #fff; stroke: var(--coral); stroke-width: 4; filter: drop-shadow(0 2px 6px rgba(255, 91, 69, .5)); }
.j-head { position: relative; z-index: 1; text-align: center; margin-bottom: 40px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--red); background: rgba(255, 255, 255, .7); padding: 6px 14px; border-radius: 999px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .9); }
h2 { font-size: clamp(34px, 3.8vw, 60px); line-height: 1.12; margin-top: 18px; }
.sub { margin: 18px auto 0; max-width: 640px; font-size: clamp(16.5px, 1.2vw, 19px); color: var(--muted); }

.step { --gap: clamp(32px, 6vw, 96px); position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--gap); align-items: center; padding: 90px 0; }
.step.rev .s-text { order: 2; }
.step.rev .s-vis { order: 1; }
.s-text { position: relative; padding-top: 64px; }
.step:not(.rev) .node { left: calc(100% + var(--gap) / 2 - 24px); }
.step.rev .node { left: calc(var(--gap) / -2 - 24px); }
.node { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fff; font-weight: 800; font-size: 15px; color: var(--muted-2); box-shadow: 0 0 0 6px rgba(255, 255, 255, .5), var(--sh-float); transition: color .4s, background .4s, box-shadow .4s, transform .4s var(--ease); }
.node.on { color: #fff; background: var(--grad-main); transform: scale(1.08); box-shadow: 0 0 0 6px rgba(255, 91, 69, .16), 0 10px 24px -8px rgba(227, 30, 37, .55); }
.tag { font-size: 14px; font-weight: 700; color: var(--violet); margin-bottom: 10px; }
h3 { font-size: clamp(30px, 3vw, 48px); line-height: 1.14; }
.s-text > p:not(.tag):not(.note) { margin-top: 18px; font-size: clamp(16.5px, 1.15vw, 18.5px); color: var(--muted); max-width: 520px; }
.note { margin-top: 14px; font-size: 14.5px; color: var(--muted-2); }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 32px; font-size: 16px; color: var(--ink-2); }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #ff5b45, #ff9a3d); }

.card { border-radius: var(--r-xl); }
.glass { background: var(--glass); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); box-shadow: var(--sh-glass); }
.s-vis { position: relative; }
.pill-soft { font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(124, 58, 237, .1); color: var(--violet); white-space: nowrap; }
.pill-hot { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: #ffe9e6; color: var(--red); }

/* 01 editor */
.editor { padding: 28px; }
.ed-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; font-size: 18px; }
.ed-row { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 10px; margin-top: 10px; align-items: center; }
.no { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: #fff; color: var(--muted-2); font-weight: 700; font-size: 14px; }
.cell { padding: 13px 16px; border-radius: 16px; background: #fff; font-size: 16px; box-shadow: 0 0 0 1px rgba(20, 51, 82, .06); min-height: 50px; display: flex; align-items: center; }
.cell.a { background: #fff8f4; box-shadow: 0 0 0 1px rgba(255, 91, 69, .18); }
.typing .cell.a { box-shadow: 0 0 0 2px rgba(255, 91, 69, .55), 0 0 0 6px rgba(255, 91, 69, .12); }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--coral); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ed-add { margin-top: 14px; padding: 12px; border-radius: 16px; border: 1.5px dashed rgba(124, 58, 237, .3); color: var(--violet); font-weight: 700; text-align: center; font-size: 15px; }
.float-s { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: rgba(255, 255, 255, .92); box-shadow: var(--sh-float); font-weight: 700; font-size: 14.5px; }
.fs-saved { right: -18px; top: -20px; }
.dot-ok { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }

/* thẻ trôi */
.drift { position: relative; z-index: 3; height: 0; display: flex; align-items: flex-start; justify-content: center; pointer-events: none; }
.drift-card { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: rgba(255, 255, 255, .9) !important; display: flex; align-items: center; gap: 14px; padding: 14px 22px 14px 14px; border-radius: 26px; transform: translate3d(var(--dx, 0), -50%, 0) rotate(var(--rot, 0deg)); white-space: nowrap; }
.drift-card b { display: block; font-size: 16px; }
.drift-card small { display: block; font-size: 13.5px; color: var(--muted); }
.dc-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, #7c3aed, #f0508f); color: #fff; font-weight: 800; font-size: 20px; flex: none; }
.dc-ic.hot { background: linear-gradient(135deg, #22c55e, #16a34a); }
.dc-go { color: var(--coral); font-weight: 800; font-size: 20px; }
.sparrow img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }

/* 02 template */
.tpl { padding: 22px; }
.tpl-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-tabs button { border: 0; cursor: pointer; padding: 9px 14px; border-radius: 999px; background: rgba(255, 255, 255, .7); font-weight: 700; font-size: 14.5px; color: var(--ink-2); box-shadow: 0 0 0 1px rgba(20, 51, 82, .06); transition: background .25s, color .25s, transform .2s; min-height: 40px; }
.tpl-tabs button em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted-2); margin-left: 4px; }
.tpl-tabs button:hover { transform: translateY(-1px); }
.tpl-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.tpl-tabs button[aria-selected="true"] em { color: #ffc2b5; }
.tpl-view { position: relative; margin-top: 16px; height: 300px; border-radius: 28px; background: radial-gradient(80% 90% at 100% 0%, #fff1e9 0, transparent 60%), radial-gradient(80% 90% at 0% 100%, #f1ebff 0, transparent 60%), #fff; box-shadow: inset 0 0 0 1px rgba(20, 51, 82, .05); overflow: hidden; }
.tv { position: absolute; inset: 0; padding: 26px; display: flex; flex-direction: column; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(14px) scale(.98); transition: opacity .45s var(--ease), transform .45s var(--ease), visibility 0s linear .45s; pointer-events: none; }
.tv.on { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
.tv-q { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 18px; }
.tv-grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tv-grid4 span { padding: 16px; border-radius: 18px; color: #fff; font-weight: 700; font-size: 17px; text-align: center; box-shadow: 0 4px 0 rgba(20, 51, 82, .14); }
.tv-grid4.sm span { padding: 11px; font-size: 14.5px; }
.o1 { background: linear-gradient(135deg, #ff6a4d, #ff8f5a); } .o2 { background: linear-gradient(135deg, #7c3aed, #9b6bff); } .o3 { background: linear-gradient(135deg, #f0508f, #ff7ab0); } .o4 { background: linear-gradient(135deg, #0fa08f, #2cc4ae); }
.tv-match { display: grid; grid-template-columns: 1fr 56px 1fr; gap: 14px 0; align-items: center; }
.tv-match .l, .tv-match .r { padding: 14px 16px; border-radius: 16px; font-weight: 700; text-align: center; }
.tv-match .l { background: #f1ebff; color: var(--violet); }
.tv-match .r { background: #fff0ea; color: #d2341f; }
.tv-match .ln { height: 3px; border-radius: 2px; background: linear-gradient(90deg, #8b5cf6, #ff5b45); }
.tv-wheel { display: flex; align-items: center; gap: 26px; justify-content: center; }
.tv-wheel svg { width: 210px; height: 210px; flex: none; filter: drop-shadow(0 10px 18px rgba(76, 29, 149, .25)); }
.tv-wheel p { max-width: 180px; font-weight: 700; color: var(--ink-2); }
.tv-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tv-box span { display: grid; place-items: center; height: 104px; border-radius: 20px; background: linear-gradient(135deg, #7c3aed, #a46bff); color: #fff; font-weight: 800; font-size: 28px; box-shadow: 0 5px 0 rgba(76, 29, 149, .35); text-align: center; line-height: 1.2; }
.tv-box span.op { background: #fff; color: var(--ink); font-size: 18px; box-shadow: 0 0 0 3px #ffb347, 0 5px 0 rgba(255, 140, 50, .4); transform: rotate(-3deg); }
.tv-box small { font-size: 14px; color: var(--coral); }
.tv-ana { display: flex; gap: 10px; justify-content: center; }
.tv-ana span { display: grid; place-items: center; width: 54px; height: 60px; border-radius: 14px; background: linear-gradient(135deg, #ff6a4d, #ff9a3d); color: #fff; font-weight: 800; font-size: 26px; box-shadow: 0 4px 0 rgba(160, 50, 20, .3); }
.tv-ana.slots { margin-top: 18px; }
.tv-ana.slots span { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px rgba(124, 58, 237, .25); }
.tv-ana.slots span.gap { width: 16px; box-shadow: none; background: none; }
.tv-show { display: grid; grid-template-columns: 1fr 120px; gap: 18px; align-items: center; }
.tv-show .tv-q { font-size: 19px; text-align: left; }
.ladder { list-style: none; margin: 0; padding: 12px; border-radius: 20px; background: #143352; color: #b9c6dc; display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.ladder li { padding: 6px 10px; border-radius: 10px; }
.ladder li.cur { background: var(--grad-main); color: #fff; }
.tpl-foot { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14.5px; color: var(--muted); }
.same { font-weight: 700; }

/* 03 chơi */
.seg { margin-top: 26px; display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .7); box-shadow: 0 0 0 1px rgba(255, 255, 255, .9), 0 4px 12px -6px rgba(20, 51, 82, .2); }
.seg button { border: 0; cursor: pointer; padding: 10px 20px; border-radius: 999px; background: transparent; font-weight: 700; font-size: 15px; color: var(--ink-2); min-height: 42px; transition: background .25s, color .25s; }
.seg button[aria-selected="true"] { background: var(--grad-main); color: #fff; box-shadow: 0 6px 14px -6px rgba(227, 30, 37, .6); }
.play { position: relative; height: 520px; }
.pl-screen { position: absolute; left: 0; top: 0; width: 84%; aspect-ratio: 16 / 9; padding: 22px 26px; background: #fff; box-shadow: var(--sh-glass); display: flex; flex-direction: column; transition: transform .6s var(--ease), opacity .6s, filter .6s; }
.pl-bar { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted-2); font-weight: 700; }
.pl-q { margin: auto 0 16px; font-size: clamp(20px, 2vw, 30px); font-weight: 800; line-height: 1.2; }
.pl-ans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pl-ans span { padding: 14px; border-radius: 16px; color: #fff; font-weight: 700; font-size: 17px; box-shadow: 0 4px 0 rgba(20, 51, 82, .14); }
.pl-home { position: absolute; right: 0; bottom: 0; display: flex; align-items: flex-end; gap: 14px; transition: transform .6s var(--ease), opacity .6s, filter .6s; }
.mini-phone { width: 140px; aspect-ratio: 9 / 18; border-radius: 30px; background: #0f1d33; padding: 7px; box-shadow: 0 24px 50px -18px rgba(20, 51, 82, .55); }
.mp-s { height: 100%; border-radius: 24px; background: linear-gradient(180deg, #fff3ec, #f3edff); padding: 34px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.mp-t { font-size: 12px; font-weight: 700; color: var(--violet); }
.mp-b { font-size: 17px; font-weight: 800; line-height: 1.25; }
.mp-due { font-size: 12.5px; color: var(--muted); }
.mp-btn { margin-top: auto; text-align: center; padding: 10px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 14px; background: var(--grad-main); }
.link-card { padding: 16px 20px; border-radius: 24px; margin-bottom: 40px; display: grid; gap: 2px; }
.link-card small { color: var(--muted); font-size: 13px; }
.link-card b { font-size: 22px; letter-spacing: .04em; color: var(--red); }
.link-card span { font-size: 13px; color: var(--muted-2); }
.play[data-m="lop"] .pl-home { transform: translate(4%, 6%) scale(.86); opacity: .7; filter: saturate(.7); }
.play[data-m="nha"] .pl-screen { transform: translate(-4%, -4%) scale(.92); opacity: .5; filter: saturate(.6); }
.play[data-m="nha"] .pl-home { z-index: 2; }

/* 04 bảng điểm */
.board { padding: 28px; }
.bd-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 18px; }
.bd-row { display: grid; grid-template-columns: 32px 110px 1fr 54px; gap: 12px; align-items: center; padding: 10px 0; font-size: 16px; }
.board i { width: 30px; height: 30px; font-size: 13px; }
.bar { height: 12px; border-radius: 999px; background: rgba(20, 51, 82, .06); overflow: hidden; }
.bar b { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #8b5cf6, #f0508f 60%, #ff7a59); transition: width 1.2s var(--ease); }
.board.in .bar b, .in .board .bar b { width: var(--w); }
.sc { text-align: right; font-weight: 800; }
.bd-heat { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hl { font-size: 13.5px; color: var(--muted); margin-right: 6px; }
.h { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; font-size: 13px; font-weight: 800; }
.h.g { background: #dcfce7; color: #15803d; } .h.y { background: #fef3c7; color: #a16207; } .h.r { background: #ffe0dd; color: var(--red); box-shadow: 0 0 0 2px rgba(227, 30, 37, .35); }
.bd-tip { margin-top: 14px; padding: 12px 16px; border-radius: 16px; background: #fff4ee; font-size: 15px; color: #9a3412; }

/* 05 in */
.switch { margin-top: 26px; display: inline-flex; align-items: center; gap: 12px; font-weight: 700; cursor: pointer; min-height: 44px; }
.switch { position: relative; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.sw { position: relative; width: 52px; height: 30px; border-radius: 999px; background: #d9dce8; transition: background .25s; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
.switch input:checked + .sw { background: linear-gradient(135deg, #e31e25, #ff7a45); }
.switch input:checked + .sw::after { transform: translateX(22px); }
.switch input:focus-visible + .sw { outline: 3px solid rgba(124, 58, 237, .55); outline-offset: 3px; }
.paper-stack { position: relative; height: 470px; }
.paper { position: absolute; left: 50%; top: 10px; width: min(360px, 82%); aspect-ratio: 1 / 1.414; background: #fff; border-radius: 10px; box-shadow: 0 1px 2px rgba(20, 51, 82, .08), 0 20px 40px -18px rgba(20, 51, 82, .3); }
.p-back { transform: translateX(-50%) rotate(-7deg) translate(-30px, 10px); background: #fbf8ff; }
.p-mid { transform: translateX(-50%) rotate(4deg) translate(26px, 4px); background: #fffaf6; }
.p-front { transform: translateX(-50%); padding: 26px 26px 20px; display: flex; flex-direction: column; }
.pp-h { display: flex; flex-direction: column; gap: 4px; border-bottom: 2px solid #143352; padding-bottom: 10px; }
.pp-h b { font-size: 19px; }
.pp-h span { font-size: 12.5px; color: var(--muted); }
.pp-t { margin: 16px 0 10px; font-weight: 700; font-size: 14.5px; }
.pp-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; font-size: 14.5px; }
.pp-rows .ans { border-bottom: 1.5px dotted #b8c0d4; color: transparent; transition: color .35s; font-weight: 700; }
.paper-stack.show .ans { color: var(--red); }
.pp-f { margin-top: auto; font-size: 11px; color: var(--muted-2); text-align: right; }
.fs-print { right: 2%; top: 46%; }

/* 06 chia sẻ */
.share { padding: 22px; }
.seg-3 { margin-top: 0; display: flex; width: 100%; }
.seg-3 button { flex: 1; padding: 10px 8px; font-size: 14.5px; }
.sh-body { margin-top: 18px; padding: 26px; border-radius: 28px; background: #fff; box-shadow: inset 0 0 0 1px rgba(20, 51, 82, .05); text-align: center; }
.sh-lock { width: 74px; height: 74px; margin: 0 auto; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(135deg, #7c3aed, #f0508f); box-shadow: 0 12px 26px -10px rgba(124, 58, 237, .6); }
.sh-lock svg { width: 36px; height: 36px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.sh-lock rect { fill: rgba(255, 255, 255, .25); }
.shackle { transition: transform .35s var(--ease); }
.share[data-s="link"] .shackle { transform: translateY(-1.5px); }
.sh-msg { margin: 16px auto 18px; max-width: 420px; color: var(--muted); font-size: 15.5px; min-height: 3.2em; }
.sh-field { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; border-radius: 18px; background: #f7f6fc; font-size: 15px; text-align: left; transition: opacity .3s, transform .3s var(--ease); }
.sh-field + .sh-field { margin-top: 10px; }
.sh-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.sh-url b { color: var(--ink); }
.sh-copy { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 13.5px; }
.sh-pass .dots { letter-spacing: .25em; font-weight: 800; color: var(--violet); padding-right: 8px; }
.share[data-s="private"] .sh-field { opacity: .3; filter: grayscale(1); }
.share[data-s="link"] .sh-pass { opacity: .3; filter: grayscale(1); }

/* 07 bộ game */
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.game-main { grid-column: 1 / -1; display: grid; grid-template-columns: 210px 1fr; gap: 24px; align-items: center; padding: 22px; transition: transform .3s var(--ease); }
.game-main:hover { transform: translateY(-3px); }
.gm-art { position: relative; aspect-ratio: 1; border-radius: 30px; background: radial-gradient(circle at 50% 40%, #fff 0, #ffe9dc 55%, #f4e9ff 100%); display: grid; place-items: center; }
.gm-art img { width: 82%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.iata { position: absolute; padding: 4px 10px; border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 800; color: var(--red); box-shadow: var(--sh-float); }
.i1 { left: -8px; top: 18px; } .i2 { right: -10px; top: 48%; } .i3 { left: 16px; bottom: -8px; }
.gm-txt { display: flex; flex-direction: column; gap: 8px; }
.gm-txt b { font-size: 24px; line-height: 1.2; }
.gm-txt small { color: var(--muted); font-size: 15px; }
.gm-go { margin-top: 6px; font-weight: 800; color: var(--coral); }
.game-soon { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 28px; }
.game-soon img { width: 60px; height: 60px; border-radius: 50%; filter: saturate(.8); }
.game-soon b { display: block; }
.game-soon small { color: var(--muted-2); font-size: 13.5px; }
.thread-end { display: block; height: 1px; }

/* ---------- Vào bằng mã ---------- */
.code-sec { position: relative; padding: 40px 0 70px; }
.code-card { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; padding: clamp(28px, 4.5vw, 72px); border-radius: var(--r-xl); position: relative; overflow: hidden; }
.code-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 80% at 100% 0%, rgba(255, 210, 190, .7), transparent 60%), radial-gradient(60% 80% at 0% 100%, rgba(226, 212, 255, .7), transparent 60%); }
.code-l h2 { margin-top: 16px; font-size: clamp(32px, 3.2vw, 52px); }
.code-l .sub { margin-left: 0; }
.steps3 { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.steps3 li { display: flex; align-items: center; gap: 14px; font-size: 17px; }
.steps3 b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #fff; color: var(--red); box-shadow: var(--sh-float); flex: none; }
.code-r { display: grid; gap: 16px; }
.code-box { padding: 28px; border-radius: 32px; background: #fff; box-shadow: var(--sh-float); text-align: center; }
.code-box > p { font-weight: 800; font-size: 20px; }
.digits { margin: 18px 0 16px; display: flex; justify-content: center; gap: 8px; align-items: center; }
.digits span { display: grid; place-items: center; width: clamp(40px, 3.6vw, 56px); height: clamp(52px, 4.6vw, 68px); border-radius: 16px; background: #f6f4fd; font-size: clamp(24px, 2.2vw, 32px); font-weight: 800; box-shadow: inset 0 0 0 2px rgba(124, 58, 237, .12); transition: box-shadow .2s, background .2s; }
.digits span.f { background: #fff; box-shadow: inset 0 0 0 2px rgba(255, 91, 69, .6); color: var(--ink); }
.digits i { width: 10px; height: 3px; border-radius: 2px; background: #d6d3e6; }
.name-f { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-radius: 16px; background: #f6f4fd; font-size: 15.5px; }
.name-f .lbl { color: var(--muted); }
.name-f .val { font-weight: 800; min-height: 1.4em; }

/* ---------- Gói ---------- */
.plans { padding: 70px 0; }
.center { text-align: center; }
.plan-grid { margin: 48px auto 0; max-width: 980px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.plan { padding: 34px; display: flex; flex-direction: column; }
.pl-name { font-weight: 700; color: var(--violet); }
.pl-price { margin-top: 10px; font-size: clamp(28px, 2.4vw, 36px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.pl-sub { margin-top: 4px; color: var(--muted); }
.plan .ticks { margin: 24px 0 28px; flex: 1; }
.plan-alt { background: rgba(255, 255, 255, .55); }

/* ---------- CTA cuối ---------- */
.final { padding: 40px 0 90px; }
.final-card { position: relative; text-align: center; padding: clamp(48px, 6vw, 88px) 24px; overflow: hidden; color: #fff;
  background: radial-gradient(70% 120% at 0% 0%, rgba(124, 92, 214, .55) 0, transparent 60%), radial-gradient(70% 120% at 100% 100%, rgba(214, 120, 64, .45) 0, transparent 60%), linear-gradient(135deg, #3a2a5e, #8a2f4c 60%, #a8404a); box-shadow: 0 30px 70px -40px rgba(80, 30, 60, .45); }
.final-card h2 { margin: 0 auto; max-width: 820px; color: #fff; }
.final-card p { margin-top: 14px; font-size: 18px; opacity: .92; }
.final-card .ctas { margin-top: 30px; }
.final-card .btn-main { background: #fff; color: var(--red); box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .35); }
.final-card .btn-white { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); }
.fc-bird { width: 110px; height: 110px; margin: 0 auto 18px; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255, 255, 255, .25); }
@media (prefers-reduced-motion: no-preference) { .fc-bird { animation: bob2 5s ease-in-out infinite; } }
@keyframes bob2 { 50% { translate: 0 -8px; rotate: -3deg; } }

/* ---------- Footer ---------- */
.foot { padding: 30px 0 34px; background: rgba(255, 255, 255, .55); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 -1px 0 rgba(20, 51, 82, .06); }
.foot-in { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding: 20px 0 30px; }
.foot-brand img { width: 192px; height: 72px; }
.foot-brand p { margin-top: 10px; color: var(--muted); max-width: 340px; font-size: 15px; }
.foot-col { display: flex; flex-direction: column; gap: 0; }
.foot-col b { margin-bottom: 6px; }
.foot-col a { color: var(--muted); padding: 10px 0; min-height: 44px; display: flex; align-items: center; font-size: 15px; touch-action: manipulation; }
.foot-col a:hover { color: var(--red); }
.foot-bot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid rgba(20, 51, 82, .08); color: var(--muted-2); font-size: 14px; }

/* ---------- Hiện dần ---------- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; } .d2 { transition-delay: .16s; } .d3 { transition-delay: .24s; } .d4 { transition-delay: .32s; }
.no-js .rv { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .tv, .pl-screen, .pl-home, .bar b { transition: none; }
  .caret { animation: none; }
}

/* ---------- Đáp ứng ---------- */
@media (max-width: 1080px) {
  .thread { display: none; }
  .step:not(.rev) .node, .step.rev .node { left: 0; }
  .links { display: none; }
  .nav-cta { margin-left: auto; }
  .step { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 70px 0; }
  .step.rev .s-text, .step.rev .s-vis { order: 0; }
  .s-text { padding-top: 0; padding-left: 68px; }
  .code-card { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .wrap { width: min(var(--wrap), 100% - 32px); }
  .nav { padding: 8px 0; }
  .nav-in { gap: 10px; width: calc(100% - 24px); }
  .brand img { width: 192px; height: 48px; }
  .nav-cta { gap: 6px; }
  .nav-cta .btn-sm { padding: 8px 13px; font-size: 14px; }
  .hide-sm { display: none; }
  .hero { padding-top: 24px; }
  .hero h1 { font-size: clamp(36px, 10.4vw, 52px); }
  .lead { font-size: 16.5px; }
  .ctas { width: 100%; flex-direction: column; }
  .ctas .btn { width: 100%; }
  .trust li { font-size: 13px; }
  .stage-wrap { width: calc(100% - 20px); margin-top: 40px; }
  .stage { aspect-ratio: 10 / 11; }
  .screen { left: 0; top: 13%; width: 100%; border-radius: 4.5cqw; }
  .screen-bar { font-size: 2.6cqw; padding: 2cqw 3.2cqw; }
  .dots i { width: 1.8cqw; height: 1.8cqw; }
  .screen-body { padding: 3.6cqw 4cqw 3cqw; }
  .ring { width: 9cqw; height: 9cqw; } .ring b { font-size: 3.4cqw; }
  .q { font-size: 5cqw; }
  .q-ans { gap: 2.2cqw; } .qa { font-size: 3.6cqw; padding: 2.4cqw 2.6cqw; border-radius: 2.8cqw; } .qa i { width: 5cqw; height: 5cqw; font-size: 2.6cqw; border-radius: 1.6cqw; }
  .screen-foot { font-size: 2.6cqw; margin-top: 2.4cqw; }
  .phone { right: -1%; top: auto; bottom: 0; width: 34%; border-radius: 6cqw; padding: 1.2cqw; }
  .ph-notch { top: 2.4cqw; width: 9cqw; height: 2.2cqw; }
  .ph-screen { border-radius: 5cqw; padding: 7cqw 2.2cqw 2.2cqw; gap: 1.5cqw; }
  .ph-top { font-size: 2.2cqw; } .av { width: 4cqw; height: 4cqw; font-size: 1.6cqw; }
  .ph-q { font-size: 2.6cqw; } .pb { font-size: 2.5cqw; padding: 1.9cqw; border-radius: 2cqw; }
  .phone { aspect-ratio: 9 / 15; }
  .float { border-radius: 4cqw; }
  .f-ok { left: 0; top: 0; padding: 2cqw 3cqw 2cqw 2cqw; gap: 2cqw; }
  .f-ok b { font-size: 3.6cqw; } .f-ok small { font-size: 2.6cqw; } .tick { width: 7cqw; height: 7cqw; font-size: 3.6cqw; }
  .f-wheel { right: 0; top: -1%; font-size: 3cqw; padding: 1.6cqw 3cqw 1.6cqw 1.6cqw; gap: 2cqw; }
  .f-wheel .wheel { width: 9cqw; height: 9cqw; }
  .f-board { left: 0; bottom: 0; width: 58cqw; padding: 2.6cqw 3cqw; }
  .fb-h { font-size: 3.4cqw; } .fb-h span { font-size: 2.3cqw; padding: .4cqw 1.6cqw; }
  .f-board ol { gap: 1.2cqw; margin-top: 1.8cqw; } .f-board li { font-size: 3cqw; gap: 2cqw; } .f-board i { width: 4.6cqw; height: 4.6cqw; font-size: 2.3cqw; }
  .f-box { display: none; }
  .bridge { font-size: 14px; margin-top: 4px; border-radius: 22px; }
  .journey { padding-top: 80px; }
  .s-text { padding-left: 0; padding-top: 64px; }
  .step { padding: 56px 0; }
  .editor, .board, .tpl, .share { padding: 18px; }
  .ed-row { grid-template-columns: 28px 1fr 1fr; gap: 8px; }
  .no { width: 26px; height: 26px; font-size: 12.5px; }
  .cell { padding: 10px 12px; font-size: 14.5px; border-radius: 13px; min-height: 46px; }
  .fs-saved { right: -4px; top: -18px; }
  .drift-card { padding: 10px 16px 10px 10px; gap: 10px; }
  .drift-card b { font-size: 14.5px; } .drift-card small { font-size: 12.5px; }
  .drift-card { transform: translate3d(var(--dx, 0), -50%, 0); }
  .dc-ic { width: 36px; height: 36px; font-size: 16px; border-radius: 12px; }
  .tpl-tabs button { padding: 8px 12px; font-size: 13.5px; }
  .tpl-view { height: 270px; }
  .tv { padding: 18px; }
  .tv-q { font-size: 18px; }
  .tv-grid4 span { padding: 13px 8px; font-size: 15px; }
  .tv-match { grid-template-columns: 1fr 26px 1fr; } .tv-match .l, .tv-match .r { padding: 11px 8px; font-size: 14px; }
  .tv-wheel svg { width: 170px; height: 170px; } .tv-wheel p { display: none; }
  .tv-box span { height: 84px; font-size: 22px; } .tv-box span.op { font-size: 15px; }
  .tv-ana span { width: 44px; height: 50px; font-size: 22px; }
  .tv-show { grid-template-columns: 1fr; } .ladder { display: none; } .tv-show .tv-q { text-align: center; }
  .tpl-foot { flex-direction: column; align-items: flex-start; }
  .play { height: 450px; }
  .thread .t-fg, .thread .t-bg, .thread .t-head { opacity: 0 !important; }
  .screen { aspect-ratio: 4 / 3; }
  .stage { aspect-ratio: 10 / 14; }
  .phone { top: 59%; bottom: auto; }
  .f-ok { top: 2%; }
  .pl-screen { width: 100%; padding: 16px 18px; }
  .pl-q { font-size: 18px; margin-bottom: 12px; } .pl-ans span { padding: 10px; font-size: 14.5px; }
  .mini-phone { width: 118px; }
  .mp-b { font-size: 15px; }
  .link-card { margin-bottom: 20px; padding: 12px 14px; } .link-card b { font-size: 18px; }
  .play[data-m="lop"] .pl-home { transform: translate(4%, 6%) scale(.86); }
  .bd-row { grid-template-columns: 28px 86px 1fr 44px; gap: 8px; font-size: 14.5px; }
  .board i { width: 26px; height: 26px; font-size: 12px; }
  .h { width: 27px; height: 27px; font-size: 12px; border-radius: 8px; }
  .paper-stack { height: 420px; }
  .p-back { transform: translateX(-50%) rotate(-5deg) translate(-12px, 8px); }
  .p-mid { transform: translateX(-50%) rotate(3deg) translate(12px, 4px); }
  .p-front { padding: 20px 18px 16px; } .pp-rows { font-size: 13.5px; }
  .fs-print { right: 0; top: auto; bottom: -26px; }
  .paper-stack { margin-bottom: 34px; }
  .seg-3 button { font-size: 13px; padding: 9px 4px; }
  .sh-body { padding: 20px 14px; }
  .sh-field { font-size: 13.5px; padding-left: 12px; }
  .sh-dom { display: none; }
  .games { grid-template-columns: 1fr; }
  .game-main { grid-template-columns: 1fr; padding: 18px; }
  .gm-art { max-width: 230px; margin: 6px auto 4px; width: 100%; }
  .gm-txt b { font-size: 21px; }
  .code-card { padding: 26px 18px; border-radius: 32px; }
  .code-box { padding: 22px 14px; }
  .digits { gap: 5px; } .digits i { width: 6px; }
  .plan-grid { grid-template-columns: 1fr; }
  .plan { padding: 26px 22px; }
  .final-card { border-radius: 32px; }
  .foot-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 359px) { .hide-xs { display: none; } }

/* ===== Thanh tab nổi ở đáy (điện thoại + máy tính bảng ≤1080px) ===== */
.tabbar { display: none; }
@media all {
  .tabbar { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60; max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch; gap: 2px; padding: 8px; border-radius: 28px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 0 0 1px rgba(255, 255, 255, .9), 0 14px 40px -12px rgba(20, 20, 40, .32); }
  .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; padding: 6px 2px; border-radius: 20px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 11px; white-space: nowrap; -webkit-tap-highlight-color: transparent; transition: color .2s, transform .15s; }
  .tab svg { width: 24px; height: 24px; }
  .tab:active { transform: scale(.94); }
  .tab:hover { color: var(--red); }
  body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* mobile/tablet: đã có menu dưới → ẩn nút trên header, logo ra giữa */
@media (max-width: 1080px) {
  .nav-cta { display: none; }
  .nav-in { justify-content: center; }
  .nav .brand { margin-inline: auto; }
}

/* Thư viện 12 mẫu trò chơi */
.tpl-gallery { position: relative; z-index: 2; margin-top: clamp(24px, 5vw, 56px); --c-ink: #143352; --c-surface: #fff; --c-primary: #ff6b2c; --c-primary-soft: #ffe6d8; --c-accent: #7c3aed; --c-accent-soft: #efe6ff; --c-ok: #16a34a; --c-bad: #e11d48; --opt-1: #ff6b2c; --opt-2: #8b5cf6; --opt-3: #f43f8e; --opt-4: #0fa89b; }
.tg-head { text-align: center; margin-bottom: 22px; }
.tg-head h3 { font-size: clamp(24px, 3vw, 36px); margin: 6px 0 0; letter-spacing: -.02em; }
.tg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tg-card { position: relative; overflow: hidden; display: grid; gap: 2px; padding: 12px 12px 16px; border-radius: 24px; background: var(--glass); box-shadow: var(--sh-glass); transition: transform .3s var(--ease); }
.tg-card:hover { transform: translateY(-4px); }
.tg-art { aspect-ratio: 4 / 3; border-radius: 16px; background: linear-gradient(135deg, #fff1e9, #f1ebff); display: grid; place-items: center; margin-bottom: 8px; overflow: hidden; position: relative; }
.tg-art svg { width: 86%; height: 86%; }
.tg-card b { font-size: 16.5px; padding-inline: 4px; }
.tg-card small { font-size: 13.5px; color: var(--muted); padding-inline: 4px; line-height: 1.4; }
@media (max-width: 900px) { .tg-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .tg-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .tg-card { padding: 8px 8px 12px; border-radius: 18px; } }

/* float menu gọn cho desktop (cả trang Lớp học và Game) */
@media (min-width:900px){
  .tabbar{left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:none;grid-template-columns:repeat(5,auto);gap:2px;padding:5px;border-radius:999px;bottom:16px}
  .tab{min-height:0;flex-direction:row;gap:7px;padding:9px 14px;border-radius:999px;font-size:13px}
  .tab svg{width:18px;height:18px}
  .tab-main{padding:9px 14px}
  main{padding-bottom:0}.foot{padding-bottom:72px}
}



/* Nút VI/EN (home/js/lang.js) — mobile/tablet: góc phải header, không đè logo */
.nav-in { position: relative; }
.nav .lang-btn { min-width: 44px; min-height: 44px; padding: 0 12px; font-weight: 800; flex: none; }
@media (max-width: 1080px) { .nav .lang-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); } }

/* đầu trang: ẩn thanh tab nổi (header + nút hero đã đủ), cuộn xuống mới hiện → không đè nội dung màn đầu */
body.tb-top .tabbar { opacity: 0; visibility: hidden; pointer-events: none; }
.tabbar { transition: opacity .25s, visibility 0s linear .25s; }
body:not(.tb-top) .tabbar { transition: opacity .25s; }

/* Menu gọn: mục con mở dạng thả xuống */
.links { align-items: center; }
.links .dd { position: relative; }
.links .dd summary { list-style: none; cursor: pointer; padding: 9px 11px; white-space: nowrap; border-radius: 999px; font-size: 15px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.links .dd summary::-webkit-details-marker { display: none; }
.links .dd summary::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.links .dd[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.links .dd summary:hover, .links .dd[open] summary { background: rgba(255, 255, 255, .7); }
.links .dd-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 70; min-width: 210px; padding: 8px; display: grid; gap: 2px; border-radius: 18px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(18px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .9), 0 18px 44px -14px rgba(20, 20, 40, .35); }
.links .dd-menu a { display: block; padding: 11px 14px; border-radius: 12px; min-height: 44px; }
.links .dd-menu a:hover { background: rgba(227, 30, 37, .08); }

/* Nút tài khoản (đã đăng nhập) — js/auth-nav.js */
.acct { position: relative; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 4px; border: 0; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink); font: 600 14px/1 inherit; cursor: pointer; box-shadow: 0 0 0 1px rgba(20,51,82,.08), 0 6px 16px -8px rgba(20,51,82,.25); touch-action: manipulation; }
.acct-btn:hover { background: #fff; }
.acct-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #e31e25; color: #fff; font-weight: 700; font-size: 15px; }
.acct-nm { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 8px; background: rgba(255,255,255,.97); backdrop-filter: blur(14px); border-radius: 16px; box-shadow: 0 18px 40px -12px rgba(20,51,82,.35), 0 0 0 1px rgba(20,51,82,.08); z-index: 60; display: flex; flex-direction: column; }
.acct-menu[hidden] { display: none; }
.acct-head { padding: 8px 12px 10px; border-bottom: 1px solid rgba(20,51,82,.08); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; }
.acct-head b { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-head small { color: #64748b; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu a, .acct-out { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 500 14px/1 inherit; text-decoration: none; text-align: left; cursor: pointer; }
.acct-menu a:hover, .acct-out:hover { background: rgba(20,51,82,.06); }
.acct-out { color: #b91c1c; border-top: 1px solid rgba(20,51,82,.08); border-radius: 0 0 10px 10px; margin-top: 4px; }
@media (max-width: 480px) { .acct-nm { display: none; } .acct-btn { padding-right: 4px; } .acct-menu { right: -4px; min-width: min(240px, 86vw); } }

/* Gọn (03/11): nút tài khoản chỉ là icon tròn chữ cái; nhãn ngôn ngữ nhỏ, không viền */
.acct-btn { padding: 0; gap: 0; width: 44px; height: 44px; justify-content: center; background: transparent; box-shadow: none; }
.acct-btn:hover { background: rgba(20,51,82,.06); }
.acct-nm { display: none; }
.acct-av { width: 36px; height: 36px; }
.nav .lang-btn { min-width: 44px !important; padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; color: var(--muted, #64748b) !important; font-size: 13px; font-weight: 700 !important; letter-spacing: .04em; }
.nav .lang-btn:hover { color: var(--ink); background: rgba(20,51,82,.06) !important; }

/* Footer thông tin công ty (03/11) */
.foot-brand p { line-height: 1.6; }
.foot-brand p b { color: var(--ink); }
.foot-bot a { color: inherit; padding: 12px 4px; display: inline-block; }
.foot-bot a:hover { color: var(--red); }
