/* GC Customer App — mockup-inspired, hunter green */
:root {
    --ca-primary: #355E3B; /* hunter green */
    --ca-primary-deep: #2A4A2F;
    --ca-secondary: #6B8F71; /* sage accent (not orange) */
    --ca-accent: #A8C5A8;
    --ca-bg: #F4F6F1;
    --ca-surface: #ffffff;
    --ca-sage: #E8EFE6;
    --ca-text: #1F2A24;
    --ca-muted: #5C6B62;
    --ca-border: #D5DED6;
    --ca-tab-h: 60px;
    --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Fraunces", "Nunito", Georgia, serif;
    --radius-card: 18px;
    --radius-pill: 999px;
    --shadow-soft: 0 4px 16px rgba(53, 94, 59, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font);
    background: var(--ca-bg);
    color: var(--ca-text);
    -webkit-tap-highlight-color: transparent;
}

.customer-app {
    padding-bottom: calc(var(--ca-tab-h) + env(safe-area-inset-bottom, 0));
}

.hidden { display: none !important; }

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

.muted { color: var(--ca-muted); }
.small { font-size: 0.85rem; }
.mt { margin-top: 16px; }
.lead { margin: 0 0 16px; color: var(--ca-muted); line-height: 1.45; }

.app-main { min-height: 100vh; }
.view { padding: 0; }

/* Page chrome */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: calc(12px + env(safe-area-inset-top, 0)) 16px 12px;
    background: var(--ca-bg);
}
.page-header.light { background: transparent; }
.page-header-title {
    margin: 0;
    flex: 1;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 800;
}
.page-header-spacer { width: 40px; flex-shrink: 0; }
.page-body { padding: 8px 16px 28px; }

.icon-btn {
    appearance: none;
    border: 0;
    background: var(--ca-surface);
    color: var(--ca-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    flex-shrink: 0;
    position: relative;
}
.icon-btn .support-unread {
    position: absolute;
    top: -2px;
    right: -2px;
    margin-left: 0;
}
.icon-btn.subtle {
    background: transparent;
    box-shadow: none;
    color: var(--ca-muted);
}

.card {
    background: var(--ca-surface);
    border-radius: var(--radius-card);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--ca-border);
    box-shadow: var(--shadow-soft);
}

.section-title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 800;
}
.section-title.lg { font-size: 1.35rem; }

