@font-face {
    font-family: "Quicksand";
    src: url("/font/Quicksand-Regular.ttf") format("truetype");
    font-display: swap;
    font-weight: 400 600;
}

@font-face {
    font-family: "Quicksand Bold";
    src: url("/font/Quicksand-Bold.ttf") format("truetype");
    font-display: swap;
    font-weight: 700 900;
}

:root {
    --phone-bg: #f5f5f7;
    --phone-surface: #ffffff;
    --phone-surface-soft: #f2f2f7;
    --phone-key: #e9e9ee;
    --phone-key-hover: #f0f0f4;
    --phone-line: rgba(60, 60, 67, .12);
    --phone-ink: #1d1d1f;
    --phone-muted: #68686d;
    --phone-blue: #0066cc;
    --phone-blue-fill: #0066cc;
    --phone-blue-soft: #e8f2ff;
    --phone-green: #1f7a36;
    --phone-green-fill: #1f7a36;
    --phone-green-soft: #eaf9ed;
    --phone-red: #d70015;
    --phone-red-fill: #d70015;
    --phone-red-soft: #fff0ef;
    --phone-shadow: 0 14px 40px rgba(0, 0, 0, .06);
    color-scheme: light;
}

:root[data-phone-theme="dark"] {
    --phone-bg: #000000;
    --phone-surface: #1c1c1e;
    --phone-surface-soft: #2c2c2e;
    --phone-key: #333336;
    --phone-key-hover: #252527;
    --phone-line: rgba(255, 255, 255, .1);
    --phone-ink: #f5f5f7;
    --phone-muted: #9d9da2;
    --phone-blue: #66adff;
    --phone-blue-fill: #0a5fc2;
    --phone-blue-soft: #102c49;
    --phone-green: #55d975;
    --phone-green-fill: #217a38;
    --phone-green-soft: #15351d;
    --phone-red: #ff6961;
    --phone-red-fill: #b52a25;
    --phone-red-soft: #411a18;
    --phone-shadow: none;
    color-scheme: dark;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--phone-bg);
}

.phone-app-body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    color: var(--phone-ink);
    background:
        radial-gradient(circle at 50% -12rem, color-mix(in srgb, var(--phone-blue) 7%, transparent), transparent 31rem),
        var(--phone-bg);
    font-family: "Quicksand", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.phone-app-body *,
.phone-app-body *::before,
.phone-app-body *::after {
    box-sizing: border-box;
}

.phone-app-body button,
.phone-app-body input,
.phone-app-body textarea {
    font: inherit;
}

.phone-app-body button,
.phone-app-body summary,
.phone-app-body a {
    -webkit-tap-highlight-color: transparent;
}

.phone-app-body button {
    cursor: pointer;
}

.phone-app-body button:disabled {
    cursor: not-allowed;
}

.phone-app-body [hidden] {
    display: none !important;
}

.phone-app-body .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.phone-app-body :is(button, a, input, textarea, summary):focus-visible {
    outline: 3px solid var(--phone-blue);
    outline-offset: 3px;
}

.phone-app-atmosphere {
    display: none;
}

.phone-app-frame {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.phone-app-topbar {
    position: sticky;
    z-index: 40;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: max(10px, env(safe-area-inset-top)) clamp(16px, 4vw, 28px) 10px;
    border-bottom: 1px solid var(--phone-line);
    background: color-mix(in srgb, var(--phone-bg) 82%, transparent);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.phone-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--phone-ink);
    text-decoration: none;
}

.phone-brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--phone-surface);
}

.phone-brand-mark img {
    width: 23px;
    height: 23px;
}

