/* Halo v0.2.0 (was Veer Call) - "glass boards": futuristic glassmorphism, dark first. Pure ASCII.
   Fonts: Space Grotesk (display) + Inter (body), both SIL OFL 1.1, self-hosted in /fonts.
   Icons adapted from Lucide (ISC). Motion uses transform/opacity only and stops under
   prefers-reduced-motion. Text colours chosen for WCAG AA on the darkest/lightest glass. */
@font-face { font-family: "InterV"; src: url("fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "GroteskV"; src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --font: "InterV", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --display: "GroteskV", "InterV", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  --bg: #05060b;
  --bg-2: #0a0c16;
  --text: #eef1ff;           /* 18:1 on bg */
  --muted: #a9b2cc;          /* 9:1 on bg, >= 7:1 on glass */
  --faint: #8590ad;          /* 6:1 on bg */
  --cyan: #22d3ee; --violet: #8b5cf6; --indigo: #6366f1; --pink: #e879f9;
  --accent-text: #7dd3fc;    /* 11:1 on bg */
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .085);
  --glass-strong: rgba(18, 20, 36, .72);
  --edge: rgba(255, 255, 255, .12);
  --edge-strong: rgba(255, 255, 255, .2);
  --hi: inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 0 0 1px rgba(255, 255, 255, .02);
  --glow: 0 0 0 1px rgba(34, 211, 238, .14), 0 10px 40px -12px rgba(139, 92, 246, .45);
  --shadow: 0 20px 50px -24px rgba(0, 0, 0, .8);
  --btn-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #9333ea 100%);  /* white text >= 5.7:1 */
  --ok: #4ade80; --ok-soft: rgba(74, 222, 128, .14); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .14); --bad: #fb7185; --bad-soft: rgba(251, 113, 133, .14);
  --aur-1: rgba(34, 211, 238, .36); --aur-2: rgba(139, 92, 246, .42); --aur-3: rgba(232, 121, 249, .22);
  --grid-line: rgba(255, 255, 255, .035);
  --r: 18px; --r-lg: 26px;
  --blur: blur(18px) saturate(150%);
  --tabs-h: 66px;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #e9edf7; --bg-2: #f3f5fb;
    --text: #0b1020;          /* 16:1 */
    --muted: #434d66;         /* 7.6:1 on bg */
    --faint: #5b6680;         /* 5.3:1 on bg */
    --accent-text: #4c1d95;   /* 10:1 */
    --glass: rgba(255, 255, 255, .55);
    --glass-2: rgba(255, 255, 255, .7);
    --glass-strong: rgba(255, 255, 255, .82);
    --edge: rgba(255, 255, 255, .85);
    --edge-strong: rgba(99, 102, 241, .28);
    --hi: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(15, 23, 42, .04);
    --glow: 0 0 0 1px rgba(99, 102, 241, .14), 0 14px 36px -16px rgba(79, 70, 229, .35);
    --shadow: 0 18px 40px -22px rgba(30, 41, 80, .35);
    --ok: #14532d; --ok-soft: rgba(21, 128, 61, .12); --warn: #92400e; --warn-soft: rgba(217, 119, 6, .14); --bad: #be123c; --bad-soft: rgba(190, 18, 60, .1);
    --aur-1: rgba(34, 211, 238, .28); --aur-2: rgba(139, 92, 246, .24); --aur-3: rgba(244, 114, 182, .16);
    --grid-line: rgba(15, 23, 42, .04);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; padding-bottom: calc(var(--tabs-h) + 30px + env(safe-area-inset-bottom)); }
a { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
code { font-family: var(--mono); font-size: .86em; overflow-wrap: anywhere; }
svg.i { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- aurora background ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(120% 90% at 50% -10%, var(--bg-2), var(--bg) 60%); }
.aurora i { position: absolute; display: block; border-radius: 50%; filter: blur(60px); will-change: transform; }
.aurora .a1 { width: 70vmax; height: 50vmax; left: -16vmax; top: -18vmax; background: radial-gradient(closest-side, var(--aur-1), transparent); animation: drift1 26s ease-in-out infinite alternate; }
.aurora .a2 { width: 60vmax; height: 50vmax; right: -18vmax; top: -6vmax; background: radial-gradient(closest-side, var(--aur-2), transparent); animation: drift2 32s ease-in-out infinite alternate; }
.aurora .a3 { width: 60vmax; height: 40vmax; left: 10vmax; bottom: -26vmax; background: radial-gradient(closest-side, var(--aur-3), transparent); animation: drift3 38s ease-in-out infinite alternate; }
.aurora .grid { position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(80% 60% at 50% 0%, #000, transparent 75%); mask-image: radial-gradient(80% 60% at 50% 0%, #000, transparent 75%); }
@keyframes drift1 { to { transform: translate3d(12vmax, 8vmax, 0) scale(1.1); } }
@keyframes drift2 { to { transform: translate3d(-10vmax, 10vmax, 0) scale(1.15); } }
@keyframes drift3 { to { transform: translate3d(8vmax, -8vmax, 0) scale(.95); } }

/* ---------- glass primitives ---------- */
.glass, .card, .contact, .top, .tabs, .sheet, .pill, .btn, .icon-btn, .linkbox {
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}

.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: linear-gradient(to bottom, var(--glass-strong), transparent); border-bottom: 1px solid transparent; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; min-width: 0; }
.brand .mark { position: relative; width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--btn-grad); box-shadow: 0 0 22px -4px rgba(34, 211, 238, .55), inset 0 1px 0 rgba(255, 255, 255, .35); }
.brand .mark::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, var(--cyan), transparent 50%, var(--pink)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.brand .mark svg.i { width: 18px; height: 18px; }
.brand .bt { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--display); font-weight: 650; font-size: 19px; letter-spacing: -.01em; }
.brand small { font-family: var(--font); font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 3px; letter-spacing: .02em; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--hi); white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.pill.on { color: var(--ok); }
.pill.on .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft), 0 0 12px var(--ok); animation: blink 2.4s ease-in-out infinite; }
.pill.warn { color: var(--warn); }
.pill.warn .dot { background: var(--warn); }
@keyframes blink { 50% { opacity: .45; } }