/* Buttons */
.btn {
    padding: 14px 20px;
    border-radius: 14px;
    border: 0;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn.pill { border-radius: var(--radius-pill); }
.btn.primary { background: var(--ca-primary); color: #fff; }
.btn.primary:active { background: var(--ca-primary-deep); }
.btn.ghost {
    background: transparent;
    color: var(--ca-primary);
    border: 1px solid var(--ca-border);
}
.btn.full { width: 100%; }
.btn-arrow span { font-weight: 800; }

/* Welcome — branded hero + bottom action panel */
#view-welcome:not(.hidden) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}
.welcome-screen {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--ca-bg);
}
.welcome-hero {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: calc(20px + env(safe-area-inset-top, 0)) 24px 40px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 90% 70% at 80% 0%, rgba(168, 197, 168, 0.28) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 10% 100%, rgba(0, 0, 0, 0.18) 0%, transparent 50%),
        linear-gradient(165deg, #4a7a50 0%, var(--ca-primary) 42%, var(--ca-primary-deep) 100%);
}
.welcome-hero::before,
.welcome-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.welcome-hero::before {
    width: 220px;
    height: 220px;
    top: -70px;
    right: -80px;
    background: rgba(255, 255, 255, 0.08);
}
.welcome-hero::after {
    width: 160px;
    height: 160px;
    bottom: 8px;
    left: -60px;
    background: rgba(255, 255, 255, 0.06);
}
.welcome-brand {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}
.welcome-logo { max-height: 30px; max-width: 176px; object-fit: contain; display: block; }
.welcome-logo-fallback { font-weight: 800; font-size: 0.95rem; color: var(--ca-primary); }
.welcome-mascot-wrap {
    position: relative;
    z-index: 1;
    width: min(46vw, 168px);
    height: min(46vw, 168px);
    border-radius: 50%;
    background: #d7e4d6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow:
        0 0 0 6px rgba(255, 255, 255, 0.16),
        0 18px 40px rgba(0, 0, 0, 0.22);
}
.welcome-curby {
    width: 124%;
    height: 124%;
    object-fit: cover;
    object-position: center 38%;
}
.welcome-curby-fallback { color: var(--ca-primary); }
.welcome-panel {
    position: relative;
    z-index: 2;
    margin-top: -22px;
    padding: 26px 22px calc(18px + env(safe-area-inset-bottom, 0));
    background: var(--ca-bg);
    border-radius: 28px 28px 0 0;
    text-align: center;
    box-shadow: 0 -12px 32px rgba(31, 42, 36, 0.08);
}
.welcome-kicker {
    margin: 0 0 8px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ca-secondary);
}
.welcome-title {
    margin: 0 auto 10px;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 6.4vw, 2.15rem);
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: var(--ca-primary-deep);
    max-width: 14ch;
}
.welcome-sub {
    margin: 0 auto 18px;
    color: var(--ca-muted);
    max-width: 30ch;
    line-height: 1.45;
    font-size: 0.98rem;
}
.welcome-perks {
    list-style: none;
    margin: 0 auto 20px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.welcome-perks li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: var(--radius-pill);
    background: var(--ca-surface);
    border: 1px solid var(--ca-border);
    color: var(--ca-primary-deep);
    font-size: 0.78rem;
    font-weight: 700;
}
.welcome-perk-icon {
    display: inline-flex;
    color: var(--ca-primary);
}
.welcome-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    max-width: 340px;
    margin: 0 auto;
}
.welcome-screen .btn.primary {
    width: 100%;
    padding: 15px 20px;
    box-shadow: 0 10px 22px rgba(53, 94, 59, 0.22);
}
.welcome-screen .btn.ghost {
    width: 100%;
    background: var(--ca-sage);
    border: 0;
    color: var(--ca-primary-deep);
    font-weight: 800;
}
.welcome-privacy {
    margin: 16px 0 0;
}
.welcome-privacy a {
    color: var(--ca-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}
.welcome-privacy a:hover,
.welcome-privacy a:focus-visible {
    color: var(--ca-primary);
    text-decoration: underline;
}
body.ca-gate {
    padding-bottom: 0;
}
@media (max-height: 700px) {
    .welcome-hero { gap: 14px; padding-bottom: 32px; }
    .welcome-mascot-wrap {
        width: min(38vw, 132px);
        height: min(38vw, 132px);
    }
    .welcome-panel { padding-top: 20px; }
    .welcome-perks { margin-bottom: 14px; }
}
@media (max-height: 620px) {
    .welcome-perks { display: none; }
    .welcome-title { font-size: 1.55rem; }
    .welcome-sub { margin-bottom: 14px; }
}

/* Curbside welcome — large brand logo, no mascot */
.customer-app.ca-curbside .welcome-hero {
    gap: 0;
}
.customer-app.ca-curbside .welcome-brand {
    background: #000;
    border-radius: 28px;
    padding: 26px 32px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}
.customer-app.ca-curbside .welcome-logo {
    max-height: 140px;
    max-width: min(78vw, 300px);
}
.customer-app.ca-curbside .welcome-logo-fallback {
    font-size: 1.85rem;
    line-height: 1.15;
}
.customer-app.ca-curbside .welcome-title {
    max-width: 11em;
    font-size: clamp(1.55rem, 6vw, 2rem);
}
@media (max-height: 700px) {
    .customer-app.ca-curbside .welcome-brand { padding: 18px 24px; }
    .customer-app.ca-curbside .welcome-logo { max-height: 100px; }
}

/* Address */
.search-wrap { position: relative; margin-bottom: 12px; }
.search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--ca-surface);
    border-radius: var(--radius-pill);
    padding: 14px 16px;
    border: 1px solid var(--ca-border);
    box-shadow: var(--shadow-soft);
}
.search-icon { opacity: 0.55; display: flex; color: var(--ca-primary); }
#address-input {
    flex: 1;
    border: 0;
    outline: none;
    font-size: 1rem;
    min-width: 0;
    background: transparent;
    font-family: inherit;
}
.suggestions {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    background: var(--ca-surface);
    border-radius: 16px;
    border: 1px solid var(--ca-border);
    max-height: 240px;
    overflow-y: auto;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 60;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.suggestions li {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ca-border);
    cursor: pointer;
    font-size: 0.95rem;
}
.suggestions li:last-child { border-bottom: 0; }
.brand-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 20vh;
    padding: 24px;
}
.brand-placeholder.compact { min-height: 12vh; }
.brand-logo { max-height: 64px; max-width: 220px; object-fit: contain; }
.company-name-fallback { font-weight: 800; font-size: 1.2rem; color: var(--ca-primary); }

/* Home */
.home-logo-wrap {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}
.home-logo { max-height: 36px; max-width: 160px; object-fit: contain; }
.customer-app.ca-curbside .home-logo {
    max-height: 40px;
    max-width: 168px;
    background: #000;
    border-radius: 10px;
    padding: 4px 10px;
}
.home-logo-fallback { font-weight: 800; color: var(--ca-primary); font-size: 0.95rem; }

.home-intro {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 20px 8px;
}
.home-curby-chip {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ca-sage);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.home-curby { width: 100%; height: 100%; object-fit: cover; }
.home-curby-fallback { font-size: 1.4rem; }
.home-greeting {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ca-primary-deep);
}
.home-tagline { margin: 2px 0 0; font-size: 0.95rem; }

.home-body { padding: 8px 16px 24px; }

.next-pickup-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    background: var(--ca-surface);
    border: 1px solid var(--ca-border);
    padding: 14px 12px;
}
.np-date {
    width: 58px;
    min-height: 64px;
    border-radius: 14px;
    background: var(--ca-primary);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}
