@font-face { font-family: "Unbounded"; src: url("/miniapp/fonts/unbounded.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/miniapp/fonts/onest.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* Tokens are the Mini App's (src/web/miniapp/app.css). Light is the default: no attribute on <html> */
:root {
  --lime: #d6ff3c; --lime-deep: #b8e81a; --ink: #0b0d13; --on-lime: #0b0d13; --ok: #22c55e; --bad: #ef4444; --star: #f5b400;
  --radius: 22px; --radius-m: 18px; --radius-s: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --wrap: 1200px; --gutter: 24px;
  --bg: #eef1f6; --card: #fff; --card-2: #f5f7fb; --line: #e3e7ef; --line-hi: #cfd5e1;
  --text: #0b0d13; --muted: #5b6475; --soft: #98a2b3; --accent-text: #3d5a00;
  --shadow: 0 10px 30px rgba(16, 24, 40, .08); --pop: 0 18px 50px rgba(16, 24, 40, .16);
  --sheen: none; --edge: 0 1px 2px rgba(16, 24, 40, .04); --lift: 0 18px 40px -18px rgba(16, 24, 40, .28);
  --danger-bg: #fde8e8;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0d13; --card: #141822; --card-2: #1a1f2b; --line: #232938; --line-hi: #343c50;
  --text: #f4f6fa; --muted: #98a2b3; --soft: #667085; --accent-text: var(--lime);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35); --pop: 0 18px 50px rgba(0, 0, 0, .55);
  --edge: inset 0 1px 0 rgba(255, 255, 255, .05); --lift: 0 18px 40px -18px rgba(0, 0, 0, .7);
  --danger-bg: #3a1418;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #0b0d13; --card: #141822; --card-2: #1a1f2b; --line: #232938; --line-hi: #343c50;
    --text: #f4f6fa; --muted: #98a2b3; --soft: #667085; --accent-text: var(--lime);
    --shadow: 0 10px 30px rgba(0, 0, 0, .35); --pop: 0 18px 50px rgba(0, 0, 0, .55);
    --edge: inset 0 1px 0 rgba(255, 255, 255, .05); --lift: 0 18px 40px -18px rgba(0, 0, 0, .7);
    --danger-bg: #3a1418;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 500 15px/1.45 Onest, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; display: flex; flex-direction: column; min-height: 100dvh; }
main { flex: 1; }
/* Theme switch: colours glide for a moment */
.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after {
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease) !important; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: Unbounded, Onest, sans-serif; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(22px, 2.6vw, 30px); }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--lime-deep); outline-offset: 2px; border-radius: 12px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--lime); color: var(--on-lime); padding: 8px 12px; border-radius: 10px; }
.lead { color: var(--muted); max-width: 56ch; }
.page-top { padding-top: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* Buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 20px;
  border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); color: var(--text); font-weight: 800; white-space: nowrap;
  overflow: hidden; transition: transform .15s var(--ease), background .2s, border-color .2s; }
.btn:hover { border-color: var(--soft); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-lime { background: var(--lime); border-color: var(--lime); color: var(--on-lime); box-shadow: 0 8px 22px rgba(184, 232, 26, .35); }
.btn-lime:hover { background: var(--lime-deep); border-color: var(--lime-deep); }
.btn-lime:disabled { opacity: 1; background: var(--card-2); border-color: var(--line); color: var(--muted); box-shadow: none; }
/* The pay button is the one bright moving thing on a page: a slow shine */
.btn-shine:not(:disabled)::after { content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-big { min-height: 56px; border-radius: var(--radius-m); font-size: 16px; }
.btn-provider { width: 100%; justify-content: flex-start; padding: 10px 16px 10px 20px; white-space: normal; text-align: left; line-height: 1.25; }
.btn-provider svg { flex: none; }

/* Header: no rule under it, a soft shadow once the page scrolls */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: box-shadow .25s; }
.top.scrolled { box-shadow: 0 6px 20px rgba(16, 24, 40, .08); }
.top-row { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand .mark { transition: transform .4s var(--spring); }
.brand:hover .mark { transform: rotate(-6deg); }
.wordmark { font: 800 18px/1 Unbounded, sans-serif; letter-spacing: -.4px; }
.wordmark span { color: var(--accent-text); }
.nav { display: flex; gap: 4px; }
.nav a { white-space: nowrap; padding: 8px 12px; border-radius: 12px; font-weight: 700; color: var(--muted); transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: var(--card); }
.top-right { position: relative; margin-left: auto; display: flex; align-items: center; gap: 8px; }
/* Header search: a quiet field between the nav and the account, suggestions drop under it */
.top-search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.top-search + .top-right { margin-left: 0; }
.top-search .search { width: 100%; height: 42px; margin: 0; background: var(--card); }
.top-search kbd { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--soft); font: 700 12px Onest, sans-serif; }
.top-search .search:focus-within kbd { display: none; }
.search-close, .search-open { display: none; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: var(--radius-s); background: none; color: var(--muted); cursor: pointer; }
.search-close .i, .search-open .i { width: 20px; height: 20px; }
.search-pop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 45; display: grid; gap: 2px; max-height: min(70vh, 460px); overflow-y: auto; padding: 6px;
  border-radius: var(--radius-m); background: var(--card); border: 1px solid var(--line); box-shadow: var(--pop); animation: menu-in .16s var(--ease); }
.search-pop[hidden] { display: none; }
.search-hit { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; }
.search-hit img, .search-hit .ord-letter { width: 36px; height: 36px; flex: none; border-radius: 10px; object-fit: cover; }
.search-hit span { display: grid; min-width: 0; }
.search-hit b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.search-hit small { color: var(--muted); font-size: 12.5px; }
.search-hit:hover, .search-hit[aria-selected="true"] { background: var(--card-2); }
.search-empty { margin: 0; padding: 12px 10px; color: var(--muted); }
.search-all { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 10px; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; background: none;
  color: var(--accent-text); font-weight: 800; text-align: left; cursor: pointer; }
.search-all svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.prefs { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 12px; border: 0; border-radius: var(--radius-s); background: none;
  color: var(--muted); font-weight: 700; font-size: 14px; white-space: nowrap; transition: background .2s, color .2s; }
.prefs .i { width: 18px; height: 18px; }
.prefs:hover, .prefs[aria-expanded="true"] { background: var(--card); color: var(--text); }
.prefs b { color: var(--text); font-weight: 800; }
.prefs .chev { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.prefs[aria-expanded="true"] .chev { transform: rotate(180deg); }
.avatar-link { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--lime); color: var(--on-lime);
  font: 800 15px Unbounded, sans-serif; }
.account-wrap { position: relative; }
.account-wrap .avatar-link { border: 0; cursor: pointer; transition: box-shadow .2s; }
.account-wrap .avatar-link:hover, .account-wrap .avatar-link[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--lime); }
/* The gap above the menu stays hoverable, so the pointer can travel from the avatar to it */
.account-menu { width: 220px; }
.account-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.account-menu h6 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 13px; font-weight: 800; }
.balance-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 10px; border-radius: var(--radius-s);
  background: var(--card); border: 1px solid var(--line); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.balance-chip svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Preferences: plain rows with a tick for language and currency, theme as three icons */
