/* Marble Rush — темний неоновий стиль. Мобільний перш за все: 100dvh, safe areas, без прокрутки сторінки. */
:root {
  --bg: #07070f;
  --bg2: #0e0e1c;
  --panel: rgba(255, 255, 255, 0.05);
  --panel2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f3f4ff;
  --muted: rgba(230, 232, 255, 0.58);
  --accent: #ff3df2;
  --accent2: #27c8ff;
  --gold: #ffd60a;
  --good: #1fe07a;
  --bad: #ff3b5c;
  --radius: 16px;
  --sat: max(env(safe-area-inset-top), calc(var(--tg-safe-top, 0px) + var(--tg-content-safe-top, 0px)));
  --sab: max(env(safe-area-inset-bottom), calc(var(--tg-safe-bottom, 0px) + var(--tg-content-safe-bottom, 0px)));
  --sal: max(env(safe-area-inset-left), var(--tg-safe-left, 0px));
  --sar: max(env(safe-area-inset-right), var(--tg-safe-right, 0px));
  --app-h: 100dvh;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 15px/1.4 system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none; overflow: hidden; -webkit-user-select: none; user-select: none;
}
#app { position: fixed; inset: 0; height: var(--app-h); overflow: hidden;
  background: radial-gradient(120% 60% at 50% -10%, #231040 0%, transparent 60%), radial-gradient(90% 50% at 100% 110%, #062a3a 0%, transparent 60%), var(--bg); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
code { background: var(--panel2); padding: 1px 5px; border-radius: 6px; font-size: 0.92em; }

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding-left: var(--sal); padding-right: var(--sar); }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px 24px; overscroll-behavior: contain; }

