/* 360 CONNECT • MINIGAME DAY — giao diện khách */
:root {
  --cream: #fff9ed;
  --paper: #fffdf6;
  --ink: #1d4420;
  --green: #55783d;
  --green-2: #2f6b2a;
  --leaf: #e9f0d8;
  --orange: #f68629;
  --orange-hot: #f05a16;
  --orange-deep: #b8410e;
  --red: #8f1d24;
  --line: #d7ddc7;
  --muted: #5d6656;
  --error: #c0261b;
  --f-display: "Fira Sans Extra Condensed", "Arial Narrow", Arial, sans-serif;
  --f-body: "Be Vietnam Pro", "Segoe UI", Arial, sans-serif;
  --f-script: "Sriracha", "Segoe Script", cursive;
  --shadow: 0 10px 30px rgba(37, 72, 33, .12);
  --topbar-h: 76px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--cream); color: var(--ink);
  font: 15px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.demo-ribbon {
  position: fixed; z-index: 90; right: 6px; bottom: 6px;
  background: #1d4420; color: #fff; font-size: 10px; letter-spacing: .5px; padding: 3px 10px; border-radius: 99px; opacity: .7; pointer-events: none;
}

/* ---------- Brand bits ---------- */
.event-tag { font-family: var(--f-display); font-weight: 800; font-size: 24px; letter-spacing: .3px; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.event-tag b { color: #e2381d; font-weight: 800; }
.event-tag i { font-style: normal; color: var(--ink); font-size: .8em; }
.event-tag span { color: var(--ink); }
.t-orange { color: var(--orange-hot); }
.t-green { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn-cta {
  --h: 64px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: var(--h); padding: 0 44px; border-radius: 999px;
  border: 3px solid #c2410c;
  background: linear-gradient(180deg, #ff9a3c 0%, #f9701f 45%, #ea4f12 100%);
  color: #fff; font-family: var(--f-display); font-weight: 800; font-size: 32px; letter-spacing: .6px;
  text-shadow: 0 2px 0 rgba(150, 45, 5, .55);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), inset 0 -4px 0 rgba(150, 45, 5, .25), 0 6px 0 #a83a0c, 0 12px 24px rgba(190, 70, 15, .35);
  transition: transform .12s ease, box-shadow .12s ease, filter .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-cta svg { width: 30px; height: 30px; flex: none; }
.btn-cta .lbl, .btn-cta { white-space: nowrap; }
.btn-cta:hover { filter: brightness(1.06) saturate(1.05); }
.btn-cta:active { transform: translateY(4px); box-shadow: inset 0 3px 0 rgba(255,255,255,.4), 0 2px 0 #a83a0c, 0 6px 12px rgba(190,70,15,.3); }
.btn-cta:disabled { cursor: not-allowed; filter: grayscale(.35) brightness(.95); opacity: .8; transform: none; }
.btn-cta.is-loading .lbl::after { content: ""; display: inline-block; width: 18px; height: 18px; margin-left: 12px; border: 3px solid #fff; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
.btn-xl { --h: 84px; min-width: min(480px, 100%); font-size: 42px; }
.btn-lg { --h: 70px; min-width: min(360px, 100%); font-size: 34px; }
.btn-block { width: 100%; }
.pulse { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes spin { to { transform: rotate(360deg); } }

.round-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--ink); background: #fff;
  display: grid; place-items: center; color: var(--ink); padding: 0; flex: none;
  box-shadow: 0 2px 0 rgba(29, 68, 32, .25); transition: transform .12s, background .15s;
}
.round-btn:hover { background: var(--leaf); }
.round-btn:active { transform: translateY(2px); }
.round-btn svg { width: 24px; height: 24px; }
.sound-btn .ic-off { display: none; }
.sound-btn[aria-pressed="false"] .ic-on { display: none; }
.sound-btn[aria-pressed="false"] .ic-off { display: block; }

/* ---------- Top bar (screens 2-4) ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--topbar-h);
  display: flex; align-items: center; gap: 22px; padding: 0 max(28px, calc((100vw - 1320px) / 2));
  background: rgba(255, 253, 246, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1.5px solid #e2e6d4;
  transform: translateY(-100%); transition: transform .35s ease;
}
body:not([data-screen="welcome"]) .topbar { transform: none; }
.topbar-logo { width: 150px; height: auto; display: block; }
.topbar .event-tag { margin-left: 34px; font-size: 22px; }
.topbar .sound-btn { margin-left: auto; }
.menu-btn { display: none; }
.menu-panel { position: absolute; right: 16px; top: calc(var(--topbar-h) - 6px); background: #fff; border: 1.5px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; min-width: 220px; display: grid; }
.menu-panel button, .menu-panel a { text-align: left; background: none; border: 0; padding: 12px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.menu-panel button:hover, .menu-panel a:hover { background: var(--leaf); }

/* ---------- Screens ---------- */
#app { position: relative; }
.screen { display: none; position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; }
.screen.is-active { display: block; animation: screenIn .45s ease both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.screen:not(.screen-welcome) { padding-top: var(--topbar-h); }

.confetti-layer { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.confetti-layer i { position: absolute; width: 14px; height: 22px; border-radius: 3px; opacity: .9; animation: drift 6s ease-in-out infinite; }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* =========================================================
   01 — WELCOME
   ========================================================= */
.screen-welcome {
  background: var(--cream) url("../img/stadium.webp") center bottom / cover no-repeat;
  display: none; padding: 34px clamp(24px, 4vw, 64px) 40px;
}
.screen-welcome.is-active { display: flex; flex-direction: column; }
.screen-welcome::before { /* lớp sáng giữ chữ dễ đọc */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 45% at 32% 30%, rgba(255, 252, 240, .85), transparent 70%),
              linear-gradient(180deg, rgba(255,250,236,.15), transparent 40%, transparent 70%, rgba(255,250,236,.35));
}
.welcome-head { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; max-width: 1320px; width: 100%; margin: 0 auto; }
.welcome-logo { width: clamp(170px, 17vw, 250px); height: auto; display: block; }
.welcome-head .event-tag { font-size: clamp(22px, 2vw, 30px); margin-top: 16px; }

.welcome-grid {
  position: relative; z-index: 2; flex: 1; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center;
  gap: 2vw; max-width: 1320px; width: 100%; margin: 0 auto;
}
.welcome-copy { padding-left: clamp(0px, 2vw, 40px); }
.headline {
  margin: 0; font-family: var(--f-display); font-weight: 900; line-height: .98; letter-spacing: -.2px;
  transform: rotate(-5deg) skewX(-3deg); transform-origin: left center; display: grid; justify-items: start;
}
.hl { display: block; white-space: nowrap; paint-order: stroke fill; }
.hl-1, .hl-3 {
  color: #f45a17; -webkit-text-stroke: 3px #8e1f12;
  text-shadow: 0 5px 0 #8e1f12, 0 9px 18px rgba(120, 30, 10, .25);
}
.hl-1 { font-size: clamp(56px, 7vw, 116px); margin-left: 6%; }
.hl-2 { font-size: clamp(46px, 5.6vw, 94px); color: #1d4b1d; -webkit-text-stroke: 1.5px #1d4b1d; text-shadow: 0 5px 0 rgba(20, 50, 20, .9), 0 9px 16px rgba(20, 50, 20, .2); margin-top: 2px; }
.hl-3 { font-size: clamp(52px, 6.5vw, 108px); margin-left: 1%; margin-top: 4px; }
.script-sub {
  position: relative; margin: 26px 0 0 9%; display: inline-block;
  font-family: var(--f-script); font-size: clamp(30px, 3.1vw, 50px); color: var(--red); transform: rotate(-5deg);
  text-shadow: 0 2px 0 #fff6e0;
}
.swoosh { position: absolute; left: 26%; bottom: -36px; width: 60%; height: 22px; }

.welcome-art { position: relative; height: min(68vh, 680px); min-height: 420px; }
.gacha { position: relative; aspect-ratio: 2 / 3; }
.gacha-body { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: drop-shadow(0 18px 18px rgba(30, 60, 20, .28)); user-select: none; -webkit-user-drag: none; }
.gacha-knob {
  position: absolute; left: 38.45%; top: 57.77%; width: 22.3%; aspect-ratio: 1; border-radius: 50%;
  background: url("../img/gacha-machine.webp") 49.5% 67.9% / 448.4% 672.6% no-repeat;
}
.gacha-plate {
  /* khớp đúng ô cửa ra bóng của máy (x 295–728, y 1150–1328 trên ảnh 1024×1536) */
  position: absolute; left: 29.2%; width: 41.6%; top: 75.2%; height: 11%; border-radius: 9% / 16%;
  background: linear-gradient(#fffdf6, #f3eedd); border: 1.5px solid #cfc6a8;
  display: grid; place-items: center; padding: 3% 5%;
  box-shadow: inset 0 2px 4px rgba(60, 50, 20, .15), 0 1px 0 rgba(255, 255, 255, .6);
}
.gacha-plate img { width: 100%; height: 100%; object-fit: contain; }
.gacha-welcome { position: absolute; bottom: 4%; left: 50%; height: 92%; transform: translateX(-50%); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.prize-clusters { position: absolute; z-index: 3; left: 50%; bottom: -2%; width: 128%; max-width: 640px; height: auto; transform: translateX(-50%); pointer-events: none; }
.flying-ball { position: absolute; z-index: 4; top: 1%; left: 4%; width: 27%; aspect-ratio: 1; animation: fly 3.6s ease-in-out infinite; }
.flying-ball img { position: relative; width: 100%; height: 100%; animation: roll 6s linear infinite; filter: drop-shadow(0 8px 8px rgba(0,0,0,.18)); }
.flying-ball .trail {
  position: absolute; left: 50%; top: 52%; width: 150%; height: 46%; transform-origin: 0 50%; transform: rotate(38deg);
  background: linear-gradient(90deg, rgba(255,190,40,.95), rgba(255,140,30,.6) 40%, transparent);
  border-radius: 50%; filter: blur(1px);
  clip-path: polygon(0 20%, 100% 0, 100% 100%, 0 80%);
}
@keyframes fly { 0%, 100% { translate: 0 0; } 50% { translate: -10px -14px; } }
@keyframes roll { to { rotate: -360deg; } }

.welcome-cta { position: relative; z-index: 5; display: grid; justify-items: center; gap: 18px; margin-top: 6px; }
.prize-caption { position: relative; margin: 0; font-size: 18px; font-weight: 600; color: var(--ink); text-align: center; padding: 0 44px; text-shadow: 0 1px 0 #fff, 0 0 12px rgba(255,255,255,.9); }
.cta-wrap { display: flex; align-items: center; gap: 20px; }
.spark { position: absolute; top: 50%; width: 34px; height: 30px; transform: translateY(-50%); background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 30'%3E%3Cg stroke='%23f68629' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M30 4 20 10M32 15H19M30 26l-10-6'/%3E%3C/g%3E%3C/svg%3E"); }
.spark-l { left: 0; transform: translateY(-50%); }
.spark-r { right: 0; transform: translateY(-50%) scaleX(-1); }
.cta-wrap .spark { position: static; transform: none; width: 46px; height: 42px; }
.cta-wrap .spark-r { transform: scaleX(-1); }
.welcome-notice { margin: 0; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 16px; font-weight: 600; color: var(--orange-deep); }

/* =========================================================
   02 — REGISTER
   ========================================================= */
.screen-register { background: var(--cream); }
.screen-register::after { /* thảm cỏ dưới đáy */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26vh; z-index: 0; pointer-events: none;
  background: url("../img/stadium-sm.webp") center bottom / cover no-repeat;
  -webkit-mask: linear-gradient(transparent, #000 75%); mask: linear-gradient(transparent, #000 75%); opacity: .55;
}
.register-grid {
  position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; padding: 44px clamp(20px, 4vw, 48px) 60px;
  display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(24px, 4vw, 60px); align-items: center;
}
.title-2 { position: relative; margin: 0; font-family: var(--f-display); font-weight: 900; line-height: 1; display: grid; justify-items: center; text-align: center; }
.title-2 .t-orange { font-size: clamp(40px, 3.8vw, 58px); color: var(--orange-hot); -webkit-text-stroke: 1.5px #9b2a12; paint-order: stroke fill; text-shadow: 0 3px 0 #9b2a12; }
.title-2 .t-green { font-size: clamp(40px, 3.8vw, 58px); color: var(--ink); text-shadow: 0 3px 0 rgba(20,50,20,.25); margin-top: 4px; }
.register-intro { text-align: center; }
.intro { margin: 14px 0 0; font-size: 17px; font-weight: 500; color: #2c3a26; }
.register-art { position: relative; width: 108%; margin-left: -4%; max-width: 540px; aspect-ratio: 760 / 620; margin: 26px auto 0; }
.ra-splash { position: absolute; inset: 0; width: 100%; height: 100%; }
.ra-confetti { position: absolute; z-index: 1; width: 30%; opacity: .95; pointer-events: none; animation: drift 5s ease-in-out infinite; }
.ra-c1 { left: -2%; top: -6%; transform: rotate(-30deg) scaleX(-1); }
.ra-c2 { right: -4%; top: 6%; transform: rotate(18deg); animation-delay: -2s; }
.ra-ball { position: absolute; z-index: 2; left: 27%; top: 4%; width: 50%; animation: bob 3.2s ease-in-out infinite; filter: drop-shadow(0 12px 10px rgba(30, 60, 20, .22)); }
.ra-gift { position: absolute; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .16)); }
.ra-gift-g1 { z-index: 1; left: 5%; bottom: 13%; width: 21%; filter: hue-rotate(78deg) saturate(1.35) brightness(.95) drop-shadow(0 6px 6px rgba(0,0,0,.14)); }
.ra-gift-g2 { z-index: 1; right: 7%; bottom: 13%; width: 19%; filter: hue-rotate(78deg) saturate(1.35) brightness(.95) drop-shadow(0 6px 6px rgba(0,0,0,.14)); transform: scaleX(-1); }
.ra-gift-1 { z-index: 3; left: 8%; bottom: 6%; width: 44%; }
.ra-gift-2 { z-index: 3; left: 51%; bottom: 6%; width: 34%; transform: scaleX(-1); }
.ra-grass-front { position: absolute; z-index: 4; left: 2%; width: 96%; bottom: 1%; height: auto; pointer-events: none; }

.ticket {
  position: relative; background: var(--paper); border: 1.5px solid #d6caa3; border-radius: 22px;
  box-shadow: var(--shadow), 0 1px 0 #fff inset;
}
.ticket::before, .ticket::after {
  content: ""; position: absolute; top: 46%; width: 28px; height: 28px; border-radius: 50%; background: var(--cream); border: 1.5px solid #d6caa3;
}
.ticket::before { left: -15px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -15px; clip-path: inset(0 50% 0 0); }
.register-card { padding: 30px 34px 28px; }
.register-card-head { margin-bottom: 18px; text-align: center; }

.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px;
  grid-template-areas: "name fbname" "phone school" "radio country";
  align-items: start;
}
.form-grid > label[for="fFullName"] { grid-area: name; }
.form-grid > label[for="fFbName"] { grid-area: fbname; }
.form-grid > label[for="fPhone"] { grid-area: phone; }
.form-grid > label[for="fSchool"] { grid-area: school; }
.field-country { grid-area: country; }
.field-radio { grid-area: radio; }
.phone-hint { display: block; margin-top: -1px; font-size: 12.5px; font-weight: 400; line-height: 1.4; color: var(--muted); }
.field { display: grid; gap: 7px; font-size: 14.5px; font-weight: 600; color: #263a1d; margin: 0; min-width: 0; }
.field em { color: var(--error); font-style: normal; }
fieldset.field { border: 0; padding: 0; }
fieldset.field legend { padding: 0; margin-bottom: 8px; }
.input-ic { position: relative; display: block; }
.input-ic svg { position: absolute; left: 13px; top: 50%; width: 21px; height: 21px; transform: translateY(-50%); color: #7d8672; pointer-events: none; }
.input-ic input {
  width: 100%; min-height: 50px; padding: 11px 14px 11px 44px; border-radius: 10px; border: 1.5px solid #c3cab4; background: #fffef9;
  font-size: 15.5px; font-weight: 500; transition: border-color .15s, box-shadow .15s;
}
.input-ic input::placeholder { color: #8b917f; font-weight: 400; }
.input-ic input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(85, 120, 61, .18); }
.input-ic input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 3px rgba(192, 38, 27, .12); }
.input-ic input:disabled { background: #f1f1ea; color: #9aa092; }
.err { color: var(--error); font-size: 12.5px; font-weight: 500; min-height: 0; }
.err:empty { display: none; }
.choices { display: flex; gap: 34px; }
.radio, .check { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.radio input { appearance: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #8b917f; margin: 0; display: grid; place-items: center; background: #fff; flex: none; }
.radio input::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #e2381d; transform: scale(0); transition: transform .15s; }
.radio input:checked { border-color: #e2381d; }
.radio input:checked::after { transform: scale(1); }
.check input { appearance: none; width: 22px; height: 22px; border-radius: 5px; border: 2px solid #6f7864; margin: 0; background: #fff; display: grid; place-items: center; flex: none; }
.check input::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) scale(0); margin-top: -3px; transition: transform .15s; }
.check input:checked { background: var(--green); border-color: var(--green); }
.check input:checked::after { transform: rotate(45deg) scale(1); }
.field-country.is-off { opacity: .45; }
.combo { position: relative; }
.combo .input-ic input { padding-right: 46px; }
.combo-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; color: var(--ink); display: grid; place-items: center; border-radius: 8px; }
.combo-toggle svg { width: 20px; height: 20px; transition: transform .2s; }
.combo.is-open .combo-toggle svg { transform: rotate(180deg); }
.combo-toggle:disabled { opacity: .4; cursor: default; }
.combo-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: 264px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1.5px solid #c3cab4; border-radius: 12px; box-shadow: 0 14px 30px rgba(37, 72, 33, .18); overscroll-behavior: contain;
}
.combo-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; line-height: 1.3; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 15px; }
.combo-list li .flag { width: 28px; height: 21px; flex: none; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); background: #eee; }
.combo-list li .cname { min-width: 0; }
.combo-list li.is-active, .combo-list li:hover { background: var(--leaf); }
.combo-list li[aria-selected="true"] { color: var(--green-2); font-weight: 700; }
.combo-list li mark { background: #ffe3c4; color: inherit; border-radius: 3px; padding: 0 1px; }
.combo-list li.combo-empty { cursor: default; color: var(--muted); font-weight: 400; background: none; }
.combo-flag { position: absolute; left: 12px; top: 50%; width: 26px; height: 19px; transform: translateY(-50%); object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); pointer-events: none; }
.combo.has-flag .input-ic > svg { display: none; }

.fb-box {
  margin-top: 20px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px;
  background: #eef3df; border: 1.5px solid #d4ddbd; border-radius: 14px; padding: 14px 18px;
}
.fb-text h3 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 22px; line-height: 1.1; color: var(--ink); }
.fb-text p { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.fb-qr { display: block; width: 112px; height: 112px; background: #fff; border-radius: 6px; padding: 0; flex: none; }
.fb-qr img { width: 100%; height: 100%; display: block; }
.fb-side { display: grid; gap: 14px; }
.fb-link { font-family: var(--f-display); font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: underline; text-underline-offset: 5px; display: inline-flex; align-items: center; gap: 6px; }
.fb-link svg { width: 18px; height: 18px; }
.check-desktop { font-size: 12.5px; line-height: 1.35; }
.check-mobile { margin-top: 16px; font-size: 14px; }
.check em { color: var(--error); font-style: normal; }
.ts-box { display: flex; justify-content: center; margin-top: 12px; }
.ts-box:empty { margin: 0; }
#btnRegister:disabled:not(.is-loading) { box-shadow: 0 4px 0 #9a8f80; border-color: #a99f91; background: linear-gradient(180deg, #d9d2c6, #c4bcae); text-shadow: none; filter: none; opacity: 1; }
.form-error { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: #ffece6; color: #9a231e; font-weight: 600; font-size: 14px; }
.register-card .btn-cta { margin-top: 20px; }
.mobile-only { display: none; }

/* =========================================================
   03 — GAME
   ========================================================= */
.screen-game { background: var(--cream) url("../img/stadium.webp") center bottom / cover no-repeat; }
.screen-game.is-active { display: flex; flex-direction: column; align-items: center; }
.game-head { position: relative; z-index: 3; text-align: center; margin-top: 18px; }
.title-game {
  margin: 0; font-family: var(--f-display); font-weight: 900; font-size: clamp(64px, 7vw, 110px); line-height: .95;
  transform: rotate(-3deg); paint-order: stroke fill;
}
.title-game .t-orange { -webkit-text-stroke: 3px #8e1f12; text-shadow: 0 5px 0 #8e1f12, 0 10px 18px rgba(120, 30, 10, .25); }
.title-game .t-green { -webkit-text-stroke: 1.5px #1d4b1d; text-shadow: 0 5px 0 rgba(20, 50, 20, .9); display: inline-block; transform: translateY(8px); }
.game-sub { margin: 4px 0 0; font-family: var(--f-display); font-weight: 700; font-style: italic; font-size: clamp(22px, 2vw, 30px); color: var(--ink); transform: rotate(4deg) translateX(30px); }
.game-stage { position: relative; z-index: 2; flex: 1; width: 100%; max-width: 900px; display: flex; justify-content: center; align-items: flex-end; min-height: 380px; }
.gacha-game { height: min(52vh, 560px); min-height: 340px; z-index: 2; }
.stage-gift { position: absolute; bottom: 2%; z-index: 3; filter: drop-shadow(0 10px 10px rgba(0,0,0,.18)); pointer-events: none; }
.stage-gift-l { left: 8%; width: 150px; }
.stage-gift-l2 { left: 22%; width: 96px; bottom: 0; }
.stage-gift-r { right: 8%; width: 150px; transform: scaleX(-1); }
.stage-gift-r2 { right: 22%; width: 96px; bottom: 0; }
.game-cta { position: relative; z-index: 6; display: grid; justify-items: center; gap: 10px; padding: 14px 20px 34px; }
.up-arrow { width: 22px; height: 30px; animation: upbob 1.2s ease-in-out infinite; }
@keyframes upbob { 50% { translate: 0 -6px; } }
.game-hint { margin: 2px 0 0; font-family: var(--f-display); font-style: italic; font-weight: 600; font-size: 20px; color: var(--ink); text-shadow: 0 0 10px #fff, 0 1px 0 #fff; text-align: center; }
.game-hint.is-error { color: var(--error); font-style: normal; }

/* Animation máy */
.gacha.is-spinning .gacha-body, .gacha.is-spinning .gacha-plate { animation: shake .18s linear infinite; }
.gacha.is-spinning .gacha-knob { animation: crank 1.1s cubic-bezier(.5, .1, .4, 1) infinite; }
@keyframes shake { 0%, 100% { transform: rotate(-1.4deg) translateX(-2px); } 50% { transform: rotate(1.4deg) translateX(2px); } }
@keyframes crank { to { transform: rotate(360deg); } }

.capsule {
  position: absolute; z-index: 5; left: 50%; bottom: 7%; width: 120px; aspect-ratio: 1; margin-left: -60px;
  opacity: 0; pointer-events: none;
}
.capsule img { position: absolute; inset: 0; width: 100%; height: 100%; }
.capsule .cap-open { opacity: 0; }
.cap-glow { position: absolute; inset: -40%; border-radius: 50%; background: radial-gradient(circle, rgba(255,230,140,.95), rgba(255,180,40,.45) 40%, transparent 70%); opacity: 0; z-index: -1; }
.capsule.is-drop { animation: capDrop 1.1s cubic-bezier(.3, .7, .4, 1) forwards; }
.capsule.is-center { animation: capCenter .7s cubic-bezier(.2, .9, .3, 1.2) forwards; }
.capsule.is-wobble img { animation: wobble .16s linear 6; }
.capsule.is-center .cap-glow, .capsule.is-wobble .cap-glow { opacity: .75; transform: scale(1.1); transition: opacity .4s; }
.capsule.is-open .cap-closed { opacity: 0; }
.capsule.is-open .cap-open { opacity: 1; animation: popOpen .5s ease-out both; }
.capsule.is-open .cap-glow { opacity: 1; animation: glow 1.2s ease-out both; }
@keyframes capDrop { 0% { opacity: 0; transform: translateY(-40px) scale(.5); } 25% { opacity: 1; } 55% { transform: translateY(40px) scale(.75); } 75% { transform: translateY(18px) scale(.75); } 100% { opacity: 1; transform: translateY(40px) scale(.75); } }
@keyframes capCenter { from { opacity: 1; transform: translateY(40px) scale(.75); } to { opacity: 1; transform: translateY(-34vh) scale(2.1); } }
@keyframes wobble { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
@keyframes popOpen { from { transform: scale(.7); } 60% { transform: scale(1.15); } to { transform: scale(1); } }
@keyframes glow { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

/* =========================================================
   04 — RESULT
   ========================================================= */
.screen-result { background: var(--cream); }
.screen-result::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 34vh; z-index: 0; pointer-events: none;
  background: url("../img/stadium-sm.webp") center bottom / cover no-repeat;
  -webkit-mask: linear-gradient(transparent, #000 70%); mask: linear-gradient(transparent, #000 70%); opacity: .7;
}
.result-wrap { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 30px clamp(20px, 4vw, 48px) 60px; }
.title-result {
  margin: 0 0 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 18px;
  font-family: var(--f-display); font-weight: 900; line-height: .95; transform: rotate(-3deg); paint-order: stroke fill;
}
.title-result .r-main { font-size: clamp(72px, 8vw, 120px); -webkit-text-stroke: 3px #8e1f12; text-shadow: 0 6px 0 #8e1f12, 0 12px 20px rgba(120,30,10,.25); }
.title-result .r-sub { font-size: clamp(54px, 5.6vw, 88px); -webkit-text-stroke: 1.5px #1d4b1d; text-shadow: 0 5px 0 rgba(20,50,20,.9); }
.result-ball { width: clamp(64px, 6vw, 92px); animation: roll 5s linear infinite; filter: drop-shadow(0 6px 6px rgba(0,0,0,.2)); }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.prize-card { padding: 30px 30px 28px; text-align: center; overflow: visible; animation: prizeIn .7s cubic-bezier(.2, .9, .3, 1.25) both .15s; }
@keyframes prizeIn { from { opacity: 0; transform: scale(.7) rotate(-4deg); } to { opacity: 1; transform: none; } }
.prize-burst {
  position: absolute; inset: 6% 10% 30%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(246,134,41,.0) 0 10deg, rgba(246,134,41,.16) 10deg 16deg);
  -webkit-mask: radial-gradient(circle, #000 25%, transparent 70%); mask: radial-gradient(circle, #000 25%, transparent 70%);
  animation: spin 24s linear infinite;
}
.prize-photo {
  position: relative; width: min(300px, 78%); aspect-ratio: 1; margin: 0 auto; border-radius: 20px; background: #fff;
  border: 4px solid #fff; box-shadow: 0 10px 26px rgba(37, 72, 33, .18), 0 0 0 1.5px #e2d6b2; overflow: hidden; display: grid; place-items: center;
}
.prize-photo img { width: 100%; height: 100%; object-fit: contain; }
.prize-photo img[hidden] { display: none; }
.prize-text {
  padding: 18px; font-family: var(--f-display); font-weight: 900; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.05; text-transform: uppercase;
  color: var(--orange-deep, #ea4f12); text-wrap: balance; overflow-wrap: anywhere;
}
.prize-photo:has(.prize-text:not([hidden])) { background: radial-gradient(circle at 50% 45%, #fff6e3, #fff 72%); }
.prize-gift-deco { position: absolute; left: 4%; bottom: 22%; width: 26%; transform: rotate(-8deg); filter: drop-shadow(0 8px 8px rgba(0,0,0,.15)); pointer-events: none; }
.prize-name { margin: 20px 0 2px; font-family: var(--f-display); font-weight: 900; font-size: clamp(30px, 3vw, 40px); line-height: 1.05; color: var(--ink); text-transform: uppercase; }
.prize-label { margin: 0; font-size: 14px; color: var(--muted); }
.result-info { text-align: center; display: grid; justify-items: center; gap: 12px; }
.deadline {
  margin: 0; display: inline-block; padding: 12px 34px; border-radius: 999px; color: #fff; font-family: var(--f-display); font-weight: 800; font-size: clamp(24px, 2.2vw, 32px); letter-spacing: .4px;
  background: linear-gradient(180deg, #ff8a2e, #ea4f12); border: 2.5px solid #c2410c; box-shadow: 0 4px 0 #a83a0c; text-shadow: 0 2px 0 rgba(150,45,5,.5);
}
.result-ins { margin: 6px 0 0; font-size: 17px; font-weight: 500; }
.result-terms { margin: 0; font-style: italic; color: var(--ink); font-size: 15.5px; }
.result-owner { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); background: rgba(255,255,255,.75); border: 1px dashed #cdbf95; border-radius: 10px; padding: 8px 14px; }
.result-owner:empty { display: none; }
.result-note { margin: 0; font-size: 14px; font-weight: 600; color: var(--orange-deep); }
.btn-ghost-green { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--green); color: var(--ink); font-weight: 700; text-decoration: none; background: #fff; }
.btn-ghost-green:hover { background: var(--leaf); }
.screen-result.is-miss .prize-photo { background: radial-gradient(circle at 50% 60%, #eef6dc, #fff 70%); }
.screen-result.is-miss .prize-photo img { width: 70%; height: 70%; }

/* ---------- Toast & confetti ---------- */
.toast { position: fixed; z-index: 95; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); }
.confetti-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 80; }

/* =========================================================
   Tablet
   ========================================================= */
@media (max-width: 1100px) {
  .welcome-grid { grid-template-columns: 1fr 1fr; }
  .register-grid { grid-template-columns: 1fr; max-width: 760px; }
  .register-intro { display: none; }
  .register-card .mobile-only.register-card-head { display: block; }
}

/* =========================================================
   Mobile (≤ 700px)
   ========================================================= */
@media (max-width: 700px) {
  :root { --topbar-h: 64px; }
  body { font-size: 14.5px; }
  .desktop-only { display: none !important; }
  .mobile-only { display: block; }
  a.mobile-only.fb-link, label.check.mobile-only { display: flex; }
  .check-mobile { align-items: flex-start; }
  .check-mobile input { margin-top: 1px; }

  .topbar { padding: 0 14px; justify-content: center; }
  .topbar .event-tag { display: none; }
  .topbar .round-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; margin: 0; }
  .topbar .round-btn svg { width: 21px; height: 21px; }
  .topbar #btnBack { left: 12px; }
  .topbar .sound-btn { right: 60px; margin-left: 0; }
  .topbar .round-btn:active { transform: translateY(calc(-50% + 2px)); }
  .topbar-logo { width: 140px; }
  .menu-btn { display: grid; gap: 5px; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 11px 10px; background: none; border: 0; }
  .menu-btn span { display: block; height: 3px; border-radius: 2px; background: var(--ink); }

  /* Welcome */
  .screen-welcome { padding: 22px 18px 26px; background-size: auto 100%; background-position: center bottom; }
  .screen-welcome::before { background: radial-gradient(90% 40% at 50% 26%, rgba(255,252,240,.9), transparent 75%); }
  .welcome-head { flex-direction: column; align-items: center; gap: 6px; }
  .welcome-logo { width: 176px; }
  .welcome-head .event-tag { font-size: 20px; margin-top: 2px; }
  .welcome-grid { grid-template-columns: 1fr; gap: 0; align-content: start; }
  .welcome-copy { padding: 0; display: grid; justify-items: center; }
  .headline { transform: rotate(-4deg); transform-origin: center; justify-items: center; margin-top: 14px; }
  .hl-1 { font-size: clamp(38px, 11.6vw, 54px); margin: 0; -webkit-text-stroke-width: 2px; text-shadow: 0 3px 0 #8e1f12; }
  .hl-2 { font-size: clamp(30px, 9.2vw, 44px); -webkit-text-stroke-width: 2px; text-shadow: 0 3px 0 rgba(20,50,20,.9); }
  .hl-3 { font-size: clamp(36px, 10.6vw, 50px); margin: 2px 0 0; -webkit-text-stroke-width: 2px; text-shadow: 0 3px 0 #8e1f12; }
  .script-sub { margin: 12px 0 0; font-size: clamp(24px, 7vw, 32px); }
  .swoosh { bottom: -18px; }
  .welcome-art { height: auto; min-height: 0; aspect-ratio: 1 / 1.02; width: 100%; max-width: min(360px, 44vh); margin: 14px auto 0; }
  .gacha-welcome { height: 94%; }
  .flying-ball { left: auto; right: 0; top: 4%; width: 24%; }
  .flying-ball .trail { transform: rotate(130deg); left: 40%; }
  .prize-clusters { width: 112%; bottom: -1%; }
  .welcome-cta { gap: 14px; margin-top: 10px; }
  .prize-caption { font-size: 14.5px; padding: 0 38px; }
  .spark { width: 28px; height: 26px; }
  .cta-wrap { width: 100%; justify-content: center; gap: 0; }
  .cta-wrap .spark { display: none; }
  .btn-xl { --h: 66px; min-width: 0; width: 100%; max-width: 380px; font-size: 32px; }

  /* Register */
  .screen-register::after { height: 18vh; }
  .register-grid { padding: 18px 16px 40px; }
  .register-card { padding: 24px 18px 22px; border-radius: 20px; }
  .register-card.ticket::before, .register-card.ticket::after { top: 120px; }
  .result-ins br { display: none; }
  .title-2 .t-orange, .title-2 .t-green { font-size: clamp(34px, 10vw, 44px); }
  .intro { font-size: 14.5px; margin-top: 10px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; grid-template-areas: "name" "fbname" "phone" "school" "radio" "country"; }
  .input-ic input { min-height: 48px; font-size: 16px; } /* 16px chống zoom iOS */
  .fb-box { grid-template-columns: 1fr auto; padding: 14px; gap: 12px; margin-top: 18px; }
  .fb-text h3 { font-size: 20px; }
  .fb-text .fb-link { margin-top: 10px; font-size: 18px; }
  .fb-hint { margin: 6px 0 0 !important; font-size: 11.5px !important; }
  .fb-qr { width: 104px; height: 104px; }

  /* Game */
  .game-head { margin-top: 12px; }
  .title-game { font-size: clamp(52px, 15vw, 70px); }
  .title-game .t-orange, .title-game .t-green { -webkit-text-stroke-width: 2px; }
  .game-sub { font-size: 20px; transform: rotate(-3deg); }
  .game-stage { min-height: 0; }
  .gacha-game { height: min(54vh, 470px); min-height: 300px; }
  .stage-gift-l, .stage-gift-r { width: 76px; left: 0; }
  .stage-gift-r { left: auto; right: 0; }
  .stage-gift-l2, .stage-gift-r2 { display: none; }
  .game-cta { padding: 8px 18px 26px; width: 100%; }
  .btn-block { padding: 0 18px; font-size: 28px; }
  .btn-lg { --h: 64px; width: 100%; max-width: 380px; font-size: 30px; }
  .game-hint { font-size: 16px; }
  .capsule { width: 90px; margin-left: -45px; }
  @keyframes capCenter { from { opacity: 1; transform: translateY(40px) scale(.75); } to { opacity: 1; transform: translateY(-26vh) scale(2.2); } }

  /* Result */
  .result-wrap { padding: 22px 16px 40px; }
  .title-result { flex-direction: column; gap: 0; margin-bottom: 20px; }
  .title-result .r-main { font-size: clamp(64px, 19vw, 86px); -webkit-text-stroke-width: 2px; }
  .title-result .r-sub { font-size: clamp(44px, 13vw, 60px); -webkit-text-stroke-width: 2px; }
  .result-ball { position: absolute; right: 2%; top: 4px; width: 60px; }
  .result-grid { grid-template-columns: 1fr; gap: 20px; }
  .prize-card { padding: 22px 18px; }
  .prize-name { font-size: 30px; }
  .deadline { font-size: 24px; padding: 10px 26px; }
  .result-ins { font-size: 15px; }
  .result-terms { font-size: 14px; }
}

@media (max-width: 700px) and (max-height: 700px) {
  .gacha-game { height: 44vh; min-height: 250px; }
  .welcome-art { max-width: 300px; }
}

/* =========================================================
   Typography v2 — khớp thiết kế: chữ condensed đậm, gradient lửa + viền đỏ đậm,
   chữ xanh viền kem, chữ viết tay bút lông (Sriracha — hiển thị dấu tiếng Việt chuẩn)
   ========================================================= */
.headline, .title-2, .title-game, .title-result { font-family: var(--f-display); font-weight: 800; letter-spacing: .6px; }
.headline { line-height: 1.04; transform: rotate(-4.5deg); }
.hl-1, .hl-3,
.title-2 .t-orange, .title-game .t-orange, .title-result .r-main {
  color: transparent; text-shadow: none;
  background: linear-gradient(180deg, #ff9636 0%, #fb6a22 40%, #f04b1b 70%, #df3818 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 1.5px #a92b16; paint-order: stroke fill;
  filter: drop-shadow(0 2px 0 #9c2a14) drop-shadow(0 6px 8px rgba(140, 40, 10, .18));
}
.hl-2,
.title-2 .t-green, .title-game .t-green, .title-result .r-sub {
  color: #1c4a1d; text-shadow: none;
  -webkit-text-stroke: 2px #fffaf0; paint-order: stroke fill;
  filter: drop-shadow(0 2px 0 rgba(22, 56, 20, .35)) drop-shadow(0 6px 8px rgba(20, 50, 20, .15));
}
.hl-1 { font-size: clamp(58px, 7.2vw, 120px); }
.hl-2 { font-size: clamp(46px, 5.7vw, 96px); }
.hl-3 { font-size: clamp(54px, 6.7vw, 112px); }
.title-game .t-orange, .title-game .t-green { display: inline-block; }
.script-sub {
  font-family: var(--f-script); font-weight: 400; color: #5c1a1e; letter-spacing: 0; word-spacing: 0; white-space: nowrap;
  font-size: clamp(32px, 3.2vw, 52px); transform: rotate(-5deg) skewX(-6deg);
  -webkit-text-stroke: 0;
  text-shadow: 0 2px 0 #fff6e0, 0 0 16px rgba(255, 250, 235, .95), 0 0 4px rgba(255, 250, 235, .9);
}
.swoosh { left: 30%; bottom: -18px; width: 46%; }
.script-sub { margin-top: 0; }
.btn-cta { font-weight: 800; letter-spacing: .4px; }
.event-tag { font-weight: 800; letter-spacing: .2px; }
.game-sub { font-weight: 700; font-style: italic; }
.game-hint { font-weight: 600; font-style: italic; }
.prize-name, .deadline, .fb-text h3, .fb-link { font-weight: 800; }

@media (max-width: 700px) {
  .headline { transform: rotate(-4deg); }
  .hl-1, .hl-3, .title-2 .t-orange, .title-game .t-orange, .title-result .r-main {
    -webkit-text-stroke-width: 1.5px; filter: drop-shadow(0 2px 0 #86200f) drop-shadow(0 5px 7px rgba(140, 40, 10, .2));
  }
  .hl-2, .title-2 .t-green, .title-game .t-green, .title-result .r-sub {
    -webkit-text-stroke-width: 2px; filter: drop-shadow(0 2px 0 rgba(22, 56, 20, .5)) drop-shadow(0 5px 7px rgba(20, 50, 20, .15));
  }
  .headline { letter-spacing: .2px; max-width: 100%; }
  .hl-1 { font-size: clamp(36px, 11vw, 56px); }
  .hl-2 { font-size: clamp(28px, 8.4vw, 44px); }
  .hl-3 { font-size: clamp(34px, 10vw, 52px); }
  .script-sub { font-size: clamp(21px, 6.2vw, 30px); margin-top: 10px; }
}

/* Trang trí kiểu thiết kế: tia lửa hai bên tiêu đề, tia sáng sau quà */
.title-2::before, .title-2::after, .title-game::before, .title-game::after, .title-result::before, .title-result::after {
  content: ""; position: absolute; top: 50%; width: 44px; height: 48px; margin-top: -30px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 44'%3E%3Cg stroke-linecap='round' stroke-width='4.5'%3E%3Cpath d='M30 6 22 16' stroke='%23f68629'/%3E%3Cpath d='M37 22H25' stroke='%23ffb21e'/%3E%3Cpath d='M30 38l-8-9' stroke='%23e8452a'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.title-2, .title-game, .title-result { position: relative; }
.title-2::before, .title-game::before, .title-result::before { left: -50px; }
.title-2::after, .title-game::after, .title-result::after { right: -50px; transform: scaleX(-1); }
.title-2::before, .title-2::after { top: 22%; }
.register-intro .title-2, .register-card-head .title-2 { display: inline-grid; }
.prize-burst {
  inset: -2% 4% 22%; opacity: 1;
  background: repeating-conic-gradient(from 0deg, rgba(255, 178, 30, 0) 0 9deg, rgba(246, 134, 41, .32) 9deg 14deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%); mask: radial-gradient(circle, #000 18%, transparent 66%);
}
.prize-card::after {
  content: "✦"; position: absolute; right: 12%; top: 10%; font-size: 34px; color: #f68629; text-shadow: -150px 210px 0 #ffb21e, -40px 250px 0 #e8452a; pointer-events: none;
}
@media (max-width: 700px) {
  .title-2::before, .title-game::before, .title-result::before { left: -34px; }
  .title-2::after, .title-game::after, .title-result::after { right: -34px; }
  .title-2::before, .title-2::after, .title-game::before, .title-game::after, .title-result::before, .title-result::after { width: 30px; height: 34px; margin-top: -20px; }
  .screen-game .game-stage { align-items: center; }
  .gacha-game { height: min(58vh, 520px); }
}

.welcome-right { display: flex; align-items: flex-start; gap: 16px; }
.welcome-sound { margin-top: 8px; background: rgba(255, 255, 255, .85); }
@media (max-width: 700px) {
  .welcome-right { display: contents; }
  .welcome-sound { position: absolute; right: 0; top: 0; margin: 0; width: 42px; height: 42px; }
  .welcome-head { position: relative; }
}

/* Tiêu đề uốn cong: mỗi chữ là 1 span được JS đặt theo vòng cung */
.headline.is-curved { transform: none; }
.headline.is-curved .hl { background: none; -webkit-text-stroke: 0; color: inherit; white-space: nowrap; }
.headline.is-curved .ch {
  display: inline-block; transform-origin: 50% 70%;
  /* nới vùng nền để dấu (mũ, móc, nặng) không bị cắt khi tô gradient */
  padding: .32em .03em .26em; margin: -.32em -.03em -.26em;
}
.headline.is-curved .ch.sp { padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; }
.headline.is-curved .hl-1 .ch, .headline.is-curved .hl-3 .ch {
  color: transparent;
  background: linear-gradient(180deg, #ff9636 0%, #fb6a22 40%, #f04b1b 70%, #df3818 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 1.5px #a92b16; paint-order: stroke fill;
}
.headline.is-curved .hl-2 .ch { color: #1c4a1d; -webkit-text-stroke: 2px #fffaf0; paint-order: stroke fill; }
.headline.is-curved .hl-1, .headline.is-curved .hl-3 { color: transparent; }
@media (max-width: 700px) {
  .headline.is-curved .hl-1 .ch, .headline.is-curved .hl-3 .ch { -webkit-text-stroke-width: 1.2px; }
  .headline.is-curved .hl-2 .ch { -webkit-text-stroke-width: 1.6px; }
  .welcome-copy { width: 100%; }
  /* Nền sân cỏ cho mobile như thiết kế: khán đài sau máy gacha, cỏ dưới nút */
  .screen-welcome { background: var(--cream); }
  .welcome-art::before {
    content: ""; position: absolute; z-index: 0; left: 50%; bottom: -30%; width: 410%; aspect-ratio: 3 / 2; transform: translateX(-50%);
    background: url("../img/stadium.webp") center bottom / cover no-repeat; pointer-events: none;
    -webkit-mask: linear-gradient(180deg, transparent 0%, #000 34%, #000 86%, transparent 100%); mask: linear-gradient(180deg, transparent 0%, #000 34%, #000 86%, transparent 100%);
  }
  .welcome-cta { margin-top: 26px; }
  .screen-welcome::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; z-index: 0; pointer-events: none;
    background: url("../img/stadium.webp") 50% 100% / auto 420% no-repeat, linear-gradient(#8dbb52, #7fb04a);
    -webkit-mask: linear-gradient(180deg, transparent 0%, #000 38%); mask: linear-gradient(180deg, transparent 0%, #000 38%);
  }
  .welcome-cta { z-index: 5; }
  .prize-caption { text-shadow: 0 1px 0 #fff, 0 0 10px rgba(255,255,255,.95), 0 0 18px rgba(255,255,255,.8); }
  .welcome-copy { position: relative; z-index: 4; }
  .welcome-art > * { z-index: 1; }
  .welcome-art .prize-clusters { z-index: 3; }
  .welcome-art .flying-ball { z-index: 4; }
  .screen-welcome::before { background: radial-gradient(110% 34% at 50% 18%, rgba(255, 252, 240, .92), transparent 78%), linear-gradient(180deg, transparent 70%, rgba(255, 250, 236, .18)); }
}

.sound-btn.is-waiting { animation: soundHint 1.6s ease-in-out infinite; }
@keyframes soundHint { 0%, 100% { box-shadow: 0 2px 0 rgba(29, 68, 32, .25), 0 0 0 0 rgba(246, 134, 41, .55); } 50% { box-shadow: 0 2px 0 rgba(29, 68, 32, .25), 0 0 0 9px rgba(246, 134, 41, 0); } }

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

/* ---------- Popup minigame chưa mở ---------- */
.closed-pop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(20, 40, 18, .55); backdrop-filter: blur(3px); animation: fadeIn .2s ease both; }
.closed-pop[hidden] { display: none; }
.closed-pop-card {
  position: relative; width: min(420px, 100%); padding: 56px 26px 26px; border-radius: 22px; text-align: center; background: #fffdf6;
  border: 2px solid #e2d6b2; box-shadow: 0 20px 50px rgba(20, 40, 18, .35); animation: prizeIn .45s cubic-bezier(.2, .9, .3, 1.25) both;
}
.closed-pop-ic { position: absolute; left: 50%; top: -46px; width: 96px; transform: translateX(-50%) rotate(-6deg); filter: drop-shadow(0 8px 10px rgba(0,0,0,.18)); }
.closed-pop-title { margin: 0 0 10px; font-family: var(--f-display); font-weight: 900; font-size: clamp(28px, 7vw, 36px); line-height: 1.05; color: var(--orange-deep); }
.closed-pop-text { margin: 0 0 22px; font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--ink); }
.closed-pop-btn { min-width: 180px; justify-content: center; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