.prefs-menu { position: absolute; right: 0; top: 48px; z-index: 40; width: 248px; padding: 6px; border-radius: var(--radius-m);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--pop); transform-origin: top right; animation: menu-in .16s var(--ease); }
@keyframes menu-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.prefs-menu h6 { margin: 0; padding: 8px 10px 4px; font: 700 12px Onest, sans-serif; color: var(--soft); }
.prefs-menu hr { border: 0; height: 1px; background: var(--line); margin: 6px 4px; }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 11px; background: none;
  font-weight: 600; text-align: left; }
.opt:hover { background: var(--card-2); }
.opt small { margin-left: auto; color: var(--soft); font-weight: 700; font-size: 12.5px; }
.opt .tick { width: 16px; height: 16px; margin-left: auto; color: var(--accent-text); stroke-width: 3; visibility: hidden; }
.opt small + .tick { margin-left: 10px; }
.opt[aria-checked="true"] { font-weight: 800; }
.opt[aria-checked="true"] .tick { visibility: visible; }
.theme-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin: 2px 4px 4px; border-radius: 12px; background: var(--card-2); }
.theme-row button { display: grid; place-items: center; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--muted); }
.theme-row .i { width: 18px; height: 18px; }
.theme-row button[aria-checked="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(16, 24, 40, .12); }


/* Home and catalog: the Mini App showcase */
.home { padding-top: 8px; }
.page-title { margin: 4px 2px 4px; }
.cards-promo { display: flex; align-items: center; gap: 14px; margin-top: 8px; padding: 14px 16px; border-radius: var(--radius-m); color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #3a6bff 0%, #1f3fd8 45%, #13258f 100%); box-shadow: 0 10px 26px rgba(31, 63, 216, .22);
  transition: transform .15s var(--ease); }
.cards-promo:active { transform: scale(.98); }
.cards-promo div { flex: 1; min-width: 0; }
.cards-promo b { display: block; font: 800 15px/1.2 Unbounded, sans-serif; letter-spacing: -.3px; }
.cards-promo small { display: block; margin-top: 3px; font-weight: 600; font-size: 13px; color: rgba(255, 255, 255, .72); }
.cards-promo .covers { display: flex; flex: none; }
.cards-promo .covers img { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; border: 2px solid #1a32b8; background: #1a32b8; }
.cards-promo .covers img + img { margin-left: -12px; }
.cards-promo .promo-go { opacity: .8; }

.bar { display: flex; align-items: center; gap: 8px; margin: 18px 0 14px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: var(--radius-s); background: var(--card);
  border: 1px solid var(--line); font-weight: 800; color: var(--muted); white-space: nowrap; transition: all .25s var(--ease); }
.tab .i { width: 18px; height: 18px; }
.tab:hover { color: var(--text); }
.tab[aria-current="true"] { background: var(--lime); border-color: var(--lime); color: var(--ink); box-shadow: 0 4px 14px rgba(184, 232, 26, .35); }
.search { display: flex; align-items: center; gap: 10px; margin-left: auto; width: 300px; flex: none; padding: 0 14px; height: 44px;
  border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--soft); transition: border-color .2s; }
.search:focus-within { border-color: var(--lime-deep); }
.search .i { width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.search input::-webkit-search-cancel-button { display: none; }

.games { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.game { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; isolation: isolate;
  background: var(--card); box-shadow: var(--shadow); transition: transform .2s var(--ease); }
.game:active { transform: scale(.97); }
.game .art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s var(--ease), opacity .35s var(--ease); }
.game:hover .art { transform: scale(1.05); }
.game .cover-blur { inset: -20%; width: 140%; height: 140%; filter: blur(26px) saturate(1.5); opacity: .7; }
.game .cover { position: absolute; left: 50%; top: 42%; width: 34%; aspect-ratio: 1; height: auto; transform: translate(-50%, -50%); border-radius: 22%;
  object-fit: cover; z-index: -1; box-shadow: 0 12px 26px rgba(0, 0, 0, .35); }
.js img.is-loading { opacity: 0; }
.game::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(5, 6, 10, .88)); }
.game strong { position: absolute; left: 12px; right: 12px; bottom: 11px; display: flex; align-items: center; gap: 7px; color: #fff;
  font: 800 14px/1.15 Unbounded, sans-serif; letter-spacing: -.2px; }
.game strong img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; flex: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
.game strong span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.game em { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 999px; font: 800 10.5px Onest, sans-serif; font-style: normal;
  letter-spacing: .3px; background: var(--lime); color: var(--ink); }
.game-letter { position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 20px; z-index: -1; font: 800 44px Unbounded, sans-serif;
  color: hsl(var(--hue) 60% 42%); background: radial-gradient(120% 120% at 20% 0%, hsl(var(--hue) 70% 55% / .3), transparent 60%), var(--card-2); }
.game.wide { grid-column: span 2; aspect-ratio: 2.4 / 1; }
.game.wide::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; transform: translateX(-130%);
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%);
  animation: banner 6s ease-in-out infinite; animation-delay: calc(1.2s + var(--i, 0) * .9s); }
@keyframes banner { 0%, 75% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
.game.wide::after { background: linear-gradient(90deg, rgba(5, 6, 10, .82) 0%, rgba(5, 6, 10, .3) 55%, transparent 80%); }
.game.wide strong { bottom: 32px; font-size: 18px; max-width: 62%; }
.game.wide small { position: absolute; left: 12px; bottom: 12px; color: rgba(255, 255, 255, .78); font-weight: 700; font-size: 12.5px; }
.game.wide .art { object-position: 65% 12%; }
.empty { color: var(--muted); padding: 24px 2px; }

.section-title { display: flex; align-items: center; gap: 10px; margin: 32px 2px 12px; }
.section-title h2 { font-size: 18px; letter-spacing: -.3px; line-height: 1.2; }
.section-title .rate { display: flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; }
.section-title .more { margin-left: auto; display: flex; align-items: center; gap: 2px; color: var(--muted); font-weight: 700; }
.section-title .more .i { width: 18px; height: 18px; }
.section-title .more:hover { color: var(--text); }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }
.star-on { width: 14px; height: 14px; fill: var(--star); stroke: none; }
.star-off { width: 14px; height: 14px; fill: var(--line); stroke: none; }

