:root {
    --wc-olive: #6B705C;
    --wc-olive-dark: #4F5544;
    --wc-ivory: #F7F6F0;
    --wc-ivory-dark: #E9E4D8;
    --wc-strelitzia: #F48C3A;
    --wc-text: #1F1F1F;
    --wc-muted: #6D6D6D;
    --wc-white: #FFFFFF;
    --wc-border: rgba(107, 112, 92, 0.22);
    --wc-shadow: 0 24px 60px rgba(31, 31, 31, 0.12);
    --wc-radius-lg: 28px;
    --wc-radius-md: 18px;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--wc-ivory);
    color: var(--wc-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input {
    font: inherit;
}

a {
    color: inherit;
}

.login-page {
    min-height: 100vh;
    padding: 48px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    background: radial-gradient(circle at top right, rgba(107, 112, 92, 0.16), transparent 34%), radial-gradient(circle at bottom left, rgba(244, 140, 58, 0.16), transparent 30%), linear-gradient(135deg, #fbfaf6 0%, var(--wc-ivory) 100%);
    position: relative;
    overflow: hidden;
}

    .login-page::before {
        content: "";
        position: absolute;
        left: -120px;
        bottom: -160px;
        width: 420px;
        height: 420px;
        background: rgba(107, 112, 92, 0.13);
        border-radius: 50%;
    }

    .login-page::after {
        content: "";
        position: absolute;
        right: -120px;
        top: -160px;
        width: 420px;
        height: 420px;
        background: rgba(244, 140, 58, 0.10);
        border-radius: 50%;
    }

.login-brand,
.login-card,
.login-footer {
    position: relative;
    z-index: 1;
}

.login-brand {
    text-align: center;
    color: var(--wc-olive-dark);
}

.login-heart {
    font-size: 42px;
    line-height: 1;
    margin-bottom: 12px;
}

.login-logo {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0.34em;
    font-size: clamp(26px, 5vw, 42px);
    color: var(--wc-olive-dark);
}

.login-brand p {
    margin: 18px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    color: var(--wc-olive-dark);
}

.login-card {
    width: min(100%, 520px);
    padding: 44px;
    box-sizing: border-box;
    border-radius: var(--wc-radius-lg);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--wc-shadow);
    backdrop-filter: blur(18px);
}

.login-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--wc-ivory-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wc-olive-dark);
    font-size: 28px;
}

.login-card h1 {
    margin: 0;
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 5vw, 42px);
    font-weight: 600;
}

.login-subtitle {
    margin: 14px 0 34px;
    text-align: center;
    color: var(--wc-muted);
    font-size: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 22px;
}

    .form-group label {
        color: var(--wc-olive-dark);
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .form-group input {
        height: 54px;
        padding: 0 18px;
        border-radius: 14px;
        border: 1px solid var(--wc-border);
        background: rgba(255, 255, 255, 0.86);
        color: var(--wc-text);
        outline: none;
        transition: border-color 0.18s ease, box-shadow 0.18s ease;
    }

        .form-group input:focus {
            border-color: var(--wc-olive);
            box-shadow: 0 0 0 4px rgba(107, 112, 92, 0.14);
        }

.primary-button {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--wc-olive), var(--wc-olive-dark));
    color: white;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(79, 85, 68, 0.24);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

    .primary-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 16px 34px rgba(79, 85, 68, 0.28);
    }

.login-error {
    margin-bottom: 22px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(244, 140, 58, 0.12);
    color: #C75B0A;
    text-align: center;
    font-size: 14px;
}

