/* PIVArena · palette #662D91 / #4D3077 / #2A1B42 / #130D1E with lavender tints. Mobile-first. Identity layer at the end. */
@font-face { font-family: 'Montserrat'; src: url('/fonts/montserrat-latin.woff2') format('woff2'); font-weight: 400 800; font-style: normal; font-display: swap; }
:root {
  --bg: #130d1e; --bg2: #1a1229; --panel: #1e1530; --panel2: #2a1b42; --line: #3b2a5c; --line2: #4d3a73;
  --text: #f3eefb; --muted: #ab9fc4; --brand: #662d91; --brand2: #4d3077; --accent: #b98cf2; --accent-strong: #8a3fc7;
  --good: #3fd69a; --bad: #ff6b81; --warn: #ffbe5c; --info: #7cc4ff; --felt: #134a34;
  --radius: 14px; --radius-sm: 10px; --top-h: 60px; --tab-h: 64px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --brand-rgb: 102, 45, 145; --accent-rgb: 185, 140, 242; --brand2-rgb: 77, 48, 119; --panel2-rgb: 42, 27, 66; --panel-rgb: 30, 21, 48; --bg-rgb: 19, 13, 30; --bg2-rgb: 26, 18, 41;
  --accent-strong-rgb: 138, 63, 199; --accent-soft-rgb: 211, 180, 255; --accent-pale-rgb: 227, 210, 255; --shade-rgb: 5, 2, 10;
  --accent-soft: #d3b4ff; --accent-pale: #e3d2ff; --input-bg: #0f0a18; --btn-1: #8443bd; --btn-3: #5a2782; --text-2: #d6cbe8;
  --font-display: var(--font);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.5 var(--font); min-height: 100vh; display: flex; flex-direction: column; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); background: radial-gradient(1200px 500px at 70% -10%, rgba(var(--brand-rgb), .28), transparent 70%), var(--bg); background-attachment: fixed; }
body.modal-open { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--accent); color: #1a0f2b; padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 8px; }
.ico { flex: none; vertical-align: -0.18em; }
.wrap { padding: 16px; max-width: 1240px; width: 100%; margin: 0 auto; }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 10px; height: var(--top-h); padding: 0 12px; padding-top: env(safe-area-inset-top); background: rgba(var(--bg-rgb), .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; color: var(--text); text-decoration: none !important; }
.wm { font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.wm b { color: var(--accent); font-weight: 800; }
.shield-badge { display: none; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--accent-pale); background: rgba(var(--brand-rgb), .35); border: 1px solid var(--brand); padding: 4px 10px; border-radius: 99px; text-decoration: none !important; white-space: nowrap; }
.shield-badge:hover { background: rgba(var(--brand-rgb), .55); }
.sb-sub { color: var(--accent); }
#nav { display: none; gap: 2px; }
#nav a { color: var(--muted); padding: 8px 12px; border-radius: 9px; font-weight: 600; font-size: 14px; white-space: nowrap; }
#nav a[aria-current=page], #nav a:hover { color: var(--text); background: var(--panel2); text-decoration: none; }
.spacer { flex: 1; }
.conn { font-size: 12px; color: var(--warn); white-space: nowrap; }
.conn.up { display: none; }
.conn.down::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-right: 6px; animation: blink 1s infinite; }
#userbox { display: flex; align-items: center; gap: 6px; font-size: 14px; }
#userbox .btn { padding: 7px 12px; }
.bal { display: flex; align-items: center; gap: 5px; background: var(--panel2); border: 1px solid var(--line); padding: 6px 10px; border-radius: 10px; color: var(--text); font-variant-numeric: tabular-nums; font-weight: 700; text-decoration: none !important; white-space: nowrap; }
.bal b { color: var(--text); }
.unit { color: var(--muted); font-weight: 600; font-size: .78em; }
.dep { padding: 7px 12px !important; }
.who { display: none; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.who-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0 !important; border-radius: 10px; position: relative; }
.chat-toggle { display: none !important; }
.logout { display: none !important; }
.brandlock { display: flex; flex-direction: column; gap: 1px; line-height: 1; }
.pill.net { text-transform: uppercase; font-weight: 700; }

/* ---------- layout + chat drawer ---------- */
.layout { flex: 1; display: block; width: 100%; }
main { min-width: 0; outline: none; }
.chat { position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; transform: translateX(105%); transition: transform .22s ease; box-shadow: var(--shadow); visibility: hidden; }
body.chat-open .chat { transform: none; visibility: visible; }
.drawer-bg { position: fixed; inset: 0; z-index: 35; background: rgba(var(--shade-rgb), .55); }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat-head h3 { margin: 0; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 12px; display: grid; gap: 10px; align-content: start; font-size: 14px; }
.msg { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; position: relative; }
.msg.msg-mod { grid-template-columns: auto 1fr auto; }
.msg b { color: var(--accent); margin-right: 6px; }
.msg .msg-body { min-width: 0; overflow-wrap: anywhere; }
.msg .msg-body > span { overflow-wrap: anywhere; }
.msg.deleted { opacity: 0.65; }
.msg .msg-removed { font-style: italic; font-size: 13px; }
.msg .italic { font-style: italic; }