/* Strips drift by on their own; hover, focus or a finger stops them */
.marquee { overflow: hidden; margin: 0 calc(-1 * var(--gutter)); padding: 2px 0 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.track { display: flex; gap: 10px; width: max-content; margin: 0; padding: 0 0 0 var(--gutter); list-style: none; animation: ribbon var(--dur, 70s) linear infinite; }
.marquee:hover .track, .marquee:focus-within .track { animation-play-state: paused; }
@keyframes ribbon { to { transform: translateX(-50%); } }
.done a { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; }
.done img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.done b { display: block; font-weight: 800; line-height: 1.2; }
.done small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.review { width: 290px; flex: none; padding: 14px; border-radius: var(--radius-m); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.review-top { display: flex; align-items: center; gap: 10px; }
.review-top i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-style: normal; font-weight: 900;
  background: var(--lime); color: var(--ink); }
.review-top b { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stars { display: flex; gap: 1px; }
.review p { margin: 10px 0 6px; font-weight: 600; }
.review small { color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .track { animation: none; }
  .track > [aria-hidden="true"] { display: none; }
}
/* Home slider: one dark strip, the art on the right on wide screens, behind the text on phones */
.hero-slider { position: relative; height: 230px; margin-top: 8px; border-radius: var(--radius); overflow: hidden; background: var(--ink); touch-action: pan-y; }
.slides { display: flex; height: 100%; transition: transform .45s var(--ease); }
.slide { position: relative; flex: 0 0 100%; height: 100%; color: #fff; background: var(--ink); }
.slide img { position: absolute; top: 0; right: 0; width: 58%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 42%, rgba(11,13,19,.55) 52%, rgba(11,13,19,0) 72%); }
.slide-text { position: relative; z-index: 1; display: grid; align-content: center; gap: 8px; height: 100%; max-width: 560px; padding: 0 40px; }
.slide-text h2 { font: 800 30px/1.08 Unbounded, sans-serif; letter-spacing: -1px; }
.slide-text p { color: rgba(255,255,255,.78); font-size: 15px; max-width: 40ch; }
.slide-text .btn { justify-self: start; margin-top: 2px; min-height: 42px; }
.slide-tag { justify-self: start; padding: 5px 10px; border-radius: 999px; background: var(--lime); color: var(--on-lime); font-weight: 800; font-size: 13px; }
.slider-ui { position: absolute; z-index: 2; right: 24px; bottom: 22px; display: flex; align-items: center; gap: 12px; }
.dots { display: flex; gap: 6px; }
/* A 24 px tall tap target around a 4 px bar */
.dots button { position: relative; width: 28px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); }
.dots button[aria-current="true"]::after { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 4px; background: var(--lime); transform-origin: left; animation: slide-dot var(--slide-ms, 4s) linear forwards; }
.hero-slider:hover .dots button::after, .hero-slider:focus-within .dots button::after { animation-play-state: paused; }
@keyframes slide-dot { from { transform: scaleX(0); } }
.arrows { display: flex; gap: 8px; }
.arrows button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(11,13,19,.4); color: #fff; cursor: pointer; backdrop-filter: blur(8px); }
.arrows .i { width: 20px; height: 20px; }
.hero-slider + .cards-promo { margin-top: 12px; }
.recent-top .section-title { margin-top: 20px; }
/* Most bought packs and the three steps */
.packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pack { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius-m); background: var(--card); border: 1px solid var(--line); transition: border-color .2s, transform .2s var(--spring); }
.pack:hover { border-color: var(--lime-deep); transform: translateY(-2px); }
.pack img { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; }
.pack b { font-size: 16px; }
.pack small { color: var(--muted); font-size: 13px; }
.pack .price { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font: 800 18px Unbounded, sans-serif; }
.pack .price span { padding: 6px 12px; border-radius: 10px; background: var(--lime); color: var(--on-lime); font: 800 13px Onest, sans-serif; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0; list-style: none; }
.step { display: grid; align-content: start; gap: 6px; padding: 20px; border-radius: var(--radius-m); background: var(--card); border: 1px solid var(--line); }
.step i { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 6px; border-radius: 50%; background: var(--lime); color: var(--on-lime); font: 800 13px Unbounded, sans-serif; font-style: normal; }
.step b { font-size: 17px; }
.step small { color: var(--muted); font-size: 14.5px; }
.step .nick { justify-self: start; display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--card-2); font-weight: 800; font-size: 14px; }
.step .nick::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
@media (prefers-reduced-motion: reduce) {
  .slides { transition: none; }
  .dots button[aria-current="true"]::after { animation: none; }
}
@media (max-width: 860px) {
  .hero-slider { height: 176px; }
  .slide img { width: 100%; }
  .slide::after { background: linear-gradient(90deg, rgba(11,13,19,.92) 0%, rgba(11,13,19,.7) 55%, rgba(11,13,19,.1) 100%); }
  .slide-text { gap: 6px; padding: 0 18px 26px; }
  .slide-text h2 { font-size: 21px; max-width: 13em; }
  .slide-text p { display: none; }
  .slide-text .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
  .slide-tag { font-size: 12px; }
  .slider-ui { left: 18px; right: auto; bottom: 14px; }
  .arrows { display: none; }
  .packs { grid-template-columns: 1fr 1fr; gap: 10px; }
  .packs .pack:nth-child(n+7) { display: none; }
  .pack { grid-template-columns: 34px 1fr; column-gap: 10px; padding: 12px; }
  .pack img { width: 34px; height: 34px; border-radius: 10px; }
  .pack b { font-size: 14.5px; }
  .pack small { font-size: 12px; }
  .pack .price { margin-top: 8px; font-size: 15px; }
  .pack .price span { display: none; }
  .steps { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .step { scroll-snap-align: start; }
  .section-title { flex-wrap: wrap; row-gap: 2px; }
  .section-title .rate { font-size: 13px; }
}
@media (max-width: 860px) {
  .cards-promo { padding: 12px 12px 12px 14px; gap: 12px; }
  .cards-promo b { font-size: 14px; }
  .cards-promo small { font-size: 12px; }
  .cards-promo .covers img { width: 38px; height: 38px; }
  .bar { flex-direction: column; align-items: stretch; gap: 12px; }
  .tabs { margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 4px; }
  .search { width: auto; margin: 0; height: 48px; }
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game strong { font-size: 13.5px; }
  .game.wide { aspect-ratio: 3.4 / 1.25; }
  .game.wide strong { font-size: 17px; }
  .section-title { margin-top: 24px; }
  .section-title h2 { font-size: 16px; }
  .review { width: 270px; }
  .marquee { touch-action: pan-x; }
}

/* FAQ */
.faq { padding: clamp(36px, 5vw, 64px) 0 clamp(36px, 5vw, 72px); }
.faq-list { display: grid; gap: 10px; }
.faq-titled { padding-top: 0; }
.faq details { border-radius: var(--radius-s); background: var(--sheen), var(--card); box-shadow: var(--edge); border: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details p { padding: 0 20px 18px; color: var(--muted); max-width: 70ch; }
.faq details[open] p { animation: rise .3s var(--ease); }
.faq details { transition: border-color .2s; }
.faq details[open] { border-color: var(--line-hi); }

/* Game page: one bright thing — the pay button; the chosen pack gets a lime price */
.game-head { position: relative; height: 200px; margin-top: 16px; border-radius: 26px; overflow: hidden; isolation: isolate;
  color: #fff; background: #141822; box-shadow: var(--shadow); }
.game-head-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 22%; z-index: -2; }
.game-head-art[src*="/art/telegram-"] { object-position: 65% 50%; }
.game-head-art.is-blur { inset: -10%; width: 120%; height: 120%; filter: blur(40px) saturate(1.6); opacity: .8; }
.game-head::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(5, 6, 10, .85) 0%, rgba(5, 6, 10, .3) 60%, transparent 90%); }
.game-head .back { position: absolute; top: 14px; left: 14px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(5, 6, 10, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; }
.game-head .back .i { width: 18px; height: 18px; }
.game-head-text { position: absolute; left: 22px; right: 22px; bottom: 20px; }
.game-head h1 { display: flex; align-items: center; gap: 10px; font: 800 26px/1.15 Unbounded, sans-serif; letter-spacing: -.5px; }
.game-head h1 img { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.game-head p { margin-top: 6px; color: rgba(255, 255, 255, .78); font-weight: 600; font-size: 14px; }

.gp { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; margin-top: 16px; align-items: start; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 12px; min-height: 38px; }
.row-head h2 { font: 800 16px Unbounded, sans-serif; letter-spacing: -.3px; }
.switch { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.switch button { border: 0; background: none; padding: 6px 14px; border-radius: 9px; font-weight: 700; color: var(--muted); font-size: 14px; transition: background .2s, color .2s; }
.switch button[aria-selected="true"] { background: var(--card-2); color: var(--text); box-shadow: 0 1px 3px rgba(16, 24, 40, .1); }
.offers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.offer { position: relative; padding: 14px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line); text-align: left;
  overflow: hidden; transition: transform .15s var(--ease), border-color .2s; }
.offer:hover { border-color: var(--soft); }
.offer:active { transform: scale(.97); }
.offer .coin { width: 32px; height: 32px; }
.offer .amount { display: block; margin-top: 8px; font: 800 20px/1.1 Unbounded, sans-serif; letter-spacing: -.5px; overflow-wrap: anywhere; }
.offer .unit { display: block; margin-top: 3px; min-height: 17px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.offer .price { display: inline-block; margin-top: 10px; padding: 5px 10px; border-radius: 10px; background: var(--card-2); font-weight: 800; }
.offer[aria-pressed="true"] { border-color: var(--lime-deep); }
.offer[aria-pressed="true"] .price { background: var(--lime); color: var(--ink); }
.notice { color: var(--muted); background: var(--card-2); border-radius: var(--radius-s); padding: 14px 16px; }
.offers .notice { grid-column: 1 / -1; }

.order { position: sticky; top: 88px; padding: 6px 16px 16px; }
.order section { padding: 12px 0; }
.order section + section { border-top: 1px solid var(--line); }
.order h2 { margin-bottom: 8px; font: 700 13px Onest, sans-serif; color: var(--muted); }
.fields { display: grid; gap: 8px; }
.field { display: flex; flex-direction: column; justify-content: center; min-height: 54px; padding: 6px 14px; border-radius: 14px;
  background: var(--card-2); border: 1.5px solid transparent; cursor: text; transition: border-color .2s; }
.field:focus-within { border-color: var(--lime-deep); }
.field span { font-size: 12px; color: var(--muted); font-weight: 700; }
.field input, .field select { width: 100%; border: 0; outline: 0; padding: 0; background: none; color: var(--text); font: 800 16px/1.5 Onest, sans-serif; }
/* The input clips its own box: with no room around the text the caret was cut to a stub at the left edge */
.field input { box-sizing: content-box; width: calc(100% - 4px); height: 24px; padding: 2px; margin: -2px; caret-color: var(--text); }
.field select { cursor: pointer; }
.field input::placeholder { color: var(--soft); font-weight: 600; }
.fields.is-invalid .field { border-color: var(--bad); }
.btn-soft { background: var(--card-2); border-color: transparent; }
.btn-soft:hover { border-color: var(--line-hi); }
.fields-check[hidden] { display: none; }
.field-note { margin: 8px 0 0; color: var(--accent-text); font-size: 13px; font-weight: 600; }
.field-note.is-warn { color: var(--bad); }
.field-error { margin: 8px 0 0; color: var(--bad); font-size: 13px; font-weight: 600; }
.hint { margin-top: 8px; color: var(--muted); font-size: 13px; }
.saved { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.saved button { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card-2); font-weight: 700; font-size: 14px; }
.saved i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--lime); color: var(--on-lime); font-style: normal; font-size: 12px; }
/* The checked nickname: what keeps money from the wrong account, so it gets the one small motion */
.nick { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 0 4px; animation: rise .35s var(--ease); }
.nick[hidden] { display: none; }
.nick .ok { width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; flex: none; }
.nick .ok svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.nick > span:not(.ok) { min-width: 0; color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.nick b { color: var(--text); font-weight: 800; }
.order .nick .link-btn { margin-left: auto; flex: none; padding: 0; font-size: 13px; font-weight: 700; text-decoration: none; }
.order .nick .link-btn:hover { color: var(--text); }
.check { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.check[hidden] { display: none; }
.check input { width: 18px; height: 18px; accent-color: var(--lime-deep); }
.pay { display: grid; gap: 2px; }
.pay button { border: 0; background: none; color: inherit; display: flex; align-items: center; gap: 12px; width: calc(100% + 16px); padding: 8px; margin: 0 -8px; border-radius: 14px; text-align: left; transition: background .15s; }
.pay button[hidden] { display: none; }
.pay button:hover:not(:disabled) { background: var(--card-2); }
.pay button:disabled { opacity: .5; cursor: not-allowed; }
.pay .logo-box { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; overflow: hidden; background: var(--card-2); color: var(--text); }
.pay .logo-box img { width: 100%; height: 100%; object-fit: cover; }
.pay-text { min-width: 0; }
.pay b { display: block; font-weight: 800; }
.pay small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.pay .radio { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-hi); flex: none; transition: border .15s; }
.pay button[aria-checked="true"] .radio { border: 6px solid var(--text); }
.total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.total span { min-width: 0; color: var(--muted); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.total b { font: 800 24px Unbounded, sans-serif; letter-spacing: -.5px; white-space: nowrap; }
.total b.is-empty { font: 600 16px Onest, sans-serif; color: var(--muted); }
.pay-now .btn { width: 100%; }
.total-sum { display: inline-flex; align-items: baseline; gap: 8px; flex: none; }
.total s, .paybar s { color: var(--soft); font-weight: 600; font-size: 14px; white-space: nowrap; }
.promo { margin: -4px 0 12px; }
.promo > .link-btn { padding: 2px 0; font-size: 14px; }
.promo-form { display: flex; gap: 8px; }
.promo-form .field { flex: 1; min-width: 0; min-height: 46px; }
.promo-form input { text-transform: uppercase; letter-spacing: .5px; }
.promo-form input::placeholder { text-transform: none; letter-spacing: 0; }
.promo-form .btn { flex: none; width: auto; padding: 0 16px; }
.promo-applied { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--lime) 12%, transparent); color: var(--accent-text); font-weight: 700; font-size: 14px; }
.promo-applied b { margin-left: 8px; color: var(--text); letter-spacing: .5px; }
.promo-applied .link-btn { padding: 0; font-size: 13px; }
.fine { margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.fine a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
/* Phone: the bar repeats the card's button above the tab bar while that button is off screen */
.paybar { position: fixed; z-index: 24; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); transition: transform .25s ease; }
.paybar-sum { min-width: 0; }
.paybar small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paybar b { font: 800 20px Unbounded, sans-serif; }
.paybar b.is-empty { font: 500 16px Onest, sans-serif; color: var(--muted); }
.paybar .btn { flex: 1; max-width: 260px; }
.paybar.is-tucked { transform: translateY(calc(110% + 80px)); }
@media (max-width: 1060px) { .offers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .gp { grid-template-columns: 1fr; }
  .order { position: static; }
  .offers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-head { height: 168px; border-radius: 22px; }
  .game-head h1 { font-size: 19px; }
  .game-head h1 img { width: 28px; height: 28px; }
  .game-head-text { left: 16px; right: 16px; bottom: 16px; }
  .game-head p { font-size: 13px; }
  body.has-tabbar .paybar { bottom: calc(68px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
  body[data-page="game"] .foot { padding-bottom: calc(180px + env(safe-area-inset-bottom)); }
}

/* Reviews page: the score, how the stars split, then the words */
.page-head { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.page-head .back { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--card); box-shadow: var(--shadow); }
.page-head .back .i { width: 18px; height: 18px; }
.page-head h1 { font: 800 22px Unbounded, sans-serif; letter-spacing: -.4px; }
.reviews-page > .notice { margin-top: 16px; }
.rv-head { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 12px; margin-top: 16px; }
.rv-head .card { padding: 18px; }
.score { display: grid; justify-items: start; align-content: center; gap: 6px; }
.score b { font: 900 48px/1 Unbounded, sans-serif; letter-spacing: -1.5px; }
.score .stars .i { width: 18px; height: 18px; }
.score small { color: var(--muted); font-weight: 600; }
.dist { display: grid; gap: 8px; align-content: center; }
.dist div { display: grid; grid-template-columns: 14px minmax(0, 1fr) 30px; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dist .track-bar { height: 8px; border-radius: 9px; background: var(--card-2); overflow: hidden; }
.dist .track-bar i { display: block; height: 100%; border-radius: 9px; background: var(--star); }
.reviews-page .bar { margin-top: 16px; }
.rv-grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rv-grid .review { width: auto; }
.pager { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
@media (max-width: 860px) {
  .rv-head { grid-template-columns: 1fr; }
  .rv-grid { grid-template-columns: 1fr; }
}

/* Login */
.login { display: grid; place-items: center; padding-bottom: 64px; }
.login-card { width: min(100%, 440px); display: grid; gap: 16px; justify-items: center; text-align: center; padding: 32px 24px;
  border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-card .mark { border-radius: 18px; }
.login-card h1 { font: 800 24px Unbounded, sans-serif; letter-spacing: -.4px; }
.login-buttons { display: grid; gap: 10px; width: 100%; }
.error { color: var(--bad); font-weight: 700; }

/* Account and order */
.app-view { display: grid; gap: 20px; padding-bottom: 64px; }
/* Loader: the mark draws itself in a loop — bowl, stem, gem — and lifts */
.loader { display: grid; place-items: center; min-height: 240px; }
.loader svg { width: 56px; height: 56px; overflow: visible; animation: loader-lift 1.8s var(--ease) infinite; }
.loader-tile { fill: var(--lime); }
.loader-bowl { fill: none; stroke: var(--ink); stroke-width: 4.6; stroke-dasharray: 100; animation: loader-bowl 1.8s var(--ease) infinite; }
.loader-stem { fill: var(--ink); transform-origin: 21.9px 26px; animation: loader-stem 1.8s var(--ease) infinite; }
.loader-gem { fill: var(--ink); transform-origin: 14.4px 18.6px; animation: loader-gem 1.8s var(--spring) infinite; }
@keyframes loader-bowl { 0% { stroke-dashoffset: 100; } 40%, 86% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes loader-stem { 0%, 20% { transform: scaleY(0); } 45%, 86% { transform: none; opacity: 1; } 100% { opacity: 0; } }
@keyframes loader-gem { 0%, 40% { transform: scale(0) rotate(-90deg); } 58%, 86% { transform: none; opacity: 1; } 100% { opacity: 0; } }
@keyframes loader-lift { 0%, 55% { transform: none; } 66% { transform: translateY(-6px); } 80%, 100% { transform: none; } }
/* Page loader: only a slow first load or a slow next page shows it — the delay keeps quick ones clean */
.page-loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; pointer-events: none; visibility: hidden; opacity: 0;
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.page-loader svg { width: 64px; height: 64px; overflow: visible; animation: loader-lift 1.8s var(--ease) infinite; }
.is-loading .page-loader, .is-leaving .page-loader { visibility: visible; opacity: 1; pointer-events: auto; transition: opacity .25s, visibility 0s; }
.is-loading .page-loader { transition-delay: .4s; }
.is-leaving .page-loader { transition-delay: .25s; }
.page-loader .loader-tile { fill: var(--lime); }
/* A busy button carries a small mark that keeps hopping up */
.btn.is-busy::before { content: ""; width: 18px; height: 18px; flex: none; background: currentColor; animation: busy-hop .9s var(--ease) infinite;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='19.6' y='5.5' width='4.6' height='20.5' rx='2.3'/%3E%3Ccircle cx='14.4' cy='18.6' r='6' fill='none' stroke='%23000' stroke-width='4.6'/%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 32 32'%3E%3Crect x='19.6' y='5.5' width='4.6' height='20.5' rx='2.3'/%3E%3Ccircle cx='14.4' cy='18.6' r='6' fill='none' stroke='%23000' stroke-width='4.6'/%3E%3C/svg%3E") center / contain no-repeat; }
@keyframes busy-hop { 40% { transform: translateY(-4px); } 70% { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .loader svg, .page-loader svg, .loader-bowl, .loader-stem, .loader-gem, .btn.is-busy::before { animation: none; }
  .loader-bowl { stroke-dashoffset: 0; }
}
.panel { padding: clamp(16px, 2.2vw, 22px); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line); }
.panel h2 { font: 800 16px Unbounded, sans-serif; letter-spacing: -.3px; margin-bottom: 14px; }
.account-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.account-head h1 { font-size: clamp(24px, 3vw, 34px); }
.account-head .btn { margin-left: auto; }
.cabinet { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.cabinet-nav { position: sticky; top: 88px; display: grid; gap: 4px; padding: 8px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.cabinet-tab { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-s); text-decoration: none; font-weight: 700; color: var(--muted);
  transition: background .2s, color .2s; }
.cabinet-tab:hover { color: var(--text); background: var(--card-2); }
.cabinet-tab[aria-current="true"] { color: var(--on-lime); background: var(--lime); }
.cabinet-tab svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cabinet-tab[aria-current="true"] svg { stroke: currentColor; }
.cabinet-support { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-s) var(--radius-s); }
.cabinet-tab small { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 800; white-space: nowrap; }
.cabinet-pane { min-width: 0; }
.pane-in { animation: rise .3s var(--ease); }
.panel-live { border-color: color-mix(in srgb, var(--lime) 35%, var(--line)); }
.more { display: flex; justify-content: center; margin-top: 14px; }
.profile-menu { display: none; }
.profile-menu { overflow: hidden; border-radius: var(--radius); background: var(--sheen), var(--card); border: 1px solid var(--line); box-shadow: var(--edge); }
.profile-menu a { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 16px; text-decoration: none; font-weight: 700; transition: background .2s; }
.profile-menu a + a { border-top: 1px solid var(--line); }
.profile-menu a:active { background: var(--card-2); }
.profile-menu svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.profile-menu svg:last-child { width: 18px; height: 18px; stroke: var(--soft); }
.profile-menu small { margin-left: auto; color: var(--muted); font-weight: 800; }
.profile-menu span { flex: 1; }
.profile-menu .profile-support { border-top: 1px solid var(--line); }
.profile-menu small + svg, .profile-menu span + svg { margin-left: 0; }
.cabinet-pane > .profile-menu { display: block; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 12px -6px; padding: 6px 10px 6px 4px; border-radius: 10px;
  color: var(--muted); font-weight: 700; text-decoration: none; }
.back-link:active { background: var(--card-2); }
.back-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.balance-big { font: 800 clamp(30px, 4vw, 40px) Unbounded, sans-serif; margin-bottom: 14px; }
.row-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
/* Orders: in work, waiting for payment, an unpaid nudge, then the history by day with an action on every order */
.orders .panel h2 { margin-bottom: 12px; }
.ord-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ord-head h2 { margin: 0 !important; }
.ord-sum { margin-left: auto; color: var(--muted); font-weight: 700; font-size: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-2); color: var(--muted); font-weight: 800; font-size: 13px; cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--card); }
.chips .chip-unpaid { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 12%, var(--card)); color: var(--bad); }
.chips .chip-unpaid em { font-style: normal; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; text-align: center; }
.chips .chip-unpaid[aria-pressed="true"] { background: var(--bad); border-color: var(--bad); color: #fff; }
.chips .chip-unpaid[aria-pressed="true"] em { background: #fff; color: var(--bad); }
.day { margin: 18px 2px 8px; color: var(--soft); font-weight: 800; font-size: 13px; }
.ord { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-bottom: 8px; padding: 14px; border-radius: var(--radius-s); background: var(--card-2); }
.ord.is-unpaid { box-shadow: inset 3px 0 0 var(--bad); }
.ord > img, .live-card > img { width: 44px; height: 44px; border-radius: 12px; }
.ord-letter svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ord-letter { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--line); font-weight: 900; }
.ord-main { display: grid; gap: 1px; min-width: 0; }
.ord-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: 16px; color: var(--text); }
/* The whole card opens the order; the action button sits above the link */
.ord-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ord-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.ord-player { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 700; font-size: 13.5px; min-width: 0; }
.ord-player i { font-style: normal; color: var(--soft); font-weight: 600; }
.ord-player b { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-weight: 700; }
.ord-player i { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1000 auto; }
.ord-player .dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--ok); }
.ord-side { display: grid; justify-items: end; gap: 6px; }
.ord-side b { font-size: 16px; white-space: nowrap; }
.ord-price { display: flex; align-items: center; gap: 10px; }
.ord-side .status, .ord-act { white-space: nowrap; }
.ord-act { position: relative; z-index: 1; display: inline-flex; align-items: center; padding: 7px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); font-weight: 800; font-size: 13px; cursor: pointer; }
.ord-act:hover { border-color: var(--lime-deep); }
.ord-act.pay { border-color: var(--lime); background: var(--lime); color: var(--on-lime); }
.live-card { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 4px 0; }
.live-card + .live-card { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.live-card > img { width: 56px; height: 56px; border-radius: 14px; }
.live-card .ord-link { font-size: 18px; }
.panel-unpaid { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.panel-unpaid .ord-main small { color: var(--bad); font-weight: 700; }
.progress { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 4px; }
.progress span { display: grid; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.progress span::before { content: ""; height: 5px; border-radius: 5px; background: var(--line); }
.progress .done::before { background: var(--ok); }
.progress .now::before { background: linear-gradient(90deg, var(--lime) 60%, var(--line) 60%); }
.progress .warn::before { background: linear-gradient(90deg, var(--star) 60%, var(--line) 60%); }
.progress .done, .progress .now, .progress .warn { color: var(--text); }
.live-hint { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 13.5px; }
.slow-note { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-s); text-align: left;
  background: color-mix(in srgb, var(--star) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--star) 35%, var(--line)); }
.slow-note svg { width: 20px; height: 20px; flex: none; margin-top: 1px; fill: none; stroke: color-mix(in srgb, var(--star) 70%, var(--text)); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.slow-note div { display: grid; gap: 2px; min-width: 0; }
.slow-note b { font-size: 14px; }
.slow-note span { color: var(--muted); font-size: 13.5px; }
.slow-note a { justify-self: start; margin-top: 4px; font-weight: 800; font-size: 13.5px; color: var(--accent-text); }
.result .progress, .result .slow-note { width: 100%; max-width: 440px; margin: 4px auto 0; }
.unpaid-banner { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius-m); background: color-mix(in srgb, var(--bad) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--line)); }
.unpaid-banner div { display: grid; gap: 2px; flex: 1; }
.unpaid-banner b { color: var(--bad); font-size: 16px; }
.unpaid-banner small { color: var(--muted); }
.unpaid-banner[hidden] { display: none; }
@media (max-width: 700px) {
  .ord { grid-template-columns: 40px minmax(0, 1fr); gap: 10px 12px; padding: 12px; }
  .ord > img, .ord-letter { width: 40px; height: 40px; }
  .ord-act { padding: 7px 12px; }
  .ord-side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; justify-items: start; }
  .ord-sum { margin-left: 0; width: 100%; }
  .live-card { grid-template-columns: 48px minmax(0, 1fr); }
  .live-card > img { width: 48px; height: 48px; }
  .live-card .ord-side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .unpaid-banner { flex-wrap: wrap; }
  .unpaid-banner .btn { width: 100%; }
  /* One swipeable row of filters instead of three wrapped lines */
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips button { flex: none; white-space: nowrap; }
  .ord-side { display: flex; flex-wrap: wrap; gap: 8px; }
  .ord-side .ord-act { margin-left: auto; }
  .progress span { font-size: 11.5px; white-space: nowrap; }
}

.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--card-2); text-decoration: none; }
.row-main { display: grid; min-width: 0; flex: 1; }
.row-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { color: var(--muted); }
.row-side { text-align: right; font-weight: 800; white-space: nowrap; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--line); color: var(--muted); }
.status.ok { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.status.wait { background: color-mix(in srgb, var(--lime) 20%, transparent); color: var(--accent-text); }
.status.warn { background: color-mix(in srgb, var(--star) 22%, transparent); color: color-mix(in srgb, var(--star) 62%, var(--text)); }
.status.bad { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.segmented { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); }
.segmented button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 700; color: var(--muted); }
.segmented button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.passkeys { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.passkeys .fine { margin: 0 0 10px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.amounts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.amounts button { border: 1.5px solid var(--line); background: var(--card-2); border-radius: 12px; padding: 10px 16px; font-weight: 800; }
.amounts button[aria-pressed="true"] { border-color: var(--lime); }
.inline-form { display: flex; gap: 10px; }
.inline-form input { flex: 1; height: 48px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--card-2); padding: 0 16px; outline: none; min-width: 0; }
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.pay-amount { display: grid; gap: 4px; }
.pay-amount small { color: var(--muted); font-weight: 600; }
.pay-amount b { font: 800 clamp(34px, 5vw, 48px) Unbounded, sans-serif; }
.pay-amount .dirams { color: var(--accent-text); }
.countdown { color: var(--muted); font-weight: 600; }
.time-left { display: inline-block; margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line);
  color: var(--text); font-variant-numeric: tabular-nums; }