.phone-brand > span:last-child {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.phone-brand strong,
.phone-brand small {
    display: inline;
}

.phone-brand strong {
    font-family: "Quicksand Bold", sans-serif;
    font-size: 16px;
    letter-spacing: -.04em;
}

.phone-brand small {
    color: var(--phone-muted);
    font-size: 14px;
    letter-spacing: -.03em;
}

.phone-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-topbar-actions form {
    margin: 0;
}

.phone-icon-button,
.phone-topbar-link {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--phone-ink);
    background: var(--phone-surface-soft);
    text-decoration: none;
    transition: background .18s ease, transform .18s ease;
}

.phone-icon-button:hover,
.phone-topbar-link:hover {
    background: var(--phone-key);
}

.phone-icon-button:active,
.phone-topbar-link:active {
    transform: scale(.94);
}

.phone-icon-button svg,
.phone-topbar-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.phone-theme-moon,
:root[data-phone-theme="dark"] .phone-theme-sun {
    display: none;
}

:root[data-phone-theme="dark"] .phone-theme-moon {
    display: block;
}

.phone-app-main {
    display: grid;
    flex: 1;
    width: min(100%, 520px);
    margin: 0 auto;
    padding: clamp(16px, 4vw, 30px) clamp(12px, 3vw, 20px) 20px;
}

.phone-app-grid {
    display: grid;
    grid-template-columns: minmax(0, 440px);
    justify-content: center;
    gap: 14px;
}

.phone-device,
.phone-login-card {
    border: 1px solid var(--phone-line);
    background: var(--phone-surface);
    box-shadow: var(--phone-shadow);
}

.phone-device {
    --device-pad: clamp(20px, 5vw, 30px);
    width: 100%;
    overflow: hidden;
    border-radius: 32px;
}

.phone-device-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 20px var(--device-pad) 2px;
}

.phone-line-identity {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    gap: 11px;
}

.phone-avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--phone-blue);
    background: var(--phone-blue-soft);
    font-family: "Quicksand Bold", sans-serif;
    font-size: 12px;
}

.phone-line-copy {
    min-width: 0;
}

.phone-line-copy strong,
.phone-line-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phone-line-copy strong {
    font-family: "Quicksand Bold", sans-serif;
    font-size: 14px;
    letter-spacing: -.025em;
}

.phone-line-copy span {
    margin-top: 2px;
    color: var(--phone-muted);
    font-size: 10px;
}

.webphone-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    max-width: 145px;
    overflow: hidden;
    color: var(--phone-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.webphone-status span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.webphone-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--phone-muted);
}

.phone-device[data-call-state="connected"] .webphone-status {
    color: var(--phone-green);
}

.phone-device[data-call-state="connected"] .webphone-status i,
.phone-device[data-call-state="talking"] .webphone-status i {
    background: var(--phone-green);
}

.phone-device[data-call-state="error"] .webphone-status {
    color: var(--phone-red);
}

.phone-device[data-call-state="error"] .webphone-status i {
    background: var(--phone-red);
}

.phone-call-display {
    display: grid;
    place-items: center;
    padding: 18px var(--device-pad) 8px;
    text-align: center;
}

.voice-orb-stage {
    position: relative;
    display: grid;
    place-items: center;
    width: 132px;
    height: 132px;
}

.voice-orb-stage::before {
    position: absolute;
    inset: 3px;
    border: 1px solid color-mix(in srgb, var(--phone-blue) 12%, transparent);
    border-radius: 50%;
    content: "";
}

