:root {
  color-scheme: dark;
  --bg: #0c0a12;
  --panel: #17121e;
  --line: #493442;
  --text: #f6f0e7;
  --muted: #c1b6cb;
  --gold: #f2c77b;
  --green: #a8dec0;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55; }
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
p, h1, h2, h3 { margin: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 700; line-height: 1.08; }
section[id] { scroll-margin-top: 2rem; }
.wrap { width: min(1120px, 100% - 3.5rem); margin-inline: auto; }
.skip { position: absolute; z-index: 5; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--gold); color: var(--bg); }
.skip:focus { top: 1rem; }
.site-header { position: relative; z-index: 2; border-bottom: 1px solid #a16e3c; background: linear-gradient(#090810, #16101a); box-shadow: 0 2px 18px #0009; }
.nav { width: min(1530px, 100% - 3rem); min-height: 79px; display: flex; align-items: center; justify-content: space-between; gap: 1.1rem; }
.brand { display: inline-flex; align-items: center; gap: .62rem; color: #fff0be; font: 700 clamp(1rem, 1.8vw, 1.65rem) Georgia, serif; letter-spacing: .015em; white-space: nowrap; }
.brand img { object-fit: contain; }
.brand-accent { color: var(--gold); }
.brand small { display: block; margin-top: .22rem; color: var(--text); font: 500 .84rem "Segoe UI", sans-serif; }
.nav nav { display: flex; align-items: center; gap: clamp(.15rem, 1.05vw, .9rem); color: var(--text); font-size: .92rem; }
.nav nav a { padding: .46rem .64rem; white-space: nowrap; }
.nav-home { color: #fff3d0; background: linear-gradient(#5e3618, #1f1111); border: 1px solid #b47c42; box-shadow: inset 0 0 8px #e68a4055; }
.nav nav a:hover, footer a:hover { color: var(--gold); }
.nav-tools { display: flex; align-items: center; gap: .55rem; }
.languages { display: flex; align-items: center; gap: .16rem; border: 1px solid var(--line); border-radius: 7px; padding: .14rem; }
.languages a { padding: .27rem .42rem; border-radius: 4px; color: var(--muted); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.languages a:hover { color: var(--text); }
.languages a[aria-current="page"] { background: #382b42; color: var(--gold); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .55rem; min-height: 47px; padding: .62rem 1rem; border: 1px solid transparent; border-radius: 4px; color: inherit; font: 700 .92rem "Segoe UI", sans-serif; text-align: center; cursor: pointer; transition: box-shadow .18s ease, border-color .18s ease; }
.button.jewel, .button.royal { border-color: #ce9c51; color: #ffedba; font-family: Georgia, "Times New Roman", serif; background: linear-gradient(#50165d, #221034 48%, #3e1756); box-shadow: inset 0 0 0 2px #100b16, inset 0 0 10px #e54aff88, 0 0 16px #b737e363; }
.button.royal { background: linear-gradient(#4b2a17, #191016 52%, #321a14); box-shadow: inset 0 0 0 2px #100b16, inset 0 0 10px #c87e405e, 0 0 12px #e48e392e; }
.button.jewel:hover, .button.royal:hover { border-color: #ffdb87; box-shadow: inset 0 0 12px #ffdb855d, 0 0 18px #d8825b88; }
.button.outline { border-color: #6b5546; color: var(--gold); }
.button.outline:hover { background: #2b2132; border-color: var(--gold); }
.hero { position: relative; isolation: isolate; display: grid; place-items: center; min-height: clamp(440px, 32vw, 635px); padding: 2rem 1rem 3.15rem; text-align: center; background: #121023; }
.hero-art { position: absolute; z-index: -2; width: 100%; height: 100%; inset: 0; object-fit: cover; object-position: center 41%; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, #0c0a12 0%, #0c0a1200 25%), radial-gradient(ellipse at 50% 52%, #0b071d5c 14%, #0b071d00 58%); }
.hero-copy { width: min(700px, 58vw); text-shadow: 0 2px 7px #000, 0 0 16px #100c22; }
.section-tag { display: flex; align-items: center; gap: .66rem; color: var(--gold); font-size: .72rem; font-weight: 750; letter-spacing: .17em; }
.section-tag span { width: 20px; height: 1px; background: var(--gold); }
.hero-title-row { display: flex; justify-content: center; align-items: center; gap: .55rem; }
.hero h1 { color: #ffebac; font-size: clamp(2.25rem, 4.38vw, 5.15rem); letter-spacing: -.035em; text-shadow: 0 3px #5b2e20, 0 0 22px #ee9d4672; }
.hero h1 span { color: #f3c4ff; text-shadow: 0 0 10px #e353ff, 0 0 28px #ac30ff; }
.ai-emblem { flex: none; width: clamp(2.5rem, 6.4vw, 6rem); height: auto; aspect-ratio: 84 / 65; color: #edb5ff; filter: drop-shadow(0 0 7px #d047ff); }
.hero-lead { margin-top: .7rem; font: 500 clamp(1.15rem, 2.05vw, 1.85rem)/1.18 Georgia, "Times New Roman", serif; }
.hero-lead strong { font-weight: 600; }
.hero-features { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; max-width: 555px; margin: 1.45rem auto 0; }
.hero-features a { display: flex; flex-direction: column; align-items: center; gap: .32rem; color: #fff2dc; font-size: clamp(.71rem, 1.05vw, .9rem); line-height: 1.25; }
.hero-features a:hover { color: var(--gold); }
.hero-features svg { width: 36px; height: 36px; color: #ffd481; filter: drop-shadow(0 0 7px #dc791d83); }
.intro { margin-top: .75rem; max-width: 41rem; color: var(--muted); }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .85rem; margin-block: 1.65rem .7rem; }
.hero-actions .button { min-width: 12.5rem; font-size: clamp(1rem, 1.55vw, 1.35rem); }
.version-note { display: flex; justify-content: center; align-items: center; gap: .55rem; color: var(--muted); font-size: .76rem; }
.version-note strong { color: var(--text); font-variant-numeric: tabular-nums; }
.dot { width: .48rem; height: .48rem; flex: none; border-radius: 50%; background: var(--green); box-shadow: 0 0 11px #a8dec066; }
.realm-badge { position: absolute; top: 1.15rem; right: clamp(1rem, 3vw, 3rem); padding: .48rem .8rem; border: 1px solid #b98d4b; background: #130e18d9; color: #ffda8c; font: 700 clamp(.8rem, 1.5vw, 1.25rem) Georgia, serif; text-transform: uppercase; box-shadow: inset 0 0 0 3px #3e261f; }
.realm-badge b { display: block; font: 600 .58em "Segoe UI", sans-serif; letter-spacing: .24em; }
.ai-section { display: grid; grid-template-columns: clamp(112px, 16vw, 170px) minmax(0, 1fr); align-items: center; gap: clamp(.9rem, 3vw, 2rem); padding-block: 1.5rem 3.3rem; }
.ai-section img { display: block; width: 100%; height: auto; border: 1px solid #634b76; border-radius: 10px; }
.ai-copy h3 { margin-top: .65rem; font-size: 1.2rem; }
.ai-copy p { max-width: 35rem; margin-top: .5rem; color: var(--muted); }
.ai-facts { display: flex; flex-wrap: wrap; gap: .38rem; list-style: none; margin: .85rem 0 0; padding: 0; }
.ai-facts li { padding: .24rem .55rem; border: 1px solid #5b426d; border-radius: 5px; color: #e1c6ff; font-size: .78rem; }
.signal-card { width: 100%; max-width: 500px; border: 1px solid #745448; border-radius: 12px; background: #1b1628; box-shadow: 0 20px 55px #08070dbb; overflow: hidden; }
.signal-head, .signal-foot { display: flex; align-items: center; gap: .65rem; padding: .8rem 1rem; background: #261c33; }
.signal-head strong { display: block; font-size: .96rem; }
.signal-head small, .signal-foot { color: var(--muted); font-size: .77rem; }
.signal-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; background: #3b2b44; color: var(--gold); font-size: 1.25rem; }
.example { margin-left: auto; color: var(--gold); font-size: .63rem; letter-spacing: .14em; }
.signal-list { padding-inline: 1rem; }
.signal-list > div { display: grid; grid-template-columns: minmax(0, 1.14fr) 2rem minmax(0, 1fr); gap: .6rem; align-items: center; min-height: 55px; padding-block: .55rem; font-size: .84rem; }
.signal-list > div + div { border-top: 1px solid var(--line); }
.signal-list small { color: var(--muted); font-size: .75rem; }
.signal-list .ok { color: var(--green); }
kbd { font: .79rem "Consolas", monospace; text-align: center; padding: .27rem; background: #30253b; border: 1px solid #513d58; border-radius: 4px; color: var(--gold); }
.signal-foot .version { margin-left: auto; color: var(--gold); font-variant-numeric: tabular-nums; }
.features { padding-block: 3.15rem; border-block: 1px solid var(--line); background: #15111e; }
h2 { margin-top: .55rem; font-size: clamp(2rem, 4.5vw, 3.15rem); letter-spacing: -.036em; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.45rem; }
.feature-grid article { padding: 1.1rem 1.25rem 1.3rem; background: var(--panel); border: 1px solid var(--line); border-top-color: #73553f; border-radius: 7px; }
.feature-number { color: var(--gold); font: 1rem Georgia, serif; }
.feature-grid h3 { font-size: 1.08rem; margin-top: .45rem; }
.feature-grid p, .release-info p, .section-head p { margin-top: .35rem; color: var(--muted); font-size: .94rem; }
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: center; margin-top: 1.8rem; }
.demo-copy h3 { font-size: 1.25rem; }
.demo-copy p { max-width: 28rem; margin-top: .4rem; color: var(--muted); }
.demo .signal-card { justify-self: end; }
.updates { padding-block: 3.7rem 2.4rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-head p { max-width: 25rem; }
.release-list { display: grid; gap: .55rem; }
.release { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: .95rem 1.15rem; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.release.current { border-color: #826246; background: #241b30; }
.release-version { display: flex; flex-wrap: wrap; align-items: center; gap: .42rem; }
.release h3 { font-size: 1.04rem; font-variant-numeric: tabular-nums; }
.pill { padding: .12rem .4rem; border-radius: 5px; background: #47344a; color: var(--gold); font-size: .7rem; }
.download { white-space: nowrap; }
.install { margin-top: 1.1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); }
.install summary { color: var(--gold); cursor: pointer; font-weight: 650; }
.install ol { margin: .65rem 0 .15rem; padding-left: 1.25rem; }
.install code { color: var(--text); }
.purchase { position: relative; z-index: 1; width: min(1500px, 100% - 2.3rem); margin-top: -1.25rem; padding-bottom: 2.6rem; }
.purchase-frame { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(255px, 1fr); gap: clamp(1rem, 3.3vw, 3.3rem); align-items: end; padding: .8rem clamp(1rem, 3.1vw, 3.4rem) 1.8rem; border: 2px solid #d09752; background: radial-gradient(ellipse at 50% 0%, #261a35, #0e0c16 65%); box-shadow: inset 0 0 0 4px #221622, inset 0 0 0 5px #775133, 0 0 15px #d98d3a55; }
.purchase-frame h2 { color: #ffedb8; text-align: center; font-size: clamp(1.8rem, 3.3vw, 3rem); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.55rem, 1.4vw, 1.25rem); margin-top: 1.15rem; }
.plan, .license-guide { position: relative; border: 1px solid #a66f45; background: linear-gradient(145deg, #251823, #120e17 52%, #1f1426); box-shadow: inset 0 0 0 3px #0c0a11, inset 0 0 0 4px #68454d; }
.plan { min-width: 0; padding: .85rem .65rem 1rem; text-align: center; }
.plan-all { border-color: #ffc36b; background: radial-gradient(ellipse at 50% 3%, #4e2d18, #201119 65%); box-shadow: inset 0 0 0 3px #2b1721, inset 0 0 0 4px #a97140, 0 0 17px #ed7a3f8a; }
.plan-emblem { display: block; margin: 0 auto .15rem; width: 55px; height: 55px; color: #ffcb73; filter: drop-shadow(0 0 6px #f3894266); }
.plan h3 { color: #fff0c0; font: 700 clamp(1.23rem, 2.4vw, 2.15rem) Georgia, serif; }
.plan p { color: #f5deb0; font-family: Georgia, serif; margin-top: .22rem; }
.plan .price { margin-block: .22rem 0; color: #ffe4a2; }
.plan .plan-qr { margin-block: .15rem .8rem; color: var(--muted); font: 600 .82rem "Segoe UI", sans-serif; }
.plan-qr data { display: inline-block; white-space: nowrap; color: var(--text); }
.price strong { color: var(--gold); font: 700 clamp(1.9rem, 3.3vw, 3rem) Georgia, serif; font-variant-numeric: tabular-nums; }
.plan .button { width: min(100%, 14rem); min-height: 39px; }
.plan .vietqr-link { margin-bottom: .42rem; }
.license-guide { padding: 1rem 1.12rem; scroll-margin-top: 1rem; }
.license-guide h3 { color: #ffedb8; text-align: center; font: 700 clamp(1.16rem, 2vw, 1.65rem) Georgia, serif; }
.license-guide ol { margin: .65rem 0; padding: 0; list-style: none; counter-reset: guide; }
.license-guide li { display: grid; grid-template-columns: 26px 1.1rem 1fr; align-items: center; gap: .42rem; padding-block: .32rem; counter-increment: guide; font-size: .88rem; }
.license-guide li::before { content: counter(guide); grid-column: 2; grid-row: 1; color: var(--gold); font-weight: 700; text-align: center; }
.license-guide svg { grid-column: 1; grid-row: 1; width: 26px; height: 26px; color: #df9afa; }
.license-notice { padding: .55rem .7rem; border: 1px solid #604049; background: #211628; color: var(--gold); font-size: .86rem; }
.license-notice p { color: var(--text); }
.support { padding-block: .8rem 2.7rem; }
.support details p { margin: .45rem 0; }
.support details a { color: var(--gold); text-decoration: underline; }
.store-panel { margin-block: 1rem 2rem; padding: 1.2rem clamp(1rem, 4vw, 2rem); border: 1px solid #8e6244; background: var(--panel); }
.store-panel h2 { margin-bottom: .5rem; color: #ffedb8; }
.store-panel p { color: var(--muted); }
.store-panel .button { margin-top: .7rem; }
.store-panel fieldset { margin: .9rem 0 .25rem; border: 1px solid var(--line); }
.class-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .35rem .7rem; }
.class-options label { display: flex; gap: .45rem; align-items: center; }
.class-options input { accent-color: #d28bf4; }
.vietqr-payment { display: grid; grid-template-columns: minmax(0, 1fr) minmax(155px, 240px); gap: 1.15rem; margin-top: 1rem; }
.vietqr-payment h3 { color: #ffedb8; }
.vietqr-payment p { margin-top: .35rem; }
.vietqr-payment label { display: block; margin: .7rem 0 .3rem; }
.vietqr-payment textarea { display: block; width: 100%; padding: .55rem; border: 1px solid var(--line); color: var(--text); background: var(--bg); font: inherit; }
.vietqr-code, .vietqr-code > a:first-child { display: grid; align-content: start; gap: .4rem; color: var(--gold); text-align: center; }
.vietqr-payment img { display: block; width: 100%; height: auto; border: 1px solid #9e764e; }
.order-contact a { color: var(--gold); overflow-wrap: anywhere; }
#vietqr-status, #vietqr-copy-status { color: var(--gold); }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.2rem; }
@media (max-width: 1100px) {
  .nav { flex-wrap: wrap; min-height: auto; gap: .7rem; padding-block: .7rem; }
  .nav nav { width: 100%; order: 3; flex-wrap: wrap; column-gap: .4rem; row-gap: .3rem; }
}
@media (max-width: 780px) {
  .hero { display: block; min-height: auto; padding-top: clamp(140px, 35vw, 245px); }
  .hero-art { height: clamp(155px, 44vw, 300px); object-position: center top; }
  .hero::after { background: linear-gradient(#0c0a1200 75px, #0c0a12 clamp(160px, 45vw, 310px)); }
  .hero-copy { width: min(100%, 36rem); margin-inline: auto; }
  .hero h1 { font-size: clamp(1.9rem, 6.8vw, 3.4rem); }
  .purchase-frame { grid-template-columns: 1fr; }
  .ai-section { padding-block: 1rem 2.5rem; }
  .demo { grid-template-columns: 1fr; }
  .demo .signal-card { justify-self: start; }
  .section-head { display: block; }
  .section-head p { margin-top: .65rem; }
}
@media (max-width: 590px) {
  .wrap { width: calc(100% - 2rem); }
  .nav .brand { gap: .42rem; font-size: 1rem; }
  .nav .brand small { font-size: .66rem; }
  .nav .brand img { width: 30px; height: 30px; }
  .nav-tools { flex-wrap: wrap; }
  .nav nav a { padding: .35rem .42rem; font-size: .82rem; }
  .hero-features svg { width: 25px; height: 25px; }
  .hero-actions .button { min-width: 0; flex: 1 1 8.5rem; }
  .realm-badge { display: none; }
  .ai-section { grid-template-columns: 96px minmax(0, 1fr); align-items: start; }
  .ai-section img { margin-top: .65rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .release { grid-template-columns: 1fr auto; gap: .4rem .65rem; padding: .8rem; }
  .release-info { grid-column: 1 / -1; grid-row: 2; }
  .download { grid-column: 2; grid-row: 1; min-height: 35px; padding: .3rem .55rem; font-size: .79rem; }
  .purchase-frame { padding-inline: .7rem; }
  .vietqr-payment { grid-template-columns: 1fr; }
  .vietqr-code { width: min(100%, 270px); justify-self: center; }
  .plan { padding-inline: .28rem; }
  .plan .button { padding-inline: .2rem; font-size: .79rem; }
  .plan-emblem { width: 42px; height: 42px; }
  .footer-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}

.sandbox-order { margin-top: 1rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.sandbox-order h3 { color: #ffedb8; }
.sandbox-order p { overflow-wrap: anywhere; }
.sandbox-order textarea { display: block; width: 100%; max-width: 38rem; margin-top: .6rem; }