.time-left.is-low { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.pay-block { display: grid; gap: 14px; margin-top: 20px; }
.qr { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; }
.qr img { width: 180px; height: 180px; border-radius: 16px; background: #fff; padding: 10px; }
.qr p { color: var(--muted); }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--card-2); }
.copy-row small { display: block; color: var(--muted); }
.copy-row b { font: 700 17px Onest, sans-serif; letter-spacing: .02em; }
.banks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bank { display: flex; align-items: center; gap: 10px; padding: 12px; min-height: 64px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--card-2); font-weight: 700; text-align: left;
  transition: transform .18s var(--spring), border-color .2s; }
.bank:active { transform: scale(.97); }
.bank img, .bank .bank-mark { width: 40px; height: 40px; border-radius: 11px; flex: none; }
.bank .bank-mark { display: grid; place-items: center; background: var(--line); font-size: 13px; font-weight: 800; }
.waiting { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius-s); background: var(--card-2); }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 color-mix(in srgb, var(--lime) 60%, transparent); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { to { box-shadow: 0 0 0 14px transparent; } }
.result { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 36px 20px; }
.result-mark { position: relative; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--lime); color: var(--on-lime);
  animation: pop .6s var(--spring); box-shadow: 0 0 0 10px color-mix(in srgb, var(--lime) 12%, transparent); }