.voice-orb {
    position: relative;
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    color: #ffffff;
    background:
        radial-gradient(circle at 33% 25%, rgba(255, 255, 255, .38), transparent 27%),
        linear-gradient(145deg, #1683dd, #51a6d9 58%, #77bfbc);
    box-shadow: 0 10px 28px rgba(0, 122, 255, .18);
    isolation: isolate;
    animation: phone-orb-breathe 5s ease-in-out infinite;
}

.voice-orb::before,
.voice-orb::after {
    position: absolute;
    z-index: -1;
    inset: 13%;
    border-radius: 45% 55% 50% 50%;
    content: "";
    background: rgba(255, 255, 255, .12);
    filter: blur(8px);
    animation: phone-fluid 7s ease-in-out infinite alternate;
}

.voice-orb::after {
    inset: 28%;
    background: rgba(134, 222, 211, .28);
    animation-direction: alternate-reverse;
    animation-duration: 5.5s;
}

.voice-orb > span {
    position: absolute;
    inset: -10px;
    border: 1px solid color-mix(in srgb, var(--phone-blue) 24%, transparent);
    border-radius: 50%;
    opacity: 0;
}

.voice-orb > span:nth-child(2) {
    inset: -20px;
}

.voice-orb > span:nth-child(3) {
    inset: -30px;
}

.voice-orb strong,
.voice-orb small {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.voice-orb-mark {
    display: grid;
    place-items: center;
}

.voice-orb-mark svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.voice-orb.connecting > span,
.voice-orb.calling > span,
.voice-orb.ringing > span,
.voice-orb.talking > span {
    animation: phone-orb-pulse 2.8s ease-out infinite;
}

.voice-orb > span:nth-child(2) {
    animation-delay: .45s;
}

.voice-orb > span:nth-child(3) {
    animation-delay: .9s;
}

.voice-orb.ringing,
.voice-orb.talking {
    background: linear-gradient(145deg, var(--phone-green-fill), color-mix(in srgb, var(--phone-green-fill) 86%, white));
    box-shadow: 0 10px 28px color-mix(in srgb, var(--phone-green) 24%, transparent);
}

.voice-orb.ringing {
    animation: phone-ring 1.2s ease-in-out infinite;
}

.voice-orb.error {
    background: linear-gradient(145deg, var(--phone-red-fill), color-mix(in srgb, var(--phone-red-fill) 88%, white));
    box-shadow: 0 10px 28px color-mix(in srgb, var(--phone-red) 22%, transparent);
    animation: none;
}

.phone-state-label {
    margin: 13px 0 0;
    color: var(--phone-ink);
    font-family: "Quicksand Bold", sans-serif;
    font-size: 15px;
    letter-spacing: -.02em;
}

.phone-call-duration {
    margin: 4px 0 0;
    color: var(--phone-green);
    font-family: "Quicksand Bold", sans-serif;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.phone-number-field {
    position: relative;
    display: block;
    width: 100%;
    margin-top: 9px;
}

.webphone-number {
    width: 100%;
    min-height: 48px;
    padding: 4px 42px;
    border: 0;
    outline: 0;
    color: var(--phone-ink);
    background: transparent;
    font-family: "Quicksand", sans-serif;
    font-size: clamp(26px, 7vw, 34px);
    letter-spacing: -.045em;
    text-align: center;
    caret-color: var(--phone-blue);
}

.webphone-number::placeholder {
    color: var(--phone-muted);
    opacity: 1;
}

.phone-number-clear {
    position: absolute;
    top: 50%;
    right: 2px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--phone-muted);
    background: transparent;
    transform: translateY(-50%);
}

.phone-number-clear:hover:not(:disabled) {
    background: var(--phone-surface-soft);
}

.phone-number-clear:disabled {
    opacity: 0;
}

.phone-number-clear svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.phone-state-detail {
    min-height: 17px;
    margin: 1px 0 0;
    color: var(--phone-muted);
    font-size: 11px;
}

.phone-device[data-call-state="connected"] .voice-orb-stage,
.phone-device[data-call-state="connected"] .phone-state-label {
    display: none;
}

.phone-device[data-call-state="connected"] .phone-call-display {
    padding-top: 20px;
}

.phone-device[data-call-state="connected"] .phone-number-field {
    margin-top: 0;
}

.phone-keypad {
    display: grid;
    grid-template-columns: repeat(3, 72px);
    justify-content: center;
    gap: 12px 21px;
    padding: 10px var(--device-pad) 16px;
}

.phone-key {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    padding: 8px 0 5px;
    border: 0;
    border-radius: 50%;
    color: var(--phone-ink);
    background: var(--phone-key);
    transition: background .12s ease, transform .12s ease;
}

.phone-key:hover {
    background: var(--phone-key-hover);
}

.phone-key:active {
    transform: scale(.92);
}

.phone-key strong,
.phone-key small {
    display: block;
    line-height: 1;
}

.phone-key strong {
    font-family: "Quicksand", sans-serif;
    font-size: 27px;
    font-weight: 500;
}

.phone-key small {
    min-height: 8px;
    margin-top: 4px;
    color: var(--phone-muted);
    font-size: 8px;
    letter-spacing: .15em;
}

.phone-call-tools {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 4px var(--device-pad) 14px;
}

.phone-tool-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    color: var(--phone-ink);
    background: var(--phone-surface-soft);
    font-size: 10px;
}

.phone-tool-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.phone-tool-button[aria-pressed="true"] {
    color: var(--phone-red);
    background: var(--phone-red-soft);
}

.webphone-keypad-toggle[aria-pressed="true"] {
    color: var(--phone-blue);
    background: var(--phone-blue-soft);
}

.phone-call-actions {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 94px;
    gap: 28px;
    padding: 5px var(--device-pad) 12px;
}

.phone-action {
    display: grid;
    justify-items: center;
    min-width: 76px;
    padding: 0;
    border: 0;
    color: var(--phone-muted);
    background: transparent;
    font-size: 11px;
    transition: opacity .18s ease, transform .18s ease;
}

.phone-action:hover:not(:disabled) {
    transform: translateY(-1px);
}

.phone-action:disabled {
    opacity: .28;
}

.phone-action-icon {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    margin-bottom: 7px;
    border-radius: 50%;
}

.phone-action-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.webphone-call,
.webphone-answer {
    color: var(--phone-green);
}

.webphone-call .phone-action-icon,
.webphone-answer .phone-action-icon {
    color: #ffffff;
    background: var(--phone-green-fill);
}

.webphone-ai-call,
.webphone-ai-answer {
    color: var(--phone-blue);
}

.webphone-ai-call .phone-action-icon,
.webphone-ai-answer .phone-action-icon {
    color: #ffffff;
    background: var(--phone-blue-fill);
}

.webphone-hangup {
    color: var(--phone-red);
}

.webphone-hangup .phone-action-icon {
    color: #ffffff;
    background: var(--phone-red-fill);
}

.webphone-hangup .phone-action-icon svg {
    transform: rotate(135deg);
}

.webphone-connect {
    align-self: center;
    min-height: 44px;
    padding: 0 17px;
    border: 0;
    border-radius: 999px;
    color: var(--phone-blue);
    background: var(--phone-blue-soft);
    font-family: "Quicksand Bold", sans-serif;
    font-size: 11px;
}

.phone-ai-composer {
    width: min(calc(100% - 40px), 620px);
    margin: 0 auto 18px;
    padding: 15px;
    border: 1px solid var(--phone-line);
    border-radius: 22px;
    background: var(--phone-surface);
    box-shadow: var(--phone-shadow);
}

.phone-ai-composer-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.phone-ai-composer-header > span:last-child,
.phone-ai-composer-header strong,
.phone-ai-composer-header small {
    display: block;
}

.phone-ai-composer-header strong {
    font-family: "Quicksand Bold", sans-serif;
    font-size: 12px;
}

.phone-ai-composer-header small {
    margin-top: 2px;
    color: var(--phone-muted);
    font-size: 9px;
}

.phone-ai-badge {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--phone-blue);
    background: var(--phone-blue-soft);
}

