/* VYRA Games storefront. Classic game top-up store look: light page, deep violet header, white cards with soft shadows,
   game tiles, price cards and a numbered 1-2-3 checkout. Built from tokens; no layout depends on text length.
   Motion is decoration only and stops under prefers-reduced-motion. */
:root {
  --bg: #f4f5fa;
  --paper: #eef0f7;
  --s1: #ffffff;
  --s2: #f8f9fc;
  --s3: #eceef6;
  --ink: #15172b;
  --text: #15172b;
  --muted: #5b6075;
  --faint: #7a8096;
  --line: #e3e5ef;
  --soft: #eceef5;
  --brand: #6c3cff;
  --brand-2: #5527e8;
  --brand-bg: #f0ebff;
  --brand-deep: #1c1240;
  --brand-deep-2: #2e1a6b;
  --amber: #ffb020;
  --amber-bg: #fff4dc;
  --pink: #ff4f8b;
  --blue: var(--brand);     /* old token names still used by some rules */
  --sky: #8b6bff;
  --sky-bg: var(--brand-bg);
  --sun: var(--amber);
  --mint: #19c37d;
  --ok: #0f9d63;
  --ok-bg: #e2f8ee;
  --warn: #9a6200;
  --warn-bg: #fff4dc;
  --bad: #d92d4a;
  --bad-bg: #ffe8ec;
  --wait: #4f46e5;
  --wait-bg: #eceaff;
  --r-s: 10px;
  --r: 14px;
  --r-l: 20px;
  --shadow-s: 0 1px 2px rgba(21, 23, 43, .05), 0 2px 8px rgba(21, 23, 43, .04);
  --shadow: 0 2px 4px rgba(21, 23, 43, .04), 0 8px 24px rgba(21, 23, 43, .07);
  --shadow-l: 0 6px 12px rgba(21, 23, 43, .06), 0 20px 48px rgba(21, 23, 43, .12);
  --head: "Prompt", "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, sans-serif;
  --body: "Noto Sans Thai", "Prompt", "Leelawadee UI", Tahoma, system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 600; line-height: 1.2; margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(108, 60, 255, .45); outline-offset: 2px; }
