:root {
    color-scheme: light;
    --bg: #fffaf3;
    --surface: #fff;
    --surface-raised: #fff4e6;
    --border: #f5d9ad;
    --border-strong: #edc180;
    --text: #2a1c0d;
    --muted: #8a6b45;
    --soft: #5c452c;
    --accent: #ea7317;
    --accent-strong: #c2410c;
    --accent-soft: #fde8c8;
    --accent-tint: #fff5e9;
    --blob-border-alpha: 0.32;
    --blob-glow-alpha: 0.18;
    --blob-glow-size: 16px;
    --blob-scale: 1;
    --ring-alpha: 0.32;
    --ring-outer-alpha: 0.14;
    --ring-scale: 1;
    --blob-skew: 0deg;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -20%, #ffe4c0 0, #fff3e2 28%, var(--bg) 58%),
        var(--bg);
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

.eyebrow {
    margin: 0 0 0.65rem;
    color: var(--accent-strong);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.muted {
    color: var(--muted);
}

.login-page {
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.login-shell {
    width: min(100%, 420px);
}

.login-card {
    padding: clamp(2rem, 7vw, 3rem);
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 30px 80px rgba(194, 65, 12, 0.14);
    backdrop-filter: blur(18px);
}

.login-logos {
    display: flex;
    height: 60px;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.dost-logo {
    width: 52px;
    height: 52px;
    filter: drop-shadow(0 2px 6px rgba(194, 65, 12, 0.18));
}

.sinag-logo {
    width: 170px;
    max-height: 58px;
    object-fit: contain;
    object-position: left center;
}

.login-card h1 {
    margin: 0;
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    letter-spacing: -0.045em;
}

.login-card > .muted {
    margin: 0.8rem 0 2rem;
    line-height: 1.6;
}

.login-form {
    display: grid;
    gap: 0.7rem;
}

.login-form label {
    margin-top: 0.55rem;
    color: var(--soft);
    font-size: 0.8rem;
    font-weight: 600;
}

.login-form input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    outline: none;
    color: var(--text);
    background: #fffdfa;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(234, 115, 23, 0.18);
}

.primary-button {
    margin-top: 1.1rem;
    padding: 0.9rem 1rem;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--accent);
    font-weight: 750;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}

.primary-button:hover {
    background: var(--accent-strong);
}

.primary-button:active {
    transform: translateY(1px);
}

.form-error {
    padding: 0.75rem 0.9rem;
    border: 1px solid #f3b39a;
    border-radius: 10px;
    color: #9a3412;
    background: #fff1e7;
    font-size: 0.85rem;
}

html:has(body.agent-page) {
    height: 100%;
    overflow: hidden;
}

.agent-page {
    --insight-panel-width: min(430px, 100vw);
    --chat-col-width: clamp(190px, 20vw, 250px);
    display: flex;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    transition: padding-right 260ms cubic-bezier(.2, .8, .2, 1);
}

.agent-page.insight-open {
    padding-right: var(--insight-panel-width);
}

.topbar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 64px;
    padding-inline: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.wordmark {
    display: inline-flex;
    min-width: 0;
    gap: 0.65rem;
    align-items: center;
    color: var(--text);
    font-size: 1rem;
    font-weight: 750;
    text-decoration: none;
}

.topbar-dost-logo {
    width: 28px;
    height: 29px;
}

.topbar-sinag-logo {
    width: 83px;
    height: 36px;
    object-fit: contain;
}

.wordmark-divider {
    width: 1px;
    height: 28px;
    background: var(--border-strong);
}

.wordmark-name {
    color: var(--accent-strong);
    font-size: 0.9rem;
    letter-spacing: -0.02em;
}

.text-button {
    padding: 0.55rem 0.8rem;
    border: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.text-button:hover {
    color: var(--text);
}

.agent-shell {
    display: grid;
    flex: 1;
    grid-template-columns: var(--chat-col-width) minmax(0, 1fr);
    gap: 0;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0.75rem 1.25rem 0.9rem;
    overflow: hidden;
}

.voice-stage {
    display: flex;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    flex-direction: column;
    align-items: center;
    padding: 0 0.35rem 0 0.75rem;
    text-align: center;
}

.voice-stage__copy {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    margin-bottom: -1.75rem;
}

.voice-stage__copy .eyebrow {
    margin-bottom: 0.2rem;
}

.voice-stage h1 {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.65rem);
    letter-spacing: -0.045em;
}

.status {
    min-height: 1.1em;
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.avatar-frame {
    position: relative;
    z-index: 0;
    width: min(100%, 78vh);
    min-height: 0;
    flex: 1 1 auto;
    overflow: visible;
}

.avatar-stage {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    transform: scale(1.34);
    transform-origin: center 62%;
    transition: transform 180ms ease;
}

.avatar-portrait,
.avatar-video {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center 46%;
    pointer-events: none;
    user-select: none;
}

.avatar-portrait {
    opacity: 1;
    filter: drop-shadow(0 16px 24px rgba(194, 65, 12, 0.14));
    transition: opacity 420ms ease, filter 180ms ease;
}

.avatar-video {
    opacity: 0;
    transition: opacity 420ms ease;
}

.avatar-stage.is-avatar-live .avatar-portrait {
    opacity: 0;
}

.avatar-stage.is-avatar-live .avatar-video {
    opacity: 1;
}

.voice-indicator {
    display: grid;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    place-items: center;
}

.voice-blob {
    position: relative;
    display: grid;
    width: 78%;
    aspect-ratio: 1;
    place-items: center;
    overflow: visible;
    border: 1px solid rgba(194, 65, 12, var(--blob-border-alpha));
    border-radius: 44% 56% 47% 53% / 55% 43% 57% 45%;
    background:
        radial-gradient(circle at 32% 27%, #ffe3bd 0%, #fdba74 19%, #fb923c 43%, #f97316 70%, #ea7317 100%);
    box-shadow:
        0 0 var(--blob-glow-size) rgba(249, 146, 60, var(--blob-glow-alpha)),
        inset -8px -8px 14px rgba(154, 52, 18, 0.34),
        inset 6px 5px 12px rgba(255, 247, 237, 0.5);
    transform: scale(var(--blob-scale)) rotate(var(--blob-skew));
    animation: blob-idle 10s cubic-bezier(.45, .05, .55, .95) infinite;
    transition: box-shadow 80ms linear, transform 80ms linear, border-radius 120ms ease-out;
}

.voice-blob::before,
.voice-blob::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(234, 115, 23, 0.28);
    border-radius: 53% 47% 54% 46% / 48% 56% 44% 52%;
    inset: -12%;
    opacity: var(--ring-alpha);
    transform: scale(var(--ring-scale));
}

.voice-blob::after {
    inset: -26%;
    opacity: var(--ring-outer-alpha);
}

.blob-core {
    width: 28%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(255, 248, 240, 0.55);
    filter: blur(8px);
}

.voice-blob.is-speaking,
.voice-blob.is-user-speaking {
    animation-duration: 2.2s;
}

@keyframes blob-idle {
    0%, 100% { border-radius: 44% 56% 47% 53% / 55% 43% 57% 45%; }
    20% { border-radius: 58% 42% 60% 40% / 45% 60% 40% 55%; }
    48% { border-radius: 40% 60% 42% 58% / 59% 41% 59% 41%; }
    74% { border-radius: 55% 45% 51% 49% / 41% 58% 42% 59%; }
}

.ai-orb-button {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    user-select: none;
    touch-action: none;
}

.ai-orb-button .talk-chip {
    transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
}

.ai-orb-button:hover:not(:disabled) .avatar-stage {
    transform: scale(1.38);
}

.ai-orb-button:hover:not(:disabled) .talk-chip {
    transform: translateY(-1px);
}

.ai-orb-button:focus-visible {
    outline: none;
}

.ai-orb-button:focus-visible .talk-chip {
    box-shadow: 0 0 0 3px rgba(234, 115, 23, 0.35);
}

.ai-orb-button.is-listening .voice-blob {
    border-color: rgba(194, 65, 12, 0.6);
}

.ai-orb-button.is-muted .avatar-portrait {
    filter: grayscale(0.2) drop-shadow(0 16px 24px rgba(194, 65, 12, 0.08));
    opacity: 0.86;
}

.ai-orb-button.is-muted .avatar-stage.is-avatar-live .avatar-portrait {
    opacity: 0;
}

.ai-orb-button.is-muted .avatar-stage.is-avatar-live .avatar-video {
    filter: grayscale(0.2);
    opacity: 0.86;
}

.ai-orb-button.is-muted .voice-blob {
    opacity: 0.58;
    filter: grayscale(0.28);
}

.ai-orb-button:disabled {
    cursor: wait;
}

.ai-orb-button:disabled .talk-chip {
    opacity: 0.7;
}

.ai-orb-button.is-connecting .voice-blob {
    animation-duration: 1.4s;
}

.talk-chip {
    display: inline-flex;
    min-width: min(210px, 100%);
    max-width: 100%;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.15rem;
    padding: 0.28rem 1rem 0.28rem 0.32rem;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--soft);
    background: var(--surface);
}

.ai-orb-button.is-listening .talk-chip {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.ai-orb-button #talk-label {
    min-width: 0;
    padding: 0.3rem 0.15rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.ai-orb-button.is-listening #talk-label {
    color: #fff;
}

.talk-help {
    flex-shrink: 0;
    max-width: 100%;
    margin: 0.3rem 0 0;
    padding-inline: 0.25rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.transcript-panel {
    display: flex;
    min-width: 0;
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 0.15rem 1rem 0 0;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--border);
}

.section-heading {
    display: flex;
    flex-shrink: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: -0.025em;
}

.connection-badge {
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.connection-badge.is-online {
    color: var(--accent-strong);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.transcript {
    display: flex;
    min-height: 0;
    margin-top: 0.75rem;
    padding-right: 0.2rem;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.75rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.empty-state {
    display: grid;
    min-height: 5.5rem;
    place-items: center;
    padding: 0.75rem;
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}

.message {
    max-width: 100%;
}

.message.user {
    align-self: flex-end;
    text-align: right;
}

.message.assistant {
    align-self: flex-start;
}

.message-speaker {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.message-body {
    margin: 0;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--soft);
    background: var(--surface);
    font-size: 0.8rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.message.user .message-body {
    color: var(--text);
    background: var(--accent-soft);
    border-color: #f3cd97;
}

.insight-toggle {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 40;
    padding: 0.7rem 1rem;
    border: 1px solid var(--accent);
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 14px 32px rgba(194, 65, 12, 0.26);
    cursor: pointer;
    transition: right 260ms cubic-bezier(.2, .8, .2, 1);
}

.insight-toggle:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.agent-page.insight-open .insight-toggle {
    right: calc(var(--insight-panel-width) + 1rem);
}

.insight-sidebar {
    position: fixed;
    z-index: 30;
    top: 0;
    right: 0;
    display: flex;
    width: var(--insight-panel-width, min(430px, 100vw));
    height: 100dvh;
    padding: 1.25rem;
    border-left: 1px solid var(--border);
    flex-direction: column;
    background:
        radial-gradient(circle at 100% 0, rgba(253, 186, 116, 0.28), transparent 36%),
        var(--surface);
    box-shadow: -18px 0 48px rgba(194, 65, 12, 0.1);
    transform: translateX(100%);
    transition: transform 260ms cubic-bezier(.2, .8, .2, 1);
    pointer-events: none;
}

.insight-sidebar.is-open {
    transform: translateX(0);
    pointer-events: auto;
}

.insight-sidebar__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0 1.25rem;
    border-bottom: 1px solid var(--border);
}

.insight-sidebar__header h2 {
    margin: 0;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
}

.icon-button {
    display: grid;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    place-items: center;
    color: var(--accent-strong);
    background: var(--accent-tint);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
}

.icon-button:hover {
    background: var(--accent-soft);
}

.insight-content {
    padding: 1.4rem 0 2rem;
    overflow-y: auto;
}

.insight-card,
.forecast-day {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(145deg, #fffdfa, var(--surface-raised));
    box-shadow: 0 1px 2px rgba(194, 65, 12, 0.06);
}

.insight-card {
    padding: 1.35rem;
}

.insight-kicker {
    margin: 0 0 0.5rem;
    color: var(--accent-strong);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.insight-card__title {
    margin: 0;
    color: var(--text);
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.weather-condition {
    margin: 0.55rem 0 0;
    color: var(--muted);
    text-transform: capitalize;
}

.weather-temperature {
    margin: 1.15rem 0;
    color: var(--accent-strong);
    font-size: 4.25rem;
    font-weight: 680;
    letter-spacing: -0.1em;
    line-height: 0.9;
}

.weather-temperature span {
    margin-left: 0.22rem;
    color: var(--muted);
    font-size: 1.25rem;
    letter-spacing: 0;
}

.weather-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
}

.weather-metric {
    padding: 0.7rem;
    border: 1px solid rgba(234, 115, 23, 0.22);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
}

.weather-metric__label,
.weather-metric__value {
    display: block;
}

.weather-metric__label {
    color: var(--muted);
    font-size: 0.68rem;
}

.weather-metric__value {
    margin-top: 0.25rem;
    color: var(--text);
    font-size: 0.9rem;
}

.insight-footnote,
.advisory-disclaimer {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.5;
}

.forecast-insight {
    display: grid;
    gap: 0.55rem;
}

.forecast-days {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.7rem;
}

.forecast-day {
    padding: 0.95rem 1rem;
}

.forecast-day__label {
    color: var(--text);
    font-size: 0.9rem;
}

.forecast-day__condition,
.forecast-day__detail {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: capitalize;
}

.forecast-day__temperature {
    margin: 0.55rem 0 0;
    color: var(--accent-strong);
    font-size: 1.1rem;
    font-weight: 700;
}

.hourly-insight {
    display: grid;
    gap: 0.55rem;
}

.hourly-peak {
    margin: 0.35rem 0 0;
    color: var(--accent-strong);
    font-size: 0.82rem;
}

.hourly-hours {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.7rem;
}

.hourly-hour {
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(145deg, #fffdfa, var(--surface-raised));
}

.hourly-hour.is-peak {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(234, 115, 23, 0.25);
}

.hourly-hour__label {
    color: var(--text);
    font-size: 0.9rem;
}

.hourly-hour__condition,
.hourly-hour__detail {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: capitalize;
}

.hourly-hour__temperature {
    margin: 0.55rem 0 0;
    color: var(--accent-strong);
    font-size: 1.1rem;
    font-weight: 700;
}

.advisory-context {
    margin: 0.7rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.advisory-sections {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.3rem;
}

.advisory-section {
    padding: 0.9rem;
    border-left: 2px solid var(--accent);
    background: var(--accent-tint);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 320ms ease, transform 320ms ease;
}

.advisory-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.advisory-section__heading {
    margin: 0;
    color: var(--text);
    font-size: 0.82rem;
}

.advisory-section__list {
    display: grid;
    gap: 0.45rem;
    margin: 0.65rem 0 0;
    padding-left: 1.1rem;
    color: var(--soft);
    font-size: 0.83rem;
    line-height: 1.5;
}

.officials-query,
.profile-role,
.profile-appointment {
    margin: 0.55rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.officials-groups,
.profile-sections {
    display: grid;
    gap: 1rem;
    margin-top: 1.2rem;
}

.officials-group,
.profile-section {
    padding: 0.9rem;
    border-left: 2px solid var(--accent);
    background: var(--accent-tint);
}

.officials-group__heading,
.profile-section__heading {
    margin: 0;
    color: var(--text);
    font-size: 0.82rem;
}

.officials-person {
    margin-top: 0.75rem;
}

.officials-person__name {
    display: block;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 650;
}

.officials-person__role,
.profile-section__list {
    margin: 0.3rem 0 0;
    color: var(--soft);
    font-size: 0.8rem;
    line-height: 1.45;
}

.profile-section__list {
    display: grid;
    gap: 0.45rem;
    padding-left: 1.1rem;
}

.flood-place {
    margin: 0.55rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.flood-area {
    margin: 1.15rem 0;
    color: var(--accent-strong);
    font-size: 2.6rem;
    font-weight: 680;
    letter-spacing: -0.06em;
    line-height: 0.95;
}

.flood-area span {
    margin-left: 0.28rem;
    color: var(--muted);
    font-size: 1rem;
    letter-spacing: 0;
    font-weight: 650;
}

.flood-cause {
    margin: 0 0 1rem;
    padding: 0.9rem;
    border-left: 2px solid var(--accent);
    background: var(--accent-tint);
}

.flood-cause__label {
    display: block;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.flood-cause__value {
    display: block;
    margin-top: 0.35rem;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.4;
}

.flood-matches {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.flood-match {
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(145deg, #fffdfa, var(--surface-raised));
}

.flood-match__place {
    color: var(--text);
    font-size: 0.9rem;
}

.flood-match__area {
    margin: 0.55rem 0 0;
    color: var(--accent-strong);
    font-size: 1.1rem;
    font-weight: 700;
}

.flood-match__detail {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.ai-orb-button.is-agent-speaking .talk-chip {
    color: var(--accent-strong);
    background: var(--accent-soft);
    border-color: var(--border-strong);
}

.ai-orb-button.is-agent-speaking #talk-label {
    color: var(--accent-strong);
}

#agent-audio {
    position: fixed;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.video-stage {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 0;
    background: rgba(61, 42, 18, 0.5);
    backdrop-filter: blur(12px);
}

.video-stage[hidden] {
    display: none;
}

.video-stage__panel {
    display: flex;
    width: 90vw;
    height: 90vh;
    padding: 1rem 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    flex-direction: column;
    background:
        radial-gradient(circle at 100% 0, rgba(253, 186, 116, 0.3), transparent 36%),
        var(--surface);
    box-shadow: 0 24px 80px rgba(61, 42, 18, 0.35);
}

.video-stage__header {
    display: flex;
    flex-shrink: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.video-stage__header h2 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
}

.browser-video {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    flex: 1;
    border-radius: 12px;
    object-fit: contain;
    background: #1c1208;
}

@media (max-width: 800px) {
    .agent-page {
        --insight-panel-width: min(360px, 92vw);
        --chat-col-width: clamp(148px, 30vw, 200px);
    }

    .topbar {
        height: 56px;
        padding-inline: 0.85rem;
    }

    .agent-shell {
        padding: 0.5rem 0.75rem 0.65rem;
    }

    .transcript-panel {
        padding-right: 0.65rem;
    }

    .voice-stage {
        padding-left: 0.65rem;
    }

    .voice-stage h1 {
        font-size: 1.2rem;
    }

    .avatar-stage {
        transform: scale(1.4);
    }

    .ai-orb-button:hover:not(:disabled) .avatar-stage {
        transform: scale(1.44);
    }

    .talk-chip {
        padding-right: 0.7rem;
    }

    .ai-orb-button #talk-label {
        font-size: 0.74rem;
    }

    .message {
        max-width: 100%;
    }

    .insight-sidebar {
        border-left: 1px solid var(--border);
    }

    .insight-toggle {
        right: 0.75rem;
        bottom: 0.75rem;
    }
}

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