.np-dow {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 4px;
}
.np-day {
    font-size: 1.55rem;
    font-weight: 800;
}
body.ca-curbside .np-date {
    background: #111;
}
body.ca-curbside .np-dow {
    color: var(--ca-secondary);
    opacity: 1;
}
.np-body { flex: 1; min-width: 0; }
.np-kicker {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ca-muted);
    margin-bottom: 2px;
}
.np-when {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ca-primary-deep);
    line-height: 1.15;
}
.np-streams {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.np-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px 4px 6px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}
.np-chip svg { display: block; flex-shrink: 0; }
.np-chip--trash { background: #EEF1F4; color: #374151; }
.np-chip--recycle { background: #E8F0FE; color: #1D4ED8; }
.np-chip--yard { background: #E7F3E1; color: #3F7A2F; }
.next-pickup-card.is-empty .np-date {
    background: var(--ca-sage);
    color: var(--ca-muted);
}
body.ca-curbside .next-pickup-card.is-empty .np-date {
    background: #f3f3f3;
    color: #888;
}
body.ca-curbside .next-pickup-card.is-empty .np-dow { color: #888; }

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 4px;
}
.dash-tile {
    appearance: none;
    border: 1px solid var(--ca-border);
    background: var(--ca-surface);
    border-radius: var(--radius-card);
    padding: 18px 14px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    box-shadow: var(--shadow-soft);
    min-height: 148px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dash-tile:active { transform: scale(0.98); }
.dash-tile-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--ca-sage);
    color: var(--ca-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.dash-tile-title {
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--ca-primary-deep);
}
.dash-tile-sub {
    font-size: 0.8rem;
    color: var(--ca-muted);
    line-height: 1.3;
}
.dash-tile-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dash-tile--wide {
    grid-column: 1 / -1;
    min-height: 0;
    flex-direction: row;
    align-items: center;
    padding: 16px;
}
.dash-tile--pay .dash-tile-icon { background: #E8F3EA; color: #2F6F3E; }
.dash-tile--schedule .dash-tile-icon { background: #E8EEF8; color: #2B5EA7; }
.dash-tile--manage .dash-tile-icon { background: var(--ca-sage); color: var(--ca-primary); }
.dash-tile--rolloff .dash-tile-icon { background: #F3EEE6; color: #8A5A20; }
.dash-tile--questions .dash-tile-icon { background: #EEE8F6; color: #5B3D8C; }
.dash-tile--new .dash-tile-icon { background: color-mix(in srgb, var(--ca-primary) 16%, white); color: var(--ca-primary); }
.dash-tile-champion .dash-tile-icon {
    background: color-mix(in srgb, var(--ca-secondary) 22%, white);
    color: var(--ca-secondary);
}
body.ca-curbside .dash-tile--pay .dash-tile-icon {
    background: color-mix(in srgb, var(--ca-secondary) 16%, white);
    color: var(--ca-secondary);
}
.dash-tile.is-disabled {
    opacity: 0.55;
    box-shadow: none;
}
.dash-tile.is-disabled .dash-tile-title {
    color: var(--ca-muted);
}

/* Hide Curby FAB over full-screen flows so CTAs stay tappable */
body.ca-hide-fab #assistant-fab {
    display: none !important;
}

/* Address card */
.address-card {
    display: flex;
    align-items: center;
    gap: 12px;
}
.address-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ca-sage);
    color: var(--ca-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.address-card-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ca-muted);
}
.address-card-value {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}
.address-card-value.wrap {
    white-space: normal;
    max-width: none;
}
.address-card-body { flex: 1; min-width: 0; }
.address-card .btn.pill { flex-shrink: 0; }

/* Announcements */
.home-announcements { margin-bottom: 12px; }
.home-ann {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 10px;
    background: #fffbeb;
    border: 1px solid #f59e0b;
}
.home-ann.warning { background: #fffbeb; border-color: #f59e0b; }
.home-ann.urgent { background: #fef2f2; border-color: #dc2626; }
.home-ann-title { font-weight: 700; margin-bottom: 4px; font-size: 0.95rem; }
.home-ann-msg { font-size: 0.85rem; color: var(--ca-muted); line-height: 1.4; }
.home-ann-close {
    appearance: none;
    border: 0;
    background: none;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--ca-muted);
    cursor: pointer;
    padding: 0 4px;
}

.reminder-card { display: flex; gap: 12px; align-items: flex-start; }
.reminder-icon { font-size: 1.5rem; }
.reminder-title { font-weight: 800; margin-bottom: 4px; }
.reminder-copy { margin: 0 0 12px; }
.reminder-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Schedule */
.week-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 16px;
    -webkit-overflow-scrolling: touch;
}
.week-day {
    flex: 0 0 52px;
    text-align: center;
    padding: 10px 6px;
    border-radius: 16px;
    background: var(--ca-surface);
    border: 1px solid var(--ca-border);
}
.week-day.on {
    background: var(--ca-primary);
    border-color: var(--ca-primary);
    color: #fff;
}
.week-day.on.delayed {
    box-shadow: inset 0 0 0 2px #f59e0b;
}
.week-day-name {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.75;
}
.week-day-num {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    margin-top: 4px;
}
.upcoming-card {
    background: linear-gradient(160deg, var(--ca-sage), var(--ca-surface));
    border-color: color-mix(in srgb, var(--ca-primary) 20%, var(--ca-border));
}
.upcoming-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ca-primary);
    margin-bottom: 6px;
}
.upcoming-date {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ca-primary-deep);
}
.upcoming-sub { margin-top: 4px; font-size: 0.9rem; }

.service-prefs-card .section-title { margin-bottom: 6px; }
.service-prefs-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}
.service-pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--ca-border);
}
.service-pref-row:last-child { border-bottom: 0; }
.service-pref-label {
    font-weight: 700;
    flex: 1;
    min-width: 0;
}
.service-pref-toggles {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.service-pref-pair {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.service-pref-pair-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ca-muted);
    white-space: nowrap;
}
.service-pref-switch[disabled],
.service-pref-switch.is-locked {
    opacity: 0.85;
    cursor: default;
}
.service-pref-switch {
    position: relative;
    width: 48px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: #c5c9c4;
    cursor: pointer;
    flex-shrink: 0;
}
.service-pref-switch[aria-checked="true"] {
    background: var(--ca-primary);
}
.service-pref-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s ease;
}
.service-pref-switch[aria-checked="true"]::after {
    transform: translateX(20px);
}

