:root {
  --bg: #0c1229;
  --bg2: #0f1734;
  --panel: #111a3c;
  --panel2: #141f46;
  --line: rgba(212, 175, 106, .16);
  --line2: rgba(212, 175, 106, .32);
  --gold: #6f82ff;
  --gold-hi: #e1e6ff;
  --gold-lo: #3446d6;
  --ivory: #e1e6ff;
  --mute: #8d8472;
  --felt: #0b2a21;
  --felt2: #0f3a2d;
  --ruby: #b3262d;
  --ruby-hi: #e0525a;
  --win: #66d493;
  --lose: #e0605c;
  --serif: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 62px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ivory); font-family: var(--sans); overscroll-behavior: none; }
body { overflow: hidden; user-select: none; -webkit-user-select: none; font-size: 15px; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.num { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
svg { display: block; }

#app { position: fixed; inset: 0; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background:
  radial-gradient(120% 60% at 50% -10%, rgba(111,130,255,.09), transparent 60%),
  radial-gradient(80% 50% at 100% 100%, rgba(179,38,45,.06), transparent 60%), var(--bg); }
#app::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5; z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .9  0 0 0 0 .7  0 0 0 .05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* ---------- top bar ---------- */
#top { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; border-bottom: 1px solid var(--line); background: linear-gradient(#0d142f, rgba(12,17,44,.85)); backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; }
.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wm-a { font-family: var(--serif); font-weight: 700; letter-spacing: .32em; font-size: 20px; background: linear-gradient(180deg, #e1e6ff, #6f82ff 60%, #3446d6); -webkit-background-clip: text; background-clip: text; color: transparent; margin-right: -.32em; }
.wm-b { font-size: 7.5px; letter-spacing: .5em; color: var(--mute); margin-top: 5px; font-weight: 600; }
.logo-row { display: flex; align-items: center; gap: 11px; }
.top-r { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--mute); border: 1px solid var(--line); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:active { transform: scale(.94); }
.bal { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 8px; border-radius: 20px; border: 1px solid var(--line2); background: linear-gradient(#131e45, #101835); box-shadow: inset 0 1px 0 rgba(225,230,255,.12); font-weight: 700; font-size: 15px; color: var(--gold-hi); }
.bal-ico { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e1e6ff, #6f82ff 55%, #3446d6); box-shadow: inset 0 0 0 2px rgba(5,8,24,.35), inset 0 0 0 4px rgba(255,255,255,.18); position: relative; }
.bal-ico::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; border: 1.5px solid rgba(60,36,6,.6); }
.bal.bump { animation: bump .5s ease; }
@keyframes bump { 40% { transform: scale(1.07); filter: brightness(1.3); } }
.bal.up #balVal { color: var(--win); }
.bal.down #balVal { color: var(--lose); }

/* ---------- ticker ---------- */
.ticker { position: relative; z-index: 4; display: flex; gap: 22px; overflow: hidden; white-space: nowrap; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--mute); background: rgba(5,8,24,.35); }
.ticker-in { display: flex; gap: 28px; padding-left: 16px; animation: scroll 40s linear infinite; }
.ticker b { color: var(--gold-hi); font-weight: 600; }
.ticker em { font-style: normal; color: var(--win); font-weight: 700; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- view ---------- */
#view { position: relative; z-index: 1; flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: calc(var(--tab-h) + var(--safe-b) + 18px); scrollbar-width: none; }
#view::-webkit-scrollbar { display: none; }
.screen { animation: enter .18s ease-out; }
@keyframes enter { from { opacity: 0; } }
.pad { padding: 0 16px; }

#tabs { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: flex; background: linear-gradient(rgba(11,16,40,.7), #0c1229 40%); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
#tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--mute); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; transition: color .2s; }
#tabs a i { display: block; width: 22px; height: 22px; }
#tabs a i svg { width: 22px; height: 22px; }
#tabs a.on { color: var(--gold-hi); }
#tabs a.on i { filter: drop-shadow(0 0 6px rgba(111,130,255,.55)); }
body.ingame #tabs { display: none; }
body.ingame #view { padding-bottom: 24px; }

/* ---------- lobby ---------- */
.hero { margin: 14px 16px 0; padding: 22px 18px 20px; border-radius: 20px; position: relative; overflow: hidden; border: 1px solid var(--line2);
  background: radial-gradient(90% 120% at 85% 0%, rgba(111,130,255,.22), transparent 55%), linear-gradient(135deg, #131e43, #0e1631 70%); }
.hero::after { content: ''; position: absolute; right: -30px; top: -30px; width: 190px; height: 190px; border-radius: 50%; border: 1px solid var(--line2); box-shadow: 0 0 0 18px rgba(111,130,255,.04), 0 0 0 36px rgba(111,130,255,.025); }
.hero .eyebrow { font-size: 10px; letter-spacing: .4em; color: var(--gold); font-weight: 700; }
.hero h1 { font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1.05; margin: 10px 0 6px; letter-spacing: .01em; }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--gold-hi); }
.hero p { margin: 0; color: var(--mute); font-size: 13px; max-width: 230px; line-height: 1.45; }
.hero .logo-big { position: absolute; right: 14px; top: 16px; opacity: .95; z-index: 1; filter: drop-shadow(0 6px 18px rgba(111,130,255,.3)); }
.bonus { display: flex; align-items: center; gap: 12px; margin: 12px 16px 0; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line2); background: rgba(111,130,255,.05); }
.bonus .gi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg,#6f82ff,#3446d6); color: #131e43; }
.bonus .gi svg { width: 20px; height: 20px; }
.bonus b { display: block; font-size: 13.5px; }
.bonus small { color: var(--mute); font-size: 11.5px; }
.bonus .btn { margin-left: auto; }

.sec-h { display: flex; align-items: baseline; justify-content: space-between; padding: 22px 16px 10px; }
.sec-h h2 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .02em; }
.sec-h span { font-size: 10px; letter-spacing: .28em; color: var(--mute); text-transform: uppercase; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }
.tile { position: relative; aspect-ratio: 1 / 1.08; border-radius: 18px; overflow: hidden; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid var(--line); text-align: left;
  background: radial-gradient(100% 80% at 50% 0%, var(--tc, rgba(111,130,255,.14)), transparent 70%), linear-gradient(180deg, #111b3e, #0e152f); transition: transform .18s, border-color .2s; }
.tile:active { transform: scale(.975); border-color: var(--line2); }
.tile .art { position: absolute; top: 10px; left: 0; right: 0; display: grid; place-items: center; transition: transform .4s; }
.tile:hover .art { transform: scale(1.06) rotate(-2deg); }
.tile h3 { margin: 0; font-family: var(--serif); font-size: 17px; font-weight: 700; letter-spacing: .03em; position: relative; }
.tile p { margin: 2px 0 0; color: var(--mute); font-size: 11px; letter-spacing: .04em; position: relative; }
.tile .tag { position: absolute; top: 10px; right: 10px; font-size: 8.5px; letter-spacing: .18em; font-weight: 700; padding: 3px 7px; border-radius: 20px; color: #131e43; background: linear-gradient(135deg, #e1e6ff, #6f82ff); z-index: 2; }
.tile .tag.live { background: linear-gradient(135deg, #ff8a8a, #b3262d); color: #fff; display: flex; align-items: center; gap: 4px; }
.tile .tag.live::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.tile.wide { grid-column: span 2; aspect-ratio: auto; height: 132px; flex-direction: column; }
.tile.wide .art { right: 8px; left: auto; top: 10px; }
.tile.wide h3 { font-size: 22px; }

.foot { text-align: center; color: var(--mute); font-size: 10.5px; letter-spacing: .08em; padding: 26px 30px 10px; line-height: 1.7; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 12px; font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; transition: transform .12s, filter .2s, opacity .2s; position: relative; overflow: hidden; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.gold { color: #131e43; background: linear-gradient(180deg, #e1e6ff, #6f82ff 55%, #3446d6); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 6px 18px rgba(111,130,255,.22); }
.btn.gold::after { content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-20deg); animation: sheen 3.6s infinite; }
@keyframes sheen { 0%, 60% { left: -80%; } 100% { left: 160%; } }
.btn.ghost { border: 1px solid var(--line2); color: var(--gold-hi); background: rgba(111,130,255,.06); }
.btn.ruby { color: #fff; background: linear-gradient(180deg, #e0525a, #a3262d 60%, #7d1219); box-shadow: 0 6px 18px rgba(179,38,45,.3); }
.btn.green { color: #05221a; background: linear-gradient(180deg, #7ee8b0, #3fb47e 60%, #208759); box-shadow: 0 6px 18px rgba(63,180,126,.25); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 12px; border-radius: 10px; }
.btn.big { height: 54px; font-size: 16px; border-radius: 14px; width: 100%; letter-spacing: .1em; }

/* ---------- game shell ---------- */
.g-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px 6px; }
.g-head .back { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--gold-hi); }
.g-head h1 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.g-head .sub { margin-left: auto; font-size: 10px; letter-spacing: .2em; color: var(--mute); text-transform: uppercase; text-align: right; }
.stage { margin: 8px 16px 0; border-radius: 20px; border: 1px solid var(--line2); position: relative; overflow: hidden; background: linear-gradient(180deg, #101938, #0d142d); box-shadow: 0 20px 50px -20px rgba(0,0,0,.8), inset 0 1px 0 rgba(225,230,255,.07); }
.stage.felt { background: radial-gradient(120% 90% at 50% 0%, #14503c, #0b2a21 60%, #07181a); border-color: rgba(111,130,255,.35); }
.panel { margin: 12px 16px 0; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel2), var(--panel)); }
.row { display: flex; align-items: center; gap: 10px; }
.row.sb { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 10px; }
.lbl { font-size: 10px; letter-spacing: .22em; color: var(--mute); text-transform: uppercase; font-weight: 600; margin-bottom: 6px; display: block; }
.stat { flex: 1; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.28); border: 1px solid var(--line); }
.stat b { display: block; font-size: 17px; font-weight: 700; font-family: var(--serif); color: var(--gold-hi); }
.stat span { font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.win { color: var(--win) !important; } .lose { color: var(--lose) !important; }

/* bet control */
.bet { display: flex; align-items: stretch; height: 46px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(0,0,0,.35); overflow: hidden; }
.bet input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; text-align: center; font-weight: 700; font-size: 17px; font-family: var(--serif); color: var(--gold-hi); user-select: text; -webkit-user-select: text; }
.bet button { width: 44px; display: grid; place-items: center; color: var(--gold); border-left: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.bet button:first-child { border-left: 0; border-right: 1px solid var(--line); }
.bet button:active { background: rgba(111,130,255,.12); }
.bet.dis { opacity: .5; pointer-events: none; }
.quick { display: flex; gap: 6px; margin-top: 8px; }
.quick button { flex: 1; height: 30px; border-radius: 8px; border: 1px solid var(--line); font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--mute); }
.quick button:active { color: var(--gold-hi); border-color: var(--line2); }

/* segmented */
.seg { display: flex; padding: 3px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--line); gap: 2px; }
.seg button { flex: 1; height: 34px; border-radius: 9px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); transition: .2s; }
.seg button.on { color: #131e43; background: linear-gradient(180deg, #e1e6ff, #6f82ff); box-shadow: 0 2px 10px rgba(111,130,255,.25); }
.seg.dis { opacity: .5; pointer-events: none; }

/* slider */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--gold) var(--p, 50%), rgba(255,255,255,.1) var(--p, 50%)); outline: 0; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e1e6ff, #6f82ff 60%, #3446d6); border: 2px solid #0c1229; box-shadow: 0 0 0 1px var(--gold), 0 2px 8px rgba(0,0,0,.5); }
.range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #6f82ff; border: 2px solid #0c1229; }

/* result chip */
.res { text-align: center; font-family: var(--serif); font-weight: 700; font-size: 26px; min-height: 34px; }
.hist { display: flex; gap: 6px; overflow: hidden; padding: 0 16px; margin-top: 10px; flex-wrap: nowrap; }
.pill { flex: none; padding: 4px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; border: 1px solid var(--line); background: rgba(0,0,0,.3); font-variant-numeric: tabular-nums; }
.pill.w { color: var(--win); border-color: rgba(102,212,147,.3); } .pill.l { color: var(--lose); border-color: rgba(224,96,92,.25); } .pill.g { color: var(--gold-hi); border-color: var(--line2); }

/* ---------- cards ---------- */
.pcard { width: 56px; height: 80px; border-radius: 7px; position: relative; flex: none; box-shadow: 0 6px 14px rgba(0,0,0,.45); transform-style: preserve-3d; }
.pcard.face { background: linear-gradient(160deg, #fffaf0, #efe4cb); border: 1px solid #c9b88f; color: #111b3e; }
.pcard.face.red { color: #b3262d; }
.pcard .pc-corner { position: absolute; top: 4px; left: 5px; display: flex; flex-direction: column; align-items: center; font-family: var(--serif); font-size: 15px; line-height: 1; gap: 1px; }
.pcard .pc-corner.br { top: auto; left: auto; bottom: 4px; right: 5px; transform: rotate(180deg); }
.pcard .pc-mid { position: absolute; inset: 0; display: grid; place-items: center; opacity: .95; }
.pcard.back { background: linear-gradient(145deg, #141f46, #0e152f); border: 1px solid var(--gold-lo); }
.pcard.back .back-in { position: absolute; inset: 4px; border-radius: 4px; border: 1px solid rgba(111,130,255,.4); display: grid; place-items: center; background: repeating-linear-gradient(45deg, rgba(111,130,255,.08) 0 2px, transparent 2px 6px); }
.pcard.deal { animation: deal .45s cubic-bezier(.2,.9,.3,1.1) backwards; }
@keyframes deal { from { opacity: 0; transform: translate(80px, -120px) rotate(18deg) scale(.7); } }
.pcard.flip { animation: flip .5s ease; }
@keyframes flip { from { transform: rotateY(90deg); } }
.pcard.sm { width: 42px; height: 60px; border-radius: 5px; } .pcard.sm .pc-corner { font-size: 11px; top: 3px; left: 4px; } .pcard.sm .pc-mid svg { width: 22px; height: 22px; }

/* ---------- chips ---------- */
.chip { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; position: relative; font-weight: 800; font-size: 11px; color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.5); background: radial-gradient(circle, var(--cc) 0 50%, transparent 51%), repeating-conic-gradient(#f4ece0 0 15deg, var(--cc) 15deg 30deg); border: 2px solid var(--cc); }
.chip i { font-style: normal; position: relative; z-index: 1; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.chip.gold { --cc: #3446d6; } .chip.ruby { --cc: #a3262d; } .chip.green { --cc: #1f7a56; } .chip.blue { --cc: #2d5d8a; } .chip.black { --cc: #131d42; }

/* ---------- toasts / fx ---------- */
#toasts { position: fixed; z-index: 100; top: calc(64px + env(safe-area-inset-top, 0px)); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: 12px; background: #131e43; border: 1px solid var(--line2); font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.6); animation: tin .3s ease, tout .3s ease 2.4s forwards; max-width: 86%; text-align: center; }
.toast.err { border-color: rgba(224,96,92,.5); color: #ffb3b0; } .toast.ok { border-color: rgba(102,212,147,.4); color: #b9f0d0; }
@keyframes tin { from { opacity: 0; transform: translateY(-10px); } } @keyframes tout { to { opacity: 0; transform: translateY(-8px); } }
#fx { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.bigwin { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, rgba(11,16,40,.55), rgba(11,16,40,.85)); animation: fin .3s; pointer-events: auto; }
.bigwin.out { animation: fout .5s forwards; }
.bigwin canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bigwin .bw { position: relative; text-align: center; animation: pop .7s cubic-bezier(.2,1.4,.4,1); }
.bigwin .t1 { font-size: 11px; letter-spacing: .6em; color: var(--gold); font-weight: 700; margin-right: -.6em; }
.bigwin .t2 { font-family: var(--serif); font-weight: 800; font-size: 54px; line-height: 1.05; background: linear-gradient(180deg, #e1e6ff, #6f82ff 55%, #3446d6); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 24px rgba(111,130,255,.5)); margin: 6px 0; }
.bigwin .t3 { font-family: var(--serif); font-size: 34px; font-weight: 700; color: var(--ivory); }
.bigwin .t4 { margin-top: 6px; color: var(--mute); font-size: 12px; letter-spacing: .2em; }
@keyframes fin { from { opacity: 0; } } @keyframes fout { to { opacity: 0; } } @keyframes pop { from { transform: scale(.4); opacity: 0; } }
.float { position: absolute; font-family: var(--serif); font-weight: 800; font-size: 22px; pointer-events: none; animation: floatUp 1.4s ease forwards; z-index: 5; text-shadow: 0 2px 12px rgba(0,0,0,.7); }
@keyframes floatUp { from { opacity: 0; transform: translateY(10px) scale(.8); } 15% { opacity: 1; transform: translateY(0) scale(1.1); } to { opacity: 0; transform: translateY(-50px); } }
.shake { animation: shake .45s; } @keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }

/* ---------- leaderboard / profile ---------- */
.lb-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; margin: 0 16px 8px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.lb-row.me { border-color: var(--line2); background: rgba(111,130,255,.08); }
.lb-rank { width: 26px; text-align: center; font-family: var(--serif); font-weight: 700; font-size: 17px; color: var(--mute); }
.lb-row:nth-child(1) .lb-rank { color: #e1e6ff; } .lb-row:nth-child(2) .lb-rank { color: #cfd3d6; } .lb-row:nth-child(3) .lb-rank { color: #d08a52; }
.avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 16px; color: #131e43; background: linear-gradient(135deg, #e1e6ff, #3446d6); background-size: cover; background-position: center; border: 1.5px solid var(--gold); overflow: hidden; }
.lb-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-name small { display: block; color: var(--mute); font-size: 10.5px; font-weight: 500; letter-spacing: .1em; }
.lb-val { font-family: var(--serif); font-weight: 700; color: var(--gold-hi); font-size: 16px; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 18px 16px 6px; }
.pod { flex: 1; text-align: center; padding: 14px 6px 12px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(111,130,255,.08), transparent); }
.pod.p1 { padding-top: 22px; padding-bottom: 20px; border-color: var(--line2); background: linear-gradient(180deg, rgba(111,130,255,.18), transparent); }
.pod .avatar { margin: 0 auto 8px; width: 46px; height: 46px; }
.pod.p1 .avatar { width: 56px; height: 56px; box-shadow: 0 0 24px rgba(111,130,255,.4); }
.pod b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .lb-val { font-size: 14px; display: block; margin-top: 2px; }
.pod .crown { font-family: var(--serif); font-size: 12px; color: var(--gold); letter-spacing: .3em; }
.tabs2 { display: flex; gap: 8px; padding: 14px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.tabs2 button { flex: none; padding: 8px 14px; border-radius: 20px; border: 1px solid var(--line); color: var(--mute); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tabs2 button.on { color: #131e43; background: linear-gradient(180deg, #e1e6ff, #6f82ff); border-color: transparent; }
.prof-head { display: flex; flex-direction: column; align-items: center; padding: 26px 16px 10px; text-align: center; }
.prof-head .avatar { width: 84px; height: 84px; font-size: 34px; box-shadow: 0 0 0 5px rgba(111,130,255,.1), 0 0 40px rgba(111,130,255,.25); }
.prof-head h2 { margin: 14px 0 2px; font-family: var(--serif); font-size: 26px; }
.lvl { width: 100%; max-width: 280px; margin-top: 10px; }
.lvl .bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 6px; }
.lvl .bar i { display: block; height: 100%; background: linear-gradient(90deg, #3446d6, #e1e6ff); border-radius: 3px; }
.lvl small { color: var(--mute); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.hrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.hrow:last-child { border: 0; }
.hrow .g { flex: 1; text-transform: capitalize; font-weight: 600; } .hrow .m { color: var(--mute); font-size: 11.5px; }
.empty { text-align: center; color: var(--mute); padding: 20px; font-size: 13px; }

.splash { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg); transition: opacity .6s; }
.splash.out { opacity: 0; pointer-events: none; }
.splash .sp { text-align: center; animation: pop .9s cubic-bezier(.2,1.2,.3,1); }
.splash .sp svg { margin: 0 auto 18px; filter: drop-shadow(0 0 30px rgba(111,130,255,.35)); }
.splash .wm-a { font-size: 34px; } .splash .wm-b { font-size: 9px; margin-top: 8px; text-align: center; }
.splash .wordmark { align-items: center; }

/* ---------- Playdom brand ---------- */
.wm-a { font-family: var(--sans); font-weight: 800; letter-spacing: -.03em; font-size: 24px; background: none; -webkit-background-clip: initial; background-clip: initial; color: #fff; margin: 0; }
.wm-b { display: none; }
.splash .wm-a { font-size: 44px; }
.logo-row { gap: 9px; }
#app { background: radial-gradient(120% 60% at 50% -10%, rgba(80,100,220,.22), transparent 60%), radial-gradient(80% 50% at 100% 100%, rgba(111,130,255,.05), transparent 60%), var(--bg); }
