:root{--bg:#e9ecf1;--surface:#fff;--surface-2:#f2f4f7;--text:#14171c;--muted:#6b7280;--border:#dde1e7;--accent:#2563eb;--accept:#16a34a;--decline:#dc2626;--bubble-out:#2563eb;--bubble-out-text:#fff;--bubble-in:#eceff3;--shadow:0 20px 50px #0f172a2e}@media (prefers-color-scheme:dark){:root{--bg:#0b0d11;--surface:#161a20;--surface-2:#20252d;--text:#eef1f5;--muted:#9aa3af;--border:#2a3039;--accent:#4f8cff;--accept:#22c55e;--decline:#ef4444;--bubble-out:#3b74f0;--bubble-in:#262c35;--shadow:0 20px 50px #00000080}}*{box-sizing:border-box}body{-webkit-font-smoothing:antialiased;background:#e9ecf1;background:var(--bg);color:#14171c;color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;margin:0}button,input{color:inherit;font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}[hidden]{display:none!important}.device{background:#fff;background:var(--surface);display:flex;flex-direction:column;height:100dvh;margin:0 auto;max-width:400px;width:100%}@media (min-width:480px) and (min-height:760px){.device{border:1px solid #dde1e7;border:1px solid var(--border);border-radius:36px;box-shadow:0 20px 50px #0f172a2e;box-shadow:var(--shadow);height:780px;margin:calc(100dvh/2 - 390px) auto 0;overflow:hidden}}.topbar{align-items:center;display:flex;font-weight:600;justify-content:space-between;padding:14px 20px 10px}.screen{overflow:hidden}.screen,.screen>div{display:flex;flex:1 1;flex-direction:column;min-height:0}.tabbar{background:#fff;background:var(--surface);border-top:1px solid #dde1e7;border-top:1px solid var(--border);display:grid;grid-template-columns:repeat(4,1fr)}.tabbar button{align-items:center;background:none;border:0;color:#6b7280;color:var(--muted);display:flex;flex-direction:column;font-size:12px;gap:2px;padding:8px 0 12px}.tabbar button.selected{color:#2563eb;color:var(--accent);font-weight:600}.tab-icon{font-size:20px}.panel{display:flex;flex:1 1;flex-direction:column;gap:12px;min-height:0;padding:16px 20px}.panel h1,.panel h2{margin:0}.hint{color:#6b7280;color:var(--muted);font-size:14px;font-weight:400}.center{padding:24px 0;text-align:center}.error{color:#dc2626;color:var(--decline);font-size:14px}.row{align-items:center;display:flex;gap:28px;justify-content:center}.panel input{background:#f2f4f7;background:var(--surface-2);border:1px solid #dde1e7;border:1px solid var(--border);border-radius:12px;outline:none;padding:12px 14px;width:100%}.panel input:focus{border-color:#2563eb;border-color:var(--accent)}.primary{background:#2563eb;background:var(--accent);border:0;border-radius:12px;color:#fff;font-weight:600;padding:12px}.link{background:none;border:0;color:#2563eb;color:var(--accent);font-size:14px;padding:0}.status-line{align-items:center;color:#6b7280;color:var(--muted);display:flex;font-size:13px;gap:8px}.dot{background:#6b7280;background:var(--muted);border-radius:50%;height:8px;width:8px}.dot.ok{background:#16a34a;background:var(--accept)}.round{border:0;border-radius:50%;color:#fff;display:grid;font-size:26px;height:64px;place-items:center;width:64px}.round-spacer{width:64px}.round.accept{background:#16a34a;background:var(--accept)}.round.decline{background:#dc2626;background:var(--decline)}.round .icon{height:28px;width:28px}.round.hangup .icon{transform:rotate(135deg)}.round.secondary{background:#f2f4f7;background:var(--surface-2);color:#14171c;color:var(--text);font-size:22px}.on-hold{color:#dc2626;color:var(--decline);font-weight:600}.round.secondary.active{background:#14171c;background:var(--text);color:#fff;color:var(--surface)}.sign-in{justify-content:center;padding:32px}.sign-in h1{text-align:center}.sign-in label{display:flex;flex-direction:column;font-size:14px;font-weight:600;gap:6px}.dialer{--key:clamp(52px,8.5dvh,72px);--key-gap-x:clamp(20px,3.5dvh,28px);gap:clamp(4px,1.2dvh,12px);justify-content:space-between;overflow-y:auto}.number-display.number-display{background:none;border:0;font-size:30px;font-weight:300;letter-spacing:1px;padding:8px 0 0;text-align:center}.call-status{font-feature-settings:"tnum";color:#6b7280;color:var(--muted);font-size:14px;font-variant-numeric:tabular-nums;min-height:20px;text-align:center}.keypad{grid-gap:clamp(8px,1.6dvh,14px) var(--key-gap-x);display:grid;gap:clamp(8px,1.6dvh,14px) var(--key-gap-x);grid-template-columns:repeat(3,var(--key))}.key,.keypad{justify-content:center}.key{align-items:center;background:#f2f4f7;background:var(--surface-2);border:0;border-radius:50%;display:flex;flex-direction:column;height:var(--key);line-height:1;width:var(--key)}.key:active{background:#dde1e7;background:var(--border)}.digit{font-size:calc(var(--key)*.38)}.letters{color:#6b7280;color:var(--muted);font-size:10px;letter-spacing:2px;margin-top:2px;min-height:12px}.call-controls{grid-column-gap:var(--key-gap-x);column-gap:var(--key-gap-x);display:grid;grid-template-columns:repeat(3,var(--key));justify-content:center;justify-items:center;padding-bottom:8px}.call-controls .round,.call-controls .round-spacer{height:calc(var(--key) - 4px);width:calc(var(--key) - 4px)}.incoming{align-items:center;animation:pulse 1.4s ease-in-out infinite;background:#f2f4f7;background:var(--surface-2);border-radius:20px;display:flex;flex-direction:column;gap:8px;padding:16px}.incoming-label{color:#6b7280;color:var(--muted);font-size:13px}.incoming-from{font-size:20px;font-weight:600;margin-bottom:8px}@keyframes pulse{50%{box-shadow:0 0 0 6px color-mix(in srgb,#16a34a 30%,#0000);box-shadow:0 0 0 6px color-mix(in srgb,var(--accept) 30%,#0000)}}.video-lobby{justify-content:center}.room-header{align-items:baseline;display:flex;justify-content:space-between}.room-name{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.room-meta{align-items:baseline;display:flex;flex-shrink:0;gap:12px}.invite-card{background:#f2f4f7;background:var(--surface-2);border:1px solid #dde1e7;border:1px solid var(--border);border-radius:16px;display:flex;flex-direction:column;gap:8px;padding:12px 14px}.invite-card .hint{margin:0}.invite-heading{align-items:baseline;display:flex;justify-content:space-between}.invite-code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:24px;font-weight:600;letter-spacing:.08em}.invite-code,.invite-link{text-align:center;-webkit-user-select:all;user-select:all}.invite-link{overflow-wrap:anywhere}.invite-actions{display:flex;flex-wrap:wrap;gap:8px}.invite-actions button{flex:1 1 auto}.secondary-button{background:#fff;background:var(--surface);border:1px solid #dde1e7;border:1px solid var(--border);border-radius:12px;color:#14171c;color:var(--text);font-weight:600;padding:12px}.tiles{grid-gap:8px;display:grid;flex:1 1;gap:8px;grid-auto-rows:1fr;min-height:0;position:relative}.tiles.count-2,.tiles.count-3,.tiles.count-4{grid-template-columns:1fr 1fr}.tile{background:#000;border-radius:16px;min-height:0;overflow:hidden;position:relative}.tile-media,.tile-media video{height:100%;width:100%}.tile-media video{display:block;object-fit:cover}.tile-name{background:#0000008c;border-radius:8px;bottom:8px;color:#fff;font-size:12px;left:8px;padding:2px 8px;position:absolute}.tiles.count-0 .tile.local,.tiles.count-1 .tile.local{aspect-ratio:3/4;border:2px solid #fff;border:2px solid var(--surface);height:auto;position:absolute;right:10px;top:10px;width:30%;z-index:1}.tile.local video{transform:scaleX(-1)}.waiting{background:#f2f4f7;background:var(--surface-2);border-radius:16px;color:#6b7280;color:var(--muted);display:grid;font-size:14px;place-items:center}.composer{display:flex;gap:8px}.send{background:#2563eb;background:var(--accent);border:0;border-radius:50%;color:#fff;flex:none;font-size:20px;width:44px}.threads{list-style:none;margin:0 -20px;overflow-y:auto;padding:0}.thread{grid-gap:2px 8px;background:none;border:0;border-bottom:1px solid #dde1e7;border-bottom:1px solid var(--border);display:grid;gap:2px 8px;grid-template-columns:1fr auto;padding:12px 20px;text-align:left;width:100%}.thread:hover{background:#f2f4f7;background:var(--surface-2)}.thread-party{font-weight:600}.thread-party .badge,.thread-title .badge{margin-left:6px;vertical-align:middle}.thread-time{font-size:12px}.thread-preview,.thread-time{color:#6b7280;color:var(--muted)}.thread-preview{font-size:14px;grid-column:1/-1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.thread-header{align-items:center;display:grid;grid-template-columns:60px 1fr 60px}.call-link{justify-self:end}.thread-title{font-weight:600;text-align:center}.bubbles{display:flex;flex:1 1;flex-direction:column;gap:6px;min-height:0;overflow-y:auto}.bubble{border-radius:18px;max-width:78%;overflow-wrap:anywhere;padding:8px 12px;white-space:pre-wrap}.bubble.outbound{align-self:flex-end;background:#2563eb;background:var(--bubble-out);border-bottom-right-radius:6px;color:#fff;color:var(--bubble-out-text)}.bubble.inbound{align-self:flex-start;background:#eceff3;background:var(--bubble-in);border-bottom-left-radius:6px}.bubble-time{font-size:11px;margin-top:2px;opacity:.7;text-align:right}.who{display:flex;flex-direction:column;gap:2px;min-width:0}.number-line{align-items:center;display:flex;flex-wrap:wrap;gap:8px}.topbar-actions{align-items:flex-end;display:flex;flex-direction:column;gap:4px}.badges{display:inline-flex;gap:4px}.badge{border-radius:6px;font-size:10px;font-weight:600;letter-spacing:.04em;padding:2px 6px}.badge.on{background:color-mix(in srgb,#16a34a 16%,#0000);background:color-mix(in srgb,var(--accept) 16%,#0000);color:#16a34a;color:var(--accept)}.badge.off{background:#f2f4f7;background:var(--surface-2);color:#6b7280;color:var(--muted);text-decoration:line-through}.picker{overflow-y:auto}.number-list{display:flex;flex-direction:column;gap:8px;list-style:none;margin:0;padding:0}.number-option{align-items:center;background:#fff;background:var(--surface);border:1px solid #dde1e7;border:1px solid var(--border);border-radius:12px;display:flex;gap:12px;justify-content:space-between;padding:12px 14px;text-align:left;width:100%}button.number-option:hover:not(:disabled){border-color:#2563eb;border-color:var(--accent)}.number-option.taken{opacity:.55}.number-main{display:flex;flex-direction:column;gap:4px}.number-value{font-feature-settings:"tnum";font-variant-numeric:tabular-nums;font-weight:600}.number-action{color:#2563eb;color:var(--accent);font-size:14px;font-weight:600}.number-option.taken .number-action{color:#6b7280;color:var(--muted)}.tabbar button:disabled{opacity:.35}.contact-list{flex:1 1;list-style:none;margin:0;overflow-y:auto;padding:0}.contact-list li{border-bottom:1px solid #dde1e7;border-bottom:1px solid var(--border)}.contact{align-items:center;background:none;border:0;color:#14171c;color:var(--text);display:flex;gap:12px;padding:10px 4px;text-align:left;width:100%}.avatar{background:#f2f4f7;background:var(--surface-2);border-radius:50%;display:grid;flex:none;font-size:13px;font-weight:600;height:36px;place-items:center;width:36px}.contact-text{display:flex;flex-direction:column;min-width:0}.contact-name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.contact-actions{grid-gap:6px;display:grid;gap:6px;grid-template-columns:repeat(4,1fr);padding:0 4px 10px 52px}.contact-actions button{background:#f2f4f7;background:var(--surface-2);border:1px solid #dde1e7;border:1px solid var(--border);border-radius:8px;color:#14171c;color:var(--text);font-size:12px;padding:6px 4px}.contact-actions .danger{color:#dc2626;color:var(--decline)}.contact-form label{display:flex;flex-direction:column;font-size:13px;gap:4px}.contact-match{font-weight:600;text-align:center}.panel label.checkbox{align-items:center;display:flex;flex-direction:row;font-size:14px;gap:8px;width:fit-content}.panel .checkbox input{accent-color:#2563eb;accent-color:var(--accent);height:18px;margin:0;padding:0;width:18px}.contact-form .field{display:flex;flex-direction:column;font-size:13px;gap:4px}.phone-input{align-items:stretch;display:flex;gap:8px}.phone-input input{flex:1 1;min-width:0}.country-pick{align-items:center;background:#f2f4f7;background:var(--surface-2);border:1px solid #dde1e7;border:1px solid var(--border);border-radius:12px;display:inline-flex;font-size:15px;gap:6px;padding:0 10px;position:relative;white-space:nowrap}.country-pick.muted{opacity:.45}.country-pick select{cursor:pointer;inset:0;opacity:0;position:absolute;width:100%}.flag{border-radius:2px;box-shadow:0 0 0 1px #0000001a;flex:none;height:16px;width:24px}.flag.small{height:12px;margin-right:6px;vertical-align:-1px;width:18px}.mock-toolbar{align-items:center;background:#fff;background:var(--surface);border:1px dashed #2563eb;border:1px dashed var(--accent);border-radius:10px;bottom:12px;box-shadow:0 20px 50px #0f172a2e;box-shadow:var(--shadow);display:flex;flex-wrap:wrap;font-size:12px;gap:6px;left:12px;max-width:calc(100vw - 24px);padding:8px 10px;position:fixed;z-index:10}.mock-toolbar button{background:#f2f4f7;background:var(--surface-2);border:1px solid #dde1e7;border:1px solid var(--border);border-radius:6px;color:#14171c;color:var(--text);padding:4px 8px}.picker-heading{align-items:baseline;display:flex;justify-content:space-between}.number-row{align-items:center;display:flex;gap:10px}.number-row .number-option{flex:1 1;min-width:0}.number-option.current{border-color:#2563eb;border-color:var(--accent);box-shadow:inset 0 0 0 1px #2563eb;box-shadow:inset 0 0 0 1px var(--accent)}.danger-link{color:#dc2626;color:var(--decline);font-size:13px}.add-number{align-items:center;background:#f2f4f7;background:var(--surface-2);border:1px dashed #dde1e7;border:1px dashed var(--border);border-radius:12px;color:#2563eb;color:var(--accent);display:flex;font-weight:600;justify-content:space-between;margin-top:4px;padding:14px;width:100%}.add-number:hover:not(:disabled){border-color:#2563eb;border-color:var(--accent)}