﻿/* RoomCoachWidget.razor.css */

/* =========================================================
   Base Widget Layout
   ========================================================= */

.room-coach {
    position: relative;
    margin: 14px auto 0;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.10);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Fallback values (used before JS computes exact height) */
    --room-coach-header-height: 56px;
    --room-coach-bottom-gap: 12px;
    --room-coach-body-max-height: calc(100dvh - var(--room-coach-header-height) - var(--room-coach-bottom-gap));
}

.room-coach-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 23, 42, 0.02));
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

    .room-coach-header .chev {
        font-size: 14px;
        opacity: 0.7;
    }

.hdr-left {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.hdr-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hdr-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

.hdr-title {
    color: #0f172a;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.hdr-sub {
    font-size: 12px;
    color: #64748b;
    opacity: 1;
    font-weight: 600;
}

.hdr-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.hdr-btn {
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #334155;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

    .hdr-btn:hover:not(:disabled) {
        background: #fff;
        border-color: rgba(37, 99, 235, 0.25);
        color: #1d4ed8;
    }

    .hdr-btn:disabled {
        opacity: 0.5;
        cursor: default;
    }

.hdr-btn--help {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 15px;
}

.room-coach-body {
    padding: 12px 14px 22px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.75), #fff 34%);
    scroll-behavior: auto;
    scroll-padding-top: 96px;
    scroll-padding-bottom: 104px;
    overflow-anchor: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* Dynamic max-height (JS overrides --room-coach-body-max-height with px) */
    max-height: max(160px, var(--room-coach-body-max-height));
    min-height: 160px;
}

/* Fallback for browsers that do not support dvh */
@supports not (height: 100dvh) {
    .room-coach {
        --room-coach-body-max-height: calc(100vh - var(--room-coach-header-height) - var(--room-coach-bottom-gap));
    }
}



/* =========================================================
   Transcript + Messages
   ========================================================= */

.chat-transcript,
.bot-msg,
.user-bubble {
    contain: layout style paint;
}

.bot-msg {
    margin: 8px 0;
}

.bot-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 5px 2px;
    color: #64748b;
    opacity: 1;
    font-size: 11px;
    font-weight: 600;
}

.bot-avatar {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #334155;
    font-size: 10px;
    font-weight: 800;
}

.bot-name {
    letter-spacing: 0.2px;
}

.bot-bubble,
.user-bubble {
    display: inline-block;
    max-width: 92%;
    padding: 9px 11px;
    border-radius: 16px;
    line-height: 1.35;
    font-size: 13px;
    margin: 4px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    will-change: contents;
}

.bot-bubble {
    background: #f8fafc;
    color: #1f2937;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-top-left-radius: 7px;
}

.user-bubble {
    background: #1d4ed8;
    color: #fff;
    margin-left: auto;
    border-top-right-radius: 6px;
}

.jump-latest-top {
    position: sticky;
    top: 8px;
    display: flex;
    justify-content: flex-end;
    z-index: 30;
    pointer-events: none;
}

.jump-latest {
    pointer-events: auto;
    margin-right: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.scroll-spacer {
    height: 96px;
    flex: 0 0 96px;
}

/* =========================================================
   Inputs + Buttons
   ========================================================= */

.coach-text {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 10px 0;
}

.coach-textarea {
    width: 100%;
    min-height: 92px;
    padding: 12px 13px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    background: #fff;
    color: #0f172a;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    outline: none;
}

    .coach-textarea:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .coach-textarea:disabled {
        background-color: #f3f4f6;
        cursor: not-allowed;
        opacity: 0.6;
    }

.coach-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.coach-actions--decision {
    padding: 8px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.72), rgba(255, 255, 255, 0.94));
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.coach-actions--tertiary {
    margin-top: 8px;
}

.coach-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 13px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    border: 1px solid rgba(15, 23, 42, 0.13);
    border-radius: 12px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    white-space: nowrap;
}

    .coach-btn:focus-visible {
        outline: 3px solid rgba(37, 99, 235, 0.24);
        outline-offset: 2px;
    }

    .coach-btn:hover:not(:disabled) {
        background: #f8fafc;
        border-color: rgba(37, 99, 235, 0.25);
        color: #1d4ed8;
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    }

    .coach-btn:active:not(:disabled) {
        transform: translateY(0);
    }

    .coach-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .coach-btn.primary,
    .coach-btn--primary {
        flex: 1 1 auto;
        background: linear-gradient(180deg, #2563eb, #1d4ed8);
        color: #fff;
        border-color: rgba(37, 99, 235, 0.75);
        font-weight: 800;
        min-width: 160px;
    }

        .coach-btn.primary:hover:not(:disabled),
        .coach-btn--primary:hover:not(:disabled) {
            background: linear-gradient(180deg, #1d4ed8, #1e40af);
            border-color: rgba(29, 78, 216, 0.9);
            box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
            transform: translateY(-1px);
        }

    .coach-btn.secondary {
        background: #f8fafc;
        color: #374151;
        border: 1px solid rgba(15, 23, 42, 0.10);
    }

        .coach-btn.secondary:hover:not(:disabled) {
            background: #e5e7eb;
        }

    .coach-btn--choice {
        position: relative;
        flex: 1 1 160px;
        min-height: 40px;
        padding: 8px 12px;
        border-radius: 12px;
        font-size: 12.8px;
        font-weight: 800;
        text-align: center;
        white-space: normal;
        line-height: 1.25;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    }

    .coach-btn--choice span,
    .coach-btn--choice small {
        display: block;
    }

    .coach-btn--choice small {
        margin-top: 3px;
        font-size: 11.5px;
        font-weight: 600;
        line-height: 1.25;
        opacity: 0.78;
    }

    .coach-btn--choice::after {
        content: "→";
        font-size: 13px;
        opacity: .72;
        transform: translateX(0);
        transition: transform .16s ease, opacity .16s ease;
    }

    .coach-btn--choice:hover:not(:disabled)::after,
    .coach-btn--choice:focus-visible::after {
        opacity: 1;
        transform: translateX(2px);
    }

    .coach-btn--choice-primary {
        background: linear-gradient(180deg, #2563eb, #1d4ed8);
        border-color: rgba(37, 99, 235, 0.78);
        color: #fff;
        box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
    }

        .coach-btn--choice-primary:hover:not(:disabled) {
            background: linear-gradient(180deg, #1d4ed8, #1e40af);
            color: #fff;
            border-color: rgba(29, 78, 216, 0.92);
            box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
        }

    .coach-btn--choice-secondary {
        background: #ffffff;
        border-color: rgba(37, 99, 235, 0.22);
        color: #1d4ed8;
    }

        .coach-btn--choice-secondary:hover:not(:disabled) {
            background: rgba(239, 246, 255, 0.96);
            border-color: rgba(37, 99, 235, 0.38);
            color: #1e40af;
            box-shadow: 0 8px 18px rgba(37, 99, 235, 0.10);
        }

    .coach-btn--choice-guide {
        background: #f8fafc;
        border-color: rgba(14, 165, 233, 0.34);
        color: #0f4f75;
    }

        .coach-btn--choice-guide:hover:not(:disabled) {
            background: #f0f9ff;
            border-color: rgba(14, 165, 233, 0.52);
            color: #075985;
            box-shadow: 0 8px 18px rgba(14, 165, 233, 0.11);
        }

    .coach-btn--submit {
        min-height: 42px;
        box-shadow: 0 10px 22px rgba(37, 99, 235, 0.20);
    }

    .coach-btn--tertiary {
        min-height: 34px;
        padding: 7px 11px;
        font-size: 12px;
        font-weight: 700;
        color: #64748b;
        border-color: rgba(100, 116, 139, 0.18);
        background: rgba(248, 250, 252, 0.82);
        box-shadow: none;
    }

        .coach-btn--tertiary:hover:not(:disabled) {
            color: #334155;
            border-color: rgba(100, 116, 139, 0.28);
            background: #f8fafc;
            box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06);
        }

    .coach-btn.is-processing {
        opacity: 0.8;
        cursor: not-allowed;
    }

.coach-btn--mic {
    flex: 0 0 auto;
    border-color: rgba(100, 116, 139, 0.22);
    color: #475569;
}

    .coach-btn--mic:hover:not(:disabled) {
        background: #f3f4f6;
        border-color: #6b7280;
    }

    .coach-btn--mic .fa-microphone {
        font-size: 16px;
    }

    .coach-btn--mic .mic-blinking {
        color: #ef4444;
        animation: pulse 1.5s ease-in-out infinite;
    }

.btn-label {
    display: inline;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

/* Speak + primary action button pair */
.coach-text-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
}

.coach-text-actions--with-guide {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

    .coach-text-actions .coach-btn {
        min-height: 40px;
    }

.coach-text-actions .coach-btn--mic,
.coach-text-actions .coach-btn--primary,
.coach-text-actions .coach-btn--guide-inline {
    width: 100%;
    min-width: 0;
    flex: 1 1 0;
    justify-content: center;
}

.coach-btn--guide-inline {
    border-color: rgba(14, 165, 233, 0.28);
    color: #075985;
    background: #f8fafc;
}

.coach-btn--guide-inline:hover:not(:disabled) {
    border-color: rgba(14, 165, 233, 0.48);
    background: #f0f9ff;
    color: #0c4a6e;
}

.coach-guide-inline-helper {
    margin-top: 6px;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.3;
}

.coach-continue-conversation {
    margin-top: 12px;
    padding: 13px;
    border: 1px solid rgba(37, 99, 235, .12);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, .72), rgba(255, 255, 255, .88)),
        #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.coach-continue-label {
    font-size: 14px;
    font-weight: 850;
    color: #1e293b;
    line-height: 1.25;
}

.coach-continue-hint {
    margin: 4px 0 9px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.coach-quantity-panel {
    margin-top: 12px;
}

.coach-quantity-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coach-quantity-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.02);
}

    .coach-quantity-item.is-complete {
        border-color: rgba(16, 185, 129, 0.32);
        background: rgba(16, 185, 129, 0.06);
    }

.coach-quantity-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.coach-quantity-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.coach-quantity-item-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.coach-quantity-guidance {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.45;
    color: #374151;
}

.coach-quantity-unit {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.coach-quantity-example {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

.coach-quantity-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: start;
    margin-top: 10px;
}

.coach-quantity-input {
    min-height: 44px;
    resize: none;
}

    .coach-quantity-input.is-invalid {
        border-color: #ef4444;
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
    }

.coach-quantity-save,
.coach-quantity-default {
    min-width: 96px;
}

.coach-quantity-error {
    margin-top: 8px;
    font-size: 12px;
    color: #b91c1c;
}

.coach-quantity-status-text {
    margin-top: 8px;
    font-size: 12px;
    color: #047857;
}

.coach-quantity-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* =========================================================
   Status / Alerts / Toast
   ========================================================= */

.coach-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    background: #f8fafc;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 14px;
    margin: 10px 0;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.progress-text {
    color: #6b7280;
    font-size: 14px;
}

.coach-alert {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 8px;
    margin: 12px 0;
}

    .coach-alert.error {
        background: #fef2f2;
        border: 1px solid #fecaca;
    }

.coach-workflow-card {
    margin: 0 0 8px 0;
    padding: 8px;
    border: 1px solid rgba(37, 99, 235, 0.13);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    overflow-anchor: none;
    transition: box-shadow 160ms ease, border-color 160ms ease;
}

.room-coach-sticky-status {
    margin: 0 0 8px 0;
    overflow-anchor: none;
}

.room-coach-sticky-status .coach-workflow-card {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .room-coach-sticky-status {
        position: sticky;
        top: 0;
        z-index: 18;
        padding-bottom: 6px;
        background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(248, 250, 252, 0.88) 72%, rgba(248, 250, 252, 0));
        backdrop-filter: blur(8px);
    }

    .coach-workflow-card.is-compact {
        padding: 7px 8px;
        border-color: rgba(37, 99, 235, 0.16);
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    }

    .coach-workflow-card.is-compact .coach-workflow-secondary {
        display: none;
    }

    .coach-workflow-card.is-compact .coach-workflow-topline {
        align-items: center;
        margin-bottom: 5px;
    }

    .coach-workflow-card.is-compact .coach-workflow-steps {
        margin-bottom: 0;
    }

    .coach-workflow-card.is-compact .coach-workflow-steps-row {
        margin-bottom: 0;
    }
}

.coach-workflow-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.coach-workflow-eyebrow,
.coach-next-action-label {
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #64748b;
}

.coach-workflow-title {
    margin-top: 2px;
    font-size: 14px;
    font-weight: 750;
    color: #111827;
}

.coach-workflow-steps-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 6px 0;
}

