:root {
  --bg: #0b0d12;
  --bg2: #12151d;
  --card: #161a24;
  --line: #242a38;
  --text: #e9ecf3;
  --muted: #8a93a8;
  --gold: #ffc940;
  --gold-2: #ff9d1c;
  --green: #36e39a;
  --red: #ff5d6c;
  --accent: var(--gold);
  --radius: 14px;
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -200px, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    var(--bg);
  transition: background 0.4s;
}
/* animated block background (bg.js): the canvas sits under the page; body's own background turns into a
   see-through glow + vignette over it so the middle stays calm and readable */
#mcBg { position: fixed; inset: 0; z-index: -1; width: 100vw; height: 100vh; pointer-events: none; }
#mcBg[hidden], #mcVid[hidden] { display: none; }
/* video background: slightly blurred and dimmed so the page stays readable; scaled up so the blur has no soft edges */
#mcVid { position: fixed; inset: 0; z-index: -1; width: 100vw; height: 100vh; object-fit: cover; pointer-events: none;
  filter: blur(3px) brightness(.62) saturate(1.1); transform: scale(1.04); }
html.mcbg body {
  background:
    radial-gradient(1200px 600px at 50% -200px, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(ellipse 60% 80% at 50% 45%, rgba(11, 13, 18, .55), rgba(11, 13, 18, .08) 75%, rgba(11, 13, 18, .3) 100%);
}
body[data-pot="small"] { --accent: #3ee0d0; }
body[data-pot="medium"] { --accent: #a77bff; }
body[data-pot="high"] { --accent: #ffc940; }
body[data-pot="nolimit"] { --accent: #ff5d8f; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
.primary {
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  color: #1a1206; font-weight: 700; padding: 9px 16px; border-radius: 10px;
  box-shadow: 0 4px 18px -6px var(--gold-2);
  transition: transform .1s, filter .15s;
}
.primary:hover { filter: brightness(1.08); }
.primary:active { transform: translateY(1px); }
.primary:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; }
.primary.big { padding: 12px 22px; font-size: 16px; }
.wide { width: 100%; }
#vsBack { margin-top: 6px; }
.ghost {
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); text-decoration: none; font-weight: 500;
}
.ghost:hover { border-color: #39425a; }
.link { color: var(--muted); text-decoration: underline; padding: 0 4px; white-space: nowrap; }
.ghost, .me-btn { white-space: nowrap; }
.icon-btn { font-size: 18px; padding: 6px 8px; border-radius: 8px; }
.icon-btn:hover { background: var(--bg2); }

/* Header */
.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 800; font-size: 22px; letter-spacing: .08em; display: flex; align-items: center; gap: 8px; }
.brand-mark { color: var(--accent); font-size: 26px; transition: color .4s; }
.top-actions, #guestActions, #userActions { display: flex; align-items: center; gap: 8px; }
.top-actions { margin-left: auto; }
.balance {
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1;
  padding: 6px 14px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line);
}
.balance .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
#balance { color: var(--gold); font-weight: 700; font-size: 17px; }
/* ---------- Live chat ---------- */
:root { --chat-w: 320px; }
.chat {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--chat-w); z-index: 12;
  display: flex; flex-direction: column; background: var(--bg2); border-right: 1px solid var(--line);
  transform: translateX(-100%); transition: transform .25s ease;
}
body.chat-open .chat { transform: none; }
body.chat-open { padding-left: var(--chat-w); }
body { transition: padding-left .25s ease; }
.site-logo { display: block; line-height: 0; transition: transform .15s, filter .15s; }
.site-logo:hover { transform: translateY(-1px); filter: brightness(1.08); }
.site-logo img { width: 100%; height: auto; }
/* same height as the top bar, so their bottom lines meet */
.chat-logo { box-sizing: border-box; height: var(--topbar-h, 69px); padding: 0 18px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); }
.chat-logo img { width: auto; max-width: 100%; max-height: 40px; display: block; }
.header-logo img { width: auto; height: 30px; }
body.chat-open .header-logo { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 14px 12px 16px; border-bottom: 1px solid var(--line); }
.chat-head b { font-size: 16px; margin-right: 8px; }
.chat-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat-title b { font-size: 18px; font-weight: 800; }
.chat-sub { font-size: 12.5px; color: var(--muted); }
/* rain card under the chat header: pot, Join / Tip, countdown and a progress line */
.rain-bar { position: relative; margin: 10px 10px 0; padding: 13px 13px 0; border-radius: 14px; overflow: visible;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 201, 64, .10), transparent 55%),
    radial-gradient(90% 80% at 100% 0%, rgba(79, 141, 255, .16), transparent 60%),
    linear-gradient(165deg, #1d2340, #141a2c 70%);
  border: 1px solid rgba(143, 156, 240, .2); box-shadow: 0 8px 22px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .05); }
.rain-bar[hidden] { display: none; }
.rain-bar > :not(.rc-drops) { position: relative; z-index: 1; }
/* faint falling rain behind the card's content (clipped to the card) */
.rc-drops { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; z-index: 0; }
.rc-drops i { position: absolute; top: -20px; width: 1.5px; height: 14px; border-radius: 2px; opacity: .0;
  background: linear-gradient(transparent, rgba(127, 180, 255, .55)); animation: rcDrop 2.6s linear infinite; }
