/* WalkiTalki app styles. Mobile first; the desktop layout starts at 900px. */
html, body { height: 100%; }
body { overscroll-behavior-y: none; }
#root { min-height: 100%; }
.muted { color: var(--text-2); }
.center { text-align: center; }
.mono { font-family: var(--mono); font-size: 14px; }
.ic { width: 20px; height: 20px; flex: none; }

/* ---------- boot ---------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; }
.boot-mark { width: 56px; height: 56px; border-radius: 18px; background: var(--grad); animation: breathe 1.4s var(--ease) infinite; }
@keyframes breathe { 0%, 100% { transform: scale(0.9); opacity: 0.6; } 50% { transform: scale(1); opacity: 1; } }

/* ---------- shared bits ---------- */
.brand-row { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--text); }
.brand-row:hover { text-decoration: none; }
.logo-mark { width: 36px; height: 36px; flex: none; }
.brand-sm .logo-mark { width: 32px; height: 32px; }
.brand-sm { font-size: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); box-shadow: var(--shadow); }
.stack { display: grid; gap: 16px; }
.seg { display: flex; padding: 4px; gap: 4px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; }
.seg button { flex: 1; min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button[aria-selected="true"], .seg button[aria-checked="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.seg .save { font-size: 12px; color: var(--rx); font-weight: 700; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--text-2); }
.chip .ic { width: 16px; height: 16px; }
.chip.sm { padding: 3px 10px; font-size: 13px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--text); font-size: 15px; }
.note.warn { background: var(--warn-soft); }
.note .ic { margin-top: 2px; color: var(--accent); }
.note.warn .ic { color: var(--warn); }
.fine { font-size: 13px; color: var(--text-3); text-align: center; }
.is-busy { position: relative; color: transparent !important; }
.is-busy::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-secondary.is-busy::after, .btn-ghost.is-busy::after { border-color: var(--border); border-top-color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

.avatar {
  --size: 40px;
  width: var(--size); height: var(--size); flex: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--av); color: #fff; font-weight: 750; font-size: calc(var(--size) * 0.38); letter-spacing: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.12);
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
}

.switch { appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-strong); position: relative; cursor: pointer; flex: none; transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s var(--ease); }
.switch:checked { background: var(--accent); border-color: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { box-shadow: var(--focus); }

/* ---------- auth ---------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
.auth-brand { display: none; }
.auth-form-wrap { display: grid; place-items: center; padding: calc(24px + var(--safe-top)) 16px calc(24px + var(--safe-bottom)); }
.auth-card { width: 100%; max-width: 420px; display: grid; gap: 18px; }
.auth-card h1 { font-size: 30px; }
.auth-card .brand-row { margin-bottom: 8px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.invite-banner { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--rx-soft); border: 1px solid color-mix(in srgb, var(--rx) 40%, transparent); font-size: 15px; }
.invite-banner .ic { color: var(--rx); width: 24px; height: 24px; }

@media (min-width: 900px) {
  .auth { grid-template-columns: 1.1fr 1fr; }
  .auth-brand {
    display: grid; place-items: center; padding: 48px; position: relative; overflow: hidden;
    background: radial-gradient(1200px 600px at 10% 10%, rgba(139,108,255,.35), transparent 60%), radial-gradient(800px 500px at 90% 90%, rgba(34,211,238,.25), transparent 60%), var(--bg-2);
    border-right: 1px solid var(--border);
  }
  .auth-brand-inner { max-width: 460px; display: grid; gap: 24px; }
  .auth-brand h2 { font-size: 44px; letter-spacing: -0.035em; }
  .auth-brand p { color: var(--text-2); font-size: 18px; }
  .auth-card .brand-sm { display: none; }
}
.wave-orb { position: relative; width: 200px; height: 200px; display: grid; place-items: center; margin: 12px 0; }
.wave-orb span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(139,108,255,.5); animation: ripple 3s var(--ease) infinite; }
.wave-orb span:nth-child(2) { animation-delay: 1s; }
.wave-orb span:nth-child(3) { animation-delay: 2s; }
.orb-core { width: 120px; height: 120px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; box-shadow: 0 20px 60px rgba(91,108,255,.5); color: #fff; }
.orb-core .ic { width: 48px; height: 48px; }
@keyframes ripple { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

/* ---------- invite + center screens ---------- */
.center-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.invite-card { width: 100%; max-width: 420px; padding: 32px 24px; display: grid; gap: 14px; text-align: center; justify-items: center; }
.invite-card h1 { font-size: 28px; }
.invite-icon { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.invite-icon.warn { background: var(--warn-soft); color: var(--warn); }
.invite-icon .ic { width: 34px; height: 34px; }
.pill-lg { display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); font-weight: 700; }

/* ---------- onboarding ---------- */
.onboard { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom)); max-width: 520px; margin: 0 auto; }
.onboard-top { display: flex; align-items: center; justify-content: space-between; }
.dots { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.dots li { width: 8px; height: 8px; border-radius: 99px; background: var(--surface-3); transition: all .3s var(--ease); }
.dots li.cur { width: 28px; background: var(--accent); }
.dots li.done { background: var(--accent); opacity: .6; }
.onboard-body { display: grid; align-content: center; gap: 18px; padding: 24px 0; animation: rise .4s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.onboard-body h1 { font-size: 32px; text-align: center; }
.lead { color: var(--text-2); font-size: 17px; text-align: center; }
.onboard-hero { display: grid; place-items: center; padding: 8px 0; }
.onboard-actions { display: grid; gap: 8px; margin-top: 8px; }
.mic-visual { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.mic-visual .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: .5; animation: ripple 2.6s var(--ease) infinite; }
.mic-visual .r2 { animation-delay: 1.3s; }
.mic-core, .bell-visual, .team-visual { width: 96px; height: 96px; border-radius: 30px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 16px 40px rgba(91,108,255,.4); position: relative; }
.mic-core { border-radius: 50%; }
.mic-core .ic, .bell-visual .ic, .team-visual .ic { width: 42px; height: 42px; }
.badge-dot { position: absolute; top: 18px; right: 20px; width: 16px; height: 16px; border-radius: 50%; background: var(--tx); border: 3px solid var(--bg); }
.promise { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.promise li { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.promise .ic { color: var(--accent); margin-top: 2px; }
.promise strong { color: var(--text); }
.mic-test { display: grid; gap: 8px; }
.meter { height: 14px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.meter span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--rx), var(--accent-2)); transform-origin: left; transform: scaleX(0.02); transition: transform 60ms linear; }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- app layout ---------- */
.app { height: 100dvh; display: grid; grid-template-columns: 100%; overflow: hidden; position: relative; }
.sidebar, .stage { grid-area: 1 / 1; min-width: 0; min-height: 0; transition: transform .32s var(--ease), opacity .32s var(--ease); }
.members-panel { display: none; }
.app[data-pane="list"] .stage { transform: translateX(100%); visibility: hidden; transition: transform .32s var(--ease), visibility 0s .32s; }
.app[data-pane="channel"] .sidebar { transform: translateX(-28%); opacity: 0; visibility: hidden; transition: transform .32s var(--ease), opacity .32s, visibility 0s .32s; }

@media (min-width: 900px) {
  .app { grid-template-columns: 300px minmax(0, 1fr); }
  .sidebar, .stage { grid-area: auto; transform: none !important; opacity: 1 !important; visibility: visible !important; }
  .stage .back { display: none; }
}
@media (min-width: 1240px) {
  .app { grid-template-columns: 300px minmax(0, 1fr) 300px; }
  .members-panel { display: flex; flex-direction: column; gap: 12px; padding: 20px 16px; border-left: 1px solid var(--border); background: var(--bg-2); overflow-y: auto; }
}

/* ---------- sidebar ---------- */
.sidebar { display: flex; flex-direction: column; background: var(--bg-2); border-right: 1px solid var(--border); padding-top: var(--safe-top); }
.side-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; }
.ws-switch { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; border: 0; background: transparent; cursor: pointer; text-align: left; min-height: 52px; }
.ws-switch:hover { background: var(--surface-2); }
.ws-name { flex: 1; min-width: 0; font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-caret { color: var(--text-3); width: 18px; height: 18px; }
.conn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.conn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.conn-online .dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.conn-connecting .dot, .conn-reconnecting .dot { background: var(--warn); animation: blink 1s infinite; }
.conn-reconnecting, .conn-connecting { color: var(--warn); background: var(--warn-soft); }
.conn-offline, .conn-idle { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.conn-offline .dot, .conn-idle .dot { background: var(--danger); }
.conn-online span:last-child { display: none; }
.conn-online { padding: 10px; }
@keyframes blink { 50% { opacity: .3; } }
.plan-banner { padding: 0 12px; }
.plan-chip { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; font-size: 14px; color: var(--text-2); min-height: 48px; }
.plan-chip strong { color: var(--text); }
.plan-chip > span:nth-child(2) { flex: 1; }
.plan-chip .go { font-weight: 750; color: var(--accent); }
.plan-chip.trial .ic { color: var(--accent); }
.plan-chip.free .ic { color: var(--warn); }
.plan-chip.warn { border-color: var(--warn); background: var(--warn-soft); }
.plan-chip.warn .ic { color: var(--warn); }
.chan-nav { flex: 1; overflow-y: auto; padding: 8px 8px 16px; }
.nav-section { margin-top: 10px; }
.nav-title { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 4px 12px; color: var(--text-3); font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.icon-btn.sm { width: 36px; height: 36px; border-radius: 10px; }
.icon-btn.sm svg { width: 18px; height: 18px; }
.chan-ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.chan { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; min-height: 52px; border: 0; border-radius: 14px; background: transparent; cursor: pointer; text-align: left; color: var(--text-2); font-weight: 600; position: relative; }
.chan:hover { background: var(--surface); color: var(--text); }
.chan.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.chan.unread { color: var(--text); font-weight: 800; }
.chan.live { background: var(--rx-soft); color: var(--text); }
.chan.not-member { opacity: .7; }
.chan-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); flex: none; }
.chan.active .chan-ic { background: var(--accent-soft); color: var(--accent); }
.chan-ic .ic { width: 16px; height: 16px; }
.chan-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: grid; }
.live-who { font-size: 12.5px; color: var(--rx); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.chan-muted { width: 16px; height: 16px; color: var(--text-3); }
.chan-go { width: 18px; height: 18px; color: var(--text-3); }
@media (min-width: 900px) { .chan-go { display: none; } }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.eq i { width: 3px; background: var(--rx); border-radius: 2px; animation: eq .8s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; }
.eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
.nav-empty { padding: 6px 12px; color: var(--text-3); font-size: 14px; background: none; border: 0; text-align: left; }
.nav-empty.link { color: var(--accent); cursor: pointer; min-height: 44px; font-weight: 600; }
.nav-invite { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 52px; border-radius: 14px; border: 1.5px dashed var(--border-strong); background: transparent; color: var(--text-2); font-weight: 650; cursor: pointer; }
.nav-invite:hover { border-color: var(--accent); color: var(--text); }
.side-foot { display: flex; align-items: center; gap: 4px; padding: 10px 12px calc(10px + var(--safe-bottom)); border-top: 1px solid var(--border); }
.me { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; padding: 6px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; }
.me:hover { background: var(--surface); }
.me-name { display: grid; min-width: 0; font-weight: 700; font-size: 15px; }
.me-name small { color: var(--text-3); font-weight: 500; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- stage ---------- */
.stage { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; background: var(--bg); padding-top: var(--safe-top); position: relative; }
.stage > .empty-stage { display: none; }
.app:not(.has-channel) .stage > :not(.empty-stage) { display: none; }
.app:not(.has-channel) .stage > .empty-stage { display: grid; }
.empty-stage { grid-row: 1 / -1; place-items: center; align-content: center; gap: 12px; text-align: center; padding: 24px; }
.empty-art { width: 96px; height: 96px; border-radius: 30px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--accent); }
.empty-art .ic { width: 44px; height: 44px; }
.stage-head { grid-row: 1; display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 4px; border-bottom: 1px solid var(--border); min-height: 64px; }
.stage-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 6px 8px; border-radius: 12px; cursor: pointer; text-align: left; }
.stage-title:hover { background: var(--surface); }
.stage-title > span:last-child { display: grid; min-width: 0; }
.stage-title strong { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-title small { color: var(--text-3); font-size: 13px; }
.stage-actions { display: flex; gap: 2px; }
.icon-btn.on { color: var(--accent); background: var(--accent-soft); }
.icon-btn.on.warn { color: var(--warn); background: var(--warn-soft); }
.elsewhere { grid-row: 2; padding: 8px 12px 0; }
.elsewhere-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--rx) 45%, transparent); background: var(--rx-soft); cursor: pointer; text-align: left; color: var(--text); min-height: 48px; animation: rise .3s var(--ease); }
.elsewhere-btn > span:nth-child(2) { flex: 1; font-size: 14.5px; }
.elsewhere-btn .go { font-weight: 800; color: var(--rx); }
.stage-body { grid-row: 3; overflow-y: auto; padding: 16px 16px 8px; display: grid; gap: 16px; align-content: start; }