.phone-ai-badge svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.phone-ai-messages {
    display: grid;
    max-height: 116px;
    gap: 7px;
    margin-top: 12px;
    overflow-y: auto;
}

.phone-ai-messages:empty {
    display: none;
}

.phone-ai-message {
    padding: 9px 11px;
    border-radius: 13px;
    background: var(--phone-surface-soft);
}

.phone-ai-message p,
.phone-ai-message span {
    margin: 0;
}

.phone-ai-message p {
    color: var(--phone-ink);
    font-size: 11px;
    line-height: 1.45;
}

.phone-ai-message span {
    display: block;
    margin-top: 3px;
    color: var(--phone-muted);
    font-size: 8px;
}

.phone-ai-message.is-speaking {
    background: var(--phone-blue-soft);
}

.phone-ai-message.is-speaking span {
    color: var(--phone-blue);
}

.phone-ai-message.is-spoken span {
    color: var(--phone-green);
}

.phone-ai-message.is-error span {
    color: var(--phone-red);
}

.phone-ai-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 9px;
    margin-top: 12px;
}

.phone-ai-text {
    width: 100%;
    min-height: 48px;
    max-height: 120px;
    resize: vertical;
    padding: 11px 12px;
    border: 1px solid var(--phone-line);
    border-radius: 14px;
    outline: 0;
    color: var(--phone-ink);
    background: var(--phone-surface-soft);
    font-size: 12px;
    line-height: 1.4;
}