.coach-workflow-card.details-collapsed .coach-workflow-steps-row {
    margin-bottom: 0;
}

.coach-readiness-badge {
    flex: 0 0 auto;
    padding: 4px 7px;
    border: 1px solid rgba(15,23,42,.10);
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 10.5px;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
}

.coach-readiness-badge.is-ready {
    border-color: rgba(16,185,129,.28);
    background: rgba(16,185,129,.10);
    color: #047857;
}

.coach-readiness-badge.is-warning {
    border-color: rgba(245,158,11,.32);
    background: rgba(245,158,11,.12);
    color: #92400e;
}

.coach-readiness-badge.is-working,
.coach-readiness-badge.is-info {
    border-color: rgba(59,130,246,.25);
    background: rgba(59,130,246,.10);
    color: #1d4ed8;
}

.coach-readiness-badge.is-muted {
    color: #64748b;
}

.coach-workflow-steps {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 3px;
    margin: 0;
}

.coach-workflow-details-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    padding: 3px 7px;
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}

.coach-workflow-details-toggle:hover,
.coach-workflow-details-toggle:focus-visible {
    border-color: rgba(37, 99, 235, .30);
    background: rgba(239, 246, 255, .86);
    color: #1d4ed8;
}

.coach-workflow-details-toggle__chev {
    display: inline-block;
    transition: transform .15s ease;
}

.coach-workflow-details-toggle__chev.is-open {
    transform: rotate(180deg);
}

.coach-workflow-step {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 22px;
    padding: 3px 6px;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #64748b;
    font-size: 11px;
    font-weight: 650;
}

.coach-workflow-step-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    opacity: .45;
}

.coach-workflow-step.is-current {
    border-color: rgba(37,99,235,.30);
    background: rgba(37,99,235,.08);
    color: #1d4ed8;
}

.coach-workflow-step.is-complete {
    border-color: rgba(16,185,129,.30);
    background: rgba(16,185,129,.08);
    color: #047857;
}

.coach-workflow-step.is-attention {
    border-color: rgba(245,158,11,.32);
    background: rgba(245,158,11,.10);
    color: #92400e;
}

.coach-workflow-helper {
    margin-bottom: 6px;
    color: #475569;
    font-size: 12px;
    line-height: 1.25;
}

.coach-photo-status {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 7px;
    margin: 0 0 6px 0;
    padding: 6px 8px;
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 12px;
    background: rgba(255, 255, 255, .74);
    color: #475569;
}

.coach-unmatched-clarifications {
    margin: 0 0 14px;
    padding: 13px;
    border: 1px solid rgba(217, 119, 6, .22);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 251, 235, .92), rgba(255, 255, 255, .86)),
        #fff;
    box-shadow: 0 10px 24px rgba(146, 64, 14, .08);
}

.coach-unmatched-clarifications__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.coach-unmatched-clarifications__eyebrow {
    margin-bottom: 3px;
    color: #b45309;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.coach-unmatched-clarifications__title {
    margin: 0;
    color: #1e293b;
    font-size: 15px;
    font-weight: 850;
    line-height: 1.2;
}

.coach-unmatched-clarifications__helper {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.42;
}

.coach-unmatched-clarifications__count {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid rgba(217, 119, 6, .22);
    background: rgba(255, 255, 255, .72);
    color: #92400e;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.coach-unmatched-clarifications__list {
    display: grid;
    gap: 8px;
}

.coach-unmatched-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 9px 10px;
    padding: 11px;
    border: 1px solid rgba(148, 163, 184, .20);
    border-radius: 14px;
    background: rgba(255, 255, 255, .82);
}

.coach-unmatched-card.is-later {
    border-color: rgba(100, 116, 139, .18);
    background: rgba(248, 250, 252, .78);
}

.coach-unmatched-card.is-drafted {
    border-color: rgba(14, 165, 233, .20);
    background: rgba(240, 249, 255, .74);
}

.coach-unmatched-card.is-retrying {
    border-color: rgba(37, 99, 235, .22);
    background: rgba(239, 246, 255, .78);
}

.coach-unmatched-card.is-added {
    border-color: rgba(16, 185, 129, .22);
    background: rgba(236, 253, 245, .78);
}

.coach-unmatched-card.is-already-in-scope {
    border-color: rgba(20, 184, 166, .20);
    background: rgba(240, 253, 250, .76);
}

.coach-unmatched-card.is-still-unresolved {
    border-color: rgba(217, 119, 6, .24);
    background: rgba(255, 251, 235, .82);
}

.coach-unmatched-card.is-failed-to-add {
    border-color: rgba(239, 68, 68, .22);
    background: rgba(254, 242, 242, .80);
}

.coach-unmatched-card.is-skipped {
    border-color: rgba(100, 116, 139, .18);
    background: rgba(248, 250, 252, .78);
}

.coach-unmatched-card__body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    grid-column: 1 / -1;
    min-width: 0;
    flex-wrap: wrap;
}

