:root {
  --bg: #0d0b10; --bg2: #16131b; --card: #1d1923; --line: #2b2632; --text: #f4f1f6; --mute: #a59cae; --dim: #6f6778;
  --hot: #ff4f7b; --warm: #ff7a59; --grad: linear-gradient(135deg, #ff7a59, #ff3d8b); --gold: #ffc85a; --ok: #39d98a; --bad: #ff5c5c;
  --r: 16px; --nav: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); min-height: 100%; }
body { overscroll-behavior-y: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { display: block; }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--nav) + var(--safe-b) + 12px); }
.boot { height: 100vh; display: grid; place-items: center; animation: pulse 1.4s infinite ease-in-out; }
@keyframes pulse { 50% { opacity: .5; transform: scale(.94); } }

/* header */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
.top h1 { font-size: 22px; margin: 0; letter-spacing: -.02em; flex: 1; }
.brand { display: flex; align-items: center; gap: 8px; flex: 1; font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.brand img { width: 28px; height: 28px; }
.coins { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 5px 10px 5px 6px; font-weight: 700; font-size: 14px; }
.coin { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe7a3, var(--gold) 55%, #d99a1e); box-shadow: inset 0 -1px 0 #0003; flex: none; }
.av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--grad); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; color: #fff; overflow: hidden; }
.av.lg { width: 88px; height: 88px; font-size: 32px; }
.av.sm { width: 28px; height: 28px; font-size: 12px; }

/* tabs & chips */
.chips { display: flex; gap: 8px; padding: 4px 16px 12px; overflow-x: auto; scrollbar-width: none; }
.chip { padding: 8px 14px; border-radius: 99px; background: var(--card); color: var(--mute); font-weight: 600; font-size: 14px; white-space: nowrap; border: 1px solid var(--line); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.sec { display: flex; align-items: center; gap: 8px; padding: 8px 16px; font-weight: 700; font-size: 17px; }
.sec .n { color: var(--dim); font-weight: 600; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 0 4px #ff4f7b33; }

/* stream grid */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.card { position: relative; aspect-ratio: 3/4; border-radius: var(--r); overflow: hidden; background: var(--card); }
.card .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; font-weight: 800; background: var(--grad); color: #fff8; }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #0006 0, transparent 30%, transparent 55%, #000c 100%); }
.card .meta { position: absolute; z-index: 1; left: 10px; right: 10px; bottom: 10px; }
.card .meta b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta small { color: #fffc; font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badges { position: absolute; z-index: 1; top: 8px; left: 8px; right: 8px; display: flex; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; font-size: 11px; font-weight: 800; background: #0008; backdrop-filter: blur(6px); }
.badge.live { background: var(--hot); }
.badge.lock { margin-left: auto; background: #000a; color: var(--gold); }
.empty { text-align: center; color: var(--mute); padding: 32px 24px; }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }

/* creators row */
.row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 16px 16px; scrollbar-width: none; }
.person { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 68px; flex: none; text-align: center; }
.person .av { width: 64px; height: 64px; font-size: 22px; }
.person.live .av { outline: 3px solid var(--hot); outline-offset: 2px; }
.person small { font-size: 12px; color: var(--mute); width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 700; background: var(--card); border: 1px solid var(--line); }
.btn.pri { background: var(--grad); border: 0; color: #fff; }
.btn.light { background: var(--text); color: var(--bg); border: 0; }
.btn.bad { background: #ff5c5c22; color: var(--bad); border-color: #ff5c5c44; }
.btn.block { width: 100%; }
.btn.sm { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.btn:disabled { opacity: .5; }
.pad { padding: 0 16px; }
.stack > * + * { margin-top: 12px; }
label.f { display: block; }
label.f span { display: block; font-size: 13px; color: var(--mute); margin-bottom: 6px; font-weight: 600; }
.in { width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none; }
.in:focus { border-color: var(--warm); }
textarea.in { resize: vertical; min-height: 80px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--mute); }
.check input { width: 20px; height: 20px; accent-color: var(--hot); flex: none; margin: 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.panel h3 { margin: 0 0 10px; font-size: 16px; }
.muted { color: var(--mute); } .small { font-size: 13px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv div { background: var(--bg2); border-radius: 12px; padding: 12px; }
.kv b { display: block; font-size: 22px; }
.kv small { color: var(--mute); }
.list > * { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > *:last-child { border-bottom: 0; }
.grow { flex: 1; min-width: 0; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* profile */
.prof { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 8px 16px 16px; }
.prof h2 { margin: 6px 0 0; font-size: 22px; display: flex; align-items: center; gap: 6px; }
.tick { width: 18px; height: 18px; border-radius: 50%; background: var(--grad); display: inline-grid; place-items: center; font-size: 11px; }
.stats { display: flex; gap: 28px; margin: 6px 0; }
.stats b { display: block; font-size: 18px; }
.stats small { color: var(--mute); font-size: 12px; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 0 16px; }
.thumb { position: relative; aspect-ratio: 9/16; background: var(--card); border-radius: 6px; overflow: hidden; }
.thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb .lk { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, #2a2030, #1a1520); color: var(--gold); font-weight: 800; font-size: 13px; }

/* coins */
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pack { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.pack b { font-size: 22px; display: flex; align-items: center; gap: 8px; }
.pack small { color: var(--mute); }
.pack .bonus { color: var(--ok); font-weight: 700; font-size: 12px; }
.balance { background: var(--grad); border-radius: 20px; padding: 20px; color: #fff; }
.balance b { font-size: 40px; display: flex; align-items: center; gap: 10px; letter-spacing: -.02em; }
.balance .coin { width: 30px; height: 30px; }

/* live viewer */
.stage { position: fixed; inset: 0; background: #000; z-index: 20; max-width: 560px; margin: 0 auto; overflow: hidden; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.stage .ph { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #3a2440, #0d0b10 70%); }
.stage .ph .av { width: 110px; height: 110px; font-size: 40px; }
.stage-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 30px; background: linear-gradient(#0009, transparent); }
.host { display: flex; align-items: center; gap: 8px; background: #0006; backdrop-filter: blur(8px); border-radius: 99px; padding: 4px 4px 4px 4px; min-width: 0; }
.host .t { min-width: 0; padding-right: 4px; }
.host b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.host small { font-size: 11px; color: #fffb; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.pill { display: inline-flex; align-items: center; gap: 5px; background: #0006; backdrop-filter: blur(8px); border-radius: 99px; padding: 6px 10px; font-size: 13px; font-weight: 700; }
.ibtn { width: 38px; height: 38px; border-radius: 50%; background: #0006; backdrop-filter: blur(8px); display: grid; place-items: center; font-size: 18px; flex: none; }
.ibtn svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.follow { background: var(--hot); color: #fff; border-radius: 99px; padding: 6px 12px; font-weight: 800; font-size: 13px; }
.follow.on { background: #fff3; }
.chat { position: absolute; z-index: 3; left: 0; right: 76px; bottom: calc(70px + var(--safe-b)); max-height: 40%; overflow-y: auto; padding: 0 12px; display: flex; flex-direction: column; gap: 6px; mask-image: linear-gradient(transparent, #000 25%); scrollbar-width: none; }
.msg { align-self: flex-start; max-width: 100%; background: #0007; backdrop-filter: blur(6px); border-radius: 14px; padding: 6px 10px; font-size: 14px; line-height: 1.3; word-wrap: break-word; }
.msg b { color: #ffb6c9; margin-right: 6px; font-weight: 700; }
.msg.host b { color: var(--gold); }
.msg.gift { background: linear-gradient(90deg, #ff3d8bcc, #ff7a59aa); }
.msg.sys { color: #fffb; font-size: 13px; }
.bar { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; align-items: center; padding: 10px 12px calc(10px + var(--safe-b)); background: linear-gradient(transparent, #000a); }
.bar .in { background: #0008; border-color: #fff2; border-radius: 99px; padding: 10px 16px; }
.giftbtn { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); font-size: 22px; flex: none; display: grid; place-items: center; }
.burst { position: absolute; z-index: 5; left: 50%; top: 40%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; animation: burst 2.4s ease-out forwards; }
.burst i { font-style: normal; font-size: 96px; display: block; filter: drop-shadow(0 8px 24px #0008); }
.burst span { font-weight: 800; background: #0008; border-radius: 99px; padding: 4px 12px; }
@keyframes burst { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.4); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -90%) scale(.9); } }
.gate { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 24px; text-align: center; background: #000b; backdrop-filter: blur(18px); }
.gate .box { max-width: 320px; }
.gate .box > .av, .locked .box > .av { margin: 0 auto; }
.notice { position: absolute; z-index: 4; left: 12px; right: 12px; top: calc(64px + env(safe-area-inset-top, 0px)); background: #000a; backdrop-filter: blur(8px); border: 1px solid #fff2; border-radius: 12px; padding: 10px 12px; font-size: 13px; color: #fffc; text-align: center; }
.gate h2 { margin: 12px 0 6px; }
.tap { position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.sideacts { position: absolute; z-index: 4; right: 12px; bottom: calc(80px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; }

/* reels */
.feed { position: fixed; inset: 0 0 calc(var(--nav) + var(--safe-b)) 0; max-width: 560px; margin: 0 auto; overflow-y: scroll; scroll-snap-type: y mandatory; background: #000; scrollbar-width: none; }
.reel { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
.reel video { width: 100%; height: 100%; object-fit: cover; }
.reel .info { position: absolute; left: 12px; right: 80px; bottom: 16px; z-index: 2; text-shadow: 0 1px 4px #000; }
.reel .info a { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 6px; }
.reel .acts { position: absolute; right: 10px; bottom: 20px; z-index: 2; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.reel .acts button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; text-shadow: 0 1px 4px #000; }
.reel .acts svg { width: 32px; height: 32px; stroke: #fff; fill: none; stroke-width: 1.8; filter: drop-shadow(0 1px 3px #0008); }
.reel .acts .on svg { fill: var(--hot); stroke: var(--hot); }
.reel::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, #000a); pointer-events: none; }
.reel .locked { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at 50% 40%, #3b2340, #0d0b10 75%); }
.feedtabs { position: fixed; z-index: 3; top: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 18px; padding: calc(12px + env(safe-area-inset-top, 0px)) 0 8px; font-weight: 700; color: #fff9; pointer-events: none; }
.feedtabs a { pointer-events: auto; text-shadow: 0 1px 4px #000; }
.feedtabs a.on { color: #fff; border-bottom: 2px solid #fff; padding-bottom: 2px; }

/* sheet */
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: #0009; animation: fade .2s; }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 85vh; overflow-y: auto; background: var(--bg2); border-radius: 22px 22px 0 0; padding: 10px 16px calc(20px + var(--safe-b)); animation: up .25s cubic-bezier(.2, .9, .3, 1); }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 12px; }
.sheet h3 { margin: 0 0 12px; font-size: 18px; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.gifts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gift { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.gift i { font-style: normal; font-size: 32px; }
.gift small { font-size: 11px; color: var(--mute); }
.gift b { font-size: 12px; display: flex; align-items: center; gap: 3px; }
.gift b .coin { width: 12px; height: 12px; }

/* nav */
#nav { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; height: calc(var(--nav) + var(--safe-b)); padding-bottom: var(--safe-b); display: flex; justify-content: space-around; align-items: center; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); max-width: 560px; margin: 0 auto; }
#nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--dim); font-weight: 600; }
#nav a svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; }
#nav a.on { color: var(--text); }
#nav .golive i { width: 46px; height: 30px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; }
#nav .golive i::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #fff5; }
#nav .golive { color: var(--text); }
body.immersive #nav { display: none; }
body.immersive #app { padding-bottom: 0; }

#toast { position: fixed; z-index: 60; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -150%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; transition: transform .25s; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 10px 30px #0006; }
#toast.show { transform: translate(-50%, 0); }
#toast.err { background: var(--bad); color: #fff; }

/* login */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.login .logo { width: 84px; height: 84px; margin: 0 auto; }
.login h1 { font-size: 34px; margin: 0; letter-spacing: -.03em; }
.admin-doc { width: 100%; border-radius: 12px; background: var(--bg2); }
.tabsline { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 12px; }
.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }

/* ===== v6: Telescope-style layout ===== */
#nav { left: 50%; right: auto; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); width: min(420px, calc(100% - 24px)); height: 62px; padding: 0 6px; border-radius: 22px; border: 1px solid var(--line); background: color-mix(in srgb, #1a1620 86%, transparent); box-shadow: 0 10px 30px #0008; }
#nav a { border-radius: 16px; padding: 7px 0; }
#nav a.on { background: #ffffff14; color: var(--text); }
#app { padding-bottom: calc(var(--nav) + var(--safe-b) + 28px); }
.coins .plus { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; font-weight: 900; font-size: 15px; margin-left: 2px; }
.ibtn2 { width: 36px; height: 36px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; font-size: 16px; flex: none; font-weight: 800; }
.dia { font-style: normal; }
.av.xs { width: 22px; height: 22px; font-size: 10px; }
.ani { width: 24px; height: 24px; border-radius: 50%; background: #ffffff18; display: inline-grid; place-items: center; font-size: 14px; flex: none; }
.ani.big { width: 44px; height: 44px; font-size: 26px; }
.gimg { width: 1em; height: 1em; object-fit: contain; display: inline-block; vertical-align: middle; }
.gift i .gimg { width: 34px; height: 34px; }
.burst i .gimg { width: 110px; height: 110px; }
.grid { gap: 8px; }
.card .meta .who { display: flex; align-items: center; gap: 6px; background: #0007; backdrop-filter: blur(6px); border-radius: 99px; padding: 3px 10px 3px 3px; width: fit-content; max-width: 100%; }
.card .meta .who b { font-size: 13px; }
.badge.toy { background: #8b5cf6cc; }
.badges .badge.lock + .badge.toy, .badges .badge.toy { margin-left: auto; }
.badges .badge.lock ~ .badge.toy { margin-left: 0; }
.goalbar { height: 5px; border-radius: 5px; background: #ffffff26; overflow: hidden; margin-top: 4px; }
.goalbar i { display: block; height: 100%; background: linear-gradient(90deg, #ffc85a, #ff7a59); border-radius: 5px; transition: width .4s; }
.goalbar.sm { height: 3px; margin-top: 6px; }
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 16px; }
@media (min-width: 520px) { .pgrid { grid-template-columns: repeat(3, 1fr); } }
.pcard { position: relative; aspect-ratio: 4/5; border-radius: var(--r); overflow: hidden; background: var(--card); }
.pcard img { width: 100%; height: 100%; object-fit: cover; }
.pcard .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 52px; font-weight: 800; background: var(--grad); color: #fff8; }
.pcard .nm { position: absolute; left: 8px; bottom: 8px; right: 8px; font-weight: 700; font-size: 13px; background: #0007; backdrop-filter: blur(6px); border-radius: 99px; padding: 4px 10px; width: fit-content; max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn.gold { background: linear-gradient(135deg, #ffd66b, #f5a524); color: #2a1a00; border: 0; }

/* watch screen */
.blurbg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(30px) brightness(.45); }
.stage video { object-fit: contain; }
.stage-top { padding-bottom: 40px; gap: 6px; }
.stage-top .ibtn { width: 34px; height: 34px; font-size: 15px; }
.stage-top .ibtn svg { width: 18px; height: 18px; }
.ttl { min-width: 0; } .ttl b { display: block; font-size: 14px; text-shadow: 0 1px 3px #000; }
.ttl small { font-size: 11px; color: #fffd; display: flex; gap: 4px; align-items: center; margin-top: 2px; }
.ttl small .coin, .goalwrap small .coin { width: 12px; height: 12px; }
.goalwrap { position: absolute; z-index: 3; top: calc(56px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; background: #0007; backdrop-filter: blur(8px); border-radius: 12px; padding: 6px 10px; font-size: 12px; }
.goalwrap:empty { display: none; }
.goalwrap small { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.chat { right: 70px; bottom: calc(132px + var(--safe-b)); max-height: 42%; }
.msg { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 5px 10px 5px 5px; }
.msg b { margin-right: 2px; } .msg b.h { color: var(--gold); } .msg b.v { color: #ffd66b; }
.msg.gmsg { background: #0008; } .msg.gmsg > span:first-of-type, .msg.toy > span { color: #fffb; }
.msg.gmsg .gi { font-style: normal; font-size: 18px; } .msg .coin { width: 13px; height: 13px; }
.msg.toy { background: linear-gradient(90deg, #8b5cf6aa, #0007); }
.msg.sys { background: #0006; color: #fffb; padding: 5px 10px; }
.msg.sys.goal { background: linear-gradient(90deg, #f5a524cc, #ff7a59aa); color: #fff; font-weight: 700; }
.rail { position: absolute; z-index: 4; right: 10px; top: calc(70px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.qg { width: 50px; border-radius: 14px; background: #0007; backdrop-filter: blur(8px); padding: 6px 0 4px; display: flex; flex-direction: column; align-items: center; }
.qg i { font-style: normal; font-size: 24px; } .qg b { font-size: 10px; display: flex; align-items: center; gap: 2px; } .qg .coin { width: 10px; height: 10px; }
.toychip { background: #f97316; color: #fff; font-weight: 800; font-size: 10px; border-radius: 6px; padding: 3px 7px; letter-spacing: .05em; }
.hostpill { position: absolute; z-index: 4; left: 50%; transform: translateX(-50%); bottom: calc(74px + var(--safe-b)); display: flex; align-items: center; gap: 8px; background: #000a; backdrop-filter: blur(10px); border-radius: 99px; padding: 5px 5px 5px 6px; max-width: calc(100% - 24px); }
.hostpill a { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hostpill b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.hostpill small { display: block; font-size: 11px; color: #9fd8ff; }
.fbtn { width: 34px; height: 34px; border-radius: 50%; background: #229ed9; color: #fff; font-weight: 900; font-size: 18px; flex: none; }
.fbtn.on { background: #ffffff26; }
.ibtn.big { width: 46px; height: 46px; font-size: 22px; background: #ffffff1f; }
.gshead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.vipbtn { background: #3a2a07; color: #ffd66b; border: 1px solid #ffd66b55; border-radius: 99px; padding: 7px 12px; font-weight: 800; font-size: 13px; }
.gtabs { display: flex; gap: 16px; margin: 0 0 12px; border-bottom: 1px solid var(--line); }
.gtabs button { padding: 8px 0; font-weight: 800; font-size: 13px; color: var(--dim); letter-spacing: .04em; text-transform: uppercase; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.gtabs button.on { color: var(--text); border-color: var(--text); }
.gifts { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 380px) { .gifts { grid-template-columns: repeat(4, 1fr); } }
.gift { position: relative; }
.gift.toy .bars { display: flex; align-items: flex-end; gap: 2px; height: 30px; position: relative; padding-top: 2px; }
.gift.toy .bars span { width: 5px; border-radius: 2px; background: #ffffff2a; }
.gift.toy .bars span:nth-child(1) { height: 30%; } .gift.toy .bars span:nth-child(2) { height: 45%; } .gift.toy .bars span:nth-child(3) { height: 60%; } .gift.toy .bars span:nth-child(4) { height: 78%; } .gift.toy .bars span:nth-child(5) { height: 100%; }
.bars.p1 span:nth-child(-n+1), .bars.p2 span:nth-child(-n+2), .bars.p3 span:nth-child(-n+3), .bars.p4 span:nth-child(-n+4), .bars.p5 span:nth-child(-n+5) { background: linear-gradient(#ff7a59, #ff3d8b); }
.gift.toy .bars em { position: absolute; right: -16px; top: -4px; font-size: 9px; font-style: normal; color: var(--mute); }
.xdel { position: absolute; top: 2px; right: 4px; color: var(--dim); font-size: 12px; }
.podium { display: grid; grid-template-columns: 1fr 1.2fr 1fr; align-items: end; gap: 8px; margin: 8px 0 14px; text-align: center; }
.pd { display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; padding-top: 14px; }
.pd .ani.big { width: 56px; height: 56px; font-size: 30px; border: 2px solid #c0c0c0; } .pd.p1 .ani.big { width: 70px; height: 70px; font-size: 38px; border-color: #ffc85a; } .pd.p3 .ani.big { border-color: #e08a4f; }
.pd b { font-size: 12px; } .pd small { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--gold); } .pd small .coin { width: 12px; height: 12px; }
.pd em { font-style: normal; font-size: 11px; font-weight: 900; width: 18px; height: 18px; border-radius: 50%; background: #c0c0c0; color: #000; display: grid; place-items: center; position: absolute; top: 58px; }
.pd.p1 em { background: #ffc85a; top: 72px; } .pd.p3 em { background: #e08a4f; }
.crown { position: absolute; top: -6px; font-size: 20px; }
.vipcrown { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: radial-gradient(#3a2a07, #1a1408); border: 1px solid #ffd66b55; }
.toyq { position: absolute; z-index: 6; left: 50%; top: 38%; transform: translate(-50%, -50%); pointer-events: none; }
.toyalert { min-width: 220px; text-align: center; background: #000c; border: 2px solid #8b5cf6; border-radius: 22px; padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 0 40px #8b5cf688; animation: pulse 1s infinite; }
.toyalert.p4, .toyalert.p5 { border-color: #ff3d8b; box-shadow: 0 0 50px #ff3d8b99; }
.toyalert b { font-size: 22px; } .toyalert strong { font-size: 44px; } .toyalert small { color: var(--mute); }
.kv2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; }

/* reels */
.rav { position: relative; margin-bottom: 4px; } .rav .av { width: 44px; height: 44px; border: 2px solid #fff; }
.rav i { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 50%; background: #229ed9; color: #fff; font-style: normal; font-weight: 900; font-size: 14px; display: grid; place-items: center; }

/* coins */
.pack { position: relative; align-items: center; text-align: center; padding: 14px 8px 12px; }
.pack .pname { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.pack b { font-size: 20px; } .pack .price { background: #ffffff12; border-radius: 8px; padding: 4px 10px; font-weight: 800; font-size: 13px; margin-top: 4px; }
.pack .stars { font-size: 10px; }
.pack.tagged { border-color: #ffc85a66; }
.pack.feat { flex-direction: row; flex-wrap: wrap; justify-content: space-between; text-align: left; padding: 18px 16px; border: 2px solid #ffc85a; background: linear-gradient(135deg, #2b2210, #1d1923); box-shadow: 0 0 30px #ffc85a22; width: 100%; }
.pack.feat .pname { width: 100%; color: #ffc85a; } .pack.feat b { font-size: 28px; } .pack.feat .price { background: linear-gradient(135deg, #ffd66b, #f5a524); color: #2a1a00; font-size: 16px; padding: 8px 14px; border-radius: 99px; }
.pack.feat .stars { width: 100%; }
.ptag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: #ffc85a; color: #2a1a00; font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.packs3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.steps > div { display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px; margin-bottom: 12px; }
.steps em { grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; background: #ffc85a; color: #2a1a00; font-style: normal; font-weight: 900; display: grid; place-items: center; }
.steps span { color: var(--mute); font-size: 14px; }
.balcard { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-radius: 20px; border: 1px solid #ffc85a44; background: radial-gradient(circle at 90% 50%, #4a3a12, #1d1923 60%); }
.balcard small { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #ffc85a; text-transform: uppercase; }
.balcard b { display: flex; align-items: center; gap: 8px; font-size: 34px; } .balcard .coin { width: 22px; height: 22px; }
.emopick { display: flex; flex-wrap: wrap; gap: 6px; } .emopick button { width: 40px; height: 40px; border-radius: 10px; background: var(--card); font-size: 22px; border: 1px solid var(--line); } .emopick button.on { border-color: var(--hot); background: #ff3d8b22; }

/* leaderboard & rewards */
.prizebar { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid #ffc85a55; background: linear-gradient(135deg, #3a2e10, #1d1923); margin-bottom: 10px; color: #ffc85a; font-weight: 800; }
.prizebar.dim { color: var(--mute); border-color: var(--line); }
.prizebar small { display: block; font-size: 11px; letter-spacing: .08em; } .prizebar b { display: block; color: var(--text); font-size: 13px; font-weight: 600; } .prizebar strong { font-size: 22px; }
.trophy { width: 36px; height: 36px; border-radius: 50%; background: #ffc85a22; display: grid; place-items: center; }
.lbl .rk { width: 22px; text-align: center; font-weight: 800; color: var(--mute); } .lbl .rk.r1 { color: #ffc85a; } .lbl .rk.r2 { color: #c0c0c0; } .lbl .rk.r3 { color: #e08a4f; }
.pz { display: inline-block; font-size: 11px; font-weight: 800; color: #ffc85a; background: #ffc85a1a; border-radius: 6px; padding: 1px 6px; margin-top: 2px; }
.pool { border-radius: 20px; padding: 18px; border: 1px solid #ffc85a55; background: linear-gradient(135deg, #3a2e10, #1d1923); display: flex; flex-direction: column; gap: 4px; }
.pool small { color: #ffc85a; font-weight: 800; letter-spacing: .08em; font-size: 11px; } .pool > b { font-size: 34px; }
.pzlist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; } .pzlist div { display: flex; justify-content: space-between; background: #0004; border-radius: 10px; padding: 8px 10px; font-size: 13px; } .pzlist b { color: #ffc85a; }

/* games */
.gcard { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 160px; padding: 14px; border-radius: 20px; overflow: hidden; text-align: left; background: radial-gradient(circle at 70% 25%, color-mix(in srgb, var(--gc) 45%, transparent), #17131c 70%); border: 1px solid #ffffff12; }
.gcard i { position: absolute; top: 18px; right: 14px; font-style: normal; font-size: 56px; filter: drop-shadow(0 8px 18px #0009); }
.gcard b { font-size: 16px; font-weight: 900; } .gcard small { color: var(--mute); font-size: 12px; line-height: 1.3; }
.gcard .mx { position: absolute; top: 10px; left: 10px; font-size: 10px; font-weight: 800; background: #000a; border-radius: 99px; padding: 3px 8px; }
.gcard.big { min-height: 230px; margin-bottom: 10px; } .gcard.big i { font-size: 110px; top: 30px; right: 22px; } .gcard.big b { font-size: 26px; }
.gcard .play { margin-top: 10px; align-self: flex-start; background: color-mix(in srgb, var(--gc) 80%, #fff 0%); color: #fff; font-weight: 800; padding: 9px 16px; border-radius: 99px; font-size: 13px; }
.ggrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ginfo { font-size: 12px; color: var(--mute); margin-bottom: 8px; }
.gstage { position: relative; background: #17131c; border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.gres { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; background: #000d; border-radius: 18px; padding: 14px 22px; animation: fade .25s; pointer-events: none; }
.gres b { display: block; font-size: 28px; } .gres span { display: flex; gap: 4px; align-items: center; justify-content: center; font-weight: 700; }
.gres.win { border: 2px solid var(--ok); } .gres.win b { color: var(--ok); } .gres.lose { border: 2px solid var(--line); }
.betbar { display: flex; flex-direction: column; gap: 8px; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .presets button { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 0; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 4px; } .presets button.on { border-color: #84cc16; background: #84cc1622; } .presets .coin { width: 13px; height: 13px; }
.betrow { display: flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.betrow button { width: 44px; height: 38px; border-radius: 9px; background: #ffffff10; font-weight: 800; } .betrow span { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; } .betrow input { width: 100px; background: none; border: 0; outline: none; text-align: center; font-weight: 800; font-size: 18px; }
.wheel { position: relative; width: min(300px, 100%); margin: 0 auto; } .wheel svg { width: 100%; display: block; } .ptr { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 1; color: #ffc85a; font-size: 22px; text-shadow: 0 2px 6px #000; }
.plinko { width: 100%; max-width: 360px; display: block; margin: 0 auto; } .plinko text { transition: x .1s, y .1s; }
.buckets { display: grid; grid-template-columns: repeat(13, 1fr); gap: 2px; max-width: 360px; margin: 0 auto; } .buckets span { font-size: 8px; font-weight: 800; text-align: center; padding: 5px 0; border-radius: 4px; background: #ffffff10; } .buckets .warm { background: #f59e0b44; } .buckets .hot { background: #ff3d8b66; } .buckets .on { outline: 2px solid #fff; transform: translateY(-3px); }
.coin3d { width: 120px; height: 120px; margin: 10px auto 18px; position: relative; transform-style: preserve-3d; transition: transform 1.5s cubic-bezier(.2,.8,.2,1); }
.coin3d .f { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; font-size: 48px; color: #6b4a00; background: radial-gradient(circle at 35% 30%, #ffe7a3, #ffc85a 55%, #c98a12); backface-visibility: hidden; box-shadow: inset 0 0 0 6px #e0a52a; } .coin3d .t { transform: rotateY(180deg); }
.seg { display: flex; gap: 6px; background: var(--card); border-radius: 12px; padding: 4px; margin-top: 10px; } .seg button { flex: 1; padding: 9px 0; border-radius: 9px; font-weight: 800; font-size: 13px; color: var(--mute); } .seg button.on { background: #84cc16; color: #0d0b10; }
.digits { display: flex; justify-content: center; gap: 10px; } .digits span { width: 74px; height: 92px; border-radius: 16px; background: #0d1a0d; border: 1px solid #84cc1644; display: grid; place-items: center; font-size: 60px; font-weight: 900; color: #fff; }
.uopay { text-align: center; margin: 12px 0 6px; color: var(--mute); font-size: 13px; } .uopay b { color: #84cc16; font-size: 18px; }
.urange { width: 100%; accent-color: #84cc16; }
.scard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 300px; margin: 0 auto; } .tile { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; font-weight: 900; font-size: 20px; background: #2a2335; }
.tile.cov { background: repeating-linear-gradient(45deg, #c0a0e0, #f0c0e0 10px, #a0c0f0 20px); color: transparent; cursor: pointer; } .tile.hit { background: var(--ok); color: #0d0b10; }
.slot { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; max-width: 320px; margin: 0 auto; padding: 8px; border-radius: 16px; background: #2a1a08; border: 3px solid #b4741c; } .slot span { aspect-ratio: 1; display: grid; place-items: center; font-size: 26px; background: #120c06; border-radius: 8px; } .slot span.hit { background: #f59e0b55; outline: 2px solid #ffc85a; }
.paytable { text-align: center; margin-top: 8px; }
.dice { display: flex; justify-content: center; gap: 12px; font-size: 76px; line-height: 1; } .dice span { color: #60a5fa; text-shadow: 0 6px 18px #0009; } .dice span.roll { transform: rotate(12deg); }
.dtot { text-align: center; color: var(--mute); margin: 6px 0; } .dtot b { color: var(--text); font-size: 20px; }
.ptab { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; } .ptab span { font-size: 12px; background: #ffffff0d; border-radius: 8px; padding: 4px; text-align: center; } .ptab b { display: block; color: #60a5fa; } .ptab .on { outline: 2px solid #60a5fa; }
.hgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 320px; margin: 0 auto; } .hgrid button { aspect-ratio: 1; border-radius: 12px; background: #1f2a1f; border: 1px solid #22c55e33; font-size: 22px; } .hgrid .safe { background: #22c55e33; } .hgrid .boom { background: #ff5c5c66; } .hgrid .mine { opacity: .6; }
.hstat { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--mute); } .hstat b { color: var(--text); } .hstat select { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 2px 4px; }
.lanes { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; } .lane { height: 120px; border-radius: 10px; background: #221a2e; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 24px; } .lane small { font-size: 9px; color: var(--mute); font-weight: 800; }
.lane.cur { background: #a855f744; outline: 2px solid #a855f7; } .lane.done { background: #22c55e22; } .lane.boom { background: #ff5c5c66; } .lane.start { font-size: 20px; background: #ffffff0a; }