main { max-width: 720px; margin: 0 auto; padding: 16px 16px 8px; }
h1, h2, h3 { margin: 4px 0 10px; line-height: 1.15; font-family: var(--display); letter-spacing: -.02em; }
h1 { font-size: 30px; font-weight: 650; }
h2 { font-size: 19px; font-weight: 620; letter-spacing: -.01em; }
h3 { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; margin: 2px 0 12px; }
p { margin: 8px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.card { position: relative; background: var(--glass); border: 1px solid var(--edge); border-radius: var(--r-lg); padding: 18px; margin: 14px 0; box-shadow: var(--hi), var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-head h2 { margin: 0; }

/* hero: deep glass slab with neon edge, readable in both modes */
.hero { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-lg); padding: 22px 20px 20px; color: #fff; background: linear-gradient(150deg, rgba(30, 27, 75, .92), rgba(49, 18, 94, .9) 55%, rgba(14, 22, 48, .94)); border: 1px solid rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 0 0 1px rgba(34, 211, 238, .12), 0 24px 60px -24px rgba(124, 58, 237, .7); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 80% at 100% 0%, rgba(34, 211, 238, .28), transparent 60%), radial-gradient(50% 70% at 0% 100%, rgba(232, 121, 249, .22), transparent 60%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .8), rgba(232, 121, 249, .8), transparent); }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #a5f3fc; }
.hero .eyebrow svg.i { width: 14px; height: 14px; }
.hero-title { margin: 0; font-family: var(--display); font-size: 31px; font-weight: 650; letter-spacing: -.03em; line-height: 1.08; color: #fff; }
.hero-sub { margin: 10px 0 0; font-size: 15.5px; line-height: 1.5; color: #dfe4f7; max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- glass pill buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--edge); background: var(--glass-2); color: var(--text); box-shadow: var(--hi); font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { background: var(--glass); box-shadow: var(--hi), var(--glow); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { color: #fff; background: var(--btn-grad); border-color: rgba(255, 255, 255, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(34, 211, 238, .25), 0 10px 28px -10px rgba(124, 58, 237, .85), 0 0 24px -8px rgba(34, 211, 238, .6); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.danger-ghost { background: transparent; color: var(--bad); border-color: var(--bad-soft); box-shadow: none; }
.btn.block { width: 100%; margin-top: 10px; }
.btn.on-hero { background: rgba(255, 255, 255, .95); color: #2e1065; border-color: #fff; box-shadow: 0 0 26px -6px rgba(34, 211, 238, .7), inset 0 -1px 0 rgba(0, 0, 0, .06); }
.btn.on-hero-ghost { color: #fff; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--edge); background: var(--glass-2); color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--hi); }

.field { display: block; margin: 14px 0; }
.field span { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
input[type=text], input[type=password], input[type=tel] { width: 100%; min-height: 48px; padding: 11px 16px; border-radius: 14px; border: 1px solid var(--edge); background: rgba(0, 0, 0, .22); color: var(--text); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); font: inherit; font-size: 16px; }
@media (prefers-color-scheme: light) { input[type=text], input[type=password], input[type=tel] { background: rgba(255, 255, 255, .75); border-color: rgba(15, 23, 42, .14); box-shadow: inset 0 1px 2px rgba(15, 23, 42, .06); } }
input::placeholder { color: var(--faint); }
input:focus { outline: none; border-color: rgba(34, 211, 238, .7); box-shadow: 0 0 0 3px rgba(34, 211, 238, .2), 0 0 18px -4px rgba(34, 211, 238, .55); }

.tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--glass-2); color: var(--muted); border: 1px solid var(--edge); }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.linkbox { margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, .2); border: 1px dashed var(--edge-strong); }
@media (prefers-color-scheme: light) { .linkbox { background: rgba(255, 255, 255, .6); } }
.linkbox code { font-size: 13.5px; color: var(--text); }

.route, .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.route li, .steps li { display: flex; gap: 12px; align-items: flex-start; }
.route .num, .steps .num { width: 30px; height: 30px; border-radius: 10px; flex: 0 0 auto; display: grid; place-items: center; font-family: var(--display); font-weight: 650; font-size: 14px; color: var(--accent-text); background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .28); box-shadow: 0 0 14px -6px rgba(34, 211, 238, .8); }
.route b, .steps b { display: block; font-weight: 650; }
.route small, .steps small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.route li.off .num, .steps li.off .num, .steps li.skip .num { color: var(--faint); background: transparent; border-color: var(--edge); box-shadow: none; }
.route li.off b, .steps li.off b { color: var(--faint); }
.steps li.active .num { color: #fff; background: var(--btn-grad); border-color: transparent; }
.steps li.fail .num { color: var(--bad); background: var(--bad-soft); border-color: transparent; box-shadow: none; }
.note { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 13.5px; margin: 14px 4px; }
.note svg.i { width: 18px; height: 18px; margin-top: 1px; color: var(--warn); }

.list { list-style: none; margin: 12px 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.contact { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 22px; background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--hi); }
.av { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 650; color: #fff; background: var(--btn-grad); flex: 0 0 auto; box-shadow: 0 0 0 2px rgba(255, 255, 255, .08), 0 0 18px -6px rgba(34, 211, 238, .8); }
.contact .meta { flex: 1; min-width: 0; }
.contact .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.contact .meta small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact .acts { display: flex; gap: 6px; flex: 0 0 auto; }
.contact .btn { min-height: 42px; min-width: 42px; padding: 8px 10px; }
.contact .btn.ghost { border-color: transparent; color: var(--muted); }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty svg.i { width: 38px; height: 38px; color: var(--accent-text); filter: drop-shadow(0 0 10px rgba(34, 211, 238, .5)); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; margin: 8px 0 14px; }
.kv dt { color: var(--muted); font-size: 14px; font-weight: 600; }
.kv dd { margin: 0; min-width: 0; }

.join { text-align: center; padding: 28px 20px; margin-top: 12px; }
.join .field { text-align: left; }
.join h1 { font-size: 28px; }
.join-mark { position: relative; width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; color: #fff; background: var(--btn-grad); box-shadow: 0 0 0 6px rgba(139, 92, 246, .12), 0 0 0 12px rgba(34, 211, 238, .06), 0 0 40px -6px rgba(34, 211, 238, .7); }
.join-mark svg.i { width: 28px; height: 28px; }

/* ---------- glass bottom nav (floating) ---------- */
.tabs { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30; max-width: 520px; margin: 0 auto; display: flex; justify-content: space-around; height: var(--tabs-h); padding: 6px; border-radius: 26px; background: var(--glass-strong); border: 1px solid var(--edge); box-shadow: var(--hi), 0 18px 40px -16px rgba(0, 0, 0, .7); }
.tabs a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); text-decoration: none; font-size: 12px; font-weight: 600; border-radius: 20px; }
.tabs a.on { color: var(--text); background: linear-gradient(180deg, rgba(139, 92, 246, .22), rgba(34, 211, 238, .1)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 1px rgba(34, 211, 238, .22); }
.tabs a.on svg.i { color: var(--accent-text); filter: drop-shadow(0 0 6px rgba(34, 211, 238, .7)); }
.tabs a svg.i { width: 22px; height: 22px; }
body.guest .tabs { display: none; }
body.guest { padding-bottom: 24px; }

.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(3, 4, 10, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; background: var(--glass-strong); border: 1px solid var(--edge); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--hi), 0 -20px 60px -20px rgba(124, 58, 237, .45); }
.sheet::before { content: ""; display: block; height: 1px; margin: -10px -18px 0; background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .7), rgba(232, 121, 249, .7), transparent); }
.sheet .grab { width: 42px; height: 5px; border-radius: 3px; background: var(--edge-strong); margin: 8px auto 12px; }
.sheet .steps { margin: 14px 0; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 720px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 28px; border-bottom: 1px solid var(--edge); } .share-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- in-call: always dark, immersive ---------- */
.call { position: fixed; inset: 0; z-index: 80; background: #04050a; color: #fff; overflow: hidden; }
.call-aurora { position: absolute; inset: 0; background: radial-gradient(60% 45% at 20% 15%, rgba(34, 211, 238, .2), transparent 70%), radial-gradient(60% 50% at 85% 80%, rgba(139, 92, 246, .28), transparent 70%), #04050a; }
.call .remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: transparent; }
.avatar-big { position: absolute; inset: 0; display: grid; place-items: center; }
.avatar-big span { position: relative; width: 148px; height: 148px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 52px; font-weight: 650; background: linear-gradient(145deg, rgba(79, 70, 229, .9), rgba(147, 51, 234, .9)); box-shadow: 0 0 0 10px rgba(255, 255, 255, .04), 0 0 0 22px rgba(34, 211, 238, .05), 0 0 80px -10px rgba(34, 211, 238, .55), inset 0 2px 0 rgba(255, 255, 255, .25); }
.avatar-big span::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(34, 211, 238, .45); animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.06); opacity: .4; } }
.call-top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 16px 34px; background: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent); }
.who b { display: block; font-family: var(--display); font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.who small { display: block; color: #d3d9ee; font-size: 14px; }
.call-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(15, 18, 34, .55); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
#call-timer { font-family: var(--display); letter-spacing: .04em; }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.bars i { display: block; width: 3px; border-radius: 1px; background: rgba(255, 255, 255, .3); }
.bars i:nth-child(1) { height: 5px; } .bars i:nth-child(2) { height: 8px; } .bars i:nth-child(3) { height: 12px; }
.q.good .bars i { background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.q.fair .bars i:nth-child(-n+2) { background: #fbbf24; }
.q.poor .bars i:nth-child(1) { background: #fb7185; }
.call .local { position: absolute; z-index: 1; right: 14px; bottom: calc(142px + env(safe-area-inset-bottom)); width: 100px; height: 140px; object-fit: cover; border-radius: 20px; background: #12152a; border: 1px solid rgba(255, 255, 255, .25); box-shadow: 0 0 0 1px rgba(34, 211, 238, .25), 0 14px 34px rgba(0, 0, 0, .6); transform: scaleX(-1); }
.call-hint { position: absolute; z-index: 2; left: 20px; right: 20px; top: 62%; text-align: center; font-size: 15px; color: #e6eaf8; padding: 14px; border-radius: 20px; background: rgba(15, 18, 34, .6); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.call-hint .btn { margin-top: 12px; color: #fff; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .28); }
.controls { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 6px; padding: 10px 10px 8px; border-radius: 30px; background: rgba(15, 18, 34, .55); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 20px 50px -20px rgba(0, 0, 0, .9); max-width: calc(100vw - 20px); }
.ctl { width: 62px; display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: 0; color: #fff; font: inherit; cursor: pointer; }
.ctl > svg.i { width: 52px; height: 52px; padding: 15px; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); box-sizing: border-box; transition: background .2s, box-shadow .2s; }
.ctl:hover > svg.i { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 0 18px -4px rgba(34, 211, 238, .8); }
.ctl small { font-size: 11.5px; font-weight: 600; color: #d3d9ee; }
.ctl[aria-pressed=true] > svg.i { background: #f1f5ff; color: #0b1020; }
.ctl.end > svg.i { background: linear-gradient(145deg, #f43f5e, #e11d48); border-color: rgba(255, 255, 255, .25); box-shadow: 0 0 22px -4px rgba(244, 63, 94, .8); }
.ctl:disabled { opacity: .4; }
@media (min-width: 900px) { .call .local { width: 240px; height: 150px; bottom: 120px; right: 24px; } .call .remote { object-fit: contain; } .avatar-big span { width: 180px; height: 180px; font-size: 64px; } }

/* ---------- ring screen ---------- */
.ring { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; color: #fff; background: #04050a; text-align: center; padding: 24px; overflow: hidden; }
.ring-aurora { position: absolute; inset: -20%; background: radial-gradient(40% 35% at 30% 30%, rgba(34, 211, 238, .35), transparent 70%), radial-gradient(45% 40% at 70% 65%, rgba(139, 92, 246, .45), transparent 70%), radial-gradient(30% 30% at 50% 100%, rgba(232, 121, 249, .25), transparent 70%); filter: blur(30px); animation: swirl 14s linear infinite; }
@keyframes swirl { to { transform: rotate(360deg); } }
.ring-inner { position: relative; width: 100%; max-width: 400px; }
.ring .eyebrow { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 600; color: #a5f3fc; margin-top: 40px; }
.live { width: 8px; height: 8px; border-radius: 50%; background: #22d3ee; box-shadow: 0 0 10px #22d3ee; animation: blink 1.2s ease-in-out infinite; }
.ring h1 { font-size: 38px; color: #fff; margin: 8px 0 4px; }
.ring #ring-sub { color: #d3d9ee; margin: 0; }
.pulse { position: relative; width: 150px; height: 150px; margin: 0 auto; display: grid; place-items: center; }
.pulse .core { position: relative; z-index: 2; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 50px; font-weight: 650; background: linear-gradient(145deg, rgba(79, 70, 229, .95), rgba(147, 51, 234, .95)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 0 60px -6px rgba(34, 211, 238, .7); }
.pulse .halo { position: absolute; z-index: 1; inset: -10px; border-radius: 50%; background: conic-gradient(from 0deg, #22d3ee, #8b5cf6, #e879f9, #22d3ee); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); animation: swirl 3s linear infinite; filter: drop-shadow(0 0 8px rgba(34, 211, 238, .8)); }
.pulse .wave { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(34, 211, 238, .55); animation: wave 2.4s cubic-bezier(.2, .6, .3, 1) infinite; }
.pulse .w2 { animation-delay: .8s; border-color: rgba(139, 92, 246, .55); }
.pulse .w3 { animation-delay: 1.6s; border-color: rgba(232, 121, 249, .45); }
@keyframes wave { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.ring-actions { display: flex; justify-content: space-between; margin-top: 64px; padding: 0 6px; }
.ring-labels { display: flex; justify-content: space-between; margin-top: 10px; padding: 0 6px; font-size: 13px; color: #d3d9ee; }
.ring-labels span { width: 74px; }
.round { width: 74px; height: 74px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22); display: grid; place-items: center; color: #fff; cursor: pointer; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.round svg.i { width: 30px; height: 30px; }
.round.red { background: linear-gradient(145deg, #f43f5e, #be123c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 28px -4px rgba(244, 63, 94, .8); }
.round.green { background: linear-gradient(145deg, #22c55e, #15803d); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 28px -4px rgba(34, 197, 94, .85); }
.round.green-soft { background: rgba(255, 255, 255, .12); }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 32px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; max-width: 90vw; padding: 12px 18px; border-radius: 999px; background: rgba(15, 18, 34, .88); color: #fff; border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); font-size: 14.5px; font-weight: 550; box-shadow: 0 0 0 1px rgba(34, 211, 238, .18), 0 16px 40px -14px rgba(0, 0, 0, .8); }
@media (min-width: 900px) { main { padding-top: 28px; } h1 { font-size: 34px; } .hero-title { font-size: 40px; } }

/* Phones with weak GPUs: lighter blur. Reduced motion: no animation at all. */
@media (max-width: 420px) { :root { --blur: blur(14px) saturate(140%); } .aurora i { filter: blur(48px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* When the far camera is off the video element only paints black frames: let the avatar and aurora show. */
.call:has(#remote-avatar:not([hidden])) .remote { opacity: 0; }
@media (prefers-color-scheme: light) { .sheet-wrap { background: rgba(200, 208, 230, .35); } .sheet { background: rgba(250, 251, 255, .9); } }

/* ================= v0.2.0: Halo brand mark + messenger ================= */
/* Halo mark: a glowing neon ring (conic gradient, masked to a band) around a soft core. */
.halo-mark { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; }
.brand .mark.halo-mark { background: radial-gradient(circle at 50% 50%, rgba(15, 18, 40, .9) 0 52%, transparent 53%); box-shadow: none; border-radius: 50%; }
.brand .mark.halo-mark::after { display: none; }
.halo-mark .hr { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 210deg, #22d3ee, #8b5cf6, #e879f9, #22d3ee); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); filter: drop-shadow(0 0 6px rgba(34, 211, 238, .85)) drop-shadow(0 0 12px rgba(139, 92, 246, .6)); animation: swirl 9s linear infinite; }
.halo-mark .hc { width: 32%; height: 32%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #a5f3fc 45%, rgba(34, 211, 238, 0) 72%); box-shadow: 0 0 10px 2px rgba(34, 211, 238, .55); }
.halo-mark.big { width: 76px; height: 76px; margin: 0 auto 12px; }
.halo-mark.big .hr { -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px)); mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px)); }
@media (prefers-color-scheme: light) { .brand .mark.halo-mark { background: radial-gradient(circle at 50% 50%, rgba(30, 27, 75, .92) 0 52%, transparent 53%); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tab badge */
.tab-badge { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 750; color: #fff; background: linear-gradient(135deg, #0e7490, #6d28d9); box-shadow: 0 0 10px -1px rgba(34, 211, 238, .8); }

/* chat list */
.e2e-line { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 13.5px; margin: 2px 2px 6px; }
.e2e-line svg.i { width: 16px; height: 16px; margin-top: 2px; color: var(--accent-text); }
.chats .chat-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 22px; background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--hi); color: var(--text); text-decoration: none; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.chats .chat-row:hover { box-shadow: var(--hi), var(--glow); }
.chat-row .meta { flex: 1; min-width: 0; }
.chat-row .l1 { display: flex; align-items: baseline; gap: 8px; }
.chat-row .l1 b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.chat-row time { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.chat-row .l2 { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.chat-row .l2 small { flex: 1; min-width: 0; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row.unread .l1 b, .chat-row.unread .l2 small { color: var(--text); }
.chat-row.unread time { color: var(--accent-text); font-weight: 700; }
.unread-badge { flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 750; color: #fff; background: linear-gradient(135deg, #0e7490, #6d28d9); box-shadow: 0 0 12px -2px rgba(34, 211, 238, .9); }
.av .ring-dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; background: var(--warn); border: 2px solid var(--bg); }

/* thread: full-height, tabs hidden */
body.in-thread { padding-bottom: 0; }
body.in-thread .tabs { display: none; }
body.in-thread main { max-width: 820px; padding: 0; }
body.in-thread .top { display: none; }
.thread-view { display: flex; flex-direction: column; height: 100dvh; }
.thread-view[hidden] { display: none !important; }
.thread-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); background: var(--glass-strong); border-bottom: 1px solid var(--edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .6); }
.thread-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .6), rgba(232, 121, 249, .6), transparent); }
.thread-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; padding: 2px; border-radius: 16px; }
.thread-who .av { width: 40px; height: 40px; font-size: 15px; }
.thread-who .tw { min-width: 0; display: flex; flex-direction: column; }
.thread-who b { font-family: var(--display); font-weight: 650; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-who small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-who small.ok { color: var(--ok); }
.thread-acts { display: flex; gap: 6px; flex: 0 0 auto; }
.thread-acts .icon-btn:disabled { opacity: .45; cursor: not-allowed; }
.return-call { display: flex; justify-content: center; padding: 8px 12px 0; }
.return-call .btn { min-height: 38px; padding: 6px 16px; }
.invite { margin: 12px; }
.msgs { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 14px 12px 10px; display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain; }
.msg { display: flex; flex-direction: column; max-width: min(78%, 520px); }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg.in { align-self: flex-start; align-items: flex-start; }
.bubble { position: relative; padding: 9px 13px 7px; border-radius: 20px; font-size: 15.5px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.msg.in .bubble { background: var(--glass-2); border: 1px solid var(--edge); border-bottom-left-radius: 7px; box-shadow: var(--hi); color: var(--text); }
.msg.out .bubble { color: #fff; background: linear-gradient(135deg, rgba(67, 56, 202, .94), rgba(109, 40, 217, .94)); border: 1px solid rgba(255, 255, 255, .2); border-bottom-right-radius: 7px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 0 1px rgba(34, 211, 238, .16), 0 8px 24px -12px rgba(124, 58, 237, .9); }
.bubble .bm { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 3px; font-size: 11.5px; line-height: 1; }
.msg.in .bubble .bm { color: var(--muted); }
.msg.out .bubble .bm { color: #e0e7ff; }
.tick svg.i { width: 15px; height: 15px; stroke-width: 2.4; }
.tick.read { color: #a5f3fc; filter: drop-shadow(0 0 4px rgba(34, 211, 238, .9)); }
.tick.failed { color: #fecdd3; }
.msg.failed .bubble { border-color: rgba(251, 113, 133, .6); }
.msg .retry { margin-top: 4px; font-size: 12.5px; color: var(--bad); background: none; border: 0; cursor: pointer; font: inherit; }
.msg.sys { align-self: center; max-width: 92%; }
.sys-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--muted); background: var(--glass); border: 1px solid var(--edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.sys-pill svg.i { width: 15px; height: 15px; color: var(--accent-text); }
.sys-pill.missed svg.i { color: var(--bad); }
.day { align-self: center; margin: 8px 0 4px; font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.composer { position: sticky; bottom: 0; display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--glass-strong); border-top: 1px solid var(--edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.composer textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 140px; resize: none; padding: 11px 16px; border-radius: 22px; border: 1px solid var(--edge); background: rgba(0, 0, 0, .22); color: var(--text); font: inherit; font-size: 16px; line-height: 1.35; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
@media (prefers-color-scheme: light) { .composer textarea { background: rgba(255, 255, 255, .8); border-color: rgba(15, 23, 42, .14); } }
.composer textarea::placeholder { color: var(--faint); }
.composer textarea:focus { outline: none; border-color: rgba(34, 211, 238, .7); box-shadow: 0 0 0 3px rgba(34, 211, 238, .2); }
.composer textarea:disabled { opacity: .7; }
.composer .count { position: absolute; right: 70px; top: -22px; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--glass-strong); color: var(--muted); border: 1px solid var(--edge); }
.composer .count.over { color: var(--bad); }
.send { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22); display: grid; place-items: center; color: #fff; cursor: pointer; background: var(--btn-grad); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 22px -6px rgba(34, 211, 238, .9); }
.send:disabled { opacity: .45; cursor: not-allowed; }
.emoji-pop { position: absolute; left: 12px; bottom: 76px; z-index: 6; width: min(340px, calc(100vw - 24px)); display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 10px; border-radius: 22px; background: var(--glass-strong); border: 1px solid var(--edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--hi), var(--glow); }
.emoji-pop button { font-size: 22px; line-height: 1; padding: 6px 0; border-radius: 12px; border: 0; background: none; cursor: pointer; }
.emoji-pop button:hover, .emoji-pop button:focus-visible { background: var(--glass-2); }
.thread-view { position: relative; }

/* safety code */
.safety-ring { display: flex; justify-content: center; margin: 10px 0 2px; }
.safety-code { margin: 6px auto 10px; max-width: 320px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 14px; text-align: center; font-family: var(--mono); font-size: 21px; font-weight: 650; letter-spacing: .08em; color: var(--text); }
.safety-code span { padding: 8px 0; border-radius: 12px; background: var(--glass-2); border: 1px solid var(--edge); box-shadow: var(--hi); }
.chats-hint { text-align: center; }
@media (min-width: 900px) { body.in-thread main { padding-top: 0; } .msg { max-width: 62%; } }
.chat-pick { width: 100%; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.chat-pick:hover { box-shadow: var(--hi), var(--glow); }
#nc-list { max-height: 40dvh; overflow: auto; }
body.in-thread .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  .thread-view { border-left: 1px solid var(--edge); border-right: 1px solid var(--edge); background: linear-gradient(180deg, rgba(139, 92, 246, .05), rgba(34, 211, 238, .03)); box-shadow: 0 0 80px -30px rgba(139, 92, 246, .35); }
}