.coach-unmatched-card__phrase {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.coach-unmatched-card__phrase-label {
    color: #92400e;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .06em;
    line-height: 1.1;
    text-transform: uppercase;
}

.coach-unmatched-card__label {
    color: #0f172a;
    font-size: 13px;
    font-weight: 820;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.coach-unmatched-card__status {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 3px 7px;
    border-radius: 999px;
    border: 1px solid rgba(217, 119, 6, .20);
    background: rgba(254, 243, 199, .70);
    color: #92400e;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.coach-unmatched-card__status.is-later {
    border-color: rgba(100, 116, 139, .18);
    background: rgba(241, 245, 249, .82);
    color: #475569;
}

.coach-unmatched-card__status.is-drafted {
    border-color: rgba(14, 165, 233, .22);
    background: rgba(224, 242, 254, .78);
    color: #0369a1;
}

.coach-unmatched-card__status.is-retrying {
    border-color: rgba(37, 99, 235, .22);
    background: rgba(219, 234, 254, .78);
    color: #1d4ed8;
}

.coach-unmatched-card__status.is-added {
    border-color: rgba(16, 185, 129, .24);
    background: rgba(209, 250, 229, .78);
    color: #047857;
}

.coach-unmatched-card__status.is-already-in-scope {
    border-color: rgba(20, 184, 166, .22);
    background: rgba(204, 251, 241, .72);
    color: #0f766e;
}

.coach-unmatched-card__status.is-still-unresolved {
    border-color: rgba(217, 119, 6, .22);
    background: rgba(254, 243, 199, .76);
    color: #92400e;
}

.coach-unmatched-card__status.is-failed-to-add {
    border-color: rgba(239, 68, 68, .22);
    background: rgba(254, 226, 226, .76);
    color: #b91c1c;
}

.coach-unmatched-card__status.is-skipped {
    border-color: rgba(100, 116, 139, .18);
    background: rgba(241, 245, 249, .82);
    color: #475569;
}

.coach-unmatched-card__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.coach-unmatched-card__actions--defer {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-top: 1px;
}

.coach-unmatched-card__action {
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, .18);
    background: rgba(255, 255, 255, .76);
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 780;
    line-height: 1;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.coach-unmatched-card__action:hover:not(:disabled),
.coach-unmatched-card__action:focus-visible {
    border-color: rgba(37, 99, 235, .30);
    background: rgba(219, 234, 254, .78);
    transform: translateY(-1px);
}

.coach-unmatched-card__action--primary {
    border-color: rgba(37, 99, 235, .34);
    background: #2563eb;
    color: #fff;
    box-shadow: 0 8px 16px rgba(37, 99, 235, .16);
}

.coach-unmatched-card__action--primary:hover:not(:disabled),
.coach-unmatched-card__action--primary:focus-visible {
    border-color: rgba(29, 78, 216, .42);
    background: #1d4ed8;
}

.coach-unmatched-card__action--secondary {
    border-color: rgba(14, 165, 233, .20);
    background: rgba(240, 249, 255, .86);
    color: #0369a1;
}

.coach-unmatched-card__action--secondary:hover:not(:disabled),
.coach-unmatched-card__action--secondary:focus-visible {
    border-color: rgba(14, 165, 233, .32);
    background: rgba(224, 242, 254, .92);
    color: #075985;
}

.coach-unmatched-card__action--muted {
    border-color: rgba(100, 116, 139, .18);
    color: #475569;
}

.coach-unmatched-card__action--muted:hover:not(:disabled),
.coach-unmatched-card__action--muted:focus-visible {
    border-color: rgba(100, 116, 139, .30);
    background: rgba(241, 245, 249, .88);
    color: #334155;
}

.coach-unmatched-card__action--quiet {
    border-color: transparent;
    background: transparent;
    color: #64748b;
}

.coach-unmatched-card__action--quiet:hover:not(:disabled),
.coach-unmatched-card__action--quiet:focus-visible {
    border-color: rgba(100, 116, 139, .20);
    background: rgba(241, 245, 249, .78);
    color: #475569;
}

.coach-unmatched-card__action:disabled {
    opacity: .62;
    cursor: default;
    transform: none;
}

.coach-unmatched-card__draft {
    grid-column: 1 / -1;
    display: grid;
    gap: 7px;
    padding-top: 1px;
}

.coach-unmatched-card__draft-label {
    color: #475569;
    font-size: 11px;
    font-weight: 820;
}

.coach-unmatched-card__draft-input {
    width: 100%;
    min-height: 48px;
    resize: vertical;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 12px;
    background: rgba(255, 255, 255, .86);
    color: #0f172a;
    font-size: 12px;
    line-height: 1.35;
    outline: none;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.coach-unmatched-card__draft-input::placeholder {
    color: #94a3b8;
}

.coach-unmatched-card__draft-input:focus {
    border-color: rgba(37, 99, 235, .32);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.coach-unmatched-card__draft-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 1px;
}

.coach-unmatched-card__draft-summary {
    margin: 0;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(14, 165, 233, .08);
    color: #475569;
    font-size: 11px;
    line-height: 1.35;
}

.coach-unmatched-card__draft-summary span {
    color: #0f172a;
    font-weight: 760;
    overflow-wrap: anywhere;
}

.coach-unmatched-card__retry-message {
    margin: 0;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
    color: #475569;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.coach-unmatched-card__candidate-options {
    display: grid;
    gap: 7px;
    padding: 8px;
    border: 1px solid rgba(217, 119, 6, .18);
    border-radius: 12px;
    background: rgba(255, 255, 255, .70);
}

.coach-unmatched-card__candidate-intro {
    margin: 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.35;
}

.coach-unmatched-card__candidate-list {
    display: grid;
    gap: 6px;
}

.coach-unmatched-card__candidate-option {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 12px;
    background: rgba(248, 250, 252, .90);
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.coach-unmatched-card__candidate-option:hover:not(:disabled),
.coach-unmatched-card__candidate-option:focus-visible {
    border-color: rgba(37, 99, 235, .34);
    background: rgba(239, 246, 255, .94);
    transform: translateY(-1px);
    outline: none;
}

.coach-unmatched-card__candidate-option:disabled {
    opacity: .62;
    cursor: default;
    transform: none;
}

.coach-unmatched-card__candidate-title {
    font-size: 12px;
    font-weight: 820;
    line-height: 1.25;
}

.coach-unmatched-card__candidate-path {
    color: #64748b;
    font-size: 11px;
    line-height: 1.3;
}

.coach-clarification-focus {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid rgba(217, 119, 6, .22);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 251, 235, .84), rgba(255, 255, 255, .78)),
        #fff;
    color: #475569;
}

.coach-clarification-focus__title {
    margin-bottom: 3px;
    color: #92400e;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .02em;
}

.coach-clarification-focus__text {
    font-size: 12px;
    line-height: 1.4;
}

.coach-photo-status__label {
    grid-row: span 2;
    align-self: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .05);
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.coach-photo-status__value {
    color: #111827;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
}

.coach-photo-status__detail {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
}

.coach-photo-status.is-ready {
    border-color: rgba(16, 185, 129, .22);
    background: rgba(236, 253, 245, .64);
}

.coach-photo-status.is-working,
.coach-photo-status.is-info {
    border-color: rgba(59, 130, 246, .18);
    background: rgba(239, 246, 255, .62);
}

.coach-photo-status.is-warning {
    border-color: rgba(245, 158, 11, .24);
    background: rgba(255, 251, 235, .72);
}

.coach-next-action {
    padding: 7px 8px;
    border: 1px solid rgba(37,99,235,.14);
    border-radius: 12px;
    background: rgba(239, 246, 255, 0.72);
}

.coach-next-action-text {
    margin-top: 2px;
    color: #111827;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 650;
}

.coach-roomdata-cue {
    margin-top: 5px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.25;
}

.coach-roomdata-status {
    margin-top: 7px;
    padding: 7px 8px;
    border: 1px solid rgba(16, 185, 129, .18);
    border-radius: 11px;
    background: rgba(236, 253, 245, .78);
    color: #047857;
    font-size: 11.5px;
    line-height: 1.3;
    font-weight: 650;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.coach-roomdata-status.is-info {
    border-color: rgba(37, 99, 235, .18);
    background: rgba(239, 246, 255, .82);
    color: #1d4ed8;
}

.coach-roomdata-status.is-warning {
    border-color: rgba(245, 158, 11, .24);
    background: rgba(255, 251, 235, .9);
    color: #92400e;
}

.coach-roomdata-status.is-error {
    border-color: rgba(239, 68, 68, .22);
    background: rgba(254, 242, 242, .9);
    color: #b91c1c;
}

.coach-roomdata-status__dismiss {
    border: 0;
    background: transparent;
    color: currentColor;
    cursor: pointer;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    opacity: .62;
    transition: background-color .15s ease, opacity .15s ease;
}

.coach-roomdata-status__dismiss:hover,
.coach-roomdata-status__dismiss:focus-visible {
    background: rgba(15, 23, 42, .08);
    opacity: 1;
    outline: none;
}

.coach-roomdata-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
    padding: 7px;
    border: 1px solid rgba(37, 99, 235, .10);
    border-radius: 13px;
    background: rgba(248, 250, 252, .82);
}

.coach-roomdata-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 29px;
    padding: 5px 9px;
    border: 1px solid rgba(37, 99, 235, .22);
    border-radius: 999px;
    background: #fff;
    color: #1d4ed8;
    font-size: 11.5px;
    font-weight: 760;
    line-height: 1.1;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(37, 99, 235, .06);
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.coach-roomdata-link:hover,
.coach-roomdata-link:focus-visible {
    border-color: rgba(37, 99, 235, .42);
    background: rgba(239, 246, 255, .9);
    color: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 7px 16px rgba(37, 99, 235, .12);
    outline: none;
}

.coach-roomdata-link--attention {
    border-color: rgba(245, 158, 11, .42);
    background: linear-gradient(180deg, rgba(255, 251, 235, .96), rgba(254, 243, 199, .76));
    color: #92400e;
    box-shadow: 0 5px 14px rgba(245, 158, 11, .13);
}

.coach-roomdata-link--attention:hover,
.coach-roomdata-link--attention:focus-visible {
    border-color: rgba(245, 158, 11, .48);
    background: rgba(254, 243, 199, .92);
    color: #78350f;
}

.coach-recommendations {
    margin: 0 0 8px 0;
    padding: 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    overflow-anchor: none;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.90));
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.coach-recommendations__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.coach-recommendations.is-collapsed .coach-recommendations__header {
    margin-bottom: 0;
}

.coach-recommendations__heading {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.coach-recommendations__eyebrow {
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #64748b;
}

.coach-recommendations__summary {
    color: #0f172a;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.18;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coach-recommendations__header-actions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
}

.coach-recommendations__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    min-height: 19px;
    padding: 1px 6px;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-size: 11px;
    font-weight: 850;
}

.coach-recommendations__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 999px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    font-size: 14px;
    font-weight: 850;
    line-height: 1;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.coach-recommendations__toggle:hover,
.coach-recommendations__toggle:focus-visible {
    background: rgba(239,246,255,.96);
    border-color: rgba(37,99,235,.24);
    color: #1d4ed8;
    outline: none;
}

.coach-recommendations__toggle:disabled {
    cursor: default;
    opacity: .68;
}

.coach-recommendations__collapsed-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(15,23,42,.06);
}

.coach-recommendations__collapsed-copy {
    min-width: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coach-recommendations__list {
    display: grid;
    gap: 5px;
}

.coach-recommendation-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 7px 9px;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(15,23,42,.02);
}