.result-mark svg { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.result-mark:not(.wait):not(.bad):not(.warn) path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .45s .3s var(--ease) forwards; }
.result-mark.wait svg { animation: spin-slow 6s linear infinite; }
@keyframes pop { from { opacity: 0; transform: scale(.4); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.confetti { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.confetti i { position: absolute; width: 8px; height: 12px; border-radius: 2px; opacity: 0; animation: burst 1.2s cubic-bezier(.1, .7, .3, 1) forwards; }
@keyframes burst { 0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  80% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 70px)) rotate(var(--r)); } }
.codes { width: min(100%, 440px); display: grid; gap: 10px; text-align: left; }
.codes h2 { font-size: 18px; }

.result-mark.wait { background: var(--card-2); color: var(--accent-text); }
.result-mark.warn { background: color-mix(in srgb, var(--star) 20%, var(--card-2)); color: color-mix(in srgb, var(--star) 70%, var(--text)); }
.result-mark.bad { background: color-mix(in srgb, var(--bad) 20%, var(--card-2)); color: var(--bad); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.link-btn { border: 0; background: none; color: var(--muted); text-decoration: underline; padding: 6px 0; font-weight: 600; }

/* 404 */
.lost { display: grid; gap: 16px; justify-items: start; padding-bottom: 24px; }
.lost h1 { font: 800 clamp(24px, 3vw, 32px) Unbounded, sans-serif; letter-spacing: -.5px; }
.lost-games { padding-bottom: 32px; }

/* Intro: once per session, on top of an already rendered page; site.js injects it */
.intro { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; background: var(--bg); cursor: pointer;
  transition: opacity .45s var(--ease), visibility .45s; }
.intro::before { content: ""; position: absolute; left: 50%; top: 50%; width: 640px; height: 640px; margin: -320px 0 0 -320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 255, 60, .35) 0%, rgba(214, 255, 60, 0) 60%); opacity: 0; animation: intro-glow 1.2s .2s var(--ease) forwards; }
@keyframes intro-glow { 40% { opacity: 1; } 100% { opacity: .55; } }
.intro.out { opacity: 0; visibility: hidden; }
.intro.out .intro-in { transform: scale(1.06); }
.intro-in { position: relative; display: flex; align-items: center; transition: transform .45s var(--ease); }
.intro-mark { position: relative; width: 84px; height: 84px; animation: intro-slide .5s .95s var(--ease) both; }
.intro-mark svg { width: 84px; height: 84px; overflow: visible; }
.intro-mark .sq { transform-origin: 16px 16px; animation: intro-sq .55s var(--spring) both; }
@keyframes intro-sq { from { transform: scale(0) rotate(-25deg); } }
.intro-mark .bowl { stroke-dasharray: 38; stroke-dashoffset: 38; animation: intro-draw .42s .3s cubic-bezier(.6, 0, .3, 1) forwards; }
@keyframes intro-draw { to { stroke-dashoffset: 0; } }
.intro-mark .stem { transform-origin: 21.9px 26px; animation: intro-stem .36s .42s var(--spring) both; }
@keyframes intro-stem { from { transform: scaleY(0); } }
.intro-mark .gem { transform-origin: 14.4px 18.6px; animation: intro-gem .5s .7s cubic-bezier(.34, 1.8, .64, 1) both; }
@keyframes intro-gem { from { transform: scale(0) rotate(-90deg); } }
.intro-mark .spark { stroke: var(--lime-deep); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 4 20; stroke-dashoffset: 4; opacity: 0;
  animation: intro-spark .55s .74s ease-out forwards; }