.now { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); min-height: 84px; transition: background .25s, border-color .25s; }
.now-text { flex: 1; display: grid; min-width: 0; }
.now-text strong { font-size: 18px; }
.now-text span { color: var(--text-2); font-size: 14.5px; }
.now-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); flex: none; }
.now-icon .ic { width: 26px; height: 26px; }
.now-time { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 18px; }
.now-rx { background: var(--rx-soft); border-color: color-mix(in srgb, var(--rx) 50%, transparent); }
.now-rx .avatar.speaking { box-shadow: 0 0 0 calc(3px + var(--rxl, 0) * 10px) color-mix(in srgb, var(--rx) 35%, transparent); transition: box-shadow 80ms linear; }
.now-rx .now-time { color: var(--rx); }
.now-tx { background: var(--tx-soft); border-color: color-mix(in srgb, var(--tx) 55%, transparent); }
.now-tx .now-icon { background: var(--tx); color: #fff; }
.now-tx .now-time { color: var(--tx); }
.wave { display: flex; align-items: center; gap: 3px; height: 32px; }
.wave i { width: 3px; border-radius: 3px; background: var(--rx); animation: eq 1s ease-in-out infinite; }
.wave i:nth-child(3n) { animation-delay: .15s; }
.wave i:nth-child(3n+1) { animation-delay: .35s; }
.wave i:nth-child(4n) { animation-duration: .8s; }
@media (max-width: 480px) { .wave { display: none; } }

.here-list { list-style: none; margin: 0; padding: 6px 4px 4px; display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.here-list::-webkit-scrollbar { display: none; }
.here-list li { display: grid; justify-items: center; gap: 4px; font-size: 12.5px; color: var(--text-2); min-width: 48px; position: relative; }
.here-list li span { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.here-list .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ok); }
.here-talking .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--rx); animation: pulse-ring 1s infinite; }
.here-away .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text-3); opacity: .6; }
.here-list .more { align-self: center; color: var(--text-3); font-weight: 700; }
@keyframes pulse-ring { 50% { box-shadow: 0 0 0 2px var(--bg), 0 0 0 7px color-mix(in srgb, var(--rx) 50%, transparent); } }