.coach-recommendation-card.is-info {
    border-color: rgba(37,99,235,.16);
    background: linear-gradient(180deg, rgba(239,246,255,.72), #fff);
}

.coach-recommendation-card.is-warning {
    border-color: rgba(245,158,11,.24);
    background: linear-gradient(180deg, rgba(255,251,235,.82), #fff);
    box-shadow: inset 3px 0 0 rgba(245,158,11,.62);
}

.coach-recommendation-card.is-success {
    border-color: rgba(16,185,129,.22);
    background: linear-gradient(180deg, rgba(236,253,245,.72), #fff);
}

.coach-recommendation-card__body {
    min-width: 0;
}

.coach-recommendation-card__eyebrow {
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #64748b;
}

.coach-recommendation-card__title {
    margin-top: 1px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
}

.coach-recommendation-card__description {
    margin-top: 2px;
    color: #475569;
    font-size: 12px;
    line-height: 1.28;
}

.coach-recommendation-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.coach-recommendation-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 8px;
    border: 1px solid rgba(37,99,235,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.88);
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    cursor: pointer;
    transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.coach-recommendation-action--compact {
    flex: 0 0 auto;
}

    .coach-recommendation-action:hover:not(:disabled) {
        transform: translateY(-1px);
        background: rgba(239,246,255,.96);
        border-color: rgba(37,99,235,.34);
        box-shadow: 0 6px 14px rgba(37,99,235,.10);
    }

    .coach-recommendation-action:focus-visible {
        outline: 3px solid rgba(37,99,235,.18);
        outline-offset: 2px;
    }

    .coach-recommendation-action:disabled {
        cursor: not-allowed;
        opacity: .55;
        transform: none;
        box-shadow: none;
    }

.coach-recommendation-action.is-primary {
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    border-color: rgba(37,99,235,.38);
    color: #fff;
    box-shadow: 0 8px 18px rgba(37,99,235,.16);
}

.coach-recommendation-action.is-attention {
    background: rgba(255,251,235,.96);
    border-color: rgba(245,158,11,.34);
    color: #92400e;
}

.alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    color: #991b1b;
    margin-bottom: 4px;
}

.alert-message {
    color: #dc2626;
    font-size: 14px;
}

.alert-close {
    background: transparent;
    border: none;
    color: #dc2626;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.coach-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

    .coach-toast.success {
        background: #10b981;
        color: #fff;
    }

    .coach-toast.error {
        background: #ef4444;
        color: #fff;
    }

    .coach-toast.info {
        background: #3b82f6;
        color: #fff;
    }

.toast-message {
    flex: 1;
}

.toast-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    line-height: 1;
}

/* =========================================================
   Task Blocks
   ========================================================= */

.coach-group {
    margin-top: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.coach-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #f9fafb;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

    .coach-group-header:hover {
        background: #f3f4f6;
    }

.expand-icon {
    font-size: 12px;
    color: #6b7280;
    transition: transform 0.2s;
}

.coach-group-title {
    font-weight: 800;
    font-size: 13px;
}

.coach-group-count {
    margin-left: auto;
    font-size: 12px;
    color: #6b7280;
    background: #fff;
    padding: 4px 8px;
    border-radius: 12px;
}

.coach-group-content {
    padding-top: 8px;
}

.coach-task {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    align-items: flex-start;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

    .coach-task:last-child {
        border-bottom: none;
    }

    .coach-task input[type="checkbox"] {
        margin-top: 3px;
        transform: scale(1.05);
    }

.coach-task-body {
    flex: 1;
    display: grid;
    gap: 6px;
}

.coach-task-cat {
    font-weight: 800;
    font-size: 13px;
}

.coach-task-add {
    margin-top: 0;
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.04);
}

    .coach-task-add:hover {
        background: rgba(0, 0, 0, 0.07);
    }

    .coach-task-add.is-added {
        opacity: 0.7;
        cursor: not-allowed;
    }

/* =========================================================
   Upload + Thumbnails + Image Analysis
   ========================================================= */

.upload-panel {
    margin-top: 12px;
}

.upload-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 12px;
}

.upload-head {
    margin-bottom: 10px;
}

.upload-title {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
}

.upload-sub {
    margin-top: 2px;
    font-size: 12px;
    opacity: 0.7;
}

.upload-picker {
    position: relative;
}

.upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.upload-drop {
    display: block;
    border: 1px dashed rgba(0, 0, 0, 0.18);
    border-radius: 14px;
    padding: 18px 14px;
    background: rgba(0, 0, 0, 0.02);
    cursor: pointer;
    user-select: none;
    transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

    .upload-drop:hover {
        background: rgba(0, 0, 0, 0.03);
        border-color: rgba(0, 0, 0, 0.28);
    }

    .upload-drop:active {
        transform: scale(0.995);
    }

.upload-drop-inner {
    text-align: center;
}

.upload-cta {
    font-weight: 700;
    font-size: 14px;
}

.upload-hint {
    margin-top: 3px;
    font-size: 12px;
    opacity: 0.7;
}

.upload-btnrow {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

    .upload-btnrow .upload-btn {
        flex: 1;
    }

.upload-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.upload-btn {
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    cursor: pointer;
}

    .upload-btn.primary {
        border-color: rgba(0, 0, 0, 0.12);
        background: rgba(0, 0, 0, 0.9);
        color: #fff;
    }

    .upload-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.coach-photo-upload-panel {
    margin-top: 12px;
}

.coach-photo-upload-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
}

    .coach-photo-upload-card .upload-head {
        display: grid;
        gap: 3px;
        margin-bottom: 12px;
    }

    .coach-photo-upload-card .upload-title {
        color: #0f172a;
        font-size: 15px;
        font-weight: 850;
        letter-spacing: -0.01em;
    }

    .coach-photo-upload-card .upload-sub {
        color: #475569;
        font-size: 12.5px;
        line-height: 1.4;
        opacity: 1;
    }

    .coach-photo-upload-card .upload-sub--compact {
        color: #64748b;
        font-size: 11.5px;
        font-weight: 650;
    }

    .coach-photo-upload-card .upload-drop {
        background: rgba(37, 99, 235, 0.045);
        border-color: rgba(37, 99, 235, 0.20);
        color: #334155;
    }

        .coach-photo-upload-card .upload-drop:hover,
        .coach-photo-upload-card .upload-drop:focus-visible {
            background: rgba(37, 99, 235, 0.075);
            border-color: rgba(37, 99, 235, 0.34);
            outline: none;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
        }

    .coach-photo-upload-card .upload-cta {
        color: #1e293b;
        font-weight: 800;
    }

    .coach-photo-upload-card .upload-hint {
        color: #64748b;
        opacity: 1;
    }

    .coach-photo-upload-card .upload-btn {
        border-color: rgba(15, 23, 42, 0.12);
        color: #334155;
        font-weight: 750;
        transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
    }

        .coach-photo-upload-card .upload-btn:hover:not(:disabled),
        .coach-photo-upload-card .upload-btn:focus-visible {
            border-color: rgba(37, 99, 235, 0.34);
            box-shadow: 0 8px 18px rgba(37, 99, 235, 0.10);
            outline: none;
        }

        .coach-photo-upload-card .upload-btn:active:not(:disabled) {
            transform: translateY(1px);
        }

        .coach-photo-upload-card .upload-btn.primary:not(.photo-source-option) {
            background: linear-gradient(180deg, #2563eb, #1d4ed8);
            border-color: #2563eb;
            color: #fff;
            box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
        }

        .coach-photo-upload-card .upload-btn.secondary {
            background: #f8fafc;
            color: #475569;
            border-color: rgba(15, 23, 42, 0.12);
        }

.photo-source-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(154px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.photo-source-option {
    width: 100%;
    min-height: 78px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    border-radius: 14px;
    text-align: left;
    line-height: 1.2;
    text-decoration: none;
}

    .photo-source-option--primary {
        background: linear-gradient(180deg, #2563eb, #1d4ed8);
        border-color: #2563eb;
        color: #fff;
        box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
    }

        .photo-source-option--primary:hover:not(:disabled),
        .photo-source-option--primary:focus-visible {
            background: linear-gradient(180deg, #1d4ed8, #1e40af);
            border-color: #1d4ed8;
            color: #fff;
        }

        .photo-source-option--drop-target.is-drag-over {
            border-color: rgba(255, 255, 255, 0.78);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16), 0 12px 24px rgba(37, 99, 235, 0.18);
            filter: saturate(1.04);
        }

    .photo-source-option--secondary {
        background: #fff;
        border-color: rgba(37, 99, 235, 0.22);
        color: #1e3a8a;
    }

        .photo-source-option--secondary:hover:not(:disabled),
        .photo-source-option--secondary:focus-visible {
            background: rgba(37, 99, 235, 0.07);
            color: #1d4ed8;
        }

.photo-source-option__title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 850;
}

.photo-source-option__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.10);
    color: #1d4ed8;
    font-size: 11px;
    line-height: 1;
}

.photo-source-option__hint {
    display: block;
    font-size: 11.5px;
    font-weight: 650;
    opacity: 0.84;
}

.photo-source-option__hint--drop {
    display: none;
}

.photo-source-option__hint--filetypes {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.76;
}

.photo-source-option--drop-target.is-drag-over .photo-source-option__hint--rest {
    display: none;
}

.photo-source-option--drop-target.is-drag-over .photo-source-option__hint--drop {
    display: block;
}

.coach-photo-upload-card .thumbs {
    padding: 4px 2px 2px;
}

.coach-photo-upload-card .thumb img {
    border-color: rgba(37, 99, 235, 0.14);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
}

.coach-photo-upload-card .thumb-remove {
    background: rgba(15, 23, 42, 0.70);
}

    .coach-photo-upload-card .thumb-remove:hover,
    .coach-photo-upload-card .thumb-remove:focus-visible {
        background: rgba(220, 38, 38, 0.92);
        outline: none;
    }

.thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    max-height: 220px;
    overflow: auto;
    padding-right: 4px;
}

.thumb {
    position: relative;
    width: 120px;
}

    .thumb img {
        width: 120px;
        height: 90px;
        display: block;
        object-fit: cover;
        border-radius: 12px;
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

.thumb-name {
    font-size: 12px;
    opacity: 0.75;
    margin-top: 4px;
    word-break: break-word;
}

.thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

    .thumb-remove:hover {
        background: rgba(0, 0, 0, 0.8);
    }

.img-analysis-card {
    margin-top: 12px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 12px;
}

    .img-analysis-card.error {
        border-color: rgba(255, 0, 0, 0.18);
        background: rgba(255, 0, 0, 0.03);
    }

.img-analysis-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.img-analysis-title {
    font-weight: 800;
    font-size: 14px;
}

.img-analysis-sub {
    font-size: 12px;
    opacity: 0.75;
}

.img-preview-wrap {
    margin-top: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
}

.img-preview {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    display: block;
}

.img-items-scroll {
    margin-top: 10px;
    max-height: 240px;
    overflow: auto;
    padding-right: 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 10px;
}

.img-items {
    display: grid;
    gap: 10px;
}

.img-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.01);
}

.img-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.img-item-desc {
    font-weight: 700;
    font-size: 13px;
    line-height: 1.25;
}

.img-item-conf {
    font-size: 12px;
    opacity: 0.75;
    white-space: nowrap;
}

.img-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    background: #fff;
}

    .pill.subtle {
        opacity: 0.8;
    }

    .pill.warn {
        border-color: rgba(255, 165, 0, 0.25);
        background: rgba(255, 165, 0, 0.1);
    }

.img-item-evidence,
.img-item-notes {
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.85;
    line-height: 1.35;
}

.img-item-refs {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ref {
    font-size: 11px;
    opacity: 0.7;
    border: 1px dashed rgba(0, 0, 0, 0.14);
    border-radius: 10px;
    padding: 2px 6px;
}

/* =========================================================
   Project Photos Picker
   ========================================================= */

.project-photos-picker {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
    border: 1px solid var(--border-color, #dee2e6);
}

.project-photos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.project-photos-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary, #333);
}

.project-photos-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary, #666);
    padding: 0;
    line-height: 1;
}

    .project-photos-close:hover {
        color: var(--text-primary, #333);
    }

.project-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

.project-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
}

    .project-photo-item:hover {
        transform: scale(1.02);
    }

    .project-photo-item.selected {
        border-color: var(--primary-color, #0d6efd);
    }

    .project-photo-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.project-photo-check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: var(--primary-color, #0d6efd);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.7rem;
}

.coach-photo-upload-card .project-photos-picker {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.coach-photo-upload-card .project-photos-title {
    color: #1e293b;
    font-size: 13px;
    font-weight: 800;
}

.coach-photo-upload-card .project-photos-close {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: #64748b;
}

    .coach-photo-upload-card .project-photos-close:hover,
    .coach-photo-upload-card .project-photos-close:focus-visible {
        background: rgba(15, 23, 42, 0.06);
        color: #0f172a;
        outline: none;
    }

.coach-photo-upload-card .project-photo-item {
    border-radius: 10px;
    border-width: 1px;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06);
}

    .coach-photo-upload-card .project-photo-item:hover,
    .coach-photo-upload-card .project-photo-item:focus-visible {
        transform: translateY(-1px);
        border-color: rgba(37, 99, 235, 0.38);
        outline: none;
    }

    .coach-photo-upload-card .project-photo-item.selected {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }

.project-photos-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #dee2e6);
}

/* =========================================================
   Overlays / Dialogs
   ========================================================= */

.coach-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200 !important;
}

.coach-confirm-dialog {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1210;
    position: relative;
}

.coach-confirm-header h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
}

.coach-confirm-body p {
    margin: 0 0 20px;
    color: #666;
}

.coach-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.coach-legend-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.coach-legend-panel {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.coach-legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.coach-legend-body {
    padding: 16px;
}

.legend-section {
    margin-bottom: 20px;
}

    .legend-section h4 {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 8px;
        color: #333;
    }

.legend-list {
    list-style: none;
    padding-left: 0;
}

    .legend-list li {
        padding: 4px 0;
        font-size: 13px;
        color: #555;
    }

    .legend-list code {
        background: #f5f5f5;
        padding: 2px 6px;
        border-radius: 3px;
        font-size: 12px;
        color: #e83e8c;
    }

/* =========================================================
   Measurement Options
   ========================================================= */

.coach-measurement-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
    padding: 0;
}

.measurement-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 13px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
}

    .measurement-btn i {
        font-size: 16px;
    }

    .measurement-btn:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .measurement-btn:active:not(:disabled) {
        transform: translateY(0);
    }

/* =========================================================
   Corner Capture (4-corner mode)
   ========================================================= */

.coach-corner-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.coach-corner-progress-card {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
}

.coach-corner-progress-copy {
    min-width: 0;
}

.coach-corner-progress-title {
    color: #0f172a;
    font-size: 14px;
    font-weight: 850;
    letter-spacing: -0.01em;
}

.coach-corner-progress-helper {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.coach-corner-progress-status {
    display: grid;
    justify-items: end;
    gap: 7px;
}

.coach-corner-progress-count {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 999px;
    background: #fff;
    color: #1e3a8a;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.coach-corner-progress-track {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.coach-corner-progress-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
}

    .coach-corner-progress-dot.is-current {
        border-color: rgba(37, 99, 235, 0.42);
        background: rgba(37, 99, 235, 0.09);
        color: #1d4ed8;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
    }

    .coach-corner-progress-dot.is-complete {
        border-color: rgba(16, 185, 129, 0.28);
        background: rgba(16, 185, 129, 0.12);
        color: #047857;
    }

.coach-corner-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 0;
}

