/* Hangouts — dark translucent glass over a warm night. */
:root {
  --night: #12131f; --night2: #0c0d17; --panel: #1b1d2e; --panel2: #242741; --panel3: #2d3152; --line: #32365a;
  --text: #f4efe6; --muted: #a6a8c3; --dim: #7c7fa0; --amber: #ffb454; --coral: #ff7a59; --sage: #7fd1a0; --sky: #7cc4ff; --violet: #a78bfa; --pink: #ff8fc7; --danger: #ff5d6c;
  --glass: linear-gradient(180deg, rgba(38, 41, 70, .74), rgba(20, 21, 37, .82));
  --glass-solid: linear-gradient(180deg, rgba(33, 35, 60, .96), rgba(19, 20, 35, .97));
  --glass-line: rgba(255, 255, 255, .09); --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .07);
  --blur: blur(18px) saturate(1.35);
  --fill: rgba(255, 255, 255, .045); --fill2: rgba(255, 255, 255, .075); --fill3: rgba(255, 255, 255, .11);
  --warm: linear-gradient(135deg, #ffc46b, var(--amber) 40%, var(--coral));
  --radius: 16px; --r-sm: 11px; --rail: 252px; --panel-w: 400px; --tb: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --shadow: 0 18px 50px rgba(3, 4, 12, .55), 0 2px 8px rgba(3, 4, 12, .35);
  --shadow-sm: 0 6px 20px rgba(3, 4, 12, .45);
  --spring: cubic-bezier(.2, 1.3, .4, 1); --ease: cubic-bezier(.2, .8, .2, 1);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  font-family: "Figtree", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--text); overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
body { font-size: 14.5px; line-height: 1.5; user-select: none; -webkit-user-select: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea, select { background: rgba(8, 9, 18, .55); border: 1px solid var(--glass-line); border-radius: 12px; padding: 10px 13px; width: 100%; outline: none; user-select: text; -webkit-user-select: text; transition: border-color .15s, box-shadow .15s, background .15s; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
input::placeholder, textarea::placeholder { color: #6f7294; }
input:hover, textarea:hover, select:hover { border-color: rgba(255, 255, 255, .16); }
input:focus, textarea:focus, select:focus { border-color: rgba(255, 180, 84, .7); box-shadow: 0 0 0 3px rgba(255, 180, 84, .16), inset 0 1px 2px rgba(0, 0, 0, .25); background: rgba(8, 9, 18, .7); }
textarea { resize: none; line-height: 1.45; }
input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; border: 0; padding: 0; height: 22px; box-shadow: none; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .16); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--text); margin-top: -6px; box-shadow: 0 0 0 4px rgba(255, 180, 84, .22), 0 2px 6px rgba(0, 0, 0, .5); transition: transform .15s var(--spring); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.18); }
input[type="range"]:focus { box-shadow: none; }
input[type="checkbox"]:not(.switch) { width: auto; accent-color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; font-optical-sizing: auto; }
a { color: var(--sky); }
svg { display: block; }
::selection { background: rgba(255, 180, 84, .35); }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .22); }
.sel { user-select: text; -webkit-user-select: text; }
.num, .price, .tag, .cnt, .rp, .count, .badge { font-variant-numeric: tabular-nums; }