@keyframes intro-spark { 0% { opacity: 1; stroke-dashoffset: 4; } 100% { opacity: 0; stroke-dashoffset: -14; } }
@keyframes intro-slide { from { transform: translateX(calc(var(--word, 190px) / 2 + var(--gap, 8px))); } }
.intro-word { display: flex; margin-left: 16px; font: 800 38px/1 Unbounded, sans-serif; letter-spacing: -1px; overflow: hidden; padding: 4px 2px; }
.intro-word span { display: inline-block; transform: translateY(110%); animation: intro-letter .42s var(--ease) forwards; animation-delay: calc(1.02s + var(--n) * 35ms); }
.intro-word .tj { color: var(--accent-text); }
@keyframes intro-letter { to { transform: none; } }
.intro-bar { position: absolute; left: 50%; bottom: 56px; width: 120px; height: 3px; margin-left: -60px; border-radius: 3px; background: var(--line); overflow: hidden; }
.intro-bar i { display: block; height: 100%; width: 0; background: var(--lime-deep); animation: intro-bar 1.4s var(--ease) forwards; }
@keyframes intro-bar { to { width: 100%; } }
@media (max-width: 480px) {
  .intro-mark, .intro-mark svg { width: 62px; height: 62px; }
  .intro-mark { --gap: 6px; }
  .intro-word { margin-left: 12px; font-size: 28px; letter-spacing: -.6px; }
  .intro::before { width: 440px; height: 440px; margin: -220px 0 0 -220px; }
  .intro-bar { bottom: calc(40px + env(safe-area-inset-bottom)); }
}

