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

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

.phone-assistant {
    width: min(calc(100% - 40px), 580px);
    flex: 0 0 auto;
    margin: 12px auto;
    border: 1px solid var(--phone-line);
    border-radius: var(--phone-radius);
    background: var(--phone-surface);
    font-size: 14px;
}
.phone-assistant summary { padding: 14px 18px; border-radius: var(--phone-radius); cursor: pointer; color: var(--phone-blue); }
.phone-assistant summary span { font-weight: 600; }
.phone-assistant summary small { display: block; margin: 3px 0 0 18px; color: var(--phone-muted); font-size: 13px; }
.assistant-body { padding: 0 18px 16px; }
.assistant-intro, .assistant-privacy { color: var(--phone-muted); font-size: 13px; line-height: 1.6; }
.assistant-messages { max-height: 220px; overflow-y: auto; overscroll-behavior: contain; }
.assistant-message { margin: 8px 0; padding: 10px 14px; border-radius: 16px 16px 16px 6px; background: var(--phone-surface-soft); line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.assistant-message--user { margin-left: 24px; border-radius: 16px 16px 6px 16px; color: #ffffff; background: var(--phone-blue-fill); }
.assistant-status { min-height: 20px; color: var(--phone-muted); font-size: 13px; }
.assistant-controls, .assistant-choices, .assistant-preferences { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.phone-assistant button { min-height: 44px; padding: 8px 18px; border: 1px solid var(--phone-line); border-radius: 999px; color: var(--phone-ink); background: var(--phone-surface); font-weight: 600; }
.phone-assistant .assistant-mic { border-color: var(--phone-blue-fill); color: white; background: var(--phone-blue-fill); }
.phone-assistant[data-listening="true"] .assistant-mic { border-color: var(--phone-red-fill); background: var(--phone-red-fill); }
.phone-assistant button:disabled { opacity: .5; cursor: default; }
.phone-assistant form > label, .assistant-preferences { font-size: 13px; }
.assistant-input-row { display: flex; gap: 8px; margin-top: 6px; }
.assistant-input-row textarea { flex: 1; min-width: 0; resize: vertical; border: 1px solid var(--phone-line); border-radius: var(--phone-radius); padding: 10px; color: var(--phone-ink); background: var(--phone-surface); }
.assistant-preferences label { display: flex; align-items: center; gap: 6px; }
.assistant-privacy a { display: block; margin-top: 6px; color: var(--phone-link); }
.phone-device:has(.phone-assistant[open]) .phone-keypad { display: none; }
.phone-device[data-call-state="ringing"] .phone-assistant,
.phone-device[data-call-state="calling"] .phone-assistant,
.phone-device[data-call-state="talking"] .phone-assistant { display: none; }
.assistant-ticket-list { align-self: start; padding: 24px; border: 1px solid var(--phone-line); border-radius: var(--phone-radius); background: var(--phone-surface); box-shadow: var(--phone-shadow); }
.assistant-ticket-list a { color: var(--phone-link); }
.assistant-ticket-list > p { color: var(--phone-mid); }
.assistant-ticket-list h1 { font-size: 24px; }
.assistant-ticket { margin: 20px 0; padding-top: 18px; border-top: 1px solid var(--phone-line); }
.assistant-ticket small { color: var(--phone-muted); }
.assistant-ticket h2 { font-size: 18px; }
.assistant-ticket-description { white-space: pre-wrap; overflow-wrap: anywhere; }

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

:root {
    /* heytalo-Brand wie auf call.heytalo.de: Weiß/GreyWhite, heytalo Blue, Graublau als Call-Farbe. */
    --phone-bg: #f5f5f7;
    --phone-surface: #ffffff;
    --phone-surface-soft: #f5f5f7;
    --phone-key: #ffffff;
    --phone-key-hover: #e4eef6;
    --phone-key-ring: #d0dae3;
    --phone-line: #d0dae3;
    --phone-ink: #1d1d1f;
    --phone-mid: #4a4a4c;
    --phone-muted: #436b8f;
    --phone-blue: #144673;
    --phone-blue-fill: #144673;
    --phone-blue-fill-hover: #0e3254;
    --phone-blue-soft: #e4eef6;
    --phone-link: #1e6ba8;
    --phone-greyblue: #518ea6;
    --phone-green: #2f6b39;
    --phone-green-fill: #2f7d3b;
    --phone-green-soft: #e3f1e5;
    --phone-red: #a3392f;
    --phone-red-fill: #b8372b;
    --phone-red-soft: #fde9e7;
    --phone-shadow: 0 24px 60px -28px rgba(20, 70, 115, .35);
    --phone-radius: 12px;
    --phone-font: "Figtree", ui-sans-serif, system-ui, sans-serif;
    --phone-heading: "Quicksand Bold", "Quicksand", ui-sans-serif, system-ui, sans-serif;
    color-scheme: light;
}

:root[data-phone-theme="dark"] {
    --phone-bg: #0d1824;
    --phone-surface: #13212f;
    --phone-surface-soft: #1a2c3d;
    --phone-key: #1a2c3d;
    --phone-key-hover: #23394e;
    --phone-key-ring: #2b4359;
    --phone-line: #2b4359;
    --phone-ink: #f5f5f7;
    --phone-mid: #d0dae3;
    --phone-muted: #a1b5c7;
    --phone-blue: #a9c8e4;
    --phone-blue-fill: #1e6ba8;
    --phone-blue-fill-hover: #2a7cbd;
    --phone-blue-soft: #1c3550;
    --phone-link: #a9c8e4;
    --phone-greyblue: #518ea6;
    --phone-green: #8fcd98;
    --phone-green-fill: #2f7d3b;
    --phone-green-soft: #1d3a26;
    --phone-red: #f5a097;
    --phone-red-fill: #b8372b;
    --phone-red-soft: #43231f;
    --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: var(--phone-bg);
    accent-color: var(--phone-blue-fill);
    font-family: var(--phone-font);
    font-size: 15px;
    line-height: 1.5;
    -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: 2px solid var(--phone-link);
    outline-offset: 2px;
}

.phone-app-body :is(h1, h2, h3) {
    font-family: var(--phone-heading);
    font-weight: 600;
    letter-spacing: -.02em;
}

.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, 32px) 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--phone-line) 70%, transparent);
    background: color-mix(in srgb, var(--phone-surface) 90%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

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

.phone-brand-icon {
    display: block;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    box-shadow: 0 0 0 1px var(--phone-line);
}

.phone-brand-word {
    font-family: var(--phone-heading);
    font-size: 22px;
    line-height: 1;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.phone-brand-word b {
    color: var(--phone-blue);
    font-weight: inherit;
}

.phone-brand-word i {
    color: var(--phone-greyblue);
    font-style: normal;
}

.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: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--phone-line);
    border-radius: 50%;
    color: var(--phone-blue);
    background: var(--phone-surface);
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.phone-icon-button:hover,
.phone-topbar-link:hover {
    border-color: var(--phone-blue-soft);
    background: var(--phone-blue-soft);
}

.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: var(--phone-radius);
}