.phone-ai-text:focus {
    border-color: color-mix(in srgb, var(--phone-blue) 55%, var(--phone-line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--phone-blue) 12%, transparent);
}

.phone-ai-send {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--phone-blue-fill);
    font-family: "Quicksand Bold", sans-serif;
    font-size: 10px;
}

.phone-ai-send:disabled {
    opacity: .35;
}

.phone-ai-note {
    margin: 9px 2px 0;
    color: var(--phone-muted);
    font-size: 8px;
    line-height: 1.45;
}

.webphone-help {
    max-width: 36ch;
    margin: 0 auto;
    padding: 0 var(--device-pad) 20px;
    color: var(--phone-muted);
    font-size: 9px;
    line-height: 1.5;
    text-align: center;
}

.phone-device[data-call-state="ringing"] .phone-keypad,
.phone-device[data-call-state="calling"] .phone-keypad,
.phone-device[data-call-state="talking"]:not([data-dtmf-open="true"]) .phone-keypad {
    display: none;
}

.phone-device[data-call-state="ringing"] .voice-orb-stage,
.phone-device[data-call-state="calling"] .voice-orb-stage,
.phone-device[data-call-state="talking"] .voice-orb-stage {
    width: 152px;
    height: 152px;
}

.phone-device[data-call-state="ringing"] .voice-orb,
.phone-device[data-call-state="calling"] .voice-orb,
.phone-device[data-call-state="talking"] .voice-orb {
    width: 120px;
    height: 120px;
}

.phone-device[data-call-state="talking"][data-dtmf-open="true"] .voice-orb-stage {
    width: 92px;
    height: 92px;
}

.phone-device[data-call-state="talking"][data-dtmf-open="true"] .voice-orb {
    width: 72px;
    height: 72px;
}

.phone-device[data-call-state="talking"][data-dtmf-open="true"] .voice-orb-mark svg {
    width: 20px;
    height: 20px;
}

.phone-account-toggle[aria-expanded="true"] {
    color: var(--phone-blue);
    background: var(--phone-blue-soft);
}

.phone-account-backdrop {
    position: fixed;
    z-index: 45;
    inset: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, .18);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: opacity .24s ease;
}

.phone-account-is-open {
    overflow: hidden;
}

.phone-account-is-open .phone-account-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.phone-account-panel {
    position: fixed;
    z-index: 50;
    top: 64px;
    right: 0;
    bottom: 0;
    width: min(360px, calc(100vw - 20px));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-left: 1px solid var(--phone-line);
    visibility: hidden;
    color: var(--phone-ink);
    background: color-mix(in srgb, var(--phone-surface) 96%, transparent);
    box-shadow: -24px 0 64px rgba(0, 0, 0, .1);
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .28s;
}

