@font-face{font-family:Lora;src:url('/assets/lora-500.ttf') format('truetype');font-weight:500;font-display:swap}
@font-face{font-family:BeVietnam;src:url('/assets/be-vietnam-400.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:BeVietnam;src:url('/assets/be-vietnam-500.ttf') format('truetype');font-weight:500;font-display:swap}
@font-face{font-family:BeVietnam;src:url('/assets/be-vietnam-600.ttf') format('truetype');font-weight:600;font-display:swap}

/* Bảng màu lấy từ key art TKGH2: đêm trăng xanh tím, chữ vàng, viền lửa đỏ, hoa anh đào. */
:root{
  color-scheme:dark;
  --bg:#0c1124;--bg-2:#141b38;--card:#141c3bd9;--card-2:#0f1530e6;
  --ink:#f6efdf;--muted:#b9bfdb;--soft:#8e96bc;
  --gold:#efcd7d;--gold-2:#d4a54b;--gold-ink:#2b1c07;
  --ember:#e2553b;--sakura:#f3abc9;
  --line:#efcd7d59;--line-soft:#a8b2e633;
  --serif:Lora,Georgia,serif;--sans:BeVietnam,Arial,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:20px}
body{margin:0;min-height:100svh;background:var(--bg) url('/assets/bg.webp') center top/100% auto no-repeat;color:var(--ink);font-family:var(--sans);line-height:1.6;-webkit-font-smoothing:antialiased}
button,a,input{-webkit-tap-highlight-color:transparent}
button,a{touch-action:manipulation}
button{font:inherit;cursor:pointer}
a{color:inherit}
h1,h2,h3,p,figure{margin:0}
svg{width:24px;height:24px;flex-shrink:0}
.icon-library{position:absolute;width:0;height:0;overflow:hidden}
.skip{position:fixed;top:10px;left:10px;background:var(--bg-2);color:var(--ink);padding:10px;z-index:30}
.skip:not(:focus){clip-path:inset(50%);width:1px;height:1px;overflow:hidden;padding:0;white-space:nowrap}
:focus-visible{outline:2px solid var(--gold);outline-offset:4px}
[hidden]{display:none!important}

.page-shell{max-width:590px;margin:auto;padding:22px 20px 34px}
.brand-line{display:flex;align-items:center;justify-content:center;gap:12px;color:#e9d9a8;font:500 9px var(--sans);letter-spacing:2.2px;white-space:nowrap}
.brand-line span{color:var(--sakura);font-size:14px;opacity:.8}

/* Hero */
.hero{text-align:center}
.keyart-frame{position:relative;width:min(78vw,340px);margin:18px auto 22px;border-radius:24px;padding:5px;background:linear-gradient(150deg,#f6dc95,#a8752c 45%,#f3cf7c 70%,#8c5b22);box-shadow:0 0 0 1px #00000040,0 18px 48px #02040ccc,0 0 60px #e2553b30;animation:rise .7s ease-out both}
.keyart-frame:after{content:'';position:absolute;inset:5px;border-radius:19px;box-shadow:inset 0 0 0 1px #fff3d040;pointer-events:none}
.keyart{display:block;width:100%;height:auto;border-radius:19px;background:var(--bg-2)}
@keyframes rise{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
.eyebrow{display:flex;align-items:center;justify-content:center;gap:16px;font:500 10px var(--sans);letter-spacing:5px;color:var(--gold);margin:0 0 12px}
.eyebrow span{height:1px;width:46px;background:linear-gradient(90deg,transparent,var(--gold));position:relative}
.eyebrow span:last-child{transform:rotate(180deg)}
.eyebrow span:after{content:'';position:absolute;right:0;top:-3px;width:6px;height:6px;border:1px solid var(--gold);transform:rotate(45deg);background:var(--bg)}
h1{font:500 clamp(27px,7.4vw,40px)/1.28 var(--serif);letter-spacing:-1px;text-shadow:0 2px 12px #02040c}
.intro{color:var(--muted);font-size:12px;margin:14px 0 26px}

/* Khối tải */
.download-panel{display:flex;flex-direction:column;gap:12px;position:relative;padding:20px 18px;border:1px solid var(--line);background:linear-gradient(150deg,#1e2850cc,#0d1330e6);box-shadow:inset 0 0 0 4px #0c112480,inset 0 0 0 5px #efcd7d22,0 10px 30px #02040c80;clip-path:polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% calc(100% - 12px),calc(100% - 12px) 100%,12px 100%,0 calc(100% - 12px),0 12px)}
.download-button,.ios-soon{display:flex;align-items:center;gap:14px;min-height:76px;padding:12px 16px;border-radius:4px;text-decoration:none}
.download-button{border:1px solid #f7e2a6;position:relative;box-shadow:inset 0 0 0 3px #ffffff14,0 5px 14px #02040c66;transition:filter .18s,transform .18s}
.download-button:hover{filter:brightness(1.08);transform:translateY(-1px)}
.download-button:active{transform:translateY(1px)}
.android{background:linear-gradient(115deg,#f6dc95,#dcac52 60%,#c98f35);color:var(--gold-ink)}
.android.is-pending{background:#ffffff0a;border:1px dashed #efcd7d80;color:#e9dcb8;box-shadow:none;cursor:default}
.android.is-pending:hover{filter:none;transform:none}
.android.is-pending small{color:var(--muted);opacity:1}
.platform-icon{width:26px;height:28px}
.arrow-icon{width:19px;height:19px;margin-left:auto;opacity:.9}
.download-button strong,.ios-soon strong{display:block;font:600 14px/1.5 var(--sans);letter-spacing:.6px}
.download-button small,.ios-soon small{display:block;font-size:10.5px;margin-top:2px;opacity:.85}
.ios-soon{border:1px solid var(--line-soft);background:#0a0f24b3;color:#d6dbf2;min-height:64px}
.ios-soon .platform-icon{width:22px;height:24px;color:#c9cfeb}
.ios-soon small{color:var(--soft);opacity:1}
.apk-alt{margin:-4px 2px 2px;font-size:11.5px;line-height:1.6;color:var(--soft);text-align:center}
.apk-alt a{color:var(--gold);text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.apk-alt a:hover{color:#fff1c4}
.apk-note{display:block;margin-bottom:4px;color:var(--muted)}
.soon-tag{margin-left:auto;font-size:10px;font-weight:600;letter-spacing:.4px;color:var(--sakura);border:1px solid #f3abc966;border-radius:99px;padding:3px 10px;white-space:nowrap}
.is-ios .ios-soon,.is-ios .ios-block{order:-1}

/* Khối iOS 2 bước (khi có TestFlight) */
.ios-block{display:flex;flex-direction:column;gap:10px}
.ios-title{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:#ecdba6}
.ios-title svg{width:16px;height:17px}
.testflight-step{background:#0d1430;color:var(--ink);border-color:#a8b2e680}
.ios{background:linear-gradient(115deg,#3b3f8a,#28306a);color:var(--ink)}
.step-badge{width:30px;height:30px;flex:0 0 30px;border-radius:50%;display:grid;place-items:center;font:600 15px var(--sans);background:var(--gold);color:var(--gold-ink)}

/* Hướng dẫn Play Protect */
.protect{margin-top:22px;padding:18px 16px 16px;border:1px solid #e2553b66;border-radius:6px;background:linear-gradient(160deg,#2a1730cc,#121834e6)}
.protect-head{display:flex;gap:11px;align-items:flex-start}
.protect-icon{width:22px;height:22px;color:#ff8a6b;margin-top:2px}
.protect-kicker{font-size:10px;letter-spacing:1.2px;text-transform:uppercase;color:#ff9f86;font-weight:600}
.protect h2{font:500 17px/1.45 var(--serif);color:#fbe7b5;margin-top:2px}
.protect-lead{font-size:12px;line-height:1.8;color:var(--muted);margin:10px 0 14px}
.protect-steps{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.protect-steps figure{display:flex;flex-direction:column;gap:9px}
.protect-steps figcaption{display:flex;align-items:center;gap:7px;font-size:12px;line-height:1.4;color:#eef0fa}
.protect-steps figcaption strong{color:var(--gold);font-weight:600}
.protect-steps figcaption span{width:22px;height:22px;flex:0 0 22px;border-radius:50%;display:grid;place-items:center;background:var(--gold);color:var(--gold-ink);font-weight:600;font-size:12px}
.protect-foot{margin-top:14px;font-size:11.5px;line-height:1.85;color:var(--muted)}
.protect-foot strong{color:#f1e6c8;font-weight:600}

/* Hộp thoại Play Protect minh họa (vẽ bằng CSS, chữ to theo bề rộng màn hình) */
.pp{font-size:clamp(9.5px,2.6vw,12.5px);background:#fdfcff;color:#1d1b20;border-radius:1.5em;padding:1.3em 1.1em 1.1em;display:flex;flex-direction:column;gap:.75em;box-shadow:0 10px 26px #02040c99;flex:1}
.pp-brand{display:flex;align-items:center;justify-content:center;gap:.4em;font-size:.86em;color:#45464f}
.pp-brand svg{width:1.25em;height:1.25em}
.pp-title{font-size:1.32em;line-height:1.25;text-align:center;color:#1d1b20}
.pp-app{display:flex;align-items:center;gap:.6em;background:#eef0f8;border-radius:1em;padding:.6em .7em}
.pp-app img{width:2.3em;height:2.3em;border-radius:50%;object-fit:cover}
.pp-app span{font-size:.95em;line-height:1.25}
.pp-lines{display:grid;gap:.42em;padding:0 .1em}
.pp-lines i{display:block;height:.5em;border-radius:1em;background:#dcdde6}
.pp-lines i.short{width:62%}
.pp-more{display:flex;align-items:center;gap:.3em;align-self:flex-start;font-size:.95em;color:#45464f;padding:.2em .35em;margin-left:-.35em}
.pp-more svg{width:1.1em;height:1.1em}
.pp-more.open svg{transform:rotate(180deg)}
.pp-install{align-self:flex-end;font-size:.98em;font-weight:600;color:#3d5ab5;padding:.35em .6em}
.pp-ok{background:#d9e2ff;color:#1d1b20;text-align:center;border-radius:2em;padding:.75em;font-size:.95em;font-weight:500;opacity:.55}
.pp-hit{position:relative;border-radius:.4em;outline:2px solid #e53935;outline-offset:1px}
.pp-tap{position:absolute;right:-.75em;bottom:-.85em;width:1.5em;height:1.5em;border-radius:50%;pointer-events:none;background:#e5393533;border:2px solid #e53935;animation:tap 1.4s ease-out infinite}
@keyframes tap{0%{transform:scale(.6);opacity:1}100%{transform:scale(1.6);opacity:0}}

/* Ghi chú trình duyệt trong app */
.browser-note{margin:20px 1px 0;display:flex;gap:10px;padding:15px 13px;background:#0a0f24a6;border:1px solid var(--line-soft);border-radius:5px}
.info-icon{width:19px;height:19px;color:var(--gold);margin-top:2px}
.browser-note h2{font-size:12px;line-height:1.6;font-weight:500;color:#ecdba6;margin-bottom:5px}
.browser-note p{font-size:11px;line-height:1.95;color:var(--muted)}
.browser-note strong{font-weight:600;color:#eef0fa}
.text-button{display:inline-flex;align-items:center;gap:6px;background:none;border:0;border-bottom:1px solid #a8b2e666;color:#cfd5f2;padding:8px 0 3px;font-size:11px;min-height:36px}
.text-button svg{width:14px;height:14px}
.copy-result:empty{display:none}
.copy-result{font-size:12px;color:var(--gold);margin-top:8px;overflow-wrap:anywhere}

/* Các bước cài */
.section-rule{height:1px;background:linear-gradient(90deg,transparent,#efcd7d66,transparent);margin:32px 0 24px;position:relative}
.section-rule span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:var(--gold);font-size:15px}
.guide>h2{text-align:center;font:500 24px/1.4 var(--serif);letter-spacing:-.5px;color:#f3dfa6}
.guide-sub{text-align:center;font-size:11px;color:var(--soft);margin:4px 0 24px}
.steps{list-style:none;padding:0;margin:0;display:grid;gap:25px}
.steps li{display:flex;gap:15px;align-items:flex-start}
.step-number{width:36px;height:36px;flex:0 0 36px;border:1px solid #efcd7d80;border-radius:50%;display:grid;place-items:center;color:#f6e7bd;font:16px var(--serif);background:#efcd7d14}
.steps li>div{padding-top:2px}
.steps h3{font:500 14px/1.6 var(--sans);letter-spacing:-.2px;margin-bottom:4px}
.steps p{font-size:11px;line-height:1.95;color:var(--muted)}
.steps a{color:var(--gold);text-underline-offset:3px}

footer{text-align:center;margin-top:40px;color:#c9c4ad}
.footer-sword{display:flex;align-items:center;justify-content:center;gap:20px;color:var(--gold);margin-bottom:15px}
.footer-sword svg{width:24px;height:44px}
.footer-sword:before,.footer-sword:after{content:'';height:1px;width:67px;background:linear-gradient(90deg,transparent,#efcd7d99)}
.footer-sword:after{transform:rotate(180deg)}
footer p{font:500 9px var(--sans);letter-spacing:2px}
footer>span{font-size:9px;display:block;margin-top:10px;color:var(--soft)}

/* Màn che khi mở trong Zalo/Facebook... */
body.gate-open{overflow:hidden}
.in-app-gate{position:fixed;inset:0;z-index:20;background:#060914f2;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);overflow-y:auto;padding:96px 16px 24px;display:flex;justify-content:center;align-items:flex-start}
.gate-arrow{position:fixed;top:6px;right:12px;color:var(--gold);display:flex;flex-direction:column;align-items:flex-end;pointer-events:none;animation:gate-bob 1.1s ease-in-out infinite}
.gate-arrow svg{width:46px;height:70px;margin-right:18px;transform:scaleX(-1) rotate(-8deg)}
.gate-dots{font:700 30px/1 Arial,sans-serif;letter-spacing:1px;border:2px solid var(--gold);border-radius:10px;padding:0 9px 8px;background:#efcd7d22}
@keyframes gate-bob{50%{transform:translateY(-6px)}}
.gate-card{width:100%;max-width:430px;background:var(--bg-2);border:1px solid var(--line);border-radius:10px;padding:24px 20px 18px;box-shadow:0 20px 80px #000a;text-align:left}
.gate-icon{color:var(--gold);width:32px;height:32px}
.gate-card h2{font:500 23px/1.35 var(--serif);margin:10px 0 8px;color:#f6e7b8}
.gate-lead{font-size:14px;color:var(--muted);line-height:1.7}
.gate-lead strong,.gate-steps strong{color:#f5e3ad}
.gate-steps{list-style:none;padding:0;margin:16px 0;display:grid;gap:12px}
.gate-steps li{display:flex;gap:12px;align-items:flex-start;font-size:15px;line-height:1.6;color:#eceffa}
.gate-steps li>span{width:28px;height:28px;flex:0 0 28px;border-radius:50%;display:grid;place-items:center;background:var(--gold);color:var(--gold-ink);font-weight:600;font-size:14px}
.dots-chip{display:inline-block;border:1px solid var(--gold);border-radius:6px;padding:0 6px;line-height:1.3;color:var(--gold)}
.gate-open{width:100%;min-height:52px;border:1px solid #f7e2a6;border-radius:4px;background:linear-gradient(115deg,#f6dc95,#dcac52 60%,#c98f35);color:var(--gold-ink);font-weight:600;font-size:16px;letter-spacing:.3px}
.gate-or{font-size:12px;color:var(--soft);margin-top:16px;line-height:1.7}
.gate-copy{display:flex;gap:8px;margin-top:8px}
.gate-copy input{flex:1;min-width:0;background:#0a0f24;border:1px solid #a8b2e655;padding:10px;color:#e6e9f7;font-size:14px;border-radius:3px}
.gate-copy button{display:inline-flex;align-items:center;gap:6px;border:1px solid #a8b2e680;background:#2b3470;color:#f6efdf;border-radius:3px;padding:0 12px;font-size:13px;white-space:nowrap}
.gate-copy svg{width:15px;height:15px}
.gate-skip{display:block;margin:16px auto 0;background:none;border:0;color:var(--soft);font-size:12px;text-decoration:underline;text-underline-offset:3px;min-height:40px}

@media(min-width:700px){
  body{background-size:100% auto}
  .page-shell{padding-top:34px;padding-bottom:50px}
  .brand-line{font-size:11px;letter-spacing:3px}
  .keyart-frame{margin-top:24px}
  .intro{font-size:14px}
  .download-panel{padding:24px 26px}
  .download-button{min-height:81px;padding:12px 22px}
  .download-button strong,.ios-soon strong{font-size:16px}
  .download-button small,.ios-soon small{font-size:11.5px}
  .protect{padding:22px 22px 18px}
  .protect h2{font-size:19px}
  .protect-lead,.protect-foot{font-size:12.5px}
  .protect-steps{gap:16px}
  .pp{font-size:12.5px}
  .browser-note h2{font-size:13px}
  .browser-note p,.steps p{font-size:12px}
  .steps h3{font-size:16px}
  .guide>h2{font-size:28px}
}
@media(max-width:359px){
  .page-shell{padding-left:16px;padding-right:16px}
  .brand-line{font-size:8px;letter-spacing:1.4px;gap:8px}
  .download-panel{padding:16px 13px}
  .download-button,.ios-soon{gap:10px;padding-left:12px;padding-right:12px}
  .download-button strong,.ios-soon strong{font-size:12.5px}
  .intro{font-size:11px}
  .protect{padding:16px 12px 14px}
  .protect-steps{grid-template-columns:1fr;gap:16px;max-width:250px;margin:auto}
  .pp{font-size:11.5px}
  .guide>h2{font-size:22px}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*:before,*:after{transition:none!important;animation:none!important}
}