.schedule-stream-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.schedule-stream-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--ca-border);
}
.schedule-stream-item:last-child { border-bottom: 0; }
.ssi-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ca-sage);
    color: var(--ca-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ssi-main { flex: 1; min-width: 0; }
.ssi-name { font-weight: 700; font-size: 0.95rem; }
.ssi-date { font-size: 0.85rem; color: var(--ca-muted); margin-top: 2px; }
.day-badge {
    background: color-mix(in srgb, var(--ca-primary) 12%, white);
    color: var(--ca-primary);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

/* Account / More lists */
.account-hero { background: var(--ca-sage); border-color: transparent; }
.account-hero-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.account-curby {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}
.account-list {
    list-style: none;
    margin: 0;
    padding: 4px 8px;
}
.account-list li { border-bottom: 1px solid var(--ca-border); }
.account-list li:last-child { border-bottom: 0; }
.account-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 8px;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ca-text);
    text-decoration: none;
}
.account-row-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ca-sage);
    color: var(--ca-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.account-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.account-row-label { flex: 1; }
.account-row-sub { font-weight: 500; }
.champion-row .account-row-icon {
    background: color-mix(in srgb, var(--ca-primary) 18%, white);
}
.qa-chevron { color: var(--ca-muted); font-size: 1.25rem; }

/* Messages */
.messages-lead-btn {
    width: 100%;
    margin-bottom: 10px;
}
.messages-inbox { margin: 0; }
.msg-group { margin: 0 0 18px; }
.msg-group-title {
    margin: 8px 0 4px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ca-muted);
}
.messages-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.msg-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--ca-border);
}
.msg-item:last-child { border-bottom: 0; }
.msg-item.support-thread { cursor: pointer; }
.msg-item.is-unread .msg-title { color: var(--ca-text); }
.msg-item.is-unread .msg-text { color: var(--ca-text); }
.msg-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ca-sage);
    color: var(--ca-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.msg-body { flex: 1; min-width: 0; }
.msg-title { font-weight: 800; margin-bottom: 4px; }
.msg-text { font-size: 0.9rem; color: var(--ca-muted); line-height: 1.4; }
.msg-time { font-size: 0.75rem; color: var(--ca-muted); margin-top: 6px; }
.messages-empty { text-align: center; padding: 40px 16px; }

/* Services */
.services-body { padding-top: 0; }
.service-tiles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.service-tile-wrap { margin: 0; }
.service-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px;
    border: 1px solid var(--ca-border);
    border-radius: var(--radius-card);
    background: var(--ca-surface);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-soft);
}
.service-tile.expanded { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; }
.tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tile-icon-orange { background: var(--ca-sage); color: var(--ca-primary); }
.tile-icon-blue { background: #dbeafe; color: #2563eb; }
.tile-icon-green { background: var(--ca-sage); color: var(--ca-primary); }
.tile-icon-red { background: #fee2e2; color: #dc2626; }
.tile-icon-purple { background: #ede9fe; color: #7c3aed; }
.tile-text { flex: 1; min-width: 0; }
.tile-title { display: block; font-weight: 800; font-size: 0.95rem; }
.tile-sub { display: block; font-size: 0.8rem; color: var(--ca-muted); margin-top: 2px; }
.tile-chevron { color: var(--ca-muted); font-size: 1.25rem; }
.service-tile-form {
    padding: 0 16px 16px;
    border: 1px solid var(--ca-border);
    border-top: 0;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    background: var(--ca-surface);
    margin-top: -1px;
}
.svc-extra-link { margin-top: 8px; }
.svc-extra-link a { color: var(--ca-primary); }
.svc-photo {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    margin: 4px 0 10px;
    background: var(--ca-sage);
}
.svc-confirm-panel { padding-top: 4px; }
.svc-confirm {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 202;
    background: var(--ca-surface);
    border-radius: 18px;
    padding: 20px 18px 16px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.22);
    max-width: 420px;
    margin: 0 auto;
}
.svc-confirm-title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ca-primary-deep);
}
.svc-confirm-copy { margin: 0 0 12px; font-size: 0.9rem; line-height: 1.4; }
.svc-confirm .svc-facts { margin-bottom: 14px; }
.svc-confirm .btn + .btn { margin-top: 8px; }
.svc-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 4px 0 12px;
}
.svc-fact {
    background: var(--ca-sage);
    border-radius: 12px;
    padding: 10px 12px;
}
.svc-fact span {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ca-muted);
}
.svc-fact strong {
    display: block;
    margin-top: 2px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--ca-primary-deep);
}
.svc-fact em {
    display: block;
    margin-top: 2px;
    font-size: 0.72rem;
    font-style: normal;
    color: var(--ca-muted);
}
.svc-form input[readonly] {
    background: var(--ca-sage);
    color: var(--ca-text);
}

