/* Veer Call v0.1.0. Daily-life design system v2 look, violet/indigo accent. Pure ASCII.
   Font: Inter (SIL OFL 1.1, self-hosted in /fonts). Icons adapted from Lucide (ISC). */
@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; }

:root {
  --accent: #6d28d9; --accent-hover: #5b21b6; --accent-text: #5b21b6; --accent-ink: #fff;
  --accent-soft: rgba(109,40,217,.08); --accent-soft-strong: rgba(109,40,217,.14); --accent-border: rgba(109,40,217,.3);
  --accent-ring: rgba(109,40,217,.25); --accent-shadow: rgba(91,33,182,.55);
  --hero-a: #4338ca; --hero-b: #7c3aed;
  --glow-a: rgba(124,58,237,.12); --glow-b: rgba(67,56,202,.09);
  --font: "InterV", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  --r-sm: 10px; --r: 16px; --r-lg: 22px;
  --bg: #f6f5fb; --surface: #fff; --surface-2: #f2f1f8; --surface-3: #e9e7f3;
  --line: #e4e2ee; --line-strong: #cfcbe0; --text: #13111f; --muted: #5b586b; --faint: #8b889b;
  --ok: #15803d; --ok-soft: rgba(21,128,61,.1); --warn: #a35204; --warn-soft: rgba(217,119,6,.12); --bad: #c62828; --bad-soft: rgba(198,40,40,.1);
  --shadow: 0 1px 2px rgba(20,16,40,.04), 0 2px 8px -2px rgba(20,16,40,.08);
  --shadow-lg: 0 18px 40px -18px rgba(20,16,40,.35);
  --glass: rgba(255,255,255,.82);
  --tabs-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #7c3aed; --accent-hover: #6d28d9; --accent-text: #c4b5fd;
    --accent-soft: rgba(139,92,246,.12); --accent-soft-strong: rgba(139,92,246,.2); --accent-border: rgba(139,92,246,.42); --accent-ring: rgba(139,92,246,.35);
    --glow-a: rgba(124,58,237,.16); --glow-b: rgba(67,56,202,.12);
    --bg: #0b0a12; --surface: #14131c; --surface-2: #1c1a26; --surface-3: #252331;
    --line: #272534; --line-strong: #3a3749; --text: #f3f2f8; --muted: #a9a6b8; --faint: #7f7c8f;
    --ok: #4ade80; --ok-soft: rgba(74,222,128,.12); --warn: #fbbf24; --warn-soft: rgba(251,191,36,.12); --bad: #f87171; --bad-soft: rgba(248,113,113,.13);
    --shadow: 0 1px 0 rgba(255,255,255,.03) inset; --shadow-lg: 0 24px 60px -24px rgba(0,0,0,.8);
    --glass: rgba(14,13,20,.8);
    color-scheme: dark;
  }
}
* { 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); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; padding-bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom)); }
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 340px; z-index: -1; pointer-events: none; background: radial-gradient(120% 80% at 10% -10%, var(--glow-a), transparent 60%), radial-gradient(90% 70% at 100% 0%, var(--glow-b), transparent 60%); }
a { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
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; }