main { flex: 1; outline: none; overflow-x: clip; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: linear-gradient(90deg, var(--brand-deep), var(--brand-deep-2)); color: #fff; box-shadow: 0 2px 12px rgba(28, 18, 64, .25); }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; color: #fff; }
.brand-mark { width: 36px; height: 36px; transition: transform .3s var(--ease); }
.brand:hover .brand-mark { transform: scale(1.06); }
.brand-word { font: 700 20px/1 var(--head); letter-spacing: .08em; }
.brand-word span { color: var(--amber); margin-left: .3em; font-weight: 500; }
.brand-word.small { font-size: 18px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: rgba(255, 255, 255, .78); padding: 8px 14px; border-radius: 999px; font: 500 15px/1.3 var(--head); white-space: nowrap; transition: color .15s, background .15s; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .16); }
.lang { display: flex; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 3px; flex-shrink: 0; }
.lang button, .lang a { border: 0; background: none; padding: 4px 12px; border-radius: 999px; font: 600 13px/1.4 var(--head); color: rgba(255, 255, 255, .75); cursor: pointer; text-decoration: none; }
.lang button[aria-pressed="true"], .lang a[aria-current="true"] { background: #fff; color: var(--brand-deep); }

.testmode { background: var(--amber); color: #2a1a00; font-size: 14px; }
.testmode .wrap { padding-top: 8px; padding-bottom: 8px; }
.testmode strong { margin-right: 6px; font-family: var(--head); }

/* ---------- buttons, inputs, chips ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--s1); color: var(--ink); font: 600 16px/1 var(--head); text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-s); transition: transform .14s var(--ease), box-shadow .14s var(--ease), background .15s, border-color .15s; }
.btn:hover { border-color: #cfd2e2; box-shadow: var(--shadow); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: var(--shadow-s); }
.btn.primary { background: linear-gradient(180deg, #7a4dff, var(--brand)); border-color: var(--brand-2); color: #fff; box-shadow: 0 6px 16px rgba(108, 60, 255, .32); }
.btn.primary:hover { background: linear-gradient(180deg, var(--brand), var(--brand-2)); box-shadow: 0 8px 22px rgba(108, 60, 255, .4); }
.btn.primary .arrow { display: inline-block; transition: transform .2s var(--ease); }
.btn.primary:hover .arrow { transform: translateX(4px); }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.spin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 8px; }
.field label { font: 600 14px/1.3 var(--head); color: var(--ink); }
.input { width: 100%; min-height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid #d6d9e6; background: var(--s1); color: var(--text); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: #9aa0b4; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(108, 60, 255, .14); }
.input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(217, 45, 74, .12); }
.hint { font-size: 13px; color: var(--faint); }
.err { font-size: 14px; color: var(--bad); font-weight: 600; }
.row { display: flex; gap: 12px; }
.row > .input { flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 13px; font-weight: 500; color: #fff; white-space: nowrap; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }

/* ---------- motion helpers ---------- */
.reveal { transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0s); }
.motion .reveal:not(.in) { opacity: 0; transform: translateY(18px); }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes flow { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.rise { animation: rise .6s var(--ease) both; animation-delay: var(--d, 0s); }

/* ---------- home: promo banner ---------- */
.hero { position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(520px 320px at 88% 10%, rgba(255, 176, 32, .35), transparent 70%), radial-gradient(600px 400px at 10% 110%, rgba(255, 79, 139, .35), transparent 70%),
              linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-deep-2) 45%, var(--brand) 100%); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1.2px, transparent 1.2px); background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); }
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; padding-block: clamp(40px, 6vw, 72px); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1 var(--head); color: #2a1a00; background: var(--amber); border-radius: 999px; padding: 7px 14px; }
.hero h1 { font-size: clamp(32px, 5vw, 56px); margin: 18px 0 14px; font-weight: 700; line-height: 1.15; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero p.lead { font-size: clamp(16px, 1.6vw, 18px); color: rgba(255, 255, 255, .82); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .btn:not(.primary) { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; box-shadow: none; }
.hero .btn:not(.primary):hover { background: rgba(255, 255, 255, .2); }
.hero .btn.primary { background: var(--amber); border-color: var(--amber); color: #2a1a00; box-shadow: 0 8px 20px rgba(255, 176, 32, .35); }
.trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 12px; margin-top: 28px; }
.stat { min-width: 128px; padding: 12px 16px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--r); }
.stat small { display: block; font-size: 12px; color: rgba(255, 255, 255, .7); }
.stat b { display: block; font: 700 22px/1.25 var(--head); }
.stat:first-child b { color: var(--amber); }

/* hero art: the featured game card with small info badges */
.stage { position: relative; padding: 30px 18px 80px 26px; }
.hero-card { position: relative; background: var(--s1); color: var(--ink); border-radius: var(--r-l); padding: 10px; box-shadow: 0 24px 60px rgba(10, 4, 40, .45); animation: float 6s ease-in-out infinite; }
.hero-card .hero-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; }
.hero-card .hero-game { padding: 12px 6px 4px; display: grid; gap: 2px; }
.hero-card .hero-game b { font: 600 20px/1.25 var(--head); }
.hero-card .hero-game small { color: var(--muted); font-size: 13px; }
.sticker { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; background: var(--s1); color: var(--ink); border-radius: var(--r); padding: 10px 14px;
  box-shadow: var(--shadow-l); font: 600 14px/1.25 var(--head); animation: float 5s ease-in-out infinite; }
