/* ROS LD vendor site, in the beta registration page's look (rld-website feature/beta-game-look,
   site/beta/beta.css): warm near-black, the RLD red edge, one gold-to-orange accent, heavy italic titles. */

@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: italic; font-display: swap; src: url("/fonts/barlow-condensed-latin-800-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Kantumruy Pro"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/kantumruy-pro-khmer-400-normal.woff2") format("woff2"); unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC; }
@font-face { font-family: "Kantumruy Pro"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/kantumruy-pro-khmer-600-normal.woff2") format("woff2"); unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC; }
@font-face { font-family: "Kantumruy Pro"; font-weight: 700 800; font-style: normal; font-display: swap; src: url("/fonts/kantumruy-pro-khmer-700-normal.woff2") format("woff2"); unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC; }

:root {
  color-scheme: dark;
  --bg: #050404;
  --line: rgb(255 180 130 / 0.09);
  --line-strong: rgb(255 180 130 / 0.18);
  --text: #f7f0ea;
  --muted: #b5a397;
  --accent: #ff8a1f;
  --accent-hi: #ffb347;
  --gold: #ffc23a;
  --on-accent: #1a0f0a;
  --glow: 255 122 26;
  --fire: linear-gradient(180deg, #ffc23a 0%, #ff8a1f 52%, #e8531a 100%);
  --fire-hi: linear-gradient(180deg, #ffd25e 0%, #ff9a33 52%, #f2611f 100%);
  --fire-text: linear-gradient(180deg, #ffd25e 10%, #ff8a1f 60%, #ef5a1c 100%);
  --hot: #f93d4e;
  --danger: #ff6b6b;
  --ok: #7fd49b;
  --red: #de1b21;
  --display: "Barlow Condensed", "Kantumruy Pro", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", "Kantumruy Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; overflow-x: clip; color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(55% 40% at 88% 0%, rgb(222 27 33 / 0.13), transparent 70%),
    radial-gradient(45% 35% at 0% 100%, rgb(255 122 26 / 0.08), transparent 70%),
    linear-gradient(180deg, rgb(5 4 4 / 0.93), rgb(5 4 4 / 0.97)),
    url("/img/lobby-blur.jpg") center / cover no-repeat;
}
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
p, h1, h2, h3, ul { margin: 0; padding: 0; }
ul { list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
.sprite { position: absolute; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.ic { width: 18px; height: 18px; flex: none; }

.display { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; }
:lang(km) body { line-height: 1.7; }
:lang(km) .display { font-style: normal; text-transform: none; letter-spacing: 0 !important; line-height: 1.35 !important; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

.panel { background: linear-gradient(180deg, rgb(17 13 12 / 0.9), rgb(7 5 5 / 0.94)); box-shadow: inset 0 1px 0 rgb(255 180 130 / 0.06), 0 18px 40px rgb(0 0 0 / 0.6); border: 1px solid var(--line); border-radius: 4px; }
.strip { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 20px; font-size: 22px; letter-spacing: 0.02em; background: linear-gradient(180deg, #170f0d, #0c0807); box-shadow: inset 0 -1px 0 rgb(222 27 33 / 0.5); }
.frame { padding: 1px; border-radius: 4px; background: var(--line-strong); transition: background-color 0.3s; }
.frame__in { border-radius: 3px; background: rgb(4 3 3 / 0.92); height: 100%; }
.frame--input:focus-within { background: var(--fire); box-shadow: 0 0 18px rgb(var(--glow) / 0.25); }
.input { width: 100%; height: 52px; padding: 0 16px; background: transparent; border: 0; outline: none; font-size: 18px; letter-spacing: 0.04em; }
.input::placeholder { color: rgb(181 163 151 / 0.6); letter-spacing: 0.02em; }

.chip { display: inline-block; padding: 6px 10px; line-height: 1; background: linear-gradient(180deg, var(--gold), #ff7a1a); color: var(--on-accent); font-size: 11px; font-weight: 800; letter-spacing: 0.32em; text-transform: uppercase; }
.chip--lg { padding: 7px 16px; font-size: 13px; }
.chip--sm { font-size: 10px; padding: 5px 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 4px; white-space: nowrap; font-size: 20px; letter-spacing: 0.03em; transition: transform 0.2s var(--ease), box-shadow 0.2s, opacity 0.2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; transform: none; cursor: wait; }
.btn--lg { height: 52px; }
.btn--block { width: 100%; }
.btn-go { background: var(--fire); color: var(--on-accent); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), inset 0 -2px 0 rgb(150 40 10 / 0.35), 0 6px 22px rgb(var(--glow) / 0.4); }
.btn-go:hover { background: var(--fire-hi); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), inset 0 -2px 0 rgb(150 40 10 / 0.35), 0 8px 30px rgb(var(--glow) / 0.55); }
.btn-steel { background: rgb(20 14 12 / 0.7); color: var(--gold); box-shadow: inset 0 0 0 1px rgb(255 194 58 / 0.45); }
.btn-steel:hover { background: rgb(255 194 58 / 0.1); box-shadow: inset 0 0 0 1px rgb(255 194 58 / 0.8); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 16px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 3px; color: var(--gold); background: rgb(255 194 58 / 0.06); box-shadow: inset 0 0 0 1px rgb(255 194 58 / 0.25); transition: background-color 0.2s, color 0.2s; }
.icon-btn:hover { background: rgb(255 194 58 / 0.16); }
.icon-btn.is-done { color: var(--ok); box-shadow: inset 0 0 0 1px rgb(127 212 155 / 0.5); }
.link-btn { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.link-btn:hover { color: var(--accent); }

/* ---- top bar ---- */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 40; background: linear-gradient(180deg, rgb(4 3 3 / 0.9), rgb(10 5 5 / 0.82)); box-shadow: inset 0 -1px 0 rgb(222 27 33 / 0.45), 0 8px 24px rgb(0 0 0 / 0.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.topbar__in { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; text-decoration: none; }
.brand__logo { height: 28px; width: auto; filter: drop-shadow(0 2px 8px rgb(0 0 0 / 0.7)); }
.who { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; color: var(--gold); letter-spacing: 0.03em; }
.lang { display: flex; height: 36px; margin-left: auto; padding: 2px; border: 1px solid rgb(255 122 26 / 0.45); background: #0b0809; flex: none; }
.who:not([hidden]) + .lang { margin-left: 0; }
.lang button { min-width: 40px; padding: 0 8px; font-size: 14px; font-weight: 700; color: var(--gold); }
.lang button[aria-pressed="true"] { background: linear-gradient(180deg, #ffad2b, #f57a1f, #d9541a); color: var(--on-accent); }
@media (max-width: 420px) { .brand .chip { display: none; } }

/* ---- sign in (hero) ---- */
.hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 100dvh; overflow: hidden; }
@media (min-width: 768px) { .hero { align-items: center; } }
.hero__scene { position: absolute; inset: 56px 0 0; z-index: -1; -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent); }
.hero__pic img { width: 100%; height: 100%; object-fit: cover; object-position: right top; animation: hero-in 1.4s var(--ease) both; }
.hero__pic { position: absolute; inset: 0; }
@media (min-width: 768px) { .hero__pic img { object-position: right center; } }
@keyframes hero-in { from { opacity: 0; filter: blur(8px); } to { opacity: 1; filter: none; } }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgb(5 4 4 / 0.9), rgb(5 4 4 / 0.3) 55%, transparent); }
@media (min-width: 768px) { .hero__shade { background: linear-gradient(to right, rgb(5 4 4 / 0.8), rgb(5 4 4 / 0.2) 45%, transparent 65%); } }
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; padding-top: 96px; padding-bottom: 56px; }
.hero__logo { width: min(340px, 70vw); height: auto; margin-bottom: 14px; filter: drop-shadow(0 8px 20px rgb(0 0 0 / 0.75)); }
@media (max-width: 767px) { .hero__logo { display: none; } }
.hero__title { margin-top: 22px; font-size: 56px; line-height: 0.95; letter-spacing: -0.01em; text-shadow: 0 2px 0 rgb(0 0 0 / 0.45), 0 0 12px rgb(0 0 0 / 0.35); }
@media (min-width: 768px) { .hero__title { font-size: 80px; } }
.hero__title > span { display: block; }
.hero__hi { padding-bottom: 4px; padding-right: 0.08em; color: var(--accent); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero__hi, .total strong, .done__title { background: var(--fire-text); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 2px 0 rgb(0 0 0 / 0.45)) drop-shadow(0 0 18px rgb(255 122 26 / 0.35)); }
}
.login { display: flex; gap: 10px; width: min(460px, 100%); margin-top: 28px; }
.login .frame { flex: 1; min-width: 0; }
@media (max-width: 480px) { .login { flex-direction: column; } .login .btn { width: 100%; } }
.form-error { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 15px; color: var(--danger); }

.rise { animation: rise 0.8s var(--ease) both; }
.d0 { animation-delay: 0.05s; } .d1 { animation-delay: 0.14s; } .d2 { animation-delay: 0.23s; } .d3 { animation-delay: 0.32s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---- shop ---- */
.shop { padding-top: 96px; padding-bottom: 72px; }
.sec-title { display: flex; align-items: center; gap: 12px; font-size: 34px; line-height: 1.05; letter-spacing: -0.01em; text-shadow: 0 2px 0 rgb(0 0 0 / 0.45); }
@media (min-width: 768px) { .sec-title { font-size: 42px; } }
.slant-bar { display: inline-block; flex: none; width: 10px; height: 0.8em; background: var(--fire); clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%); }
.slant-bar--sm { width: 8px; height: 20px; }
.sec-tools { display: flex; align-items: center; gap: 8px; }
.sec-tools .btn .ic { width: 16px; height: 16px; }
.more-btn { display: flex; margin: 16px auto 0; }
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 64px; }

.buy { display: grid; gap: 20px; margin-top: 24px; }
@media (min-width: 960px) { .buy { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; } }

/* pack tiles, like the beta page's phone tiles */
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pack { position: relative; display: block; cursor: pointer; }
.pack input { position: absolute; opacity: 0; pointer-events: none; }
.pack__card { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 4px; box-shadow: 0 0 0 1px var(--line-strong); background: radial-gradient(90% 70% at 50% 30%, rgb(255 122 26 / 0.06), transparent 70%), linear-gradient(180deg, #140e0c, #070505); transition: box-shadow 0.25s, transform 0.15s; }
.pack:hover .pack__card { box-shadow: 0 0 0 1px rgb(255 194 58 / 0.45); }
.pack input:focus-visible + .pack__card { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
.pack input:checked + .pack__card { box-shadow: 0 0 0 2px var(--accent), 0 0 26px rgb(var(--glow) / 0.45); background: radial-gradient(90% 70% at 50% 30%, rgb(255 122 26 / 0.22), transparent 70%), linear-gradient(180deg, #1f120d, #090606); }
.pack:active .pack__card { transform: scale(0.97); }
.pack__art { display: grid; place-items: center; padding: 22px 8px 6px; }
.pack__gem { width: 44%; max-width: 76px; aspect-ratio: 1; filter: drop-shadow(0 6px 12px rgb(0 0 0 / 0.55)); transition: transform 0.5s var(--ease); }
.pack:hover .pack__gem { transform: translateY(-4px) scale(1.06); }
.pack input:checked + .pack__card .pack__gem { filter: drop-shadow(0 0 16px rgb(var(--glow) / 0.6)); animation: float 2.4s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) scale(1.06); } 50% { transform: translateY(-6px) scale(1.06); } }
.pack__dia { padding: 0 12px; text-align: center; font-size: 34px; line-height: 1; }
.pack__unit { padding: 2px 12px 12px; text-align: center; font-size: 13px; color: var(--muted); }
.pack__foot { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: auto; padding: 10px 8px; background: rgb(0 0 0 / 0.6); border-top: 1px solid var(--line); transition: background-color 0.25s, color 0.25s; }
.pack__foot b { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 22px; line-height: 1; }
.pack__foot s { font-size: 13px; color: var(--muted); }
.pack input:checked + .pack__card .pack__foot { background: var(--fire); color: var(--on-accent); border-top-color: transparent; }
.pack input:checked + .pack__card .pack__foot s { color: rgb(26 15 10 / 0.6); }
.pack__check { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; color: var(--accent-hi); opacity: 0; transform: scale(0.5); transition: opacity 0.2s, transform 0.3s cubic-bezier(0.34, 1.7, 0.5, 1); }
.pack input:checked + .pack__card .pack__check { opacity: 1; transform: none; }
@media (max-width: 520px) {
  .pack__dia { font-size: 26px; }
  .pack__foot { flex-direction: column; align-items: center; gap: 2px; }
  .pack__foot b { font-size: 19px; }
}

/* tabs: Accounts | Diamonds */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid rgb(255 122 26 / 0.35); background: rgb(11 8 9 / 0.85); border-radius: 4px; margin-bottom: 26px; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 3px; font-size: 22px; letter-spacing: 0.03em; color: var(--muted); transition: color 0.2s, background-color 0.2s; }
.tab .ic { width: 20px; height: 20px; }
.tab:hover { color: var(--gold); }
.tab[aria-selected="true"] { background: var(--fire); color: var(--on-accent); box-shadow: 0 4px 18px rgb(var(--glow) / 0.35); }
@media (max-width: 420px) { .tabs { display: flex; } .tab { flex: 1; justify-content: center; padding: 0 10px; font-size: 19px; } }

/* player box */
.player { margin-bottom: 14px; }
.player__in { display: flex; align-items: center; gap: 10px; padding-left: 14px; }
.player__ic { color: var(--muted); }
.player__in .input { padding-left: 0; font-variant-numeric: tabular-nums; }
.player__state { display: inline-flex; align-items: center; gap: 6px; flex: none; max-width: 55%; padding-right: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__state.ok { color: var(--ok); }
.player__state.bad { color: var(--danger); }
.player__state .spinner { width: 18px; height: 18px; border-width: 2px; }
#player-frame.is-ok { background: rgb(127 212 155 / 0.6); }
#player-frame.is-bad { background: rgb(255 107 107 / 0.6); }

/* ten diamond packs: smaller tiles */
.packs--dia { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.packs--dia .pack__art { padding: 14px 6px 2px; }
.packs--dia .pack__gem { width: 38%; }
.packs--dia .pack__dia { font-size: 26px; }
.packs--dia .pack__unit { display: none; }
.packs--dia .pack__foot { flex-direction: column; align-items: center; gap: 2px; margin-top: 10px; padding: 8px 4px; }
.packs--dia .pack__foot b { font-size: 19px; }
.packs--dia .pack__check { width: 18px; height: 18px; top: 6px; right: 6px; }
@media (max-width: 720px) { .packs--dia { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .packs--dia { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .packs--dia .pack__art { padding: 10px 6px 0; }
  .packs--dia .pack__gem { width: 26%; }
  .packs--dia .pack__foot { flex-direction: row; justify-content: center; gap: 8px; margin-top: 8px; }
}
.sum-player { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.sum-dia { font-size: 24px; }
.badge.delivered { background: var(--fire); color: var(--on-accent); }
.order__to { color: var(--text); font-weight: 600; }
.done__sub { margin: -6px 0 6px; text-align: center; color: var(--muted); }
.done__sub b { color: var(--text); }

/* order summary */
@media (min-width: 960px) { .summary { position: sticky; top: 84px; } }
.summary { overflow: hidden; }
.summary__body { display: grid; gap: 18px; padding: 18px 20px 20px; }
.qty, .total { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.total { padding-top: 16px; border-top: 1px solid var(--line); }
.total strong { font-size: 40px; line-height: 1; color: var(--accent); }
.stepper { display: inline-flex; align-items: center; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line-strong); background: rgb(4 3 3 / 0.9); }
.stepper button { width: 42px; height: 42px; font-size: 22px; color: var(--gold); }
.stepper button:disabled { color: rgb(181 163 151 / 0.35); cursor: default; }
.stepper output { min-width: 40px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 22px; }
.go-btn { height: 56px; font-size: 22px; }

/* orders */
.empty { margin-top: 18px; }
.orders { display: grid; gap: 10px; margin-top: 18px; }
.order { overflow: hidden; }
.order__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; }
.order__main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; flex: 1; }
.order__id { font-size: 20px; letter-spacing: 0.02em; }
.order__what { color: var(--muted); font-size: 15px; }
.order__actions { display: flex; gap: 8px; }
.badge { display: inline-flex; align-items: center; padding: 3px 12px 3px 10px; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
:lang(km) .badge { font-style: normal; text-transform: none; letter-spacing: 0; }
.badge.waiting { background: #1a0f0a; color: var(--gold); box-shadow: inset 0 0 0 1px rgb(255 194 58 / 0.5); }
.badge.ready { background: var(--fire); color: var(--on-accent); }
.badge.cancelled { background: rgb(255 255 255 / 0.05); color: var(--muted); }
.order.is-cancelled { opacity: 0.6; }

/* accounts: one card per account, copy button on each */
.order__accounts:empty { display: none; }
.order__accounts { border-top: 1px solid var(--line); }
.acc-list { display: grid; }
.acc { display: grid; grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1fr) 36px; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.acc:last-child { border-bottom: 0; }
.acc__id { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.acc__name, .acc__pw { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc__name { font-weight: 600; }
.acc__pw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--gold); letter-spacing: 0.02em; }
.acc__pw.is-gone { color: var(--muted); font-family: var(--body); font-size: 14px; }
.acc__head { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding-top: 8px; padding-bottom: 8px; }
:lang(km) .acc__head { letter-spacing: 0; text-transform: none; }
.acc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px 14px; }
.acc-foot .btns { display: flex; gap: 8px; }
.acc-foot .btn .ic { width: 16px; height: 16px; }
.order__toggle .ic { transition: transform 0.25s var(--ease); }
.order.is-open .order__toggle .ic { transform: rotate(180deg); }
.order:not(.is-open) .order__accounts { display: none; }
.order__head.is-click { cursor: pointer; }
.pay .acc { grid-template-columns: minmax(0, 1fr) 36px; grid-template-areas: "name copy" "pw copy" "id copy"; row-gap: 0; }
.pay .acc__name { grid-area: name; } .pay .acc__pw { grid-area: pw; } .pay .acc__id { grid-area: id; font-size: 13px; } .pay .acc .icon-btn { grid-area: copy; }
.pay .acc__head { display: none; }
.acc__pw { overflow: visible; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
@media (max-width: 560px) {
  .acc { grid-template-columns: minmax(0, 1fr) 36px; grid-template-areas: "name copy" "pw copy" "id copy"; row-gap: 0; }
  .acc__name { grid-area: name; } .acc__pw { grid-area: pw; } .acc__id { grid-area: id; font-size: 13px; } .acc .icon-btn { grid-area: copy; }
  .acc__head { display: none; }
}

/* ---- payment dialog ---- */
.pay { width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; color: var(--text); overflow: auto; }
.pay::backdrop { background: rgb(3 2 2 / 0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pay[open] { animation: pop 0.45s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
.pay .strip { font-size: 20px; }
.pay__close { margin-left: auto; }
.pay__body { display: grid; justify-items: center; gap: 14px; padding: 22px 20px 22px; text-align: center; }
.khqr { width: 264px; background: #fff; color: #111; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 2px rgb(255 138 31 / 0.6), 0 0 34px rgb(var(--glow) / 0.35), 0 18px 40px rgb(0 0 0 / 0.5); font-family: var(--body); }
.khqr__head { background: #e1232e; color: #fff; font-weight: 800; letter-spacing: 0.3em; padding: 9px; font-size: 13px; }
.khqr__name { display: grid; grid-template-columns: 1fr auto; align-items: baseline; padding: 12px 20px 10px; border-bottom: 2px dashed #d5d8dd; text-align: left; }
.khqr__name span { grid-column: 1 / -1; font-weight: 700; letter-spacing: 0.06em; font-size: 13px; }
.khqr__name strong { font-size: 28px; line-height: 1.1; }
.khqr__name small { font-size: 11px; color: #666; font-weight: 600; }
.khqr__code { position: relative; display: grid; place-items: center; padding: 16px 24px 8px; min-height: 240px; }
.khqr__code img { width: 216px; height: 216px; image-rendering: pixelated; }
.khqr__code img:not([src]) { visibility: hidden; }
.khqr__cover { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; padding: 20px; background: rgb(255 255 255 / 0.95); font-weight: 800; font-size: 17px; color: #555; }
.khqr__cover:empty { display: none; }
.khqr__cover .ic { width: 54px; height: 54px; }
.khqr__cover.ok { color: #138a4a; }
.khqr__cover.bad { color: #b3261e; }
.khqr__cover .spinner { border-color: rgb(0 0 0 / 0.12); border-top-color: #e1232e; }
.khqr__timer { padding: 0 0 12px; color: #666; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; }
.khqr__timer.is-low { color: #b3261e; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgb(255 255 255 / 0.2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.state-pill { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 20px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--gold); }
:lang(km) .state-pill { font-style: normal; text-transform: none; letter-spacing: 0; font-size: 17px; }
.state-pill .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); animation: ping 1.8s ease-out infinite; }
.state-pill.is-ok { color: var(--ok); } .state-pill.is-ok .dot { background: var(--ok); }
.state-pill.is-bad { color: var(--danger); } .state-pill.is-bad .dot { background: var(--danger); animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgb(255 194 58 / 0.6); } 80%, 100% { box-shadow: 0 0 0 10px rgb(255 194 58 / 0); } }
.pay__done { width: 100%; text-align: left; }
.pay__done .panel { box-shadow: none; }
.done__title { margin: 4px 0 16px; font-size: 40px; line-height: 1.05; text-align: center; color: var(--accent); }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 70; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 4px; background: #160f0d; box-shadow: 0 0 0 1px var(--line-strong), 0 12px 30px rgb(0 0 0 / 0.6); font-weight: 600; animation: rise 0.35s var(--ease) both; }
.toast.is-bad { color: #ffd6d6; box-shadow: 0 0 0 1px rgb(255 107 107 / 0.5), 0 12px 30px rgb(0 0 0 / 0.6); }
.toast.is-ok { color: var(--ok); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