.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: var(--glass); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 760; font-size: 18px; letter-spacing: -.015em; min-width: 0; }
.brand .mark { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); box-shadow: 0 6px 16px -6px var(--accent-shadow), inset 0 1px 0 rgba(255,255,255,.25); }
.brand .mark svg.i { width: 18px; height: 18px; }
.brand .bt { display: flex; flex-direction: column; line-height: 1.1; }
.brand small { font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 2px; letter-spacing: 0; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.pill.on { color: var(--ok); border-color: rgba(21,128,61,.3); background: var(--ok-soft); }
.pill.on .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.pill.warn .dot { background: var(--warn); }

main { max-width: 720px; margin: 0 auto; padding: 18px 16px 8px; }
h1, h2, h3 { margin: 4px 0 10px; line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: 26px; font-weight: 780; }
h2 { font-size: 18px; font-weight: 720; letter-spacing: -.012em; }
h3 { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; margin: 2px 0 10px; }
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 { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin: 14px 0; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-head h2 { margin: 0; }

.hero { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-lg); padding: 22px 20px 20px; color: #fff; background: linear-gradient(140deg, var(--hero-a), var(--hero-b)); box-shadow: 0 22px 44px -22px var(--accent-shadow); }
.hero::after { content: ""; position: absolute; right: -50px; bottom: -70px; width: 230px; height: 230px; border-radius: 50%; border: 38px solid rgba(255,255,255,.08); z-index: -1; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.86); }
.hero .eyebrow svg.i { width: 14px; height: 14px; }
.hero-title { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.12; color: #fff; }
.hero-sub { margin: 8px 0 0; font-size: 15.5px; line-height: 1.45; color: rgba(255,255,255,.92); max-width: 38ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; font-weight: 640; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 18px -10px var(--accent-shadow); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; }
.btn.danger-ghost { background: transparent; color: var(--bad); border-color: var(--bad-soft); }
.btn.block { width: 100%; margin-top: 10px; }
.btn.on-hero { background: #fff; color: #3b1d8f; border-color: #fff; }
.btn.on-hero:hover { background: #f1edff; }
.btn.on-hero-ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.btn.on-hero-ghost:hover { background: rgba(255,255,255,.12); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; }

.field { display: block; margin: 12px 0; }
.field span { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=tel] { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.linkbox { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.linkbox code { font-size: 13.5px; color: var(--text); }

.route, .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.route li, .steps li { display: flex; gap: 12px; align-items: flex-start; }
.route .num, .steps .num { width: 28px; height: 28px; border-radius: 9px; flex: 0 0 auto; display: grid; place-items: center; font-weight: 750; font-size: 14px; background: var(--accent-soft-strong); color: var(--accent-text); }
.route b, .steps b { display: block; font-weight: 680; }
.route small, .steps small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.route li.off .num, .steps li.off .num { background: var(--surface-3); color: var(--faint); }
.route li.off b, .steps li.off b { color: var(--faint); }
.steps li.active .num { background: var(--accent); color: #fff; }
.steps li.fail .num { background: var(--bad-soft); color: var(--bad); }
.steps li.skip .num { background: var(--surface-3); color: var(--faint); }
.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: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.av { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 750; color: #fff; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); flex: 0 0 auto; }
.contact .meta { flex: 1; min-width: 0; }
.contact .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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: 36px; height: 36px; color: var(--accent-text); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 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: 26px 20px; margin-top: 10px; }
.join .field { text-align: left; }
.join-mark { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); box-shadow: 0 14px 30px -14px var(--accent-shadow); }
.join-mark svg.i { width: 28px; height: 28px; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--glass); border-top: 1px solid var(--line); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); }
.tabs a { 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: 650; }
.tabs a.on { color: var(--accent-text); }
.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(10,8,20,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 4px 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: 24px; } .share-grid { grid-template-columns: repeat(4, 1fr); } }

/* In-call: always dark, video first. */
.call { position: fixed; inset: 0; z-index: 80; background: #07060c; color: #fff; overflow: hidden; }
.call .remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: radial-gradient(80% 60% at 50% 30%, #2a1f55, #07060c); }
.avatar-big { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(80% 60% at 50% 35%, #33246b, #07060c); }
.avatar-big span { width: 132px; height: 132px; border-radius: 40px; display: grid; place-items: center; font-size: 48px; font-weight: 780; background: linear-gradient(135deg, #4338ca, #7c3aed); box-shadow: 0 30px 60px -20px rgba(124,58,237,.7); }
.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 30px; background: linear-gradient(to bottom, rgba(0,0,0,.6), transparent); }
.who b { display: block; font-size: 20px; font-weight: 750; letter-spacing: -.01em; }
.who small { display: block; color: rgba(255,255,255,.78); 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: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.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,.35); }
.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; }
.q.fair .bars i:nth-child(-n+2) { background: #fbbf24; }
.q.poor .bars i:nth-child(1) { background: #f87171; }
.call .local { position: absolute; right: 14px; bottom: calc(132px + env(safe-area-inset-bottom)); width: 100px; height: 140px; z-index: 1; object-fit: cover; border-radius: 16px; background: #1b1830; border: 2px solid rgba(255,255,255,.22); box-shadow: 0 12px 30px rgba(0,0,0,.5); transform: scaleX(-1); }
.call-hint { position: absolute; left: 16px; right: 16px; top: 45%; transform: translateY(-50%); text-align: center; font-size: 15px; color: rgba(255,255,255,.9); }
.call-hint .btn { margin-top: 12px; background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); }
.controls { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 8px; padding: 18px 12px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(0,0,0,.7), transparent); }
.ctl { width: 62px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; color: #fff; font: inherit; cursor: pointer; }
.ctl > svg.i { width: 56px; height: 56px; padding: 16px; border-radius: 50%; background: rgba(255,255,255,.16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-sizing: border-box; }
.ctl small { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.85); }
.ctl[aria-pressed=true] > svg.i { background: #fff; color: #111; }
.ctl.end > svg.i { background: #e5484d; }
.ctl:disabled { opacity: .4; }
@media (min-width: 900px) { .call .local { width: 220px; height: 150px; } .call .remote { object-fit: contain; } }

.ring { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #312e81, #5b21b6 55%, #1e1b4b); text-align: center; padding: 24px; }
.ring-inner { width: 100%; max-width: 380px; }
.ring .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.8); margin-top: 26px; }
.ring h1 { font-size: 32px; color: #fff; margin: 6px 0 4px; }
.ring #ring-sub { color: rgba(255,255,255,.8); margin: 0; }
.pulse { width: 128px; height: 128px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 46px; font-weight: 780; background: rgba(255,255,255,.16); box-shadow: 0 0 0 0 rgba(255,255,255,.35); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.35); } 100% { box-shadow: 0 0 0 36px rgba(255,255,255,0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.ring-actions { display: flex; justify-content: space-between; margin-top: 56px; padding: 0 6px; }
.ring-labels { display: flex; justify-content: space-between; margin-top: 8px; padding: 0 6px; font-size: 13px; color: rgba(255,255,255,.8); }
.ring-labels span { width: 72px; }
.round { width: 72px; height: 72px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; cursor: pointer; }
.round svg.i { width: 30px; height: 30px; }
.round.red { background: #e5484d; }
.round.green { background: #22c55e; }
.round.green-soft { background: rgba(34,197,94,.35); }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; max-width: 90vw; padding: 11px 16px; border-radius: 14px; background: #1c1a26; color: #fff; font-size: 14.5px; font-weight: 550; box-shadow: var(--shadow-lg); }
@media (min-width: 900px) { main { padding-top: 28px; } h1 { font-size: 30px; } }