.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: var(--phone-heading);
    font-size: 13px;
}

.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 {
    color: var(--phone-ink);
    font-size: 15px;
    font-weight: 600;
}

.phone-line-copy span {
    margin-top: 1px;
    color: var(--phone-muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.webphone-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    max-width: 190px;
    overflow: hidden;
    padding: 5px 11px;
    border-radius: 999px;
    color: var(--phone-blue);
    background: var(--phone-blue-soft);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.webphone-status i {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--phone-greyblue);
}

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

.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);
    background: var(--phone-red-soft);
}

.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 var(--phone-line);
    border-radius: 50%;
    content: "";
}

.voice-orb {
    position: relative;
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--phone-blue-fill);
    box-shadow: var(--phone-shadow);
    isolation: isolate;
}

.voice-orb::before,
.voice-orb::after {
    position: absolute;
    z-index: -1;
    inset: 13%;
    display: none;
    content: "";
}

.voice-orb > span {
    position: absolute;
    inset: -10px;
    border: 2px solid var(--phone-greyblue);
    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.connecting,
.voice-orb.calling {
    background: var(--phone-greyblue);
}

.voice-orb.ringing,
.voice-orb.talking {
    background: var(--phone-green-fill);
}

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

.voice-orb.error {
    background: var(--phone-red-fill);
    animation: none;
}

.phone-state-label {
    margin: 14px 0 0;
    color: var(--phone-ink);
    font-family: var(--phone-heading);
    font-size: 18px;
    letter-spacing: -.02em;
}

.phone-call-duration {
    margin: 4px 0 0;
    color: var(--phone-green);
    font-size: 15px;
    font-weight: 600;
    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: var(--phone-heading);
    font-size: clamp(26px, 7vw, 34px);
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    text-align: center;
    caret-color: var(--phone-blue);
}

.webphone-number::placeholder {
    color: var(--phone-muted);
    font-family: var(--phone-font);
    font-weight: 400;
    letter-spacing: -.02em;
    opacity: 1;
}

.phone-number-field:focus-within {
    border-radius: var(--phone-radius);
    box-shadow: 0 0 0 2px var(--phone-link);
}

.phone-number-clear {
    position: absolute;
    top: 50%;
    right: 2px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    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: 20px;
    margin: 4px 0 0;
    color: var(--phone-muted);
    font-size: 13px;
}

.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);
    box-shadow: inset 0 0 0 1px var(--phone-key-ring);
    transition: background .12s ease, box-shadow .12s ease, transform .12s ease;
}