.rc-drops i:nth-child(1) { left: 8%; animation-delay: 0s; }   .rc-drops i:nth-child(2) { left: 19%; animation-delay: 1.1s; }
.rc-drops i:nth-child(3) { left: 31%; animation-delay: .5s; } .rc-drops i:nth-child(4) { left: 43%; animation-delay: 1.8s; }
.rc-drops i:nth-child(5) { left: 54%; animation-delay: .2s; } .rc-drops i:nth-child(6) { left: 63%; animation-delay: 1.4s; }
.rc-drops i:nth-child(7) { left: 72%; animation-delay: .8s; } .rc-drops i:nth-child(8) { left: 81%; animation-delay: 2.1s; }
.rc-drops i:nth-child(9) { left: 89%; animation-delay: .35s; } .rc-drops i:nth-child(10) { left: 96%; animation-delay: 1.6s; }
@keyframes rcDrop { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: .5; } 100% { transform: translate(-14px, 170px); opacity: 0; } }
.rain-bar.raining .rc-drops i { animation-duration: 1.1s; background: linear-gradient(transparent, rgba(255, 220, 120, .7)); }
.rc-top { display: flex; align-items: center; gap: 10px; }
.rain-bar .rc-coin { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 3px 8px rgba(255, 201, 64, .45)); }
/* the ⓘ popup */
.rc-info-wrap { position: relative; display: inline-flex; }
.rc-pop { position: absolute; left: -34px; top: calc(100% + 9px); width: 230px; padding: 10px 12px; border-radius: 10px; z-index: 40;
  font-size: 12.5px; font-weight: 600; line-height: 1.45; letter-spacing: 0; text-transform: none; color: #e7eaf4;
  background: #232a40; border: 1px solid rgba(143, 156, 240, .28); box-shadow: 0 12px 28px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; }
.rc-pop::before { content: ''; position: absolute; left: 36px; top: -6px; width: 10px; height: 10px; transform: rotate(45deg);
  background: #232a40; border-left: 1px solid rgba(143, 156, 240, .28); border-top: 1px solid rgba(143, 156, 240, .28); }
.rc-pot .rc-pop b { color: var(--gold); font-size: inherit; font-weight: 800; white-space: normal; overflow: visible; }
.rc-pop { white-space: normal; text-align: left; }
.rain-bar > .rc-top { z-index: 3; } /* keep the tooltip above the timer row below it */
.rc-info-wrap:hover .rc-pop, .rc-info:focus + .rc-pop { opacity: 1; visibility: visible; transform: none; }
/* while it's raining: what each player would get */
.rc-share { margin-top: 9px; padding: 6px 9px; border-radius: 8px; font-size: 12px; color: #e7eaf4; text-align: center;
  background: rgba(255, 201, 64, .1); border: 1px solid rgba(255, 201, 64, .28); }
.rc-share[hidden] { display: none; }
.rc-share b { color: var(--gold); display: inline-flex; align-items: center; gap: 3px; }
.rc-share .coin { width: 13px; height: 13px; }
.rc-pot { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.15; }
.rc-pot b { font-size: 21px; font-weight: 800; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.rc-info { display: inline-grid; place-items: center; width: 13px; height: 13px; border-radius: 50%; font-size: 9px; font-style: normal; font-weight: 800;
  background: rgba(255, 255, 255, .14); color: var(--text); cursor: help; letter-spacing: 0; }
.rc-btn { flex: none; padding: 8px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; color: var(--text);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); transition: background .15s, color .15s, opacity .15s; }
.rc-btn:hover:not(:disabled), .rc-btn.active { background: rgba(255, 255, 255, .12); }
.rc-btn:disabled { opacity: .45; cursor: default; }
.rain-bar.raining .rc-join:not(:disabled) { color: #1a1300; background: var(--gold); border-color: var(--gold); box-shadow: 0 0 14px rgba(255, 201, 64, .45); animation: rainPulse 1.4s ease-in-out infinite; }
.rain-bar.joined .rc-join { opacity: 1; color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.rc-tipform { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 4px 4px 9px; border-radius: 9px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.rc-tipform[hidden] { display: none; }
.rc-tipform input { flex: 1; min-width: 0; background: none; border: 0; padding: 5px 0; font-size: 13px; color: var(--text); outline: none; }
.rc-tipform button { padding: 6px 14px; font-size: 12.5px; }
.rc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; font-size: 12px; color: var(--muted); }
.rc-time { display: inline-flex; align-items: center; gap: 6px; color: #7fb4ff; }
.rc-time b { color: var(--text); font-size: 13px; }
.rc-prog { height: 3px; margin: 10px -13px 0; background: rgba(255, 255, 255, .06); border-radius: 0 0 14px 14px; overflow: hidden; }
.rc-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4f8dff, #7fb4ff); transition: width 1s linear; }
.rain-bar.raining { border-color: rgba(255, 201, 64, .45); box-shadow: 0 0 20px rgba(255, 201, 64, .12); }
.rain-bar.raining .rc-prog i { background: linear-gradient(90deg, #ffc940, #ffe08a); }
@keyframes rainPulse { 50% { box-shadow: 0 0 22px rgba(255, 201, 64, .65); } }
.chat-raintip .cm-name { font-weight: 800; font-size: inherit; }
.chat-rain { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 12.5px;
  background: linear-gradient(135deg, rgba(79, 141, 255, .14), rgba(62, 224, 208, .07)); border: 1px solid rgba(79, 141, 255, .3); }
.chat-rain .rain-ico { color: #7fb4ff; flex: none; }
/* chat games (/chatgame) */
.chat-game { display: flex; flex-direction: column; gap: 7px; padding: 10px 11px; border-radius: 10px; font-size: 12.5px;
  background: linear-gradient(135deg, rgba(255, 201, 64, .14), rgba(255, 140, 40, .05)); border: 1px solid rgba(255, 201, 64, .35); }
.chat-game.live { animation: cgPulse 2.2s ease-in-out infinite; }
@keyframes cgPulse { 50% { box-shadow: 0 0 0 1px rgba(255, 201, 64, .35), 0 0 18px -4px rgba(255, 201, 64, .45); } }
.chat-game.won { background: linear-gradient(135deg, rgba(54, 227, 154, .14), rgba(54, 227, 154, .04)); border-color: rgba(54, 227, 154, .4); }
.chat-game.ended { background: var(--bg2); border-color: var(--line); }
.cg-head { display: flex; justify-content: space-between; align-items: center; }
.cg-head .cm-time { font-size: 11px; font-weight: 400; color: var(--muted); }
.cg-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.chat-game.won .cg-badge { color: var(--green); }
.chat-game.ended .cg-badge { color: var(--muted); }
.cg-q { font-size: 16px; font-weight: 800; line-height: 1.3; word-break: break-word; }
.cg-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.cg-prize { display: inline-flex; align-items: center; gap: 4px; font-family: 'JetBrains Mono', monospace; font-weight: 800; color: var(--gold); white-space: nowrap; }
.cg-prize .coin { width: 13px; height: 13px; }
.cg-win { display: flex; align-items: center; gap: 8px; line-height: 1.4; }
.cg-win img { width: 26px; height: 26px; border-radius: 6px; image-rendering: pixelated; cursor: pointer; flex: none; }
.cg-win b[data-profile] { cursor: pointer; }
.cg-ans { word-break: break-word; }
/* winner card */
.chat-game.won { position: relative; overflow: hidden; gap: 9px;
  background: radial-gradient(120% 90% at 0% 0%, rgba(255, 201, 64, .16), transparent 55%), linear-gradient(135deg, rgba(54, 227, 154, .16), rgba(54, 227, 154, .03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); animation: cgWin .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes cgWin { from { transform: scale(.94); opacity: 0; } }
.cg-winner { display: flex; align-items: center; gap: 10px; }
.cg-ava { position: relative; flex: none; }
.cg-ava img { display: block; width: 36px; height: 36px; border-radius: 9px; image-rendering: pixelated; cursor: pointer;
  box-shadow: 0 0 0 2px rgba(255, 201, 64, .85), 0 4px 14px -4px rgba(255, 201, 64, .6); }
.cg-ava i { position: absolute; top: -11px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-style: normal; font-size: 13px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.cg-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cg-who b { font-size: 14px; font-weight: 800; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-who small, .cg-won small { font-size: 11px; color: var(--muted); font-weight: 600; }
.cg-won { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.cg-won small { text-transform: uppercase; letter-spacing: .08em; font-size: 9.5px; font-weight: 800; }
.cg-won .cg-prize { font-size: 15px; padding: 3px 9px; border-radius: 999px; background: rgba(255, 201, 64, .12); border: 1px solid rgba(255, 201, 64, .35);
  text-shadow: 0 0 12px rgba(255, 201, 64, .5); }
.cg-won .cg-prize .coin { width: 15px; height: 15px; }
.cg-qa { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px;
  background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .05); font-size: 12px; }
.cg-qa-q { color: var(--muted); min-width: 0; word-break: break-word; }
.cg-qa-a { flex: none; font-family: 'JetBrains Mono', monospace; font-weight: 800; color: var(--green); padding: 1px 7px; border-radius: 6px; background: rgba(54, 227, 154, .12); }
.chat-rain > div { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.chat-rain b { display: inline; }
.chat-rain b .mono, .chat-rain .muted { white-space: nowrap; }
.chat-rain .cm-time { font-size: 11px; color: var(--muted); align-self: flex-start; }
.online { font-size: 12px; color: var(--muted); }
.online .dot { width: 7px; height: 7px; margin-right: 3px; }
.chat-list { list-style: none; margin: 0; padding: 10px 10px 6px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; }
/* every message sits in its own faint box so they read as separate */
.chat-msg { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; padding: 7px 8px; border-radius: 9px; position: relative;
  background: rgba(255, 255, 255, .025); border: 1px solid rgba(255, 255, 255, .07); }
.chat-msg:hover { background: rgba(255, 255, 255, .045); border-color: rgba(255, 255, 255, .11); }
.chat-msg.mine { background: color-mix(in srgb, var(--gold) 6%, transparent); border-color: color-mix(in srgb, var(--gold) 22%, transparent); }
.chat-msg img { width: 28px; height: 28px; border-radius: 6px; image-rendering: pixelated; cursor: pointer; }
.chat-msg .cm-top { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.chat-msg .cm-name { font-weight: 700; font-size: 13px; padding: 0; cursor: pointer; }
.chat-msg .cm-name:hover { text-decoration: underline; }
.chat-msg .cm-time { font-size: 11px; color: var(--muted); margin-left: auto; padding-left: 6px; flex: none; } /* every chat time sits top right */
.chat-list > li { flex-shrink: 0; } /* cards with overflow: hidden would otherwise get squashed */
.chat-msg .cm-text { font-size: 14px; line-height: 1.35; word-wrap: break-word; overflow-wrap: anywhere; color: #d3d8e4; }
.badge-admin { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; padding: 1px 5px; border-radius: 4px; background: var(--red); color: #fff; }
.chat-msg .cm-del { position: absolute; right: 6px; top: 4px; color: var(--muted); font-size: 16px; display: none; }
.chat-msg:hover .cm-del { display: block; }
.chat-tip { margin: 4px 0; padding: 8px 10px 10px; border-radius: 10px; font-size: 12.5px; background: #1a1d33; border: 1px solid rgba(143, 156, 240, .12);
  display: flex; flex-direction: column; align-items: center; gap: 8px; }
.chat-tip .tip-line { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; }
.chat-tip .tip-gift { flex: none; color: #b9c0e0; }
.chat-tip .tip-who { display: inline-flex; align-items: center; gap: 5px; min-width: 0; cursor: pointer; }
.chat-tip .tip-who b { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; min-width: 0; }
.chat-tip .tip-who:hover b { text-decoration: underline; }
.chat-tip .tip-who img { flex: none; width: 20px; height: 20px; border-radius: 5px; image-rendering: pixelated; }
/* a tip into the rain: the receiver is the rain, not a player */
.chat-tip .tip-who.tip-rain { cursor: default; }
.chat-tip .tip-who.tip-rain:hover b { text-decoration: none; }
.chat-tip .tip-rain .rain-ico { flex: none; width: 20px; height: 20px; padding: 2px; border-radius: 5px; color: #7fb4ff; background: rgba(79, 141, 255, .18); }
.chat-tip .tip-word { flex: none; color: var(--muted); }
.chat-tip .cm-time { margin-left: auto; flex: none; }
.chat-tip .amt { display: inline-flex; align-items: center; gap: 6px; padding: 5px 16px; border-radius: 8px; background: #0f1122; color: #ffc13d; font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .02em; text-shadow: 0 0 10px rgba(255, 176, 46, .35); }
.chat-tip .amt .coin { width: 16px; height: 16px; vertical-align: 0; }
.chat-new { margin: 0 auto 6px; padding: 5px 12px; border-radius: 99px; background: var(--gold); color: #1a1206; font-weight: 700; font-size: 12px; }
.chat-form { display: flex; gap: 6px; padding: 10px 10px 4px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); outline: none; }
.chat-form input:focus { border-color: var(--accent); }
.chat-form .primary { padding: 0 12px; display: grid; place-items: center; }
/* the online dot under chat is gold like the send button */
.chat-foot .dot.on { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.chat-hint { padding: 2px 12px 12px; font-size: 11px; }
.chat-login { margin: 10px; }
.chat-open-btn {
  position: fixed; left: 14px; bottom: 14px; z-index: 12; display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 99px; font-weight: 700; background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .7);
}
.chat-open-btn:hover { border-color: var(--accent); }
body.chat-open .chat-open-btn { display: none; }
@media (max-width: 960px) {
  body.chat-open { padding-left: 0; }
  body.chat-open .header-logo { display: block; } /* chat overlays the page on phones */
  .chat { width: min(88vw, 360px); z-index: 32; box-shadow: 20px 0 60px rgba(0, 0, 0, .6); }
}

/* ---------- Profiles ---------- */
.me-btn { display: flex; align-items: center; gap: 8px; padding: 3px 6px 3px 3px; border-radius: 8px; font-weight: 600; }
.me-btn:hover { background: rgba(255, 255, 255, .05); }
.me-btn .chev { color: var(--muted); flex: none; transition: transform .2s, color .2s; }
.me-btn:hover .chev { color: var(--text); }
.me-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.me-menu button.me-signout, .me-menu button.me-signout .wi { color: var(--red); font-weight: 700; }
.me-menu button.me-signout:hover { background: color-mix(in srgb, var(--red) 14%, transparent); }
[data-profile] { cursor: pointer; }
/* ---------- profile ---------- */
.modal-box.profile-box { width: 420px; padding: 0 22px 22px; overflow: hidden auto; }
.profile-banner {
  height: 104px; margin: 0 -22px; position: relative; overflow: hidden;
  background:
    radial-gradient(140px 70px at 50% 115%, rgba(255, 201, 64, .5), transparent 70%),
    radial-gradient(420px 150px at 50% 0%, #2b2560, transparent 70%),
    linear-gradient(180deg, #1c1a3c, var(--card));
}
.pb-coin { position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b0 0 15%, var(--gold) 45%, var(--gold-2)); box-shadow: 0 6px 20px -4px var(--gold-2); }
.pb-coin.c1 { width: 52px; height: 52px; left: calc(50% - 26px); top: 22px; animation: bob 3s ease-in-out infinite; }
.pb-coin.c2 { width: 24px; height: 24px; left: calc(50% - 68px); top: 48px; animation: bob 3s .6s ease-in-out infinite; }
.pb-coin.c3 { width: 20px; height: 20px; left: calc(50% + 48px); top: 42px; animation: bob 3s 1.2s ease-in-out infinite; }
.pb-spark { position: absolute; color: #ffe9a6; animation: twinkle 2s ease-in-out infinite; }
.pb-spark.s1 { left: 30%; top: 18px; } .pb-spark.s2 { left: 68%; top: 24px; animation-delay: .7s; } .pb-spark.s3 { left: 58%; top: 74px; font-size: 10px; animation-delay: 1.3s; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes twinkle { 50% { opacity: .2; transform: scale(.7); } }
/* head overlaps the banner */
.p-who { display: flex; align-items: flex-end; gap: 14px; margin: -34px 0 16px; position: relative; }
.p-who img { width: 76px; height: 76px; flex: none; border-radius: 14px; image-rendering: pixelated; background: var(--bg2);
  border: 3px solid var(--card); box-shadow: 0 8px 20px rgba(0, 0, 0, .45); }
.p-who-text { min-width: 0; flex: 1; padding-bottom: 4px; }
.prof-name { font-size: 21px; font-weight: 800; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-rank { display: inline-flex; align-items: center; gap: 5px; flex: none; margin-bottom: 6px; padding: 5px 10px; border-radius: 99px;
  font-size: 13px; color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
/* level: badge + progress */
.p-level { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 9%, var(--bg2)), var(--bg2)); border: 1px solid var(--line); }
.p-lvl-icon { width: 46px; height: 46px; flex: none; }
.p-lvl-body { flex: 1; min-width: 0; }
.p-level .ml-top { margin-bottom: 8px; }
.p-level .ml-top b { font-size: 16px; }
.p-level .ml-bar { height: 8px; }
/* stats */
.p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.p-stat { padding: 11px 13px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); min-width: 0; }
.p-k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.p-v { display: flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-v .coin { width: 16px; height: 16px; flex: none; }
/* player id: one quiet line */
.p-idrow { display: flex; align-items: center; gap: 8px; font-size: 11.5px; margin-bottom: 14px; padding: 0 2px; }
.p-id { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.p-idrow .icon-btn { flex: none; }
/* the big tip button */
.p-tipbtn { width: 100%; height: 54px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 14px; font-size: 18px; font-weight: 900; }
.p-tipbtn span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* tip box */
.modal-box.tip-box { width: 380px; display: flex; flex-direction: column; gap: 12px; }
.tip-box .tip-who { display: flex; align-items: center; gap: 12px; padding-right: 30px; }
.tip-box .tip-who img { width: 46px; height: 46px; border-radius: 10px; image-rendering: pixelated; }
.tip-box .tip-who b { font-size: 18px; }
.tip-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tip-presets button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 58px; border-radius: 12px;
  font: 800 20px 'JetBrains Mono', monospace; color: var(--gold); background: var(--bg2); border: 1px solid var(--line); transition: border-color .15s, background .15s, transform .1s; }
.tip-presets button .coin { width: 20px; height: 20px; }
.tip-presets button:hover { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
.tip-presets button:active { transform: scale(.97); }
.tip-presets button.on { background: color-mix(in srgb, var(--gold) 14%, var(--bg2)); border-color: var(--gold); }
.tip-box input { height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text);
  font: 600 15px 'JetBrains Mono', monospace; outline: none; }
.tip-box input:focus { border-color: var(--gold); }
.tip-box .err:empty { display: none; }
.tip-send { height: 50px; font-size: 17px; font-weight: 900; border-radius: 12px; }
.tip-back { align-self: center; font-size: 13px; padding: 4px 10px; }/* rakeback row in the wallet menu: amount on the right, green while there's something to claim */
.wallet-menu .rb-item .rb-amt { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #6dffb0; }
.wallet-menu .rb-item.empty .rb-amt { color: var(--muted); }
/* account settings */
.set-sec { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.set-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.set-head p { margin: 4px 0 0; }
/* settings sections open on click (one at a time) */
details.set-sec { padding: 0; margin-bottom: 10px; transition: border-color .15s; }
details.set-sec:hover, details.set-sec[open] { border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); }
details.set-sec > summary.set-head { list-style: none; cursor: pointer; align-items: center; margin: 0; padding: 14px 16px; user-select: none; }
details.set-sec > summary.set-head::-webkit-details-marker { display: none; }
details.set-sec > summary.set-head b { margin-right: auto; font-size: 15px; }
.set-chev { flex: none; color: var(--muted); transition: transform .2s; }
details.set-sec[open] .set-chev { transform: rotate(180deg); color: var(--gold); }
.set-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.set-body > p { margin: 0; }
.set-state { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--card); color: var(--muted); }
.set-state.on { background: rgba(47, 210, 122, .18); color: #6dffb0; }
.set-actions { display: flex; gap: 8px; }
/* Link Discord: Discord's own blurple, so it's obvious what it is */
.primary.dc-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; background: #5865f2; color: #fff; box-shadow: 0 4px 18px -6px #5865f2; }
.primary.dc-link.off { filter: grayscale(.8) brightness(.7); }
.me-menu button.me-discord .wi { color: #8a94ff; }
.me-menu button.me-discord.linked .wi { color: #6dffb0; }

/* ---------- sign in (IGN -> optional referral -> /pay -> link Discord) ---------- */
.modal-box.auth-box { width: min(420px, 94vw); padding: 0 22px 22px; overflow-x: hidden; }
.auth-art { position: relative; height: 128px; margin: 0 -22px 4px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(55% 85% at 50% 75%, rgba(255, 201, 64, .22), transparent 70%), linear-gradient(180deg, #1d1840, transparent); }
.auth-art img { position: relative; z-index: 1; height: 112px; margin-top: 14px; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .55)); }
.aa-coin { position: absolute; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3b0, #ffc940 45%, #c98a12 80%); box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.aa-coin.a1 { left: 22%; top: 58%; } .aa-coin.a2 { left: 15%; top: 30%; width: 16px; height: 16px; opacity: .75; }
.aa-coin.a3 { left: 30%; top: 78%; width: 18px; height: 18px; } .aa-coin.a4 { right: 22%; top: 55%; }
.aa-coin.a5 { right: 14%; top: 28%; width: 15px; height: 15px; opacity: .7; } .aa-coin.a6 { right: 29%; top: 80%; width: 17px; height: 17px; }
.auth-title { margin: 6px 0 12px; font-size: 22px; font-weight: 800; }
.auth-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 18px; }
.auth-bars span { height: 3px; border-radius: 3px; background: var(--line); transition: background .25s; }
.auth-bars span.on { background: var(--gold); box-shadow: 0 0 10px -2px var(--gold); }
.auth-step { display: flex; flex-direction: column; gap: 10px; }
.auth-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-weight: 600; }
.auth-list li { display: flex; align-items: center; gap: 10px; }
.auth-list b { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg2); border: 1px solid var(--line); font-size: 12px; }
.auth-note { display: flex; align-items: center; gap: 6px; margin: 2px 0 6px; font-size: 13px; color: var(--muted); }
.auth-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.auth-box .auth-input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; }
.auth-box .auth-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 201, 64, .15); }
.auth-box .primary.auth-go { width: 100%; padding: 13px; font-size: 15px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-top: 4px; }
.auth-text { margin: 0 0 4px; line-height: 1.5; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.auth-plain { padding: 12px; border-radius: 10px; background: none; border: 0; color: var(--text); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.auth-plain:hover { background: var(--bg2); }
.auth-alt { padding: 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); color: var(--text); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.auth-alt:hover:not(:disabled) { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.auth-alt:disabled { opacity: .45; cursor: not-allowed; }
.auth-wide { width: 100%; justify-content: center; }
.auth-cmd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 12px 14px 16px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 16px; font-weight: 700; margin-top: 4px; }
.auth-copy { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.auth-copy:hover { border-color: var(--gold); }
.auth-wait { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 14px; padding: 6px 0; }
.auth-bot { margin: 0; text-align: center; color: var(--muted); }
.auth-hint { margin: 2px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
#vsCodeRow { display: flex; flex-direction: column; gap: 8px; }
#vsCodeRow[hidden] { display: none; }
.auth-box .dc-link.auth-wide { padding: 13px; font-size: 15px; font-weight: 800; }
.pin-input { font-family: 'JetBrains Mono', monospace; letter-spacing: .5em; font-size: 20px !important; max-width: 160px; }

/* ---------- Coinflip ---------- */
body[data-view="coinflip"] { --accent: #ffd36b; }
.feed-wrap { max-width: 1280px; margin: 0 auto; padding: 0 28px 40px; }
.cf { max-width: 1280px; margin: 0 auto; padding: 22px 28px 22px; display: flex; flex-direction: column; gap: 16px; }
.cf-explain { margin: -4px 0 14px; }
/* one 48px-tall row: side toggle | amount field with quick chips | create */
.cf-create-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.side-pick {
  display: flex; gap: 4px; padding: 4px; height: 48px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
}
.side-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; min-width: 104px;
  border-radius: 8px; font-weight: 700; font-size: 14px; color: var(--muted);
  transition: background .15s, color .15s, box-shadow .15s;
}
.side-btn:hover { color: var(--text); }
.side-btn.active { color: var(--text); background: var(--card); box-shadow: inset 0 0 0 1px var(--accent); }
.side-btn .cface.sm { width: 26px; height: 26px; font-size: 11px; }
.cf-amount-box {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 6px 0 14px; cursor: text;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s;
}
.cf-amount-box:focus-within { border-color: var(--accent); }
.cf-amount-box .coin { flex: none; }
.cf-amount-box input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; outline: none;
  font-family: 'JetBrains Mono', monospace; font-size: 15px;
}
.cf-quick { display: flex; gap: 4px; flex: none; }
.cf-quick button {
  height: 34px; min-width: 44px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 700;
  color: var(--muted); background: var(--bg2); border: 1px solid var(--line); transition: color .15s, border-color .15s;
}
.cf-quick button:hover { color: var(--text); border-color: #39425a; }
#cfCreate { height: 48px; padding: 0 26px; font-size: 15px; border-radius: 12px; white-space: nowrap; }

/* flat coin face, used in buttons and rows */
.cface {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
  font: 800 15px 'Bricolage Grotesque', sans-serif; color: #7a4300;
  text-shadow: 0 1px 0 rgba(255, 247, 209, .8), 0 -1px 0 rgba(110, 61, 0, .35);
  /* rim: dark edge, bright bevel, then the field */
  box-shadow: inset 0 0 0 2px #8a5208, inset 0 0 0 3.5px #ffe7a0, inset 0 -3px 5px rgba(110, 61, 0, .35), 0 2px 5px rgba(0, 0, 0, .45);
}
.cface.heads { background: radial-gradient(circle at 36% 30%, #fff7d1, #ffc93d 45%, #c27608); }
.cface.tails { background: radial-gradient(circle at 36% 30%, #ffffff, #d6dde9 45%, #8a95aa); color: #454e61;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .85), 0 -1px 0 rgba(58, 66, 82, .35);
  box-shadow: inset 0 0 0 2px #5d677b, inset 0 0 0 3.5px #ffffff, inset 0 -3px 5px rgba(58, 66, 82, .35), 0 2px 5px rgba(0, 0, 0, .45); }
.cface.sm { width: 22px; height: 22px; font-size: 10px; box-shadow: inset 0 0 0 1.5px #8a5208, inset 0 0 0 2.5px #ffe7a0, 0 1px 3px rgba(0, 0, 0, .4); }
.cface.sm.tails { box-shadow: inset 0 0 0 1.5px #5d677b, inset 0 0 0 2.5px #ffffff, 0 1px 3px rgba(0, 0, 0, .4); }
/* once coinflip.js has drawn the toss coin's faces, every small coin uses them (the letter underneath is hidden) */
:root[style*="--coin-heads"] .cface.heads, :root[style*="--coin-heads"] .cface.tails {
  background: var(--coin-heads) center / 100% 100% no-repeat; box-shadow: none; text-shadow: none; color: transparent; font-size: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); }
:root[style*="--coin-heads"] .cface.tails { background-image: var(--coin-tails); }
:root[style*="--coin-heads"] .cf-vs { --cf-gold: var(--coin-heads); --cf-silver: var(--coin-tails); }

.cf-bar { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; padding: 0 4px; }
.cf-bar b { color: var(--text); }
.cf-bar { gap: 12px; flex-wrap: wrap; }
.cf-tabs { display: flex; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.cf-tab { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 700; padding: 8px 14px; border-radius: 9px; cursor: pointer; display: flex; gap: 7px; align-items: center; }
.cf-tab:hover { color: var(--text); }
.cf-tab.active { background: var(--line); color: var(--text); }
.cf-tab b { font-size: 12px; background: rgba(255, 255, 255, .08); padding: 1px 7px; border-radius: 99px; }
.cf-tab.active b { background: var(--gold, #ffc940); color: #1a1206; }
.cf-sum { margin-left: auto; }
.cf-count { font: 800 22px 'Bricolage Grotesque', sans-serif; color: var(--gold, #ffc940); animation: countPop 1s ease-out infinite; }
.cf-filter { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.cf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cf-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr) 110px 216px; align-items: center; gap: 14px;
  min-height: 68px; padding: 12px 14px 12px 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  transition: opacity .3s, border-color .3s;
}
.cf-row.new { animation: slideIn .4s; }
.cf-row.mine { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
.cf-row.done { opacity: .8; }
.cf-player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cf-player.right { justify-content: flex-end; text-align: right; }
.cf-player img { width: 40px; height: 40px; border-radius: 8px; image-rendering: pixelated; }
.cf-player .n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-player .s { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.cf-player.right .s { justify-content: flex-end; }
.cf-player.won .n { color: var(--green); }
.cf-player.lost { opacity: .45; }
.cf-player.vacant { color: var(--muted); font-size: 14px; }
.cf-player .slot { display: block; flex: none; width: 40px; height: 40px; border-radius: 8px; border: 2px dashed var(--line); }
.cf-vs { display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--muted); letter-spacing: .1em; }
/* in-row toss: squashes edge-on and swaps gold/silver each half turn */
.cf-vs .cface.spin { animation: rowspin .9s linear infinite; }
@keyframes rowspin {
  0%, 100% { transform: scaleX(1); background-image: var(--cf-gold); }
  24.9% { transform: scaleX(.08); background-image: var(--cf-gold); }
  25% { transform: scaleX(.08); background-image: var(--cf-silver); }
  50% { transform: scaleX(1); background-image: var(--cf-silver); }
  74.9% { transform: scaleX(.08); background-image: var(--cf-silver); }
  75% { transform: scaleX(.08); background-image: var(--cf-gold); }
}
.cf-vs { --cf-gold: radial-gradient(circle at 36% 30%, #fff7d1, #ffc93d 45%, #c27608); --cf-silver: radial-gradient(circle at 36% 30%, #ffffff, #d6dde9 45%, #8a95aa); }
.cf-amt { text-align: right; }
.cf-amt .a { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--gold); font-size: 17px; }
.cf-amt .t { font-size: 11px; color: var(--muted); }
/* every row's buttons are the same height and fill the same-width column */
.cf-actions { display: flex; gap: 6px; }
.cf-actions button {
  flex: 1 1 0; height: 38px; padding: 0 10px; border-radius: 9px; font-size: 14px; font-weight: 700;
  white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.cf-actions .ghost { color: var(--muted); }
.cf-actions .ghost:hover { color: var(--text); }
.cf-actions .bot-call { flex-grow: 1.3; }
.cf-empty { text-align: center; padding: 40px; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

/* coin toss overlay */
.flip-overlay { position: fixed; inset: 0; z-index: 35; display: flex; align-items: center; justify-content: center; background: rgba(4, 6, 10, .8); animation: fadeIn .2s; padding: 20px; }
.flip-box { position: relative; width: 780px; max-width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 36px 32px 24px; text-align: center; animation: flipBoxIn .25s cubic-bezier(.2,.9,.3,1.2); }
@keyframes flipBoxIn { from { transform: scale(.92); opacity: 0; } }
.flip-players { display: grid; grid-template-columns: 1fr 250px 1fr; align-items: center; gap: 12px; }
.fp { display: flex; flex-direction: column; align-items: center; gap: 6px; transition: opacity .4s, transform .4s; }
.fp img { width: 104px; height: 104px; border-radius: 12px; image-rendering: pixelated; }
.fp .n { font-weight: 800; font-size: 20px; }
.fp .s { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.fp.won { transform: scale(1.08); }
.fp.won img { box-shadow: 0 0 0 3px var(--green), 0 0 30px -4px var(--green); }
.fp.won .n { color: var(--green); }
.fp.lost { opacity: .35; }
.flip-stage { height: 300px; position: relative; perspective: 900px; display: flex; align-items: center; justify-content: center; }
/* the toss wrapper carries the arc, tilt and landing bounce; the coin inside only spins */
.coin-toss { position: relative; z-index: 1; transform-style: preserve-3d; transition: opacity .35s; }
.coin-toss.coin-wait { opacity: .35; animation: coinIdle 2.4s ease-in-out infinite; }
@keyframes coinIdle { 50% { transform: translateY(-8px) rotateY(18deg); } }
.coin3d { --t: 14px; width: 150px; height: 150px; position: relative; transform-style: preserve-3d; }
.coin3d .face { position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; overflow: hidden; }
.coin3d .face svg { display: block; width: 100%; height: 100%; }
.coin3d .face.heads { transform: translateZ(calc(var(--t) / 2)); }
.coin3d .face.tails { transform: rotateX(180deg) translateZ(calc(var(--t) / 2)); }
/* the edge: thin discs stacked through the coin's thickness, ridged like a real coin */
.coin3d .edge { position: absolute; inset: 1px; border-radius: 50%;
  background: repeating-conic-gradient(#8a5a0c 0 3deg, #d9a43a 3deg 6deg); }
.coin3d .edge.mid { background: repeating-conic-gradient(#6d4708 0 3deg, #b98523 3deg 6deg); }
/* shine sweeping across the face once it lands */
.coin3d .face::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.75) 48%, transparent 60%); transform: translateX(-120%); }
.coin3d.landed .face::after { animation: coinShine .9s .1s ease-out; }
@keyframes coinShine { to { transform: translateX(120%); } }
.coin-glow { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(255, 205, 70, .55), rgba(255, 170, 40, .18) 40%, transparent 68%); transform: translateZ(-30px); }
.coin-glow.tails { background: radial-gradient(circle, rgba(220, 232, 255, .5), rgba(160, 180, 220, .16) 40%, transparent 68%); }
.coin-shadow { position: absolute; left: 50%; bottom: 38px; width: 130px; height: 18px; margin-left: -65px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .7), transparent 70%); }
/* landing: a ring and sparks burst out from the coin */
.coin-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 2; --c: #ffc940; }
.coin-burst.tails { --c: #dfe6f3; }
.coin-burst .ring { position: absolute; left: -80px; top: -80px; width: 160px; height: 160px; border-radius: 50%; border: 4px solid var(--c); opacity: 0;
  box-shadow: 0 0 24px var(--c), inset 0 0 18px var(--c); animation: burstRing .7s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes burstRing { 0% { transform: scale(.55); opacity: .95; } 100% { transform: scale(1.9); opacity: 0; } }
.coin-burst .spark { position: absolute; width: 8px; height: 8px; margin: -4px; border-radius: 2px; background: var(--c); box-shadow: 0 0 10px var(--c);
  animation: burstSpark .8s cubic-bezier(.15,.7,.3,1) forwards; }
@keyframes burstSpark { 0% { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(220deg) scale(.2); opacity: 0; } }
.flip-count { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none;
  font: 800 120px/1 'Bricolage Grotesque', sans-serif; color: var(--gold, #ffc940); text-shadow: 0 0 40px rgba(255, 201, 64, .45), 0 6px 0 rgba(0, 0, 0, .35); }
.flip-count[hidden] { display: none; }
.flip-count.pop { animation: countPop 1s ease-out; }
@keyframes countPop { 0% { transform: scale(1.6); opacity: 0; } 18% { transform: scale(1); opacity: 1; } 80% { opacity: 1; } 100% { transform: scale(.85); opacity: .2; } }
.flip-result { min-height: 64px; margin-top: 10px; }
.flip-result .big { font-size: 32px; font-weight: 800; }
.flip-result .prize { font-family: 'JetBrains Mono', monospace; color: var(--green); font-weight: 700; font-size: 20px; }
.flip-meta { font-size: 10.5px; color: var(--muted); word-break: break-all; margin-top: 10px; }

@media (max-width: 960px) {
  .cf-create-row { grid-template-columns: 1fr; }
  .side-btn { flex: 1; }
  .cf-row { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); row-gap: 10px; }
  .cf-amt { grid-column: span 3; text-align: center; }
  .cf-actions { grid-column: span 3; }
  .flip-players { grid-template-columns: 1fr 150px 1fr; }
  .fp img { width: 72px; height: 72px; }
  .coin3d { width: 110px; height: 110px; --t: 11px; }
  .flip-stage { height: 250px; }
  .flip-count { font-size: 88px; }
}

/* Games dropdown */
.top-left { display: flex; align-items: center; gap: 4px; }
.top-left .header-logo { margin-right: 14px; }
.dropdown { position: relative; z-index: 30; }
/* top nav: plain text until you hover; the page you're on keeps a soft box */
.games-btn {
  display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 10px;
  border: 0; background: transparent; color: #9aa3b8; font-weight: 800; letter-spacing: .04em; font-size: 14px;
  transition: background .15s, color .15s;
}
.games-btn svg { opacity: .85; }
.games-btn:hover, .games-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .05); color: var(--text, #fff); }
.games-btn.active { background: rgba(255, 255, 255, .08); color: var(--text, #fff); }
.games-btn.active svg, .games-btn:hover svg { opacity: 1; }
.games-btn .chev { transition: transform .2s; }
.games-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.games-menu { left: 0; right: auto; min-width: 200px; width: 400px; max-width: calc(100vw - 24px); max-height: calc(100vh - 90px); overflow-y: auto; }
.menu-label { padding: 8px 12px 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.games-menu .menu-label { padding: 10px 12px 6px; font-weight: 800; }
.gm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.gm-grid .game-item { min-width: 0; }
.gm-grid .gname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .wallet-menu.games-menu { position: fixed; top: 58px; left: 10px; right: 10px; width: auto; max-width: none; } }
@media (max-width: 330px) { .gm-grid { grid-template-columns: 1fr; } }
.games-menu .game-item.active { background: var(--bg2); }
.game-item .gicon { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.game-item .gicon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.game-item .gicon svg .fill { fill: currentColor; stroke: none; }
.game-item:hover .gicon { background: color-mix(in srgb, var(--c) 22%, transparent); }
.game-item .gname { font-weight: 700; }

/* Wallet */
.wallet { position: relative; display: flex; align-items: stretch; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.wallet-bal { display: flex; align-items: center; gap: 8px; padding: 0 14px; font-weight: 700; font-size: 16px; color: var(--gold); background: none; border: 0; cursor: pointer; font-family: inherit; }
.wallet-bal #balance, .home-bal { transition: filter .2s, opacity .2s; }
.wallet-bal.bal-hidden #balance, body.bal-off .home-bal { filter: blur(7px); opacity: .45; user-select: none; }
.wallet-menu .wi svg { vertical-align: -2px; }
.coin {
  display: inline-block; width: 18px; height: 18px; vertical-align: -3px; flex: none;
  background: url(coin.svg) center / contain no-repeat;
  filter: drop-shadow(0 0 4px rgba(255, 190, 40, .35));
}
.wallet-btn {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 0 11px 11px 0;
  /* the same gold as the chat send button, on every page */
  background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #1a1206; box-shadow: 0 4px 18px -6px var(--gold-2);
  font-weight: 800; letter-spacing: .06em; font-size: 14px; transition: filter .2s;
}
.wallet-btn:hover, .wallet-btn[aria-expanded="true"] { filter: brightness(1.1); }
.wallet-btn .chev { transition: transform .2s; }
.wallet-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.wallet-menu, .me-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 230px; z-index: 20;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 50px -10px rgba(0, 0, 0, .7); animation: menuIn .14s ease-out;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } }
.wallet-menu button, .me-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 8px;
  font-weight: 600; font-size: 15px; text-align: left;
}
.wallet-menu button:hover, .me-menu button:hover { background: var(--bg2); }
.wallet-menu .wi, .me-menu .wi { width: 18px; text-align: center; color: var(--muted); font-size: 18px; }
.wallet-menu hr, .me-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.wallet-summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; margin-bottom: 12px; border-radius: 10px; background: var(--bg); font-size: 18px; font-weight: 700; color: var(--gold); }
.seg.seg3 { grid-template-columns: repeat(3, 1fr); }
#walletModal .quick { margin-top: 8px; }

/* Sign-up verification */
.big-cmd { font-size: 18px; padding: 14px; }
.waiting { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; padding: 12px 14px; border-radius: 10px; background: var(--bg2); }
.waiting.done { color: var(--green); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.me { display: flex; align-items: center; gap: 8px; margin-left: 6px; position: relative; }
.me-menu { right: 0; min-width: 270px; z-index: 30; }
.anon-badge { font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 5px; background: rgba(167, 123, 255, .18); color: #c4a8ff; }
.anon-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.anon-row:hover { background: var(--bg2); }
.anon-text { display: grid; gap: 2px; }
.anon-text .mono { color: var(--text); }
.switch { appearance: none; flex: none; width: 40px; height: 22px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--accent, #ffc940); }
.switch:checked::after { transform: translateX(18px); }
.me img { width: 30px; height: 30px; border-radius: 6px; image-rendering: pixelated; }

/* Pot tabs */
.pot-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  max-width: 1280px; margin: 22px auto 0; padding: 0 28px;
}
.pot-tab {
  text-align: left; padding: 13px 16px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; min-width: 0;
  transition: border-color .2s, background .2s;
}
.pot-tab:hover { border-color: #323a4d; }
.pot-tab.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.pot-tab .pt-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #4a5368; transition: background .3s; }
.pot-tab .pt-dot[data-phase="betting"] { background: var(--green); box-shadow: 0 0 8px color-mix(in srgb, var(--green) 70%, transparent); }
.pot-tab .pt-dot[data-phase="spinning"], .pot-tab .pt-dot[data-phase="result"] { background: var(--gold); box-shadow: 0 0 8px color-mix(in srgb, var(--gold) 70%, transparent); }
.pot-tab .pt-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pot-tab .pt-total { margin-left: auto; font-weight: 700; font-size: 15px; color: var(--muted); }
.pot-tab.active .pt-total { color: var(--text); }

/* Layout */
.layout {
  max-width: 1280px; margin: 0 auto; padding: 22px 28px 40px;
  display: grid; grid-template-columns: 1fr 380px; gap: 22px;
}
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.card h2 { margin: 0; font-size: 17px; }
.side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
/* jackpot side cards: one quiet section-label style */
#viewJackpot .side .card-head { margin-bottom: 12px; align-items: center; }
#viewJackpot .side .card h2 { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
#viewJackpot .side .card-head .mono { font-size: 12px; color: var(--muted); }

/* Wheel */
.stage {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 18px;
  position: relative;
}
.fair-wrap { position: absolute; top: 14px; right: 14px; z-index: 3; }
.fair-btn { padding: 5px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--bg2); border: 1px solid var(--line); }
.fair-btn:hover, .fair-btn[aria-expanded="true"] { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.fair-pop {
  position: absolute; right: 0; top: calc(100% + 6px); width: 300px; padding: 14px; border-radius: 12px;
  background: var(--bg2); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0,0,0,.5); font-size: 13px;
}
.fair-pop .k { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fair-pop .fp-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fair-pop .fp-hash { margin-top: 4px; padding: 8px 10px; border-radius: 8px; background: var(--bg); font-size: 11px; word-break: break-all; color: var(--text); }
.fair-pop p { margin: 10px 0 0; font-size: 12px; line-height: 1.45; }
.spin-mute {
  position: absolute; top: 14px; right: 14px; z-index: 2; padding: 6px 11px; border-radius: 8px;
  font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg2); border: 1px solid var(--line);
}
.spin-mute:hover { color: var(--text); border-color: #39425a; }
.spin-mute.off { color: #ff8fa3; border-color: rgba(255, 107, 139, .4); }
.wheel-wrap { position: relative; width: min(500px, 100%); aspect-ratio: 1; }
#wheel { width: 100%; height: 100%; display: block; }
.pointer {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent;
  border-top: 30px solid var(--accent); filter: drop-shadow(0 4px 6px rgba(0,0,0,.6));
  transition: border-top-color .4s;
}
.wheel-center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none; text-align: center;
}
.wc-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.wc-value { font-size: clamp(26px, 4.4vw, 42px); font-weight: 700; color: var(--text); margin: 2px 0; }
.wc-sub { color: var(--muted); font-size: 14px; min-height: 20px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-sub.count { font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 700; color: var(--text); }
.wc-sub.urgent { color: var(--red); animation: pulse .5s infinite alternate; }
@keyframes pulse { to { transform: scale(1.12); } }
.round-meta { margin-top: 14px; font-size: 11px; color: var(--muted); word-break: break-all; text-align: center; max-width: 560px; }

/* Bet card */
.range { color: var(--muted); font-size: 12px; }
.bet-row { display: flex; gap: 8px; }
.bet-row input, .inline-form input, form label input {
  flex: 1; min-width: 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); outline: none; font-family: 'JetBrains Mono', monospace;
}
.bet-row input:focus, .inline-form input:focus, form label input:focus { border-color: var(--accent); }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.quick button { padding: 7px 0; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.quick button:hover { color: var(--text); }
.bet-hint { margin-top: 10px; font-size: 13px; color: var(--muted); min-height: 18px; }
.bet-hint b { color: var(--green); }
/* jackpot join box: the input and one strong button are the main thing, quick picks stay quiet */
.bet-card .bet-row { flex-direction: column; gap: 10px; }
.bet-card .bet-row input { padding: 15px 16px; font-size: 18px; border-radius: 12px; }
.bet-card #betBtn { width: 100%; padding: 14px; font-size: 16px; border-radius: 12px; }
.bet-card #betBtn:disabled { background: var(--bg2); color: var(--muted); box-shadow: none; opacity: 1; }
.bet-card .quick { margin-top: 10px; gap: 6px; }
.bet-card .quick button {
  padding: 8px 0; font-weight: 700; color: #c9d0de;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)), var(--bg2);
  border: 1px solid rgba(255,255,255,.09); border-radius: 9px;
  box-shadow: 0 2px 0 rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .08s, background .15s, border-color .15s, color .15s, box-shadow .08s;
}
.bet-card .quick button:hover { color: var(--text); border-color: rgba(255,200,60,.45); background: linear-gradient(180deg, rgba(255,200,60,.12), rgba(255,200,60,.03)), var(--bg2); }
.bet-card .quick button:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04); }
.bet-card .quick button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.bet-card .bet-hint { margin-top: 6px; text-align: center; min-height: 0; }
.bet-card .bet-hint:empty { display: none; }

/* Players */
.players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.players li {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px;
  padding: 9px 10px 8px; border-radius: 10px; background: var(--bg2); cursor: pointer;
}
.players li.mine { background: color-mix(in srgb, var(--gold) 9%, var(--bg2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent); }
.players img { width: 32px; height: 32px; border-radius: 6px; image-rendering: pixelated; }
.players .p-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.players .p-you { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #2a1a00; background: var(--gold); padding: 1px 5px; border-radius: 4px; vertical-align: 1px; }
.players .p-amt { font-size: 12px; color: var(--muted); }
.players .p-chance { font-weight: 700; font-size: 14px; font-family: 'JetBrains Mono', monospace; color: var(--pc); }
.players .p-share { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.05); overflow: hidden; }
.players .p-share i { display: block; height: 100%; background: var(--pc); border-radius: 2px; }
.empty, .players li.empty, .feed li.empty { display: block; background: none; color: var(--muted); text-align: center; padding: 18px 0; font-size: 14px; grid-column: 1 / -1; }

/* Feed */
.feed-card { grid-column: 1 / -1; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.feed li { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; background: var(--bg2); }
.feed img { width: 36px; height: 36px; border-radius: 6px; image-rendering: pixelated; }
.feed .f-name { font-weight: 600; }
.feed .f-sub { font-size: 12px; color: var(--muted); }
.feed .f-prize { margin-left: auto; color: var(--green); font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.feed li.new { animation: slideIn .5s; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } }

/* Winner overlay */
.winner-overlay {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(0,0,0,.55), rgba(0,0,0,.85)); animation: fadeIn .3s;
}
@keyframes fadeIn { from { opacity: 0; } }
.winner-box {
  text-align: center; padding: 34px 50px; border-radius: 22px; background: var(--card);
  border: 2px solid var(--accent); box-shadow: 0 0 80px -10px var(--accent);
  animation: pop .5s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.winner-kicker { font-weight: 800; letter-spacing: .3em; color: var(--accent); }
.winner-box img { width: 120px; height: 120px; image-rendering: pixelated; margin: 16px 0 8px; border-radius: 12px; }
.winner-name { font-size: 34px; font-weight: 800; }
.winner-prize { font-size: 30px; font-weight: 700; color: var(--green); margin-top: 4px; }
.winner-chance { color: var(--muted); margin-top: 6px; }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
#confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* Modals */
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(4, 6, 10, .75); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-box {
  position: relative; width: 420px; max-width: 100%; max-height: 90vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px;
}
.modal-box.wide-box { width: 980px; }
.modal-box h2 { margin: 0 0 12px; }
.modal-box h3 { margin: 20px 0 8px; font-size: 15px; }
.close { position: absolute; top: 10px; right: 14px; font-size: 26px; color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.seg button { padding: 8px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.seg button.active { background: var(--card); color: var(--text); }
form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.err { color: var(--red); font-size: 14px; min-height: 20px; margin: 4px 0 8px; }
.inline-form { display: flex; gap: 8px; }
.steps { padding-left: 20px; color: var(--muted); line-height: 1.5; }
.steps li { margin-bottom: 10px; }
.cmd { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; padding: 10px 12px; background: var(--bg); border-radius: 8px; color: var(--gold); }
.requests { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.requests li { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; background: var(--bg2); }
.verify-banner {
  max-width: 1224px; margin: 14px auto 0; padding: 7px 14px; border-radius: 10px; font-size: 13px; color: var(--muted);
  background: var(--bg2); border: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.verify-banner b { color: var(--text); }
.verify-banner button { padding: 4px 10px; font-size: 12px; }
.cmd-inline { color: var(--gold); background: var(--bg); padding: 3px 8px; border-radius: 6px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); vertical-align: middle; }
.dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-pending, .status-processing { color: var(--gold); }
.status-failed { color: var(--red); }
.status-approved { color: var(--green); }
.status-rejected { color: var(--red); }
.req-requested { color: var(--muted); font-weight: 600; }
.req-paid { color: var(--green); font-weight: 600; }
.formula { background: var(--bg); padding: 12px; border-radius: 10px; font-size: 13px; color: var(--gold); white-space: pre-wrap; }
.table-wrap { overflow: auto; }
.history { width: 100%; border-collapse: collapse; font-size: 13px; }
.history th, .history td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.history th { color: var(--muted); font-weight: 500; }
.history .seed { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--muted); word-break: break-all; max-width: 360px; }
.history .ok { color: var(--green); }
.history .bad { color: var(--red); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: var(--card); border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5); animation: fadeIn .2s;
}
.toast.error { border-color: var(--red); color: var(--red); }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .pot-tabs { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; padding: 12px 16px; }
  .me-btn > span { display: none; } /* just the name in the header button, not the menu */
}

/* ---------- Roulette ---------- */
body[data-view="roulette"] { --accent: #ff5d6c; }
.rl { --red: #e8435a; --red-2: #b92e43; --black: #262c3b; --black-2: #1a1f2b; --green: #2fcf7a; --green-2: #1d9c58;
  max-width: 1280px; margin: 0 auto; padding: 22px 28px; display: flex; flex-direction: column; gap: 16px; }
.rl-stage { padding: 18px 0 14px; overflow: hidden; }
.rl-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 18px 14px; flex-wrap: wrap; }
.rl-status { display: flex; align-items: baseline; gap: 12px; }
.rl-phase { font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 7px; background: var(--bg2); border: 1px solid var(--line); }
.rl-phase.betting { color: #7ef0b0; border-color: rgba(47, 207, 122, .35); }
.rl-phase.rolling { color: var(--gold); border-color: rgba(255, 201, 64, .35); }
.rl-timer { font-size: 22px; font-weight: 700; min-width: 70px; }
.rl-top-right { display: flex; align-items: center; gap: 12px; }
.rl-top .spin-mute { position: static; }
.rl-last { display: flex; align-items: center; gap: 8px; }
.rl-last-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rl-history { display: flex; gap: 4px; }
.rl-pill { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 7px; font: 700 12px 'JetBrains Mono', monospace; color: #fff; }
.rl-pill.red { background: var(--red, #e8435a); }
.rl-pill.black { background: #2c3345; color: #c9d1e0; }
.rl-pill.green { background: var(--green); color: #06301a; }
.rl-history .rl-pill:first-child { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px #4a5470; }

.rl-strip-wrap { position: relative; height: 112px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.rl-strip { display: flex; gap: 6px; height: 100%; padding: 6px 0; will-change: transform; }
.rl-tile { flex: none; width: 78px; height: 100%; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.rl-tile b { font-size: 26px; font-weight: 800; line-height: 1; }
.rl-tile span { font-size: 11px; font-weight: 700; opacity: .7; }
.rl-tile.red { background: linear-gradient(180deg, var(--red), var(--red-2)); }
.rl-tile.black { background: linear-gradient(180deg, var(--black), var(--black-2)); color: #c9d1e0; }
.rl-tile.green { background: linear-gradient(180deg, var(--green), var(--green-2)); color: #052a16; }
.rl-marker { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; border-radius: 2px;
  background: var(--gold); box-shadow: 0 0 12px var(--gold), 0 0 2px #fff; }
.rl-marker::before, .rl-marker::after { content: ''; position: absolute; left: 50%; margin-left: -8px; border: 8px solid transparent; }
.rl-marker::before { top: -2px; border-top-color: var(--gold); }
.rl-marker::after { bottom: -2px; border-bottom-color: var(--gold); }
.rl-progress { height: 4px; margin: 14px 18px 0; border-radius: 2px; background: var(--line); overflow: hidden; }
.rl-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), #7ef0b0); }
.rl-stage .round-meta { padding: 10px 18px 0; text-align: left; }

.rl-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rl-amount { flex: 1 1 420px; max-width: 620px; }
.rl-controls { justify-content: space-between; }
.rl-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 11px; color: var(--muted); cursor: help; }
.rl-meta b { color: var(--text); }

.rl-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rl-col { display: flex; flex-direction: column; gap: 8px; transition: opacity .3s; }
.rl-col.lost { opacity: .45; }
.rl-bet {
  height: 64px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-weight: 800; color: #fff; transition: transform .1s, box-shadow .2s;
}
.rl-bet:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.rl-bet:active:not(:disabled) { transform: translateY(1px); }
.rl-bet:disabled { cursor: not-allowed; filter: saturate(.55) brightness(.75); }
.rl-bet-name { font-size: 16px; letter-spacing: .08em; text-transform: uppercase; }
.rl-bet-x { font-size: 12px; opacity: .8; }
.rl-bet.red { background: linear-gradient(180deg, var(--red), var(--red-2)); box-shadow: 0 8px 24px -12px var(--red); }
.rl-bet.black { background: linear-gradient(180deg, #343b4e, var(--black-2)); border: 1px solid #3a4258; }
.rl-bet.green { background: linear-gradient(180deg, var(--green), var(--green-2)); color: #052a16; box-shadow: 0 8px 24px -12px var(--green); }
.rl-col.won .rl-bet { box-shadow: 0 0 0 2px var(--gold), 0 0 30px -6px var(--gold); }
.rl-sum { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.rl-sum > span:first-child { display: flex; align-items: center; gap: 6px; }
.rl-sum b { color: var(--text); }
.rl-sum [data-total] { margin-left: auto; color: var(--gold); font-weight: 700; }
.rl-mine { color: var(--text); font-weight: 700; font-size: 12px; }
.rl-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.rl-dot.red { background: var(--red); }
.rl-dot.black { background: #3a4258; }
.rl-dot.green { background: var(--green); }
.rl-players { list-style: none; margin: 0; padding: 6px; min-height: 220px; max-height: 360px; overflow: auto;
  border-radius: 10px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.rl-players li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.rl-players li:hover { background: rgba(255, 255, 255, .03); }
.rl-players li.mine { background: color-mix(in srgb, var(--gold) 8%, transparent); }
.rl-players img { width: 26px; height: 26px; border-radius: 6px; image-rendering: pixelated; }
.rp-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-amt { font-size: 13px; font-weight: 700; }
.rl-col.won .rp-amt { color: var(--green); }
.rl-players .rp-empty { display: block; text-align: center; color: var(--muted); font-size: 13px; padding: 30px 0; cursor: default; }
.rl-players .rp-empty:hover { background: none; }

@media (max-width: 960px) {
  .rl { padding: 16px; }
  .rl-cols { grid-template-columns: 1fr; }
  .rl-players { min-height: 0; }
}
/* ---------- Horse racing ---------- */
body[data-view="horses"] { --accent: #9be15d; --accent-2: #6fbf2f; --accent-ink: #132506; }
.hr { --green: #2fcf7a; max-width: 1280px; margin: 0 auto; padding: 22px 28px; display: flex; flex-direction: column; gap: 16px; }
.hr-stage { padding: 18px 0 14px; overflow: hidden; }
.hr-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 18px 14px; flex-wrap: wrap; }
.hr-status-wrap { display: flex; align-items: baseline; gap: 14px; }
.hr-status { font-weight: 800; font-size: 18px; }
.hr-status[data-phase="racing"] { color: var(--gold); }
.hr-status[data-phase="result"] { color: var(--accent); }
.hr-history { display: flex; gap: 4px; }
.hr-pill { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 7px;
  font: 800 12px 'JetBrains Mono', monospace; color: #14101c; background: var(--silk); }
.hr-history .hr-pill:first-child { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px #4a5470; }
/* the track: grass border, 5 dirt lanes with chalk lines, a gate on the left and a chequered post on the right */
.hr-track { position: relative; margin: 0 18px; border-radius: 12px; overflow: hidden; padding: 16px 0 12px;
  background: #3f7a2a; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25);
  background-image: linear-gradient(90deg, rgba(0, 0, 0, .08) 50%, transparent 0), linear-gradient(rgba(0, 0, 0, .06) 50%, transparent 0);
  background-size: 16px 16px, 16px 16px; }
.hr-lanes { position: relative; } /* no z-index: gate and finish line paint over the dirt, horses over them */
.hr-lane { position: relative; height: 54px; background: #8a5a36;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, .07) 50%, transparent 0), linear-gradient(rgba(255, 255, 255, .04) 50%, transparent 0);
  background-size: 12px 12px, 12px 12px; border-top: 3px solid rgba(255, 255, 255, .55); }
.hr-lane:last-child { border-bottom: 3px solid rgba(255, 255, 255, .55); }
.hr-lane:nth-child(even) { background-color: #82532f; }
.hr-num { position: absolute; left: 8px; top: 50%; translate: 0 -50%; z-index: 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px;
  background: var(--silk); color: #14101c; font: 800 13px 'JetBrains Mono', monospace; box-shadow: 0 2px 0 rgba(0, 0, 0, .35); z-index: 3; }
.hr-runner { position: absolute; left: 0; bottom: 2px; width: 74px; height: 74px; will-change: transform; z-index: 2; }
.hr-frame { position: absolute; inset: 0; display: block; }
.hr-frame[hidden] { display: none; }
.hr-frame svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .25)); }
.hr-tag { position: absolute; right: 76px; top: 50%; translate: 0 -10%; white-space: nowrap; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .6); opacity: .85; }
.hr-runner.won .hr-tag { color: var(--gold); opacity: 1; }
.hr-gate { position: absolute; left: 44px; top: 16px; bottom: 12px; width: 8px; z-index: 1;
  background: repeating-linear-gradient(180deg, #e9e2d0 0 10px, #b33a3a 10px 20px); box-shadow: 2px 0 0 rgba(0, 0, 0, .25); }
.hr-finish { position: absolute; right: 96px; top: 16px; bottom: 12px; width: 16px; z-index: 1;
  background: conic-gradient(#fff 25%, #1b1b1b 0 50%, #fff 0 75%, #1b1b1b 0) 0 0 / 16px 16px; box-shadow: 0 0 0 2px rgba(0, 0, 0, .3); }
.hr-banner { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 3; display: flex; align-items: center; gap: 14px;
  padding: 12px 20px 12px 12px; border-radius: 14px; background: rgba(14, 8, 26, .9); border: 2px solid var(--gold);
  box-shadow: 0 12px 40px -10px #000; animation: hrPop .35s cubic-bezier(.2, 1.4, .4, 1); }
.hr-banner[hidden] { display: none; }
.hr-banner-art { width: 64px; height: 64px; border-radius: 10px; background: color-mix(in srgb, var(--silk) 25%, #1b1030); }
.hr-banner-art svg { width: 100%; height: 100%; }
.hr-banner small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hr-banner b { font-size: 24px; }
.hr-banner em { font-style: normal; font: 800 22px 'JetBrains Mono', monospace; color: var(--gold); margin-left: 6px; }
@keyframes hrPop { from { scale: .6; opacity: 0; } }
.hr-progress i { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
/* the five horses to bet on */
.hr-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.hr-col { display: flex; flex-direction: column; gap: 8px; transition: opacity .3s; min-width: 0; }
.hr-col.lost { opacity: .45; }
.hr-pick { display: grid; grid-template-columns: 54px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left;
  padding: 10px 12px 10px 8px; border-radius: 12px; cursor: pointer; color: var(--text); font: inherit;
  background: linear-gradient(180deg, color-mix(in srgb, var(--silk) 18%, var(--card)), var(--card)); border: 1px solid color-mix(in srgb, var(--silk) 40%, var(--line));
  border-top: 3px solid var(--silk); transition: transform .12s, filter .12s; }
.hr-pick:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.1); }
.hr-pick:disabled { cursor: not-allowed; filter: saturate(.6) brightness(.8); }
.hr-pick-art { grid-row: 1 / 3; width: 54px; height: 54px; }
.hr-pick-art svg { width: 100%; height: 100%; }
.hr-pick-name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-pick-name small { color: var(--muted); font-weight: 700; margin-right: 5px; }
.hr-pick-x { font: 800 20px 'JetBrains Mono', monospace; color: var(--silk); }
.hr-pick-chance { font-size: 12px; color: var(--muted); }
.hr-col.won .hr-pick { box-shadow: 0 0 0 2px var(--gold), 0 0 30px -6px var(--gold); }
.hr-col.won .rp-amt { color: var(--green); }
.hr-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; background: var(--silk); }
.hr-cols .rl-sum { padding: 8px 10px; font-size: 12px; gap: 6px; flex-wrap: wrap; }
.hr-cols .rl-players { min-height: 160px; }
@media (max-width: 1100px) { .hr-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .hr { padding: 16px; }
  .hr-cols { grid-template-columns: 1fr 1fr; }
  .hr-cols .rl-players { min-height: 0; }
  .hr-lane { height: 44px; }
  .hr-runner { width: 60px; height: 60px; }
  .hr-tag { display: none; }
  .hr-finish { right: 62px; }
}
@media (max-width: 460px) { .hr-cols { grid-template-columns: 1fr; } }

/* ---------- Daily race ---------- */
body[data-view="race"] { --accent: #ffc940; }
.race-btn.active { border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); color: var(--gold); }
.race { max-width: 1280px; margin: 0 auto; padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; }
.race-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.race-head h1 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 26px; }
.race-head h1 svg { color: var(--gold); }
.race-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.race-stat { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; padding: 10px 16px; min-width: 120px;
  border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.race-stat .k { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.race-stat .v { font-size: 17px; font-weight: 700; }
#racePool { color: var(--gold); }
.race-sub { margin: -8px 0 0; font-size: 14px; }

.race-podium { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: end; margin-top: 8px; }
.race-card { --c: #8a93a8; position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 14px 0; border-radius: 16px; cursor: pointer; overflow: hidden; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, var(--card)), var(--card) 60%);
  border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); transition: transform .15s; }
.race-card:hover { transform: translateY(-2px); }
.race-card.p1 { --c: #ffc940; padding-top: 30px; box-shadow: 0 20px 60px -30px #ffc940; }
.race-card.p2 { --c: #c9d4ec; padding-top: 24px; }
.race-card.p3 { --c: #e0915a; padding-top: 24px; }
.race-card.p4, .race-card.p5 { --c: #7d8aa8; }
.race-card.mine { outline: 2px solid var(--gold); outline-offset: -2px; }
.rc-place { font-size: 22px; font-weight: 800; color: var(--c); }
.race-card.p1 .rc-place { font-size: 28px; }
.race-card img, .rc-empty { width: 56px; height: 56px; border-radius: 10px; image-rendering: pixelated; }
.race-card.p1 img, .race-card.p1 .rc-empty { width: 70px; height: 70px; box-shadow: 0 0 0 3px #ffc940, 0 0 30px -4px #ffc940; }
.rc-empty { display: grid; place-items: center; background: var(--bg2); border: 2px dashed var(--line); color: var(--muted); font-weight: 800; font-size: 22px; }
.rc-name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-wager { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--bg); font-size: 13px; font-weight: 700; }
.rc-wager .coin, .rc-prize .coin, .rr-wager .coin { width: 14px; height: 14px; vertical-align: -2px; }
.rc-prize { align-self: stretch; margin: 6px -14px 0; padding: 12px 10px 14px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; background: rgba(0, 0, 0, .15); }
.rc-prize .k { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rc-prize .v { display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--gold); font-weight: 700; font-size: 16px; }
.race-card.p1 .rc-prize .v { font-size: 19px; }

.race-table { display: flex; flex-direction: column; gap: 6px; }
.race-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); cursor: pointer; }
.race-row:hover:not(.race-th) { border-color: #39425a; }
.race-row.mine { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); background: color-mix(in srgb, var(--gold) 6%, var(--card)); }
.race-th { background: none; border: 0; padding: 0 16px; cursor: default; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.race-th span:last-child { text-align: right; }
.race-row > .mono:first-child { color: var(--muted); font-weight: 700; }
.rr-player { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.rr-player span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-player img { width: 28px; height: 28px; border-radius: 6px; image-rendering: pixelated; }
.rr-wager { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; background: var(--bg); font-size: 13px; font-weight: 700; }
.race-none { text-align: center; padding: 26px; border: 1px dashed var(--line); border-radius: 12px; }
.race-last-list { display: flex; flex-wrap: wrap; gap: 8px; }
.rl-win { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); cursor: pointer; }
.rl-win img { width: 24px; height: 24px; border-radius: 5px; image-rendering: pixelated; }
.rl-win .n { font-weight: 600; }
.rl-win .p { color: var(--green); font-weight: 700; }

@media (max-width: 960px) {
  .race { padding: 18px 16px; }
  .race-podium { grid-template-columns: 1fr 1fr; }
  .race-card.p1 { grid-column: 1 / -1; order: -1; }
}
/* Last winner box (jackpot side panel) */
.last-winner .card-head { margin-bottom: 12px; }
.lw-player { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.lw-player img { width: 28px; height: 28px; border-radius: 6px; image-rendering: pixelated; flex: none; }
.lw-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lw-prize { margin-left: auto; color: var(--green); font-weight: 700; font-size: 14px; white-space: nowrap; }
.lw-chance { color: var(--muted); font-size: 12px; white-space: nowrap; }
.lw-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.lw-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.lw-stats .k { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lw-stats .v { font-weight: 700; font-size: 15px; }
/* ---------- Home ---------- */
.home { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: stretch; max-width: 1280px; margin: 0 auto; padding: 22px 28px; }
.home-me { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 26px 22px 22px; text-align: center; }
/* pixel-art scene behind the skin; two canvases cross-fade when it changes */
.hm-scene { position: absolute; inset: 0 0 auto; height: 360px; pointer-events: none; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.hm-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; opacity: 0; transition: opacity 1.6s ease; }
.hm-scene canvas.on { opacity: 1; }
.hm-scene video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hm-scene video[hidden] { display: none; }
.hm-scene.has-video canvas { display: none; }
/* Account settings: player background picker */
.pbg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pbg-opt { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; padding: 0; border: 2px solid var(--line); background: #10131b; cursor: pointer; }
.pbg-opt video, .pbg-opt canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.pbg-opt span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 5px; font-size: 11.5px; font-weight: 800; text-align: left; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
.pbg-opt:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.pbg-opt.active { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.pbg-opt.active span::after { content: ' ✓'; color: var(--accent); }
.hm-skin3d { position: relative; width: 240px; height: 300px; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .55)); }
.hm-skin3d[hidden], .hm-skin[hidden] { display: none; }
.hm-skin3d, .hm-skin { cursor: pointer; }
.hm-skin.hm-hop { animation: hmHop .7s ease-out; }
.hm-skin.hm-spin { animation: hmSpin .9s ease-in-out; }
@keyframes hmHop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-40px); } }
@keyframes hmSpin { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
.hm-skin { position: relative; height: 300px; width: auto; image-rendering: pixelated; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .55)); animation: hmFloat 4s ease-in-out infinite; }
@keyframes hmFloat { 50% { transform: translateY(-8px); } }
.hm-info { position: relative; width: 100%; margin-top: 14px; }
.hm-hi { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hm-name { margin-top: 4px; font-size: 26px; font-weight: 800; word-break: break-all; }
.hm-stats { display: grid; gap: 6px; margin: 16px 0; }
.hm-stats > div { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.hm-stats .k { font-size: 12px; font-weight: 700; color: var(--muted); }
.hm-stats .v { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.hm-stats p { margin: 0; font-size: 14px; line-height: 1.5; }
.hm-stats > .hm-level { display: block; text-align: left; padding: 11px 12px 10px; }
.hm-level .ml-bar { height: 8px; }
.hm-lvl-sub { margin-top: 6px; font-size: 11.5px; font-weight: 600; }
.hm-actions { display: grid; gap: 8px; }
.hm-actions button { width: 100%; }
.home-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; container-type: inline-size; }
.hg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hg-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; font-weight: 800; }
.hg-search { display: flex; align-items: center; gap: 8px; width: 260px; max-width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); }
.hg-search:focus-within { border-color: #4a5470; }
.hg-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text, #fff); font: inherit; font-size: 14px; }
.home-games { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.home-games .game-card { aspect-ratio: 1 / 1; }
/* cards with their own finished artwork (title included) */
.gc-full { background: #0b0f1c; }
.gc-full::after { display: none; }
/* the covers carry their own frame, so they sit at full size and only zoom a little on hover */
.gc-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.game-card.gc-full:hover .gc-cover { transform: scale(1.04); }
.game-card.gc-full { border: 0; background: none; box-shadow: 0 10px 24px -14px #000; }
.gc-full .gc-body { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@container (min-width: 1300px) { .home-games { grid-template-columns: repeat(5, minmax(0, 240px)); } }
@container (max-width: 700px) { .home-games { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (max-width: 520px) { .home-games { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.game-card {
  --ac: #3ee0d0; --bg-a: #0f5f5a; --bg-b: #0a1a22;
  position: relative; overflow: hidden; display: block; aspect-ratio: 4 / 5; padding: 0; cursor: pointer; color: #fff; font: inherit;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, .07);
  background: radial-gradient(120% 75% at 50% 38%, var(--bg-a), var(--bg-b) 72%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 24px -14px #000;
  transition: transform .18s, box-shadow .18s;
}
.game-card::after { content: ''; position: absolute; inset: auto 0 0; height: 42%; background: linear-gradient(transparent, rgba(6, 8, 14, .85)); pointer-events: none; }
.game-card:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 0 0 2px var(--ac), 0 18px 34px -14px var(--ac); }
.gc-coinflip { --ac: #ffd36b; --bg-a: #a8631a; --bg-b: #24130a; }
.gc-roulette { --ac: #ff5d6c; --bg-a: #b2303f; --bg-b: #26090f; }
.gc-race { --ac: #b48cff; --bg-a: #5a3aa8; --bg-b: #140c2a; }
.gc-art { position: absolute; inset: 6% 0 24%; display: grid; place-items: center; }
.gc-icon { position: absolute; inset: 0; margin: auto; height: 100%; width: auto; max-width: 86%; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .5)); transition: transform .25s; }
.game-card:hover .gc-icon { transform: scale(1.07) translateY(-4px); }
.gc-body { position: absolute; inset: auto 0 0; z-index: 1; padding: 0 10px 18px; text-align: center; }
.gc-name { font-size: 20px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.home-games .empty { grid-column: 1 / -1; padding: 30px; text-align: center; }
body[data-view="home"] { --accent: #3ee0d0; }
@media (max-width: 1100px) { .home { grid-template-columns: 300px minmax(0, 1fr); } .hm-skin { height: 240px; } }
@media (max-width: 960px) { .home { grid-template-columns: 1fr; } .hm-skin { height: 220px; } }
@media (max-width: 560px) { .gc-name { font-size: 15px; } }
.game-card[hidden] { display: none; }
/* not playable yet: no lift, no click */
.gc-soon { cursor: default; --ac: #6b8cff; }
.gc-soon:hover { transform: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 24px -14px #000; }
.game-card.gc-soon:hover .gc-cover { transform: scale(1.05); }
/* the "next game" placeholder: purple like the logo, a glowing question mark and a light sweep */
.gc-mystery { --bg-a: #5b2bb0; --bg-b: #140a2b; border-style: dashed; border-color: rgba(190, 140, 255, .35); }
.gc-mystery::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .09) 50%, transparent 65%); background-size: 250% 100%; animation: gcSweep 3.2s ease-in-out infinite; }
@keyframes gcSweep { from { background-position: 130% 0; } to { background-position: -30% 0; } }
.gc-q { font-size: clamp(64px, 9vw, 110px); font-weight: 900; line-height: 1; color: #e9d8ff;
  text-shadow: 0 0 18px rgba(190, 120, 255, .9), 0 0 44px rgba(150, 80, 255, .6), 0 6px 0 #3a1a78; animation: gcFloat 2.6s ease-in-out infinite; }
@keyframes gcFloat { 50% { transform: translateY(-8px) rotate(-4deg); } }
.gc-sub { margin-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(225, 205, 255, .7); }
@media (prefers-reduced-motion: reduce) { .gc-mystery::before, .gc-q { animation: none; } }
.gc-soon-tag {
  position: absolute; top: 10px; right: 10px; z-index: 2; padding: 4px 9px; border-radius: 999px;
  background: rgba(8, 10, 20, .78); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(4px);
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff;
}

/* ---------- small screens: keep the header inside the page ---------- */
html, body { max-width: 100%; overflow-x: clip; }
.top-left, .top-actions { flex-wrap: wrap; min-width: 0; }
#userActions { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
@media (max-width: 760px) {
  .top { padding: 10px 12px; gap: 8px; }
  .top-left { gap: 8px; }
  .top-actions { gap: 6px; }
  #userActions { gap: 6px; }
  .header-logo img { height: 24px; }
  .games-btn { padding: 8px 10px; }
  .top-left .lbl, .wallet-btn .lbl { display: none; }
  .wallet-bal { padding: 0 10px; font-size: 14px; }
  .wallet-btn { padding: 8px 10px; }
  #meName, .anon-badge { display: none; }
  .me { margin-left: 0; }
  .home { padding: 14px 12px; }
  .home-me { padding: 18px 14px; }
  .hm-name { font-size: 22px; }
  .hg-search { width: 100%; }
  .cf { padding: 14px 12px; }
  .side-btn { min-width: 0; }
  .cf-create-row > *, .cf-amount-box, .side-pick { min-width: 0; }
  #cfCreate { padding-left: 12px; padding-right: 12px; }
  .cf-quick { min-width: 0; flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; }
  .cf-quick button { min-width: 0; padding: 0 8px; }
  .rl-top { padding: 0 12px 12px; }
  .rl-top-right { flex-wrap: wrap; min-width: 0; }
  .rl-last { min-width: 0; max-width: 100%; }
  .rl-history { min-width: 0; overflow: hidden; }
}

/* ---------- Footer ---------- */
/* the open page fills the screen so the footer stays at the bottom on short pages (e.g. a quiet battles lobby) */
body { display: flex; flex-direction: column; }
body > [id^="view"]:not([hidden]) { flex: 1 0 auto; }
/* ---------- Home: live bets ---------- */
.live-bets { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; margin-top: 10px; min-width: 0; }
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lb-head h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 20px; font-weight: 800; }
.lb-head h2 svg { width: 20px; height: 20px; fill: var(--gold); filter: drop-shadow(0 0 6px rgba(255, 201, 64, .5)); }
.lb-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.lb-tabs button { height: 30px; padding: 0 12px; border-radius: 7px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.lb-tabs button:hover { color: var(--text); }
.lb-tabs button.on { background: rgba(255, 255, 255, .07); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.lb-card { padding: 6px 8px; overflow-x: auto; }
.lb-table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 13.5px; min-width: 640px; }
.lb-table th { text-align: left; padding: 8px 14px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lb-table td { padding: 9px 14px; background: rgba(255, 255, 255, .025); white-space: nowrap; }
.lb-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .045); }
.lb-table td:first-child { border-radius: 9px 0 0 9px; }
.lb-table td:last-child { border-radius: 0 9px 9px 0; }
.lb-table .r { text-align: right; }
.lb-table td.mono { font-weight: 700; }
.lb-table .coin { width: 15px; height: 15px; margin-right: 5px; vertical-align: -2px; }
.lb-game { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; }
.lb-game svg { width: 17px; height: 17px; fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-game svg .fill { fill: var(--c); stroke: none; }
.lb-player { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.lb-player img { width: 24px; height: 24px; border-radius: 5px; image-rendering: pixelated; flex: none; }
.lb-player .cm-name { display: inline-flex; align-items: center; font-weight: 700; }
.lb-up { color: var(--green); }
.lb-empty td { text-align: center; padding: 22px; color: var(--muted); border-radius: 9px; }
.lb-in td { animation: lbIn .5s ease-out; }
@keyframes lbIn { from { opacity: 0; transform: translateY(-8px); background: rgba(255, 201, 64, .12); } }
@media (max-width: 700px) { .lb-table .lb-time { display: none; } }
.site-foot { margin-top: 40px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg2) 70%, transparent); }
.foot-inner { max-width: 1280px; margin: 0 auto; padding: 26px 28px 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.foot-logo img { height: 34px; width: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.foot-fair { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); font-weight: 700; font-size: 14px; color: var(--text); }
.foot-fair svg { color: var(--green); }
.foot-fair:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.foot-note { flex-basis: 100%; margin: 0; font-size: 12px; }
@media (max-width: 760px) { .foot-inner { padding: 20px 14px 80px; } .foot-links { margin-left: 0; } }
/* ---------- chat replies ---------- */
.chat-msg .cm-tools { position: absolute; right: 6px; top: 4px; display: none; gap: 2px; }
.chat-msg:hover .cm-tools { display: flex; }
.chat-msg .cm-tools .cm-del { position: static; display: grid; }
.cm-tools button { display: grid; place-items: center; width: 24px; height: 22px; border-radius: 6px; font-size: 14px; color: var(--muted); background: var(--card); border: 1px solid var(--line); }
.cm-tools button:hover { color: var(--text); border-color: #4a5470; }
.cm-quote {
  display: flex; align-items: center; gap: 5px; max-width: 100%; margin: 3px 0 2px; padding: 3px 8px 3px 6px; cursor: pointer;
  border-left: 2px solid #4a5470; border-radius: 0 6px 6px 0; background: rgba(255, 255, 255, .04);
  font-size: 12px; color: var(--muted); text-align: left;
}
.cm-quote:hover { background: rgba(255, 255, 255, .07); }
.cm-quote img { width: 14px; height: 14px; border-radius: 3px; image-rendering: pixelated; flex: none; }
.cm-quote b { color: #c9d1e0; flex: none; }
.cm-quote span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-msg.to-me { background: color-mix(in srgb, var(--accent) 9%, transparent); box-shadow: inset 2px 0 0 var(--accent); }
.chat-msg.to-me .cm-quote { border-left-color: var(--accent); }
.chat-msg.flash { animation: chatFlash 1.2s ease; }
/* staff messages get their own background: owner red, admin orange, mod blue */
.chat-msg.staff-owner { background: linear-gradient(90deg, rgba(232, 67, 90, .2), rgba(232, 67, 90, .07)); box-shadow: inset 3px 0 0 #e8435a; }
.chat-msg.staff-admin { background: linear-gradient(90deg, rgba(255, 154, 60, .18), rgba(255, 154, 60, .06)); box-shadow: inset 3px 0 0 #ff9a3c; }
.chat-msg.staff-mod { background: linear-gradient(90deg, rgba(79, 141, 255, .18), rgba(79, 141, 255, .06)); box-shadow: inset 3px 0 0 #4f8dff; }
.chat-msg.staff-owner { border-color: rgba(232, 67, 90, .3); }
.chat-msg.staff-admin { border-color: rgba(255, 154, 60, .28); }
.chat-msg.staff-mod { border-color: rgba(79, 141, 255, .28); }
.chat-msg.to-me { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.badge-mod { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; padding: 1px 5px; border-radius: 4px; background: #4f8dff; color: #fff; }
.cm-tools button.cm-mute { width: auto; padding: 0 6px; font-size: 11px; font-weight: 700; }
.cm-mutes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 0 2px; font-size: 12px; color: var(--muted); }
.cm-mutes button { padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--text); background: var(--card); border: 1px solid var(--line); }
.cm-mutes button:hover { border-color: #4f8dff; }
.cm-mutes button[data-mpurge] { color: #ff8a96; }
@keyframes chatFlash { 0%, 40% { background: color-mix(in srgb, var(--gold) 22%, transparent); } }
.chat-replying { display: flex; align-items: center; gap: 8px; margin: 0 10px; padding: 7px 8px 7px 10px; border-radius: 10px 10px 0 0; border: 1px solid var(--line); border-bottom: 0; background: var(--bg); font-size: 12px; }
.chat-replying[hidden] { display: none; }
.chat-replying:not([hidden]) + .chat-form { border-top: 0; padding-top: 0; }
.chat-replying:not([hidden]) + .chat-form input { border-top-left-radius: 0; border-top-right-radius: 0; }
.cr-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cr-label { color: var(--muted); }
.cr-label b { color: var(--accent); }
.cr-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c9d1e0; }
.cr-x { width: 24px; height: 24px; border-radius: 6px; font-size: 18px; line-height: 1; color: var(--muted); }
.cr-x:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
/* ---------- no visible scrollbars (scrolling still works) ---------- */
html, .chat-list { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, .chat-list::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* ---------- cosmetics ---------- */
/* chat tags: a slowly sliding gradient, a soft glow in the tag's own colour, a glint that sweeps across
   every few seconds and a little twinkle in the corner. --pd staggers each tag's timing. */
.pfx { position: relative; overflow: hidden; isolation: isolate; display: inline-block; flex: none; white-space: nowrap; margin-right: 5px; padding: 1px 6px; border-radius: 5px; vertical-align: 1px;
  background: var(--pbg); background-size: 200% 100%; color: var(--pfg); font-size: 9.5px; font-weight: 900; letter-spacing: .08em; line-height: 1.5; text-decoration: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -1px 0 rgba(0, 0, 0, .22), 0 0 0 1px rgba(255, 255, 255, .1),
    0 0 10px -2px color-mix(in srgb, var(--pglow, transparent) 70%, transparent);
  animation: pfxFlow 6s linear infinite; animation-delay: calc(var(--pd, 0s) * -1); }
.pfx::after { content: ''; position: absolute; top: -2px; bottom: -2px; left: -70%; width: 45%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .8), transparent); transform: skewX(-20deg);
  animation: pfxGlint 4.5s ease-in-out infinite; animation-delay: var(--pd, 0s); }
.pfx::before { content: ''; position: absolute; top: 1px; right: 2px; width: 4px; height: 4px; z-index: 2; pointer-events: none; opacity: 0;
  background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 2px #fff); animation: pfxTwinkle 4.5s ease-in-out infinite; animation-delay: var(--pd, 0s); }
@keyframes pfxFlow { to { background-position: -200% 0; } }
@keyframes pfxGlint { 0%, 62% { left: -70%; } 85%, 100% { left: 130%; } }
@keyframes pfxTwinkle { 0%, 78% { opacity: 0; transform: scale(.3) rotate(0); } 86% { opacity: 1; transform: scale(1.3) rotate(45deg); } 96%, 100% { opacity: 0; transform: scale(.3) rotate(90deg); } }
@media (prefers-reduced-motion: reduce) { .pfx, .pfx::after, .pfx::before { animation: none; } .pfx::after, .pfx::before { display: none; } }
.pfx.sfx-tag { margin-right: 0; margin-left: 5px; }
.nm-grad { background: var(--g); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; }
.nm-anim { animation: nmShift 3s linear infinite; }
@keyframes nmShift { to { background-position: -200% 0; } }
.hm-name .pfx { font-size: 12px; vertical-align: 4px; }
#pName .pfx { font-size: 11px; vertical-align: 3px; }
/* ---------- Affiliate (reuses the shop page layout) ---------- */
body[data-view="affiliate"] { --accent: #b48cff; }
.aff { gap: 22px; }
.aff .k { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.aff-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
.aff-card, .aff-earn { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.aff-card p, .aff-earn p, .aff-make p { margin: 0; }
.aff-code-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.aff-field { display: flex; flex-direction: column; gap: 3px; }
.aff-field b { font-size: 26px; font-weight: 900; letter-spacing: .04em; color: #d9c4ff; text-shadow: 0 0 18px rgba(180, 140, 255, .45); }
.aff-link { display: flex; gap: 8px; }
.aff-link input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); font-family: 'JetBrains Mono', monospace; font-size: 13px; outline: none; }
.aff-link input:focus { border-color: #8f6bff; }
.aff-make { display: flex; flex-direction: column; gap: 8px; }
.aff-earn { background: radial-gradient(120% 100% at 100% 0%, rgba(255, 201, 64, .14), transparent 60%), var(--card); border-color: rgba(255, 201, 64, .3); }
.aff-big { display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 32px; font-weight: 900; color: var(--gold); text-shadow: 0 0 18px rgba(255, 201, 64, .4); }
.aff-big .coin { width: 26px; height: 26px; }
.aff-promo { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.aff-promo p { margin: 0; }
.aff-promo canvas { width: 100%; max-width: 720px; height: auto; aspect-ratio: 1200 / 630; border-radius: 14px; align-self: center; }
.aff-promo-btns { display: flex; gap: 8px; justify-content: center; }
.aff-split { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.aff-split-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.aff-split p { margin: 0; }
.aff-split-opts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.aff-split-opts button { display: flex; flex-direction: column; gap: 6px; padding: 12px 8px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); color: inherit; cursor: pointer; font: inherit; text-align: center; transition: border-color .15s, background .15s; }
.aff-split-opts button:hover { border-color: rgba(180, 140, 255, .5); }
.aff-split-opts button.on { border-color: #b48cff; background: rgba(180, 140, 255, .14); box-shadow: 0 0 0 1px #b48cff inset, 0 0 18px rgba(180, 140, 255, .25); }
.aff-split-opts .row { display: flex; justify-content: space-between; gap: 4px; font-size: 12px; }
.aff-split-opts .row b { font-family: 'JetBrains Mono', monospace; font-size: 14px; }
.aff-split-opts .you b { color: var(--gold); }
.aff-split-opts .them b { color: #d9c4ff; }
.aff-split-bar { height: 5px; border-radius: 3px; background: #b48cff; overflow: hidden; }
.aff-split-bar i { display: block; height: 100%; background: var(--gold); }
@media (max-width: 700px) { .aff-split-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.aff-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.aff-stats .card { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.aff-stats b { display: flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace; font-size: 20px; font-weight: 800; }
.aff-stats .coin { width: 16px; height: 16px; }
.aff .gold { color: var(--gold); }
.aff-table { padding: 4px 0; overflow-x: auto; }
.aff-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.aff-table th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 16px; }
.aff-table td { padding: 10px 16px; border-top: 1px solid var(--line); }
.aff-empty, .aff-login { padding: 26px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.aff-login h2 { margin: 0; font-size: 19px; }
.aff-login p { margin: 0 0 6px; }
.aff-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.aff-how > div { display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px; padding: 14px; border-radius: 12px; border: 1px dashed rgba(180, 140, 255, .3); }
.aff-how i { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 900;
  background: linear-gradient(135deg, #8f5bff, #c08bff); color: #fff; box-shadow: 0 4px 14px -4px #8f5bff; }
.aff-how span { font-size: 13px; }
@media (max-width: 860px) {
  .aff-grid, .aff-how { grid-template-columns: 1fr; }
  .aff-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ---------- Shop ---------- */
body[data-view="shop"] { --accent: #ff8fc8; }
.shop { max-width: 1180px; margin: 0 auto; padding: 26px 28px 40px; display: flex; flex-direction: column; gap: 30px; }
/* header: title on the left, a live preview of your chat line on the right */
.shop-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 0; background: none; border: 0; box-shadow: none; }
.sh-text h1 { margin: 0 0 4px; font-size: 26px; font-weight: 900; letter-spacing: -.01em; }
.sh-text p { margin: 0; font-size: 14px; }
.sh-preview { width: min(380px, 100%); padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.sh-preview-label { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.sh-msg { cursor: default; margin: 0; }
.sh-msg .cm-name { cursor: default; }
.sh-try { margin-top: 6px; font-size: 12px; }
/* sections */
.shop-sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.shop-sec-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.sh-off { margin-left: auto; padding: 0; height: auto; font-size: 12px; font-weight: 700; color: var(--muted); background: none; border: 0; }
.sh-off:hover { color: var(--red, #ff6b7d); background: none; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
/* item cards: the preview is the card; name and price sit quietly underneath */
.shop-item { display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 12px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); transition: border-color .15s, background .15s; }
.shop-item:hover { border-color: #3e4760; }
.shop-item.trying { border-color: var(--accent); }
.shop-item.equipped { border-color: color-mix(in srgb, var(--green) 50%, var(--line)); }
.si-preview { display: grid; place-items: center; min-height: 52px; padding: 8px; border-radius: 8px; background: rgba(0, 0, 0, .18);
  font-weight: 700; font-size: 15px; text-align: center; overflow-wrap: anywhere; }
.si-preview .pfx { font-size: 11px; }
.si-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; }
.si-name { font-weight: 700; font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-item.equipped .si-name, .shop-item.owned .si-name { color: var(--text); }
.si-own { display: none; } /* "Equip" already says you own it */
.si-btn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 7px; flex: none;
  font-weight: 800; font-size: 12px; border: 1px solid transparent; background: rgba(255, 255, 255, .05); }
.si-btn.buy { font-family: 'JetBrains Mono', monospace; color: var(--gold); }
.si-btn .coin { width: 13px; height: 13px; }
.si-btn.buy:hover { border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.si-btn.confirm { background: var(--gold); color: #1a1206; }
.si-btn.equip { color: var(--accent); }
.si-btn.equip:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.si-btn.on { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.si-btn.on:hover::after { content: ' ×'; }
@media (max-width: 760px) {
  .shop { padding: 16px 12px 30px; gap: 22px; }
  .sh-preview { width: 100%; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .si-foot { flex-direction: column; align-items: stretch; }
  .si-btn { justify-content: center; }
}
/* ---------- Vault ---------- */
.vault-box { width: min(440px, 94vw); max-height: 92vh; overflow-y: auto; scrollbar-width: none; padding-top: 10px; }
.vault-box::-webkit-scrollbar { display: none; }
.vault-art { display: grid; place-items: center; margin: -6px -24px 0; height: 120px;
  background: radial-gradient(60% 90% at 50% 70%, rgba(255, 201, 64, .18), transparent 70%); }
.vault-art img { height: 110px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); }
.vault-box h2 { margin: 4px 0 14px; }
.vault-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.vault-totals > div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.vault-totals .k { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.vault-totals .v { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 16px; }
.vault-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 14px; }
.vault-seg button { height: 34px; border-radius: 7px; font-weight: 800; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.vault-seg button:hover { color: var(--text); }
.vault-seg button.active { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px #3a4260; }
.v-label { display: block; margin: 4px 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.v-amount { display: flex; align-items: center; height: 46px; padding-left: 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin-bottom: 10px; }
.v-amount:focus-within { border-color: var(--accent); }
.v-amount input { flex: 1; min-width: 0; height: 100%; margin-left: 8px; border: 0; background: none; outline: none; font-family: 'JetBrains Mono', monospace; font-size: 15px; }
.v-amount button { height: 100%; padding: 0 14px; border-left: 1px solid var(--line); font-weight: 800; font-size: 13px; color: var(--muted); }
.v-amount button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.v-note { margin-bottom: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45;
  background: rgba(255, 201, 64, .07); border: 1px solid rgba(255, 201, 64, .35); }
.v-note b { color: var(--gold); }
.v-note.lock { background: rgba(167, 123, 255, .08); border-color: rgba(167, 123, 255, .4); }
.v-note.lock b { color: #c4a8ff; }
.v-go { width: 100%; height: 44px; margin-bottom: 16px; border-radius: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
  background: var(--gold); color: #1a1206; transition: filter .15s; }
.v-go:hover:not(:disabled) { filter: brightness(1.08); }
.v-go:disabled { background: var(--card); color: var(--muted); cursor: not-allowed; border: 1px solid var(--line); }
.v-lock { background: #2c2f5e; color: #fff; border: 1px solid #4a4f8e; }
.v-lock.armed { background: #8a6cff; border-color: #8a6cff; }
.v-lockinfo { margin: -6px 0 10px; }
.v-history { list-style: none; margin: 0; padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.v-history li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--bg); }
.v-history li + li { border-top: 1px solid var(--line); }
.v-history li > div { display: flex; flex-direction: column; }
.v-history .mono { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.v-more { display: block; margin: 10px auto 0; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
/* jackpot: Old / New spin animation switch (top-left of the wheel area) */
/* jackpot wheel animation picker, in the name menu */
.menu-seg { cursor: default; }
.menu-seg b { white-space: nowrap; }
.menu-seg:hover { background: none; }
.chat-foot { display: flex; align-items: center; gap: 4px; padding: 4px 14px 12px; }

/* custom tag card */
/* your own tag: twice as wide, preview beside the text box and colours */
.si-custom { cursor: default; grid-column: span 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.si-custom .si-foot { grid-column: 1 / -1; }
@media (max-width: 520px) { .si-custom { grid-column: auto; grid-template-columns: 1fr; } }
.ct-ctrl { display: flex; flex-direction: column; gap: 8px; }
.ct-ctrl input { height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); outline: none;
  font: 800 15px 'JetBrains Mono', monospace; letter-spacing: .12em; text-transform: uppercase; }
.ct-ctrl input:focus { border-color: var(--accent); }
.ct-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-sw { width: 22px; height: 22px; border-radius: 6px; background: var(--c); border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.ct-sw:hover { transform: scale(1.1); }
.ct-sw.on { border-color: #fff; }
/* shop: custom tag builder */
.tag-builder { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.tg-step { display: flex; gap: 12px; align-items: flex-start; }
.tg-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--bg2); border: 1px solid var(--line); color: var(--gold); }
.tg-input { width: 180px; height: 52px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); outline: none;
  color: var(--text); font-size: 26px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; margin-left: 36px; }
.tg-input:focus { border-color: var(--gold); }
.tg-grads { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-left: 36px; }
.tg-sw { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px 9px; border-radius: 12px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--line); transition: border-color .15s, transform .1s; }
.tg-sw:hover { border-color: #3e4760; transform: translateY(-1px); }
.tg-sw.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 6px 18px -8px rgba(255, 201, 64, .5); }
.tg-chip { min-width: 40px; text-align: center; padding: 3px 9px; border-radius: 6px; background: var(--g); color: var(--f);
  font-size: 13px; font-weight: 900; letter-spacing: .08em; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 6px -2px rgba(0,0,0,.6); }
.tg-gname { font-size: 12px; font-weight: 700; color: var(--muted); }
.tg-sw.on .tg-gname { color: var(--text); }
.tg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.tg-foot .si-btn { height: 40px; padding: 0 18px; font-size: 14px; }
.tg-input[readonly] { opacity: .7; cursor: default; }
.tg-input[readonly]:focus { border-color: var(--line); }
/* your tags, one tab each, plus "+ New tag" while you have room */
.tg-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.tg-tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; transition: border-color .15s; }
.tg-tab:hover { border-color: #3e4760; }
.tg-tab.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.tg-new { border-style: dashed; }
.tg-worn { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--green); }
.tg-count { margin-left: auto; }
@media (max-width: 600px) { .tg-input, .tg-grads { margin-left: 0; } }

/* ---------- Levels ---------- */
.lvl { display: inline-flex; align-items: center; gap: 3px; align-self: center; font: 700 12px/1 'JetBrains Mono', monospace; color: var(--muted); }
.lvl-img { width: 22px; height: 22px; object-fit: contain; flex: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.lvl-img.big { width: 30px; height: 30px; }
.ml-name { display: inline-flex; align-items: center; gap: 6px; }
.chat-level .lvl-img { margin: 0 -2px 0 2px; vertical-align: middle; }
.cm-top .lvl { margin-right: 1px; }
/* smaller in chat so the badge doesn't crowd the name */
.cm-top .lvl-img { width: 17px; height: 17px; }
.chat-level .lvl-img.big { width: 20px; height: 20px; }
#meLvlBadge .lvl { margin-right: 6px; }
#shLvl .lvl { margin-right: 6px; }
/* level box at the top of the profile menu, and on profiles */
.me-level { padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.me-level:empty { display: none; }
.ml-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12px; margin-bottom: 7px; white-space: nowrap; }
.ml-top b { font-size: 13px; }
.ml-top .ml-left { font-size: 12.5px; font-weight: 600; color: #c3cbdc; }
.ml-top .ml-left b { font-size: inherit; font-weight: 800; color: #fff; }
.ml-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.ml-bar i { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .4s; }
/* "X reached Level 20" line in chat */
.chat-level { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; font-size: 13px;
  background: color-mix(in srgb, var(--gold) 7%, var(--card)); border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line)); }
.chat-level img { width: 24px; height: 24px; border-radius: 5px; image-rendering: pixelated; cursor: pointer; }
.chat-level .cm-name { font-weight: 700; padding: 0; }
.chat-level b { color: var(--gold); }
/* ===== full-screen "Deposit of X credited" ===== */
.dep-done { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 201, 64, .18), rgba(8, 10, 16, .88) 60%); backdrop-filter: blur(6px);
  animation: depFade .25s ease-out; }
.dep-done[hidden] { display: none; }
.dep-done.out { animation: depFade .25s ease-in reverse forwards; }
@keyframes depFade { from { opacity: 0; } }
.dep-done-box { position: relative; width: min(440px, 100%); text-align: center; padding: 34px 28px 26px; border-radius: 22px;
  background: linear-gradient(180deg, #1d2232, #141824); border: 1px solid rgba(255, 201, 64, .35);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6), 0 0 60px rgba(255, 201, 64, .15); animation: depPop .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes depPop { from { transform: scale(.7) translateY(20px); opacity: 0; } }
.dep-done-tick { width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; color: #0b0d14;
  background: var(--green); box-shadow: 0 0 0 8px rgba(54, 227, 154, .15), 0 0 30px rgba(54, 227, 154, .5); }
.dep-done h2 { margin: 0 0 8px; font-size: 26px; line-height: 1.25; }
.dep-done-amt { color: var(--gold); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; vertical-align: bottom; }
.dep-done-amt .coin { width: .85em; height: .85em; vertical-align: 0; margin-left: 2px; }
.dep-done p { margin: 0 0 20px; font-size: 14px; }
.dep-done .primary { min-width: 160px; padding: 12px 22px; font-size: 15px; }
.dep-done-coins { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.dep-done-coins .coin { position: absolute; top: -30px; width: 26px; height: 26px; animation: depCoin 1.6s ease-in forwards; }
.dep-done-coins .coin:nth-child(1) { left: 18%; animation-delay: .1s; }
.dep-done-coins .coin:nth-child(2) { left: 50%; animation-delay: .35s; }
.dep-done-coins .coin:nth-child(3) { left: 78%; animation-delay: .2s; }
@keyframes depCoin { to { transform: translateY(330px) rotate(260deg); opacity: 0; } }
/* ---------- maintenance mode ---------- */
/* players: everything but this page, modals (staff log in) and toasts is hidden */
body.maint-locked > :not(.maint-screen):not(.modal):not(.toast):not(script) { display: none !important; }
.maint-screen { position: fixed; inset: 0; z-index: 38; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 30%, #1a2034 0%, var(--bg) 70%); }
.maint-card { max-width: 520px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.maint-logo { width: min(320px, 80vw); height: auto; image-rendering: pixelated; margin-bottom: 8px; }
.maint-card h1 { margin: 0; font-size: clamp(32px, 6vw, 48px); font-weight: 800; color: var(--gold); }
.maint-msg { margin: 0; font-size: 18px; font-weight: 700; color: var(--text); }
.maint-msg:empty { display: none; }
.maint-banner { position: sticky; top: 0; z-index: 60; padding: 8px 14px; text-align: center; font-weight: 700; font-size: 14px; background: var(--red); color: #1a0508; }
.maint-banner a { color: inherit; text-decoration: underline; }
.wd-paused { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; font-weight: 700; background: rgba(255, 93, 108, .1); border: 1px solid rgba(255, 93, 108, .45); color: #ffb3bb; }