.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.section-title h3 { font-size: 15px; color: var(--text-2); font-weight: 750; }
.tx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tx { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); position: relative; }
.tx.unheard { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.tx.unheard::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--accent); }
.tx-play { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); cursor: pointer; }
.tx-play .ic { width: 18px; height: 18px; }
.tx.playing .tx-play { background: var(--accent); color: #fff; }
.tx-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.tx-top { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.tx-top strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-top time { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.tx-bar { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.tx-bar span { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--accent); }
.tx-dur { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 700; font-size: 14px; }
.tx .avatar { --size: 36px; }
@media (max-width: 380px) { .tx > .avatar { display: none; } }
.tx-empty { display: flex; gap: 12px; align-items: center; padding: 18px; border-radius: 16px; border: 1.5px dashed var(--border); color: var(--text-3); }
.tx-skel { height: 66px; border-radius: 16px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- the talk button ---------- */
.ptt-dock { grid-row: 4; display: grid; justify-items: center; gap: 10px; padding: 14px 16px calc(14px + var(--safe-bottom)); border-top: 1px solid var(--border); background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg-2) 80%, transparent)); }
.ptt-wrap { --lvl: 0; position: relative; width: 176px; height: 176px; display: grid; place-items: center; }
@media (min-height: 760px) and (max-width: 899px) { .ptt-wrap { width: 196px; height: 196px; } }
@media (min-width: 900px) { .ptt-wrap { width: 188px; height: 188px; } }
.ptt-rings { position: absolute; inset: 0; pointer-events: none; }
.ptt-rings span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.ptt {
  position: relative; width: 100%; height: 100%; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; align-content: center; gap: 6px;
  color: #fff; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background: radial-gradient(circle at 50% 35%, #2b3157, #161a30 70%);
  box-shadow: inset 0 0 0 4px transparent, 0 0 0 6px var(--surface), 0 0 0 8px color-mix(in srgb, var(--accent) 55%, transparent), 0 18px 40px rgba(0,0,0,.45), inset 0 2px 0 rgba(255,255,255,.08);
  transition: transform .16s var(--ease), box-shadow .2s, background .2s;
}
:root[data-theme="light"] .ptt:not([data-state="live"]) { background: radial-gradient(circle at 50% 35%, #ffffff, #e9ebf6 70%); color: var(--text); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .ptt:not([data-state="live"]) { background: radial-gradient(circle at 50% 35%, #ffffff, #e9ebf6 70%); color: var(--text); } }
.ptt::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--grad); opacity: .14; transition: opacity .2s; }
.ptt:hover::before { opacity: .22; }
.ptt-icon { position: relative; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(91,108,255,.45); transition: transform .2s var(--ease), background .2s; }
.ptt-icon .ic { width: 30px; height: 30px; }
.ptt-label { position: relative; font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.ptt-timer { position: relative; font-size: 13px; font-weight: 800; min-height: 1em; color: #fff; }
.ptt-hint { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 14px; text-align: center; min-height: 22px; }
.ptt-hint .ic { width: 16px; height: 16px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tx); animation: blink 1s infinite; }

.ptt[data-state="requesting"] { transform: scale(.97); box-shadow: 0 0 0 6px var(--surface), 0 0 0 8px var(--warn), 0 18px 40px rgba(0,0,0,.45); }
.ptt[data-state="requesting"] .ptt-icon { background: var(--warn); animation: breathe .6s infinite; }
.ptt[data-state="live"] {
  transform: scale(1.04); color: #fff;
  background: radial-gradient(circle at 50% 35%, #ff7088, var(--tx) 70%);
  box-shadow: 0 0 0 6px var(--surface), 0 0 0 calc(8px + var(--lvl) * 14px) color-mix(in srgb, var(--tx) 60%, transparent), 0 20px 60px color-mix(in srgb, var(--tx) 55%, transparent);
}
.ptt[data-state="live"]::before { opacity: 0; }
.ptt[data-state="live"] .ptt-icon { background: rgba(255,255,255,.22); box-shadow: none; transform: scale(calc(1 + var(--lvl) * .25)); }
.ptt-wrap[data-state="live"] .ptt-rings span { border-color: var(--tx); animation: ripple 1.6s var(--ease) infinite; }
.ptt-wrap[data-state="live"] .ptt-rings span:nth-child(2) { animation-delay: .53s; }
.ptt-wrap[data-state="live"] .ptt-rings span:nth-child(3) { animation-delay: 1.06s; }
.ptt[data-state="denied"] { animation: shake .35s; box-shadow: 0 0 0 6px var(--surface), 0 0 0 8px var(--danger), 0 18px 40px rgba(0,0,0,.45); }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.ptt.is-busy-channel { box-shadow: 0 0 0 6px var(--surface), 0 0 0 8px color-mix(in srgb, var(--rx) 70%, transparent), 0 18px 40px rgba(0,0,0,.45); }
.ptt.is-busy-channel .ptt-icon { background: var(--rx); box-shadow: none; }
.ptt.is-disabled { filter: grayscale(1); opacity: .6; }
.ptt:focus-visible { box-shadow: var(--focus), 0 0 0 6px var(--surface), 0 0 0 8px var(--accent); }

/* ---------- members panel ---------- */
.members-head { display: flex; justify-content: space-between; align-items: baseline; }
.members-head h3 { font-size: 15px; color: var(--text-2); }
.member-ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.member { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; min-height: 52px; }
.member:hover { background: var(--surface); }
.member .avatar { position: relative; }
.member.st-off .avatar { opacity: .55; filter: saturate(.6); }
.member.st-talking .avatar { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px var(--rx); }
.m-name { flex: 1; min-width: 0; display: grid; font-weight: 650; font-size: 15px; }
.m-name small { color: var(--text-3); font-weight: 500; font-size: 12.5px; }
.st-online .m-name small, .st-talking .m-name small { color: var(--ok); }
.st-talking .m-name small { color: var(--rx); }
.role-ic { color: var(--warn); }
.role-ic .ic { width: 16px; height: 16px; }

/* offline state dims live things */
.app.is-offline .here-list { opacity: .5; }

/* ---------- sheets ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(5, 6, 14, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.sheet { position: relative; background: var(--surface); border-radius: 24px 24px 0 0; border: 1px solid var(--border); border-bottom: 0; max-height: 92dvh; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-l); outline: none; width: 100%; }
.sheet-wrap.in .sheet-backdrop { opacity: 1; }
.sheet-wrap.in .sheet { transform: none; }
.sheet-grip { width: 40px; height: 5px; border-radius: 9px; background: var(--border-strong); margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px 4px 20px; }
.sheet-head h2 { font-size: 20px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { overflow-y: auto; padding: 12px 20px calc(24px + var(--safe-bottom)); display: grid; gap: 16px; align-content: start; }
.sheet-text { color: var(--text-2); }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.sheet-actions .btn { flex: 1; }
.sheet-sub { font-size: 15px; color: var(--text-2); margin-top: 4px; }
@media (min-width: 640px) {
  .sheet-wrap { align-items: center; justify-items: center; padding: 24px; }
  .sheet { width: min(520px, 100%); border-radius: 24px; border-bottom: 1px solid var(--border); transform: translateY(16px) scale(.98); opacity: 0; transition: transform .25s var(--ease), opacity .2s; max-height: min(86dvh, 820px); }
  .sheet-wrap.in .sheet { transform: none; opacity: 1; }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 14px; }
  .sheet-actions .btn { flex: 0 1 auto; }
  .sheet-wide { width: min(920px, 100%); height: min(86dvh, 760px); }
}

.choice { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.choice legend { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.choice-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--border); cursor: pointer; }
.choice-row:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice-row input { accent-color: var(--accent); width: 20px; height: 20px; flex: none; }
.choice-row > span:last-child { display: grid; }
.choice-row small { color: var(--text-3); }
.choice-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }

.invite-box { display: grid; gap: 14px; justify-items: center; }
.qr { width: 200px; height: 200px; padding: 10px; border-radius: 18px; background: #fff; }
.qr svg { width: 100%; height: 100%; }
.invite-link { width: 100%; }
.invite-actions { display: flex; gap: 10px; width: 100%; }
.invite-actions .btn { flex: 1; }

.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pick { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; border: 0; background: transparent; cursor: pointer; text-align: left; min-height: 56px; }
.pick:hover, .pick.current { background: var(--surface-2); }
.pick > span { flex: 1; min-width: 0; display: grid; font-weight: 650; }
.pick small, .member-row small { color: var(--text-3); font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.member-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; min-height: 56px; border-bottom: 1px solid var(--border); }
.member-row:last-child { border-bottom: 0; }
.member-row select.input { width: auto; flex: none; }
.member-row > span:nth-child(2) { flex: 1; min-width: 0; display: grid; font-weight: 650; }
.ws-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; flex: none; }
.info-row { display: flex; gap: 8px; flex-wrap: wrap; }
.list-group { display: grid; gap: 4px; padding: 6px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--border); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px; border-radius: 12px; cursor: pointer; min-height: 56px; }
.toggle-row > span { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; font-weight: 650; }
.toggle-row > span .ic { color: var(--text-3); margin-top: 2px; }
.toggle-row small { grid-column: 2; color: var(--text-3); font-weight: 500; font-size: 13.5px; line-height: 1.4; }
.range-row { display: grid; gap: 8px; padding: 10px; font-weight: 650; }
.range-row > span { display: flex; gap: 10px; align-items: center; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 32px; }
.danger-zone { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.empty-sheet { display: grid; justify-items: center; gap: 12px; padding: 16px; text-align: center; color: var(--text-2); }
.empty-sheet .ic { width: 40px; height: 40px; color: var(--text-3); }
.upsell { display: grid; gap: 14px; justify-items: center; text-align: center; }
.upsell-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.upsell-ic .ic { width: 30px; height: 30px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text-2); }
.ticks .ic { color: var(--rx); width: 18px; height: 18px; margin-top: 3px; }

/* ---------- settings ---------- */
.sheet-body.settings { padding: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 0; overflow: hidden; flex: 1; }
.set-nav { display: flex; gap: 6px; overflow-x: auto; padding: 4px 16px 12px; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.set-nav::-webkit-scrollbar { display: none; }
.set-nav button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; min-height: 44px; border-radius: 12px; border: 1px solid var(--border); background: transparent; cursor: pointer; white-space: nowrap; color: var(--text-2); font-weight: 650; }
.set-nav button[aria-current="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.set-nav .ic { width: 18px; height: 18px; }
.set-pane { overflow-y: auto; padding: 16px 20px calc(24px + var(--safe-bottom)); display: grid; gap: 16px; align-content: start; outline: none; }
.set-pane h3 { font-size: 22px; }
.set-sub { font-size: 15px; color: var(--text-2); margin-top: 6px; }
@media (min-width: 640px) {
  .sheet-body.settings { grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: none; }
  .set-nav { flex-direction: column; overflow: visible; border-bottom: 0; border-right: 1px solid var(--border); padding: 8px 12px 16px; }
  .set-nav button { border-color: transparent; }
}
.profile-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--border); }
.profile-card > div { display: grid; }
.profile-card small { color: var(--text-3); }
.color-pick { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.color-pick legend { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.color-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.color-pick span { display: block; width: 44px; height: 44px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.15); }
.color-pick input:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); }
.color-pick input:focus-visible + span { box-shadow: var(--focus); }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; }
.input-sm { min-height: 40px; padding: 6px 10px; width: auto; border-radius: 10px; font-size: 14px; }
.kbd-help { padding: 10px; }
.kbd-help h4 { display: flex; gap: 8px; align-items: center; font-size: 15px; margin-bottom: 8px; }
.kbd-help dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.kbd-help dd { margin: 0; color: var(--text-2); }
kbd { font-family: var(--mono); font-size: 13px; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border-strong); border-bottom-width: 2px; }
.audit { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.audit li { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); }
.audit time { color: var(--text-3); font-size: 12.5px; }
.skel-block { height: 200px; border-radius: 16px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }

