/* The home page (index.html) and the top-up page (nap.html): the colours and fonts of the game (css/style.css), the
   buttons and boxes of the client's newer interface (Interface/GFx, built into assets/tex/ui by tools/extract-gfx.mjs),
   the login picture of the client as the top of the home page (Interface/lo_back_s5_im01..06).
   Titles in Grenze Gotisch (Google Fonts, SIL OFL; the woff2 files of fonts.googleapis.com kept in site/fonts). */
@font-face { font-family: 'Grenze Gotisch'; font-weight: 400 900; font-display: swap; src: url(fonts/grenze-gotisch-vietnamese.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Grenze Gotisch'; font-weight: 400 900; font-display: swap; src: url(fonts/grenze-gotisch-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Grenze Gotisch'; font-weight: 400 900; font-display: swap; src: url(fonts/grenze-gotisch-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  color-scheme: dark;
  --bg: #0b0907;
  --bg2: #15110c;
  --panel: rgba(18, 14, 10, 0.92);
  --line: #4a3a22;
  --line2: #7a6036;
  --gold: #e3c27a;
  --gold2: #b8913f;
  --text: #e9e1d2;
  --muted: #9c8f7a;
  --good: #5fe07a;
  --bad: #ff6b5a;
  --blue: #7fb2ff;
  --title: 'Grenze Gotisch', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, 'Times New Roman', serif;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --gfx-btn: url(../assets/tex/ui/gfx_btn.png);
  --gfx-btn-over: url(../assets/tex/ui/gfx_btn_over.png);
  --gfx-btn-down: url(../assets/tex/ui/gfx_btn_down.png);
  --gfx-btn-off: url(../assets/tex/ui/gfx_btn_off.png);
  --gfx-btn-hot: url(../assets/tex/ui/gfx_btn_hot.png);
  --gfx-btn-hot-down: url(../assets/tex/ui/gfx_btn_hot_down.png);
  --gfx-box: url(../assets/tex/ui/gfx_box.png);
  --gfx-panel: url(../assets/tex/ui/gfx_panel.png);
  --gfx-line: url(../assets/tex/ui/gfx_line.png);
  --gfx-title: url(../assets/tex/ui/gfx_title.png);
  --wrap: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); min-height: 100vh; overflow-x: hidden; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: #fff3d0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--title); color: var(--gold); margin: 0; line-height: 1.2; }
.hidden { display: none !important; }
.wrap { width: min(var(--wrap), 100% - 32px); margin: 0 auto; }
.muted { color: var(--muted); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.gold-t { color: var(--gold); }
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ buttons (as .btn of the game) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 5px solid transparent; border-image: var(--gfx-btn) 8 fill / 5px stretch; background: none; color: #f0dcae;
  padding: 5px 14px; text-shadow: 0 1px 2px #000; white-space: nowrap; min-height: 38px;
  font-family: var(--title); font-size: 16px; letter-spacing: 0.5px;
}
.btn:hover:not(:disabled) { border-image-source: var(--gfx-btn-over); color: #fff3d0; }
.btn:active:not(:disabled) { border-image-source: var(--gfx-btn-down); }
.btn.gold { border-image-source: var(--gfx-btn-hot); color: #fff7e0; }
.btn.gold:hover:not(:disabled) { filter: brightness(1.15); color: #fff; }
.btn.gold:active:not(:disabled) { border-image-source: var(--gfx-btn-hot-down); filter: none; }
.btn:disabled { border-image-source: var(--gfx-btn-off); color: #8f8574; opacity: 0.7; cursor: default; }
.btn.big { padding: 9px 26px; font-size: 18px; letter-spacing: 1px; min-height: 50px; }
.btn.sm { padding: 2px 9px; font-size: 14px; min-height: 30px; }
.btn.block { width: 100%; }

/* the boxes: dark glass in a thin rim (gfx_box), the framed windows (gfx_panel) */
.box { border: 5px solid transparent; border-image: var(--gfx-box) 10 fill / 5px stretch; padding: 12px 14px; }
.panel { position: relative; border: 6px solid transparent; border-image: var(--gfx-panel) 16 fill / 6px stretch; padding: 16px 18px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6); }
/* gfx_panel has no top edge: its bottom edge turned over closes the top (as .chip::before of the game) */
.panel::before {
  content: ''; position: absolute; left: -6px; right: -6px; top: -6px; height: 0; border-style: solid; border-color: transparent; border-width: 0 6px 6px;
  border-image: var(--gfx-panel) 0 16 16 / 0 6px 6px stretch; transform: scaleY(-1); pointer-events: none;
}
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding-bottom: 4px; border-bottom: 9px solid transparent; border-image: var(--gfx-line) 0 16 34 16 / 0 8px 9px 8px stretch; }
.sec-title h2 { font-size: 26px; letter-spacing: 0.5px; }
.sec-title small { color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------ header */
.top {
  position: sticky; top: 0; z-index: 20; background: linear-gradient(rgba(8, 6, 4, 0.96), rgba(8, 6, 4, 0.88));
  border-bottom: 1px solid var(--line); backdrop-filter: blur(4px);
}
.top .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--gold); flex: none; }
.brand img { height: 44px; width: auto; display: block; }
.brand b { font-family: var(--title); font-size: 20px; letter-spacing: 2px; background: linear-gradient(#fff2c4, #d9a441 55%, #8a5c1c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 4px; flex: 1; min-width: 0; }
.nav a { padding: 8px 10px; color: var(--text); font: 600 16px var(--title); letter-spacing: 0.5px; white-space: nowrap; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.on { color: var(--gold); border-bottom-color: var(--gold2); }
.acct { display: flex; align-items: center; gap: 8px; flex: none; }
.acct .who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; font: 14px var(--title); letter-spacing: 0.5px; }
.acct .who b { color: var(--gold); font-size: 14px; }
.wc { color: #ffd76a; font-weight: 700; }
.vip-tag { display: inline-block; padding: 0 6px; margin-left: 4px; border-radius: 3px; background: linear-gradient(#ffe08a, #c48a1c); color: #2a1a04; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; vertical-align: 1px; }
.menu-btn { display: none; background: none; border: 1px solid var(--line2); color: var(--gold); width: 40px; height: 38px; border-radius: 4px; font-size: 20px; }

/* ------------------------------------------------------------ hero (the login picture of the client) */
.hero { position: relative; min-height: min(760px, 92vh); display: flex; align-items: flex-end; overflow: hidden; background: #000; }
.hero-art { position: absolute; inset: 0; background: #000 70% 30% / cover no-repeat; }
.hero-art::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.45) 40%, rgba(0, 0, 0, 0) 65%), linear-gradient(0deg, var(--bg) 0%, rgba(11, 9, 7, 0) 35%);
}
.hero .wrap { position: relative; padding: 0 0 56px; }
.hero h1 { font-size: clamp(44px, 8vw, 86px); font-weight: 800; letter-spacing: 4px; line-height: 1; background: linear-gradient(#fff2c4, #d9a441 55%, #7a4c12); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 12px rgba(255, 170, 60, 0.35)); }
.hero h1 small { display: block; font-size: 0.22em; letter-spacing: 8px; color: var(--gold); -webkit-text-fill-color: var(--gold); margin-top: 8px; }
.hero p.lead { max-width: 520px; font-size: 17px; color: #efe6d4; text-shadow: 0 2px 6px #000; margin: 16px 0 22px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.stat { min-width: 128px; }
.stat b { display: block; font-family: var(--title); font-size: 24px; color: var(--gold); line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }
.stat .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); margin-right: 6px; vertical-align: 1px; }
.stat.off .dot { background: #777; box-shadow: none; }

/* ------------------------------------------------------------ sections */
section.block { padding: 56px 0 8px; }
.grid2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: start; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tabs button { background: none; border: 1px solid var(--line); color: var(--muted); padding: 5px 12px; border-radius: 3px; font: 600 15px var(--title); letter-spacing: 0.5px; min-height: 34px; }
.tabs button:hover { color: var(--text); border-color: var(--line2); }
.tabs button.on { color: #2a1a04; background: linear-gradient(#f3d692, #b8913f); border-color: #f3d692; }

/* news */
.news { display: flex; flex-direction: column; gap: 8px; }
.news-item { cursor: pointer; }
.news-item header { display: flex; align-items: center; gap: 10px; }
.news-item h3 { font-size: 17px; color: var(--text); flex: 1; min-width: 0; }
.news-item:hover h3 { color: var(--gold); }
.news-item time { color: var(--muted); font-size: 13px; flex: none; }
.news-item .body { margin: 8px 0 2px; color: #d8cfbf; white-space: pre-line; display: none; }
.news-item.open .body { display: block; }
.kind { flex: none; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 3px; border: 1px solid; }
.kind.news { color: var(--blue); }
.kind.event { color: #ff9a5a; }
.kind.update { color: var(--good); }
.kind.guide { color: var(--gold); }
.pin { color: #ffd76a; font-size: 12px; }

/* ranking */
table.rank { width: 100%; border-collapse: collapse; font-size: 14px; }
.rank th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.rank td { padding: 7px 8px; border-bottom: 1px solid rgba(74, 58, 34, 0.45); }
.rank td.r { text-align: right; }
.rank th.r { text-align: right; }
.rank tr:last-child td { border-bottom: 0; }
.place { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; font-weight: 800; font-size: 13px; background: #2a2116; color: var(--muted); }
.place.p1 { background: linear-gradient(#ffe9a6, #c4901c); color: #2a1a04; }
.place.p2 { background: linear-gradient(#f0f0f0, #9aa0a8); color: #1d1d1d; }
.place.p3 { background: linear-gradient(#f4c08a, #a0602a); color: #2a1404; }
.rank .nm { font-weight: 700; color: var(--text); }
.rank .cls { color: var(--muted); font-size: 12px; display: block; }
.g-mark { image-rendering: pixelated; vertical-align: -3px; margin-right: 6px; border: 1px solid var(--line); }
.empty { color: var(--muted); text-align: center; padding: 22px 8px; }

/* features, classes, steps */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.feature h3 { font-size: 18px; margin-bottom: 4px; }
.feature p { margin: 0; color: #d0c6b4; font-size: 14px; }
.classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.cls-card h3 { font-size: 17px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cls-card h3 small { font-family: var(--font); font-size: 12px; color: var(--muted); font-weight: 600; }
.cls-card p { margin: 6px 0 0; color: #cfc5b3; font-size: 13.5px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: step; }
.step { position: relative; padding-top: 18px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -14px; left: 14px; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 800 18px var(--title); color: #2a1a04; background: linear-gradient(#ffe9a6, #c4901c); box-shadow: 0 2px 8px #000; }
.step h3 { font-size: 17px; margin: 6px 0 4px; }
.step p { margin: 0; font-size: 14px; color: #d0c6b4; }
code.k { font-family: ui-monospace, Consolas, monospace; background: #2a2116; border: 1px solid var(--line2); color: #ffd76a; padding: 0 6px; border-radius: 3px; }

/* the top-up band of the home page */
.promo { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: center; background: linear-gradient(120deg, rgba(120, 70, 10, 0.35), rgba(20, 14, 8, 0.2)); }
.promo h2 { font-size: 28px; }
.promo ul { margin: 10px 0 0; padding-left: 18px; color: #e6dcc8; }
.promo li { margin: 3px 0; }
.promo .cta { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }

footer.foot { margin-top: 64px; padding: 26px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer.foot .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ------------------------------------------------------------ dialogs */
.dlg-back { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dlg { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #120e0a; }
.dlg.wide { width: min(560px, 100%); }
.dlg h3 { font-size: 22px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dlg .x { background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; padding: 2px 6px; }
.dlg .x:hover { color: var(--text); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field label { color: var(--muted); font-size: 13px; font-weight: 600; }
.field input { background: #0b0907; border: 1px solid var(--line2); border-radius: 3px; padding: 9px 10px; color: var(--text); width: 100%; }
.field input:focus { outline: 2px solid var(--gold2); outline-offset: 0; }
.msg { min-height: 20px; margin: 4px 0 10px; font-size: 14px; }
.links { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 14px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: #1d1711; border: 1px solid var(--gold2); color: var(--text); padding: 10px 16px; border-radius: 4px; box-shadow: 0 6px 20px #000; max-width: calc(100% - 32px); }

/* ------------------------------------------------------------ the top-up page */
.page-head { padding: 34px 0 18px; background: radial-gradient(ellipse at 70% 0%, rgba(150, 90, 20, 0.25), transparent 60%); }
.page-head h1 { font-size: 34px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.wallet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.wallet .box b { display: block; font-family: var(--title); font-size: 26px; color: var(--gold); line-height: 1.15; }
.wallet .box span { color: var(--muted); font-size: 13px; }
.wallet .box .btn { margin-top: 8px; }
.first-band { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 12px 16px; border: 1px solid #c4901c; border-radius: 4px; background: linear-gradient(90deg, rgba(196, 144, 28, 0.25), rgba(196, 144, 28, 0.04)); }
.first-band b { font-family: var(--title); font-size: 20px; color: #ffd76a; flex: none; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pack { text-align: center; cursor: pointer; position: relative; transition: transform 0.12s; background: none; color: inherit; }
.pack:hover { transform: translateY(-2px); }
.pack .vnd { font-family: var(--title); font-size: 21px; color: var(--text); font-weight: 700; }
.pack .wcoin { font-size: 18px; font-weight: 800; color: #ffd76a; margin: 4px 0 2px; }
.pack .more { font-size: 13px; color: var(--good); min-height: 20px; }
.pack .badge { position: absolute; top: -9px; right: -4px; background: linear-gradient(#ff8a4a, #c4361c); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 3px; }
.custom { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; }
.custom .field { margin: 0; flex: 1; min-width: 180px; max-width: 280px; }
.qr-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.qr-wrap img { width: 220px; height: auto; background: #fff; border-radius: 4px; display: block; }
.qr-dev { width: 220px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px; border: 1px dashed var(--line2); color: var(--muted); font-size: 13px; }
.kv { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; font-size: 14px; }
.kv span { color: var(--muted); }
.kv b { word-break: break-all; }
.kv .copy { background: none; border: 1px solid var(--line2); color: var(--gold); border-radius: 3px; padding: 1px 8px; font-size: 12px; }
.wait { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); }
.spin { width: 18px; height: 18px; border: 3px solid #3a2e1c; border-top-color: var(--gold); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.paid { text-align: center; padding: 10px 0; }
.paid b { display: block; font-family: var(--title); font-size: 34px; color: #ffd76a; }
.note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.warn { color: #ffb15a; }
.vip-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.vip-grid ul { margin: 8px 0 0; padding-left: 18px; }
.vip-grid li { margin: 4px 0; }
.buy-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tiers { display: flex; flex-direction: column; gap: 10px; }
.tier { display: grid; grid-template-columns: 150px 1fr auto; gap: 14px; align-items: center; }
.tier .vnd { font-family: var(--title); font-size: 20px; color: var(--gold); }
.tier .bar { height: 8px; background: #2a2116; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.tier .bar i { display: block; height: 100%; background: linear-gradient(90deg, #c4901c, #ffd76a); }
.tier .rw { font-size: 14px; color: #ddd3c1; }
.shop-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.shop-it { display: flex; flex-direction: column; gap: 6px; }
.shop-it h4 { font-size: 16px; color: var(--text); display: flex; justify-content: space-between; gap: 8px; }
.shop-it .price { color: #ffd76a; font-weight: 800; white-space: nowrap; font-family: var(--font); }
.shop-it .rw { font-size: 13px; color: var(--muted); flex: 1; }
.shop-it .row { display: flex; gap: 6px; align-items: center; }
.shop-it .row input { width: 64px; background: #0b0907; border: 1px solid var(--line2); border-radius: 3px; padding: 4px 6px; text-align: center; }
.lim { font-size: 12px; color: #ffb15a; }
table.hist { width: 100%; border-collapse: collapse; font-size: 14px; }
.hist th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.hist td { padding: 6px 8px; border-bottom: 1px solid rgba(74, 58, 34, 0.45); vertical-align: top; }
.hist .r { text-align: right; }
.st { font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 3px; border: 1px solid; white-space: nowrap; }
.st.paid { color: var(--good); }
.st.pending { color: #ffd76a; }
.st.expired, .st.cancelled { color: var(--muted); }
.hist-wrap { overflow-x: auto; }
.gate { text-align: center; padding: 60px 16px; }
.gate p { color: var(--muted); }

/* ------------------------------------------------------------ motion (site/fx.js; html.fx unless less motion is asked for) */
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fx .hero-art { opacity: 0; }
.fx .hero-art.ready { animation: heroIn 2.4s ease-out both, heroDrift 26s ease-in-out 2.4s infinite alternate; }
@keyframes heroIn { from { opacity: 0; transform: scale(1.12); } to { opacity: 1; transform: none; } }
@keyframes heroDrift { from { transform: none; } to { transform: scale(1.06) translate(-1%, 0.6%); } }
.fx .hero .wrap > * { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.fx .hero .wrap > :nth-child(2) { animation-delay: 0.6s; }
.fx .hero .wrap > :nth-child(3) { animation-delay: 0.8s; }
.fx .hero .wrap > :nth-child(4) { animation-delay: 1s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
/* the title: a gleam crossing the gold now and then, stars of light flashing on it */
.hero h1 { position: relative; }
.fx .hero .wrap > h1 {
  background-image: linear-gradient(105deg, transparent 42%, rgba(255, 252, 235, 0.9) 50%, transparent 58%), linear-gradient(#fff2c4, #d9a441 55%, #7a4c12);
  background-size: 300% 100%, 100% 100%; background-repeat: no-repeat; animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s both, gleam 7s ease-in-out 2s infinite;
}
@keyframes gleam { 0% { background-position: 100% 0, 0 0; } 28%, 100% { background-position: 0% 0, 0 0; } }
.twinkle {
  position: absolute; pointer-events: none; background: var(--star) center / contain no-repeat; animation: twinkle 1.1s ease-in-out both;
}
@keyframes twinkle { from { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(0); } 45% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(45deg); } to { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(90deg); } }

/* the gold buttons: a gleam running over them, the big ones breathing a glow */
.btn { transition: translate 0.2s, filter 0.2s, color 0.2s; }
.btn:hover:not(:disabled) { translate: 0 -2px; }
.btn.gold { position: relative; overflow: hidden; }
.fx .btn.gold::after {
  content: ''; position: absolute; top: -10%; bottom: -10%; left: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 240, 200, 0.45), transparent); transform: skewX(-20deg); animation: btnGleam 4.5s ease-in-out infinite;
}
@keyframes btnGleam { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }
.fx .btn.gold.big { animation: btnGlow 2.6s ease-in-out infinite; }
@keyframes btnGlow { 0%, 100% { box-shadow: 0 0 0 rgba(255, 140, 40, 0); } 50% { box-shadow: 0 0 22px rgba(255, 140, 40, 0.55), 0 0 6px rgba(255, 210, 120, 0.5); } }
.stat .dot { position: relative; }
.fx .stat:not(.off) .dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--good); animation: ping 1.8s ease-out infinite; }
@keyframes ping { from { transform: scale(1); opacity: 0.8; } to { transform: scale(3); opacity: 0; } }

/* rising into view (fx.js reveal); hovering the cards lifts them */
.fx .rv { transition: opacity 0.75s ease-out var(--d, 0ms), transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms), translate 0.25s, filter 0.25s; }
.fx .rv:not(.in) { opacity: 0; transform: translateY(28px); }
.fx .sec-title.rv:not(.in) { transform: translateX(-48px); }
.feature, .cls-card, .step, .news-item { transition: translate 0.25s, filter 0.25s; }
.feature:hover, .cls-card:hover, .step:hover { translate: 0 -4px; filter: brightness(1.18) drop-shadow(0 6px 14px rgba(227, 160, 60, 0.25)); }
.news-item:hover { translate: 4px 0; filter: brightness(1.12); }
.fx .step.in::before { animation: pop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) calc(var(--d, 0ms) + 0.3s) both; }
@keyframes pop { from { transform: scale(0); } to { transform: none; } }
.rank tbody tr { transition: background 0.2s; }
.rank tbody tr:hover { background: rgba(227, 194, 122, 0.07); }
.fx .place.p1 { animation: medal 2.4s ease-in-out infinite; }
@keyframes medal { 0%, 100% { box-shadow: 0 0 0 rgba(255, 210, 90, 0); } 50% { box-shadow: 0 0 14px rgba(255, 210, 90, 0.8); } }
.fx .page-head .wrap > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.fx .page-head .wrap > p { animation-delay: 0.15s; }
.pack:hover { filter: brightness(1.15) drop-shadow(0 4px 12px rgba(227, 160, 60, 0.3)); }
.fx .promo { background-size: 220% 100%; animation: promoLight 9s ease-in-out infinite alternate; }
@keyframes promoLight { from { background-position: 0 0; } to { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .feature, .cls-card, .step, .news-item { transition: none; }
}

/* ------------------------------------------------------------ narrow screens */
@media (max-width: 960px) {
  .grid2, .promo, .vip-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .wallet { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .menu-btn { display: block; order: 3; }
  .nav { display: none; position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; background: rgba(8, 6, 4, 0.98); border-bottom: 1px solid var(--line); padding: 6px 16px 12px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 4px; }
  .top .wrap { gap: 10px; justify-content: space-between; }
  .brand b { display: none; }
  .acct .who { display: none; }
  .hero { min-height: 640px; }
  .hero-art { background-position: 72% 30%; }
  .hero-art::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(11, 9, 7, 0.75) 45%, rgba(0, 0, 0, 0.2) 100%); }
  .hero .wrap { padding-bottom: 36px; }
  .qr-wrap { grid-template-columns: 1fr; justify-items: center; }
  .tier { grid-template-columns: 1fr; gap: 6px; }
  .rank .hide-s { display: none; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .wallet { grid-template-columns: 1fr 1fr; gap: 8px; }
  .wallet .box b { font-size: 21px; }
  .stat { min-width: 0; flex: 1; }
  .hero .cta .btn { flex: 1; }
  .sec-title h2 { font-size: 22px; }
}