.login-footer {
    color: var(--wc-olive-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
}

@media (max-width: 640px) {
    .login-page {
        padding: 36px 16px;
        justify-content: flex-start;
    }

    .login-card {
        padding: 32px 22px;
        border-radius: 24px;
    }

    .login-logo {
        letter-spacing: 0.22em;
    }
}
.admin-page {
    min-height: 100vh;
    padding: 48px;
    background: var(--wc-ivory);
}

.admin-header {
    margin-bottom: 32px;
}

.admin-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

    .admin-header h1 {
        margin: 0;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 42px;
    }

    .admin-header p {
        color: var(--wc-muted);
    }

.eyebrow {
    margin: 0 0 8px;
    color: var(--wc-strelitzia);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 24px;
}

.admin-nav-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-card {
    padding: 32px;
    border-radius: var(--wc-radius-lg);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(107, 112, 92, 0.14);
    box-shadow: 0 18px 50px rgba(31, 31, 31, 0.08);
}

    .admin-card h2 {
        margin: 0 0 24px;
        font-family: Georgia, "Times New Roman", serif;
    }

.date-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.admin-button {
    margin-top: 10px;
    max-width: 220px;
}

.qr-preview {
    width: 260px;
    height: 260px;
    margin: 12px auto 28px;
    padding: 18px;
    background: white;
    border-radius: 22px;
    box-shadow: 0 16px 38px rgba(31, 31, 31, 0.10);
}

    .qr-preview svg {
        width: 100%;
        height: 100%;
    }

.copy-box {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

    .copy-box input {
        flex: 1;
        min-width: 0;
        height: 46px;
        padding: 0 14px;
        border-radius: 12px;
        border: 1px solid var(--wc-border);
        background: white;
    }

    .copy-box button,
    .secondary-button {
        height: 46px;
        padding: 0 18px;
        border-radius: 12px;
        border: 1px solid var(--wc-border);
        background: white;
        color: var(--wc-olive-dark);
        font-weight: 700;
        text-decoration: none;
        cursor: pointer;
    }

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.secondary-button.compact,
.danger-button.compact {
    width: auto;
    min-width: 112px;
    padding: 0 14px;
}

.danger-button {
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(199, 91, 10, 0.28);
    background: rgba(244, 140, 58, 0.12);
    color: #9f4809;
    font-weight: 700;
    cursor: pointer;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    text-align: center;
}

.stat-card p {
    margin: 0;
    color: var(--wc-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 12px;
    font-weight: 700;
}

.stat-card h2 {
    margin: 10px 0 0;
    font-size: clamp(24px, 4vw, 34px);
}

.dashboard-controls {
    display: flex;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
}

.dashboard-control-item {
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-control-item label {
    color: var(--wc-olive-dark);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
}

.dashboard-control-item select {
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--wc-border);
    background: white;
    padding: 0 12px;
}

.clip-list {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}

.clip-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.clip-video-wrap {
    border-radius: 16px;
    overflow: hidden;
    background: #1f1f1f;
    aspect-ratio: 9 / 16;
}

.clip-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clip-missing {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #f3ece1;
    padding: 16px;
    box-sizing: border-box;
    font-weight: 700;
    background: linear-gradient(145deg, #5e624f, #3f4337);
}

.clip-meta p {
    margin: 0;
    color: var(--wc-muted);
    font-size: 14px;
}

.clip-meta .clip-event {
    color: var(--wc-olive-dark);
    font-weight: 700;
    margin-bottom: 6px;
}

.clip-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.empty-state {
    margin-top: 22px;
    text-align: center;
}

.load-more-wrap {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

.admin-grid-events {
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr) 420px;
}

.event-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.event-list-header h2 {
    margin: 0;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-list-item {
    width: 100%;
    border: 1px solid var(--wc-border);
    border-radius: 14px;
    background: white;
    color: var(--wc-text);
    text-align: left;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-list-item span {
    font-weight: 700;
}

.event-list-item small {
    color: var(--wc-muted);
}

.event-list-item.active {
    border-color: var(--wc-olive);
    background: rgba(107, 112, 92, 0.12);
}

.inline-checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-message {
    margin-bottom: 22px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(107, 112, 92, 0.12);
    color: var(--wc-olive-dark);
    font-size: 14px;
}

.muted {
    color: var(--wc-muted);
}

.small {
    margin-top: 16px;
    font-size: 13px;
}

@media (max-width: 900px) {
    .admin-page {
        padding: 28px 16px;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-grid-events {
        grid-template-columns: 1fr;
    }

    .date-grid {
        grid-template-columns: 1fr;
    }

    .admin-header-row {
        flex-direction: column;
    }

    .admin-nav-actions {
        justify-content: flex-start;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.visitor-page {
    min-height: 100vh;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        linear-gradient(138deg, rgba(16, 31, 27, 0.26) 0%, rgba(52, 30, 24, 0.22) 100%),
        radial-gradient(circle at top right, rgba(244, 140, 58, 0.26), transparent 34%),
        radial-gradient(circle at bottom left, rgba(68, 118, 101, 0.28), transparent 36%),
        url('/VisitorBG.jpeg');
    background-position: center;
    background-size: cover;
    position: relative;
    overflow: hidden;
}

    .visitor-page::before {
        content: "";
        position: absolute;
        left: -140px;
        bottom: -180px;
        width: 440px;
        height: 440px;
        border-radius: 50%;
        background: rgba(107, 112, 92, 0.13);
    }

    .visitor-page::after {
        content: "";
        position: absolute;
        right: -120px;
        top: -160px;
        width: 380px;
        height: 380px;
        border-radius: 50%;
        background: rgba(244, 140, 58, 0.10);
    }

.language-switch {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 40;
    padding: 4px;
    border-radius: 999px;
    background:
        linear-gradient(130deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.16)),
        radial-gradient(circle at 82% 16%, rgba(237, 166, 128, 0.22), transparent 42%);
    border: 1px solid rgba(255, 240, 232, 0.42);
    box-shadow: 0 14px 34px rgba(19, 18, 17, 0.16);
    backdrop-filter: blur(14px);
}

    .language-switch button {
        border: none;
        background: transparent;
        color: #fff4ee;
        padding: 8px 12px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 800;
        cursor: pointer;
    }

        .language-switch button.active {
            background: linear-gradient(135deg, #efb299, #cb7f64);
            color: white;
        }

.visitor-card {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    padding: 44px 32px;
    box-sizing: border-box;
    text-align: center;
    border-radius: var(--wc-radius-lg);
    background:
        linear-gradient(130deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.13)),
        radial-gradient(circle at 86% 14%, rgba(237, 166, 128, 0.24), transparent 44%),
        radial-gradient(circle at 10% 88%, rgba(93, 146, 127, 0.24), transparent 42%);
    border: 1px solid rgba(255, 248, 241, 0.42);
    box-shadow:
        0 30px 70px rgba(11, 20, 18, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.36);
    backdrop-filter: blur(18px) saturate(135%);
}

.visitor-card::before {
    content: "";
    position: absolute;
    inset: -120% 26% auto;
    height: 220%;
    transform: rotate(14deg);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0) 100%);
    animation: glass-shimmer 6.5s ease-in-out infinite;
    pointer-events: none;
}

.visitor-heart {
    color: #ffe2d4;
    font-size: 44px;
    line-height: 1;
    margin-bottom: 18px;
}

.visitor-eyebrow {
    margin: 0 0 12px;
    color: #ffd7c5;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.visitor-card h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(36px, 10vw, 56px);
    line-height: 1.05;
    color: #fffaf6;
    text-shadow: 0 8px 24px rgba(19, 16, 14, 0.30);
}

    .visitor-card h1:focus,
    .visitor-card h1:focus-visible,
    .recording-state h2:focus,
    .recording-state h2:focus-visible {
        outline: none;
    }

.visitor-text {
    margin: 22px auto 32px;
    max-width: 390px;
    color: rgba(255, 247, 241, 0.92);
    font-size: 18px;
    line-height: 1.55;
}

.toggle-section {
    margin: 0 0 16px;
    text-align: left;
}

.toggle-title {
    margin: 0 0 8px;
    color: rgba(255, 245, 239, 0.9);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.segmented-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 6px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 235, 226, 0.28);
}

.segmented-option {
    min-height: 76px;
    border-radius: 18px;
    border: 1px solid rgba(255, 235, 226, 0.40);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.10));
    color: #fff7f3;
    font-weight: 900;
    cursor: pointer;
    padding: 14px 14px;
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 24px rgba(31, 31, 31, 0.10);
    transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    line-height: 1.15;
    appearance: none;
    -webkit-appearance: none;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.segmented-option.active {
    border-color: rgba(255, 214, 196, 0.92);
    background: linear-gradient(180deg, rgba(255, 194, 170, 0.52), rgba(255, 174, 140, 0.38));
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 30px rgba(84, 44, 31, 0.28), 0 0 0 2px rgba(255, 214, 196, 0.18) inset;
    transform: translateY(-1px);
    animation: toggle-active-pop 220ms ease-out;
}

.segmented-option:hover {
    transform: translateY(-1px);
}

.segmented-option:active {
    transform: translateY(0);
}

.segmented-option:focus-visible,
.record-button:focus-visible {
    outline: 2px solid rgba(255, 231, 218, 0.95);
    outline-offset: 2px;
}

.toggle-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.toggle-value {
    margin: 0;
    color: rgba(255, 245, 239, 0.92);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.slider-group {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    gap: 10px;
    padding: 10px 12px 8px;
    border-radius: 18px;
    border: 1px solid rgba(255, 235, 226, 0.40);
    background: rgba(255, 255, 255, 0.10);
    box-shadow: 0 10px 24px rgba(31, 31, 31, 0.10);
    cursor: pointer;
}

.slider-group.torch-off {
    --torch-track-start: rgba(194, 201, 193, 0.46);
    --torch-track-end: rgba(194, 201, 193, 0.72);
    --torch-thumb: #c4c8c1;
}

.slider-group.torch-on {
    --torch-track-start: rgba(244, 140, 58, 0.38);
    --torch-track-end: rgba(244, 140, 58, 0.82);
    --torch-thumb: #f48c3a;
}

.slider-label {
    color: rgba(255, 245, 239, 0.86);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.torch-slider {
    width: 100%;
    min-width: 0;
    height: 28px;
    margin: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: none;
    accent-color: var(--torch-thumb, var(--wc-strelitzia));
}

.torch-slider::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--torch-track-start, rgba(194, 201, 193, 0.46)), var(--torch-track-end, rgba(194, 201, 193, 0.72)));
}

.torch-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    margin-top: -7px;
    border-radius: 50%;
    border: 2px solid rgba(255, 252, 249, 0.92);
    background: var(--torch-thumb, #c4c8c1);
    box-shadow: 0 8px 18px rgba(31, 31, 31, 0.18);
}

.torch-slider::-moz-range-track {
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--torch-track-start, rgba(194, 201, 193, 0.46)), var(--torch-track-end, rgba(194, 201, 193, 0.72)));
}

.torch-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 252, 249, 0.92);
    background: var(--torch-thumb, #c4c8c1);
    box-shadow: 0 8px 18px rgba(31, 31, 31, 0.18);
}