.plan-now { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px; border-radius: 18px; background: var(--grad); color: #fff; }
.plan-now > div { display: grid; }
.plan-now small { opacity: .85; }
.plan-now strong { font-size: 18px; }
.plan-now .btn-secondary { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); color: #fff; }
.plan-free { background: var(--surface-2); color: var(--text); }
.interval { max-width: 360px; }
.plans { display: grid; gap: 12px; }
/* minmax(0, 1fr): equal columns even when one card has a long button. */
@media (min-width: 760px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 20px; background: var(--bg-2); border: 1.5px solid var(--border); min-width: 0; }
.plan-card .ticks li { font-size: 14px; }
.plan-cta { margin-top: auto; display: grid; gap: 8px; justify-items: stretch; }
.plan-cta .chip { justify-self: start; }
.plan-cta .btn { white-space: normal; text-align: center; padding-inline: 10px; font-size: 15px; }
.plans .plan-card { padding: 18px 16px; }
.plan-card.featured { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), transparent 60%), var(--bg-2); }
.plan-card.is-current { border-color: var(--rx); }
.plan-card h4 { font-size: 18px; }
.price { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.price strong { font-size: 34px; letter-spacing: -.03em; }
.price span { color: var(--text-3); font-size: 13.5px; }
.ribbon { position: absolute; top: -11px; right: 16px; padding: 3px 10px; border-radius: 99px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 800; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(16px + var(--safe-bottom)); z-index: 80; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (max-width: 899px) { .app[data-pane="channel"] ~ .toasts, body:has(.app[data-pane="channel"]) .toasts { bottom: calc(230px + var(--safe-bottom)); } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 520px; width: fit-content; padding: 12px 14px; border-radius: 16px; background: var(--surface-3); border: 1px solid var(--border-strong); box-shadow: var(--shadow-l); font-size: 15px; font-weight: 600; transform: translateY(16px); opacity: 0; transition: transform .25s var(--ease), opacity .25s; }
.toast.in { transform: none; opacity: 1; }
.toast .ic { color: var(--accent); }
.toast-success .ic { color: var(--ok); }
.toast-error .ic { color: var(--danger); }
.toast-warn .ic { color: var(--warn); }
.toast-action { border: 0; background: var(--accent); color: #fff; font-weight: 800; padding: 8px 12px; border-radius: 10px; cursor: pointer; min-height: 36px; }

[hidden] { display: none !important; }

/* ---------- recordings ---------- */
.tx-del { flex: none; color: var(--text-3); }
.tx-del:hover, .tx-del:focus-visible { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
@media (hover: hover) and (pointer: fine) {
  .tx-del { opacity: 0; transition: opacity .15s; }
  .tx:hover .tx-del, .tx-del:focus-visible { opacity: 1; }
}
.btn.is-danger { color: var(--danger); }
.btn.is-danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 650; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.rec-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rec-stat { display: grid; gap: 2px; padding: 14px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--border); }
.rec-stat:first-child { background: var(--grad); border-color: transparent; color: #fff; }
.rec-stat:first-child small { color: rgba(255,255,255,.85); }
.rec-stat strong { font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-stat small { color: var(--text-3); font-size: 13px; }
@media (max-width: 420px) { .rec-stat { padding: 10px; } .rec-stat strong { font-size: 16px; } }
.rec-days { padding: 4px 10px 10px; }
.rec-plan { padding: 0 10px 8px; margin: 0; }
.rec-row { display: flex; align-items: center; gap: 12px; padding: 10px; }
.rec-row > span:nth-child(2) { flex: 1; min-width: 0; display: grid; font-weight: 650; }
.rec-row small { color: var(--text-3); font-weight: 500; font-size: 13px; }
.rec-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.rec-list .member-row .btn { flex: none; }
.inline-ic { width: 14px; height: 14px; vertical-align: -2px; }
.mic-check { display: flex; align-items: center; gap: 12px; padding: 4px 10px 10px; }
.mic-check .meter { flex: 1; }