.phone-account-panel[data-open="true"] {
    visibility: visible;
    transform: translateX(0);
    transition-delay: 0s;
}

.phone-account-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px calc(24px + env(safe-area-inset-right)) 18px 24px;
    border-bottom: 1px solid var(--phone-line);
}

.phone-account-panel-header > span {
    min-width: 0;
}

.phone-account-panel-header strong,
.phone-account-panel-header small {
    display: block;
}

.phone-account-panel-header strong {
    font-family: "Quicksand Bold", sans-serif;
    font-size: 15px;
}

.phone-account-panel-header small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--phone-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phone-account-close {
    flex: 0 0 auto;
}

.phone-account-content {
    padding: 0 calc(24px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) 24px;
}

.phone-account-section {
    padding-top: 16px;
}

.phone-account-section + .phone-account-section {
    margin-top: 14px;
    border-top: 1px solid var(--phone-line);
}

.phone-account-kicker {
    margin: 0 0 8px;
    color: var(--phone-muted);
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.phone-account-list {
    display: grid;
    gap: 6px;
    margin: 0;
}

.phone-account-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0;
    font-size: 11px;
}

.phone-account-row dt {
    color: var(--phone-muted);
}

.phone-account-row dd {
    max-width: 62%;
    margin: 0;
    overflow-wrap: anywhere;
    font-family: "Quicksand Bold", sans-serif;
    text-align: right;
}

.phone-number-list {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.phone-number-list li {
    padding: 11px 12px;
    border-radius: 12px;
    background: var(--phone-surface-soft);
}

.phone-number-list strong,
.phone-number-list span {
    display: block;
}

.phone-number-list strong {
    font-family: "Quicksand Bold", sans-serif;
    font-size: 11px;
}

.phone-number-list span {
    margin-top: 2px;
    color: var(--phone-muted);
    font-size: 9px;
}

.phone-empty-number {
    color: var(--phone-muted);
    font-size: 10px;
}

.phone-login-wrap {
    display: grid;
    align-self: center;
    place-items: center;
    min-height: min(650px, calc(100dvh - 160px));
}

.phone-login-card {
    width: min(100%, 410px);
    padding: clamp(25px, 6vw, 38px);
    border-radius: 28px;
}

.phone-login-visual {
    position: relative;
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 22px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--phone-blue-fill);
}

.phone-login-visual svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.phone-login-eyebrow {
    margin: 0;
    color: var(--phone-muted);
    font-size: 10px;
    text-align: center;
}

.phone-login-card h1 {
    margin: 8px auto 9px;
    font-family: "Quicksand Bold", sans-serif;
    font-size: clamp(29px, 8vw, 38px);
    line-height: 1.05;
    letter-spacing: -.055em;
    text-align: center;
}

.phone-login-lede {
    max-width: 35ch;
    margin: 0 auto 25px;
    color: var(--phone-muted);
    font-size: 11px;
    line-height: 1.55;
    text-align: center;
}

.phone-login-form {
    display: grid;
    gap: 12px;
}

.phone-field {
    display: grid;
    gap: 6px;
    color: var(--phone-muted);
    font-size: 10px;
}

.phone-field span {
    padding-left: 3px;
}

.phone-field input {
    width: 100%;
    min-height: 50px;
    padding: 0 15px;
    border: 0;
    border-radius: 13px;
    outline: 0;
    color: var(--phone-ink);
    background: var(--phone-surface-soft);
    font-size: 14px;
    transition: box-shadow .18s ease, background .18s ease;
}

.phone-field input:focus {
    background: var(--phone-surface);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--phone-blue) 22%, transparent);
}

.phone-login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    margin-top: 3px;
    padding: 0 18px;
    border: 0;
    border-radius: 13px;
    color: #ffffff;
    background: var(--phone-blue-fill);
    font-family: "Quicksand Bold", sans-serif;
    font-size: 12px;
    transition: filter .18s ease, transform .18s ease;
}

