:root {
  --bg: #141c12; --bg-2: #1a2417; --bg-3: #243220; --line: #33432d; --line-2: #4a5a42;
  --butter: #f7e08a; --butter-2: #fff3b8; --ink: #f3ead0; --soft: #d8d2b4; --muted: #aab39b;
  --err: #ffb4a6; --ok: #c9f2b8;
  --serif: "Playfair Display", Georgia, serif; --script: "Dancing Script", cursive;
  --sans: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); overflow-x: hidden; }
a { color: var(--butter); text-decoration: none; }
a:hover { color: var(--butter-2); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--butter); outline-offset: 2px; }

.glow { position: absolute; border-radius: 50%; pointer-events: none; }
.glow.a { top: -220px; right: -160px; width: 640px; height: 640px; background: radial-gradient(circle, #2f4a2a 0%, rgba(20,28,18,0) 68%); }
.glow.b { top: 620px; left: -240px; width: 640px; height: 640px; background: radial-gradient(circle, #26381f 0%, rgba(20,28,18,0) 68%); }
.page { position: relative; max-width: 1440px; margin: 0 auto; overflow: hidden; }

.top { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 64px; border-bottom: 1px solid #2e3b29; }
.brand { display: flex; align-items: center; gap: 18px; }
.logo { width: 84px; height: 84px; flex: none; border-radius: 18px; background: #f6f0dc; padding: 8px; display: flex; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.brand h2 { margin: 0 0 4px; font: 600 21px/1.2 var(--serif); letter-spacing: .06em; color: var(--butter); }
.brand p { margin: 0; font-size: 12.5px; letter-spacing: .14em; color: var(--soft); }
.nav { display: flex; flex-wrap: wrap; gap: 32px; }
.nav a { color: #e9e1c6; font-size: 14px; }
.nav a:hover { color: var(--butter); }

.hero { position: relative; display: flex; flex-wrap: wrap; gap: 64px; align-items: center; padding: 88px 64px 96px; }
.intro { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.eyebrow { margin: 0; font-size: 13px; letter-spacing: .28em; color: var(--soft); text-transform: uppercase; }
.intro h1 { margin: 0; font-weight: 500; line-height: 1.02; }
.intro h1 .s { display: block; font: 600 92px/1 var(--script); color: var(--butter); }
.intro h1 .t { display: block; margin-top: 6px; font: italic 500 64px/1.05 var(--serif); }
.lead { margin: 0; max-width: 520px; font-size: 18px; line-height: 1.65; color: #e0dac0; }
.tags { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { border: 1px solid var(--butter); color: var(--butter); border-radius: 999px; padding: 8px 18px; font-size: 14px; }

.card { flex: 1 1 420px; min-width: 0; max-width: 540px; background: linear-gradient(180deg, var(--bg-3), #1b2618); border: 1px solid #3c4d35; border-radius: 24px; padding: 36px; box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.card h3 { margin: 0; font: 500 28px/1.2 var(--serif); color: var(--butter); }
.card .sub { margin: 6px 0 20px; font-size: 14px; color: var(--soft); }
form { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.row .field { flex: 1 1 150px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field span { font-size: 13px; color: var(--soft); letter-spacing: .04em; }
.field input { height: 48px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); border-radius: 10px; padding: 0 14px; font: inherit; font-size: 15px; width: 100%; }
.field input:focus { outline: 2px solid var(--butter); outline-offset: 1px; border-color: var(--butter); }
.field input::placeholder { color: #8f9a82; }
.field input.invalid { border-color: var(--err); }
.field em { font-style: normal; font-size: 13px; color: var(--err); min-height: 0; }
.formerr { margin: 0; color: var(--err); font-size: 14px; }
.formerr:empty { display: none; }
button.main, button.ghost { height: 52px; border-radius: 999px; font: 600 16px var(--sans); cursor: pointer; padding: 0 28px; }
button.main { border: 0; background: var(--butter); color: #1a2417; }
button.main:hover:not(:disabled) { background: var(--butter-2); }
button.main:disabled { opacity: .6; cursor: wait; }
button.ghost { border: 1px solid var(--line-2); background: transparent; color: var(--ink); }
button.ghost:hover { border-color: var(--butter); color: var(--butter); }
.note { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.notice { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; border: 1px solid #6b5a2a; background: #3a3217; color: #ffe08a; font-size: 14px; }

.state { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 0; }
.state h2 { margin: 0; font: 500 26px var(--serif); color: var(--butter); }
.state p { margin: 0; color: var(--soft); }
.state .code { font: 600 22px var(--sans); letter-spacing: .08em; color: var(--ink); }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--butter); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

section.band { position: relative; padding: 24px 64px 88px; }
section.band h2 { margin: 0 0 36px; font: 500 44px/1.1 var(--serif); }
section.band h2 em { font: 600 54px var(--script); color: var(--butter); font-style: normal; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.step { padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg-2); display: flex; flex-direction: column; gap: 12px; }
.step b { font: 500 44px/1 var(--serif); color: var(--butter); }
.step h3 { margin: 0; font-size: 19px; }
.step p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--soft); }
.gifts { position: relative; padding: 0 64px 96px; }
.gifts > div { border-radius: 28px; background: #1f2b1b; border: 1px solid var(--line); padding: 56px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.gifts .txt { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.gifts h2 { margin: 0; font: 500 44px/1.1 var(--serif); color: var(--butter); }
.gifts p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--soft); }
.gifts ul { flex: 2 1 480px; min-width: 0; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; }
.gifts li { aspect-ratio: 1 / 1.1; border-radius: 18px; border: 1px solid #3c4d35; background: var(--bg); display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 20px; font-size: 15px; }
.gifts li small { color: var(--muted); font-size: 13px; }
footer { position: relative; border-top: 1px solid #2e3b29; padding: 32px 64px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 13px; color: var(--muted); }

@media (max-width: 760px) {
  .top, .hero, section.band, .gifts, footer { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 48px; padding-bottom: 56px; gap: 40px; }
  .intro h1 .s { font-size: 64px; } .intro h1 .t { font-size: 40px; }
  .card { padding: 24px; }
  .gifts > div { padding: 28px; }
  section.band h2, .gifts h2 { font-size: 34px; }
  .nav { gap: 20px; }
}

/* ---- vừa khung màn hình ---- */
.top { padding: clamp(14px, 2.4vh, 28px) clamp(20px, 4.4vw, 64px); }
.logo { width: clamp(60px, 9vh, 84px); height: clamp(60px, 9vh, 84px); border-radius: 16px; padding: 7px; }
.brand h2 { font-size: clamp(16px, 1.5vw, 21px); }
.brand p { font-size: clamp(10.5px, .9vw, 12.5px); }
.hero { min-height: calc(100vh - clamp(90px, 14vh, 140px)); min-height: calc(100svh - clamp(90px, 14vh, 140px));
  padding: clamp(24px, 5vh, 72px) clamp(20px, 4.4vw, 64px); gap: clamp(28px, 4vw, 64px); }
.intro { gap: clamp(14px, 2.6vh, 28px); }
.intro h1 .s { font-size: clamp(54px, min(7vw, 12vh), 92px); }
.intro h1 .t { font-size: clamp(32px, min(4.2vw, 7.4vh), 64px); }
.lead { font-size: clamp(15px, 1.25vw, 18px); line-height: 1.6; }
.card { padding: clamp(20px, 3.4vh, 36px) clamp(20px, 2.4vw, 36px); max-height: none; }
.card h3 { font-size: clamp(22px, 2vw, 28px); }
.card .sub { margin: 4px 0 clamp(8px, 1.6vh, 16px); }
form { gap: clamp(10px, 1.7vh, 18px); }
.field { gap: 6px; }
.field input { height: clamp(42px, 5.6vh, 48px); }
button.main { height: clamp(44px, 6vh, 52px); }
.note { font-size: 12px; }
section.band { padding-left: clamp(20px, 4.4vw, 64px); padding-right: clamp(20px, 4.4vw, 64px); }
.gifts { padding-left: clamp(20px, 4.4vw, 64px); padding-right: clamp(20px, 4.4vw, 64px); }
footer { padding-left: clamp(20px, 4.4vw, 64px); padding-right: clamp(20px, 4.4vw, 64px); }
.card, .intro { min-width: 0; }
@media (max-height: 720px) and (min-width: 900px) {
  .eyebrow { font-size: 11.5px; }
  .tags li { padding: 5px 14px; font-size: 13px; }
  .note { display: none; }
}
@media (max-width: 899px) { .hero { min-height: 0; } .card { max-width: none; } }

/* ---- khít khung: chiều cao header đo bằng JS (--hh) ---- */
.hero { min-height: calc(100vh - var(--hh, 110px)); min-height: calc(100svh - var(--hh, 110px)); align-items: center; align-content: center; }

/* iPad dọc và màn hình trung bình: xếp dọc, căn giữa, vẫn vừa khung */
@media (max-width: 899px) {
  .hero { flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: center; gap: clamp(20px, 3.5vh, 40px); padding-top: clamp(20px, 4vh, 48px); padding-bottom: clamp(20px, 4vh, 48px); }
  .intro { flex: 0 0 auto; align-items: flex-start; }
  .card { flex: 0 0 auto; width: 100%; max-width: 640px; align-self: center; }
  .intro h1 .s { font-size: clamp(56px, 11vw, 84px); }
  .intro h1 .t { font-size: clamp(32px, 6.4vw, 52px); }
  .lead { max-width: 600px; font-size: clamp(15px, 2.2vw, 18px); }
  .field input { font-size: 16px; }
}

/* iPad ngang / laptop nhỏ */
@media (min-width: 900px) and (max-width: 1100px) {
  .hero { gap: 32px; }
  .intro h1 .s { font-size: clamp(54px, 8vw, 80px); }
  .intro h1 .t { font-size: clamp(32px, 4.6vw, 48px); }
  .card { flex-basis: 400px; }
}

/* điện thoại */
@media (max-width: 600px) {
  .top { padding: 12px 16px; gap: 10px; }
  .logo { width: 52px; height: 52px; border-radius: 12px; padding: 5px; }
  .brand { gap: 12px; min-width: 0; }
  .brand h2 { font-size: 14px; letter-spacing: .04em; }
  .brand p { font-size: 9.5px; letter-spacing: .08em; line-height: 1.35; }
  .nav { display: none; }
  .hero { padding: 24px 16px 32px; gap: 24px; justify-content: flex-start; }
  .intro { gap: 14px; }
  .intro h1 .s { font-size: 56px; }
  .intro h1 .t { font-size: 32px; }
  .lead { font-size: 15px; line-height: 1.55; }
  .tags li { padding: 5px 12px; font-size: 13px; }
  .card { padding: 20px 16px; border-radius: 20px; max-width: none; }
  .card h3 { font-size: 24px; }
  .field input { height: 48px; font-size: 16px; }
  button.main, button.ghost { height: 50px; width: 100%; }
  .note { display: block; }
  section.band { padding: 8px 16px 48px; }
  section.band h2 { font-size: 30px; margin-bottom: 20px; }
  section.band h2 em { font-size: 38px; }
  .step { padding: 22px; }
  .gifts { padding: 0 16px 56px; }
  .gifts > div { padding: 24px 18px; gap: 24px; }
  .gifts h2 { font-size: 30px; }
  footer { padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); font-size: 12px; }
}

/* điện thoại xoay ngang / màn hình rất thấp: không ép vừa khung */
@media (max-height: 520px) { .hero { min-height: 0; } }

/* ---- tinh chỉnh vòng 2 ---- */
@media (max-width: 899px) { .nav { display: none; } .top { padding-top: 14px; padding-bottom: 14px; } .hero { padding-top: 20px; padding-bottom: 20px; gap: 20px; } .card { padding: 24px 28px; } }
@media (max-width: 600px) {
  .hero { padding: 16px 16px 28px; gap: 16px; }
  .intro { gap: 8px; }
  .intro h1 .s { font-size: 46px; }
  .intro h1 .t { font-size: 26px; margin-top: 2px; }
  .lead { display: none; }
  .tags { gap: 8px; }
  .card { padding: 18px 16px; }
  .card h3 { font-size: 22px; }
  form { gap: 12px; }
  .field { gap: 4px; }
  .field input { height: 46px; padding: 0 12px; }
  .row { gap: 12px; flex-wrap: nowrap; }
  .row .field { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 600px) and (max-height: 760px) { .note, .card .sub { display: none; } }

/* thứ tự mới: ĐHQG ở trên, Trường ĐH Quốc Tế ở dưới */
.brand p { margin: 0 0 4px; }
.brand h2 { margin: 0; }

/* logo đứng riêng, không có khung chữ nhật */
.logo { background: none !important; padding: 0 !important; border-radius: 0 !important; }

/* ---- bố cục mới: Cách tham gia > Gửi bài > Quà > Cảm ơn ---- */
.sh { margin: 0; font: 500 clamp(26px, 3vw, 38px)/1.15 var(--serif); }
.sh em { font: 600 1.25em var(--script); color: var(--butter); font-style: normal; }
.sh.big { font-size: clamp(36px, 5vw, 60px); }
.stepcol { flex: 1 1 420px; min-width: 0; max-width: 560px; display: flex; flex-direction: column; gap: clamp(10px, 1.8vh, 16px); }
.stepitem { display: flex; gap: 18px; align-items: flex-start; padding: clamp(12px, 2.2vh, 22px) 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); }
.stepitem b { flex: none; min-width: 46px; font: 500 clamp(28px, 4.4vh, 40px)/1 var(--serif); color: var(--butter); }
.stepitem h3 { margin: 0 0 4px; font-size: clamp(16px, 1.5vw, 18px); }
.stepitem p { margin: 0; font-size: clamp(13.5px, 1.2vw, 15px); line-height: 1.55; color: var(--soft); }
.godown { align-self: flex-start; display: inline-flex; gap: 8px; align-items: center; margin-top: 4px; height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--butter); color: var(--butter); font-weight: 600; font-size: 15px; }
.godown:hover { background: var(--butter); color: #1a2417; }
.formsec { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 64px); align-items: center; justify-content: center; padding: clamp(28px, 6vh, 72px) clamp(20px, 4.4vw, 64px); border-top: 1px solid #2e3b29; scroll-margin-top: 0; }
.ftxt { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: clamp(12px, 2.2vh, 22px); }
.formsec .lead { max-width: 480px; }
.thanks { position: relative; text-align: center; padding: clamp(64px, 12vh, 140px) clamp(20px, 4.4vw, 64px); border-top: 1px solid #2e3b29; display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 2.4vh, 24px); }
.thanks .script { margin: 0; font: 600 clamp(52px, 8vw, 96px)/1 var(--script); color: var(--butter); }
.thanks .warm { margin: 0; max-width: 680px; font: italic 500 clamp(18px, 2vw, 26px)/1.6 var(--serif); color: var(--ink); }
.thanks .sign { margin: 0; font-size: clamp(13px, 1.2vw, 15px); letter-spacing: .06em; color: var(--soft); }
.gifts { padding-top: clamp(32px, 8vh, 80px); }
@media (max-width: 899px) {
  .stepcol { flex: 0 0 auto; width: 100%; max-width: 640px; align-self: center; }
  .formsec { flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: center; }
  .ftxt { flex: 0 0 auto; }
  .formsec .card { align-self: center; }
}
@media (max-width: 600px) {
  .lead { display: block; font-size: 14px; }
  .stepitem { padding: 10px 14px; gap: 12px; }
  .stepitem b { min-width: 34px; font-size: 26px; }
  .stepitem p { font-size: 13px; }
  .sh { font-size: 24px; }
  .formsec { min-height: 0; padding: 32px 16px 40px; }
  .godown { width: 100%; justify-content: center; }
}
@media (max-width: 600px) and (max-height: 760px) { .intro .lead { display: none; } .stepitem p { display: none; } }
@media (min-width: 900px) and (max-height: 700px) {
  .stepitem { padding: 9px 18px; }
  .stepitem p { font-size: 13px; line-height: 1.45; }
  .sh { font-size: 26px; }
  .godown { height: 40px; margin-top: 0; }
  .hero { padding-top: 16px; padding-bottom: 16px; }
}

/* ===== Hiệu ứng: lá/hoa bay, chữ xuất hiện, nhấp chuột ===== */
.fxcanvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.fx .rv { opacity: 0; transform: translateY(22px); filter: blur(4px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1), filter .9s ease; }
.fx .rv.in { opacity: 1; transform: none; filter: none; }
.fx .intro h1 .s { display: inline-block; }
.ripple { position: fixed; z-index: 6; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid var(--butter, #f7e08a); pointer-events: none; animation: rip .8s ease-out forwards; }
@keyframes rip { from { transform: scale(1); opacity: .8; } to { transform: scale(9); opacity: 0; } }
button, .godown, .nav a { transition: transform .25s ease, box-shadow .25s ease, color .25s ease, background-color .25s ease; }
button.pop, .godown.pop, .nav a.pop { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(.94); } 100% { transform: scale(1); } }
.main:hover, .godown:hover { box-shadow: 0 10px 30px rgba(247,224,138,.22); transform: translateY(-2px); }
.nav a { position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--butter, #f7e08a); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.nav a:hover::after { transform: scaleX(1); }
.stepitem { transition: transform .3s ease, border-color .3s ease, opacity .9s ease, filter .9s ease; }
.stepitem:hover { transform: translateX(6px); border-color: var(--butter, #f7e08a); }
.intro h1 .t { background: linear-gradient(100deg, currentColor 40%, #fff3b8 50%, currentColor 60%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; animation: sheen 7s ease-in-out 1.5s infinite; }
@keyframes sheen { 0%, 60% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .fxcanvas, .ripple { display: none; } .intro h1 .t { animation: none; } }
.intro h1 .t { -webkit-text-fill-color: transparent; }

/* ===== Vòng 3: chuyên nghiệp hơn ===== */
.page { overflow: hidden; overflow: clip; }
.top { position: sticky; top: 0; z-index: 30; background: rgba(20,28,18,.55); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); transition: background-color .35s ease, box-shadow .35s ease; }
.top.scrolled { background: rgba(20,28,18,.88); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.formsec { scroll-margin-top: var(--hh, 90px); min-height: calc(100svh - var(--hh, 90px)); }
.thanks, .gifts, .hero { scroll-margin-top: var(--hh, 90px); }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, #7da35f, #f7e08a, #fff3b8); pointer-events: none; }

.nav a.active { color: var(--butter); }
.nav a.active::after { transform: scaleX(1); }

/* chữ tiêu đề hiện từng ký tự */
.intro h1 .s .ch { display: inline-block; }
.fx .intro h1 .s .ch { animation: chIn .9s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
@keyframes chIn { from { opacity: 0; transform: translateY(.45em) rotate(6deg); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }

/* ô hạn mức quà */
.quota { max-width: 520px; padding: 16px 20px; border-radius: 16px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(36,50,32,.85), rgba(27,38,24,.85)); display: flex; flex-direction: column; gap: 12px; }
.qtop { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; align-items: baseline; }
.qlabel { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.qnum b { font: 600 30px/1 var(--serif); color: var(--butter); font-variant-numeric: tabular-nums; }
.qnum small { color: var(--soft); font-size: 13px; }
.quota .meter { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.quota .mfill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #7da35f, #f7e08a); transition: width 1.4s cubic-bezier(.2,.7,.2,1); position: relative; overflow: hidden; }
.quota .mfill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-100%); animation: shine 3.2s ease-in-out 1.6s infinite; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.quota.low { border-color: #8a6b2a; }
.quota.low .qnum b { color: #ffb4a6; }

/* bước có thể bấm */
a.stepitem { color: inherit; text-decoration: none; cursor: pointer; }
a.stepitem:hover h3 { color: var(--butter); }
.stepitem .go { display: inline-block; margin-left: 4px; color: var(--butter); transition: transform .3s ease; }
a.stepitem:hover .go { transform: translate(3px, -3px); }
#step1:hover .go { transform: translate(3px, -3px); }
a.stepitem[href="#nop"]:hover .go { transform: translateY(3px); }
.stepitem, .card, .gifts li, .quota { background-image: radial-gradient(380px circle at var(--mx, -200px) var(--my, -200px), rgba(247,224,138,.11), transparent 65%); }
.stepitem { background-color: var(--bg-2); }
.card { background-color: #1f2b1b; background-image: radial-gradient(520px circle at var(--mx, -200px) var(--my, -200px), rgba(247,224,138,.10), transparent 60%), linear-gradient(180deg, var(--bg-3), #1b2618); }

/* nút chính: ánh sáng chạy qua */
button.main { position: relative; overflow: hidden; }
button.main::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); transform: translateX(-120%); transition: transform .8s ease; }
button.main:hover:not(:disabled)::after { transform: translateX(120%); }
.magnetic { translate: var(--tx, 0) var(--ty, 0); }

/* biểu mẫu: tiêu điểm mềm hơn */
.field input { transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease; }
.field input:focus { outline: none; box-shadow: 0 0 0 3px rgba(247,224,138,.25); }
.field input.invalid { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.notice.soft { border-color: #4a5a42; background: #243220; color: var(--soft); line-height: 1.6; }
form.is-closed { opacity: .5; pointer-events: none; }

/* trạng thái thành công */
#done svg circle { transform-origin: center; animation: popIn .7s cubic-bezier(.2,1.4,.3,1) both; }
#done svg path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s ease .45s forwards; }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
#done .code { padding: 8px 18px; border: 1px dashed var(--butter); border-radius: 12px; background: rgba(247,224,138,.08); }

.gifts li { transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .3s ease; }
.gifts li:hover { transform: translateY(-6px); border-color: var(--butter); }
::selection { background: rgba(247,224,138,.35); }

@media (max-width: 899px) { .top { position: sticky; } }
@media (prefers-reduced-motion: reduce) {
  .progress { display: none; }
  .quota .mfill::after, #done svg circle, #done svg path, .fx .intro h1 .s .ch { animation: none; }
  #done svg path { stroke-dashoffset: 0; }
}

/* ===== Ảnh nền các mục ===== */
.hero, .thanks, .gifts > div { isolation: isolate; }
.hero::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: min(50%, 700px); z-index: -1; pointer-events: none;
  background: url(/img/hero.jpg) center / cover no-repeat; opacity: .32;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%), linear-gradient(180deg, #000 75%, transparent 100%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0%, #000 55%), linear-gradient(180deg, #000 75%, transparent 100%); mask-composite: intersect;
  animation: kb 26s ease-in-out infinite alternate; }
.gifts > div { position: relative; overflow: hidden; }
.gifts > div::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url(/img/gifts.jpg) center / cover no-repeat; opacity: .28; animation: kb 28s ease-in-out infinite alternate; }
.gifts > div::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, #1f2b1b 12%, rgba(31,43,27,.55) 60%, rgba(31,43,27,.35)); }
.thanks::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url(/img/thanks.jpg) center / cover no-repeat; opacity: .26; animation: kb 30s ease-in-out infinite alternate; }
.thanks::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(20,28,18,.35), var(--bg) 85%), linear-gradient(180deg, var(--bg), transparent 25%, transparent 75%, var(--bg)); }
.thanks { overflow: hidden; }
.thanks .warm, .thanks .sign { text-shadow: 0 2px 18px rgba(20,28,18,.9); }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.08); } }
@media (max-width: 899px) { .hero::before { width: 100%; opacity: .16; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); } }
@media (prefers-reduced-motion: reduce) { .hero::before, .gifts > div::before, .thanks::before { animation: none; } }

/* ô thông báo quà có giới hạn (không công bố số lượng) */
.quota { flex-direction: row; align-items: center; gap: 12px; width: fit-content; max-width: 100%; padding: 10px 18px; border-radius: 999px; }
.quota .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--butter); box-shadow: 0 0 0 0 rgba(247,224,138,.6); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(247,224,138,0); } 100% { box-shadow: 0 0 0 0 rgba(247,224,138,0); } }
.quota .qlabel { color: var(--butter-2); }
@media (prefers-reduced-motion: reduce) { .quota .dot { animation: none; } }

/* ví dụ bài đăng */
.example { margin: 20px 0 0; max-width: 420px; }
.example img { display: block; width: 100%; height: auto; max-height: 52vh; object-fit: contain; object-position: left top; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); }
.example figcaption { margin-top: 8px; font-size: 13px; color: var(--soft); }
@media (max-width: 600px) { .example { max-width: none; } .example img { max-height: 46vh; } }