.torch-slider:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.record-button {
    width: 100%;
    min-height: 84px;
    border: 1px solid rgba(255, 210, 193, 0.44);
    border-radius: 24px;
    background: linear-gradient(135deg, #efb299, #cb7f64);
    color: white;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(84, 44, 31, 0.34);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 18px;
    appearance: none;
    -webkit-appearance: none;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.record-button-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ff3b30;
    box-shadow: 0 0 0 7px rgba(255, 59, 48, 0.20);
    flex: 0 0 auto;
}

.record-button-main {
    font-size: 20px;
    line-height: 1.2;
}

.record-button-hint {
    margin: 10px 0 0;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 245, 239, 0.9);
    letter-spacing: 0.02em;
}

.visitor-hint {
    margin: 22px 0 0;
    color: rgba(255, 245, 239, 0.86);
    font-size: 14px;
}

@media (max-width: 640px) {
    .visitor-page {
        padding: 18px;
    }

    .visitor-card {
        padding: 36px 22px;
        border-radius: 26px;
    }
    .segmented-option,
    .visitor-text {
        font-size: 16px;
    }

    .segmented-control {
        min-height: 84px;
    }

    .slider-group {
        grid-template-columns: auto minmax(0, 1fr) auto;
        justify-items: stretch;
        text-align: left;
        gap: 8px;
        padding: 10px 12px 10px;
    }

    .toggle-group {
        grid-template-columns: 1fr;
    }
}
.recording-state {
    margin-top: 28px;
    text-align: center;
}

