:root {
    --fr-cream: #f7f1e7;
    --fr-champagne: #ead8bc;
    --fr-gold: #c7a36a;
    --fr-bronze: #8c6a4f;
    --fr-bronze-strong: #6e503d;
    --fr-taupe: #5f4b3f;
    --fr-white: #ffffff;
    --fr-shadow: rgba(95, 75, 63, 0.24);
}

body {
    position: relative;
    z-index: 0;
    margin: 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(247, 241, 231, 0.24) 0%, rgba(247, 241, 231, 0.08) 26%, rgba(255, 255, 255, 0.02) 64%, rgba(95, 75, 63, 0.12) 100%),
        radial-gradient(circle at center, rgba(255, 248, 238, 0.52) 0%, rgba(255, 248, 238, 0.18) 32%, rgba(255, 255, 255, 0) 60%),
        url('background.png') center/cover no-repeat;
    filter: saturate(0.94) brightness(0.98);
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(247, 241, 231, 0.14) 0%, rgba(247, 241, 231, 0) 24%, rgba(247, 241, 231, 0) 76%, rgba(247, 241, 231, 0.1) 100%);
    z-index: -1;
    pointer-events: none;
}

.site-header {
    position: absolute;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
}

.brand-shell {
    display: flex;
    align-items: center;
    width: fit-content;
    max-width: calc(100vw - 56px);
    padding: 20px 26px 18px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(255, 252, 247, 0.92) 0%, rgba(250, 245, 237, 0.82) 100%);
    border: 1px solid rgba(199, 163, 106, 0.22);
    box-shadow: 0 14px 34px rgba(95, 75, 63, 0.12);
    backdrop-filter: blur(14px);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--fr-taupe);
}

.brand-eyebrow {
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(95, 75, 63, 0.84);
}

.brand-copy strong {
    font-size: 34px;
    line-height: 0.92;
    color: var(--fr-bronze-strong);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
}

#send-btn {
    background: linear-gradient(135deg, var(--fr-bronze) 0%, var(--fr-gold) 100%);
    color: var(--fr-white);
    box-shadow: 0 10px 24px rgba(140, 106, 79, 0.28);
}

#send-btn:hover {
    background: linear-gradient(135deg, var(--fr-bronze-strong) 0%, #b99258 100%);
}

.icon-btn {
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.96) 0%, rgba(243, 228, 203, 0.98) 100%);
    border: 1px solid rgba(140, 106, 79, 0.2);
    border-radius: 16px;
    width: 52px;
    height: 52px;
    font-size: 22px;
    color: var(--fr-bronze-strong);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 28px rgba(95, 75, 63, 0.14);
}

.icon-btn:hover {
    background: linear-gradient(180deg, rgba(255, 252, 246, 1) 0%, rgba(232, 207, 170, 0.98) 100%);
    color: var(--fr-taupe);
}

.icon-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    box-shadow: none;
    filter: grayscale(0.15);
    pointer-events: none;
}

.icon-btn.grande {
    width: 100%;
    min-width: 0;
    min-height: 72px;
    padding: 12px 14px;
    border-radius: 22px;
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    justify-content: start;
    gap: 10px;
    text-align: left;
    box-sizing: border-box;
}

.icon-btn.grande i {
    font-size: 1.7rem;
    width: 38px;
    text-align: center;
}

.icon-btn.grande p {
    margin: 0;
    font-size: 13px;
    line-height: 1.08;
    letter-spacing: 0.01em;
    text-align: left;
}

.control-card {
    padding: 16px 14px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.95) 0%, rgba(246, 236, 220, 0.93) 100%);
    border: 1px solid rgba(140, 106, 79, 0.16);
    box-shadow: 0 14px 30px rgba(95, 75, 63, 0.11);
    backdrop-filter: blur(12px);
    color: var(--fr-taupe);
}

.control-card label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.control-card select {
    width: 100%;
    border: 1px solid rgba(140, 106, 79, 0.22);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--fr-bronze-strong);
    font-size: 14px;
    outline: none;
    margin-bottom: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.check-row {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-bottom: 0 !important;
    font-size: 12px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(140, 106, 79, 0.1);
}

.check-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--fr-bronze);
    margin: 0;
}

.check-row span {
    font-weight: 600;
}

.sidebar {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
    width: 172px;
    z-index: 10;
}