.coach-corner-thumb-card {
    width: 129px;
    padding: 7px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.055);
}

.coach-corner-thumb-wrap {
    margin: 0;
}

.coach-corner-thumb {
    padding: 0;
    cursor: default;
    border-radius: 10px;
    overflow: hidden;
}

    .coach-corner-thumb .room-info-data__thumb-img {
        width: 100%;
        height: 92px;
        object-fit: cover;
        display: block;
    }

.coach-corner-thumb-label {
    margin-top: 5px;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.coach-corner-thumb-actions {
    display: flex;
    flex-direction: row;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 6px;
}

    .coach-corner-thumb-actions .upload-btn {
        padding: 4px 8px;
        font-size: 11px;
        line-height: 1;
        border-radius: 999px;
    }

.coach-corner-card {
    position: relative;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 240px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
}

.coach-corner-card-header {
    display: grid;
    gap: 3px;
}

.coach-corner-eyebrow {
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coach-corner-title {
    color: #0f172a;
    font-size: 15px;
    font-weight: 850;
    letter-spacing: -0.01em;
}

.coach-corner-helper {
    color: #475569;
    font-size: 12.5px;
    line-height: 1.4;
}

.coach-corner-preview {
    width: 100%;
    height: 156px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    background: #f8fafc;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.coach-corner-drop-target {
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, filter 0.16s ease;
}

.coach-corner-drop-target.is-drag-over {
    border-color: rgba(37, 99, 235, 0.52);
    background: rgba(37, 99, 235, 0.085);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13), 0 12px 24px rgba(37, 99, 235, 0.14);
    filter: saturate(1.04);
}

.coach-corner-drop-title {
    display: block;
}

.coach-corner-drop-title--over {
    display: none;
}

.coach-corner-drop-target.is-drag-over .coach-corner-drop-title--rest {
    display: none;
}

.coach-corner-drop-target.is-drag-over .coach-corner-drop-title--over {
    display: block;
}

.coach-corner-placeholder {
    min-height: 156px;
    border: 1px dashed rgba(37, 99, 235, 0.28);
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.045);
    color: #334155;
    display: grid;
    gap: 5px;
    place-items: center;
    text-align: center;
    padding: 16px;
}

    .coach-corner-placeholder i {
        color: #2563eb;
        font-size: 21px;
    }

    .coach-corner-placeholder span {
        color: #1e293b;
        font-size: 13px;
        font-weight: 850;
    }

    .coach-corner-placeholder small {
        color: #64748b;
        font-size: 11.5px;
        font-weight: 650;
        line-height: 1.3;
    }

.coach-corner-card:has(.coach-corner-preview) .coach-corner-placeholder {
    display: none;
}

.coach-corner-actions {
    margin-top: 0;
}

    .coach-corner-actions .upload-btn {
        min-width: 0;
    }

        .coach-corner-actions .upload-btn.secondary {
            background: #f8fafc;
            color: #475569;
            border: 1px solid rgba(15, 23, 42, 0.12);
            border-radius: 14px;
            font-weight: 750;
        }

            .coach-corner-actions .upload-btn.secondary:hover:not(:disabled) {
                background: rgba(15, 23, 42, 0.05);
                border-color: rgba(15, 23, 42, 0.18);
            }

.coach-corner-card:has(.coach-corner-preview) {
    border-color: rgba(16, 185, 129, 0.28);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055), inset 3px 0 0 rgba(16, 185, 129, 0.58);
}

.coach-corner-progress-actions {
    flex-wrap: wrap;
    padding: 10px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.84);
}

    .coach-corner-progress-actions .upload-btn {
        flex: 1 1 140px;
        font-weight: 800;
    }

    .coach-corner-progress-actions .upload-btn.primary {
        background: linear-gradient(180deg, #2563eb, #1d4ed8);
        border-color: #2563eb;
        color: #fff;
        box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
    }

    .coach-corner-progress-actions .upload-btn.secondary,
    .coach-corner-progress-actions .upload-btn:not(.primary) {
        background: #fff;
        border-color: rgba(37, 99, 235, 0.18);
        color: #334155;
}

/* =========================================================
   Proposal Card
   ========================================================= */

.proposal-card {
    margin: 14px auto 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.proposal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.02));
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.proposal-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    color: #1f2937;
}

.proposal-icon {
    font-size: 18px;
}

.proposal-card-meta {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    background: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.proposal-card-body {
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.proposal-card-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: #f9fafb;
}

.proposal-group {
    margin-bottom: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

    .proposal-group:last-child {
        margin-bottom: 0;
    }

.proposal-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #f9fafb;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

    .proposal-group-header:hover {
        background: #f3f4f6;
    }

.proposal-group-title {
    font-weight: 700;
    font-size: 14px;
    flex: 1;
}

.proposal-group-count {
    font-size: 12px;
    color: #6b7280;
    background: #fff;
    padding: 3px 8px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.proposal-group-content {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.proposal-task {
    display: flex;
    gap: 10px;
    padding: 12px;
    align-items: flex-start;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background-color 0.2s;
}

    .proposal-task:last-child {
        border-bottom: none;
    }

    .proposal-task:hover {
        background-color: rgba(59, 130, 246, 0.02);
    }

.proposal-task-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.proposal-task-cat {
    font-weight: 700;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.proposal-task-desc {
    font-size: 14px;
    color: #1f2937;
    line-height: 1.4;
}

.proposal-task-add {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid #3b82f6;
    background: #fff;
    color: #3b82f6;
    cursor: pointer;
    transition: all 0.2s;
}

    .proposal-task-add:hover:not(:disabled) {
        background: #3b82f6;
        color: #fff;
        transform: scale(1.05);
    }

    .proposal-task-add.is-added {
        background: #10b981;
        border-color: #10b981;
        color: #fff;
        opacity: 0.8;
        cursor: not-allowed;
    }

    .proposal-task-add:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.proposal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================================================
   Scope Action Helpers
   ========================================================= */

.room-info-data__scope-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 0 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.room-info-data__btn--danger-outline {
    background: transparent;
    color: #dc2626;
    border: 1px solid #dc2626;
}

    .room-info-data__btn--danger-outline:hover:not(:disabled) {
        background: #fef2f2;
        border-color: #b91c1c;
        color: #b91c1c;
    }

    .room-info-data__btn--danger-outline:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.room-info-data__confirm-warning {
    color: #dc2626;
    font-size: 13px;
    margin-top: 8px;
}

/* =========================================================
   Misc
   ========================================================= */

.coach-pill {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: #fff;
}

.coach-suggest {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.8;
}

.speechtext-containerWwu {
    display: contents;
}

/* =========================================================
   Theme / Token Overrides
   ========================================================= */

/* Global tokenized bubble + header/button overrides */
.bot-bubble {
    background: var(--bg-surface-2) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
    border-top-left-radius: var(--r-8) !important;
    display: inline-block;
    max-width: 92%;
    padding: 10px 12px;
    line-height: 1.35;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.user-bubble {
    background: var(--brand-primary) !important;
    color: #fff !important;
    border: 1px solid transparent !important;
    border-top-right-radius: var(--r-8) !important;
}

.room-coach-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border) !important;
}

.coach-btn--primary,
.coach-btn.primary {
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

    .coach-btn--primary:hover:not(:disabled),
    .coach-btn.primary:hover:not(:disabled) {
        background: var(--brand-primary-hover) !important;
        border-color: var(--brand-primary-hover) !important;
    }

/* z-panel specific skin */
.z-panel .room-coach {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.z-panel .room-coach-header {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.07), rgba(15, 23, 42, 0.02)) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-16) !important;
    padding: 10px 12px !important;
    cursor: pointer;
}

.z-panel .hdr-avatar {
    background: var(--text-primary) !important;
    border: 1px solid rgba(0,0,0,0.04) !important;
    color: #fff !important;
    font-weight: var(--fw-bold);
}

.z-panel .hdr-title {
    font-weight: var(--fw-bold) !important;
    color: var(--text-primary) !important;
    letter-spacing: -0.01em;
}

.z-panel .hdr-sub {
    color: var(--text-secondary) !important;
}

.z-panel .hdr-btn {
    background: rgba(255,255,255,0.80) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-pill) !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
}

    .z-panel .hdr-btn:hover:not(:disabled) {
        background: var(--bg-surface-2) !important;
    }

.z-panel .hdr-btn--help {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.z-panel .room-coach-body {
    padding: 10px 0 18px !important;
    scroll-padding-bottom: 112px;
}

.z-panel .chat-transcript {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 4px 8px 0 6px !important;
    overflow-anchor: none;
}

.z-panel .bot-msg {
    align-self: flex-start;
    max-width: 92%;
    min-width: 0;
    margin: 8px 0 10px 2px !important;
    overflow-anchor: none;
}

.z-panel .bot-meta {
    margin-bottom: 6px !important;
    color: var(--text-secondary) !important;
}

.z-panel .bot-bubble {
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-16) !important;
    border-top-left-radius: var(--r-8) !important;
    color: var(--text-primary) !important;
    padding: 9px 11px !important;
    box-shadow: none !important;
    position: relative;
    display: block;
    max-width: 100%;
    min-width: 0;
    line-height: 1.35;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    overflow-anchor: none;
    transition: background-color 120ms ease, border-color 120ms ease;
}

    .z-panel .bot-bubble::after {
        content: "";
        position: absolute;
        left: -6px;
        bottom: 10px;
        width: 10px;
        height: 10px;
        background: var(--bg-surface-2);
        border-left: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        transform: rotate(45deg);
        border-bottom-left-radius: 2px;
        opacity: 0.95;
    }

.z-panel .chat-transcript > .user-bubble {
    align-self: flex-end;
    max-width: 78%;
    text-align: left;
    margin-right: 10px;
}

.z-panel .user-bubble {
    display: inline-block;
    position: relative;
    background: var(--brand-primary) !important;
    color: #fff !important;
    border-radius: var(--r-16) !important;
    border-top-right-radius: var(--r-8) !important;
    padding: 9px 11px !important;
    box-shadow: none !important;
}

    .z-panel .user-bubble::after {
        content: "";
        position: absolute;
        right: -6px;
        bottom: 10px;
        width: 10px;
        height: 10px;
        background: var(--brand-primary);
        transform: rotate(45deg);
        border-bottom-right-radius: 2px;
        opacity: 0.95;
    }

.z-panel .coach-progress {
    border: 1px solid var(--border) !important;
    background: var(--bg-surface) !important;
    border-radius: var(--r-12) !important;
}

.z-panel .coach-workflow-card {
    background: linear-gradient(180deg, #fff 0%, var(--bg-surface-2) 100%) !important;
    border: 1px solid rgba(0, 102, 204, 0.14) !important;
    border-radius: var(--r-16) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05) !important;
}

.z-panel .room-coach-sticky-status {
    background: linear-gradient(180deg, var(--bg-surface-2) 0%, rgba(248, 250, 252, 0.92) 72%, rgba(248, 250, 252, 0)) !important;
}

.z-panel .coach-recommendations {
    background: linear-gradient(180deg, var(--bg-surface), var(--bg-surface-2)) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-16) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045) !important;
}