/* Pay */
.pay-hero { overflow: hidden; padding: 0; }
.pay-brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--ca-border);
}
.pay-brand-logo { max-height: 40px; max-width: 80px; object-fit: contain; }
.customer-app.ca-curbside .pay-brand-logo {
    max-width: 120px;
    background: #000;
    border-radius: 8px;
    padding: 4px 8px;
}
.pay-brand-fallback { font-weight: 800; font-size: 0.9rem; }
.pay-company-badge {
    flex: 1;
    background: var(--ca-primary);
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}
.pay-title {
    margin: 0;
    padding: 16px 16px 8px;
    font-size: 1.1rem;
    font-weight: 800;
    text-align: center;
}
.pay-copy {
    margin: 0;
    padding: 0 16px 16px;
    text-align: center;
    line-height: 1.45;
}
.pay-open-btn {
    display: flex;
    width: calc(100% - 32px);
    margin: 0 16px 16px;
}

/* Neighborhood Champion / Rewards */
.refer-body,
.rewards-body { padding: 8px 16px 28px; }

.rewards-offer {
    background: linear-gradient(155deg, var(--ca-primary) 0%, var(--ca-primary-deep) 100%);
    color: #fff;
    border: 0;
    padding: 22px 18px 14px;
}
.rewards-offer-title {
    margin: 0 0 8px;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
}
.rewards-offer-sub {
    margin: 0 0 18px;
    font-size: 0.92rem;
    line-height: 1.4;
    color: rgba(255,255,255,0.85);
}
.rewards-steps {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}
.rewards-steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}
.rewards-steps .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.35);
}

.how-it-works-fallback { color: rgba(255,255,255,0.85) !important; margin: 8px 0 0; line-height: 1.45; }
.how-it-works-video-wrap {
    position: relative;
    margin: 12px 0 6px;
}
.how-it-works-video-host {
    position: relative;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    margin: 0;
    aspect-ratio: 16 / 9;
}
.how-it-works-video-host video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}
.how-it-works-video-host iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: auto;
}
.champion-mute-btn {
    display: none !important;
}
.champion-mute-btn .champion-mute-icon { display: none; flex-shrink: 0; }
.champion-mute-btn.is-muted .champion-mute-icon-off { display: block; }
.champion-mute-btn:not(.is-muted) .champion-mute-icon-on { display: block; }
.champion-mute-btn:not(.is-muted) .champion-mute-label { display: none; }
.champion-mute-btn:not(.is-muted) { padding: 8px; }

.rewards-stats {
    display: flex;
    align-items: stretch;
    padding: 18px 8px;
}
.rewards-stat {
    flex: 1;
    text-align: center;
}
.rewards-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ca-primary-deep);
    line-height: 1.1;
}
.rewards-stat-label {
    margin-top: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ca-muted);
}
.rewards-stat-divider {
    width: 1px;
    background: var(--ca-border);
    margin: 4px 0;
}
.rewards-stat-btn {
    appearance: none;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: default;
    padding: 0 8px;
    border-radius: 10px;
}
.rewards-stat-btn.is-clickable {
    cursor: pointer;
}
.rewards-stat-btn.is-clickable:hover,
.rewards-stat-btn.is-clickable:focus-visible {
    background: color-mix(in srgb, var(--ca-primary) 8%, white);
    outline: none;
}
.rewards-stat-btn.is-clickable .rewards-stat-label::after {
    content: ' ›';
}
.referral-status {
    font-size: 0.78rem;
    font-weight: 600;
}
.referral-status.ok { color: var(--ca-primary); }
.referral-status.warn { color: #b45309; }
.referral-status.muted { color: var(--ca-muted); }

.rewards-share-card { text-align: center; }
.rewards-share-icon { font-size: 2rem; margin-bottom: 6px; }
.rewards-share-title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ca-primary-deep);
}
.rewards-share-card .btn {
    margin-top: 14px;
    gap: 8px;
}
.refer-note { margin-top: 12px; }