.recording-state h2 {
    color: #fff8f2;
    text-shadow: 0 8px 22px rgba(17, 14, 12, 0.30);
}

.recording-label {
    margin: 0 0 10px;
    color: #ffd4c1;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.recording-live-hint {
    margin: 0 0 14px;
    color: rgba(255, 246, 239, 0.9);
    font-size: 14px;
}

.recording-state .record-button {
    margin-top: 16px;
}

.recording-overlay {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    box-sizing: border-box;
    background:
        radial-gradient(circle at 12% 18%, rgba(34, 99, 84, 0.28), transparent 32%),
        radial-gradient(circle at 84% 20%, rgba(244, 140, 58, 0.26), transparent 34%),
        radial-gradient(circle at 18% 82%, rgba(198, 146, 125, 0.22), transparent 34%),
        linear-gradient(138deg, rgba(21, 37, 31, 0.34) 0%, rgba(45, 29, 24, 0.38) 100%);
    backdrop-filter: blur(9px) saturate(130%);
}

.recording-overlay-content {
    width: min(100%, 620px);
    height: min(84vh, 760px);
    min-height: 520px;
    text-align: center;
    color: white;
    border-radius: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background:
        linear-gradient(130deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)),
        radial-gradient(circle at 8% 16%, rgba(79, 138, 118, 0.32), transparent 44%),
        radial-gradient(circle at 88% 84%, rgba(237, 166, 128, 0.30), transparent 42%);
    box-shadow: 0 30px 70px rgba(14, 24, 21, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(16px);
    animation: overlay-pop .24s ease-out;
    position: relative;
    overflow: hidden;
}

