        /* ===== Inline Voice Agent (VIA) Immersive Experience ===== */
        .via-backdrop {
            position: fixed;
            inset: 0;
            z-index: 2000000;
            background: rgba(18, 19, 23, 0.6);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.35s var(--ease-out-quint);
            padding: 16px;
        }

        .via-backdrop.via-visible {
            opacity: 1;
        }

        .via-panel {
            position: relative;
            width: 100%;
            max-width: 460px;
            max-height: 88vh;
            background: var(--bg-primary);
            border-radius: var(--radius-lg);
            box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--border-primary);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transform: translateY(24px) scale(0.97);
            opacity: 0;
            transition: transform 0.4s var(--ease-out-quint), opacity 0.35s var(--ease-out-quint);
        }

        .via-panel.via-visible {
            transform: translateY(0) scale(1);
            opacity: 1;
        }

        .via-close,
        .via-fullscreen {
            position: absolute;
            top: 14px;
            z-index: 10;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: none;
            background: rgba(0, 0, 0, 0.06);
            color: var(--color-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .via-close {
            right: 14px;
        }

        .via-fullscreen {
            right: 56px;
        }

        .via-close:hover,
        .via-fullscreen:hover {
            background: rgba(0, 0, 0, 0.12);
            color: var(--color-primary);
            transform: scale(1.1);
        }

        .via-backdrop.via-expanded-mode {
            padding: 0;
        }

        .via-panel.via-expanded {
            width: 100vw;
            max-width: 100vw;
            height: 100dvh;
            max-height: 100dvh;
            border-radius: 0;
        }

        /* Header */
        .via-header {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 24px 24px 16px;
            border-bottom: 1px solid var(--border-primary);
        }

        .via-avatar {
            position: relative;
            width: 52px;
            height: 52px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .via-header-info {
            flex: 1;
            min-width: 0;
        }

        .via-name {
            font-family: var(--font-primary);
            font-size: var(--text-lg);
            font-weight: 600;
            color: var(--color-primary);
            margin: 0;
            line-height: 1.2;
        }

        .via-subtitle {
            font-size: var(--text-sm);
            color: var(--color-tertiary);
            margin: 4px 0 0;
            line-height: 1.3;
        }

        .via-header-controls {
            display: flex;
            gap: 6px;
        }

        .via-mode-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: 1px solid var(--border-secondary);
            background: var(--bg-primary);
            color: var(--accent-teal);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .via-mode-btn:hover {
            background: var(--accent-teal-light);
            border-color: var(--accent-teal);
            transform: scale(1.08);
        }

        .via-mode-btn.via-text-mode {
            background: #fef2f2;
            border-color: #fca5a5;
            color: #ef4444;
        }

        .via-input-mode-btn {
            flex-shrink: 0;
        }

        /* Voice visualizer bar */
        .via-voice-bar {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 24px;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border-primary);
            min-height: 42px;
            opacity: 0;
            max-height: 0;
            overflow: hidden;
            transition: all 0.35s var(--ease-out-quint);
        }

        .via-voice-bar.via-active {
            opacity: 1;
            max-height: 60px;
            padding: 10px 24px;
        }

        .via-wave {
            display: flex;
            align-items: center;
            gap: 3px;
            height: 20px;
        }

        .via-wave span {
            display: block;
            width: 3px;
            height: 4px;
            background: var(--accent-teal);
            border-radius: 2px;
            opacity: 0.35;
            transition: height 0.15s ease, opacity 0.15s ease;
        }

        .via-wave.via-wave-active span {
            animation: viaWaveAnim 1.2s ease-in-out infinite;
        }

        .via-wave.via-wave-active span:nth-child(1) {
            animation-delay: -0.36s;
        }

        .via-wave.via-wave-active span:nth-child(2) {
            animation-delay: -0.24s;
        }

        .via-wave.via-wave-active span:nth-child(3) {
            animation-delay: -0.12s;
        }

        .via-wave.via-wave-active span:nth-child(4) {
            animation-delay: 0s;
        }

        .via-wave.via-wave-active span:nth-child(5) {
            animation-delay: 0.12s;
        }

        .via-wave.via-wave-active span:nth-child(6) {
            animation-delay: 0.24s;
        }

        .via-wave.via-wave-active span:nth-child(7) {
            animation-delay: 0.36s;
        }

        @keyframes viaWaveAnim {

            0%,
            100% {
                height: 4px;
                opacity: 0.35;
            }

            50% {
                height: 18px;
                opacity: 1;
            }
        }

        .via-voice-label {
            font-size: var(--text-xs);
            color: var(--color-tertiary);
            white-space: nowrap;
        }

        /* Messages */
        .via-messages {
            flex: 1;
            overflow-y: auto;
            padding: 16px 20px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            min-height: 0;
            max-height: none;
            scroll-behavior: smooth;
        }

        .via-messages::-webkit-scrollbar {
            width: 5px;
        }

        .via-messages::-webkit-scrollbar-track {
            background: transparent;
        }

        .via-messages::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.12);
            border-radius: 3px;
        }

        .via-msg {
            display: flex;
            animation: viaMsgIn 0.3s var(--ease-out-quint);
        }

        @keyframes viaMsgIn {
            from {
                opacity: 0;
                transform: translateY(8px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .via-msg-user {
            justify-content: flex-end;
        }

        .via-msg-ai {
            justify-content: flex-start;
        }

        .via-msg-bubble {
            max-width: 82%;
            padding: 10px 16px;
            border-radius: 18px;
            font-size: var(--text-sm);
            font-family: var(--font-primary);
            line-height: 1.55;
            word-wrap: break-word;
        }

        .via-msg-ai .via-msg-bubble {
            background: var(--bg-secondary);
            color: var(--color-primary);
            border-bottom-left-radius: 6px;
        }

        .via-msg-user .via-msg-bubble {
            background: var(--accent-teal);
            color: white;
            border-bottom-right-radius: 6px;
        }

        .via-msg-bubble.via-typing {
            opacity: 0.7;
        }

        .via-msg-bubble.via-error {
            background: #fef2f2;
            color: #b91c1c;
        }

        .via-msg-bubble a {
            color: inherit;
            text-decoration: underline;
            text-underline-offset: 2px;
        }

        .via-msg-bubble strong {
            font-weight: 600;
        }

        .via-list {
            margin: 6px 0;
            padding-left: 18px;
        }

        .via-list li {
            margin: 3px 0;
            line-height: 1.5;
        }

        /* Input bar */
        .via-input-bar {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 16px;
            border-top: 1px solid var(--border-primary);
            background: var(--bg-primary);
        }

        .via-input {
            flex: 1;
            padding: 10px 16px;
            border: 1.5px solid var(--border-secondary);
            border-radius: var(--radius-rounded);
            font-size: 15px;
            font-family: var(--font-primary);
            background: var(--bg-primary);
            color: var(--color-primary);
            outline: none;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .via-input:focus {
            border-color: var(--accent-teal);
            box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
        }

        .via-input::placeholder {
            color: var(--color-tertiary);
        }

        .via-input:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .via-send {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: none;
            background: var(--accent-teal);
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            flex-shrink: 0;
        }

        .via-send:hover:not(:disabled) {
            background: var(--accent-teal-hover);
            transform: scale(1.05);
        }

        .via-send:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

        /* Powered by */
        .via-powered {
            text-align: center;
            padding: 8px 16px 12px;
            font-size: 11px;
            color: var(--color-tertiary);
            letter-spacing: 0.3px;
        }

        .via-powered strong {
            color: var(--accent-teal);
            font-weight: 600;
        }

        /* ── Structured Data Cards ── */
        .via-structured-data {
            margin: 8px 0;
            padding: 12px;
            /* Neutral hairline + faint periwinkle wash; teal is kept for interactive bits */
            background: var(--bg-3, rgba(183, 191, 217, 0.05));
            border: 1px solid rgba(33, 34, 38, 0.06);
            border-radius: 24px;
            font-size: 13px;
            animation: viaMsgIn 0.35s var(--ease-out-quint);
        }

        .via-sd-section {
            margin: 4px 0;
        }

        .via-sd-heading {
            font-weight: 600;
            color: var(--color-primary);
            font-size: 14px;
            margin-bottom: 8px;
            padding: 0 2px;
        }

        .via-sd-scroll {
            display: flex;
            gap: 10px;
            overflow-x: auto;
            overflow-y: hidden;
            /* Room for the cards' soft shadow: overflow-x scrolling clips anything
               outside the padding box, which showed as a grey band under the cards. */
            padding: 4px 10px 18px;
            margin: 0 -10px -10px;
            scroll-snap-type: x mandatory;
            scroll-padding-inline: 10px;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: thin;
            scrollbar-color: var(--accent-teal) rgba(0, 0, 0, 0.04);
        }

        .via-sd-scroll::-webkit-scrollbar {
            height: 5px;
        }

        .via-sd-scroll::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.04);
            border-radius: 3px;
        }

        .via-sd-scroll::-webkit-scrollbar-thumb {
            background: var(--accent-teal);
            border-radius: 3px;
        }

        .via-sd-scroll>div {
            scroll-snap-align: start;
        }

        .via-sd-card {
            flex: 0 0 240px;
            width: 240px;
            background: var(--surface, #fff);
            /* Design system cards: hairline border, soft low shadow, no tinted borders */
            border: 1px solid rgba(33, 34, 38, 0.06);
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            cursor: pointer;
            position: relative;
        }

        .via-sd-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), 0 8px 16px rgba(0, 0, 0, 0.05);
        }

        .via-sd-badge {
            position: absolute;
            top: 6px;
            right: 6px;
            z-index: 2;
            background: var(--accent-teal);
            color: white;
            font-size: 9px;
            padding: 3px 8px;
            border-radius: 10px;
            font-weight: 600;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
        }

        .via-sd-img {
            width: 100%;
            height: 150px;
            background-size: cover;
            background-position: center;
            background-color: rgba(13, 148, 136, 0.08);
        }

        .via-sd-media {
            position: relative;
            width: 100%;
            padding-bottom: 56.25%;
            background: #000;
            overflow: hidden;
            max-height: 150px;
        }

        /* No-image card header: periwinkle-haze tint with a light outlined icon
           (Material Symbols Rounded, wght 300). The teal→cyan gradient is reserved
           for live voice moments, and emoji aren't used as UI icons. */
        .via-sd-placeholder,
        .via-sd-placeholder-sm {
            width: 100%;
            height: 96px; /* one height, so tiles from different channels line up in one card */
            background: var(--bg-icon, rgba(183, 191, 217, 0.09));
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--accent-teal);
        }

        .via-sd-placeholder .material-symbols-rounded,
        .via-sd-placeholder-sm .material-symbols-rounded {
            font-size: 36px;
        }

        /* Icons are font ligatures (the glyph is the word "bed", "spa", ...); keep
           them out of selections so copied card text doesn't include the words. */
        .via-structured-data .material-symbols-rounded {
            user-select: none;
            -webkit-user-select: none;
        }

        .via-sd-inline-icon {
            font-size: 16px;
            vertical-align: -3px;
            margin-right: 6px;
            color: var(--color-tertiary);
        }

        .via-sd-check .material-symbols-rounded {
            font-size: 16px;
            vertical-align: -3px;
            color: var(--accent-teal);
        }

        .via-sd-body {
            padding: 10px 12px;
        }

        .via-sd-title {
            font-weight: 600;
            color: var(--color-primary);
            font-size: 14px;
            margin-bottom: 4px;
            line-height: 1.3;
        }

        .via-sd-sub {
            font-size: 12px;
            color: var(--color-secondary);
            line-height: 1.4;
            margin-bottom: 4px;
        }

        .via-sd-price {
            color: var(--accent-teal);
            font-weight: 600;
            font-size: 13px;
            margin-bottom: 6px;
        }

        .via-sd-tap {
            font-size: 10px;
            color: var(--accent-teal);
            font-weight: 600;
            text-align: center;
            padding: 5px 0;
            border-top: 1px solid rgba(13, 148, 136, 0.12);
            margin-top: 6px;
        }

        .via-sd-details {
            display: none;
            padding: 10px 12px;
            border-top: 1px solid rgba(13, 148, 136, 0.12);
            background: rgba(13, 148, 136, 0.02);
        }

        .via-sd-desc {
            font-size: 12px;
            color: var(--color-secondary);
            line-height: 1.5;
            margin-bottom: 6px;
        }

        .via-sd-features {
            margin-top: 6px;
        }

        .via-sd-feat {
            font-size: 12px;
            color: var(--color-secondary);
            margin: 3px 0;
            padding-left: 16px;
            position: relative;
        }

        .via-sd-check {
            position: absolute;
            left: 0;
            color: var(--accent-teal);
            font-weight: 700;
        }

        .via-sd-link {
            color: var(--accent-teal);
            font-weight: 500;
            font-size: 12px;
            text-decoration: none;
            border-bottom: 1px solid rgba(13, 148, 136, 0.3);
            display: inline-block;
            margin-top: 4px;
            padding-bottom: 1px;
        }

        .via-sd-link:hover {
            border-bottom-color: var(--accent-teal);
        }

        .via-sd-action-link {
            display: inline-block;
            padding: 8px 16px;
            border-radius: 8px;
            background: var(--accent-teal);
            color: white;
            font-weight: 600;
            font-size: 13px;
            text-decoration: none;
            margin: 4px 4px 4px 0;
            transition: background 0.2s ease;
        }

        .via-sd-action-link:hover {
            background: var(--accent-teal-hover);
        }

        .via-sd-option {
            padding: 10px 12px;
            background: white;
            border: 1px solid rgba(13, 148, 136, 0.12);
            border-radius: 8px;
            margin: 6px 0;
        }

        .via-sd-swipe {
            text-align: center;
            font-size: 10px;
            color: var(--color-tertiary);
            margin-top: 6px;
            padding: 2px 0;
        }

        .via-sd-empty {
            color: var(--color-tertiary);
            font-size: 12px;
        }

        .via-sd-kv-card {
            background: rgba(255, 255, 255, 0.7);
            border-radius: 16px;
            padding: 12px 16px;
            backdrop-filter: blur(8px);
            border: 1px solid rgba(0, 0, 0, 0.06);
        }

        .via-sd-kv-row {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 10px 0;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        }

        .via-sd-kv-row:last-child {
            border-bottom: none;
        }

        .via-sd-kv-icon {
            flex-shrink: 0;
            width: 22px;
            text-align: center;
            line-height: 1.4;
            color: var(--color-tertiary);
        }

        .via-sd-kv-icon .material-symbols-rounded {
            font-size: 18px;
            vertical-align: -4px;
        }

        .via-sd-kv-label {
            font-weight: 600;
            color: var(--color-primary);
            min-width: 80px;
            flex-shrink: 0;
            font-size: 12px;
            line-height: 1.4;
        }

        .via-sd-kv-val {
            color: var(--color-secondary);
            word-break: break-word;
            font-size: 12px;
            line-height: 1.4;
            flex: 1;
        }

        .via-sd-kv-list {
            margin: 0;
            padding-left: 16px;
            list-style: disc;
        }

        .via-sd-kv-list li {
            padding: 2px 0;
        }

        .via-sd-kv-nested {
            display: block;
            font-size: 11px;
            padding: 1px 0;
            color: var(--color-secondary);
        }

        /* Mobile */
        @media (max-width: 768px) {
            .via-panel {
                max-width: 100%;
                max-height: 100vh;
                height: 100dvh;
                border-radius: 0;
            }

            .via-panel.via-expanded {
                width: 100vw;
                max-width: 100vw;
                height: 100dvh;
                max-height: 100dvh;
                border-radius: 0;
            }

            .via-backdrop {
                padding: 0;
            }

            .via-messages {
                min-height: 0;
                max-height: none;
            }

            .via-input-bar {
                padding: 12px;
            }

            .via-fullscreen {
                right: 56px;
            }

            .via-input {
                font-size: 16px !important;
                /* prevent iOS zoom */
            }

            .via-sd-card {
                flex: 0 0 200px;
                width: 200px;
            }

            .via-sd-img {
                height: 120px;
            }

            .via-sd-placeholder,
            .via-sd-placeholder-sm {
                height: 80px;
            }
        }

        /* ===== End Inline Voice Agent ===== */
.via-backdrop { background: color-mix(in oklch, var(--deep-950) 64%, transparent); }
.via-avatar-orb { width: 52px; height: 52px; }
.via-subtitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.via-close[hidden] { display: none; }