/* Legacy step-num used elsewhere */
.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ca-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* New service wizard */
.stepper {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.stepper-step {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--ca-muted);
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    background: transparent;
}
.stepper-step.active {
    color: var(--ca-primary);
    background: var(--ca-sage);
}
.stepper-step.done { color: var(--ca-secondary); }

.size-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.size-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px;
    border: 2px solid var(--ca-border);
    border-radius: var(--radius-card);
    background: var(--ca-surface);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}
.size-option.selected {
    border-color: var(--ca-primary);
    background: color-mix(in srgb, var(--ca-primary) 6%, white);
}
.size-visual {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--ca-sage);
    color: var(--ca-primary);
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.size-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.size-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--ca-border);
    flex-shrink: 0;
}
.size-option.selected .size-check {
    border-color: var(--ca-primary);
    background: var(--ca-primary);
    box-shadow: inset 0 0 0 3px #fff;
}

.field-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ca-muted);
    margin-bottom: -4px;
}
.stack-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.stack-form input,
.stack-form textarea,
.stack-form select {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--ca-border);
    font-size: 1rem;
    font-family: inherit;
    background: var(--ca-surface);
}

.confirm-hero { text-align: center; padding: 12px 8px 20px; }
.confirm-check {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--ca-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.confirm-title {
    margin: 0 0 8px;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--ca-primary-deep);
}
.confirm-summary { margin-bottom: 16px; }
.confirm-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ca-border);
    font-size: 0.95rem;
}
.confirm-row:last-child { border-bottom: 0; }
.confirm-row strong { text-align: right; font-weight: 800; }

/* Info sheet */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
}
.info-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 201;
    background: var(--ca-surface);
    border-radius: 20px 20px 0 0;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0));
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
}
.sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--ca-border);
    border-radius: 2px;
    margin: 0 auto 16px;
}
.contact-block p { margin: 0 0 12px; }
.guidelines-block {
    background: var(--ca-bg);
    padding: 12px;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 16px;
}

/* Tab bar */
.tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    height: calc(var(--ca-tab-h) + env(safe-area-inset-bottom, 0));
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--ca-surface);
    border-top: 1px solid var(--ca-border);
    box-shadow: 0 -2px 12px rgba(53, 94, 59, 0.08);
}
.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px 6px;
    border: 0;
    background: none;
    font-size: 0.62rem;
    color: var(--ca-muted);
    cursor: pointer;
    font-family: inherit;
    position: relative;
    font-weight: 600;
}
.tab.active {
    color: var(--ca-primary);
    font-weight: 800;
}
.tab.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    background: var(--ca-primary);
    border-radius: 0 0 3px 3px;
}
.tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    position: relative;
}
.tab .support-unread {
    position: absolute;
    top: -6px;
    right: -10px;
    margin-left: 0;
}
.tab.active .tab-icon { color: var(--ca-primary); }

.panel {
    padding: 24px 16px;
    text-align: center;
    color: var(--ca-text);
}

/* In-app roll-off shell */
body.rolloff-open {
    padding-bottom: 0;
    overflow: hidden;
}
.rolloff-view {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    background: var(--ca-bg);
}
.rolloff-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: calc(10px + env(safe-area-inset-top, 0)) 12px 10px;
    background: var(--ca-surface);
    border-bottom: 1px solid var(--ca-border);
    flex-shrink: 0;
}
.rolloff-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    appearance: none;
    border: 0;
    background: none;
    color: var(--ca-primary);
    font-size: 1rem;
    font-weight: 700;
    padding: 8px 4px;
    cursor: pointer;
    font-family: inherit;
    min-height: 44px;
}
.rolloff-bar-title {
    flex: 1;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rolloff-bar-spacer { width: 72px; flex-shrink: 0; }
.rolloff-iframe {
    flex: 1;
    width: 100%;
    border: 0;
    min-height: 0;
    background: #fff;
}

/* Assistant — full-screen video-chat experience */
body.assistant-open {
    overflow: hidden;
}
body.assistant-open #app-main,
body.assistant-open #tab-bar,
body.assistant-open #view-rolloff,
body.assistant-open #info-sheet,
body.assistant-open #info-sheet-backdrop {
    visibility: hidden !important;
    pointer-events: none !important;
}
body.assistant-open #assistant-fab {
    display: none !important;
}

