:root {
  color-scheme: dark;
  --bg: #080912;
  --surface: #10111f;
  --surface-2: #17182a;
  --line: #2b2d4a;
  --muted: #8e90ae;
  --text: #f5f3ff;
  --violet: #a86bff;
  --violet-2: #cb8cff;
  --violet-soft: #32204e;
  --green: #4ed39a;
  --yellow: #ffd166;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
.hidden { display: none !important; }
html, body { margin: 0; min-height: 100%; background: #05060b; }
body { min-height: 100dvh; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
#app { min-height: 100dvh; }
.phone { width: min(100%, 440px); min-height: 100dvh; margin: 0 auto; background: var(--bg); overflow: hidden; }
.screen { min-height: 100dvh; padding: 18px 18px 150px; }
.screen.onboarding { display: grid; place-items: center; padding: 28px; }
.eyebrow { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }
.tiny { font-size: 11px; }
.title { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.subtitle { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.topbar-left, .topbar-actions, .row { display: flex; align-items: center; gap: 10px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.icon-btn:active, .nav-item:active, .primary:active, .channel-card:active { transform: scale(.98); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; overflow: hidden; border-radius: 12px; color: #fff; font-size: 12px; font-weight: 800; background: linear-gradient(145deg, #f07dff, #5c32cb); }
.avatar img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.avatar.sm { width: 26px; height: 26px; border-radius: 9px; font-size: 9px; }
.avatar.green { background: linear-gradient(145deg, #58dda3, #167b6a); }
.avatar.orange { background: linear-gradient(145deg, #ffc46e, #c55a36); }
.avatar.blue { background: linear-gradient(145deg, #6ad8ff, #3667c4); }
.avatar.pink { background: linear-gradient(145deg, #ff91d0, #9a3c9f); }
.coin { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border: 1px solid #4a3a24; border-radius: 11px; color: var(--yellow); background: #211a16; font-size: 12px; font-weight: 700; }
.onboarding-card { width: min(100%, 340px); text-align: center; }
.lang { align-self: start; margin-left: auto; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); font-size: 11px; }
.orb { display: grid; place-items: center; width: 110px; height: 110px; margin: 44px auto 24px; border: 1px solid #443461; border-radius: 34px; background: radial-gradient(circle at 35% 25%, #423066, #17122e 65%); box-shadow: 0 0 70px #6825a733; }
.orb-stack { position: relative; width: 72px; height: 72px; }
.orb-stack .avatar { position: absolute; width: 31px; height: 31px; border: 2px solid var(--bg); }
.orb-stack .avatar:nth-child(1) { left: 1px; top: 5px; }
.orb-stack .avatar:nth-child(2) { right: 1px; top: 5px; }
.orb-stack .avatar:nth-child(3) { left: 20px; bottom: 2px; }
.brand { margin: 0; font-size: 31px; letter-spacing: -.06em; }
.brand span { color: var(--violet-2); }
.onboarding-copy { margin: 10px auto 30px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.primary { width: 100%; padding: 13px 16px; border: 0; border-radius: 12px; color: #190b2e; background: linear-gradient(100deg, var(--violet-2), var(--violet)); font-weight: 800; box-shadow: 0 9px 28px #9c55ff33; transition: transform .15s ease; }
.terms { margin: 14px 0 0; color: #61637e; font-size: 10px; line-height: 1.5; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 24px 0 12px; }
.section-head h2 { margin: 0; font-size: 17px; letter-spacing: -.03em; }
.text-btn { padding: 0; border: 0; color: var(--violet-2); background: none; font-size: 12px; }
.channel-list { display: grid; gap: 9px; }
.channel-card { display: flex; align-items: center; gap: 11px; width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 15px; text-align: left; background: var(--surface); transition: transform .15s ease, border-color .15s ease; }
.channel-card:hover { border-color: #5a477c; }
.channel-copy { min-width: 0; flex: 1; }
.channel-title { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; font-size: 13px; font-weight: 750; }
.channel-preview { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; padding: 3px 6px; border-radius: 6px; color: var(--green); background: #193b35; font-size: 8px; font-weight: 800; letter-spacing: .06em; }
.badge.purple { color: var(--violet-2); background: var(--violet-soft); }
.channel-meta { text-align: right; color: var(--muted); font-size: 10px; line-height: 1.5; }
.avatar-stack { display: flex; align-items: center; min-width: 55px; }
.avatar-stack .avatar { margin-left: -7px; border: 2px solid var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.add-btn { display: grid; place-items: center; width: 100%; padding: 12px; border: 1px dashed #4b4167; border-radius: 14px; color: var(--violet-2); background: transparent; font-size: 13px; }
.bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 20; display: flex; justify-content: center; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, #080912 23%); pointer-events: none; }
.bottom-nav-inner { display: grid; grid-template-columns: repeat(5, 1fr); width: min(100%, 420px); padding: 7px; border: 1px solid var(--line); border-radius: 18px; background: #111221ee; box-shadow: 0 -7px 30px #0006; pointer-events: auto; }
.nav-item { display: grid; gap: 3px; place-items: center; padding: 7px 2px; border: 0; border-radius: 12px; color: var(--muted); background: transparent; font-size: 10px; transition: transform .15s ease, color .15s ease, background .15s ease; }
.nav-item.active { color: var(--violet-2); background: var(--violet-soft); }
.nav-icon { font-size: 17px; line-height: 1; }
.backbar { display: flex; align-items: center; gap: 10px; margin: -4px 0 18px; }
.backbar .icon-btn { width: 32px; height: 32px; }
.channel-header { padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.channel-header-top { display: flex; align-items: center; gap: 10px; }
.channel-header-top > div { min-width: 0; flex: 1; }
.voice-btn { flex: 0 0 auto; max-width: 112px; padding: 7px 8px; line-height: 1.2; }
.channel-header h1 { margin: 0; font-size: 15px; }
.channel-header .subtitle { font-size: 11px; }
.channel-tabs { display: flex; gap: 6px; margin-top: 12px; overflow-x: auto; }
.tab { padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface-2); font-size: 10px; white-space: nowrap; }
.tab.active { border-color: #634e87; color: var(--violet-2); background: var(--violet-soft); }
.chat-feed { display: grid; gap: 11px; margin: 18px 0; }
.system-note { margin: 3px 28px; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: center; }
.message { display: flex; align-items: flex-start; gap: 8px; }
.message.me { flex-direction: row-reverse; }
.message-body { max-width: 78%; }
.message-name { margin: 0 0 4px 2px; color: var(--muted); font-size: 10px; }
.message.me .message-name { text-align: right; }
.bubble { padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; color: #e9e7f7; background: var(--surface); font-size: 12px; line-height: 1.45; }
.message.me .bubble { border-color: #5a3e73; border-radius: 14px 4px 14px 14px; background: #2b1d3a; }
.message.bot .bubble { border-color: #423364; background: #201931; }
.question-label { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; color: var(--violet-2); font-size: 10px; font-weight: 800; }
.answer-rank { display: inline-flex; margin-top: 7px; padding: 3px 6px; border-radius: 6px; color: var(--green); background: #193b35; font-size: 9px; font-weight: 800; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 8px; }
.photo { display: grid; place-items: center; min-height: 78px; border-radius: 9px; color: #fff8ff; font-size: 27px; }
.photo.one { background: linear-gradient(135deg,#2b6594,#8fd7ed); }
.photo.two { background: linear-gradient(135deg,#8f4b45,#f2b56d); }
.photo.three { background: linear-gradient(135deg,#388363,#d3db78); }
.photo.four { background: linear-gradient(135deg,#4e4c94,#d68ad6); }
.composer { position: fixed; right: auto; bottom: 82px; left: 50%; z-index: 19; display: flex; gap: 8px; width: min(calc(100% - 36px), 404px); padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #111221f2; box-shadow: 0 12px 32px #0008; transform: translateX(-50%); backdrop-filter: blur(12px); }
.composer input { min-width: 0; flex: 1; padding: 8px 9px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
.composer button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 10px; color: #21102f; background: var(--violet-2); }
.overview-hero { padding: 17px; border: 1px solid #4b396c; border-radius: 17px; background: linear-gradient(135deg, #241738, #121426); }
.overview-hero h1 { margin: 0 0 7px; font-size: 19px; }
.public-card { display: flex; align-items: center; gap: 11px; padding: 13px; border-bottom: 1px solid var(--line); }
.public-card:last-child { border-bottom: 0; }
.public-card-copy { flex: 1; }
.public-card-copy strong { display: block; margin-bottom: 4px; font-size: 13px; }
.public-card-copy span { color: var(--muted); font-size: 11px; }
.join-btn { padding: 7px 9px; border: 1px solid #5d467f; border-radius: 9px; color: var(--violet-2); background: var(--violet-soft); font-size: 10px; }
.profile-hero { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(135deg,#19152b,#111222); }
.profile-hero .avatar { width: 58px; height: 58px; border-radius: 19px; font-size: 18px; }
.profile-name { margin: 0 0 4px; font-size: 16px; }
.handle { color: var(--muted); font-size: 11px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 20px; }
.stat { padding: 13px 8px; border: 1px solid var(--line); border-radius: 13px; text-align: center; background: var(--surface); }
.stat strong { display: block; margin-bottom: 4px; font-size: 18px; }
.stat span { color: var(--muted); font-size: 10px; }
.rank-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.rank-row { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-row .rank-name { flex: 1; font-size: 12px; }
.rank-row .rank-score { color: var(--muted); font-size: 11px; }
.rank-num { width: 17px; color: var(--muted); font-size: 10px; text-align: center; }
.me-row { background: #261b37; }
.auth-screen { display: grid; align-content: center; justify-items: center; text-align: center; }
.auth-mark { display: flex; align-items: center; justify-content: center; gap: 2px; margin-bottom: 14px; color: var(--violet-2); font-size: 20px; font-weight: 900; letter-spacing: -.08em; }
.auth-mark span:nth-child(2) { color: #9b78ff; }
.auth-mark span:nth-child(3) { color: #6a98ff; }
.auth-mark span:nth-child(4) { color: var(--green); }
.auth-card { width: min(100%, 360px); margin-top: 14px; padding: 7px; border: 1px solid var(--line); border-radius: 18px; text-align: left; background: var(--surface); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 13px; }
.auth-tab { padding: 10px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; font-size: 12px; }
.auth-tab.active { color: var(--text); background: var(--violet-soft); }
.field { display: grid; gap: 6px; margin: 10px 4px; }
.field label { color: var(--muted); font-size: 11px; }
.field input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; outline: none; color: var(--text); background: var(--surface-2); font-size: 12px; }
.field input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px #a86bff22; }
.auth-card .primary { margin-top: 9px; }
.form-error { margin: 8px 4px; color: #ff8490; font-size: 11px; line-height: 1.4; }
.game-slot { margin-top: 12px; }
.game-start, .game-card { padding: 14px; border: 1px solid #4b396c; border-radius: 16px; background: linear-gradient(135deg, #241738, #111322); }
.game-start { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.game-start strong { font-size: 13px; }
.game-start .subtitle { max-width: 230px; font-size: 11px; }
.compact { width: auto; min-width: 100px; padding: 10px 12px; font-size: 11px; }
.game-head { display: flex; justify-content: space-between; margin-bottom: 9px; color: var(--violet-2); font-size: 10px; }
.game-card h2 { margin: 0 0 12px; font-size: 15px; line-height: 1.35; }
.options { display: grid; gap: 7px; }
.option { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--surface); text-align: left; font-size: 11px; }
.option span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: #241238; background: var(--violet-2); font-size: 10px; font-weight: 800; }
.option:hover { border-color: var(--violet); background: #211830; }
.option.disabled { cursor: default; opacity: .65; }
.result { margin-top: 10px; padding: 9px; border-radius: 9px; font-size: 10px; line-height: 1.4; }
.result.good { color: var(--green); background: #143329; }
.result.bad { color: #ff9aa4; background: #3a1a27; }
.next-btn { width: 100%; margin-top: 10px; padding: 10px; border: 1px solid #5d467f; border-radius: 10px; color: var(--violet-2); background: var(--violet-soft); font-size: 11px; }
.invite-card, .create-form { margin-bottom: 12px; padding: 13px; border: 1px solid #4b396c; border-radius: 15px; background: var(--surface); }
.invite-card > strong { display: block; margin-bottom: 8px; font-size: 12px; }
.invite-row, .group-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 11px; }
.invite-row span { flex: 1; color: var(--muted); }
.groups-list { margin-bottom: 13px; }
.group-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--violet-2); background: var(--violet-soft); font-size: 17px; }
.empty-state { display: grid; gap: 5px; padding: 26px 15px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.empty-state strong { color: var(--text); font-size: 13px; }
.inline-form { display: flex; gap: 8px; margin-top: 9px; }
.inline-form input { min-width: 0; flex: 1; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--surface-2); outline: 0; font-size: 11px; }
.avatar-upload { display: grid; gap: 8px; margin: 10px 4px 14px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.upload-label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.upload-label > span { display: grid; gap: 3px; }
.upload-label strong { font-size: 12px; }
.upload-label small { color: var(--muted); font-size: 10px; }
.avatar-editor { display: grid; grid-template-columns: 82px 1fr; gap: 8px 11px; align-items: center; padding-top: 9px; border-top: 1px solid var(--line); }
.avatar-preview { position: relative; display: grid; place-items: center; width: 82px; height: 82px; overflow: hidden; grid-row: span 2; border: 1px solid #5d467f; border-radius: 20px; background: #0b0c16; }
.avatar-preview .avatar { width: 100%; height: 100%; border-radius: 0; }
.avatar-preview > span:last-child { position: absolute; right: 4px; bottom: 4px; padding: 3px 5px; border-radius: 5px; color: #fff; background: #080912bb; font-size: 8px; }
.range-label { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; color: var(--muted); font-size: 10px; }
.range-label output { color: var(--violet-2); }
.range-label input { grid-column: 1 / -1; width: 100%; accent-color: var(--violet); }
#avatar-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.contact-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 0 4px 12px; padding: 4px; border-radius: 11px; background: var(--surface-2); }
.contact-tab { padding: 8px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; }
.contact-tab.active { color: var(--text); background: #2b2140; }
.auth-divider { display: flex; align-items: center; gap: 8px; margin: 14px 4px 10px; color: #65677f; font-size: 10px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.provider-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: var(--surface-2); font-size: 11px; }
.provider-mark { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; background: #4285f4; font-weight: 800; }
.provider-hint { margin: 9px 4px 2px; color: #777991; font-size: 9px; line-height: 1.45; text-align: center; }
.color-picks { display: flex; gap: 8px; }
.color-pick { width: 29px; height: 29px; padding: 0; border: 2px solid transparent; border-radius: 9px; }
.color-pick.selected { border-color: #fff; box-shadow: 0 0 0 2px var(--violet); }
.color-pick.purple { background: linear-gradient(145deg,#f07dff,#5c32cb); }
.color-pick.green { background: linear-gradient(145deg,#58dda3,#167b6a); }
.color-pick.orange { background: linear-gradient(145deg,#ffc46e,#c55a36); }
.color-pick.blue { background: linear-gradient(145deg,#6ad8ff,#3667c4); }
.color-pick.pink { background: linear-gradient(145deg,#ff91d0,#9a3c9f); }
.toast { position: fixed; right: 16px; bottom: 88px; left: 16px; z-index: 40; width: min(100% - 32px, 400px); margin: auto; padding: 11px 13px; border: 1px solid #5d467f; border-radius: 11px; color: var(--text); background: #251737; box-shadow: 0 10px 30px #0007; font-size: 12px; text-align: center; }
.toast.error { border-color: #75404f; color: #ff9aa4; background: #3a1a27; }
@media (min-width: 700px) { .phone { box-shadow: 0 0 100px #0009; } .screen { min-height: 860px; } }