.chat-footer {
    bottom: calc(13vh + 18px);
    background: rgba(255, 252, 248, 0.86);
    border: 1px solid rgba(199, 163, 106, 0.28);
    box-shadow: 0 18px 45px rgba(95, 75, 63, 0.16);
}

#chat-input {
    color: var(--fr-taupe);
}

#chat-input::placeholder {
    color: rgba(95, 75, 63, 0.58);
}

.floating-info {
    background: rgb(18 20 28 / 83%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(140, 106, 79, 0.2);
    box-shadow: 0 10px 30px rgba(95, 75, 63, 0.22);
    max-width: 700px;
    z-index: 10020;
}

.floating-info .info-title {
    background: linear-gradient(135deg, var(--fr-bronze-strong) 0%, var(--fr-bronze) 100%);
}

.info-bar {
    height: 11vh;
    min-height: 92px;
    background: linear-gradient(90deg, rgba(110, 80, 61, 0.96) 0%, rgba(140, 106, 79, 0.95) 52%, rgba(199, 163, 106, 0.92) 100%);
    color: var(--fr-white);
    box-shadow: 0 -10px 26px rgba(95, 75, 63, 0.18);
}

.info-bar .info-content {
    max-width: 1280px;
}

.info-row {
    width: 100%;
    gap: 18px;
    justify-content: center;
    align-items: center;
}

.promo-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

#info-text {
    display: block;
    max-width: 980px;
    font-size: 26px;
    line-height: 1.12;
    font-weight: 500;
    text-wrap: balance;
}

#debug-camera {
    position: absolute;
    display: none;
    bottom: 0;
    left: 10px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.5);
    color: #0f0;
    font-family: monospace;
    font-size: 14px;
    z-index: 9999;
}



.voice-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.voice-modal[hidden],
.voice-timer[hidden] {
    display: none;
}

.voice-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 22, 17, 0.68);
    backdrop-filter: blur(5px);
}

.voice-modal-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: min(390px, 100%);
    padding: 32px 26px;
    border: 1px solid rgba(112, 224, 142, 0.48);
    border-radius: 12px;
    background: rgba(18, 31, 23, 0.98);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    color: #f4fff6;
    text-align: center;
}

.voice-modal-card h2 {
    margin: 4px 0 0;
    font-size: 22px;
    line-height: 1.25;
}

.voice-modal-card p {
    margin: 0;
    color: rgba(232, 247, 235, 0.78);
    font-size: 14px;
    line-height: 1.5;
}

.voice-modal-spinner {
    width: 46px;
    height: 46px;
    border: 4px solid rgba(112, 224, 142, 0.22);
    border-top-color: #62f28e;
    border-radius: 50%;
    animation: voice-feedback-spin 0.8s linear infinite;
}

.voice-timer {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 20001;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid rgba(98, 242, 142, 0.72);
    border-radius: 7px;
    background: rgba(7, 18, 11, 0.96);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    color: #8bffad;
    font-size: 13px;
}

#voice-elapsed {
    padding-left: 8px;
    border-left: 1px solid rgba(98, 242, 142, 0.48);
    font-variant-numeric: tabular-nums;
    font-size: 17px;
    font-weight: 800;
    color: #62f28e;
}

@keyframes voice-feedback-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .site-header {
        top: 14px;
        left: 14px;
        right: 14px;
        transform: none;
    }

    .brand-shell {
        width: calc(100vw - 28px);
        padding: 14px 16px;
        box-sizing: border-box;
    }

    .brand-copy strong {
        font-size: 26px;
    }

    .chat-footer {
        width: calc(100vw - 32px);
        bottom: calc(13vh + 50px);
    }

    .control-card {
        width: 100%;
        box-sizing: border-box;
    }

    .sidebar {
        width: 175px;
        right: -6px;
        transform: scale(.9);
        top: 100px;
    }

    .toast-container {
        top: 12px;
        left: 14px;
        right: 14px;
        max-width: calc(100vw - 28px);
    }

    .info-bar {
        height: auto;
        min-height: 104px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .info-row {
        flex-direction: column;
        gap: 8px;
    }

    #info-text {
        max-width: none;
        font-size: 18px;
    }

    .promo-tag {
        min-width: 0;
        font-size: 11px;
    }

    .voice-timer {
        right: 10px;
        bottom: 10px;
        min-height: 40px;
        padding: 8px 11px;
        font-size: 12px;
    }

    .voice-modal-card {
        padding: 28px 20px;
    }

    .voice-modal-card h2 {
        font-size: 20px;
    }

    html {
            width: max-content;
    }
}