.topbar { display: flex; align-items: center; gap: 10px; padding: calc(var(--sat) + 10px) 16px 10px; min-height: 52px; }
.brand { font-weight: 800; letter-spacing: 0.14em; font-size: 15px; display: flex; align-items: center; gap: 8px; flex: 1; }
.brand b { color: var(--accent); text-shadow: 0 0 12px rgba(255, 61, 242, 0.7); }
.brand-dot { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--accent) 45%, #4b0a7a); box-shadow: 0 0 10px var(--accent); }
.coins { display: flex; align-items: center; gap: 6px; background: var(--panel2); border: 1px solid var(--line); padding: 5px 11px 5px 7px; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; }
.coin { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c0, var(--gold) 50%, #a07000); box-shadow: 0 0 8px rgba(255, 214, 10, 0.6); }
.icon-btn { background: var(--panel2); border: 1px solid var(--line); color: var(--text); width: 36px; height: 36px; border-radius: 12px; font-size: 24px; line-height: 1; display: grid; place-items: center; padding-bottom: 3px; }

.btn { border: 0; border-radius: 14px; padding: 12px 18px; font: inherit; font-weight: 700; color: var(--text); background: var(--panel2); cursor: pointer; transition: transform 0.08s, filter 0.2s, opacity 0.2s; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; }
.btn.primary { background: linear-gradient(135deg, #ff3df2, #7a5cff 55%, #27c8ff); box-shadow: 0 6px 24px rgba(255, 61, 242, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.big { width: 100%; padding: 15px; font-size: 17px; }
.btn.small { padding: 8px 12px; font-size: 13px; }
.btn.link { background: none; color: var(--muted); font-weight: 600; }

.hero { text-align: center; padding: 6px 0 12px; }
.hero-canvas { width: 100%; max-width: 360px; height: 120px; display: block; margin: 0 auto; }
.hero h1 { font-size: 22px; line-height: 1.2; margin: 6px 0 4px; letter-spacing: -0.01em; }
.hero p { margin: 0 0 16px; }
.hero .btn + .btn, .hero .ton-race + .btn { margin-top: 10px; width: 100%; }

.tabs { display: flex; gap: 6px; background: var(--panel); border: 1px solid var(--line); padding: 4px; border-radius: 14px; margin: 8px 0 14px; position: sticky; top: 0; z-index: 2; backdrop-filter: blur(10px); }
.tab { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 8px; border-radius: 10px; font: inherit; font-weight: 700; }
.tab.active { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.card h3, .h-sub { margin: 0 0 6px; font-size: 15px; }
.h-sub { margin: 16px 0 8px; }
.card p { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; }
.fineprint { font-size: 11.5px; color: var(--muted); text-align: center; margin: 18px 8px 0; }

.history, .players, .lb { list-style: none; margin: 0; padding: 0; }
.history li, .lb li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; font-size: 13.5px; }
.history .place { font-weight: 800; width: 34px; font-variant-numeric: tabular-nums; }
.history .meta { flex: 1; color: var(--muted); font-size: 12.5px; }
.history .pay { font-weight: 700; color: var(--gold); }
.lb .n { width: 26px; font-weight: 800; color: var(--muted); }
.lb .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .w { font-weight: 800; font-variant-numeric: tabular-nums; }
.lb-title { margin: 4px 0 8px; font-size: 14px; color: var(--muted); font-weight: 700; }

.shop { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.skin-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.skin-card canvas { width: 72px; height: 72px; }
.skin-card .nm { font-weight: 800; font-size: 14px; }
.skin-card .ds { font-size: 11.5px; color: var(--muted); min-height: 30px; }
.skin-card .btn { width: 100%; padding: 9px; font-size: 13.5px; }
.skin-card.owned .btn { background: transparent; border: 1px solid var(--line); color: var(--good); }

/* лобі */
.lobby-title { flex: 1; min-width: 0; }
.lobby-title #lobby-name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.countdown-card { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; }
.ring { position: relative; width: 74px; height: 74px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 8; }
.ring-fg { fill: none; stroke: url(#none); stroke: var(--accent2); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 276.5; transition: stroke-dashoffset 0.25s linear; filter: drop-shadow(0 0 6px var(--accent2)); }
.ring-text { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pot-amount { font-size: 26px; font-weight: 800; color: var(--gold); text-shadow: 0 0 14px rgba(255, 214, 10, 0.4); }
.picker { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
#preview { width: 96px; height: 96px; flex: none; }
.picker-right { flex: 1; min-width: 0; }
.label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 10px 0 6px; }
.picker .label { margin-top: 0; }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; }
.swatch { aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; position: relative; padding: 0; box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.35), inset 0 2px 3px rgba(255, 255, 255, 0.4); }
.swatch.sel { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 0 12px currentColor; }
.swatch.taken { opacity: 0.22; }
.swatch.taken::after { content: ''; position: absolute; left: 15%; right: 15%; top: 50%; height: 2px; background: #fff; transform: rotate(-45deg); }
.skins { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.skins::-webkit-scrollbar { display: none; }
.skin-chip { flex: none; width: 76px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 6px 4px; text-align: center; color: var(--text); font: inherit; }
.skin-chip canvas { width: 44px; height: 44px; display: block; margin: 0 auto 2px; }
.skin-chip .nm { font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skin-chip .pr { font-size: 11px; color: var(--gold); font-weight: 700; }
.skin-chip.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 14px rgba(255, 61, 242, 0.35); }
.skin-chip.locked canvas { opacity: 0.55; }
.players li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 6px; }
.players .dot { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: 0 0 8px currentColor, inset 0 -2px 4px rgba(0, 0, 0, 0.4); }
.players .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.players .me { font-size: 11px; font-weight: 800; color: var(--accent2); }
.players .empty { color: var(--muted); justify-content: center; }
.bottombar { padding: 10px 16px calc(var(--sab) + 12px); background: linear-gradient(to top, var(--bg) 60%, transparent); }
.join-note { text-align: center; margin-bottom: 8px; min-height: 17px; }

/* гонка */
#race { padding: 0; background: #05050c; }
#race-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hud { position: absolute; inset: 0; pointer-events: none; }
.hud-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(var(--sat) + 8px) calc(var(--sar) + 10px) 8px calc(var(--sal) + 10px); display: flex; align-items: flex-start; gap: 8px;
  background: linear-gradient(to bottom, rgba(5, 5, 12, 0.85), rgba(5, 5, 12, 0)); }
.rank { flex: 1; display: flex; flex-wrap: nowrap; gap: 4px; min-width: 0; overflow: hidden; }
.rk { display: flex; align-items: center; gap: 5px; background: rgba(12, 12, 26, 0.78); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 3px 8px 3px 3px; font-size: 12px; font-weight: 700; min-width: 0; flex: 0 1 auto; backdrop-filter: blur(6px); transition: transform 0.25s; }
.rk .p { font-size: 11px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #111; font-weight: 900; flex: none; }
.rk:only-child { max-width: 100%; }
.rk .bot { font-size: 10px; opacity: 0.75; margin-right: -2px; }
.rk .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk.me { flex: none; border-color: var(--accent2); box-shadow: 0 0 10px rgba(39, 200, 255, 0.45); }
.rk.fin .nm::after { content: ' ✓'; color: var(--good); }
.rk.bump { animation: bump 0.35s; }
@keyframes bump { 40% { transform: scale(1.12); } }
.race-time { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14px; background: rgba(12, 12, 26, 0.78); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 3px 10px; }
.countdown { position: absolute; left: 0; right: 0; top: 36%; text-align: center; font-size: 110px; font-weight: 900; color: #fff; text-shadow: 0 0 30px var(--accent), 0 0 60px var(--accent); opacity: 0; }
.countdown.show { animation: pop 0.9s ease-out forwards; }
.countdown.go { color: #b9ffcf; text-shadow: 0 0 30px var(--good), 0 0 60px var(--good); }
@keyframes pop { 0% { transform: scale(1.8); opacity: 0; } 20% { transform: scale(1); opacity: 1; } 75% { opacity: 1; } 100% { transform: scale(0.85); opacity: 0; } }
.toast-float { position: absolute; left: 50%; top: calc(var(--sat) + 76px); transform: translateX(-50%); font-weight: 800; font-size: 15px; padding: 6px 14px; border-radius: 999px; background: rgba(12, 12, 26, 0.85); border: 1px solid rgba(255, 255, 255, 0.15); opacity: 0; transition: opacity 0.3s; white-space: nowrap; }
.toast-float.show { opacity: 1; }
.hud-bottom { position: absolute; left: calc(var(--sal) + 10px); bottom: calc(var(--sab) + 12px); display: flex; gap: 8px; pointer-events: auto; }
.pill { pointer-events: auto; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(12, 12, 26, 0.82); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; padding: 9px 14px; border-radius: 999px; backdrop-filter: blur(6px); }
.pill:active { transform: scale(0.96); }
.pill.on { border-color: var(--accent2); box-shadow: 0 0 12px rgba(39, 200, 255, 0.4); }

.podium { position: absolute; inset: 0; background: rgba(4, 4, 10, 0.72); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; animation: fadein 0.4s; pointer-events: auto; }
@keyframes fadein { from { opacity: 0; } }
.podium-inner { width: 100%; max-width: 480px; max-height: 100%; overflow-y: auto; padding: calc(var(--sat) + 14px) 16px calc(var(--sab) + 14px); text-align: center; }
.podium-title { font-size: 26px; font-weight: 900; margin-bottom: 4px; text-shadow: 0 0 20px var(--accent); }
.podium-stage { display: flex; align-items: flex-end; justify-content: center; gap: 8px; height: 250px; margin: 6px 0 12px; }
.pcol { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.pcol canvas { width: 64px; height: 64px; margin-bottom: 4px; animation: drop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) backwards; }
.pcol.first canvas { width: 80px; height: 80px; }
.pcol .nm { font-weight: 800; font-size: 13.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcol .tm { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.pcol .pay { font-size: 12px; font-weight: 800; color: var(--gold); min-height: 16px; }
.block { width: 100%; border-radius: 12px 12px 4px 4px; display: grid; place-items: start center; padding-top: 8px; font-weight: 900; font-size: 22px; animation: rise 0.6s ease-out backwards; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.pcol.first .block { height: 110px; animation-delay: 0.25s; }
.pcol.second .block { height: 78px; }
.pcol.third .block { height: 56px; animation-delay: 0.12s; }
.pcol.first canvas { animation-delay: 0.55s; }
.pcol.second canvas { animation-delay: 0.3s; }
.pcol.third canvas { animation-delay: 0.42s; }
@keyframes rise { from { transform: scaleY(0); transform-origin: bottom; } }
@keyframes drop { from { transform: translateY(-160px); opacity: 0; } 30% { opacity: 1; } }
.podium-me { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-weight: 700; margin-bottom: 10px; }
.podium-me .big { font-size: 20px; }
.podium-me .rew { color: var(--gold); }
.podium-list { list-style: none; margin: 0 0 12px; padding: 0; text-align: left; }
.podium-list li { display: flex; gap: 8px; align-items: center; padding: 5px 10px; font-size: 13px; border-radius: 10px; }
.podium-list li.me { background: rgba(39, 200, 255, 0.12); }
.podium-list .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.podium-list .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-list .tm { color: var(--muted); font-variant-numeric: tabular-nums; }
.podium-list .py { color: var(--gold); font-weight: 800; min-width: 44px; text-align: right; }
.podium-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }

.loader { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; background: var(--bg); z-index: 20; transition: opacity 0.3s; }
.loader.fade { opacity: 0; pointer-events: none; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.1); border-top-color: var(--accent); animation: spin 0.8s linear infinite; box-shadow: 0 0 20px rgba(255, 61, 242, 0.3); }
@keyframes spin { to { transform: rotate(360deg); } }
.net-status { position: absolute; top: calc(var(--sat) + 6px); left: 50%; transform: translateX(-50%); background: #3a1020; border: 1px solid var(--bad); color: #ffd0da; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; z-index: 30; }
.toast { position: absolute; left: 16px; right: 16px; bottom: calc(var(--sab) + 90px); margin: 0 auto; max-width: 420px; background: rgba(20, 20, 40, 0.95); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-weight: 600; text-align: center; z-index: 40; opacity: 0; transform: translateY(10px); transition: opacity 0.25s, transform 0.25s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
.toast.err { border-color: var(--bad); }
@media (min-width: 700px) { .scroll { max-width: 560px; margin: 0 auto; width: 100%; } .bottombar { max-width: 560px; margin: 0 auto; width: 100%; } }
@media (prefers-reduced-motion: reduce) { .countdown.show, .pcol canvas, .block { animation-duration: 0.01s; } }

/* ---------- TON ---------- */
.balances { display: flex; gap: 6px; align-items: center; }
.ton-ico { font-size: 13px; line-height: 1; }
.ton-race { margin-top: 12px; padding: 12px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(0, 152, 234, 0.16), rgba(39, 200, 255, 0.06)); border: 1px solid rgba(39, 200, 255, 0.35); text-align: left; }
.ton-race-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.stake-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 6px; margin-bottom: 6px; }
.stake-chip { border: 1px solid rgba(39, 200, 255, 0.45); background: rgba(39, 200, 255, 0.1); color: var(--text); border-radius: 12px; padding: 10px 4px; font: inherit; font-weight: 800; font-variant-numeric: tabular-nums; }
.stake-chip:active { transform: scale(0.96); }
.net-badge { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 6px; background: rgba(255, 214, 10, 0.15); color: var(--gold); border: 1px solid rgba(255, 214, 10, 0.4); }
.wallet-bal { text-align: center; }
.wallet-amount { font-size: 30px; font-weight: 800; margin: 4px 0 10px; font-variant-numeric: tabular-nums; }
.tc-button { display: flex; justify-content: center; min-height: 40px; }
.field-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.field { flex: 1; min-width: 0; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font: inherit; font-size: 16px; padding: 11px 12px; -webkit-user-select: text; user-select: text; }
.field:focus { outline: none; border-color: var(--accent2); }
.field.wide { width: 100%; margin-bottom: 10px; font-size: 14px; }
.field-unit { color: var(--muted); font-weight: 700; }
.manual { margin-top: 8px; font-size: 13px; }
.manual summary { color: var(--accent2); cursor: pointer; font-weight: 600; }
.manual p { margin: 8px 0; }
.copy-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.copy-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12px; background: var(--bg2); padding: 6px 8px; border-radius: 8px; -webkit-user-select: text; user-select: text; }
.label-inline { width: 64px; flex: none; color: var(--muted); font-size: 12px; }
.history .pay.neg { color: var(--muted); }
.history .st { font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: var(--panel2); color: var(--muted); }
.history .st.ok { color: var(--good); }
.history .st.bad { color: var(--bad); }

/* ---------- TON-гонки через контракт ---------- */
.wallet-top { display: flex; align-items: center; min-height: 36px; }
.hero .btn.ghost.big { margin-top: 10px; }
.ton-race { margin-top: 4px; }
.ton-join { display: flex; flex-direction: column; gap: 10px; }
.ton-join.hidden { display: none; }
.tj-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; flex: none; }
.stepper button { width: 36px; height: 36px; border: 0; border-radius: 9px; background: var(--panel2); color: var(--text); font: inherit; font-size: 20px; font-weight: 800; }
.stepper button:disabled { opacity: 0.35; }
.stepper b { min-width: 30px; text-align: center; font-size: 18px; font-variant-numeric: tabular-nums; }
.contract-link { font-size: 12px; color: var(--accent2); text-decoration: none; align-self: flex-start; }
.contract-link:empty { display: none; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.players .cnt { font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.players li.pending { opacity: 0.55; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.6); display: flex; align-items: flex-end; justify-content: center; padding: 16px; padding-bottom: calc(16px + var(--sab)); }
.modal.hidden { display: none; }
.modal-card { width: 100%; max-width: 460px; background: #12121f; border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.modal-card h3 { margin: 0; }
.modal-card p { margin: 0; }
.modal-card textarea { resize: vertical; min-height: 110px; }
.paid-badge { color: var(--good); font-weight: 800; }