.assistant-fab {
    position: fixed;
    right: 16px;
    bottom: calc(var(--ca-tab-h) + env(safe-area-inset-bottom, 0) + 16px);
    z-index: 120;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 0;
    background: var(--ca-primary);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
}
.assistant-fab-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.assistant-panel {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    background: var(--ca-bg);
    color: var(--ca-text);
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    font-family: var(--font);
}
body.assistant-mode-talk .assistant-panel {
    display: block;
    background: #0b1220;
    color: #fff;
}
.assistant-topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--ca-bg);
    border-bottom: 1px solid var(--ca-border);
    z-index: 5;
}
body.assistant-mode-talk .assistant-topbar {
    position: absolute;
    top: env(safe-area-inset-top, 0);
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.65), rgba(0,0,0,0));
    border-bottom: 0;
    backdrop-filter: none;
}
.assistant-back-btn {
    appearance: none;
    border: 0;
    background: var(--ca-surface);
    color: var(--ca-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    box-shadow: var(--shadow-soft);
}
body.assistant-mode-talk .assistant-back-btn {
    background: rgba(255,255,255,.12);
    color: #fff;
    box-shadow: none;
}
.assistant-topbar-title {
    text-align: center;
    min-width: 0;
}
.assistant-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ca-primary-deep);
}
body.assistant-mode-talk .assistant-title {
    color: #fff;
}
.assistant-mode-toggle {
    display: flex;
    gap: 4px;
    background: var(--ca-sage);
    border-radius: 999px;
    padding: 3px;
}
body.assistant-mode-talk .assistant-mode-toggle {
    background: rgba(255,255,255,.08);
}
.assistant-mode-btn {
    border: 0;
    background: transparent;
    color: var(--ca-muted);
    border-radius: 999px;
    padding: 7px 12px;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
}
body.assistant-mode-talk .assistant-mode-btn {
    color: rgba(255,255,255,.75);
}
.assistant-mode-btn.active {
    background: var(--ca-primary);
    color: #fff;
}

.assistant-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 48vh;
    max-height: none;
    background:
        radial-gradient(ellipse 120% 80% at 50% 20%, var(--ca-sage) 0%, transparent 60%),
        var(--ca-bg);
    overflow: hidden;
}
body.assistant-mode-talk .assistant-stage {
    position: absolute;
    inset: 0;
    flex: none;
    min-height: 100%;
    height: 100%;
    z-index: 1;
    background: radial-gradient(ellipse at center, #1a3a28 0%, #0b1220 70%);
}
body.assistant-mode-text .assistant-stage {
    flex: 0 0 22vh;
    min-height: 140px;
    max-height: 180px;
}
body.assistant-mode-text.assistant-chatting .assistant-stage {
    flex: 0 0 0;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
}
.assistant-avatar-idle {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    padding: 16px;
}
.assistant-stage-portrait,
.assistant-talk-idle-img {
    width: min(56vw, 220px);
    height: min(56vw, 220px);
    max-height: 85%;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(53, 94, 59, 0.18));
}
body.assistant-mode-talk .assistant-stage-portrait,
body.assistant-mode-talk .assistant-talk-idle-img {
    width: min(55vw, 260px);
    height: min(55vw, 260px);
    opacity: 0.95;
    filter: drop-shadow(0 12px 28px rgba(0,0,0,.45));
}
.assistant-avatar-video {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.assistant-avatar-video:empty { display: none; }
.assistant-avatar-video video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    background: #000;
}
body.assistant-mode-talk .assistant-avatar-video video {
    object-fit: contain;
    object-position: center 20%;
}
.assistant-stage-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--ca-surface);
    color: var(--ca-primary-deep);
    border: 1px solid var(--ca-border);
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: var(--shadow-soft);
}
body.assistant-mode-talk .assistant-stage-badge {
    top: calc(56px + env(safe-area-inset-top, 0));
    background: rgba(0,0,0,.55);
    color: #fff;
    border: 0;
    box-shadow: none;
}
.assistant-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ca-secondary);
}
body.assistant-mode-text .assistant-live-dot {
    background: var(--ca-primary);
}
body.assistant-mode-talk .assistant-live-dot {
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239,68,68,.6);
    animation: assistant-pulse 1.4s infinite;
}
@keyframes assistant-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239,68,68,.55); }
    70% { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.assistant-talk-status {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 14px;
    z-index: 4;
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
    pointer-events: none;
}
body.assistant-mode-talk .assistant-talk-status {
    bottom: calc(72px + env(safe-area-inset-bottom, 0));
}
body.assistant-mode-text .assistant-talk-status:empty { display: none; }

.assistant-dock {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: none;
    background: var(--ca-surface);
    color: var(--ca-text);
    border-radius: 24px 24px 0 0;
    border-top: 1px solid var(--ca-border);
    box-shadow: 0 -4px 20px rgba(53, 94, 59, 0.08);
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0));
    z-index: 6;
}
body.assistant-mode-text .assistant-dock {
    flex: 1 1 auto;
}
body.assistant-mode-talk .assistant-dock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: none;
    background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,.35));
    color: #fff;
    border-radius: 0;
    box-shadow: none;
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0));
}
body.assistant-mode-talk .assistant-talk-hint {
    color: rgba(255,255,255,.85);
    margin: 0;
    font-size: 0.82rem;
}
.assistant-text-pane,
.assistant-talk-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}
.assistant-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 0 10px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px 8px;
    scrollbar-width: none;
}
.assistant-chips::-webkit-scrollbar { display: none; }
.assistant-chips.hidden { display: none !important; }
.assistant-chip {
    appearance: none;
    flex: 0 0 auto;
    border: 1px solid var(--ca-border);
    background: var(--ca-sage);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    color: var(--ca-primary-deep);
    font-family: inherit;
    text-align: center;
    white-space: nowrap;
    max-width: 78vw;
}
.assistant-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    padding: 4px 0 8px;
}
.assistant-msg { margin-bottom: 10px; }
.assistant-msg-user { text-align: right; }
.assistant-msg-user .assistant-bubble {
    background: var(--ca-primary);
    color: #fff;
    margin-left: auto;
}
.assistant-bubble {
    display: inline-block;
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--ca-bg);
    white-space: pre-wrap;
    text-align: left;
    font-size: 0.92rem;
}
.assistant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.assistant-action-btn {
    border: 1px solid var(--ca-primary);
    background: #fff;
    color: var(--ca-primary);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}