.sticker small { display: block; font: 400 12px/1.3 var(--body); color: var(--faint); }
.sticker .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; flex-shrink: 0; background: var(--brand-bg); color: var(--brand); }
.sticker.s1 { right: 0; top: 0; animation-delay: -1.5s; }
.sticker.s1 .ico { background: var(--amber-bg); color: #b86e00; }
.sticker.s2 { left: 0; bottom: 6px; animation-delay: -3s; }
.sticker.s2 .ico { background: var(--ok-bg); color: var(--ok); }
.sticker.s3 { right: 0; bottom: 0; animation-delay: -.6s; }
.coin { position: absolute; z-index: 3; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; left: 2px; top: 2px; font: 700 19px/1 var(--head); color: #2a1a00;
  background: radial-gradient(circle at 35% 30%, #ffe08a, var(--amber) 60%, #e39400); box-shadow: 0 6px 16px rgba(227, 148, 0, .45); animation: float 4s ease-in-out infinite; }

/* info strip under the banner */
.band { background: var(--s1); color: var(--muted); border-bottom: 1px solid var(--line); overflow: hidden; }
.band-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.band:hover .band-track { animation-play-state: paused; }
.band-item { display: inline-flex; align-items: center; gap: 12px; padding: 13px 24px; font: 500 14px/1 var(--head); white-space: nowrap; }
.band-item::before { content: "✓"; width: 20px; height: 20px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-size: 11px; font-weight: 700; }

.section { padding: clamp(40px, 6vw, 72px) 0; }
.section.alt { background: var(--s1); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); }
.section-head p { color: var(--muted); margin-top: 4px; }
.kicker { display: inline-block; font: 600 13px/1 var(--head); color: var(--brand); background: var(--brand-bg); padding: 6px 12px; border-radius: 999px; margin-bottom: 10px; }

/* game tiles */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.game { --accent: var(--brand); position: relative; display: flex; flex-direction: column; background: var(--s1); border-radius: var(--r-l); overflow: hidden; text-decoration: none;
  box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.game:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); }
.game-cover { aspect-ratio: 16 / 9; background: var(--s3); overflow: hidden; }
.game-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.game:hover .game-cover img { transform: scale(1.05); }
.game-body { display: grid; gap: 4px; padding: 16px 18px 18px; flex: 1; }
.game-body h3 { font-size: 19px; }
.game-body p { color: var(--muted); font-size: 14px; }
.game-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.game-foot .from { font-size: 12px; color: var(--faint); }
.game-foot .from b { display: block; font: 700 19px/1.2 var(--head); color: var(--ink); }
.game-foot .go { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border-radius: 10px; background: var(--brand); color: #fff;
  font: 600 14px/1 var(--head); flex-shrink: 0; transition: background .2s; }
.game-foot .go::before { content: "เติมเลย"; margin-right: 6px; }
:root:lang(en) .game-foot .go::before { content: "Top up"; }
.game:hover .go { background: var(--brand-2); }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { position: relative; background: var(--s1); border-radius: var(--r-l); padding: 24px; box-shadow: var(--shadow); }
.step .n { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font: 700 19px/1 var(--head); box-shadow: 0 6px 14px rgba(108, 60, 255, .3); }
.step:nth-child(2) .n { background: var(--pink); box-shadow: 0 6px 14px rgba(255, 79, 139, .3); }
.step:nth-child(3) .n { background: var(--amber); color: #2a1a00; box-shadow: 0 6px 14px rgba(255, 176, 32, .35); }
.step h3 { font-size: 18px; margin: 16px 0 6px; }
.step p { color: var(--muted); font-size: 15px; }
.section.dark { background: var(--s1); border-block: 1px solid var(--line); }
.section.dark .step { background: var(--bg); box-shadow: none; }

/* ---------- game page / checkout ---------- */
.game-hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--brand-deep), var(--brand-deep-2)); }
.game-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .35; filter: blur(2px) saturate(1.1); transform: scale(1.05); }
.game-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(28, 18, 64, .95) 30%, rgba(46, 26, 107, .6)); }
.game-hero-in { position: relative; z-index: 1; display: flex; align-items: center; gap: 22px; padding-block: clamp(26px, 4vw, 42px); }
.game-hero img.thumb { width: clamp(72px, 12vw, 104px); aspect-ratio: 1; border-radius: 20px; object-fit: cover; flex-shrink: 0; border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
.game-hero h1 { font-size: clamp(26px, 3.6vw, 38px); }
.game-hero p { color: rgba(255, 255, 255, .78); margin-top: 4px; }
.game-hero .operator { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .9); border-color: rgba(255, 255, 255, .16); }
.operator { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line);
  color: var(--text); font-size: 14px; max-width: 46em; }