/* Mod-only actions: ghost control, no square chrome */
.msg-actions {
  display: flex; align-items: flex-start; gap: 2px;
  margin: -2px -4px 0 0; align-self: start;
}
.msg-actions .msg-del,
.msg-actions .msg-more {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; min-height: 0; padding: 0 !important;
  border: 0 !important; border-radius: 6px;
  background: transparent !important; box-shadow: none !important;
  color: var(--muted); cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity .12s ease, color .12s ease, background .12s ease;
}
.msg-actions .msg-del:hover,
.msg-actions .msg-del:focus-visible,
.msg-actions .msg-more:hover,
.msg-actions .msg-more:focus-visible {
  color: var(--text); background: rgba(255, 255, 255, .06) !important;
}
.msg-actions .msg-del:hover,
.msg-actions .msg-del:focus-visible { color: var(--bad, #e88); }

/* Desktop: reveal on row hover / keyboard focus */
@media (hover: hover) and (pointer: fine) {
  .msg-actions .msg-more { display: none; }
  .msg:hover .msg-actions .msg-del,
  .msg:focus-within .msg-actions .msg-del {
    opacity: 0.55; pointer-events: auto;
  }
  .msg:hover .msg-actions .msg-del:hover,
  .msg:focus-within .msg-actions .msg-del:focus-visible {
    opacity: 1;
  }
}

/* Touch / coarse: tiny overflow always; long-press or ⋯ opens delete */
@media (hover: none), (pointer: coarse) {
  .msg-actions .msg-more {
    opacity: 0.4; pointer-events: auto;
  }
  .msg-actions .msg-del { display: none; }
  .msg.msg-armed .msg-actions .msg-more,
  .msg-actions.open .msg-more { opacity: 0.85; }
  .msg.msg-armed .msg-actions .msg-del,
  .msg-actions.open .msg-del {
    display: inline-grid; opacity: 0.9; pointer-events: auto;
  }
}

/* Keyboard / forced reveal */
.msg.msg-armed .msg-actions .msg-del,
.msg-actions.open .msg-del {
  opacity: 0.85; pointer-events: auto;
}
.chat-muted { padding: 8px 12px; background: color-mix(in srgb, var(--bad, #e55) 18%, transparent); border-bottom: 1px solid var(--line); font-size: 13px; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mod-actions select { max-width: 120px; }
.chat form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.chat form input { flex: 1; }
.unread { position: absolute; top: 2px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 17px; text-align: center; }
.unread[hidden] { display: none; }

/* ---------- bottom tab bar (mobile) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 14; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(var(--bg2-rgb), .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.tab { display: grid; place-items: center; align-content: center; gap: 3px; background: none !important; border: 0 !important; border-radius: 0 !important; color: var(--muted); font-size: 11px; font-weight: 600; padding: 6px 2px !important; position: relative; text-decoration: none !important; }
.tab[aria-current=page], .tab[aria-expanded=true] { color: var(--accent); }
.tab[aria-current=page]::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.tab .unread { top: 4px; right: calc(50% - 22px); }

/* ---------- footer ---------- */
.foot { color: var(--muted); font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); margin-top: 24px; }

/* ---------- type ---------- */
h1 { font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -.4px; margin: 6px 0 14px; }
h2 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 12.5px; margin: 14px 0 8px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .7px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xsmall { font-size: 11.5px; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.big-num { font-size: 30px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; line-height: 1.15; }

/* ---------- primitives ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel.narrow { max-width: 440px; margin: 8px auto; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.row.end { justify-content: flex-end; }
.row.spread { justify-content: space-between; }
.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; text-transform: capitalize; }
.pill.good { color: var(--good); border-color: #1f6a4d; background: rgba(63, 214, 154, .08); }
.pill.bad { color: var(--bad); border-color: #7a2a3a; background: rgba(255, 107, 129, .08); }
.pill.warn { color: var(--warn); border-color: #7a5520; background: rgba(255, 190, 92, .08); }
.pill.info { color: var(--info); border-color: #285a80; background: rgba(124, 196, 255, .08); }
.empty { color: var(--muted); padding: 22px; text-align: center; }

button, .btn { font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); padding: 9px 16px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; text-decoration: none !important; transition: background .12s, border-color .12s, transform .06s; }
button:hover:not(:disabled), .btn:hover { border-color: var(--accent); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary, .btn.primary { background: linear-gradient(180deg, var(--btn-1), var(--brand)); border-color: var(--accent-strong); color: #fff; box-shadow: 0 4px 14px rgba(var(--brand-rgb), .35); }
button.primary:hover:not(:disabled), .btn.primary:hover { background: linear-gradient(180deg, var(--btn-1), var(--brand)); }
button.danger { border-color: #7a2a3a; color: var(--bad); background: transparent; }
button.danger.solid { background: #c23a54; border-color: #c23a54; color: #fff; }
button.ghost, .btn.ghost { background: transparent; }
button.big, .btn.big { padding: 12px 22px; font-size: 16px; min-height: 48px; }
button.block { width: 100%; }
.linkbtn { background: none !important; border: 0 !important; padding: 0 !important; min-height: 0; color: var(--accent); text-decoration: underline !important; font-weight: 600; }
.chip { min-height: 32px; padding: 4px 12px; border-radius: 99px; font-size: 13px; background: var(--bg2); }
.chip:hover:not(:disabled) { background: var(--panel2); }
input, select { font: inherit; background: var(--input-bg); color: var(--text); border: 1px solid var(--line2); border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0; width: 100%; min-height: 44px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); }
input[type=range] { padding: 0; min-height: 0; accent-color: var(--accent); }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
label.check { grid-template-columns: auto 1fr; align-items: center; font-weight: 500; color: var(--text); }
.input-group { display: flex; gap: 6px; }
.input-group input { flex: 1; }
form.stack, .stack { display: grid; gap: 12px; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; }
details.seed label { margin-top: 8px; font-weight: 500; }
.hint { min-height: 1.2em; }
.notice { display: block; background: rgba(255, 190, 92, .08); border: 1px solid #7a5520; color: #ffdcab; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin: 10px 0; }
.notice a { color: #ffd08a; font-weight: 700; }
.notice > .ico { margin-right: 4px; }
.notice.invite { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.notice.invite > div:first-child { min-width: 0; flex: 1 1 240px; }
.stakebox .right { text-align: right; }

/* tables: horizontal scroll instead of squeezing on phones */
table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
@media (min-width: 760px) { table { display: table; } }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
tr:hover td { background: rgba(var(--brand-rgb), .1); }

.tabs { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.tabs button { white-space: nowrap; flex: none; min-height: 34px; padding: 5px 13px; border-radius: 99px; font-size: 13px; background: transparent; }
.tabs button.on { border-color: var(--accent); color: var(--text); background: rgba(var(--accent-rgb), .14); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; }
.seg button { border: 0; background: transparent; min-height: 42px; color: var(--muted); }
.seg button.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.seg .rec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; padding: 1px 6px; border-radius: 99px; background: var(--brand); color: #fff; }

.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; font-weight: 800; font-size: 14px; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }

/* ---------- loading / feedback ---------- */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid rgba(var(--accent-rgb), .25); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: .3; } }
.skeleton-wrap { display: grid; gap: 14px; }
.sk { border-radius: var(--radius); background: linear-gradient(90deg, var(--panel) 25%, var(--panel2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.sk-title { height: 30px; width: 40%; border-radius: 8px; }
.sk-block { height: 120px; }
.sk-block.short { height: 60px; width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.waiting { display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--muted); }
.waiting .spinner { width: 34px; height: 34px; border-width: 3px; }
.waiting-t { color: var(--text); font-weight: 700; font-size: 17px; }
.waiting-inline { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px dashed var(--line2); border-radius: var(--radius-sm); }
.errorpanel { max-width: 520px; margin: 24px auto; text-align: center; display: grid; gap: 12px; justify-items: center; }

#toasts { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom)); display: grid; gap: 8px; z-index: 60; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; width: min(420px, 100%); background: var(--panel2); border: 1px solid var(--line2); border-left: 4px solid var(--good); padding: 10px 10px 10px 12px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); animation: pop .2s; }
.toast .ico { color: var(--good); }
.toast.err { border-left-color: var(--bad); }
.toast.err .ico { color: var(--bad); }
.toast-msg { flex: 1; }
.toast button { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.toast-x { background: none !important; border: 0 !important; color: var(--muted); padding: 4px !important; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

/* ---------- modal (bottom sheet on mobile) ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(var(--shade-rgb), .66); display: flex; align-items: flex-end; justify-content: center; z-index: 50; animation: fade .15s; }
.modal { position: relative; background: var(--panel); border: 1px solid var(--line2); border-radius: 20px 20px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); width: 100%; max-height: 92vh; overflow: auto; box-shadow: var(--shadow); animation: sheet .22s ease-out; }
.modal h2 { margin-top: 0; padding-right: 40px; font-size: 20px; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; min-height: 0; padding: 0; border-radius: 50%; background: transparent; border-color: transparent; color: var(--muted); }
.modal-x:hover { color: var(--text); }
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.dlg-head { display: flex; gap: 12px; align-items: center; padding-right: 36px; }
.dlg-head h2 { margin: 0; padding: 0; }
.stakebox { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
dl.sum { margin: 0; display: grid; gap: 6px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
dl.sum > div { display: flex; justify-content: space-between; gap: 12px; }
dl.sum dt { color: var(--muted); }
dl.sum dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
dl.sum .strong { border-top: 1px solid var(--line); padding-top: 6px; }
dl.sum .strong dd { font-weight: 800; }
dl.review dd { max-width: 70%; }
.addr-sm { font-size: 12px; }
.promo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.promo button { font-size: 34px; min-height: 70px; flex-direction: column; gap: 2px; }
.promo button span { font-size: 11px; }

/* ---------- deposit ---------- */
.explain { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.explain.shield { background: rgba(var(--brand-rgb), .18); border-color: var(--brand); }
.explain .ico { color: var(--accent); margin-top: 2px; }
.dep-panel { display: grid; gap: 14px; outline: none; }
.addr-box { display: grid; gap: 14px; justify-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg2); }
.addr-box.loading { min-height: 120px; place-items: center; }
.addr-side { display: grid; gap: 10px; width: 100%; }
.addr { font-size: 14px; line-height: 1.6; letter-spacing: .3px; background: var(--input-bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; word-spacing: 4px; }
.addr.nosel { user-select: none; -webkit-user-select: none; cursor: default; }
.copy { justify-self: start; }
.copy.done { border-color: var(--good); color: var(--good); }
.facts { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 3px; }
.facts b { color: var(--text); }
.qr { background: #fff; padding: 8px; border-radius: 12px; width: 180px; height: 180px; image-rendering: pixelated; }

.confbar { display: grid; gap: 5px; }
.confbar-track { position: relative; height: 8px; border-radius: 99px; background: var(--input-bg); border: 1px solid var(--line); overflow: visible; }
.confbar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--warn), #ffd88f); transition: width .5s ease; }
.confbar-fill.play { background: linear-gradient(90deg, var(--brand), var(--accent)); }
.confbar-fill.done { background: var(--good); }
.confbar-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); border-radius: 2px; opacity: .7; }
.confbar-labels { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.confbar-labels b { color: var(--text); }

.tx-list { display: grid; gap: 10px; }
.panel.tx-list { padding: 8px; gap: 0; }
.panel.tx-list .tx-item { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.panel.tx-list .tx-item:last-child { border-bottom: 0; }
.tx-item { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.tx-top { display: flex; gap: 10px; align-items: center; }
.tx-top .amt { flex: 1; text-align: right; font-size: 15px; }
.tx-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.kind { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.kind.shield { color: var(--accent); }
.txlink { display: inline-flex; align-items: center; gap: 3px; }

/* ---------- wallet page ---------- */
.wallet-sum { display: grid; gap: 16px; background: linear-gradient(150deg, var(--panel2), var(--panel) 60%); }
.ws-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: rgba(0, 0, 0, .18); border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-width: 0; }
.stat .num { font-weight: 700; font-size: 15px; }
.ws-act { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- lobby ---------- */
.hero { display: grid; gap: 18px; padding: 20px 16px; margin-bottom: 8px; border-radius: 18px; border: 1px solid var(--line); background: radial-gradient(500px 220px at 0% 0%, rgba(var(--brand-rgb), .5), transparent 70%), linear-gradient(160deg, var(--panel2), var(--panel)); }
.hero h1 { font-size: 28px; margin: 0 0 8px; }
.hero .hl { background: linear-gradient(90deg, var(--accent-soft), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--text-2); margin: 0 0 14px; max-width: 560px; }
.trust { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.trust li { display: flex; gap: 8px; align-items: flex-start; }
.trust .ico { color: var(--accent); margin-top: 2px; }
.trust b { color: var(--text); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); }
.steps .n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; flex: none; }
.hero.compact { padding: 16px; }
.hero.compact h1 { font-size: 22px; }
.hero.compact .trust { display: none; }
.hero-bal { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); }
.hero-bal .row button { flex: 1; }

.lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "live" "main" "rail"; gap: 8px; }
.lobby-live { grid-area: live; margin-top: 16px; } .lobby-main { grid-area: main; } .lobby-rail { grid-area: rail; }
.lobby-main, .lobby-rail, .layout > main { min-width: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 20px 0 10px; }
.sec-head h2 { margin: 0; }
.sec-head.tight { margin: 0 0 10px; align-items: center; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--panel2); color: var(--muted); font-size: 12px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { display: grid; grid-template-rows: 1fr auto; background: linear-gradient(160deg, var(--panel2), var(--bg2)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .12s, transform .12s; }
.tile:hover { border-color: var(--accent-strong); transform: translateY(-2px); }
.tile-main { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 4px; align-content: start; padding: 14px 14px 10px; }
.tile-main:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--radius); }
.tile .name { font-weight: 800; font-size: 16px; }
.tile .desc { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.tile-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.tag { font-size: 11px; font-weight: 600; color: var(--muted); background: rgba(0, 0, 0, .25); border: 1px solid var(--line); padding: 1px 7px; border-radius: 99px; }
.open-n { font-size: 11px; font-weight: 700; color: var(--good); }
.presets { display: flex; gap: 4px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .18); overflow-x: auto; scrollbar-width: none; }
.presets .chip { min-height: 30px; padding: 2px 9px; font-size: 12.5px; flex: none; }
.presets-l { font-size: 10.5px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.presets.inline { padding: 0; border: 0; background: none; flex-wrap: wrap; }
.gico { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(var(--brand-rgb), .35); font-size: 18px; flex: none; }
.gico.lg { width: 46px; height: 46px; font-size: 26px; border-radius: 13px; }
.gico.sm { width: 28px; height: 28px; font-size: 15px; border-radius: 8px; }

.og-head { display: none; }
.og-list { display: grid; gap: 8px; }
.og { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "game stake" "by act" "meta act"; gap: 6px 12px; align-items: center; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.og.mine { border-color: var(--brand); }
.og-game { grid-area: game; display: flex; gap: 10px; align-items: center; min-width: 0; }
.og-stake { grid-area: stake; text-align: right; }
.og-stake b { font-size: 16px; }
.og-by { grid-area: by; display: flex; gap: 6px; align-items: center; font-size: 13px; min-width: 0; }
.og-by span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.og-seats, .og-age { grid-area: meta; }
.og-age { display: none; }
.og-act { grid-area: act; justify-self: end; }
.og-act .btn, .og-act button { min-width: 84px; }

.feed-panel { padding: 14px; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.feed-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 10px; font-size: 13.5px; }
.feed-item:hover { background: rgba(var(--brand-rgb), .12); }
.feed-item.fresh { animation: flash 1.6s ease-out; }
.feed-txt { min-width: 0; }
.feed-txt > div:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-link { font-size: 12.5px; font-weight: 700; }
.feed-item.act { padding: 0; }
.feed-item.act .act-a { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 8px 6px; color: inherit; text-decoration: none; border-radius: 10px; }
.act-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(var(--brand-rgb), .18); color: var(--text); }
.act-ic.k-bigwin { color: var(--good, #5be49b); }
.feed-empty { padding: 10px 6px; color: var(--muted); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-right: 6px; box-shadow: 0 0 0 3px rgba(255, 107, 129, .2); animation: blink 1.6s infinite; vertical-align: 1px; }
@keyframes flash { from { background: rgba(var(--accent-rgb), .3); } }

/* ---------- match ---------- */
.back { display: inline-block; margin-bottom: 8px; color: var(--muted); font-weight: 600; }
.match-head { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; margin-bottom: 12px; }
.mh-title h1 { margin: 0 0 4px; font-size: 22px; }
.mh-stakes { grid-column: 1 / -1; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mh-stakes > div { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.mh-stakes dt { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.mh-stakes dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mh-act { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.mh-act:empty { display: none; }
.vs { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.vs.duel { display: grid; grid-template-columns: 1fr auto 1fr; }
.vs-x { font-weight: 800; color: var(--accent); font-size: 14px; }
.player { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.player > div { min-width: 0; }
.player b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player.me { border-color: var(--brand); }
.player.win { border-color: var(--good); box-shadow: 0 0 0 1px var(--good) inset; }
.player.empty-seat { border-style: dashed; }
.notice.invite { justify-content: space-between; background: rgba(var(--brand-rgb), .15); border-color: var(--brand); color: var(--text); }
.notice.invite .mono { color: var(--muted); }
.stage { min-height: 280px; display: grid; place-items: center; padding: 20px 12px; }
.result-banner { font-size: 21px; font-weight: 800; text-align: center; margin: 10px 0; padding: 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }
.result-banner.good { background: rgba(63, 214, 154, .1); border-color: #1f6a4d; }
.result-banner.bad { background: rgba(255, 107, 129, .08); border-color: #7a2a3a; }
.timer { font-variant-numeric: tabular-nums; }
.fair { font-size: 12.5px; margin-top: 14px; }
.fair dt { color: var(--muted); margin-top: 6px; }
.fair dd { margin: 2px 0 0; }

/* ---------- games (kept from v1, recoloured) ---------- */
.coin { width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 800; background: radial-gradient(circle at 35% 30%, #d9b8ff, var(--brand) 75%); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 0 0 6px rgba(255,255,255,.12); animation: flip 1.2s ease-out; }
@keyframes flip { 0% { transform: rotateY(0) scale(.6); } 70% { transform: rotateY(1440deg) scale(1.1); } 100% { transform: rotateY(1440deg) scale(1); } }
.dice-rounds { display: grid; gap: 8px; text-align: center; }
.die { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; background: #f5f0ff; color: #2a1640; font-size: 26px; font-weight: 800; margin: 0 6px; animation: pop .4s; }
.card { display: inline-grid; place-items: center; width: 52px; height: 74px; border-radius: 7px; background: #fbfbfd; color: #111; font-weight: 700; font-size: 20px; margin: 2px; box-shadow: 0 2px 6px rgba(0,0,0,.35); line-height: 1; }
.card.red { color: #d0213b; }
.card.back { background: repeating-linear-gradient(45deg, var(--brand), var(--brand) 6px, var(--brand2) 6px, var(--brand2) 12px); }
.card.small { width: 38px; height: 54px; font-size: 15px; }
.card.big { width: 90px; height: 128px; font-size: 34px; }
.rps-choices { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.rps-choices button { font-size: 38px; width: 92px; height: 92px; border-radius: 18px; }
.rps-choices button.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.chess-wrap { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; justify-items: center; width: 100%; }
.board { display: grid; grid-template-columns: repeat(8, 1fr); width: min(100%, 464px); aspect-ratio: 1; border: 3px solid var(--line); border-radius: 6px; overflow: hidden; user-select: none; }
.sq { all: unset; box-sizing: border-box; display: grid; place-items: center; font-size: clamp(24px, 7vw, 42px); cursor: pointer; position: relative; aspect-ratio: 1; }
.sq:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; z-index: 1; }
.sq.l { background: #e6dcf2; } .sq.d { background: #8b6bb4; }
.sq.sel { box-shadow: inset 0 0 0 4px #ffbe5c; }
.sq.tgt::after { content: ''; width: 26%; height: 26%; border-radius: 50%; background: rgba(40, 14, 70, .45); position: absolute; }
.sq.last { background-image: linear-gradient(rgba(255, 190, 92, .35), rgba(255, 190, 92, .35)); }
.sq .pw { color: #fff; text-shadow: 0 0 2px #000, 0 0 1px #000; }
.sq .pb { color: #111; }
.sq .coord { position: absolute; left: 3px; bottom: 1px; font-size: 10px; color: rgba(0,0,0,.5); }
.clock { font-size: 26px; font-variant-numeric: tabular-nums; background: var(--panel2); border: 1px solid var(--line); padding: 8px 12px; border-radius: 10px; text-align: center; }
.clock.run { border-color: var(--accent); color: var(--accent); }
.clock.low { color: var(--bad); }
.movelist { max-height: 220px; overflow: auto; font-family: var(--mono); font-size: 13px; }
.table { width: 100%; background: radial-gradient(ellipse at center, #1f6a4a, var(--felt) 70%); border: 8px solid #3a2414; border-radius: 40px; padding: 16px; min-height: 320px; display: grid; grid-template-rows: auto 1fr auto; gap: 12px; }
.seats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.seat { background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 8px; text-align: center; font-size: 13px; }
.seat.act { border-color: var(--warn); box-shadow: 0 0 12px rgba(255,190,92,.45); }
.seat.folded { opacity: .45; }
.seat.out { opacity: .25; }
.seat.me { border-color: var(--accent); }
.seat .chips { font-weight: 700; font-variant-numeric: tabular-nums; }
.seat .betchip { color: var(--warn); }
.board-cards { text-align: center; min-height: 80px; }
.pot { text-align: center; font-weight: 700; color: #ffe08a; }
.actionbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center; margin-top: 14px; }
.actionbar input[type=range] { width: 180px; }
.log { font-size: 12.5px; color: var(--muted); max-height: 150px; overflow: auto; }
.dealer { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: #000; font-size: 11px; font-weight: 800; line-height: 18px; }

/* ---------- ≥ 600 ---------- */
@media (min-width: 600px) {
  .wrap { padding: 20px 24px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .shield-badge { display: inline-flex; }
  .who { display: flex; }
  .modal-bg { align-items: center; padding: 16px; }
  .modal { border-radius: 18px; width: min(480px, 100%); padding: 24px; animation: pop .18s; }
  .modal.wide { width: min(640px, 100%); }
  .addr-box { grid-template-columns: auto 1fr; justify-items: start; align-items: start; }
  .hero { padding: 26px; }
  .hero h1 { font-size: 34px; }
}
/* ---------- ≥ 960: desktop header, no tab bar ---------- */
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topbar { padding: 0 20px; gap: 14px; }
  #nav { display: flex; margin-left: 8px; }
  .chat-toggle, .logout { display: inline-grid !important; }
  #toasts { left: auto; right: 20px; bottom: 20px; justify-items: end; }
  .hero { grid-template-columns: 1.3fr 1fr; align-items: center; }
  .hero.compact { grid-template-columns: 1fr auto; }
  .hero.compact .trust { display: flex; gap: 18px; flex-wrap: wrap; }
  .hero.compact .trust li { display: flex !important; }
  .hero-bal { min-width: 300px; }
  .lobby-grid { grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "main live" "main rail"; grid-template-rows: auto 1fr; column-gap: 24px; row-gap: 0; align-items: start; }
  .lobby-live { margin-top: 20px; }
  .lobby-rail { position: sticky; top: calc(var(--top-h) + 16px); margin-top: 20px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .og-head, .og { grid-template-columns: 1.6fr 1fr 1.2fr .7fr .7fr auto; grid-template-areas: none; }
  .og-head { display: grid; gap: 12px; padding: 0 12px 6px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
  .og { grid-template-areas: none; gap: 12px; }
  .og > * { grid-area: auto !important; }
  .og-stake { text-align: left; }
  .og-age { display: block; }
  .match-head { grid-template-columns: auto 1fr auto auto; }
  .mh-stakes { grid-column: auto; grid-template-columns: repeat(3, auto); }
  .mh-act { grid-column: auto; }
  .chess-wrap { grid-template-columns: auto 220px; justify-items: stretch; }
  .board { width: 464px; }
  .table { border-radius: 160px; padding: 26px; border-width: 10px; }
  .wallet-sum { grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; }
  .ws-act { grid-template-columns: auto auto; }
}
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) and (max-width: 1299px) { .shield-badge { display: none !important; } }
@media (min-width: 960px) and (max-width: 1359px) { .who-name { display: none; } #nav a { padding: 8px 10px; } }
@media (max-width: 599px) {
  .pill.net { font-size: 10px; padding: 1px 6px; }
  .topbar { gap: 6px; padding: 0 10px; }
  .bal { padding: 6px 8px; }
  .hero.compact .trust { display: grid; margin-top: 6px; }
  .hero.compact .trust li:not(:first-child) { display: none; }
  .sec-head > .muted { display: none; }
}
/* ---------- ≥ 1440: chat docked ---------- */
@media (min-width: 1440px) {
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
  .chat { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); width: auto; transform: none; visibility: visible; box-shadow: none; z-index: 1; }
  .chat-close, .chat-toggle { display: none !important; }
  .drawer-bg { display: none; }
}
/* ================= PIVArena identity layer ================= */
body { background: url('/img/hatch.svg'), radial-gradient(1200px 500px at 70% -10%, rgba(var(--brand-rgb), .28), transparent 70%), var(--bg); background-attachment: fixed; }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-strong) 30%, var(--accent) 50%, var(--accent-strong) 70%, transparent); opacity: .55; pointer-events: none; }
.brand { gap: 9px; }
.brand .mark { width: 32px; height: 32px; display: block; flex: none; transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .35s; filter: drop-shadow(0 2px 8px rgba(var(--accent-strong-rgb), .45)); }
.brand:hover .mark { transform: rotate(-10deg) scale(1.06); filter: drop-shadow(0 2px 14px rgba(var(--accent-rgb), .6)); }
.wm-wrap { display: grid; line-height: 1; }
.wm { font-size: 19px; letter-spacing: -.6px; }
.wm b { background: linear-gradient(90deg, var(--accent-pale), var(--accent) 45%, var(--accent-strong)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { font-size: 8px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.pivmark { display: inline-block; flex: none; vertical-align: -.15em; filter: drop-shadow(0 0 1px rgba(var(--accent-pale-rgb), .55)); }

/* hero */
.hero { position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; border-color: var(--line2); background: url('/img/arena-rings.svg') no-repeat right -230px top -170px / 560px, radial-gradient(520px 260px at 0% 0%, rgba(var(--brand-rgb), .55), transparent 70%), linear-gradient(160deg, var(--panel2), var(--bg2)); }
.hero::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--brand2), var(--accent), var(--brand)); }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 2.4px; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.eyebrow::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.hero h1.display { font-size: clamp(38px, 11vw, 64px); line-height: .96; letter-spacing: -2px; font-weight: 800; margin: 0 0 14px; }
.hero.compact h1.display { font-size: clamp(30px, 8vw, 46px); letter-spacing: -1.4px; margin-bottom: 4px; }
.hero .hl { background: linear-gradient(95deg, var(--text), var(--accent-soft) 35%, var(--accent) 70%, var(--accent-strong)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats { display: flex; margin: 16px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: rgba(var(--bg-rgb), .5); width: fit-content; max-width: 100%; backdrop-filter: blur(4px); }
.hero-stats > div { flex: 1 1 auto; padding: 8px 12px; border-left: 1px solid var(--line); min-width: 0; }
.hero-stats > div:first-child { border-left: 0; }
.hero-stats dt { display: flex; align-items: center; gap: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.hero-stats dd { margin: 2px 0 0; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-stats .unit { font-size: 12px; }
.hero-bal { position: relative; background: linear-gradient(160deg, rgba(var(--brand-rgb), .5), rgba(var(--bg-rgb), .65)); border-color: var(--line2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 40px rgba(0, 0, 0, .35); border-radius: 18px; padding: 16px; }
.hb-label { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.hero-bal .big-num { font-size: 36px; }
.steps li { background: rgba(var(--bg-rgb), .5); backdrop-filter: blur(4px); transition: border-color .2s, transform .2s; }
.steps li:hover { border-color: var(--line2); transform: translateX(3px); }
.steps .n { background: linear-gradient(145deg, var(--accent-strong), var(--brand2)); box-shadow: 0 0 0 3px rgba(var(--accent-strong-rgb), .22); }

/* section heads: small arena-octagon marker */
.sec-head h2 { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.sec-head:not(.tight) h2::before { content: ''; width: 11px; height: 11px; flex: none; background: linear-gradient(145deg, var(--accent), var(--brand)); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }

/* game cards */
.tile { position: relative; background: radial-gradient(180px 130px at 100% 0%, rgba(var(--accent-strong-rgb), .3), transparent 70%), url('/img/hatch.svg'), linear-gradient(165deg, var(--panel2), var(--bg2)); transition: transform .2s cubic-bezier(.2, .8, .2, 1), border-color .2s, box-shadow .2s; }
.tile:hover { transform: translateY(-3px); border-color: var(--accent-strong); box-shadow: 0 14px 30px rgba(0, 0, 0, .35), 0 0 26px rgba(var(--accent-strong-rgb), .25); }
.tile:focus-within { border-color: var(--accent); }
.tile .gico.lg { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 6px; background: linear-gradient(145deg, rgba(var(--accent-rgb), .24), rgba(var(--brand2-rgb), .55)); border: 1px solid rgba(var(--accent-rgb), .25); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 6px 16px rgba(0, 0, 0, .25); }
.tile .name { font-size: 17px; letter-spacing: -.3px; }
.gico svg { display: block; }
.gi { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.tile:hover .gi, .tile-main:focus-visible .gi { transform: translateY(-2px) rotate(-7deg) scale(1.08); }
.gi .p { fill: var(--accent-strong); }
.gi .l { fill: var(--text); }
.gi .t { fill: var(--accent); }
.gi .d { fill: var(--panel2); }
.gi .s { fill: none; stroke: var(--accent-pale); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.gi .s.thin { stroke-width: 1.4; stroke-dasharray: 2 2.6; }
.gi .s.dk { stroke: var(--brand); stroke-width: 2; }
.gi .s.fat { stroke: var(--accent); stroke-width: 3.4; }
.presets .chip { transition: background .15s, border-color .15s, transform .15s, color .15s; }
.presets .chip:hover:not(:disabled) { background: var(--brand); border-color: var(--accent-strong); color: #fff; transform: translateY(-1px); }
.td-game .gi { vertical-align: -.3em; }

/* rows, feed, buttons */
.og { transition: border-color .15s, background .15s, transform .15s; }
.og:hover { border-color: var(--line2); background: var(--panel2); }
.feed-item .gico.sm { background: linear-gradient(145deg, rgba(var(--accent-rgb), .18), rgba(var(--brand2-rgb), .45)); }
button:active:not(:disabled), .btn:active { transform: translateY(1px) scale(.98); }
button.primary, .btn.primary { background: linear-gradient(180deg, var(--btn-1), var(--brand) 60%, var(--btn-3)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 18px rgba(var(--brand-rgb), .4); }
button.primary:hover:not(:disabled), .btn.primary:hover { background: linear-gradient(180deg, var(--btn-1), var(--brand) 60%, var(--btn-3)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 24px rgba(var(--accent-strong-rgb), .5); }
.match-head { background: radial-gradient(300px 140px at 0% 0%, rgba(var(--brand-rgb), .4), transparent 70%), url('/img/hatch.svg'), var(--panel); }
.match-head .gico.lg { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(145deg, rgba(var(--accent-rgb), .24), rgba(var(--brand2-rgb), .55)); border: 1px solid rgba(var(--accent-rgb), .25); }
.dlg-head .gico.lg { background: linear-gradient(145deg, rgba(var(--accent-rgb), .24), rgba(var(--brand2-rgb), .55)); border: 1px solid rgba(var(--accent-rgb), .25); }

/* footer */
.foot-brand { display: inline-flex; align-items: center; gap: 8px; }
.foot-brand .mark { display: block; }
.foot-brand b { color: var(--text); }
.foot-coin { display: inline-flex; align-items: center; gap: 10px; }
.foot-coin a { display: inline-flex; padding: 4px 0; }
.foot-coin img { display: block; height: 20px; width: auto; }

@media (min-width: 600px) {
  .hero { background-position: right -180px center, 0 0, 0 0; background-size: 640px, auto, auto; }
  .hero-stats > div { padding: 10px 18px; }
  .hero-stats dd { font-size: 21px; }
}
@media (min-width: 960px) {
  .brand .mark { width: 34px; height: 34px; }
  .wm { font-size: 20px; }
  .hero { padding: 34px 32px; background-position: right -120px center, 0 0, 0 0; background-size: 700px, auto, auto; }
  .hero.compact { padding: 26px 28px; }
}
@media (max-width: 599px) { .tagline { display: none; } .brand .mark { width: 28px; height: 28px; } .brand { gap: 7px; } }

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

@media (max-width: 419px) { .dep span { display: none; } .dep { width: 40px; padding: 0 !important; } }


/* ---- Mask.ID ---- */
.btn.maskid, button.maskid {
  background: linear-gradient(135deg, #3d2a8a, #5b3fd4);
  color: #fff; border: 1px solid #7c6af0; font-weight: 600;
}
.btn.maskid:hover, button.maskid:hover { filter: brightness(1.08); }
.or-sep { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---- Game intro splash (CSP-safe, CSS only) ---- */
.game-intro {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; align-content: center; gap: 10px;
  background: radial-gradient(ellipse at center, rgba(var(--panel-rgb), .93) 0%, rgba(var(--shade-rgb), .95) 70%);
  animation: gi-in .35s ease-out both;
}
.game-intro.out { animation: gi-out .35s ease-in both; pointer-events: none; }
.gi-ring {
  position: absolute; width: min(280px, 70vw); aspect-ratio: 1;
  border: 2px solid var(--accent, var(--accent));
  clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
  opacity: .55; animation: gi-spin 2.2s linear infinite;
}
.gi-mark { position: relative; z-index: 1; filter: drop-shadow(0 0 18px rgba(var(--accent-rgb), .53)); animation: gi-pop .5s ease-out both; }
.gi-swords { font-size: 28px; opacity: .85; letter-spacing: 4px; animation: gi-clash .6s ease-out .15s both; }
.gi-name { position: relative; z-index: 1; font-family: Montserrat, system-ui, sans-serif; font-weight: 800; font-size: clamp(1.6rem, 5vw, 2.4rem); letter-spacing: .04em; text-transform: uppercase; }
.gi-sub { position: relative; z-index: 1; letter-spacing: .2em; text-transform: uppercase; font-size: 11px; }
.game-intro.reduce .gi-ring, .game-intro.reduce .gi-mark, .game-intro.reduce .gi-swords { animation: none; }
.gi-coinflip .gi-name { color: #fbbf24; }
.gi-dice .gi-name { color: #34d399; }
.gi-highcard .gi-name { color: #f87171; }
.gi-rps .gi-name { color: #60a5fa; }
.gi-chess .gi-name { color: #e5e7eb; }
.gi-poker .gi-name { color: #c084fc; }
.gi-liarsdice .gi-name { color: #fbbf24; }
.gi-mines .gi-name { color: #fb7185; }

.liars-wrap { width: min(520px, 100%); justify-items: stretch; }
.liars-hands, .liars-reveal { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.liars-hand { background: var(--panel, var(--panel)); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.dice-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: 28px; line-height: 1; }
.die.hidden { opacity: .55; filter: grayscale(.4); }
.liars-controls { display: grid; gap: 10px; margin-top: 8px; }
.liars-controls select { min-width: 72px; }

.mines-wrap { width: min(420px, 100%); }
.mines-grid { display: grid; gap: 6px; margin-top: 8px; }
.mines-cell {
  aspect-ratio: 1; border-radius: 10px; font-size: 18px;
  background: linear-gradient(160deg, var(--panel2), var(--bg2)); border: 1px solid var(--line);
  color: var(--text); cursor: pointer;
}
.mines-cell:disabled { cursor: default; opacity: 1; }
.mines-cell.safe { background: #1f3d2f; border-color: #2f6b4a; color: #6ee7b7; }
.mines-cell.mine { background: #4a1c28; border-color: #9f1239; }
.mines-cell.boom { box-shadow: 0 0 0 2px #fb7185, 0 0 18px rgba(251, 113, 133, .53); animation: gi-pop .35s ease-out; }
.mines-cell.hidden:not(:disabled):hover { border-color: var(--brand, var(--accent-strong)); }
@keyframes gi-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes gi-out { to { opacity: 0; } }
@keyframes gi-spin { to { transform: rotate(360deg); } }
@keyframes gi-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes gi-clash { from { transform: scale(1.4); opacity: 0; } 60% { transform: scale(.95); } to { transform: scale(1); opacity: .85; } }

/* ---- Branding polish: crossed-swords spark on match head + octagon pulse on brand ---- */
.match-head { position: relative; overflow: hidden; }
.match-head::after {
  content: '⚔'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 42px; opacity: .08; pointer-events: none; filter: blur(.2px);
}
.brand .mark { animation: mark-pulse 4.5s ease-in-out infinite; }
@keyframes mark-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), .4)); }
}
@media (prefers-reduced-motion: reduce) {
  .brand .mark, .gi-ring, .gi-mark, .gi-swords { animation: none !important; }
}

/* ---------- growth: VIP badges, rewards, profile, share ---------- */
.vip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.6; vertical-align: middle; border: 1px solid transparent; white-space: nowrap; }
.vip.lg { font-size: 12px; padding: 3px 10px; gap: 5px; }
.vip-bronze { color: #f0b98a; background: rgba(205, 127, 50, .16); border-color: rgba(205, 127, 50, .45); }
.vip-silver { color: #e4e8f0; background: rgba(192, 200, 214, .14); border-color: rgba(192, 200, 214, .5); }
.vip-gold { color: #ffd76a; background: rgba(255, 200, 60, .14); border-color: rgba(255, 200, 60, .55); }
.vip-platinum { color: #9ff3ea; background: rgba(120, 230, 220, .12); border-color: rgba(120, 230, 220, .5); }
.vip-diamond { color: #d9c2ff; background: linear-gradient(135deg, rgba(var(--accent-rgb), .3), rgba(124, 196, 255, .25)); border-color: rgba(200, 170, 255, .7); box-shadow: 0 0 10px rgba(var(--accent-rgb), .35); }
.ulink { color: inherit; }
.ulink:hover { color: var(--accent); }
.msg .msg-who { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; }
.msg .msg-who b { margin-right: 0; }
.msg .msg-who b a { color: var(--accent); }
.og-by .ulink { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.who .vip { margin-left: 2px; }
.result-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.btn.xshare, a.xshare { display: inline-flex; align-items: center; gap: 6px; background: #000; color: #fff; border: 1px solid #3a3a3a; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; text-decoration: none; }
.btn.xshare:hover { background: #111; border-color: #666; text-decoration: none; }
.good-notice { border-color: rgba(63, 214, 154, .4); background: rgba(63, 214, 154, .08); display: flex; gap: 8px; align-items: center; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.page-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 4px 0 16px; }
.page-head h1 { margin: 0; }
.rewards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .rewards-grid { grid-template-columns: 1fr; } }
.vip-card, .ref-card { display: grid; gap: 16px; position: relative; overflow: hidden; }
.vip-card::before { content: ''; position: absolute; inset: -40% -20% auto auto; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, var(--tier-glow, rgba(var(--accent-rgb), .25)), transparent 70%); pointer-events: none; }
.tier-bronze { --tier: #e09a5c; --tier-glow: rgba(205, 127, 50, .28); }
.tier-silver { --tier: #dfe4ee; --tier-glow: rgba(192, 200, 214, .22); }
.tier-gold { --tier: #ffd76a; --tier-glow: rgba(255, 200, 60, .26); }
.tier-platinum { --tier: #9ff3ea; --tier-glow: rgba(120, 230, 220, .22); }
.tier-diamond { --tier: #d9c2ff; --tier-glow: rgba(var(--accent-rgb), .36); }
.vip-top { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; position: relative; }
@media (max-width: 520px) { .vip-top { grid-template-columns: auto 1fr; } .vip-claim { grid-column: 1 / -1; } }
.vip-medal { width: 64px; height: 64px; display: grid; place-items: center; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); background: linear-gradient(145deg, var(--tier, var(--accent)), var(--brand2)); color: #1a0f2b; }
.vip-name { margin: 0; font-size: 30px; color: var(--tier, var(--text)); letter-spacing: .01em; }
.vip-claim { display: grid; gap: 6px; justify-items: end; text-align: right; }
@media (max-width: 520px) { .vip-claim { justify-items: start; text-align: left; } }
.big-num { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.big-num .unit, .ref-stats .unit { font-size: 13px; color: var(--muted); font-weight: 600; }
.vip-progress { display: grid; gap: 6px; position: relative; }
.vip-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); overflow: hidden; }
.vip-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--tier, var(--accent))); box-shadow: 0 0 12px var(--tier-glow, transparent); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.row.spread { justify-content: space-between; display: flex; gap: 10px; flex-wrap: wrap; }
.tier-ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; position: relative; }
.tier-ladder li { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 10px 4px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.tier-ladder li.on { border-color: var(--tier, var(--accent)); background: rgba(255, 255, 255, .05); box-shadow: 0 0 0 1px var(--tier, var(--accent)) inset; }
.tier-ladder li.done { opacity: .6; }
@media (max-width: 520px) { .tier-ladder { grid-template-columns: repeat(3, 1fr); } .tier-ladder .vip.lg span { display: none; } }
.ref-card h2 { margin: 0; font-size: 22px; line-height: 1.25; }
.ref-card .hl { color: var(--good); }
.ref-card p { margin: 0; }
.ref-link { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ref-link input { flex: 1 1 220px; min-width: 0; }
.ref-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.ref-stats > div { padding: 12px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); min-width: 0; }
.ref-stats dt { font-size: 12px; color: var(--muted); }
.ref-stats dd { margin: 2px 0 0; font-size: 20px; font-weight: 800; overflow-wrap: anywhere; }
.ref-stats dd.mono { font-size: 16px; }
.empty.soft { display: flex; gap: 10px; align-items: center; padding: 16px; border: 1px dashed var(--line2); border-radius: var(--radius-sm); color: var(--muted); }
.profile { display: grid; gap: 18px; max-width: 720px; margin: 0 auto; }
.profile-head { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.profile-head h1 { margin: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.avatar.xl { width: 72px; height: 72px; font-size: 30px; box-shadow: 0 0 0 3px var(--tier, var(--line2)); }
@media (max-width: 520px) { .profile-head { grid-template-columns: auto 1fr; } .profile-act { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .vip-fill { transition: none; } }
@media (max-width: 479px) { #userbox .net { display: none; } }

/* ---- tipping */
[hidden] { display: none !important; }
.tip-dlg { min-width: min(380px, 100%); }
.tip-head { display: flex; gap: 12px; align-items: center; }
.tip-head h2 { margin: 0; }
.tip-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none; color: #fff;
  background: radial-gradient(circle at 30% 30%, var(--accent-strong), var(--brand) 60%, var(--brand2)); box-shadow: 0 0 18px rgba(var(--accent-strong-rgb), .45); }
.tip-ico.sm { width: 20px; height: 20px; box-shadow: none; vertical-align: -5px; }
.big-input { font-size: 22px; padding: 12px 14px; text-align: center; }
.tip-btn { display: inline-flex; align-items: center; gap: 6px; }
.tip-mini { margin-left: auto; color: #d9a6ff; }
.tip-mini:hover { color: #fff; background: rgba(var(--accent-strong-rgb), .2); }
.player { position: relative; }
.msg.msg-tip { background: linear-gradient(90deg, rgba(var(--brand-rgb), .35), rgba(var(--brand2-rgb), .12)); border: 1px solid rgba(var(--accent-strong-rgb), .35); border-radius: 12px; }
.tip-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tip-amt { color: #f1c6ff; }
.namebtn { background: none; border: 0; padding: 0; min-height: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; }
.namebtn:hover, .namebtn:focus-visible { text-decoration: underline; background: none; }
.msg { position: relative; }
.name-menu { position: absolute; left: 36px; top: 26px; z-index: 30; display: grid; min-width: 150px; padding: 6px; border-radius: 10px;
  background: #1d1430; border: 1px solid rgba(var(--accent-strong-rgb), .35); box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: menuIn .12s ease-out; }
.name-menu button { justify-content: flex-start; background: none; border: 0; min-height: 34px; padding: 6px 10px; border-radius: 6px; text-align: left; }
.name-menu button:hover, .name-menu button:focus-visible { background: rgba(var(--brand-rgb), .5); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .name-menu { animation: none; } }
.kind.tip { color: #e2b3ff; display: inline-flex; align-items: center; gap: 2px; }

/* ---- responsible gambling */
.age-badge { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-weight: 800; font-size: 17px; color: #fff;
  border: 2px solid var(--accent-strong); background: radial-gradient(circle at 30% 30%, var(--brand2), var(--panel2)); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .25); flex: none; }
.age-badge.sm { width: 22px; height: 22px; font-size: 9px; border-width: 1.5px; box-shadow: none; vertical-align: middle; }
.foot-rg { display: inline-flex; align-items: center; gap: 6px; }
.rg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.rg-head p { margin: 4px 0 0; max-width: 62ch; }
.rg-state { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; margin: 0 0 16px; font-weight: 600; }
.rg-state.bad { background: rgba(229,72,77,.12); border: 1px solid rgba(229,72,77,.4); color: #ffb4b6; }
.rg-state.warn { background: rgba(245,176,65,.1); border: 1px solid rgba(245,176,65,.4); color: #ffd48a; }
.rg-kind h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 6px; }
.rg-kind > p { margin: 0 0 10px; min-height: 3em; }
.rg-limit { padding: 10px 0; border-top: 1px solid rgba(255,255,255,.06); display: grid; gap: 8px; }
.rg-lim-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.rg-per { font-weight: 700; }
.meter { height: 6px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--accent-strong)); transition: width .4s ease; }
.meter.high > span { background: linear-gradient(90deg, var(--accent-strong), #f5b041); }
.meter.full > span { background: linear-gradient(90deg, #f5b041, #e5484d); }
.rg-set { display: flex; gap: 6px; }
.rg-set input { flex: 1; min-width: 0; }
.rg-pending { color: #ffd48a; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.rg-help-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.rg-help-list a { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.rg-tips ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rg-tips li { display: flex; gap: 8px; align-items: baseline; }
.rg-tips li svg { color: #8ee6b0; flex: none; }
.rg-kinds { margin-bottom: 16px; }
.rg-excl .danger.solid { margin-left: 0; }
@media (max-width: 720px) { .rg-head .age-badge { width: 40px; height: 40px; font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .meter > span { transition: none; } }
.page-head.rg-head { flex-direction: row; align-items: flex-start; }

/* ======================================================================
   Stage 4: premium polish layer (palette var(--brand) / var(--brand2) / var(--panel2) / var(--bg))
   ====================================================================== */
:root { --glass: rgba(var(--panel2-rgb), .55); --glass-line: rgba(var(--accent-rgb), .16); --glow: 0 0 0 1px rgba(var(--accent-rgb), .08), 0 18px 40px -18px rgba(0,0,0,.6); }
body { background: radial-gradient(1100px 520px at 75% -12%, rgba(var(--brand-rgb), .32), transparent 70%), radial-gradient(800px 420px at -10% 110%, rgba(var(--brand2-rgb), .22), transparent 70%), var(--bg); background-attachment: fixed; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
h1, h2 { letter-spacing: -.02em; }
h2 { font-weight: 800; }
.num, .big-num, td.r, .og-stake b { font-variant-numeric: tabular-nums; }

/* hero: CSS-only glow + rising particles */
.hero-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-glow { position: absolute; width: 520px; height: 520px; left: -160px; top: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-strong-rgb), .55), rgba(var(--brand-rgb), .18) 45%, transparent 70%); filter: blur(10px); animation: glow-drift 14s ease-in-out infinite alternate; }
.hero-glow.g2 { left: auto; right: -200px; top: auto; bottom: -320px; width: 600px; height: 600px; background: radial-gradient(circle, rgba(var(--brand2-rgb), .6), transparent 68%); animation-duration: 18s; animation-direction: alternate-reverse; }
.hero-fx i { position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent-soft); box-shadow: 0 0 8px 2px rgba(var(--accent-rgb), .7); opacity: 0; animation: rise 9s linear infinite; }
.hero-fx i:nth-child(3)  { left: 6%;  animation-delay: 0s;   animation-duration: 10s; }
.hero-fx i:nth-child(4)  { left: 13%; animation-delay: 3.2s; width: 3px; height: 3px; }
.hero-fx i:nth-child(5)  { left: 21%; animation-delay: 6.1s; animation-duration: 12s; }
.hero-fx i:nth-child(6)  { left: 29%; animation-delay: 1.4s; width: 2px; height: 2px; }
.hero-fx i:nth-child(7)  { left: 37%; animation-delay: 4.8s; animation-duration: 11s; }
.hero-fx i:nth-child(8)  { left: 45%; animation-delay: 7.5s; width: 3px; height: 3px; }
.hero-fx i:nth-child(9)  { left: 53%; animation-delay: 2.2s; animation-duration: 13s; }
.hero-fx i:nth-child(10) { left: 61%; animation-delay: 5.6s; width: 2px; height: 2px; }
.hero-fx i:nth-child(11) { left: 69%; animation-delay: .8s;  animation-duration: 10.5s; }
.hero-fx i:nth-child(12) { left: 77%; animation-delay: 3.9s; width: 3px; height: 3px; }
.hero-fx i:nth-child(13) { left: 84%; animation-delay: 6.8s; animation-duration: 12.5s; }
.hero-fx i:nth-child(14) { left: 90%; animation-delay: 2.7s; width: 2px; height: 2px; }
.hero-fx i:nth-child(15) { left: 95%; animation-delay: 8.3s; }
.hero-fx i:nth-child(16) { left: 33%; animation-delay: 9.4s; animation-duration: 14s; width: 2px; height: 2px; }
@keyframes rise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 12% { opacity: .9; } 70% { opacity: .5; } 100% { transform: translateY(-340px) translateX(18px) scale(1); opacity: 0; } }
@keyframes glow-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 30px) scale(1.12); } }
.hero .hl { background-size: 200% 100%; animation: hl-shine 7s ease-in-out infinite; }
@keyframes hl-shine { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hero-bal { background: var(--glass); border-color: var(--glass-line); backdrop-filter: blur(10px); box-shadow: var(--glow); }
.hero-bal .big-num { text-shadow: 0 0 24px rgba(var(--accent-rgb), .35); }

/* glassy panels + premium cards */
.panel { background: linear-gradient(180deg, rgba(var(--panel2-rgb), .6), rgba(var(--panel-rgb), .82)); border-color: var(--glass-line); box-shadow: var(--glow); backdrop-filter: blur(6px); }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.tile { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; border-color: var(--glass-line); background: linear-gradient(165deg, rgba(var(--brand-rgb), .22), rgba(var(--panel-rgb), .9) 55%); position: relative; overflow: hidden; }
.tile::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(var(--accent-soft-rgb), .09) 50%, transparent 65%); transform: translateX(-100%); transition: transform .6s ease; }
.tile:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), .45); box-shadow: 0 16px 34px -16px rgba(var(--brand-rgb), .8); }
.tile:hover::after { transform: translateX(100%); }
.tile .gico.lg { transition: transform .25s ease; }
.tile:hover .gico.lg { transform: scale(1.07) rotate(-3deg); }
.chip { transition: background .12s, border-color .12s, transform .12s; }
.chip:hover:not(:disabled) { transform: translateY(-1px); background: rgba(var(--brand-rgb), .45); }
.og { transition: background .15s, border-color .15s; }
.og:hover { border-color: rgba(var(--accent-rgb), .35); background: rgba(var(--brand-rgb), .12); }
button.primary, .btn.primary { background: linear-gradient(180deg, var(--btn-1), var(--brand) 60%, var(--btn-3)); box-shadow: 0 6px 18px -6px rgba(var(--brand-rgb), .9), inset 0 1px 0 rgba(255, 255, 255, .18); }
button.primary:hover:not(:disabled), .btn.primary:hover { box-shadow: 0 8px 24px -6px rgba(var(--accent-strong-rgb), .95), inset 0 1px 0 rgba(255, 255, 255, .22); }

/* tables */
table:not(.tbl-plain) th { background: rgba(var(--bg-rgb), .35); position: sticky; top: 0; }
table:not(.tbl-plain) tbody tr { transition: background .12s; }
table:not(.tbl-plain) tbody tr:hover { background: rgba(var(--brand-rgb), .1); }
td, th { border-bottom-color: rgba(var(--accent-rgb), .1); }

/* chat bubbles */
.msg { padding: 6px 8px; border-radius: 12px; transition: background .12s; }
.msg:hover { background: rgba(var(--brand-rgb), .1); }
.msg .msg-body { background: rgba(var(--panel2-rgb), .55); border: 1px solid rgba(var(--accent-rgb), .1); border-radius: 4px 12px 12px 12px; padding: 6px 10px; }
.msg.msg-tip .msg-body { background: linear-gradient(135deg, rgba(var(--brand-rgb), .45), rgba(var(--brand2-rgb), .35)); border-color: rgba(var(--accent-soft-rgb), .35); box-shadow: 0 0 18px -6px rgba(var(--accent-rgb), .6); }
.chat { background: linear-gradient(180deg, rgba(var(--panel-rgb), .97), rgba(var(--bg-rgb), .97)); }

/* empty states */
.empty { border-radius: 14px; }
div.empty { display: grid; justify-items: center; gap: 8px; padding: 28px 18px; border: 1px dashed rgba(var(--accent-rgb), .22); background: radial-gradient(260px 120px at 50% 0%, rgba(var(--brand-rgb), .18), transparent 70%); }
.empty.soft svg { color: var(--accent); opacity: .85; }

/* wallet / VIP / referral */
.tx-item { background: linear-gradient(180deg, rgba(var(--panel2-rgb), .5), rgba(var(--bg2-rgb), .8)); border-color: var(--glass-line); transition: border-color .15s, transform .15s; }
.tx-item:hover { border-color: rgba(var(--accent-rgb), .35); }
.vip-card, .ref-card { background: radial-gradient(420px 200px at 100% 0%, rgba(var(--brand-rgb), .35), transparent 70%), linear-gradient(180deg, rgba(var(--panel2-rgb), .7), rgba(var(--bg-rgb), .9)); }
.vip-medal { box-shadow: 0 0 30px -4px var(--tier-glow, rgba(var(--accent-rgb), .5)); animation: medal-in .6s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes medal-in { from { transform: scale(.6) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.ref-stats > div { transition: transform .15s, border-color .15s; }
.ref-stats > div:hover { transform: translateY(-2px); }

/* micro-animations */

@media (prefers-reduced-motion: reduce) {
  .hero-fx i, .hero-glow, .hero .hl, .vip-medal { animation: none !important; }
  .hero-fx i { display: none; }
  .tile, .tile::after, .tile .gico.lg, .chip, .ref-stats > div { transition: none !important; }
  .tile:hover, .chip:hover:not(:disabled), .ref-stats > div:hover { transform: none; }
}
.chat .msg.msg-tip { background: none; border: 0; box-shadow: none; padding: 6px 8px; }
.chat .msg.msg-tip:hover { background: rgba(var(--brand-rgb), .1); }

/* ---- mobile "More" sheet + account quick links */
.more-sheet h2 { margin: 0 0 12px; }
.more-me { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; background: rgba(var(--brand-rgb), .18); border: 1px solid var(--glass-line); }
.more-grid, .quick-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-links { margin: 0 0 16px; }
@media (min-width: 720px) { .quick-links { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.more-item { display: flex; align-items: center; gap: 10px; padding: 10px; min-height: 56px; border-radius: 12px; color: var(--text); text-decoration: none !important; background: linear-gradient(180deg, rgba(var(--panel2-rgb), .7), rgba(var(--panel-rgb), .9)); border: 1px solid var(--glass-line); transition: border-color .12s, background .12s; }
.more-item:hover, .more-item:focus-visible { border-color: rgba(var(--accent-rgb), .5); background: rgba(var(--brand-rgb), .25); }
.more-item.on { border-color: var(--accent); }
.more-ico { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; color: var(--accent); background: linear-gradient(145deg, rgba(var(--accent-rgb), .2), rgba(var(--brand2-rgb), .5)); }
.more-txt { display: grid; min-width: 0; line-height: 1.25; }
.more-txt b { font-size: 14px; }
.more-txt .small { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-out { margin-top: 12px; }
.more-foot { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.tab.in-more::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.tab.in-more { color: var(--accent); }

/* ======================================================================
   Design directions: shared structure for hero2 / ticker / art tiles / confetti.
   Themes (public/themes/*.css) repaint these through custom properties.
   ====================================================================== */
:root {
  --art-bg-a: #3a2160; --art-bg-b: #140c22; --art-glow: rgba(185, 140, 242, .55);
  --art-1: #c79bff; --art-1d: #6b2fa0; --art-2: #8a3fc7; --art-2d: #3a1d5c; --art-3: #ffd76a; --art-3d: #c28a1c;
  --art-ink: #130d1e; --art-hi: #ffffff; --art-ray: rgba(255, 255, 255, .06); --art-grid: rgba(255, 255, 255, .05);
  --card: #ffffff; --card2: #e9e4f2; --card-ink: #17121f; --card-red: #e0314f;
  --die: #ffffff; --die2: #dcd3ea; --pip: #17121f; --gem-a: #6ee7ff; --gem-b: #22a6d6; --bomb: #1b1b22;
  --confetti1: #c79bff; --confetti2: #ffd76a; --confetti3: #3fd69a; --confetti4: #ff6b81;
  --tile-radius: var(--radius);
}
.gart { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.gart-svg { display: block; width: 100%; height: 100%; }
.gart .s-bga { stop-color: var(--art-bg-a); } .gart .s-bgb { stop-color: var(--art-bg-b); }
.s-glow { stop-color: var(--art-glow); } .s-glow0 { stop-color: var(--art-glow); stop-opacity: 0; }
.s1 { stop-color: var(--art-1); } .s1d { stop-color: var(--art-1d); }
.s2 { stop-color: var(--art-2); } .s2d { stop-color: var(--art-2d); }
.s3 { stop-color: var(--art-3); } .s3d { stop-color: var(--art-3d); }
.s-card { stop-color: var(--card); } .s-card2 { stop-color: var(--card2); }
.s-die { stop-color: var(--die); } .s-die2 { stop-color: var(--die2); }
.s-shine { stop-color: #fff; stop-opacity: .5; } .s-shine0 { stop-color: #fff; stop-opacity: 0; }
.a-rays path { fill: var(--art-ray); }
.a-grid path { fill: none; stroke: var(--art-grid); stroke-width: 1; }
.a-spark { fill: var(--art-hi); opacity: .85; }
.a-spark.hot { fill: var(--art-3); }
.a-shadow { fill: #000; opacity: .35; }
.a-motion path { fill: none; stroke: var(--art-hi); stroke-opacity: .45; stroke-width: 3; stroke-linecap: round; }
.a-emblem .em-oct { fill: var(--art-2); } .a-emblem .em-ring { fill: none; stroke: var(--art-hi); stroke-opacity: .3; stroke-width: 1.2; stroke-dasharray: 2 3; }
.a-emblem .em-blade { fill: var(--art-hi); } .a-emblem .em-hilt { fill: var(--art-3); }
.c-emb .em-oct { fill: var(--art-1d); opacity: .55; } .c-emb .em-ring { display: none; } .c-emb .em-blade { fill: var(--art-hi); opacity: .9; } .c-emb .em-hilt { fill: var(--art-1d); }
.a-coin .c-rim { fill: var(--art-1d); }
.a-coin .c-ring { fill: none; stroke: var(--art-1d); stroke-width: 2.5; opacity: .6; }
.a-coin .c-ring.dash { stroke: var(--art-hi); stroke-opacity: .35; stroke-dasharray: 3 4; stroke-width: 2; }
.a-coin .c-shine { fill: none; stroke: #fff; stroke-opacity: .55; stroke-width: 4; stroke-linecap: round; }
.a-die .d-top, .a-die .d-left, .a-die .d-right { stroke-width: 0; }
.a-die .d-top { fill: var(--die); } .a-die .d-left { fill: var(--die2); } .a-die .d-right { fill: var(--die2); filter: brightness(.82); }
.a-die .d-pip { fill: var(--pip); }
.a-card .cd-face { stroke: rgba(0, 0, 0, .12); stroke-width: 1; } .a-card .cd-shadow { fill: #000; opacity: .3; }
.a-card .cd-inner { fill: none; stroke: var(--card-ink); stroke-opacity: .12; stroke-width: 1; }
.a-card .cd-rank { fill: var(--card-ink); font-family: var(--font-display); font-weight: 800; }
.a-card .cd-suit { fill: var(--card-ink); } .a-card .red { fill: var(--card-red); }
.a-card .cd-back-in { fill: none; stroke: var(--art-hi); stroke-opacity: .35; stroke-width: 1.5; stroke-dasharray: 3 3; }
.em-on-back .em-oct { fill: var(--art-2d); } .em-on-back .em-ring { display: none; }
.a-chips .ch-side { fill: var(--art-1d); } .a-chips .ch-top { fill: var(--art-1); } .a-chips .ch-dash { fill: none; stroke: #fff; stroke-width: 4; stroke-dasharray: 7 7; opacity: .85; } .a-chips .ch-in { fill: none; stroke: var(--art-1d); stroke-width: 2; }
.a-chips.c2 .ch-side { fill: var(--art-2d); } .a-chips.c2 .ch-top { fill: var(--art-2); } .a-chips.c2 .ch-in { stroke: var(--art-2d); }
.a-chips.c3 .ch-side { fill: var(--art-3d); } .a-chips.c3 .ch-top { fill: var(--art-3); } .a-chips.c3 .ch-in { stroke: var(--art-3d); }
.r-rock { fill: var(--art-2); } .r-rock-hi { fill: #fff; opacity: .25; } .r-crack { fill: none; stroke: var(--art-2d); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.r-paper { fill: var(--card); } .r-fold { fill: var(--card2); } .r-lines { stroke: var(--art-1); stroke-width: 4; stroke-linecap: round; opacity: .55; }
.r-blade { fill: var(--art-hi); stroke: rgba(0, 0, 0, .15); } .r-handle { fill: var(--art-1); } .r-hole { fill: var(--art-bg-b); } .r-pin { fill: var(--art-1d); }
.a-board .b-base { fill: var(--art-2d); } .a-board .b-sq rect { fill: var(--art-2); opacity: .55; }
.k-piece { fill: var(--art-1); stroke: var(--art-1d); stroke-width: 2; } .k-piece.alt { fill: var(--card); stroke: var(--card2); } .k-eye { fill: var(--art-1d); } .k-mane { fill: none; stroke: #fff; stroke-opacity: .4; stroke-width: 3; stroke-linecap: round; }
.l-cup { fill: var(--art-2); } .l-cup-rim { fill: var(--art-2d); } .l-cup-band { fill: var(--art-1); }
.l-bubble path { fill: var(--art-hi); } .l-bubble text { fill: var(--card-red); font-family: var(--font-display); font-weight: 900; font-size: 26px; letter-spacing: .5px; }
.m-cell { fill: var(--art-2); opacity: .75; } .m-cell.open { fill: var(--art-2d); opacity: .9; }
.a-gem .gm-a { fill: var(--gem-b); } .a-gem .gm-b { fill: var(--gem-a); } .a-gem .gm-c { fill: #fff; opacity: .7; }
.a-bomb .bm-body { fill: var(--bomb); } .a-bomb .bm-hi { fill: #fff; opacity: .25; } .a-bomb .bm-cap { fill: var(--art-1d); } .a-bomb .bm-fuse { fill: none; stroke: var(--card2); stroke-width: 3; stroke-linecap: round; }
.h-orbit ellipse { fill: none; stroke: var(--art-1); stroke-opacity: .25; stroke-width: 1.2; stroke-dasharray: 4 6; }

/* hero2 */
.hero2 { grid-template-columns: 1fr; }
.hero2 .hero-art { display: none; }
.hero2 .hero-art svg { width: 100%; height: auto; display: block; overflow: visible; }
.hero2 .cta-row { margin-top: 4px; }
.cta .ico { margin-left: 2px; }
.hero-balrow { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; margin-top: 10px; }
.hero-balrow .hb { display: grid; gap: 2px; }
.hero-balrow .big-num { font-size: 34px; }
.hero2 .trust { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.h-float { animation: float 6s ease-in-out infinite; transform-box: fill-box; }
.h-float.f2 { animation-delay: -1.5s; } .h-float.f3 { animation-delay: -3s; } .h-float.f4 { animation-delay: -4.5s; }
.h-emblem { filter: drop-shadow(0 0 18px var(--art-glow)); }
@keyframes float { 50% { transform: translateY(-8px) rotate(-3deg); } }
@media (min-width: 960px) {
  .hero2, .hero2.compact { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .hero2 .hero-art { display: block; margin: -24px -16px -24px 0; }
}

/* ticker */
.ticker { display: flex; align-items: center; gap: 0; margin: 14px 0 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; height: 44px; }
.ticker-l { flex: none; display: flex; align-items: center; gap: 2px; height: 100%; padding: 0 14px 0 16px; font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text); background: var(--panel2); border-right: 1px solid var(--line); }
.ticker-win { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); }
.ticker-track { display: flex; gap: 8px; width: max-content; padding: 0 8px; animation: tick var(--tk-dur, 40s) linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }
.tk { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; color: var(--text); padding: 5px 12px 5px 6px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); text-decoration: none !important; }
.tk:hover { border-color: var(--accent); }
.tk-v, .tk-g { color: var(--muted); } .tk-g { font-size: 12px; }
.tk-amt { color: var(--good); }
.gico.xs { width: 22px; height: 22px; border-radius: 6px; }
.avatar.xs { width: 20px; height: 20px; font-size: 10px; }

/* art tiles */
.gtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gtile { position: relative; display: grid; grid-template-rows: auto 1fr auto; border-radius: var(--tile-radius); overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: transform .22s cubic-bezier(.2, .9, .3, 1.2), box-shadow .22s, border-color .22s; }
.gtile:hover, .gtile:focus-within { transform: translateY(-5px); }
.gtile-main { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-rows: auto 1fr; }
.gtile-main:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gtile .gart-svg { transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.gtile:hover .gart-svg { transform: scale(1.06); }
.gtile-body { display: grid; gap: 3px; padding: 10px 12px 8px; align-content: start; }
.gtile .name { font-family: var(--font-display); font-weight: 800; font-size: 16px; line-height: 1.15; }
.gtile .desc { font-size: 12px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gtile .tile-meta { margin-top: 4px; }
.gbadge { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: var(--accent); color: var(--bg); }
.gplay { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px; border-radius: 99px; font-weight: 800; font-size: 13px; background: var(--accent); color: var(--bg); opacity: 0; transform: translateY(8px) scale(.9); transition: opacity .2s, transform .25s cubic-bezier(.2, .9, .3, 1.4); }
.gtile:hover .gplay, .gtile-main:focus-visible .gplay { opacity: 1; transform: none; }
.gtile .presets { padding: 6px 10px; }
@media (hover: none) { .gplay { opacity: 1; transform: none; padding: 5px 10px; font-size: 12px; } }
@media (max-width: 599px) { .gtile .presets { display: none; } .gtile .tile-meta .tag:nth-child(2) { display: none; } .ticker-l { padding: 0 10px; font-size: 10px; } }
@media (min-width: 760px) { .gtiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .gtiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }

/* win celebration */
.confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; left: var(--x); width: 9px; height: 14px; border-radius: 2px; animation: confetti-fall var(--d) cubic-bezier(.25, .6, .4, 1) var(--delay) forwards; }
.confetti i.round { width: 10px; height: 10px; border-radius: 50%; }
@keyframes confetti-fall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), 105vh) rotate(var(--r)); opacity: .9; } }
.result-banner.win-burst { animation: win-pop .6s cubic-bezier(.2, .9, .3, 1.4); }
.win-kicker { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 900; margin-right: 6px; }
.win-amt { font-size: 1.25em; }
@keyframes win-pop { from { transform: scale(.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } .h-float { animation: none; } .gtile:hover { transform: none; } }
.hero-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-glow { position: absolute; width: 520px; height: 520px; right: -120px; top: -180px; border-radius: 50%; background: radial-gradient(closest-side, var(--art-glow), transparent); opacity: .7; }
.hero-glow.g2 { left: -200px; right: auto; top: auto; bottom: -300px; opacity: .35; }
.hero-fx i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--accent); opacity: .5; animation: drift 9s linear infinite; }
.hero-fx i:nth-child(3n) { width: 2px; height: 2px; opacity: .35; }
.hero-fx i:nth-child(1) { left: 6%; top: 80%; } .hero-fx i:nth-child(2) { left: 14%; top: 30%; animation-delay: -2s; } .hero-fx i:nth-child(3) { left: 22%; top: 65%; animation-delay: -5s; }
.hero-fx i:nth-child(4) { left: 31%; top: 12%; animation-delay: -1s; } .hero-fx i:nth-child(5) { left: 38%; top: 88%; animation-delay: -7s; } .hero-fx i:nth-child(6) { left: 46%; top: 40%; animation-delay: -3s; }
.hero-fx i:nth-child(7) { left: 53%; top: 70%; animation-delay: -6s; } .hero-fx i:nth-child(8) { left: 61%; top: 20%; animation-delay: -4s; } .hero-fx i:nth-child(9) { left: 68%; top: 92%; animation-delay: -8s; }
.hero-fx i:nth-child(10) { left: 75%; top: 50%; animation-delay: -2.5s; } .hero-fx i:nth-child(11) { left: 82%; top: 15%; animation-delay: -5.5s; } .hero-fx i:nth-child(12) { left: 88%; top: 75%; animation-delay: -1.5s; }
.hero-fx i:nth-child(13) { left: 94%; top: 35%; animation-delay: -6.5s; } .hero-fx i:nth-child(14) { left: 50%; top: 5%; animation-delay: -3.5s; }
@keyframes drift { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: .6; } 100% { transform: translateY(-60px); opacity: 0; } }

/* live bets + win moment (base; themes restyle) */
.lbets { margin-top: 24px; }
.lb-wrap { overflow: auto; max-height: 452px; border: 1px solid var(--line); border-radius: 12px; }
.lb-table { display: table; width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.lb-table th, .lb-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lb-table .lb-s, .lb-table .lb-r, .lb-table .lb-t { text-align: right; }
.lb-sub { display: none; }
.lb-loss, .lb-push, .lb-t { color: var(--muted); }
@media (max-width: 599px) { .lb-g, .lb-t { display: none; } .lb-sub { display: block; font-size: 11px; color: var(--muted); } }
.staff-tag { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 4px; font-size: 9px; font-weight: 700; background: #e8b923; color: #1a1200; }
.staff-tag.house-tag { background: #662D91; color: #ECE4FF; }
.house-tag { flex: none; overflow: visible !important; text-overflow: clip !important; white-space: nowrap; }
.og-by .house-tag { margin-left: 0; }
.msg.n-gold .namebtn { color: #e8b923; }
.win-flash { position: fixed; inset: 0; z-index: 9998; pointer-events: none; background: radial-gradient(circle, rgba(255, 255, 255, .35), transparent 70%); animation: win-flash .8s ease-out forwards; }
@keyframes win-flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
.sb-snd, .sound-toggle { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .win-flash { display: none; } }

/* r7: big-win banner (all themes) and pixel avatars outside the terminal theme */
.bigwin { position: fixed; top: 0; left: 0; right: 0; z-index: 9990; display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 6px 14px; background: #ffd84a; color: #1a1100; font-weight: 700; text-decoration: none; white-space: nowrap; overflow: hidden; }
.bigwin.out { opacity: 0; transition: opacity .3s; }
.bigwin .bw-t { overflow: hidden; text-overflow: ellipsis; }
.bigwin .bw-q { margin-left: 10px; opacity: .7; font-size: 12px; }
.avatar.pxa svg { width: 100%; height: 100%; display: block; }
.lb-m { display: flex; align-items: center; gap: 8px; color: inherit; }
.lb-verb, .lb-opp.n { color: var(--muted); }