.assistant-action-btn.assistant-action-primary {
    background: var(--ca-primary);
    color: #fff;
    padding: 8px 14px;
    font-size: 0.88rem;
}
.assistant-human-link {
    appearance: none;
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ca-muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}
.assistant-human-link:active { color: var(--ca-primary); }
body.assistant-mode-talk .assistant-human-link { display: none; }

.assistant-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.assistant-form input {
    flex: 1;
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--ca-bg);
}
.assistant-form .btn.primary {
    border-radius: 999px;
    padding: 12px 18px;
}
.assistant-talk-hint {
    margin: 8px 0 0;
    color: var(--ca-muted);
    font-size: 0.88rem;
    line-height: 1.4;
    text-align: center;
}

/* Marketing-site iframe (iPhone frame) */
html.ca-embed,
body.ca-embed {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}
body.ca-embed {
    padding-bottom: 0;
}
body.ca-embed .app-main {
    min-height: 100%;
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding-bottom: calc(var(--ca-tab-h) + env(safe-area-inset-bottom, 0));
}
html.ca-embed #view-welcome:not(.hidden),
html.ca-embed .welcome-screen {
    min-height: 100%;
    height: 100%;
}
.msg-item.warning .msg-icon {
    background: #fffbeb;
    color: #d97706;
}

/* Demo lock-screen push (embed only) */
.ca-push-lock {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: linear-gradient(180deg, #1a3320 0%, #0b140e 55%, #07100a 100%);
    color: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.ca-push-lock.hidden { display: none !important; }
.ca-push-lock-inner {
    width: 100%;
    padding: 72px 18px 24px;
    text-align: center;
}
.ca-push-time {
    font-size: 4.4rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.ca-push-date {
    margin: 8px 0 28px;
    font-size: 1.15rem;
    font-weight: 600;
    opacity: 0.92;
}
.ca-push-banner {
    text-align: left;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 22px;
    padding: 12px 14px 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    transform: translateY(-24px);
    opacity: 0;
}
.ca-push-banner.ca-push-in {
    animation: ca-push-drop 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes ca-push-drop {
    to { transform: translateY(0); opacity: 1; }
}
.ca-push-app {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    opacity: 0.9;
}
.ca-push-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: cover;
    background: #fff;
}
.ca-push-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.ca-push-app-name { flex: 1; font-weight: 700; }
.ca-push-now { opacity: 0.75; text-transform: lowercase; letter-spacing: 0; }
.ca-push-title { font-weight: 800; font-size: 0.95rem; margin-bottom: 4px; }
.ca-push-body { font-size: 0.86rem; line-height: 1.4; opacity: 0.92; }
body.ca-push-lock-open .tab-bar,
body.ca-push-lock-open #assistant-fab {
    display: none !important;
}

.support-unread {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}
.support-live-pill {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 999px;
    margin-left: 6px;
    text-transform: uppercase;
}
body.ca-support-thread {
    overflow: hidden;
}
body.ca-support-thread .app-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
body.ca-support-thread:not(.ca-embed) {
    height: 100dvh;
}
body.ca-support-thread:not(.ca-embed) .app-main,
html.ca-embed body.ca-support-thread .app-main {
    height: 100%;
}
#view-support-thread:not(.hidden) {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
#view-support-thread:not(.hidden) .page-header {
    flex: 0 0 auto;
}
#support-chat-status {
    flex: 0 0 auto;
}
.support-chat-msgs {
    flex: 1 1 auto;
    overflow: auto;
    padding: 12px 16px 16px;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.support-bubble {
    max-width: 82%;
    padding: 8px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    white-space: pre-wrap;
    background: #f3f4f6;
}
.support-bubble.resident { background: #dcfce7; border: 1px solid #86efac; align-self: flex-end; border-bottom-right-radius: 4px; }
.support-bubble.agent { background: #dbeafe; border: 1px solid #93c5fd; align-self: flex-start; border-bottom-left-radius: 4px; }
.support-bubble.ai { background: #f3e8ff; border: 1px solid #d8b4fe; align-self: flex-start; border-bottom-left-radius: 4px; }
.support-bubble.system { background: #f3f4f6; align-self: center; font-size: 12px; text-align: center; color: #4b5563; }
.support-bubble .who { font-size: 11px; font-weight: 600; margin-bottom: 2px; }
.support-bubble.resident .who { color: #15803d; }
.support-bubble.agent .who { color: #1d4ed8; }
.support-bubble.ai .who { color: #7e22ce; }
.support-chat-form {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    z-index: 2;
}
.support-chat-form input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 10px 14px;
}