.studio-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); margin-top: 8px; flex-shrink: 0; }
.agree { margin-top: 14px; font-size: 13px; color: var(--muted); }
.agree a { color: var(--brand); font-weight: 600; }
.crumbs { font-size: 14px; color: rgba(255, 255, 255, .7); margin-bottom: 8px; }
.crumbs a { color: #fff; text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.page .crumbs, .order .crumbs { color: var(--faint); }
.page .crumbs a, .order .crumbs a { color: var(--brand); }

.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 24px; align-items: start; padding-block: 28px 64px; }
.panel { background: var(--s1); border-radius: var(--r-l); padding: clamp(18px, 3vw, 26px); box-shadow: var(--shadow); transition: opacity .25s; }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.panel-head .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font: 700 15px/1 var(--head); flex-shrink: 0; }
.panel.done .panel-head .n { background: var(--mint); animation: pop .35s var(--ease); }
.panel-head h2 { font-size: 19px; }
.panel-head .sub { margin-left: auto; color: var(--faint); font-size: 13px; text-align: right; }
.panel.locked { opacity: .55; }
.panel.locked .panel-head .n { background: #b9bdd0; }
.panel.locked .lock-note { display: block; }
.lock-note { display: none; color: var(--faint); font-size: 14px; }

.found { margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: var(--ok-bg); border: 1px solid #bfeed7; animation: rise .35s var(--ease) both; }
.found .who { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.found .who::before { content: "✓"; width: 22px; height: 22px; border-radius: 50%; background: var(--mint); color: #fff; display: grid; place-items: center; font-size: 12px; flex-shrink: 0; }
.chars { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.char { border: 1px solid var(--line); background: var(--s1); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 14px; font-weight: 600; text-align: left; transition: border-color .12s, box-shadow .12s; }
.char:hover { border-color: #c9cde0; box-shadow: var(--shadow-s); }
.char small { display: block; color: var(--faint); font-size: 12px; font-weight: 400; }
.char[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-bg); }
.notfound { margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: var(--bad-bg); border: 1px solid #ffc9d2; color: var(--bad); font-size: 15px; font-weight: 600; }

/* price cards */
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.pack { position: relative; display: grid; gap: 2px; justify-items: center; text-align: center; padding: 18px 12px 0; border-radius: 14px; border: 2px solid var(--line); background: var(--s1);
  cursor: pointer; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s var(--ease); min-height: 136px; align-content: start; }
.pack::before { content: ""; width: 34px; height: 34px; margin-bottom: 6px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe08a, var(--amber) 60%, #e39400);
  box-shadow: 0 3px 8px rgba(227, 148, 0, .35); }
.pack:not([disabled]):hover { border-color: #c9bdff; box-shadow: var(--shadow); transform: translateY(-2px); }
.pack[disabled] { cursor: not-allowed; opacity: .5; }
.pack[aria-checked="true"] { border-color: var(--brand); background: var(--brand-bg); box-shadow: 0 0 0 4px rgba(108, 60, 255, .12); }
.pack[aria-checked="true"]::after { content: "✓"; position: absolute; top: 0; right: 0; width: 26px; height: 26px; border-radius: 0 0 0 12px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; animation: pop .3s var(--ease); }
.pack .amt { font: 700 22px/1.15 var(--head); }
.pack .unit { font-size: 13px; color: var(--muted); }
.pack .bonus { margin-top: 4px; font: 600 11px/1 var(--head); color: #fff; background: var(--pink); padding: 4px 8px; border-radius: 999px; }
.pack .price { align-self: end; justify-self: stretch; margin: 12px -12px 0; padding: 9px 8px; font: 700 16px/1 var(--head); color: var(--brand); background: var(--s2); border-top: 1px solid var(--line); }
.pack[aria-checked="true"] .price { background: var(--brand); color: #fff; border-top-color: var(--brand); }

.summary { position: sticky; top: 86px; }
.summary h2 { font-size: 19px; margin-bottom: 16px; }
.sum-game { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.sum-game img { width: 50px; height: 50px; border-radius: 12px; object-fit: cover; }
.sum-game b { font-family: var(--head); }
.sum-game small { display: block; color: var(--faint); }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-weight: 600; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 18px 0; padding-top: 16px; border-top: 1px dashed var(--line); }
.total span { color: var(--muted); font-weight: 600; }
.total b { font: 700 30px/1 var(--head); color: var(--brand); }
.secure { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13px; color: var(--faint); }
.lock { display: inline-block; width: 14px; height: 16px; flex-shrink: 0; margin-top: 2px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 16'%3E%3Cpath d='M3 7V5a4 4 0 0 1 8 0v2h1a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm2 0h4V5a2 2 0 0 0-4 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 16'%3E%3Cpath d='M3 7V5a4 4 0 0 1 8 0v2h1a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm2 0h4V5a2 2 0 0 0-4 0z'/%3E%3C/svg%3E") center / contain no-repeat; }
.paybar { display: none; }

/* ---------- order status ---------- */
.order { max-width: 824px; margin: 0 auto; padding-block: 36px 68px; }
.status-hero { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 30px 24px 26px; }
.status-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; font-weight: 700; animation: pop .45s var(--ease); }
.status-icon.ok { background: var(--mint); color: #fff; box-shadow: 0 10px 24px rgba(25, 195, 125, .35); }
.status-icon.wait { background: var(--wait-bg); color: var(--wait); }
.status-icon.warn { background: var(--amber); color: #2a1a00; }
.status-icon.bad { background: var(--bad-bg); color: var(--bad); }
.status-icon .spin { width: 30px; height: 30px; border-width: 3px; }
.status-hero h1 { font-size: clamp(24px, 3.6vw, 32px); }
.status-hero p { color: var(--muted); max-width: 32em; }
.track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 24px; }
.track div { position: relative; padding-top: 18px; font-size: 13px; color: var(--faint); text-align: center; font-weight: 600; }
.track div::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 99px; background: var(--s3); }
.track div.on { color: var(--ink); }
.track div.on::before { background: var(--brand); }
.track div.now::before { background: linear-gradient(90deg, var(--brand), var(--sky), var(--s3)); background-size: 200% 100%; animation: flow 1.4s linear infinite; }
.receipt { margin-top: 20px; }
.receipt h2 { font-size: 18px; margin-bottom: 14px; display: flex; justify-content: space-between; gap: 12px; }
.receipt h2 small { font: 600 13px/1.4 var(--body); color: var(--warn); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }

/* ---------- orders list, pages ---------- */
.page { padding-block: 36px 68px; }
.page h1 { font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 8px; }
.page > .wrap > p.lead { color: var(--muted); margin-bottom: 24px; }
.list { display: grid; gap: 10px; }
.olist { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--s1);
  text-decoration: none; box-shadow: var(--shadow-s); transition: box-shadow .15s, transform .15s var(--ease); }
.olist:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.olist img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.olist b { font-family: var(--head); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.olist small { color: var(--faint); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.olist .right { text-align: right; display: grid; gap: 6px; justify-items: end; }
.olist .right b { font-size: 16px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 600 12px/1.2 var(--head); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.wait { background: var(--wait-bg); color: var(--wait); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.empty { text-align: center; padding: 40px 20px; color: var(--faint); border: 1px dashed #cfd3e3; border-radius: var(--r); background: var(--s1); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 24px; align-items: start; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--s1); border-radius: 14px; padding: 0 18px; box-shadow: var(--shadow-s); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: var(--brand-bg); color: var(--brand);
  display: grid; place-items: center; font: 600 18px/1 var(--head); transition: transform .25s var(--ease); }
.faq details[open] summary::after { content: "–"; background: var(--brand); color: #fff; }
.faq details p { padding-bottom: 16px; color: var(--muted); }
.prose { max-width: 760px; display: grid; gap: 14px; color: var(--muted); }
.prose h2 { color: var(--text); font-size: 20px; margin-top: 10px; }

.skeleton { background: linear-gradient(90deg, var(--s3), #f7f8fc, var(--s3)); background-size: 200% 100%; animation: flow 1.6s linear infinite; border-radius: var(--r-l); }
.skeleton.h-lg { height: 420px; }
.skeleton.h-md { height: 320px; }
.skeleton.h-sm { height: 76px; }
.wrap.pad { padding-top: 40px; padding-bottom: 40px; }
.section.flush-top { padding-top: 0; }
.mt-0 { margin-top: 0 !important; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mb-16 { margin-bottom: 16px; }
.wrap-any { overflow-wrap: anywhere; }
.section-head.tight { margin-bottom: 14px; }
.h-sub { font-size: 20px; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.stack { display: grid; gap: 14px; }
.narrow { max-width: 760px; }

/* ---------- footer, toast ---------- */
.footer { background: var(--brand-deep); color: rgba(255, 255, 255, .8); }
.footer .brand-word { color: #fff; }
.footer-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; padding-top: 36px; padding-bottom: 32px; }
.footer-brand p { color: rgba(255, 255, 255, .6); font-size: 14px; margin-top: 10px; max-width: 30em; }
.footer-links { display: flex; gap: 20px; align-items: start; flex-wrap: wrap; }
.footer-links a { color: rgba(255, 255, 255, .78); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 4px; }
.footer-pay { display: flex; gap: 8px; color: rgba(255, 255, 255, .6); font-size: 13px; grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); }
.footer-copy { color: rgba(255, 255, 255, .45); font-size: 13px; grid-column: 1 / -1; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  box-shadow: var(--shadow-l); max-width: calc(100% - 32px); font-size: 14px; }

/* hero decoration: soft glows only */
.blobs, .deco { display: none; }

/* one game in the store: show it as a wide featured card */
.games.single { grid-template-columns: 1fr; }
.games.single .game { flex-direction: row; }
.games.single .game-cover { flex: 0 0 56%; aspect-ratio: auto; min-height: 280px; }
.games.single .game-body { padding: clamp(20px, 3vw, 34px); align-content: center; }
.games.single .game-body h3 { font-size: clamp(24px, 3vw, 32px); }
.games.single .game-body p { font-size: 16px; }
.games.single .game-foot .from b { font-size: 26px; }

/* ---------- static landing (Legal/home.*.html) ---------- */
.landing .hero-card { animation: none; }
.product { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px; align-items: start; }
.product-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; box-shadow: var(--shadow); }
.product-body { display: grid; gap: 10px; }
.product-body h3 { font-size: 24px; }
.product-body > p { color: var(--muted); }
.product-body .operator { margin-top: 2px; }
.product-kv { margin-top: 6px; }
.product-kv dd { text-align: left; }
.notice { margin-top: 6px; padding: 10px 14px; border-radius: 12px; background: var(--brand-bg); color: var(--text) !important; font-size: 14px; }
.policies { margin-top: 24px; color: var(--muted); font-size: 14px; }
.policies a { color: var(--brand); font-weight: 600; }

/* ---------- legal pages (server-rendered, Legal/LegalPages.cs) ---------- */
.legal-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; align-items: start; }
.legal-nav { position: sticky; top: 86px; display: grid; gap: 2px; padding: 8px; border-radius: var(--r); background: var(--s1); box-shadow: var(--shadow-s); }
.legal-nav a { padding: 10px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.legal-nav a:hover { background: var(--s2); color: var(--ink); }
.legal-nav a[aria-current="page"] { background: var(--brand-bg); color: var(--brand); font-weight: 600; }
.legal-body { max-width: 780px; color: #3b3f55; }
.legal-body .eyebrow { margin: 0; color: var(--brand); background: var(--brand-bg); }
.legal-body h1 { color: var(--text); font-size: clamp(26px, 3.6vw, 36px); margin: 14px 0 0; }
.legal-body .effective { color: var(--faint); font-size: 14px; margin-bottom: 8px; }
.legal-body h2 { margin-top: 18px; color: var(--ink); font-size: 20px; }
.legal-body ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.legal-body a { color: var(--brand); font-weight: 600; }
.legal-body strong { color: var(--text); }
.legal-kv { padding: 18px; border-radius: var(--r); background: var(--s1); box-shadow: var(--shadow-s); }
.legal-kv dd { text-align: left; }
mark.ph { background: var(--warn-bg); color: var(--warn); border: 1px dashed var(--warn); border-radius: 6px; padding: 0 6px; }

.price-head { font: 600 15px/1.3 var(--head); margin-top: 6px; }
.price-table { width: 100%; max-width: 440px; border-collapse: separate; border-spacing: 0; font-size: 15px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--s1); }
.price-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; padding: 9px 12px; background: var(--s2); border-bottom: 1px solid var(--line); }
.price-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.price-table td:first-child { font: 700 16px/1.2 var(--head); color: var(--brand); white-space: nowrap; }
.price-table tr:last-child td { border-bottom: 0; }
.support-links { list-style: none; padding: 0 !important; }
.support-links a { display: inline-flex; padding: 10px 14px; border-radius: 12px; background: var(--s1); text-decoration: none; box-shadow: var(--shadow-s); }

/* ---------- tablet / phone ---------- */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 32px; } /* minmax(0,…): long headline words must not widen the column */
  .stage { max-width: 520px; width: 100%; justify-self: center; }
  .checkout, .two { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 860px) {
  .legal-grid { grid-template-columns: 1fr; gap: 20px; }
  .legal-nav { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none; }
  .legal-kv { grid-template-columns: 1fr; gap: 2px; }
  .legal-kv dd { margin-bottom: 10px; }
  .product { grid-template-columns: 1fr; gap: 18px; }
  .product-kv { grid-template-columns: 1fr; gap: 2px; }
  .product-kv dd { margin-bottom: 8px; }
}
@media (max-width: 720px) {
  .topbar-in { height: auto; flex-wrap: wrap; gap: 6px 12px; padding-top: 10px; padding-bottom: 8px; }
  .nav { order: 3; width: 100%; margin: 0 -8px; overflow-x: auto; scrollbar-width: none; padding: 0 0 2px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 12px; font-size: 14px; }
  .lang { margin-left: auto; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-word { font-size: 18px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { min-width: 0; padding: 10px; }
  .stat small { font-size: 11px; }
  .stat b { font-size: 17px; }
  .stage { padding: 28px 8px 80px 14px; }
  .sticker { padding: 8px 11px; font-size: 13px; }
  .sticker .ico { width: 28px; height: 28px; font-size: 14px; }
  .sticker.s2 { display: none; } /* two bottom badges do not fit side by side on a phone */
  .sticker.s1 { top: -4px; }
  .coin { width: 42px; height: 42px; font-size: 16px; }
  .steps { grid-template-columns: 1fr; }
  .game-hero-in { flex-direction: column; align-items: flex-start; gap: 14px; }
  .game-hero img.thumb { width: 72px; border-radius: 16px; }
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .game-body { padding: 12px 12px 14px; }
  .game-body h3 { font-size: 16px; }
  .game-body p { display: none; }
  .game-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .game-foot .go { height: 34px; }
  .games.single { grid-template-columns: 1fr; }
  .games.single .game { flex-direction: column; }
  .games.single .game-cover { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  .games.single .game-body p { display: block; }
  .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { flex-direction: column; }
  .row .btn { width: 100%; }
  .summary .btn.pay { display: none; }
  .checkout { padding-bottom: 130px; }
  .paybar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 12px; align-items: center; justify-content: space-between;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -6px 20px rgba(21, 23, 43, .08); }
  .paybar .t small { display: block; color: var(--faint); font-size: 12px; }
  .paybar .t b { font: 700 21px/1.1 var(--head); color: var(--brand); }
  .paybar .btn { flex: 1; max-width: 230px; }
  .footer-in { grid-template-columns: 1fr; }
  .olist { grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; padding: 12px 14px; }
  .olist img { grid-row: span 2; align-self: start; width: 40px; height: 40px; }
  .olist .right { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
  .track div { font-size: 12px; }
  .kv { font-size: 14px; }
}

@media print {
  .topbar, .footer, .testmode, .actions, .toast, .band { display: none !important; }
  body { background: #fff; color: #000; }
  .panel { box-shadow: none; border: 1px solid #999; background: #fff; }
  .kv dt, .receipt h2 small { color: #444; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion .reveal:not(.in) { opacity: 1; transform: none; }
}