.phone-login-submit:hover {
    filter: brightness(1.06);
}

.phone-login-submit:active {
    transform: scale(.985);
}

.phone-login-submit svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.phone-login-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 18px 0 0;
    color: var(--phone-muted);
    font-size: 9px;
}

.phone-login-trust i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--phone-green);
}

.phone-flash {
    width: min(100%, 440px);
    margin: 0 auto 12px;
    padding: 11px 13px;
    border-radius: 13px;
    font-size: 12px;
}

.phone-flash-success {
    color: var(--phone-green);
    background: var(--phone-green-soft);
}

.phone-flash-error {
    color: var(--phone-red);
    background: var(--phone-red-soft);
}

.phone-app-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 10px 18px max(17px, env(safe-area-inset-bottom));
    color: var(--phone-muted);
    font-size: 9px;
}

.phone-app-footer > span {
    display: none;
}

.phone-app-footer nav {
    display: flex;
    gap: 16px;
}

.phone-app-footer a {
    color: inherit;
    text-decoration: none;
}

@media (min-width: 860px) {
    .phone-app-body--fullscreen {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    .phone-app-body--fullscreen .phone-app-frame {
        height: 100%;
        min-height: 0;
    }

    .phone-app-body--fullscreen .phone-app-topbar {
        position: relative;
        flex: 0 0 auto;
    }

    .phone-app-body--fullscreen .phone-app-main {
        display: block;
        width: 100%;
        min-height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }

    .phone-app-body--fullscreen .phone-app-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
        justify-content: stretch;
        width: 100%;
        height: 100%;
        min-height: 0;
        gap: 0;
    }

    .phone-app-body--fullscreen .phone-device {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        overflow-y: auto;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .phone-app-body--fullscreen .phone-device-header {
        padding: 24px clamp(28px, 4vw, 56px) 0;
    }

    .phone-app-body--fullscreen .phone-call-display {
        align-content: center;
        flex: 1 0 auto;
        min-height: 220px;
        padding: 20px clamp(28px, 4vw, 56px) 8px;
    }

    .phone-app-body--fullscreen .voice-orb-stage {
        width: 164px;
        height: 164px;
    }

    .phone-app-body--fullscreen .voice-orb {
        width: 128px;
        height: 128px;
    }

    .phone-app-body--fullscreen .phone-number-field {
        max-width: 560px;
    }

    .phone-app-body--fullscreen .webphone-number {
        font-size: clamp(32px, 4vw, 44px);
    }

    .phone-app-body--fullscreen .phone-keypad {
        grid-template-columns: repeat(3, 76px);
        gap: 13px 24px;
        padding-top: 8px;
        padding-bottom: 14px;
    }

    .phone-app-body--fullscreen .phone-key {
        width: 76px;
        height: 76px;
    }

    .phone-app-body--fullscreen .phone-call-actions {
        min-height: 90px;
        padding-bottom: 10px;
    }

    .phone-app-body--fullscreen .phone-ai-composer {
        width: min(calc(100% - 112px), 680px);
    }

    .phone-app-body--fullscreen .webphone-help {
        padding-bottom: 16px;
    }

    .phone-app-body--fullscreen .phone-app-footer {
        display: none;
    }
}

@media (min-width: 860px) and (max-height: 820px) {
    .phone-app-body--fullscreen .phone-device-header {
        padding-top: 14px;
    }

    .phone-app-body--fullscreen .phone-device[data-call-state="connected"] .phone-call-display {
        flex: 0 0 auto;
        min-height: 94px;
        padding-top: 8px;
        padding-bottom: 4px;
    }

    .phone-app-body--fullscreen .phone-device[data-call-state="connected"] .webphone-number {
        min-height: 42px;
        font-size: clamp(28px, 3vw, 36px);
    }

    .phone-app-body--fullscreen .phone-keypad {
        grid-template-columns: repeat(3, 68px);
        gap: 8px 22px;
        padding-top: 4px;
        padding-bottom: 8px;
    }

    .phone-app-body--fullscreen .phone-key {
        width: 68px;
        height: 68px;
    }

    .phone-app-body--fullscreen .phone-key strong {
        font-size: 25px;
    }

    .phone-app-body--fullscreen .phone-call-actions {
        flex: 0 0 auto;
        min-height: 102px;
        padding-top: 4px;
        padding-bottom: 12px;
    }

    .phone-app-body--fullscreen .webphone-help {
        flex: 0 0 auto;
        padding-top: 4px;
        padding-bottom: 12px;
        line-height: 1.35;
    }
}

@media (max-width: 540px) {
    .phone-app-topbar {
        min-height: 58px;
        padding-right: 14px;
        padding-left: 14px;
    }

    .phone-brand-mark {
        width: 32px;
        height: 32px;
    }

    .phone-brand-mark img {
        width: 21px;
        height: 21px;
    }

    .phone-app-main {
        padding: 0 0 14px;
    }

    .phone-app-grid {
        gap: 10px;
    }

    .phone-device,
    .phone-login-card {
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .phone-device {
        --device-pad: 22px;
        border-top: 0;
    }

    .phone-device-header {
        padding-top: 16px;
    }

    .webphone-status {
        max-width: 112px;
    }

    .phone-call-display {
        padding-top: 13px;
    }

    .phone-keypad {
        grid-template-columns: repeat(3, 70px);
        gap: 10px 20px;
    }

    .phone-key {
        width: 70px;
        height: 70px;
    }

    .phone-account-panel {
        top: max(58px, calc(42px + env(safe-area-inset-top)));
        width: min(340px, calc(100vw - 16px));
    }

    .phone-ai-composer {
        width: calc(100% - 24px);
        border-radius: 18px;
    }

    .phone-ai-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .phone-ai-send {
        justify-self: end;
    }

    .phone-login-wrap {
        align-self: start;
        min-height: auto;
    }

    .phone-login-card {
        width: 100%;
        padding: 30px 22px;
        border-top: 0;
    }
}

@media (max-height: 760px) and (max-width: 540px) {
    .voice-orb-stage {
        width: 108px;
        height: 108px;
    }

    .voice-orb {
        width: 86px;
        height: 86px;
    }

    .phone-state-label {
        margin-top: 8px;
    }

    .phone-call-display {
        padding-top: 8px;
        padding-bottom: 4px;
    }

    .phone-keypad {
        gap: 8px 20px;
        padding-top: 6px;
        padding-bottom: 11px;
    }

    .phone-key {
        width: 64px;
        height: 64px;
    }

    .phone-call-actions {
        min-height: 85px;
    }

    .phone-action-icon {
        width: 60px;
        height: 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .phone-app-body *,
    .phone-app-body *::before,
    .phone-app-body *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@keyframes phone-orb-breathe {
    0%, 100% { transform: scale(.985); }
    50% { transform: scale(1.02); }
}

@keyframes phone-fluid {
    0% { border-radius: 44% 56% 49% 51%; transform: translate(-5%, -4%) rotate(-12deg) scale(.96); }
    100% { border-radius: 57% 43% 54% 46%; transform: translate(6%, 5%) rotate(16deg) scale(1.12); }
}

@keyframes phone-orb-pulse {
    0% { opacity: 0; transform: scale(.78); }
    22% { opacity: .42; }
    100% { opacity: 0; transform: scale(1.18); }
}

@keyframes phone-ring {
    0%, 100% { transform: rotate(0) scale(1); }
    25% { transform: rotate(-1.5deg) scale(1.015); }
    50% { transform: rotate(1.5deg) scale(1.015); }
}