.z-panel .coach-recommendation-card {
    background: var(--bg-surface) !important;
    border-color: rgba(15, 23, 42, 0.09) !important;
}

.z-panel .coach-recommendation-card.is-info {
    background: linear-gradient(180deg, rgba(0, 102, 204, 0.06), var(--bg-surface) 78%) !important;
    border-color: rgba(0, 102, 204, 0.14) !important;
}

.z-panel .coach-recommendation-card.is-warning {
    background: linear-gradient(180deg, rgba(245,158,11,.10), var(--bg-surface) 76%) !important;
    border-color: rgba(245,158,11,.24) !important;
}

.z-panel .coach-recommendation-card.is-success {
    background: linear-gradient(180deg, rgba(16,185,129,.09), var(--bg-surface) 76%) !important;
    border-color: rgba(16,185,129,.20) !important;
}

.z-panel .coach-workflow-eyebrow,
.z-panel .coach-next-action-label,
.z-panel .coach-roomdata-cue,
.z-panel .coach-recommendations__eyebrow,
.z-panel .coach-recommendation-card__eyebrow {
    color: var(--text-muted) !important;
}

.z-panel .coach-workflow-title,
.z-panel .coach-next-action-text,
.z-panel .coach-recommendations__summary,
.z-panel .coach-recommendation-card__title {
    color: var(--text-primary) !important;
}

.z-panel .coach-workflow-helper,
.z-panel .coach-recommendations__collapsed-copy,
.z-panel .coach-recommendation-card__description {
    color: var(--text-secondary) !important;
}

.z-panel .coach-workflow-step,
.z-panel .coach-readiness-badge,
.z-panel .coach-next-action,
.z-panel .coach-roomdata-link,
.z-panel .coach-recommendations__count,
.z-panel .coach-recommendations__toggle,
.z-panel .coach-photo-status {
    background: var(--bg-surface) !important;
    border-color: rgba(15, 23, 42, 0.09) !important;
}

.z-panel .coach-photo-status__value {
    color: var(--text-primary) !important;
}

.z-panel .coach-photo-status__detail,
.z-panel .coach-photo-status__label {
    color: var(--text-secondary) !important;
}

.z-panel .coach-roomdata-status {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.18) !important;
}

.z-panel .coach-roomdata-status.is-info {
    background: rgba(0, 102, 204, 0.08) !important;
    border-color: rgba(0, 102, 204, 0.18) !important;
}

.z-panel .coach-roomdata-status.is-warning {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.24) !important;
}

.z-panel .coach-roomdata-status.is-error {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.22) !important;
}

.z-panel .coach-roomdata-actions {
    background: var(--bg-surface-2) !important;
    border-color: rgba(0, 102, 204, 0.10) !important;
}

.z-panel .coach-roomdata-link {
    background: #fff !important;
    border-color: rgba(0, 102, 204, 0.20) !important;
    color: var(--brand-primary) !important;
    box-shadow: 0 3px 10px rgba(0, 102, 204, 0.06) !important;
}

.z-panel .coach-roomdata-link:hover,
.z-panel .coach-roomdata-link:focus-visible {
    background: rgba(0, 102, 204, 0.08) !important;
    border-color: rgba(0, 102, 204, 0.36) !important;
    box-shadow: 0 7px 16px rgba(0, 102, 204, 0.12) !important;
}

.z-panel .coach-roomdata-link--attention {
    border-color: rgba(245, 158, 11, 0.36) !important;
    background: rgba(245, 158, 11, 0.10) !important;
    color: #92400e !important;
}

.z-panel .coach-actions--decision {
    background: linear-gradient(180deg, rgba(0, 102, 204, 0.08), var(--bg-surface) 88%) !important;
    border-color: rgba(0, 102, 204, 0.14) !important;
    border-radius: var(--r-16) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05) !important;
}

.z-panel .coach-btn.primary,
.z-panel .coach-btn--primary {
    background: linear-gradient(180deg, var(--brand-primary), var(--brand-primary-hover)) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
    border-radius: var(--r-12) !important;
    box-shadow: none !important;
}

    .z-panel .coach-btn.primary:hover:not(:disabled),
    .z-panel .coach-btn--primary:hover:not(:disabled) {
        background: var(--brand-primary-hover) !important;
        border-color: var(--brand-primary-hover) !important;
    }

.z-panel .coach-btn--choice {
    border-radius: var(--r-16) !important;
    box-shadow: 0 9px 20px rgba(15, 23, 42, 0.07) !important;
}

.z-panel .coach-btn--choice-primary {
    background: linear-gradient(180deg, var(--brand-primary), var(--brand-primary-hover)) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(0, 102, 204, 0.18) !important;
}

.z-panel .coach-btn--choice-secondary {
    background: #fff !important;
    border-color: rgba(0, 102, 204, 0.22) !important;
    color: var(--brand-primary) !important;
}

.z-panel .coach-btn.secondary {
    background: var(--bg-surface-2) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--r-12) !important;
    box-shadow: none !important;
}

.z-panel .coach-btn--tertiary {
    color: var(--text-secondary) !important;
    background: var(--bg-surface-2) !important;
    box-shadow: none !important;
}

.z-panel .coach-textarea {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-12) !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
}

    .z-panel .coach-textarea:focus {
        outline: none !important;
        box-shadow: var(--focus) !important;
        border-color: rgba(0, 102, 204, 0.35) !important;
    }

.z-panel .upload-card,
.z-panel .img-analysis-card {
    border: 1px solid var(--border) !important;
    box-shadow: none !important;
    border-radius: var(--r-16) !important;
    background: var(--bg-surface) !important;
}

.z-panel .coach-photo-upload-card {
    background: linear-gradient(180deg, var(--bg-surface), var(--bg-surface-2)) !important;
    border-color: rgba(0, 102, 204, 0.16) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045) !important;
}

.z-panel .coach-photo-upload-card .upload-sub,
.z-panel .photo-source-option__hint {
    color: var(--text-secondary) !important;
}

.z-panel .photo-source-option--primary {
    background: linear-gradient(180deg, var(--brand-primary), var(--brand-primary-hover)) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}

.z-panel .photo-source-option--drop-target.is-drag-over {
    border-color: rgba(255, 255, 255, 0.78) !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.16), 0 12px 24px rgba(0, 102, 204, 0.18) !important;
    filter: saturate(1.04);
}

.z-panel .photo-source-option--primary .photo-source-option__hint {
    color: rgba(255, 255, 255, 0.86) !important;
}

.z-panel .photo-source-option--secondary {
    background: #fff !important;
    border-color: rgba(0, 102, 204, 0.20) !important;
    color: var(--brand-primary) !important;
}

.z-panel .photo-source-option__count {
    background: rgba(0, 102, 204, 0.10) !important;
    color: var(--brand-primary) !important;
}

.z-panel .coach-corner-progress-card,
.z-panel .coach-corner-card,
.z-panel .coach-corner-progress-actions,
.z-panel .coach-corner-thumb-card {
    background: linear-gradient(180deg, var(--bg-surface), var(--bg-surface-2)) !important;
    border-color: rgba(0, 102, 204, 0.16) !important;
}

.z-panel .coach-corner-progress-title,
.z-panel .coach-corner-title,
.z-panel .coach-corner-thumb-label {
    color: var(--text-primary) !important;
}

.z-panel .coach-corner-progress-helper,
.z-panel .coach-corner-helper,
.z-panel .coach-corner-eyebrow,
.z-panel .coach-corner-placeholder small {
    color: var(--text-secondary) !important;
}

.z-panel .coach-corner-placeholder {
    background: rgba(0, 102, 204, 0.055) !important;
    border-color: rgba(0, 102, 204, 0.22) !important;
}

.z-panel .coach-corner-progress-count,
.z-panel .coach-corner-progress-dot.is-current {
    color: var(--brand-primary) !important;
    border-color: rgba(0, 102, 204, 0.24) !important;
}

.z-panel .coach-quantity-item {
    background: var(--bg-surface) !important;
    border-color: var(--border) !important;
}

.z-panel .coach-quantity-item.is-complete {
    background: var(--bg-surface-2) !important;
}

.z-panel .coach-quantity-guidance,
.z-panel .coach-quantity-example,
.z-panel .coach-continue-label {
    color: var(--text-secondary) !important;
}

.z-panel .coach-continue-conversation {
    background: var(--bg-surface-2) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-16) !important;
}

.z-panel .coach-continue-hint {
    color: var(--text-muted) !important;
}