.phone-key:hover {
    background: var(--phone-key-hover);
    box-shadow: inset 0 0 0 1px var(--phone-key-hover);
}

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

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

.phone-key strong {
    color: var(--phone-ink);
    font-family: var(--phone-font);
    font-size: 27px;
    font-weight: 500;
}

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

.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: 44px;
    padding: 0 16px;
    border: 1px solid var(--phone-line);
    border-radius: 999px;
    color: var(--phone-ink);
    background: var(--phone-surface);
    font-size: 14px;
    font-weight: 600;
}

.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"] {
    border-color: var(--phone-red-soft);
    color: var(--phone-red);
    background: var(--phone-red-soft);
}

.webphone-keypad-toggle[aria-pressed="true"] {
    border-color: var(--phone-blue-soft);
    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;
    border-radius: var(--phone-radius);
    color: var(--phone-muted);
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    transition: opacity .18s ease, transform .18s ease;
}

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

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

.phone-action:disabled .phone-action-icon {
    filter: saturate(.4);
}

.phone-action-icon {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    margin-bottom: 8px;
    border-radius: 50%;
    transition: background .18s ease;
}

.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-ai-call:hover:not(:disabled) .phone-action-icon,
.webphone-ai-answer:hover:not(:disabled) .phone-action-icon {
    background: var(--phone-blue-fill-hover);
}

.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 22px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--phone-blue-fill);
    font-size: 15px;
    font-weight: 600;
}

.phone-ai-composer {
    width: min(calc(100% - 40px), 620px);
    margin: 0 auto 18px;
    padding: 18px;
    border: 1px solid var(--phone-line);
    border-radius: var(--phone-radius);
    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: var(--phone-heading);
    font-size: 16px;
}

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

.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: 10px 14px;
    border-radius: 16px 16px 16px 6px;
    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: 14px;
    line-height: 1.45;
}

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

.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 14px;
    border: 1px solid var(--phone-line);
    border-radius: var(--phone-radius);
    outline: 0;
    color: var(--phone-ink);
    background: var(--phone-surface);
    font-size: 15px;
    line-height: 1.4;
}