/* switch toggle */
input.switch { -webkit-appearance: none; appearance: none; width: 40px; height: 23px; flex: none; border-radius: 999px; padding: 0; background: rgba(255, 255, 255, .12); border: 1px solid var(--glass-line); position: relative; cursor: pointer; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35); transition: background .2s; }
input.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #d9d6ea; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); transition: transform .25s var(--spring), background .2s; }
input.switch:checked { background: linear-gradient(135deg, var(--amber), var(--coral)); border-color: transparent; }
input.switch:checked::after { transform: translateX(17px); background: #fff; }
.toggle-row { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 13px; cursor: pointer; transition: background .15s; }
.toggle-row:hover { background: var(--fill); }
.toggle-row input.switch { order: 2; }
.toggle-row .t, .set-row .t { font-weight: 650; }
.toggle-row .s, .set-row .s { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; flex-wrap: wrap; }
.set-row .seg { min-width: 190px; }
.slider { display: flex; align-items: center; gap: 8px; width: 170px; color: var(--muted); }
.slider svg { width: 18px; height: 18px; flex: none; }

/* ---------- boot ---------- */
#boot { position: fixed; inset: 0; display: grid; place-items: center; z-index: 100; overflow: hidden;
  background: radial-gradient(700px 420px at 50% 72%, rgba(255, 140, 70, .22), transparent 70%), radial-gradient(900px 600px at 20% 10%, rgba(120, 90, 220, .22), transparent 60%), radial-gradient(1200px 800px at 50% 50%, #1a1a33 0%, var(--night2) 75%); transition: opacity .45s var(--ease); }
#boot.leaving { opacity: 0; pointer-events: none; }
.boot-glow i { position: absolute; bottom: -10px; width: 6px; height: 6px; border-radius: 50%; background: #ffcf7a; box-shadow: 0 0 12px 3px rgba(255, 170, 80, .8); opacity: 0; animation: ember 5s linear infinite; }
.boot-glow i:nth-child(1) { left: 44%; animation-delay: 0s; } .boot-glow i:nth-child(2) { left: 52%; animation-delay: .7s; width: 4px; height: 4px; }
.boot-glow i:nth-child(3) { left: 48%; animation-delay: 1.5s; } .boot-glow i:nth-child(4) { left: 56%; animation-delay: 2.2s; width: 3px; height: 3px; }
.boot-glow i:nth-child(5) { left: 40%; animation-delay: 2.9s; width: 4px; height: 4px; } .boot-glow i:nth-child(6) { left: 59%; animation-delay: 3.6s; }
.boot-glow i:nth-child(7) { left: 47%; animation-delay: 4.1s; width: 3px; height: 3px; } .boot-glow i:nth-child(8) { left: 51%; animation-delay: 4.6s; }
@keyframes ember { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 60% { transform: translate(18px, -50vh); opacity: .7; } 100% { transform: translate(-12px, -95vh); opacity: 0; } }
.boot-card { text-align: center; position: relative; }
.boot-mark { width: 96px; height: 96px; margin: 0 auto; border-radius: 28px; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, rgba(255, 180, 84, .28), transparent 70%); animation: breathe 2.8s ease-in-out infinite; }
.boot-mark img { filter: drop-shadow(0 6px 24px rgba(255, 150, 70, .55)); }
@keyframes breathe { 50% { transform: scale(1.05); filter: brightness(1.12); } }
.boot-name { font-family: var(--display); font-size: 34px; font-weight: 600; letter-spacing: -.01em; margin-top: 14px; }
.boot-line { color: var(--muted); margin-top: 4px; font-size: 14px; }
.boot-bar { width: 160px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); margin: 18px auto 0; overflow: hidden; }
.boot-bar i { display: block; width: 40%; height: 100%; border-radius: 3px; background: var(--warm); box-shadow: 0 0 10px rgba(255, 160, 80, .8); animation: bar 1.4s var(--ease) infinite; }
@keyframes bar { from { transform: translateX(-110%); } to { transform: translateX(260%); } }

/* ---------- auth ---------- */
#auth { position: fixed; inset: 0; overflow: auto; z-index: 50; padding: calc(28px + var(--tb)) 20px 40px;
  background: radial-gradient(900px 520px at 30% 100%, rgba(255, 130, 60, .2), transparent 70%), radial-gradient(800px 600px at 85% 0%, rgba(167, 139, 250, .2), transparent 65%), linear-gradient(180deg, #151632, var(--night2)); }
.auth-sky { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.auth-sky::before { content: ""; position: absolute; inset: 0; opacity: .55;
  background-image: radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 8%, #fff 50%, transparent 51%), radial-gradient(1.4px 1.4px at 44% 22%, #ffe9c4 50%, transparent 51%), radial-gradient(1px 1px at 63% 12%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 78% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 90% 9%, #cfe3ff 50%, transparent 51%), radial-gradient(1px 1px at 7% 40%, #fff 50%, transparent 51%), radial-gradient(1.3px 1.3px at 55% 38%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 35% 46%, #fff 50%, transparent 51%); }
.auth-sky .moon { position: absolute; top: 7%; right: 3.5%; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 38% 36%, #fff7e6, #f2d7a8 60%, #d8b47a); box-shadow: 0 0 60px 12px rgba(255, 220, 160, .25), 0 0 160px 40px rgba(255, 200, 140, .1); }
.auth-sky .glow { position: absolute; border-radius: 50%; filter: blur(60px); }
.auth-sky .glow.a { width: 380px; height: 260px; left: 8%; bottom: -60px; background: rgba(255, 130, 60, .35); animation: flicker 4s ease-in-out infinite; }
.auth-sky .glow.b { width: 300px; height: 300px; right: 4%; bottom: 10%; background: rgba(167, 139, 250, .22); }
.auth-sky .glow.c { width: 220px; height: 160px; left: 46%; bottom: 0; background: rgba(255, 143, 199, .18); }
@keyframes flicker { 50% { opacity: .75; transform: scale(1.05); } }
.auth-sky .windows { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; display: flex; align-items: flex-end; justify-content: center; gap: 22px; opacity: .55; }
.auth-sky .windows i { width: 16px; height: 22px; border-radius: 3px; background: #ffc46b; box-shadow: 0 0 16px 4px rgba(255, 170, 80, .45); animation: winglow 6s ease-in-out infinite; animation-delay: var(--d); }
.auth-sky .windows i:nth-child(3n) { height: 34px; background: #c9a6ff; box-shadow: 0 0 16px 4px rgba(167, 139, 250, .45); }
.auth-sky .windows i:nth-child(4n) { margin-bottom: 30px; }
@keyframes winglow { 50% { opacity: .55; } }
.auth-wrap { position: relative; max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1fr 440px; gap: 56px; align-items: center; min-height: calc(100% - 20px); }
.auth-wrap { align-items: start; }
.auth-hero { padding: 9vh 0 20px; position: sticky; top: 0; }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.auth-logo img { width: 46px; height: 46px; filter: drop-shadow(0 4px 18px rgba(255, 150, 70, .5)); }
.auth-logo b { font-family: var(--display); font-size: 24px; font-weight: 600; }
.auth-hero h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.04; letter-spacing: -.02em; font-weight: 600; }
.auth-hero h1 em { font-style: italic; font-weight: 500; background: linear-gradient(90deg, #ffd08a, var(--coral) 60%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-hero .lede { color: #cfcde0; font-size: 17px; max-width: 460px; margin-top: 18px; line-height: 1.55; }
.auth-feats { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-feats li { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.auth-feats li b { color: var(--text); font-weight: 650; }
.f-ic { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--fill2); border: 1px solid var(--glass-line); color: var(--amber); }
.f-ic svg { width: 19px; height: 19px; }
.auth-side { width: 100%; }
.auth-note { text-align: center; margin-top: 14px; }
.card { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow), var(--glass-hi); }
.auth-tabs { display: flex; gap: 4px; background: rgba(0, 0, 0, .28); padding: 4px; border-radius: 13px; margin-bottom: 18px; border: 1px solid var(--glass-line); }
.auth-tabs button { flex: 1; padding: 9px; border-radius: 10px; color: var(--muted); font-weight: 650; transition: background .2s, color .2s; }
.auth-tabs button:hover { color: var(--text); }
.auth-tabs button.on { background: var(--fill3); color: var(--text); box-shadow: var(--glass-hi), 0 2px 8px rgba(0, 0, 0, .25); }
.look-head { margin: 16px 0 8px; }
.field { display: block; margin-bottom: 13px; }
.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 650; letter-spacing: .01em; }
.field small { color: var(--dim); font-size: 12px; display: block; margin-top: 5px; }
.err { color: #ff97a1; font-size: 13.5px; min-height: 20px; margin: 4px 0 8px; }
.invite-banner { background: linear-gradient(135deg, rgba(255, 180, 84, .18), rgba(255, 122, 89, .12)); border: 1px solid rgba(255, 180, 84, .4); border-radius: 16px; padding: 13px 15px; margin-bottom: 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 0 30px rgba(255, 150, 70, .12); }
.ib-fire { font-size: 26px; filter: drop-shadow(0 0 10px rgba(255, 140, 60, .8)); }

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; border-radius: 12px; background: var(--fill2); color: var(--text); font-weight: 650; border: 1px solid var(--glass-line); box-shadow: var(--glass-hi); transition: transform .18s var(--spring), background .15s, border-color .15s, box-shadow .2s, filter .15s; white-space: nowrap; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:hover { background: var(--fill3); border-color: rgba(255, 255, 255, .16); }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--warm); color: #26140a; border-color: transparent; box-shadow: 0 6px 22px rgba(255, 130, 70, .32), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.primary:hover { filter: brightness(1.07); box-shadow: 0 8px 28px rgba(255, 130, 70, .45), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--fill); }
.btn.danger { background: rgba(255, 93, 108, .14); color: #ffb3ba; border-color: rgba(255, 93, 108, .25); }
.btn.danger:hover { background: rgba(255, 93, 108, .22); }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 10px; gap: 6px; }
.btn.small svg { width: 15px; height: 15px; }
.btn.wide { width: 100%; }
.btn.wide + .btn.wide { margin-top: 8px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); font-size: 13px; font-weight: 650; box-shadow: var(--shadow-sm), var(--glass-hi); transition: transform .2s var(--spring), border-color .15s, background .15s; }
.chip svg { width: 16px; height: 16px; flex: none; }
button.chip:hover { border-color: rgba(255, 255, 255, .2); }
button.chip:active { transform: scale(.96); }
.chip-big { padding: 8px 15px 8px 12px; font-size: 14px; }
.chip.warn { border-color: rgba(255, 122, 89, .55); color: #ffc0a8; }
.chip .spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255, 180, 160, .3); border-top-color: var(--coral); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp { height: 12px; }
.tag { font-size: 10.5px; font-weight: 750; padding: 2px 8px; border-radius: 999px; background: var(--fill2); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.tag.amber { background: rgba(255, 180, 84, .16); color: var(--amber); box-shadow: inset 0 0 0 1px rgba(255, 180, 84, .25); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #5d6080; flex: none; box-shadow: 0 0 0 2px var(--night); }
.dot.available { background: var(--sage); } .dot.doing { background: var(--amber); } .dot.away { background: #c9b458; } .dot.busy { background: var(--danger); }
.portrait { border-radius: 50%; background: radial-gradient(circle at 50% 30%, #3b3f6a, #23264a); flex: none; display: block; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.pwrap { position: relative; flex: none; display: block; }
.pwrap .dot { position: absolute; right: -1px; bottom: -1px; }
.pwrap .portrait { transition: box-shadow .2s; }
.pwrap.speaking .portrait { box-shadow: 0 0 0 2px var(--sage), 0 0 16px rgba(127, 209, 160, .75); }
.icon-btn { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); flex: none; transition: background .15s, color .15s, transform .18s var(--spring); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--fill2); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 8px var(--sage); flex: none; animation: livePulse 2.4s ease-in-out infinite; }
@keyframes livePulse { 50% { box-shadow: 0 0 2px var(--sage); opacity: .7; } }

/* ---------- layout ---------- */
#app { position: fixed; inset: 0; background: var(--night2); }
#titlebar { display: none; }
body.desktop { --tb: 36px; }
body.desktop #titlebar { display: flex; position: fixed; top: 0; left: 0; right: 0; height: 36px; z-index: 120; align-items: center; padding-left: 14px; background: linear-gradient(180deg, #10111c, #0c0d17); border-bottom: 1px solid rgba(255, 255, 255, .05); -webkit-app-region: drag; font-size: 12.5px; color: var(--muted); font-weight: 650; }
.tb-name { display: flex; align-items: center; gap: 8px; letter-spacing: .02em; }
.tb-mark { width: 10px; height: 10px; border-radius: 4px; background: var(--warm); box-shadow: 0 0 10px rgba(255, 150, 70, .7); }
.tb-drag { flex: 1; }
.tb-buttons { display: flex; -webkit-app-region: no-drag; height: 100%; }
.tb-buttons button { width: 46px; height: 100%; color: var(--muted); font-size: 13px; transition: background .12s, color .12s; }
.tb-buttons button:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.tb-buttons button.close:hover { background: #e5484d; color: #fff; }
#stage { position: absolute; top: var(--tb); left: var(--rail); right: 0; bottom: 0; overflow: hidden; background: #0d0e18; }
#world { position: absolute; inset: 0; touch-action: none; }
#world canvas { display: block; width: 100%; height: 100%; outline: none; }
#labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 75% 70% at 50% 52%, transparent 60%, rgba(6, 6, 16, .42) 100%), linear-gradient(180deg, rgba(8, 8, 20, .28), transparent 16%, transparent 84%, rgba(8, 8, 20, .34)); z-index: 1; }
#worldOff { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; background: radial-gradient(800px 500px at 50% 40%, #232048, #0d0e18 70%); z-index: 2; }
.world-off { max-width: 380px; display: grid; justify-items: center; gap: 8px; }
.world-off b { font-family: var(--display); font-size: 21px; font-weight: 600; }
.wo-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--fill2); color: var(--amber); margin-bottom: 6px; }
.wo-ic svg { width: 32px; height: 32px; }

/* ---------- sidebar ---------- */
#rail { position: absolute; top: var(--tb); left: 0; bottom: 0; width: var(--rail); z-index: 20; display: flex; flex-direction: column;
  background: radial-gradient(420px 260px at 0% 100%, rgba(255, 140, 70, .08), transparent 70%), radial-gradient(360px 300px at 100% 0%, rgba(167, 139, 250, .08), transparent 70%), linear-gradient(180deg, #171828, #11121e);
  border-right: 1px solid rgba(255, 255, 255, .06); box-shadow: 1px 0 0 rgba(0, 0, 0, .4), 8px 0 30px rgba(0, 0, 0, .25); }
#rail .tabbar { display: none; }
.sb-logo { display: flex; align-items: center; gap: 11px; padding: 18px 20px 14px; flex: none; }
.sb-logo .mark { width: 32px; height: 32px; border-radius: 10px; flex: none; display: block; filter: drop-shadow(0 0 10px rgba(255, 150, 70, .45)); }
.sb-logo b { font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.sb-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 2px 12px 10px; }
.sb-nav { display: flex; flex-direction: column; gap: 1px; }
.sb-nav .nav { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px; border-radius: 11px; color: var(--muted); font-weight: 600; font-size: 14px; position: relative; transition: background .15s, color .15s; text-align: left; }
.sb-nav .nav svg { width: 20px; height: 20px; flex: none; transition: transform .2s var(--spring); }
.sb-nav .nav .lbl { flex: 1; }
.sb-nav .nav:hover { background: var(--fill); color: var(--text); }
.sb-nav .nav:hover svg { transform: scale(1.08); }
.sb-nav .nav.on { color: var(--text); background: linear-gradient(90deg, rgba(255, 180, 84, .16), rgba(255, 180, 84, .04)); box-shadow: inset 0 0 0 1px rgba(255, 180, 84, .16); }
.sb-nav .nav.on svg { color: var(--amber); filter: drop-shadow(0 0 6px rgba(255, 180, 84, .55)); }
.sb-nav .nav.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.sb-nav .nav[data-k="workspace"] { margin-top: 0; }
.sb-nav .nav[data-k="groups"] { margin-top: 10px; }
.sb-nav .nav[data-k="groups"]::after { content: ""; position: absolute; top: -6px; left: 10px; right: 10px; height: 1px; background: rgba(255, 255, 255, .06); }
.count { font-size: 11.5px; font-weight: 700; color: var(--sage); background: rgba(127, 209, 160, .12); padding: 1px 7px; border-radius: 999px; }
.badge { min-width: 18px; height: 18px; border-radius: 9px; background: var(--coral); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; box-shadow: 0 0 10px rgba(255, 122, 89, .6), 0 0 0 2px #151626; }
.sb-block { margin-top: 18px; }
.sb-cap { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); padding: 0 6px 8px; }
.sb-cap .n { margin-left: auto; font-size: 11px; color: var(--muted); background: var(--fill2); border-radius: 999px; padding: 0 7px; letter-spacing: 0; }
.sb-world-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--fill); border: 1px solid var(--glass-line); box-shadow: var(--glass-hi); }
.sb-world-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; color: #26140a; background: linear-gradient(145deg, #ffd08a, var(--coral)); box-shadow: 0 4px 14px rgba(255, 130, 70, .35); }
.sb-world-ic svg { width: 19px; height: 19px; }
.sb-world-card .t { font-weight: 700; font-size: 13.5px; }
.sb-world-card .s { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.sb-world-card .live { width: 6px; height: 6px; }
.who-list { display: flex; flex-direction: column; gap: 1px; }
.who { display: flex; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 11px; text-align: left; transition: background .15s; }
.who:hover { background: var(--fill); }
.who .t { display: block; font-weight: 650; font-size: 13px; }
.who .s { display: block; font-size: 11.5px; color: var(--muted); }
.who .dot { width: 9px; height: 9px; box-shadow: 0 0 0 2px #14152a; }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 12px; opacity: 0; transition: opacity .2s; flex: none; }
.eq i { width: 3px; border-radius: 2px; background: var(--sage); height: 4px; }
.who:has(.pwrap.speaking) .eq { opacity: 1; }
.who:has(.pwrap.speaking) .eq i { animation: eq .7s ease-in-out infinite; }
.who:has(.pwrap.speaking) .eq i:nth-child(2) { animation-delay: .2s; } .who:has(.pwrap.speaking) .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 50% { height: 12px; } }
.sb-empty { font-size: 12.5px; color: var(--dim); padding: 2px 8px; }
.sb-radio { flex: none; margin: 0 12px 10px; padding: 10px; border-radius: 15px; display: grid; grid-template-columns: 40px 1fr auto; grid-template-rows: auto auto; gap: 8px 10px; align-items: center;
  background: linear-gradient(135deg, rgba(167, 139, 250, .14), rgba(255, 122, 89, .08)); border: 1px solid var(--glass-line); box-shadow: var(--glass-hi); }
.rd-art { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 9px; background: radial-gradient(circle at 30% 20%, #4c3a8a, #24204a); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.rd-art i { width: 4px; height: 6px; border-radius: 2px; background: var(--violet); box-shadow: 0 0 6px var(--violet); }
.rd-art.on i { animation: eq .9s ease-in-out infinite; } .rd-art.on i:nth-child(2) { animation-delay: .3s; } .rd-art.on i:nth-child(3) { animation-delay: .15s; } .rd-art.on i:nth-child(4) { animation-delay: .45s; }
.rd-meta { min-width: 0; } .rd-meta .t { display: block; font-weight: 700; font-size: 13px; } .rd-meta .s { display: block; font-size: 11.5px; color: var(--muted); }
.rd-ctl { display: flex; gap: 2px; }
.rd-ctl .play { background: var(--text); color: var(--night); border-radius: 50%; }
.rd-ctl .play:hover { background: #fff; color: var(--night); }
.rd-ctl svg { width: 16px; height: 16px; }
.rd-vol { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.rd-vol svg { width: 16px; height: 16px; flex: none; }
.sb-foot { flex: none; padding: 10px 12px 12px; border-top: 1px solid rgba(255, 255, 255, .06); display: flex; align-items: center; gap: 4px; }
.sb-me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px; border-radius: 13px; text-align: left; transition: background .15s; }
.sb-me:hover, .sb-me.on { background: var(--fill); }
.sb-me .t { display: block; font-weight: 700; font-size: 13.5px; }
.sb-me .s { display: block; font-size: 12px; color: var(--muted); }
.sb-me .gear { color: var(--dim); } .sb-me .gear svg { width: 18px; height: 18px; }
.sb-me:hover .gear { color: var(--text); }
.sb-modes { display: flex; flex-direction: column; gap: 2px; }
.sb-modes .icon-btn { width: 28px; height: 26px; }
.sb-modes .icon-btn svg { width: 15px; height: 15px; }

/* ---------- panels ---------- */
#panel { position: absolute; top: calc(var(--tb) + 10px); left: calc(var(--rail) + 10px); bottom: 10px; width: var(--panel-w); max-width: calc(100vw - var(--rail) - 20px); z-index: 15; display: flex; flex-direction: column;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-line); border-radius: 22px; box-shadow: var(--shadow), var(--glass-hi); overflow: hidden; }
#panel.enter { animation: slideIn .32s var(--ease); }
@keyframes slideIn { from { transform: translateX(-18px); opacity: 0; } }
.p-head { display: flex; align-items: center; gap: 6px; padding: 16px 14px 10px 20px; }
.p-head h2 { font-size: 23px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-head .x, .d-head .x { width: 34px; height: 34px; border-radius: 11px; color: var(--muted); display: grid; place-items: center; flex: none; transition: background .15s, color .15s; }
.p-head .x svg, .d-head .x svg { width: 19px; height: 19px; }
.p-head .x:hover, .d-head .x:hover { background: var(--fill2); color: var(--text); }
#pBack:not([hidden]) + h2 { margin-left: -2px; }
.p-head #pBack { margin-left: -8px; }
.p-body { flex: 1; overflow-y: auto; padding: 4px 16px 22px; }
.p-foot { padding: 10px 12px calc(10px + var(--safe-b)); border-top: 1px solid var(--glass-line); background: rgba(0, 0, 0, .12); }
.tabs { display: flex; gap: 4px; margin: 0 14px 8px; padding: 4px; overflow-x: auto; scrollbar-width: none; background: rgba(0, 0, 0, .22); border: 1px solid var(--glass-line); border-radius: 13px; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1; padding: 7px 12px; border-radius: 9px; color: var(--muted); font-weight: 650; font-size: 13.5px; white-space: nowrap; transition: background .2s, color .2s; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--fill3); color: var(--text); box-shadow: var(--glass-hi), 0 2px 8px rgba(0, 0, 0, .25); }
.section { margin: 20px 0 8px; font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; gap: 10px; }
.section::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--glass-line), transparent); }
.item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 14px; width: 100%; text-align: left; transition: background .15s; }
button.item:hover, .item.click:hover { background: var(--fill); }
.item .t { font-weight: 650; }
.item .s { font-size: 12.5px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 34px 18px; position: relative; line-height: 1.55; }
.empty::before { content: ""; display: block; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; background: radial-gradient(circle at 50% 70%, rgba(255, 180, 84, .5), rgba(255, 122, 89, .08) 60%, transparent 72%), var(--fill); box-shadow: inset 0 0 0 1px var(--glass-line), 0 0 30px rgba(255, 150, 70, .15); }
.empty b { display: block; color: var(--text); margin-bottom: 4px; font-size: 18px; font-family: var(--display); font-weight: 600; }
.empty .btn { margin-top: 4px; }
.list-card { background: var(--fill); border: 1px solid var(--glass-line); border-radius: var(--radius); padding: 13px; margin-bottom: 10px; box-shadow: var(--glass-hi); }

/* ---------- world HUD ---------- */
#hudTop { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; pointer-events: none; z-index: 5; }
#hudTop > * { pointer-events: auto; }
#place { white-space: nowrap; max-width: min(56vw, 420px); display: inline-flex; align-items: center; gap: 8px; }
#place svg:first-child { color: var(--coral); filter: drop-shadow(0 0 6px rgba(255, 122, 89, .6)); }
#place svg:last-child { width: 14px; height: 14px; color: var(--muted); }
#hudRight { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pill-credits .coin { color: var(--amber); display: grid; filter: drop-shadow(0 0 5px rgba(255, 180, 84, .7)); }
.pill-credits .num { color: #ffd59a; font-weight: 750; }
.lvl { display: inline-flex; align-items: center; gap: 6px; }
.lvl .lv { color: var(--muted); font-weight: 650; font-size: 12px; }
.lvl .num { font-weight: 750; }
.lvl .bar { width: 64px; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-left: 4px; }
.lvl .bar i { display: block; height: 100%; border-radius: 4px; background: var(--warm); box-shadow: 0 0 8px rgba(255, 150, 70, .8); }
.chip.deco { background: linear-gradient(135deg, rgba(167, 139, 250, .9), rgba(255, 122, 160, .85)); color: #1a0f2a; border-color: rgba(255, 255, 255, .25); font-weight: 750; box-shadow: 0 6px 24px rgba(167, 139, 250, .45), inset 0 1px 0 rgba(255, 255, 255, .35); }
.chip.deco:hover { filter: brightness(1.08); }
body.decorating .chip.deco { display: none; }
.coach { position: absolute; z-index: 9; width: 290px; padding: 15px 16px 14px; border-radius: 18px; background: var(--glass-solid); border: 1px solid rgba(167, 139, 250, .45); box-shadow: var(--shadow), 0 0 40px rgba(167, 139, 250, .25), var(--glass-hi); animation: pop .35s var(--spring); }
.coach::before { content: ""; position: absolute; top: -7px; right: 34px; width: 12px; height: 12px; transform: rotate(45deg); background: #22233e; border-left: 1px solid rgba(167, 139, 250, .45); border-top: 1px solid rgba(167, 139, 250, .45); }
.coach b { font-family: var(--display); font-size: 17px; font-weight: 600; }
.coach p { color: var(--muted); font-size: 13px; margin: 4px 0 12px; line-height: 1.45; }
#prompt { position: absolute; z-index: 6; transform: translate(-50%, -100%); pointer-events: auto; }
#prompt button { display: inline-flex; align-items: center; gap: 9px; padding: 8px 9px 8px 15px; border-radius: 999px; background: rgba(20, 20, 36, .82); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); color: var(--text); font-weight: 700; font-size: 13.5px; border: 1px solid rgba(255, 180, 84, .55); box-shadow: 0 8px 26px rgba(0, 0, 0, .5), 0 0 22px rgba(255, 160, 70, .3); white-space: nowrap; animation: promptIn .3s var(--spring); transition: transform .18s var(--spring), background .15s; }
#prompt button:hover { background: rgba(36, 30, 40, .92); transform: translateY(-1px); }
#prompt button:active { transform: scale(.96); }
#prompt kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; background: var(--warm); color: #26140a; border-radius: 8px; padding: 0 6px; font: inherit; font-size: 12px; font-weight: 800; box-shadow: 0 2px 0 #b5522f; }
@keyframes promptIn { from { transform: translateY(6px) scale(.85); opacity: 0; } }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
.label { position: absolute; transform: translate(-50%, -100%); text-align: center; white-space: nowrap; will-change: transform; left: 0; top: 0; }
.label .name { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 999px; background: rgba(14, 15, 28, .66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-size: 12px; font-weight: 700; border: 1px solid rgba(255, 255, 255, .1); color: #f6f1e8; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); transition: border-color .2s, box-shadow .2s; }
.label.me .name { color: #ffd08a; border-color: rgba(255, 180, 84, .35); }
.label.focus .name { border-color: var(--amber); box-shadow: 0 0 14px rgba(255, 180, 84, .5); }
.label.speaking .name { border-color: var(--sage); box-shadow: 0 0 14px rgba(127, 209, 160, .65); }
.label .name .dot { width: 7px; height: 7px; box-shadow: 0 0 6px currentColor; }
.label .name .dot.available { color: var(--sage); }
.label .st { display: block; font-size: 10.5px; font-weight: 600; color: #e4e0f2; text-shadow: 0 1px 2px #000, 0 0 8px rgba(0, 0, 0, .8); margin-top: 2px; opacity: .9; }
.label .st:empty { display: none; }
.label .bubble { display: block; margin: 0 auto 6px; max-width: 230px; white-space: normal; background: #fbf6ec; color: #1d1b2c; border-radius: 15px 15px 15px 15px; padding: 6px 12px; font-size: 13px; font-weight: 600; line-height: 1.35; width: fit-content; position: relative; box-shadow: 0 6px 20px rgba(0, 0, 0, .35), 0 0 18px rgba(255, 220, 170, .2); animation: bubbleIn .3s var(--spring); }
.label .bubble::after { content: ""; position: absolute; bottom: -5px; left: 50%; width: 10px; height: 10px; background: #fbf6ec; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.label .bubble.emote { background: none; box-shadow: none; font-size: 30px; padding: 0; animation: floatUp 1.8s ease-out forwards; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4)); }
.label .bubble.emote::after { display: none; }
@keyframes bubbleIn { from { transform: translateY(6px) scale(.7); opacity: 0; } }
@keyframes floatUp { from { transform: translateY(8px) scale(.6); opacity: 0; } 20% { opacity: 1; transform: translateY(0) scale(1.1); } to { transform: translateY(-26px) scale(1); opacity: 0; } }
.label .ic { font-size: 10.5px; }

/* toolbar */
#voicebar { position: absolute; left: 50%; bottom: calc(16px + var(--safe-b)); transform: translateX(-50%); display: flex; align-items: center; gap: 7px; padding: 7px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); z-index: 7; box-shadow: var(--shadow), var(--glass-hi); max-width: calc(100% - 16px); animation: barIn .4s var(--ease); }
@keyframes barIn { from { transform: translate(-50%, 14px); opacity: 0; } }
.vb { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--fill2); color: var(--text); position: relative; flex: none; border: 1px solid transparent; transition: transform .2s var(--spring), background .15s, box-shadow .2s, color .15s; }
.vb svg { width: 20px; height: 20px; }
.vb:hover { background: var(--fill3); transform: translateY(-1px); }
.vb:active { transform: scale(.92); }
.vb.on, .vb.mic { background: radial-gradient(circle at 50% 30%, #9ce6b8, var(--sage) 60%, #4fb07c); color: #0b2316; box-shadow: 0 0 0 1px rgba(127, 209, 160, .6), 0 0 22px rgba(127, 209, 160, .55); }
.vb.tint { background: rgba(127, 209, 160, .16); color: #a8ecc4; border-color: rgba(127, 209, 160, .35); }
.vb.off { background: rgba(255, 93, 108, .16); color: #ff9aa3; border-color: rgba(255, 93, 108, .35); }
.vb.off::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; box-shadow: 0 0 14px rgba(255, 93, 108, .28); pointer-events: none; }
.vb.leave { background: #e5484d; color: #fff; box-shadow: 0 4px 16px rgba(229, 72, 77, .45); }
.vb.leave:hover { background: #f05358; }
.vb.hot { background: var(--warm); color: #26140a; box-shadow: 0 4px 18px rgba(255, 130, 70, .45); }
.vb.wide { width: auto; padding: 0 18px 0 15px; border-radius: 999px; font-weight: 750; gap: 9px; display: inline-flex; align-items: center; }
.vb.join { background: radial-gradient(circle at 30% 20%, #9ce6b8, var(--sage) 55%, #4fb07c); color: #0b2316; box-shadow: 0 4px 22px rgba(127, 209, 160, .45), inset 0 1px 0 rgba(255, 255, 255, .4); }
.vb.join:hover { filter: brightness(1.06); }
.vb .lv { position: absolute; inset: -5px; border-radius: 50%; border: 2px solid #b9f5d1; box-shadow: 0 0 16px rgba(127, 209, 160, .9); opacity: 0; pointer-events: none; transition: opacity .1s; }
.vsep { width: 1px; height: 26px; background: var(--glass-line); margin: 0 3px; }
.sayrow { display: flex; gap: 6px; align-items: center; }
.say-input { width: min(60vw, 340px); border-radius: 999px; padding: 10px 16px; background: rgba(0, 0, 0, .3); }
#dock { position: absolute; right: 14px; top: 66px; display: flex; flex-direction: column; gap: 10px; z-index: 6; max-height: calc(100% - 160px); overflow: auto; align-items: flex-end; }
.tile { width: 300px; max-width: 46vw; background: #000; border: 1px solid var(--glass-line); border-radius: 16px; overflow: hidden; position: relative; box-shadow: var(--shadow); animation: pop .3s var(--spring); flex: none; }
.tile.big { position: fixed; inset: calc(var(--tb) + 14px) 14px 14px calc(var(--rail) + 14px); width: auto; max-width: none; z-index: 30; display: grid; place-items: center; }
.tile canvas { width: 100%; display: block; max-height: 100%; object-fit: contain; }
.tile.big canvas { height: 100%; width: 100%; }
.tile .cap { position: absolute; left: 8px; bottom: 8px; font-size: 12px; font-weight: 700; background: rgba(10, 10, 20, .7); backdrop-filter: blur(8px); padding: 3px 10px 3px 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.tile .tools { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; opacity: .85; }
.tile .tools button { width: 30px; height: 30px; border-radius: 9px; background: rgba(10, 10, 20, .7); display: grid; place-items: center; backdrop-filter: blur(8px); }
.tile .tools svg { width: 16px; height: 16px; }
.tile .tools button:hover { background: rgba(40, 40, 60, .9); }
.partychip { display: flex; align-items: center; gap: 9px; padding: 6px 7px 6px 13px; border-radius: 999px; background: linear-gradient(135deg, rgba(127, 209, 160, .2), rgba(20, 22, 38, .85)); backdrop-filter: var(--blur); border: 1px solid rgba(127, 209, 160, .5); font-size: 13px; font-weight: 700; box-shadow: var(--shadow-sm), 0 0 20px rgba(127, 209, 160, .2); flex: none; }
.partychip .pc-l { display: inline-flex; align-items: center; gap: 7px; }
.partychip.private { background: linear-gradient(135deg, rgba(167, 139, 250, .25), rgba(20, 22, 38, .85)); border-color: rgba(167, 139, 250, .6); box-shadow: var(--shadow-sm), 0 0 20px rgba(167, 139, 250, .25); }
.partychip.private .live { background: var(--violet); box-shadow: 0 0 8px var(--violet); }
.partychip .stack { display: flex; }
.partychip .stack .portrait { margin-left: -8px; box-shadow: 0 0 0 2px #1a1c2e; }
.partychip .stack .portrait:first-child { margin-left: 0; }

/* Daily Vibes */
#daily { position: absolute; right: 14px; bottom: calc(16px + var(--safe-b)); width: 272px; z-index: 6; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow), var(--glass-hi); overflow: hidden; animation: pop .35s var(--spring); }
#stage.has-tiles #daily, body.decorating #daily { display: none; }
.dv-head { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 12px 11px 11px; text-align: left; transition: background .15s; }
.dv-head:hover { background: var(--fill); }
.dv-head .t { display: block; font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.2; }
.dv-head .s { display: block; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dv-head .chev { color: var(--muted); transition: transform .25s var(--ease); }
.dv-head .chev svg { width: 17px; height: 17px; }
#daily.closed .chev { transform: rotate(180deg); }
.dv-ring { --p: 0; width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--amber) calc(var(--p) * 1%), rgba(255, 255, 255, .1) 0); box-shadow: 0 0 14px rgba(255, 170, 80, .3); position: relative; }
.dv-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #1a1b2f; }
.dv-ring b { position: relative; font-size: 13px; font-variant-numeric: tabular-nums; }
.dv-list { padding: 0 8px 9px; display: flex; flex-direction: column; gap: 1px; }
.dv-row { display: flex; align-items: center; gap: 10px; padding: 6px 7px; border-radius: 10px; font-size: 13px; font-weight: 600; text-align: left; color: #e6e2ef; transition: background .15s; }
.dv-row:hover { background: var(--fill); }
.dv-row[disabled] { cursor: default; }
.dv-row[disabled]:hover { background: none; }
.dv-row .tick { width: 18px; height: 18px; border-radius: 6px; flex: none; border: 1.5px solid rgba(255, 255, 255, .25); display: grid; place-items: center; }
.dv-row .tick svg { width: 13px; height: 13px; stroke-width: 3; }
.dv-row.done { color: var(--muted); }
.dv-row.done .grow { text-decoration: line-through; text-decoration-color: rgba(166, 168, 195, .5); }
.dv-row.done .tick { background: var(--sage); border-color: var(--sage); color: #0b2316; box-shadow: 0 0 10px rgba(127, 209, 160, .5); }
.dv-row .cnt { font-size: 11px; color: var(--dim); }
.dv-row .rp { font-size: 11.5px; font-weight: 750; color: var(--amber); }
.dv-row.done .rp { color: var(--dim); }

/* ---------- Decorate ---------- */
#decorate { position: absolute; top: calc(var(--tb) + 10px); right: 10px; bottom: 10px; width: 412px; max-width: calc(100vw - var(--rail) - 20px); z-index: 16; display: flex; flex-direction: column;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-line); border-radius: 22px; box-shadow: var(--shadow), var(--glass-hi); overflow: hidden; animation: sheetIn .38s var(--ease); }
#decorate.leaving { animation: sheetOut .2s ease-in forwards; }
@keyframes sheetIn { from { transform: translateX(26px); opacity: 0; } }
@keyframes sheetOut { to { transform: translateX(26px); opacity: 0; } }
#decorate::before { content: ""; position: absolute; top: -120px; right: -80px; width: 300px; height: 240px; background: radial-gradient(closest-side, rgba(167, 139, 250, .22), transparent); pointer-events: none; }
.d-grab { display: none; }
.d-head { display: flex; align-items: center; gap: 12px; padding: 16px 14px 10px 18px; position: relative; }
.d-head h2 { font-size: 24px; line-height: 1.1; }
.d-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; color: #1a0f2a; background: linear-gradient(140deg, #c9b6ff, var(--violet) 45%, #ff8fc7); box-shadow: 0 6px 20px rgba(167, 139, 250, .45), inset 0 1px 0 rgba(255, 255, 255, .45); }
.d-ic svg { width: 21px; height: 21px; }
.d-ic.big { width: 56px; height: 56px; border-radius: 18px; } .d-ic.big svg { width: 28px; height: 28px; }
.d-tabs { display: flex; gap: 4px; margin: 2px 16px 6px; padding: 4px; background: rgba(0, 0, 0, .25); border: 1px solid var(--glass-line); border-radius: 14px; }
.d-tabs button { flex: 1; padding: 8px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--muted); transition: background .2s, color .2s; }
.d-tabs button:hover { color: var(--text); }
.d-tabs button.on { background: var(--fill3); color: var(--text); box-shadow: var(--glass-hi), 0 2px 8px rgba(0, 0, 0, .3); }
.d-body { flex: 1; overflow-y: auto; padding: 10px 16px 22px; }
.d-foot { padding: 12px 16px calc(14px + var(--safe-b)); border-top: 1px solid var(--glass-line); background: rgba(0, 0, 0, .14); }
.d-loading { display: flex; gap: 6px; justify-content: center; padding: 40px; }
.d-loading i { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); animation: dl 1s ease-in-out infinite; }
.d-loading i:nth-child(2) { animation-delay: .15s; } .d-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes dl { 50% { transform: translateY(-6px); opacity: .5; } }
.d-card { padding: 14px; border-radius: 16px; background: var(--fill); border: 1px solid var(--glass-line); box-shadow: var(--glass-hi); }
.d-card.describe { background: linear-gradient(160deg, rgba(167, 139, 250, .12), rgba(255, 255, 255, .03)); }
.d-cap { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.d-result { margin-top: 10px; padding: 13px 14px; border-radius: 15px; background: rgba(255, 180, 84, .08); border: 1px solid rgba(255, 180, 84, .3); animation: pop .3s var(--spring); }
.d-result ul { margin: 6px 0 12px; padding-left: 18px; color: var(--muted); font-size: 13px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.theme-card { border-radius: 14px; padding: 8px 8px 9px; border: 1px solid var(--glass-line); text-align: left; background: var(--fill); transition: transform .2s var(--spring), border-color .15s, box-shadow .2s; }
.theme-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .2); }
.theme-card.on { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 0 18px rgba(255, 180, 84, .3); }
.theme-card .sw { display: flex; height: 34px; border-radius: 9px; overflow: hidden; margin-bottom: 7px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.theme-card .sw i { flex: 1; }
.theme-card .sw i:last-child { box-shadow: inset 0 0 10px rgba(255, 255, 255, .4); }
.theme-card b { font-size: 12.5px; font-weight: 700; }
.d-pick { margin-bottom: 12px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { padding: 6px 11px; border-radius: 10px; background: var(--fill2); font-size: 13px; font-weight: 650; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, transform .18s var(--spring), box-shadow .2s; }
.opt:hover { background: var(--fill3); }
.opt:active { transform: scale(.95); }
.opt.on { background: var(--warm); color: #26140a; box-shadow: 0 4px 14px rgba(255, 140, 70, .35); }
.opt .og { font-size: 14px; }
.d-wallet { display: flex; align-items: center; gap: 12px; padding: 4px 2px 0; }
.d-wallet .chip { box-shadow: none; backdrop-filter: none; background: rgba(255, 180, 84, .1); border-color: rgba(255, 180, 84, .3); }
.slot-row { padding: 12px; border-radius: 16px; background: var(--fill); border: 1px solid var(--glass-line); margin-bottom: 8px; transition: border-color .3s, box-shadow .3s; }
.slot-row.pick { border-color: rgba(167, 139, 250, .8); box-shadow: 0 0 0 1px rgba(167, 139, 250, .6), 0 0 26px rgba(167, 139, 250, .3); animation: pickPulse 1.6s ease-out; }
@keyframes pickPulse { 0% { box-shadow: 0 0 0 6px rgba(167, 139, 250, .5); } }
.slot-row { padding: 0; overflow: hidden; scroll-margin-top: 6px; }
.slot-row.open { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); }
.slot-top { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; text-align: left; transition: background .15s; }
.slot-top:hover { background: var(--fill); }
.slot-act { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--amber); padding: 4px 6px 4px 10px; border-radius: 999px; background: rgba(255, 180, 84, .1); flex: none; }
.slot-act svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.slot-row.open .slot-act { color: var(--text); background: var(--fill2); }
.slot-row.open .slot-act svg { transform: rotate(180deg); }
.slot-row .slot-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; padding: 2px 12px 12px; margin: 0; overflow: visible; animation: optsIn .3s var(--ease); }
.slot-row .pick-chip { width: auto; }
@keyframes optsIn { from { opacity: 0; transform: translateY(-4px); } }
.slot-g { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; flex: none; background: rgba(0, 0, 0, .25); border: 1px dashed rgba(255, 255, 255, .18); filter: grayscale(.7); opacity: .7; }
.slot-g.has { filter: none; opacity: 1; border-style: solid; border-color: rgba(255, 180, 84, .35); background: radial-gradient(circle at 50% 70%, rgba(255, 180, 84, .25), rgba(0, 0, 0, .2)); box-shadow: 0 0 16px rgba(255, 170, 80, .15); }
.slot-top .t { font-weight: 700; font-size: 14px; }
.slot-top .s { font-size: 12.5px; color: var(--muted); }
.slot-opts { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin: 0 -2px; scrollbar-width: thin; }
.pick-chip { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; width: 84px; padding: 8px 4px 7px; border-radius: 13px; background: rgba(0, 0, 0, .2); border: 1px solid var(--glass-line); transition: transform .2s var(--spring), border-color .15s, background .15s; text-align: center; }
.pick-chip:hover { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .05); transform: translateY(-2px); }
.pick-chip:active { transform: scale(.95); }
.pick-chip .g { font-size: 22px; line-height: 1.1; }
.pick-chip .n { font-size: 11.5px; font-weight: 650; line-height: 1.2; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pick-chip .p { font-size: 11px; font-weight: 750; color: var(--amber); display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.pick-chip .p svg { width: 11px; height: 11px; }
.pick-chip.on { border-color: var(--amber); background: rgba(255, 180, 84, .12); box-shadow: 0 0 0 1px var(--amber), 0 0 14px rgba(255, 180, 84, .25); }
.pick-chip.shop { border-style: dashed; }
.pick-chip.shop .g { filter: saturate(.6); }
.pick-chip.locked .p { color: var(--dim); }
.pick-chip[disabled] { opacity: .5; cursor: default; transform: none; }
.door-cards { display: grid; gap: 8px; }
.door-card { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 12px; border-radius: 16px; background: var(--fill); border: 1px solid var(--glass-line); transition: border-color .15s, box-shadow .2s, transform .2s var(--spring); }
.door-card:hover { border-color: rgba(255, 255, 255, .2); }
.door-card .g { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; background: rgba(0, 0, 0, .25); }
.door-card b { font-size: 14.5px; }
.door-card .s { font-size: 12.5px; color: var(--muted); }
.door-card.on { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 0 20px rgba(255, 180, 84, .2); }
.door-card.on .g { background: rgba(255, 180, 84, .18); }
#decorate .toggle-row { margin-top: 10px; background: var(--fill); border: 1px solid var(--glass-line); }
.deco-promo { text-align: center; padding: 26px 18px; display: grid; justify-items: center; gap: 8px; border-radius: 20px; margin-top: 6px; background: radial-gradient(260px 180px at 50% 0%, rgba(167, 139, 250, .2), transparent 70%), var(--fill); border: 1px solid var(--glass-line); }
.deco-promo b { font-family: var(--display); font-size: 20px; font-weight: 600; }
.deco-promo p { max-width: 300px; margin-bottom: 8px; }

/* ---------- toasts & modals ---------- */
#toasts { position: fixed; top: calc(var(--tb) + 14px + var(--safe-t)); left: calc(50% + var(--rail) / 2); transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(440px, calc(100vw - var(--rail) - 24px)); pointer-events: none; }
.toast { pointer-events: auto; max-width: 100%; background: var(--glass-solid); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-line); border-radius: 999px; padding: 7px 16px 7px 8px; box-shadow: var(--shadow), var(--glass-hi); display: flex; gap: 10px; align-items: center; animation: toastIn .4s var(--spring); cursor: default; }
.toast:not(:has(.ta)) { cursor: pointer; }
.toast:has(.ta), .toast:has(.tt b) { border-radius: 20px; width: 100%; padding: 10px 12px; }
.toast.out { opacity: 0; transform: translateY(-10px) scale(.96); transition: all .22s var(--ease); }
.toast .ti { font-size: 18px; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--fill2); }
.toast .portrait { box-shadow: 0 0 0 2px rgba(255, 255, 255, .1); }
.toast .tt { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.4; }
.toast .tt b { display: block; font-weight: 750; }
.toast .ta { display: flex; gap: 6px; flex: none; }
.toast.award { border-color: rgba(255, 180, 84, .5); box-shadow: var(--shadow), 0 0 26px rgba(255, 170, 80, .25); }
.toast.award .ti { background: rgba(255, 180, 84, .2); }
.toast.call { border-color: rgba(127, 209, 160, .7); box-shadow: var(--shadow), 0 0 26px rgba(127, 209, 160, .3); }
@keyframes toastIn { from { transform: translateY(-14px) scale(.94); opacity: 0; } }
#modals:empty { display: none; }
.modal-back { position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(10, 10, 24, .45), rgba(6, 6, 14, .72)); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 80; display: grid; place-items: center; padding: calc(var(--tb) + 14px) 14px 14px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--glass-solid); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-line); border-radius: 24px; width: min(460px, 100%); max-height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow), 0 0 0 1px rgba(0, 0, 0, .3), var(--glass-hi); animation: modalIn .35s var(--spring); overflow: hidden; }
@keyframes modalIn { from { transform: translateY(12px) scale(.96); opacity: 0; } }
.modal.wide { width: min(780px, 100%); }
.modal .m-head { display: flex; align-items: center; padding: 18px 14px 6px 22px; gap: 10px; }
.modal { position: relative; }
.modal.untitled .m-head { position: absolute; top: 0; right: 0; padding: 12px 12px 0 0; z-index: 1; }
.modal.untitled .m-head h3 { display: none; }
.modal.untitled .m-body { padding-top: 22px; }
.modal .m-head h3 { flex: 1; font-size: 21px; }
.modal .m-head .x { width: 34px; height: 34px; padding: 0; border-radius: 11px; border: 0; color: var(--muted); }
.modal .m-head .x svg { width: 18px; height: 18px; }
.modal .m-body { padding: 8px 22px 18px; overflow-y: auto; }
.modal .m-foot { padding: 12px 18px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .05); background: rgba(0, 0, 0, .12); }
.modal .m-body > .row:first-child .portrait { box-shadow: 0 0 0 3px rgba(255, 255, 255, .08), 0 8px 24px rgba(0, 0, 0, .4); }
.sheet-list { display: flex; flex-direction: column; gap: 2px; }
.sheet-list button { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 14px; text-align: left; font-weight: 650; transition: background .15s, transform .18s var(--spring); }
.sheet-list button:hover { background: var(--fill2); }
.sheet-list button:active { transform: scale(.985); }
.sheet-list button .e { font-size: 19px; width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--fill); border: 1px solid var(--glass-line); }
.sheet-list button .sl { flex: 1; min-width: 0; }
.sheet-list button small { display: block; color: var(--muted); font-weight: 450; font-size: 12.5px; line-height: 1.35; }
.sheet-list button .chev { color: var(--dim); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .2s var(--ease); }
.sheet-list button .chev svg { width: 16px; height: 16px; }
.sheet-list button:hover .chev { opacity: 1; transform: none; }
.sheet-list button[disabled] { opacity: .45; pointer-events: none; }
.welcome .lede { color: #d8d5e6; margin-bottom: 8px; }
.tip { display: flex; gap: 13px; align-items: flex-start; padding: 10px 0; }
.tip b { font-weight: 700; }
.tip-ic { width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--fill2); }
.tip-ic svg { width: 20px; height: 20px; }
.tip-ic.amber { color: var(--amber); background: rgba(255, 180, 84, .12); } .tip-ic.sage { color: var(--sage); background: rgba(127, 209, 160, .12); }
.tip-ic.violet { color: var(--violet); background: rgba(167, 139, 250, .14); } .tip-ic.coral { color: var(--coral); background: rgba(255, 122, 89, .12); }
.welcome-modal { background: radial-gradient(420px 220px at 50% 0%, rgba(255, 150, 70, .16), transparent 70%), var(--glass-solid); }

/* ---------- chat ---------- */
.msgs { display: flex; flex-direction: column; gap: 3px; padding-bottom: 8px; }
.msg { max-width: 82%; padding: 8px 13px; border-radius: 18px 18px 18px 6px; background: var(--fill2); align-self: flex-start; word-wrap: break-word; overflow-wrap: anywhere; line-height: 1.42; border: 1px solid var(--glass-line); animation: msgIn .25s var(--ease); }
.msg.mine { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: linear-gradient(135deg, #ffbf6a, #ff8a62); color: #2a1408; border-color: transparent; box-shadow: 0 4px 14px rgba(255, 130, 70, .22); }
@keyframes msgIn { from { transform: translateY(4px); opacity: 0; } }
.msg .who { font-size: 11.5px; font-weight: 750; color: var(--amber); display: block; }
.msg-time { align-self: center; font-size: 11px; color: var(--dim); margin: 10px 0 3px; font-weight: 600; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 120px; border-radius: 22px; padding: 11px 16px; }
.composer .send { width: 44px; height: 44px; }
.gicon { display: grid !important; place-items: center; color: var(--amber); background: radial-gradient(circle at 50% 30%, rgba(255, 180, 84, .25), rgba(255, 255, 255, .04)); }
.gicon svg { width: 22px; height: 22px; }
.c-meta { text-align: right; display: grid; justify-items: end; gap: 4px; }
.unread { min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--coral); color: #fff; box-shadow: 0 0 10px rgba(255, 122, 89, .55); }

/* ---------- feed ---------- */
.compose-card { border-radius: 18px; }
.compose-prompt { text-align: left; color: var(--muted); padding: 10px 14px; border-radius: 999px; background: rgba(0, 0, 0, .2); border: 1px solid var(--glass-line); transition: border-color .15s, color .15s; }
.compose-prompt:hover { border-color: rgba(255, 255, 255, .2); color: var(--text); }
.post { background: var(--fill); border: 1px solid var(--glass-line); border-radius: 18px; margin-bottom: 12px; overflow: hidden; box-shadow: var(--glass-hi); }
.post .ph { display: flex; gap: 10px; align-items: center; padding: 12px 12px 6px; }
.post .ph .t { font-weight: 700; }
.post .ptext { padding: 4px 15px 10px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.post img.media, .post video.media { width: 100%; max-height: 460px; object-fit: contain; background: #000; display: block; }
.post audio.media { width: calc(100% - 24px); margin: 4px 12px; }
.post .pa { display: flex; gap: 5px; padding: 8px 10px; align-items: center; flex-wrap: wrap; }
.react { padding: 4px 10px; border-radius: 999px; background: var(--fill2); font-size: 14px; display: inline-flex; gap: 5px; align-items: center; border: 1px solid transparent; transition: transform .2s var(--spring), background .15s; }
.react:hover { background: var(--fill3); transform: translateY(-1px); }
.react:active { transform: scale(.9); }
.react.on { background: rgba(255, 180, 84, .18); border-color: rgba(255, 180, 84, .55); }
.react small { font-weight: 750; font-size: 12px; }
.comments { padding: 6px 12px 12px; border-top: 1px solid var(--glass-line); }
.comment { padding: 5px 2px; font-size: 13.5px; overflow-wrap: anywhere; }
.comment b { margin-right: 6px; }
.comments input { margin-top: 6px; border-radius: 999px; padding: 8px 14px; font-size: 13.5px; }
.recorder video { width: 100%; border-radius: 14px; background: #000; max-height: 46vh; }
.seg { display: flex; background: rgba(0, 0, 0, .25); padding: 3px; border-radius: 12px; gap: 3px; border: 1px solid var(--glass-line); flex-wrap: wrap; }
.seg button { flex: 1; padding: 7px 10px; border-radius: 9px; color: var(--muted); font-weight: 650; font-size: 13px; transition: background .2s, color .2s; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--fill3); color: var(--text); box-shadow: var(--glass-hi), 0 2px 8px rgba(0, 0, 0, .25); }

/* ---------- homestead ---------- */
.needs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.need .nl { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 650; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.need .nb { height: 7px; border-radius: 5px; background: rgba(0, 0, 0, .3); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.need .nb i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #5fbf88, var(--sage)); box-shadow: 0 0 8px rgba(127, 209, 160, .5); transition: width .5s var(--ease); }
.need.low .nb i { background: var(--warm); box-shadow: 0 0 8px rgba(255, 160, 80, .5); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shop-card { background: var(--fill); border: 1px solid var(--glass-line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 6px; transition: transform .2s var(--spring), border-color .15s; box-shadow: var(--glass-hi); }
.shop-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .18); }
.shop-card .big { font-size: 28px; line-height: 1; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, rgba(255, 180, 84, .2), rgba(0, 0, 0, .2)); }
.shop-card.locked { opacity: .5; }
.price { color: var(--amber); font-weight: 750; }
.proj .pb { height: 9px; border-radius: 6px; background: rgba(0, 0, 0, .3); overflow: hidden; margin: 8px 0; }
.proj .pb i { display: block; height: 100%; background: linear-gradient(90deg, var(--sage), var(--sky)); box-shadow: 0 0 10px rgba(124, 196, 255, .5); }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); transition: transform .2s var(--spring); }
.swatch:hover { transform: scale(1.1); }
.swatch.on { border-color: var(--text); box-shadow: 0 0 0 2px rgba(255, 180, 84, .5); }
.avatar-stage { height: 230px; border-radius: 18px; background: radial-gradient(260px 200px at 50% 75%, rgba(255, 150, 70, .25), transparent 70%), radial-gradient(300px 220px at 50% 30%, #34306a, #1b1d2e 80%); position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px var(--glass-line); }
.avatar-stage canvas { width: 100%; height: 100%; display: block; }
.qr { background: #fff; padding: 12px; border-radius: 16px; width: fit-content; margin: 0 auto; box-shadow: 0 0 30px rgba(255, 220, 170, .15); }
.qr img, .qr canvas { display: block; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { font-size: 13px; }

/* ---------- mini mode ---------- */
#mini { position: fixed; inset: 0; background: radial-gradient(300px 140px at 0% 100%, rgba(255, 140, 70, .14), transparent 70%), linear-gradient(180deg, #1c1d31, #131423); display: flex; flex-direction: column; padding: 9px 10px; gap: 7px; z-index: 70; -webkit-app-region: drag; border: 1px solid rgba(255, 255, 255, .06); }
#mini button, #mini .nodrag { -webkit-app-region: no-drag; }
body.mode-mini .toast, body.mode-mini .modal-back { -webkit-app-region: no-drag; }
#mini .m-top { display: flex; align-items: center; gap: 8px; }
#mini .m-name { font-weight: 750; font-size: 13px; }
#mini .m-sub { font-size: 11.5px; }
#mini .m-friends { display: flex; gap: 6px; overflow-x: auto; flex: 1; align-items: center; scrollbar-width: none; }
#mini .mb { width: 30px; height: 30px; border-radius: 10px; background: var(--fill2); display: grid; place-items: center; flex: none; transition: background .15s; }
#mini .mb:hover { background: var(--fill3); }
#mini .mb svg { width: 16px; height: 16px; }
#mini .mb.on { background: var(--sage); color: #0f2318; box-shadow: 0 0 12px rgba(127, 209, 160, .5); }
#mini .mb.off { background: rgba(255, 93, 108, .22); color: #ff9aa3; }
body.mode-mini #stage, body.mode-mini #rail, body.mode-mini #panel, body.mode-mini #decorate, body.mode-mini #titlebar { display: none !important; }
#game { position: fixed; inset: var(--tb) 0 0 0; z-index: 40; background: var(--night); }
body.in-game #toasts { top: calc(var(--tb) + 84px + var(--safe-t)); left: 50%; width: min(380px, calc(100vw - 20px)); }

/* ---------- icon rail: 761–1099px ---------- */
@media (max-width: 1099px) and (min-width: 761px) {
  :root { --rail: 68px; --panel-w: 380px; }
  .sb-logo { padding: 16px 0 12px; justify-content: center; }
  .sb-logo b, .sb-nav .nav .lbl, .sb-nav .count, .sb-block, .sb-radio, .sb-me .grow, .sb-me .gear { display: none; }
  .sb-scroll { padding: 2px 10px 10px; }
  .sb-nav .nav { justify-content: center; padding: 0; height: 42px; }
  .sb-nav .nav svg { width: 21px; height: 21px; }
  .sb-nav .nav.on::before { left: -10px; }
  .sb-nav .nav .badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; font-size: 10px; }
  .sb-nav .nav[data-k="groups"]::after { left: 8px; right: 8px; }
  .sb-foot { flex-direction: column; padding: 8px 0 12px; }
  .sb-me { flex: none; justify-content: center; }
  #daily { width: 244px; }
}
@media (min-width: 761px) {
  body.panel-open #voicebar { left: calc(50% + var(--panel-w) / 2 + 5px); max-width: calc(100% - var(--panel-w) - 30px); }
  body.panel-open #voicebar.joined { gap: 4px; }
  body.panel-open #hudTop { left: calc(var(--panel-w) + 24px); }
  body.decorating #toasts { left: calc(50% + var(--rail) / 2 - 216px); width: min(440px, calc(100vw - var(--rail) - 460px)); }
  body.decorating #voicebar { left: calc(50% - 216px); }
}
/* with a panel open the voice bar centres in what is left of the stage and runs into the card: lift the card above it */
@media (max-width: 1900px) and (min-width: 1361px) {
  body.panel-open #daily { bottom: calc(84px + var(--safe-b)); }
}
@media (max-width: 1360px) and (min-width: 761px) {
  #daily { bottom: calc(84px + var(--safe-b)); }
  body.panel-open #daily { display: none; }
}
@media (max-height: 780px) and (min-width: 1100px) {
  .sb-logo { padding: 14px 20px 10px; }
  .sb-nav .nav { height: 34px; }
  .sb-block { margin-top: 12px; }
}
@media (max-height: 640px) { #daily { display: none; } }

/* ---------- narrow screens: phones and the Desktop Companion ---------- */
@media (max-width: 760px) {
  :root { --rail: 0px; --tabbar: calc(62px + var(--safe-b)); }
  #stage { left: 0; bottom: var(--tabbar); }
  #rail { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: var(--tabbar); padding: 0 6px var(--safe-b); border-right: 0; border-top: 1px solid var(--glass-line); flex-direction: row; background: rgba(17, 18, 31, .94); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: 0 -10px 30px rgba(0, 0, 0, .3); }
  #rail > :not(.tabbar) { display: none !important; }
  #rail .tabbar { display: flex; flex: 1; justify-content: space-around; align-items: center; }
  .tabbar .nav { flex: 1; height: 54px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); position: relative; transition: color .15s; }
  .tabbar .nav svg { width: 22px; height: 22px; transition: transform .25s var(--spring); }
  .tabbar .nav .lbl { font-size: 10.5px; font-weight: 700; }
  .tabbar .nav.on { color: var(--amber); }
  .tabbar .nav.on svg { transform: translateY(-1px); filter: drop-shadow(0 0 6px rgba(255, 180, 84, .6)); }
  .tabbar .nav.on::before { content: ""; position: absolute; top: 0; width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
  .tabbar .nav .portrait { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .15); }
  .tabbar .nav.on .portrait { box-shadow: 0 0 0 2px var(--amber); }
  .tabbar .nav .badge { position: absolute; right: calc(50% - 22px); top: 4px; min-width: 16px; height: 16px; font-size: 10px; }
  #panel { left: 0; right: 0; top: var(--tb); bottom: var(--tabbar); width: auto; max-width: none; border-radius: 0; border: 0; padding-top: var(--safe-t); background: var(--glass-solid); }
  #panel.enter { animation: panelUp .3s var(--ease); }
  @keyframes panelUp { from { transform: translateY(16px); opacity: 0; } }
  #decorate { left: 0; right: 0; top: auto; bottom: var(--tabbar); width: auto; max-width: none; height: min(64%, 560px); border-radius: 24px 24px 0 0; border-bottom: 0; animation: upIn .35s var(--ease); background: var(--glass-solid); }
  #decorate.leaving { animation: upOut .2s ease-in forwards; }
  @keyframes upIn { from { transform: translateY(40px); opacity: 0; } }
  @keyframes upOut { to { transform: translateY(40px); opacity: 0; } }
  .d-grab { display: block; width: 40px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .2); margin: 8px auto 0; flex: none; }
  .d-head { padding-top: 8px; }
  body.decorating #voicebar { display: none; }
  #hudTop { top: calc(10px + var(--safe-t)); left: 10px; right: 10px; }
  #place { max-width: 52vw; }
  .lvl .bar { display: none; }
  #voicebar { bottom: 12px; gap: 5px; padding: 6px; }
  .vb { width: 42px; height: 42px; }
  .tile { width: 180px; }
  .tile.big { inset: calc(var(--tb) + 6px) 6px calc(var(--tabbar) + 6px) 6px; }
  #dock { top: 58px; right: 10px; }
  #daily { display: none; }
  #toasts { left: 50%; width: calc(100vw - 20px); top: calc(var(--tb) + 10px + var(--safe-t)); }
  /* phones: the buttons go on their own row so the title and text are not squeezed into a column */
  .toast:has(.ta) { flex-wrap: wrap; row-gap: 8px; }
  .toast:has(.ta) .tt { min-width: calc(100% - 60px); }
  .toast .ta { width: 100%; justify-content: flex-end; }
  .toast .ta .btn { flex: 0 1 auto; }
  .modal-back { align-items: end; padding: 0; }
  .modal { border-radius: 24px 24px 0 0; width: 100%; max-height: 92%; padding-bottom: var(--safe-b); animation: upIn .32s var(--ease); }
  .modal::before { content: ""; position: absolute; left: 50%; top: 7px; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: rgba(255, 255, 255, .18); z-index: 2; }
  .modal { position: relative; }
  #game { inset: var(--tb) 0 0 0; }
  .coach { width: min(290px, calc(100vw - 24px)); }
  .set-row .seg { min-width: 0; width: 100%; }
  .slider { width: 100%; }
}
/* the sign-in screen stacks on smaller windows */
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 18px; max-width: 460px; min-height: 0; }
  .auth-hero { padding: 0; position: static; }
  .auth-sky .moon { width: 40px; height: 40px; top: 18px; right: 18px; }
  .auth-logo { margin-bottom: 14px; }
  .auth-hero h1 { font-size: 34px; }
  .auth-hero .lede { font-size: 15px; margin-top: 10px; }
  .auth-feats { display: none; }
}
@media (max-height: 520px) and (min-width: 761px) { #dock { top: 58px; } }

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