.z-panel .coach-quantity-unit {
    background: var(--bg-surface-2) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 768px) {
    .room-coach {
        position: relative;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .room-coach-body {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 700px) {
    .coach-corner-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .coach-corner-progress-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .coach-corner-progress-status {
        justify-items: start;
    }

    .coach-corner-summary {
        gap: 7px;
    }

    .coach-corner-thumb-card {
        width: calc(50% - 4px);
        min-width: 118px;
    }

    .coach-corner-card {
        min-height: 200px;
    }

    .coach-corner-preview,
    .coach-corner-placeholder {
        height: 128px;
        min-height: 128px;
    }

    .coach-corner-progress-actions .upload-btn {
        flex-basis: 100%;
    }
}

@media (max-width: 640px) {
    .room-coach-header {
        align-items: flex-start;
        gap: 10px;
    }

    .hdr-right {
        gap: 6px;
    }

    .hdr-sub {
        max-width: 220px;
    }

    .coach-workflow-topline {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .coach-readiness-badge {
        align-self: flex-start;
    }

    .coach-workflow-step {
        font-size: 10.5px;
        padding: 3px 6px;
    }

    .coach-measurement-options {
        gap: 8px;
    }

    .measurement-btn {
        width: 100%;
    }

    .coach-text-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .coach-text-actions--with-guide {
        grid-template-columns: 1fr;
    }

        .coach-text-actions .coach-btn--mic,
        .coach-text-actions .coach-btn--primary,
        .coach-text-actions .coach-btn--guide-inline {
            width: 100%;
        }

    .coach-photo-upload-card {
        padding: 12px;
    }

    .photo-source-options {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .photo-source-option {
        min-height: 66px;
    }

    .coach-photo-upload-card .upload-actions {
        flex-wrap: wrap;
    }

        .coach-photo-upload-card .upload-actions .upload-btn {
            flex: 1 1 140px;
        }

    .proposal-card-body {
        max-height: 300px;
    }

    .proposal-task {
        flex-direction: column;
        align-items: stretch;
    }

    .proposal-task-add {
        width: 100%;
    }

    .coach-quantity-item-header {
        flex-direction: column;
    }

    .coach-quantity-unit {
        align-self: flex-start;
    }

    .coach-quantity-input-row {
        grid-template-columns: 1fr;
    }

    .coach-quantity-save,
    .coach-quantity-default {
        width: 100%;
    }

    .coach-unmatched-clarifications__header,
    .coach-unmatched-card {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .coach-unmatched-clarifications__count {
        align-self: flex-start;
    }

    .coach-unmatched-card__actions {
        justify-content: flex-start;
    }
}

@media (min-width: 641px) {
    .coach-measurement-options {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .measurement-btn {
        flex: 1;
        min-width: 140px;
    }
}

@media (max-width: 520px) {
    .room-coach {
        border-radius: 12px;
        bottom: 10px;
    }

    .coach-actions {
        gap: 8px;
    }

    .coach-btn {
        width: 100%;
        text-align: center;
    }

    .hdr-btn:not(.hdr-btn--help) {
        max-width: 86px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .bot-bubble,
    .user-bubble {
        max-width: 100%;
    }
}


/* =========================================================
   Animations
   ========================================================= */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =========================================================
   Guided Scope Guide Me
   ========================================================= */

.coach-guide-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    margin: 0 0 12px;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    background: #f8fafc;
}

.coach-guide-card__title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.25;
}

.coach-guide-card__text {
    margin-top: 2px;
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.3;
}

.coach-guide-card__button {
    flex: 0 0 auto;
}

.coach-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(15, 23, 42, 0.42);
    overflow: hidden;
}

.coach-guide-dialog {
    width: min(860px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.coach-guide-header,
.coach-guide-footer {
    flex: 0 0 auto;
    padding: 14px 16px;
    background: #ffffff;
}

.coach-guide-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.coach-guide-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.coach-guide-header h3 {
    margin: 3px 0 0;
    font-size: 1.05rem;
    line-height: 1.2;
    color: #0f172a;
}

.coach-guide-header p {
    margin: 4px 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #64748b;
}

.coach-guide-close {
    width: 28px;
    height: 28px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.coach-guide-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 16px;
    background: #f8fafc;
}

.coach-guide-progress-bar {
    flex: 0 0 auto;
    height: 4px;
    background: #e2e8f0;
    overflow: hidden;
}

.coach-guide-progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    transition: width 0.18s ease;
}

.coach-guide-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #e2e8f0;
}

.coach-guide-alert,
.coach-guide-empty,
.coach-guide-loading {
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.82rem;
    line-height: 1.35;
}

.coach-guide-alert {
    margin-bottom: 12px;
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.coach-guide-alert.is-info {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
}

.coach-guide-confirm {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    background: #fff7ed;
    color: #7c2d12;
}

.coach-guide-confirm__title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #7c2d12;
}

.coach-guide-confirm__text {
    font-size: 0.78rem;
    line-height: 1.35;
}

.coach-guide-confirm__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.coach-guide-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coach-guide-empty__title {
    font-weight: 700;
    color: #1f2937;
}

.coach-guide-empty__text {
    margin-top: 3px;
    color: #64748b;
    font-size: 0.76rem;
}

.coach-guide-picker,
.coach-guide-options,
.coach-guide-review {
    display: grid;
    gap: 10px;
}

.coach-guide-option,
.coach-guide-answer {
    width: 100%;
    text-align: left;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    background: #ffffff;
    padding: 10px 12px;
    color: #1f2937;
    cursor: pointer;
}

.coach-guide-option:hover,
.coach-guide-answer:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.coach-guide-answer.is-selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px #2563eb;
}

.coach-guide-check {
    display: inline-flex;
    align-items: center;
    width: auto;
    margin-right: 6px;
    padding: 1px 5px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.coach-guide-option__title,
.coach-guide-answer span {
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.25;
}

.coach-guide-option__description,
.coach-guide-answer small {
    display: block;
    margin-top: 3px;
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.3;
}

.coach-guide-option__meta {
    display: inline-flex;
    margin-top: 7px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 700;
}

.coach-guide-progress {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.coach-guide-question {
    margin-bottom: 12px;
}

.coach-guide-question h4,
.coach-guide-review__heading {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.25;
}

.coach-guide-question p,
.coach-guide-review__sub {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.35;
}

.coach-guide-why {
    margin-top: 8px;
    padding: 8px 10px;
    border-left: 3px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #334155;
    font-size: 0.76rem;
    line-height: 1.35;
}

.coach-guide-followup-note,
.coach-guide-apply-note {
    padding: 8px 10px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.76rem;
    line-height: 1.35;
}

.coach-guide-followup-note {
    margin-bottom: 10px;
}

.coach-guide-apply-note {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

.coach-guide-review-section {
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.coach-guide-review-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    list-style: none;
}

.coach-guide-review-section summary::-webkit-details-marker {
    display: none;
}

.coach-guide-review-section summary span {
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.68rem;
    text-align: center;
}

.coach-guide-review-section h4 {
    margin: 0 0 8px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
}

.coach-guide-result {
    display: grid;
    gap: 2px;
    padding: 8px 0;
    border-top: 1px solid #edf2f7;
    color: #334155;
    font-size: 0.8rem;
    line-height: 1.3;
}

.coach-guide-result:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.coach-guide-result strong {
    color: #0f172a;
    font-size: 0.84rem;
}

.coach-guide-result small {
    color: #64748b;
    font-size: 0.72rem;
}

.coach-guide-result.is-warning {
    color: #92400e;
}

.coach-guide-result.is-review {
    color: #7c2d12;
}

.coach-guide-result.is-muted {
    color: #64748b;
}

.coach-guide-result.is-added {
    color: #047857;
}

.coach-guide-result.is-skipped {
    color: #92400e;
}

.coach-guide-result.is-failed {
    color: #991b1b;
}

.coach-guide-apply-summary {
    border-color: rgba(34, 197, 94, 0.24);
    background: #fbfefc;
}

.coach-guide-complete {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid rgba(34, 197, 94, 0.24);
    border-radius: 14px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    color: #065f46;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.08);
}

.coach-guide-complete strong {
    font-size: 0.92rem;
    line-height: 1.2;
}

.coach-guide-complete span {
    font-size: 0.78rem;
    line-height: 1.35;
    color: #047857;
}

.coach-guide-apply-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0 2px;
}

.coach-guide-apply-stats span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 700;
}

.coach-guide-apply-stats .is-added {
    color: #047857;
    background: #d1fae5;
}

.coach-guide-apply-stats .is-skipped {
    color: #92400e;
    background: #fef3c7;
}

.coach-guide-apply-stats .is-failed {
    color: #991b1b;
    background: #fee2e2;
}

.coach-guide-template-preview {
    display: grid;
    gap: 4px;
    padding: 8px 0;
    border-top: 1px solid #edf2f7;
}

.coach-guide-template-preview:first-of-type {
    border-top: 0;
}

.coach-guide-template-preview > strong {
    color: #0f172a;
    font-size: 0.84rem;
    line-height: 1.25;
}

.coach-guide-template-preview > span {
    color: #64748b;
    font-size: 0.72rem;
}

.coach-guide-template-item {
    display: grid;
    gap: 1px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.78rem;
    line-height: 1.25;
}

.coach-guide-template-item small {
    color: #64748b;
    font-size: 0.7rem;
    line-height: 1.25;
}

/* Homeowner-facing Guide Me polish */
.coach-guide-overlay {
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(3px);
}

.coach-guide-dialog {
    width: min(900px, calc(100vw - 24px));
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.32);
}

.coach-guide-header {
    position: relative;
    padding: 20px 22px 18px;
    border-bottom: 0;
    background:
        radial-gradient(circle at 88% 14%, rgba(14, 165, 233, 0.18), transparent 28%),
        linear-gradient(135deg, #eef7ff 0%, #f7fbff 48%, #fff7ed 100%);
}

.coach-guide-header::after {
    content: "";
    position: absolute;
    inset: auto 22px 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(14, 165, 233, 0.28), rgba(249, 115, 22, 0.12));
}

.coach-guide-header__copy {
    min-width: 0;
}

.coach-guide-eyebrow {
    color: #2563eb;
    font-size: 0.7rem;
    letter-spacing: 0.11em;
}

.coach-guide-header h3 {
    margin-top: 5px;
    color: #0f172a;
    font-size: clamp(1.18rem, 1.8vw, 1.46rem);
    font-weight: 850;
    letter-spacing: -0.015em;
}

.coach-guide-header p {
    max-width: 620px;
    margin-top: 6px;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.45;
}

.coach-guide-header__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.coach-guide-header__chips span,
.coach-guide-section-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.1;
}

.coach-guide-close {
    width: 34px;
    height: 34px;
    border-color: rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.coach-guide-close:hover {
    background: #ffffff;
    color: #1d4ed8;
}

.coach-guide-body {
    padding: 18px 20px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 38%, #f8fafc 100%);
}

.coach-guide-progress-bar {
    height: 8px;
    padding: 2px 22px;
    background: #ffffff;
}

.coach-guide-progress-bar span {
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #0ea5e9, #38bdf8);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.05), 0 4px 12px rgba(37, 99, 235, 0.24);
}

.coach-guide-progress {
    align-items: center;
    margin-bottom: 12px;
    color: #2563eb;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
}

.coach-guide-question {
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid rgba(37, 99, 235, 0.11);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.coach-guide-question__label {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coach-guide-question h4,
.coach-guide-review__heading,
.coach-guide-picker-intro h4 {
    color: #0f172a;
    font-size: clamp(1.08rem, 1.6vw, 1.28rem);
    font-weight: 820;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.coach-guide-question p,
.coach-guide-review__sub,
.coach-guide-picker-intro p {
    color: #536579;
    font-size: 0.86rem;
    line-height: 1.45;
}

.coach-guide-why {
    display: grid;
    gap: 3px;
    margin-top: 12px;
    padding: 11px 12px;
    border: 1px solid rgba(14, 165, 233, 0.16);
    border-left: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, #eff6ff, #f8fbff);
    color: #334155;
}

.coach-guide-why strong {
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 850;
}

.coach-guide-why span {
    font-size: 0.8rem;
    line-height: 1.42;
}

.coach-guide-options,
.coach-guide-picker {
    gap: 11px;
}

.coach-guide-picker-intro {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
}

.coach-guide-option,
.coach-guide-answer {
    position: relative;
    padding: 13px 14px;
    border-color: rgba(148, 163, 184, 0.34);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.coach-guide-option:hover,
.coach-guide-answer:hover {
    border-color: rgba(37, 99, 235, 0.42);
    background: #f8fbff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.coach-guide-answer.is-selected {
    border-color: #2563eb;
    background: linear-gradient(180deg, #eff6ff, #f8fbff);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.86), 0 12px 28px rgba(37, 99, 235, 0.12);
}

.coach-guide-option__title,
.coach-guide-answer span {
    color: #102033;
    font-size: 0.92rem;
    font-weight: 780;
    line-height: 1.28;
}

.coach-guide-option__description,
.coach-guide-answer small {
    margin-top: 5px;
    color: #64748b;
    font-size: 0.79rem;
    line-height: 1.38;
}

.coach-guide-check {
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    padding: 0;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.78rem;
}

.coach-guide-option__meta,
.coach-guide-option__start {
    display: inline-flex;
    align-items: center;
    margin-top: 9px;
    margin-right: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
}

.coach-guide-option__meta {
    background: #eff6ff;
    color: #1d4ed8;
}

.coach-guide-option__start {
    background: #ecfeff;
    color: #0e7490;
}

.coach-guide-followup-note,
.coach-guide-apply-note {
    border-color: rgba(37, 99, 235, 0.14);
    border-radius: 14px;
    background: #f0f9ff;
    color: #075985;
}

.coach-guide-review {
    gap: 12px;
}

.coach-guide-review-section {
    border-color: rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.coach-guide-review-section summary {
    color: #102033;
    font-size: 0.84rem;
}

.coach-guide-review-section summary span {
    background: #eff6ff;
    color: #1d4ed8;
}

.coach-guide-result,
.coach-guide-template-preview {
    border-top-color: #eef2f7;
}

.coach-guide-template-item {
    border: 1px solid #e8eef6;
    background: #fbfdff;
}

.coach-guide-footer {
    padding: 13px 16px;
    border-top-color: rgba(148, 163, 184, 0.22);
    background: #ffffff;
}

.coach-guide-footer-link {
    margin-right: auto;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

.coach-guide-footer-link:hover:not(:disabled) {
    color: #1d4ed8;
    text-decoration: underline;
}

.coach-guide-footer-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.coach-guide-footer .coach-btn {
    min-height: 36px;
    border-radius: 999px;
    padding: 8px 14px;
}

.coach-guide-next::after {
    content: "→";
    margin-left: 2px;
}

.coach-guide-options-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 2px 0 9px;
    color: #1d4ed8;
}

.coach-guide-options-header span {
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.01em;
}

.coach-guide-options-header small {
    color: #64748b;
    font-size: 0.74rem;
    line-height: 1.25;
}

.coach-guide-answer {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 14px 16px;
    border: 2px solid rgba(37, 99, 235, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
    cursor: pointer;
}

.coach-guide-answer::after {
    content: "Select";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    padding: 3px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.68rem;
    font-weight: 850;
    opacity: 0;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.coach-guide-answer:hover::after,
.coach-guide-answer:focus-visible::after {
    opacity: 1;
    transform: translateY(-50%) translateX(-2px);
}

.coach-guide-answer:hover {
    border-color: rgba(37, 99, 235, 0.62);
    background: linear-gradient(180deg, #ffffff, #eff6ff);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.17);
    transform: translateY(-2px);
}

.coach-guide-answer:focus-visible {
    outline: 4px solid rgba(37, 99, 235, 0.22);
    outline-offset: 3px;
    border-color: #2563eb;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.16);
}

.coach-guide-answer.is-selected {
    border-color: #1d4ed8;
    background:
        radial-gradient(circle at 96% 20%, rgba(14, 165, 233, 0.2), transparent 30%),
        linear-gradient(180deg, #eff6ff, #ffffff);
    box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.66), 0 16px 36px rgba(37, 99, 235, 0.2);
}

.coach-guide-answer.is-selected::after {
    content: "Selected";
    opacity: 1;
    background: #dbeafe;
    color: #1d4ed8;
}

.coach-guide-answer__indicator {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid #93c5fd;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: inset 0 0 0 4px #ffffff;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.coach-guide-answer:hover .coach-guide-answer__indicator,
.coach-guide-answer:focus-visible .coach-guide-answer__indicator {
    border-color: #2563eb;
}

.coach-guide-answer.is-selected .coach-guide-answer__indicator {
    border-color: #1d4ed8;
    background: #1d4ed8;
    box-shadow: inset 0 0 0 5px #ffffff, 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.coach-guide-answer__content,
.coach-guide-answer__title {
    display: block;
    min-width: 0;
}

.coach-guide-answer__title {
    padding-right: 72px;
    color: #0f172a;
    font-size: 0.96rem;
    font-weight: 820;
    line-height: 1.25;
}

.coach-guide-answer__content small {
    display: block;
    max-width: 92%;
    margin-top: 5px;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.38;
}

.coach-guide-question {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

@media (max-width: 640px) {
    .coach-guide-card {
        align-items: stretch;
        flex-direction: column;
    }

    .coach-guide-footer {
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .coach-guide-footer .coach-btn {
        flex: 1 1 auto;
    }

    .coach-guide-options-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .coach-guide-answer {
        grid-template-columns: 26px minmax(0, 1fr);
        gap: 10px;
        padding: 13px 12px;
    }

    .coach-guide-answer::after {
        position: static;
        justify-self: flex-start;
        grid-column: 2;
        transform: none;
        opacity: 1;
        margin-top: 3px;
    }

    .coach-guide-answer:hover::after,
    .coach-guide-answer:focus-visible::after {
        transform: none;
    }

    .coach-guide-answer__title {
        padding-right: 0;
    }
}

/* =========================================================
   ScopeBuilder Theme Rollout: Room Coach
   Uses shared sb-* primitives without replacing behavior classes.
   ========================================================= */

.room-coach.sb-card {
    background: var(--sb-card-bg) !important;
    border: 1px solid var(--sb-card-border) !important;
    border-radius: var(--sb-radius) !important;
    box-shadow: var(--sb-shadow) !important;
    color: var(--sb-text);
}

.z-panel .room-coach.sb-card {
    margin: 0 !important;
    background: var(--sb-card-bg) !important;
    border: 1px solid var(--sb-card-border) !important;
    border-radius: var(--sb-radius) !important;
    box-shadow: var(--sb-shadow) !important;
}

.room-coach.sb-card .room-coach-header.sb-gradient-header,
.z-panel .room-coach.sb-card .room-coach-header.sb-gradient-header {
    min-height: var(--room-coach-header-height);
    background: linear-gradient(135deg, var(--sb-blue-start) 0%, var(--sb-blue-end) 100%) !important;
    border: 0 !important;
    border-radius: calc(var(--sb-radius) - 1px) calc(var(--sb-radius) - 1px) 0 0 !important;
    color: #ffffff !important;
    padding: 12px 14px !important;
}

.room-coach.sb-card .hdr-avatar,
.z-panel .room-coach.sb-card .hdr-avatar {
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.34) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.room-coach.sb-card .hdr-title,
.room-coach.sb-card .hdr-title.sb-card-title,
.z-panel .room-coach.sb-card .hdr-title,
.z-panel .room-coach.sb-card .hdr-title.sb-card-title {
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 800 !important;
    letter-spacing: 0;
}

.room-coach.sb-card .hdr-sub,
.room-coach.sb-card .hdr-sub.sb-card-subtitle,
.z-panel .room-coach.sb-card .hdr-sub,
.z-panel .room-coach.sb-card .hdr-sub.sb-card-subtitle {
    color: rgba(255, 255, 255, 0.84) !important;
    font-size: 12px;
    font-weight: 600;
}

.room-coach.sb-card .room-coach-header .chev,
.z-panel .room-coach.sb-card .room-coach-header .chev {
    color: rgba(255, 255, 255, 0.88);
    opacity: 1;
}

.room-coach.sb-card .hdr-btn.sb-action-btn,
.z-panel .room-coach.sb-card .hdr-btn.sb-action-btn {
    min-height: 30px;
    border-radius: var(--sb-radius) !important;
    border-color: rgba(255, 255, 255, 0.42) !important;
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    font-size: 12px;
    font-weight: 700;
}

.room-coach.sb-card .hdr-btn.sb-action-btn:hover:not(:disabled),
.z-panel .room-coach.sb-card .hdr-btn.sb-action-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.24) !important;
    border-color: rgba(255, 255, 255, 0.62) !important;
}

.room-coach.sb-card .hdr-btn--help,
.z-panel .room-coach.sb-card .hdr-btn--help {
    width: 32px;
    height: 32px;
}

.room-coach.sb-card .room-coach-body.sb-card-body,
.z-panel .room-coach.sb-card .room-coach-body.sb-card-body {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    padding: 14px !important;
}

.z-panel .room-coach.sb-card .chat-transcript {
    padding: 4px 0 0 !important;
}

.room-coach.sb-card .bot-bubble,
.z-panel .room-coach.sb-card .bot-bubble,
.room-coach.sb-card .coach-workflow-card,
.z-panel .room-coach.sb-card .coach-workflow-card,
.room-coach.sb-card .coach-recommendations,
.z-panel .room-coach.sb-card .coach-recommendations,
.room-coach.sb-card .coach-guide-card,
.z-panel .room-coach.sb-card .coach-guide-card,
.room-coach.sb-card .coach-transcription-toggle,
.z-panel .room-coach.sb-card .coach-transcription-toggle {
    background: #ffffff !important;
    border-color: var(--sb-card-border) !important;
    border-radius: var(--sb-radius) !important;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.05) !important;
}

.room-coach.sb-card .coach-roomdata-actions,
.z-panel .room-coach.sb-card .coach-roomdata-actions,
.room-coach.sb-card .coach-actions--decision,
.z-panel .room-coach.sb-card .coach-actions--decision,
.room-coach.sb-card .coach-continue-conversation,
.z-panel .room-coach.sb-card .coach-continue-conversation {
    background: #f8fbff !important;
    border-color: var(--sb-card-border) !important;
    border-radius: var(--sb-radius) !important;
    box-shadow: none !important;
}

.room-coach.sb-card .coach-btn,
.z-panel .room-coach.sb-card .coach-btn,
.room-coach.sb-card .upload-btn,
.z-panel .room-coach.sb-card .upload-btn {
    min-height: 30px;
    border-radius: var(--sb-radius) !important;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-shadow: none !important;
}

.room-coach.sb-card .coach-btn.primary,
.room-coach.sb-card .coach-btn--primary,
.room-coach.sb-card .coach-btn--choice-primary,
.z-panel .room-coach.sb-card .coach-btn.primary,
.z-panel .room-coach.sb-card .coach-btn--primary,
.z-panel .room-coach.sb-card .coach-btn--choice-primary {
    background: var(--sb-navy) !important;
    border-color: var(--sb-navy) !important;
    color: #ffffff !important;
}

.room-coach.sb-card .coach-btn.primary:hover:not(:disabled),
.room-coach.sb-card .coach-btn--primary:hover:not(:disabled),
.room-coach.sb-card .coach-btn--choice-primary:hover:not(:disabled),
.z-panel .room-coach.sb-card .coach-btn.primary:hover:not(:disabled),
.z-panel .room-coach.sb-card .coach-btn--primary:hover:not(:disabled),
.z-panel .room-coach.sb-card .coach-btn--choice-primary:hover:not(:disabled) {
    background: #0b1f49 !important;
    border-color: #0b1f49 !important;
}

.room-coach.sb-card .coach-btn.secondary,
.room-coach.sb-card .coach-btn--choice-secondary,
.room-coach.sb-card .coach-btn--tertiary,
.room-coach.sb-card .coach-btn--guide-inline,
.z-panel .room-coach.sb-card .coach-btn.secondary,
.z-panel .room-coach.sb-card .coach-btn--choice-secondary,
.z-panel .room-coach.sb-card .coach-btn--tertiary,
.z-panel .room-coach.sb-card .coach-btn--guide-inline {
    background: #ffffff !important;
    border-color: rgba(30, 58, 138, 0.30) !important;
    color: var(--sb-navy) !important;
}

.room-coach.sb-card .measurement-btn,
.z-panel .room-coach.sb-card .measurement-btn {
    min-height: 34px;
}

@media (max-width: 640px) {
    .room-coach.sb-card .room-coach-header.sb-gradient-header {
        align-items: flex-start;
    }

    .room-coach.sb-card .hdr-left {
        flex: 1 1 190px;
    }

    .room-coach.sb-card .hdr-right {
        justify-content: flex-start;
    }
}