/* Footer */
.foot { margin-top: 56px; padding: 28px 0 calc(40px + env(safe-area-inset-bottom)); background: var(--card); color: var(--muted); font-weight: 600; font-size: 14px; }
.foot-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a:hover { color: var(--text); }

.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: min(92vw, 460px);
  padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 700; box-shadow: var(--shadow); animation: toast-in .4s var(--spring); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 18px) scale(.96); } }

.modal { width: min(100% - 32px, 420px); padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible; }
.modal::backdrop { background: rgba(5, 7, 12, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal[open] { animation: modal-in .32s var(--spring); }
.modal[open]::backdrop { animation: fade .25s var(--ease); }
.modal-card { display: grid; gap: 12px; padding: 24px; border-radius: var(--radius); background: var(--sheen), var(--card); border: 1px solid var(--line-hi); box-shadow: var(--edge), var(--shadow); }
.modal-card h2 { font-size: 20px; }
.modal-card p { color: var(--muted); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.95); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.toast.bad { background: var(--bad); color: #fff; }

@media (max-width: 960px) {
  .order-layout { grid-template-columns: 1fr; }
  .cabinet { grid-template-columns: minmax(0, 1fr); }
  .cabinet-nav { position: sticky; top: 60px; z-index: 5; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 5px;
    background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .cabinet-tab { flex-direction: column; gap: 4px; padding: 8px 4px; font-size: 12px; text-align: center; line-height: 1.2; }
  .cabinet-tab small { display: none; }
  .cabinet-tab[aria-current="true"] { box-shadow: none; background: var(--card-2); }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .top-row { gap: 12px; height: 60px; }
  .balance-chip { height: 36px; padding: 0 12px 0 8px; font-size: 14px; }
  /* Signed in, the balance and avatar need the room: the preferences keep only their globe */
  .top-row:has(.balance-chip) .prefs b, .top-row:has(.balance-chip) .prefs .chev { display: none; }
  .qr { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .foot-row { grid-template-columns: 1fr; }
}
/* Phone tab bar, the Mini App's: catalog, orders, profile */
.tabbar { display: none; }
@media (max-width: 1060px) { .top-row { gap: 16px; } .nav a { padding: 8px 9px; } }
@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .top-row { height: 58px; gap: 10px; }
  .nav, .top-login { display: none; }
  .top-search { display: none; }
  .search-open { display: grid; }
  /* Phone: the search icon turns the header row into a search field until it is closed */
  .top.is-searching .top-row > :not(.top-search) { display: none; }
  .top.is-searching .top-search { display: flex; align-items: center; gap: 6px; max-width: none; margin: 0; }
  .top.is-searching .top-search .search { flex: 1; width: auto; }
  .top.is-searching .search-close { display: grid; }
  .top.is-searching .search kbd { display: none; }
  body:has(.top.is-searching) :is(main, .foot) { opacity: .25; pointer-events: none; transition: opacity .2s; }
  .top.is-searching .search-pop { position: fixed; left: var(--gutter); right: var(--gutter); top: 64px; max-height: calc(100dvh - 160px); }
  .tabbar { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 92%, transparent);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0, 0, 0, .06); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 7px 0; border-radius: 14px; color: var(--muted);
    font-size: 11.5px; font-weight: 800; transition: background .25s var(--ease), color .25s var(--ease); }
  .tabbar .i { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { background: var(--lime); color: var(--on-lime); }
  .tabbar a[aria-current="page"] .i { animation: tab-pop .35s var(--spring); }
  body.has-tabbar .foot { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  body.has-tabbar .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
  /* The tab bar picks orders or profile; the profile's own menu replaces the section strip */
  body.has-tabbar .cabinet-nav { display: none; }
  body.has-tabbar .app-view:not([data-section="profile"]) .account-head { display: none; }
  body.has-tabbar .top .avatar-link { display: none; }
}
@keyframes tab-pop { 50% { transform: scale(1.18) rotate(-6deg); } }
@media (min-width: 861px) { .paybar { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Where-is-my-ID: a quiet disclosure under the field, numbered because the steps are a sequence */
.id-help { margin-top: 2px; font-size: 14px; }
.id-help summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-weight: 700; }
.id-help summary::-webkit-details-marker { display: none; }
.id-help summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease); }
.id-help[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.id-help ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* A game that can't be sold right now stays in place, greyed out, with a plain note */
.down-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--card-2); color: var(--muted);
  border: 1px solid var(--line); font-weight: 700; font-size: 12px; white-space: nowrap; }
.game em.down-badge { background: rgba(10, 12, 18, .78); color: #d5d8e0; border: 0; }
.game.is-down .art, .game.is-down .cover { filter: grayscale(1) brightness(.7); }
.game.is-down strong { opacity: .7; }
.offer:disabled { cursor: not-allowed; opacity: .45; filter: grayscale(1); }

/* Small phones: these come last so they win over the base rules above */
@media (max-width: 400px) {
  .orders .panel { padding: 14px; }
  .orders .chips { margin: 0 -14px; padding: 0 14px 2px; }
  .ord { padding: 12px 10px; gap: 8px 10px; }
  .ord-link { font-size: 15px; }
  .ord-side { gap: 6px; }
  .ord-price { gap: 6px; }
  .ord-side .status { padding: 3px 8px; font-size: 11.5px; }
  .ord-act { padding: 7px 10px; font-size: 12.5px; }
  .live-card { gap: 12px; }
  .live-card .ord-link { font-size: 16px; }
  .pack { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .pack img { grid-row: auto; margin-bottom: 6px; }
  .pack b, .pack small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .setting { flex-wrap: wrap; }
  .amounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-form { flex-direction: column; }
  .inline-form input { flex: none; }
  .setting .segmented { max-width: 100%; }
  .segmented button { padding: 7px 11px; white-space: nowrap; }
  .top-right { gap: 2px; }
  .search-open { width: 36px; }
  .balance-chip { padding: 0 10px; }
  .balance-chip svg { display: none; }
  /* Pages without the tab bar show the avatar; the balance stays one tap away in the account */
  body:not(.has-tabbar) .top .balance-chip { display: none; }
}
@media (max-width: 360px) {
  :root { --gutter: 12px; }
  .top-row { gap: 6px; }
  .brand { gap: 7px; }
  .wordmark { font-size: 16px; }
  .prefs { padding: 0 6px; }
  .balance-chip { gap: 6px; padding: 0 10px 0 8px; }
  .segmented button { padding: 7px 8px; font-size: 13px; }
}

/* Terms and privacy: long reading text, one narrow column */
.legal { max-width: 74ch; padding-bottom: 48px; line-height: 1.6; }
.legal h1 { margin-bottom: 6px; }
.legal h2 { font-size: 18px; margin: 28px 0 8px; }
.legal p, .legal ul { margin: 0 0 10px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--accent-text); }
.legal-date { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.legal-short { background: var(--card-2); border-radius: var(--radius); padding: 4px 20px 10px; margin: 20px 0 8px; }
.legal-short h2 { margin-top: 16px; }