.phone-ai-text:focus {
    border-color: var(--phone-link);
    box-shadow: 0 0 0 1px var(--phone-link);
}

.phone-ai-send {
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--phone-blue-fill);
    font-size: 15px;
    font-weight: 600;
}

.phone-ai-send:hover:not(:disabled),
.webphone-connect:hover {
    background: var(--phone-blue-fill-hover);
}

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

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

.webphone-help {
    max-width: 44ch;
    margin: 0 auto;
    padding: 10px var(--device-pad) 20px;
    color: var(--phone-muted);
    font-size: 12px;
    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(13, 24, 36, .28);
    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: var(--phone-surface);
    box-shadow: -24px 0 60px -28px rgba(20, 70, 115, .35);
    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: var(--phone-heading);
    font-size: 18px;
}

.phone-account-panel-header small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--phone-muted);
    font-size: 13px;
    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: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    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: 14px;
}

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

.phone-account-row dd {
    max-width: 62%;
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 600;
    text-align: right;
}

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

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

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

.phone-number-list strong {
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

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

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

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

.phone-login-card {
    width: min(100%, 440px);
    padding: clamp(24px, 6vw, 40px);
    border-radius: var(--phone-radius);
}

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

.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: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.phone-login-card h1 {
    margin: 10px 0 10px;
    color: var(--phone-ink);
    font-size: clamp(30px, 8vw, 34px);
    line-height: 1.05;
    letter-spacing: -.03em;
}

.phone-login-lede {
    margin: 0 0 28px;
    color: var(--phone-mid);
    font-size: 15px;
    line-height: 1.6;
}

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

.phone-field {
    display: grid;
    gap: 6px;
    color: var(--phone-ink);
    font-size: 14px;
    font-weight: 600;
}

.phone-field input {
    width: 100%;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid var(--phone-line);
    border-radius: var(--phone-radius);
    outline: 0;
    color: var(--phone-ink);
    background: var(--phone-surface);
    font-size: 16px;
    font-weight: 400;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.phone-field input::placeholder {
    color: var(--phone-muted);
    opacity: 1;
}

.phone-field input:focus {
    border-color: var(--phone-link);
    box-shadow: 0 0 0 1px var(--phone-link);
}

/* Rahmen + Schatten zeigen den Fokus bereits (2 px, 5,6:1) */
.phone-app-body .phone-field input:focus-visible,
.phone-app-body .phone-ai-text:focus-visible,
.phone-app-body .webphone-number:focus-visible {
    outline: none;
}

.phone-login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    margin-top: 6px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--phone-blue-fill);
    font-size: 16px;
    font-weight: 600;
    transition: background .18s ease, transform .18s ease;
}

.phone-login-submit:hover {
    background: var(--phone-blue-fill-hover);
}

.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;
    gap: 8px;
    margin: 20px 0 0;
    color: var(--phone-muted);
    font-size: 13px;
}

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

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

.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: 12px 18px max(18px, env(safe-area-inset-bottom));
    color: var(--phone-muted);
    font-size: 13px;
}

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

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

.phone-app-footer a {
    border-radius: 4px;
    color: inherit;
    text-decoration: none;
}

.phone-app-footer a:hover {
    color: var(--phone-blue);
    text-decoration: underline;
}

@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;
    }

    /* Bereiche nicht zusammenstauchen, sonst überdeckt die KI-Karte die Aktions-Beschriftung */
    .phone-app-body--fullscreen .phone-device > * {
        flex-shrink: 0;
    }

    .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-word {
        font-size: 20px;
    }

    .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: 20px;
        border-top: 0;
        background: transparent;
    }

    .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);
    }

    .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: 32px 20px;
        border-top: 0;
        border-bottom: 0;
        background: transparent;
    }
}

@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-pulse {
    0% { opacity: 0; transform: scale(.78); }
    22% { opacity: .5; }
    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); }
}