.recording-overlay-video,
.recording-overlay-scrim,
.recording-overlay-ui {
    position: absolute;
    inset: 0;
}

.recording-overlay-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
    filter: saturate(1.05) contrast(1.03);
}

.recording-overlay-video.mirrored {
    transform: scaleX(-1);
}

.recording-overlay-scrim {
    background:
        linear-gradient(180deg, rgba(15, 18, 18, 0.18), rgba(15, 18, 18, 0.48)),
        radial-gradient(circle at center, rgba(255, 255, 255, 0.04), transparent 55%);
}

.recording-overlay-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 34px 26px;
    box-sizing: border-box;
    z-index: 2;
}

.recording-overlay-video {
    z-index: 0;
}

.recording-overlay-scrim {
    z-index: 1;
}

.recording-overlay-status {
    margin: 0;
    color: #ffe0d2;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.recording-overlay-recording-dot {
    width: 16px;
    height: 16px;
    margin: 12px auto 4px;
    border-radius: 50%;
    background: #ff3b30;
    box-shadow: 0 0 0 rgba(255, 59, 48, 0.40);
    animation: pulse-recording 1.1s infinite;
}

.recording-overlay-ui .recording-overlay-count {
    margin-top: 0;
}

@keyframes toggle-active-pop {
    0% {
        transform: scale(0.98);
    }

    70% {
        transform: scale(1.01);
    }

    100% {
        transform: scale(1);
    }
}

.recording-overlay-count {
    margin-top: 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(140px, 34vw, 260px);
    font-weight: 700;
    line-height: .9;
    color: #fff7f2;
    text-shadow: 0 12px 34px rgba(23, 18, 15, 0.40), 0 0 24px rgba(236, 168, 130, 0.45);
    animation: countdown-zoom .72s cubic-bezier(.18,.84,.28,1);
}

.recording-overlay-phrase {
    margin: 16px auto 0;
    font-size: clamp(24px, 6vw, 42px);
    font-weight: 800;
    line-height: 1.1;
    max-width: 18ch;
}

.recording-state h2 {
    margin: 0 0 16px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
}

.recording-dot {
    width: 18px;
    height: 18px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--wc-strelitzia);
    box-shadow: 0 0 0 rgba(244, 140, 58, 0.45);
    animation: pulse-recording 1.2s infinite;
}

.countdown {
    width: 112px;
    height: 112px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--wc-olive);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 54px;
    box-shadow: 0 18px 38px rgba(79, 85, 68, 0.24);
}

.done-icon {
    width: 92px;
    height: 92px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(255, 205, 184, 0.24);
    border: 1px solid rgba(255, 238, 231, 0.44);
    color: #ffe9dd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 30px rgba(31, 31, 31, 0.18);
}

@keyframes pulse-recording {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 140, 58, 0.45);
    }

    70% {
        box-shadow: 0 0 0 18px rgba(244, 140, 58, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(244, 140, 58, 0);
    }
}

@keyframes overlay-pop {
    from {
        transform: scale(0.96);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes countdown-zoom {
    0% {
        transform: scale(0.34);
        opacity: .14;
    }

    62% {
        transform: scale(1.14);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes glass-shimmer {
    0%,
    100% {
        transform: translateX(-14%) rotate(14deg);
        opacity: .25;
    }

    50% {
        transform: translateX(16%) rotate(14deg);
        opacity: .52;
    }
}

@media (max-width: 640px) {
    .recording-overlay-content {
        width: min(100%, 560px);
        height: min(82vh, 700px);
        min-height: 460px;
    }

    .recording-overlay-ui {
        padding: 24px 18px;
    }
}