/* ==========================================================================
   DeepMatch — Midnight Romance : App shell, onboarding, discover, chats,
   profile, settings, modals.
   ========================================================================== */

/* Author CSS frequently sets display (flex/grid) on forms & panels; make the
   HTML `hidden` attribute always win so JS toggle logic works reliably. */
[hidden] {
    display: none !important;
}

/* ------------------------- Onboarding ------------------------- */
.onboarding-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    overflow-y: auto;
    position: relative;
}

    .onboarding-container::before,
    .onboarding-container::after {
        content: "";
        position: fixed;
        border-radius: 50%;
        filter: blur(90px);
        opacity: 0.55;
        z-index: 0;
        pointer-events: none;
    }

    .onboarding-container::before {
        width: 420px;
        height: 420px;
        top: -120px;
        right: -80px;
        background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent 70%);
        animation: onboardBlob 14s ease-in-out infinite;
    }

    .onboarding-container::after {
        width: 380px;
        height: 380px;
        bottom: -140px;
        left: -90px;
        background: radial-gradient(circle, rgba(236, 72, 153, 0.28), transparent 70%);
        animation: onboardBlob 18s ease-in-out infinite reverse;
    }

.onboarding-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 620px;
    background: var(--onboarding-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: onboardCardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

    .onboarding-card::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        padding: 1px;
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.55), rgba(236, 72, 153, 0.45), rgba(139, 92, 246, 0.55));
        background-size: 300% 300%;
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        mask-composite: exclude;
        animation: onboardBorderGlow 6s ease-in-out infinite;
        pointer-events: none;
    }

    .onboarding-card::after {
        content: "";
        position: absolute;
        top: -70%;
        left: -30%;
        width: 160%;
        height: 100%;
        background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.045) 48%, transparent 62%);
        transform: rotate(8deg);
        animation: onboardSheen 7s ease-in-out infinite;
        pointer-events: none;
    }

    .onboarding-card > * {
        position: relative;
        z-index: 1;
    }

.onboarding-progress {
    position: relative;
    height: 6px;
    background: var(--surface-hover);
    border-radius: var(--radius-full);
    margin-bottom: 30px;
    overflow: hidden;
}

.onboarding-progress-bar {
    position: relative;
    height: 100%;
    background: var(--gradient-brand);
    background-size: 200% 100%;
    border-radius: var(--radius-full);
    width: 0%;
    transition: width 0.55s cubic-bezier(0.65, 0, 0.35, 1);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

    .onboarding-progress-bar::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
        background-size: 200% 100%;
        animation: onboardShimmer 2.2s linear infinite;
    }

.onboarding-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--surface-hover);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

    .step-dot.done {
        background: var(--gradient-brand);
    }

    .step-dot.active {
        width: 26px;
        border-radius: var(--radius-full);
        background: var(--gradient-brand);
        box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    }

.onboarding-step-indicator {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.onboarding-step {
    display: none;
    flex-direction: column;
    gap: 18px;
    animation: onboardStepIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

    .onboarding-step.active {
        display: flex;
    }

    .onboarding-step.shake {
        animation: onboardShake 0.4s ease;
    }

.onboarding-step-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
}

.onboarding-step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    min-height: 46px;
    border-radius: 14px;
    background: var(--gradient-brand-soft);
    color: var(--primary);
    border: 1px solid var(--border);
    flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.25));
}

.onboarding-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.onboarding-subtitle {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.5;
}

.onboarding-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

    .onboarding-actions .btn {
        flex: 1;
        min-height: 50px;
    }

.field-error {
    display: none;
    font-size: 12.5px;
    color: var(--danger);
    line-height: 1.4;
}

    .field-error.visible {
        display: block;
        animation: onboardShake 0.4s ease;
    }

.spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

.onboarding-success {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
    padding: 24px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s;
}

    .onboarding-success.show {
        opacity: 1;
        visibility: visible;
    }

.onboard-success-heart {
    width: 92px;
    height: 92px;
    color: var(--accent);
    animation: onboardHeartBeat 1.3s ease-in-out infinite;
    filter: drop-shadow(0 8px 24px rgba(236, 72, 153, 0.45));
}

.onboard-success-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.onboard-success-sub {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.6;
}

.onboard-success-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    font-size: 15px;
    font-weight: 600;
    animation: onboardStepIn 0.5s ease 0.5s both;
}

    .onboard-success-btn:hover svg {
        transform: translateX(3px);
        transition: transform 0.2s ease;
    }

/* Onboarding + profile keyframes */
@keyframes onboardStepIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes onboardCardIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes onboardBlob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-30px, 40px) scale(1.08);
    }
}

@keyframes onboardBorderGlow {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes onboardShimmer {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

@keyframes onboardSheen {
    0%, 55% {
        transform: translateX(-160%) rotate(8deg);
    }

    100% {
        transform: translateX(160%) rotate(8deg);
    }
}

@keyframes onboardShake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes onboardHeartBeat {
    0%, 100% {
        transform: scale(1);
    }

    12% {
        transform: scale(1.14);
    }

    24% {
        transform: scale(1);
    }

    36% {
        transform: scale(1.1);
    }

    48% {
        transform: scale(1);
    }
}

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

@media (prefers-reduced-motion: reduce) {
    .onboarding-card,
    .onboarding-card::before,
    .onboarding-card::after,
    .onboarding-progress-bar,
    .onboarding-progress-bar::after,
    .onboarding-step,
    .step-dot,
    .photo-preview-img {
        animation: none !important;
        transition: none !important;
    }
}

/* Photo upload (onboarding + profile) */
.photo-upload-zone {
    position: relative;
    border: 1.5px dashed var(--border-hover);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition), transform 0.2s ease;
    background: linear-gradient(180deg, rgba(20, 22, 32, 0.55), rgba(9, 10, 16, 0.85)), var(--bg);
    overflow: hidden;
}

    .photo-upload-zone:hover {
        transform: translateY(-2px);
    }

    .photo-upload-zone:hover,
    .photo-upload-zone.dragover {
        border-color: var(--primary);
        background: var(--primary-soft);
    }

    .photo-upload-zone.dragover {
        transform: translateY(-2px) scale(1.01);
    }

.photo-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

    .photo-upload-placeholder svg {
        color: var(--primary);
        filter: drop-shadow(0 4px 10px rgba(139, 92, 246, 0.35));
    }

    .photo-upload-placeholder small {
        font-size: 12px;
        color: var(--text-inactive);
    }

.photo-preview-container {
    display: none;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

    .photo-preview-container.visible {
        display: flex;
    }

.photo-preview-img {
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    animation: onboardStepIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.photo-preview-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.photo-preview-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    background: var(--glass-bg-strong);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

    .photo-preview-spinner.show {
        opacity: 1;
        visibility: visible;
    }

.photo-preview-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Crop modal */
.crop-wrapper {
    position: fixed;
    inset: 0;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

    .crop-wrapper.open {
        opacity: 1;
        visibility: visible;
    }

.crop-modal {
    width: min(680px, 100%);
    max-height: 94dvh;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.crop-modal-header {
    text-align: center;
}

.crop-modal-title {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.crop-modal-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

/* Toolbar */
.crop-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.crop-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
}

    .crop-tool-btn:hover {
        color: var(--text);
        background: var(--surface-2, rgba(255, 255, 255, 0.04));
        border-color: var(--border-strong, var(--border));
    }

    .crop-tool-btn:active {
        transform: scale(0.96);
    }

.crop-tool-sep {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 4px;
}

/* Aspect ratios */
.crop-aspect-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.crop-aspect-btn {
    padding: 6px 13px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
}

    .crop-aspect-btn:hover {
        color: var(--text);
        border-color: var(--accent);
    }

    .crop-aspect-btn.active {
        color: #FFFFFF;
        background: var(--accent);
        border-color: var(--accent);
        box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
    }

/* Stage */
.crop-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 55dvh;
    background: #0c0d12;
    border-radius: var(--radius-xl);
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
}

    .crop-stage.dragging {
        cursor: grabbing;
    }

#cropCanvas {
    position: absolute;
    inset: 0;
    display: block;
}

/* Crop box */
.crop-box {
    position: absolute;
    border: 2px solid #FFFFFF;
    cursor: move;
    touch-action: none;
}

.crop-handle {
    position: absolute;
    background: #FFFFFF;
    border: 2px solid var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    z-index: 2;
}

.crop-handle-nw,
.crop-handle-ne,
.crop-handle-sw,
.crop-handle-se {
    width: 18px;
    height: 18px;
    border-radius: 5px;
}

.crop-handle-n,
.crop-handle-s,
.crop-handle-e,
.crop-handle-w {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.crop-handle-nw {
    top: -9px;
    left: -9px;
    cursor: nwse-resize;
}

.crop-handle-ne {
    top: -9px;
    right: -9px;
    cursor: nesw-resize;
}

.crop-handle-sw {
    bottom: -9px;
    left: -9px;
    cursor: nesw-resize;
}

.crop-handle-se {
    bottom: -9px;
    right: -9px;
    cursor: nwse-resize;
}

.crop-handle-n {
    top: -4px;
    left: 50%;
    margin-left: -4px;
    cursor: ns-resize;
}

.crop-handle-s {
    bottom: -4px;
    left: 50%;
    margin-left: -4px;
    cursor: ns-resize;
}

.crop-handle-e {
    top: 50%;
    right: -4px;
    margin-top: -4px;
    cursor: ew-resize;
}

.crop-handle-w {
    top: 50%;
    left: -4px;
    margin-top: -4px;
    cursor: ew-resize;
}

.crop-box--ratio .crop-handle-n,
.crop-box--ratio .crop-handle-s,
.crop-box--ratio .crop-handle-e,
.crop-box--ratio .crop-handle-w {
    display: none;
}

/* Zoom controls */
.crop-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crop-zoom-btn {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-full, 999px);
    cursor: pointer;
    transition: var(--transition);
}

    .crop-zoom-btn:hover {
        color: var(--text);
        border-color: var(--accent);
    }

.crop-zoom-range {
    flex: 1;
    accent-color: var(--accent);
    cursor: pointer;
}

.crop-zoom-value {
    flex-shrink: 0;
    min-width: 44px;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.crop-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

    .crop-actions .btn {
        min-width: 130px;
    }

/* ------------------------- App shell ------------------------- */
body.app-shell {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    height: 100dvh;
    background: var(--bg);
    overflow: hidden;
    flex: 1;
}

/* Desktop sidebar */
.sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px 14px 16px;
    overflow-y: auto;
}

.sidebar-logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px 18px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
}

    .sidebar-logo-area svg {
        color: var(--accent);
        filter: drop-shadow(0 4px 12px rgba(236, 72, 153, 0.4));
    }

.sidebar-logo-text {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

    .nav-item svg {
        flex-shrink: 0;
    }

    .nav-item:hover {
        color: var(--text);
        background: var(--surface-hover);
    }

    .nav-item.active {
        color: var(--primary);
        background: var(--primary-soft);
        font-weight: 600;
    }

        .nav-item.active::before {
            content: "";
            position: absolute;
            left: 0;
            top: 22%;
            height: 56%;
            width: 3px;
            border-radius: var(--radius-full);
            background: var(--primary);
        }

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 6px 4px;
    border-top: 1px solid var(--border);
}

.sidebar-theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
}

    .sidebar-theme-toggle:hover {
        color: var(--text);
        background: var(--surface-hover);
        border-color: var(--border-hover);
    }

    .sidebar-theme-toggle .theme-icon-sun {
        display: none;
    }

    .sidebar-theme-toggle .theme-icon-moon {
        display: block;
    }

[data-theme="dark"] .sidebar-theme-toggle .theme-icon-sun {
    display: block;
}

[data-theme="dark"] .sidebar-theme-toggle .theme-icon-moon {
    display: none;
}

.current-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 4px;
    border-radius: var(--radius-md);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-hover);
    flex-shrink: 0;
}

.user-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-hover);
    color: var(--text-muted);
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

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

.user-name-display {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-status-text {
    font-size: 11px;
    color: var(--success);
    font-weight: 600;
}

/* Workspace */
.workspace {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg);
    position: relative;
}

.tab-panel {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

    .tab-panel.active {
        display: flex;
    }

.tab-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 32px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.tab-header-titles {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.tab-title {
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: 700;
}

.tab-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Mobile header + bottom nav (hidden on desktop) */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    transition: var(--transition);
}

    .mobile-theme-toggle:hover {
        color: var(--text);
        border-color: var(--border-hover);
    }

    .mobile-theme-toggle .theme-icon-sun {
        display: none;
    }

    .mobile-theme-toggle .theme-icon-moon {
        display: block;
    }

[data-theme="dark"] .mobile-theme-toggle .theme-icon-sun {
    display: block;
}

[data-theme="dark"] .mobile-theme-toggle .theme-icon-moon {
    display: none;
}

.mobile-nav-bar {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 2px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 100;
}

    .mobile-nav-bar a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 7px 2px;
        border-radius: var(--radius-md);
        color: var(--text-muted);
        font-size: 10px;
        font-weight: 600;
        transition: var(--transition);
    }

        .mobile-nav-bar a svg {
            flex-shrink: 0;
        }

        .mobile-nav-bar a:hover {
            color: var(--text);
        }

        .mobile-nav-bar a.active {
            color: var(--primary);
            background: var(--primary-soft);
        }

/* ------------------------- Filter drawer ------------------------- */
.filter-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 6, 10, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 4000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

    .filter-drawer-overlay.open {
        opacity: 1;
        visibility: visible;
    }

.filter-drawer {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(360px, 100%);
    max-width: 92vw;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-drawer-overlay.open .filter-drawer {
    transform: translateX(0);
}

.filter-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.filter-online-row {
    background: var(--surface-elevated, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
}

.filter-online-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

    .filter-online-toggle input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.filter-switch {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--border);
    transition: background 0.2s ease;
}

    .filter-switch::after {
        content: "";
        position: absolute;
        top: 3px;
        left: 3px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #fff;
        transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

.filter-online-toggle input:checked + .filter-switch {
    background: var(--primary);
}

    .filter-online-toggle input:checked + .filter-switch::after {
        transform: translateX(18px);
    }

.filter-online-label {
    font-size: 14px;
    font-weight: 700;
}

.filter-online-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 6px 0 0 52px;
    line-height: 1.45;
}

/* ------------------------- Skeleton ------------------------- */
.skeleton {
    background: linear-gradient(90deg, var(--surface-hover) 25%, var(--surface-elevated) 50%, var(--surface-hover) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

/* ================= DISCOVER TAB ================= */
.discover-page {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    overflow: hidden; /* The deck uses 100dvh so this must clip excess */
}

.discover-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
    gap: 16px;
}

.discover-heading {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
}

.discover-subheading {
    font-size: 13px;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.discover-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.discover-action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 13.5px;
    font-weight: 600;
    transition: var(--transition);
}

.filter-indicator-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 2px var(--surface);
    display: none;
}

.discover-container-layout {
    position: relative;
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    padding: 20px 24px;
    overflow: hidden;
    align-items: start;
}




/* ----------------- Left Sidebar: Your Dating Card & Radar ----------------- */
.discover-sidebar-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    align-self: start;
    position: relative;
    overflow: hidden;
}

.sidebar-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-card-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.sidebar-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--surface-hover);
    transition: var(--transition);
}

    .sidebar-edit-link:hover {
        color: var(--accent);
        background: var(--primary-soft);
    }

.sidebar-profile-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.sidebar-avatar-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 2.5px;
    background: var(--gradient-brand);
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.25);
    position: relative;
    overflow: hidden;
}

.sidebar-avatar-img,
.sidebar-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-hover);
    font-weight: 700;
    font-size: 20px;
    color: var(--text);
}

.sidebar-online-beacon {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #10B981;
    border: 2.5px solid var(--surface);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.sidebar-profile-name {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.sidebar-profile-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 3px 0 0;
}

.sidebar-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sidebar-tag {
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--surface-hover);
    color: var(--text);
    border: 1px solid var(--border);
}

    .sidebar-tag.highlight {
        background: var(--primary-soft);
        color: var(--primary);
        border-color: rgba(244, 63, 94, 0.2);
    }

/* Radar Insight Box */
.discovery-radar-card {
    background: linear-gradient(145deg, var(--surface-hover) 0%, var(--surface) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radar-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radar-icon-pulse {
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 63, 94, 0.12);
    color: var(--primary);
}

.radar-ping {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid var(--primary);
    opacity: 0.7;
    animation: radarPingAnim 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radarPingAnim {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.radar-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
}

.radar-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

.radar-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.radar-pill {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

/* ----------------- Center Main Stage ----------------- */
.discover-main-stage {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
    min-height: 0;
    overflow: visible;
    padding-top: 12px;
}

    /* Ambient glow blobs */
    .discover-main-stage::before,
    .discover-main-stage::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        filter: blur(80px);
        pointer-events: none;
        z-index: 0;
    }

    .discover-main-stage::before {
        width: 380px;
        height: 380px;
        top: 5%;
        left: 10%;
        background: radial-gradient(circle, rgba(244, 63, 94, 0.16), transparent 70%);
        animation: blobDrift 14s ease-in-out infinite;
    }

    .discover-main-stage::after {
        width: 320px;
        height: 320px;
        bottom: 5%;
        right: 10%;
        background: radial-gradient(circle, rgba(251, 113, 133, 0.14), transparent 70%);
        animation: blobDrift 16s ease-in-out infinite reverse;
    }

/* ----------------- Hero Spark View ----------------- */
.discover-hero-view {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 100%;
    padding: 40px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hero-sparkle-halo {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-brand-soft);
    border: 1px solid rgba(244, 63, 94, 0.25);
    box-shadow: 0 0 50px rgba(244, 63, 94, 0.2);
    animation: heroHaloPulse 3s ease-in-out infinite;
}

.hero-sparkle-icon {
    color: var(--primary);
    animation: heroIconFloat 3s ease-in-out infinite;
}

@keyframes heroHaloPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 35px rgba(244, 63, 94, 0.2);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 0 65px rgba(244, 63, 94, 0.4);
    }
}

@keyframes heroIconFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.hero-headline {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: clamp(26px, 3.2vw, 34px);
    font-weight: 700;
    line-height: 1.18;
    margin: 0;
}

.hero-lead {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    max-width: 380px;
}

.hero-cta-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 36px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--gradient-brand);
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 32px rgba(244, 63, 94, 0.4);
    transition: var(--transition);
    overflow: hidden;
}

    .hero-cta-btn:hover {
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 14px 44px rgba(244, 63, 94, 0.55);
    }

    .hero-cta-btn:active {
        transform: translateY(0) scale(0.98);
    }

.hero-trust-badges {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 6px;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-inactive);
}

    .trust-badge svg {
        color: var(--primary);
    }

/* ----------------- Dating Card Stack ----------------- */
.dating-card-deck {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 390px;
    /* Direct viewport-based height so the action dock is ALWAYS visible */
    height: calc(100dvh - 180px);
    max-height: 600px;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    flex-shrink: 0;
}

.dating-card {
    position: absolute;
    inset: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    user-select: none;
    touch-action: pan-y;
    will-change: transform;
    cursor: grab;
}

    .dating-card.dragging {
        cursor: grabbing;
    }

    .dating-card.deck-back-1 {
        z-index: 1;
        transform: translateY(14px) scale(0.96);
        opacity: 0.95;
        pointer-events: none;
    }

    .dating-card.deck-back-2 {
        z-index: 0;
        transform: translateY(26px) scale(0.92);
        opacity: 0.85;
        pointer-events: none;
    }

    .dating-card.card-reveal-in {
        animation: cardRevealPop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

@keyframes cardRevealPop {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.94);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Circular profile visual (photo inside a ring, animated) */
.circle-deck-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px 4px;
}

.circle-profile-visual {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    max-width: 420px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.circle-photo-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .circle-photo-wrap::before {
        content: "";
        position: absolute;
        inset: -5%;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(244, 63, 94, 0.20) 0%, rgba(99, 102, 241, 0.14) 45%, transparent 72%);
        filter: blur(10px);
        animation: haloPulse 3.8s ease-in-out infinite;
        pointer-events: none;
    }

.circle-photo-frame {
    position: relative;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1 / 1;
    min-height: 0;
    flex-shrink: 1;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--surface);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
    background: var(--surface-elevated);
}

    .circle-photo-frame .circle-photo,
    .circle-photo-frame .circle-photo-fallback {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        font-size: clamp(30px, 5vw, 44px);
        background: var(--surface-hover);
    }

.circle-orbit-ring {
    position: absolute;
    inset: -13px;
    border-radius: 50%;
    border: 2px dashed rgba(244, 63, 94, 0.35);
    animation: orbitSpin 16s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.circle-presence-dot {
    position: absolute;
    right: 8%;
    bottom: 8%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6b7280;
    border: 3px solid var(--surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    z-index: 3;
}

    .circle-presence-dot.online {
        background: #22c55e;
    }

    .circle-presence-dot .circle-ping {
        position: absolute;
        inset: 0;
        border-radius: 50%;
        border: 2px solid rgba(34, 197, 94, 0.7);
        animation: pingPulse 1.8s ease-out infinite;
    }

.circle-identity {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 7px;
    flex-wrap: wrap;
}

    .circle-identity .profile-name-text {
        font-family: var(--font-serif, "Playfair Display", serif);
        font-size: clamp(21px, 2.6vw, 26px);
        font-weight: 800;
        line-height: 1.1;
        color: var(--text);
        text-shadow: none;
    }

    .circle-identity .profile-age-text {
        font-size: 20px;
        font-weight: 600;
        color: var(--text-muted);
    }

.circle-meta-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

.circle-meta-sep {
    color: var(--primary);
    font-size: 10px;
}

.circle-prompt {
    max-width: 340px;
    text-align: center;
    font-size: 13px;
    font-style: italic;
    color: var(--text-secondary);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.circle-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

    .circle-chips .passion-pill {
        background: var(--surface-elevated);
        border-color: var(--border);
        color: var(--text-secondary);
        padding: 4px 10px;
        font-size: 11.5px;
    }

.circle-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 999px;
    text-decoration: none;
    transition: var(--transition);
    margin-top: 2px;
}

    .circle-profile-link:hover {
        transform: translateY(-1px);
        border-color: var(--primary);
        color: var(--primary);
    }

/* Back-of-deck circular previews */
.back-circle {
    margin: auto;
    width: 46%;
    height: 46%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: var(--surface-elevated);
    border: 3px solid var(--surface);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
    animation: backCircleIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

    .back-circle .back-circle-photo,
    .back-circle .back-circle-fallback {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        font-size: 22px;
        background: var(--surface-hover);
    }

@keyframes backCircleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Circle entrance + idle animations */
.dating-card.card-reveal-in .circle-photo-frame {
    animation: circlePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.dating-card.card-reveal-in .circle-identity {
    animation: circleFadeUp 0.5s 0.12s both;
}

.dating-card.card-reveal-in .circle-meta-line {
    animation: circleFadeUp 0.5s 0.18s both;
}

.dating-card.card-reveal-in .circle-prompt {
    animation: circleFadeUp 0.5s 0.24s both;
}

.dating-card.card-reveal-in .circle-chips {
    animation: circleFadeUp 0.5s 0.3s both;
}

.dating-card.card-reveal-in .circle-profile-link {
    animation: circleFadeUp 0.5s 0.36s both;
}

.dating-card.top-active-card .circle-photo-wrap {
    animation: circleFloat 4.5s ease-in-out infinite;
}

@keyframes circlePop {
    0% {
        transform: scale(0.68);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes circleFadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes circleFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes orbitSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes haloPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes pingPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* Card Visual Layer (Photo + Gradient + Content) */
.card-visual-layer {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    background: #12141e;
}

.card-hero-photo,
.card-hero-photo-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-hero-photo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    font-weight: 800;
    color: var(--text-muted);
    background: linear-gradient(160deg, var(--surface-elevated), var(--surface-hover));
}

.card-gradient-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0.35) 50%, rgba(0, 0, 0, 0.85) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Top Badges */
.card-top-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
}

.presence-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    color: #FFFFFF;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

    .presence-badge.online .pulse-beacon {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #10B981;
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4);
    }

.card-detail-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 600;
    color: #FFFFFF;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    transition: var(--transition);
}

    .card-detail-shortcut:hover {
        background: rgba(244, 63, 94, 0.75);
        border-color: rgba(244, 63, 94, 0.9);
    }

/* Bottom Content Inside Card */
.card-content-layer {
    position: relative;
    z-index: 2;
    padding: 12px 18px 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #FFFFFF;
}

.card-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-name-text {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: clamp(22px, 2.6vw, 26px);
    font-weight: 700;
    line-height: 1.1;
    color: #FFFFFF;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.profile-age-text {
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.verified-shield {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #10B981;
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.5);
}

.card-metadata-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
}

    .meta-tag.intention {
        background: rgba(244, 63, 94, 0.35);
        border-color: rgba(244, 63, 94, 0.6);
        color: #FFF;
    }

/* Narrative Box (Bio, Prompts, Passions) */
.card-narrative-box {
    max-height: 90px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 2px;
}

.profile-bio-text {
    font-size: 12.5px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
}

.dating-prompt-bubble {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.prompt-bubble-question {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #FB7185;
}

.prompt-bubble-answer {
    font-size: 12.5px;
    font-style: italic;
    color: #FFFFFF;
    line-height: 1.4;
}

.profile-passions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.passion-pill {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10.5px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

/* ----------------- Floating Action Dock ----------------- */
.floating-action-dock {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 10px;
    padding: 6px 14px 10px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 10;
    height: 70px;
}

.dock-btn {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    flex-shrink: 0;
}

    .dock-btn:hover {
        transform: translateY(-2px) scale(1.06);
    }

    .dock-btn:active {
        transform: translateY(0) scale(0.94);
    }

    .dock-btn.btn-rewind {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        color: var(--text-muted);
    }

        .dock-btn.btn-rewind:hover {
            color: var(--text);
            background: var(--surface-hover);
        }

    .dock-btn.btn-pass {
        width: 52px;
        height: 52px;
        min-width: 52px;
        min-height: 52px;
        color: #EF4444;
        border-color: rgba(239, 68, 68, 0.35);
    }

        .dock-btn.btn-pass:hover {
            background: rgba(239, 68, 68, 0.12);
            box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
        }

    .dock-btn.btn-spark {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        color: #F59E0B;
        border-color: rgba(245, 158, 11, 0.35);
    }

        .dock-btn.btn-spark:hover {
            background: rgba(245, 158, 11, 0.14);
            box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
        }

    .dock-btn.btn-like {
        width: 58px;
        height: 58px;
        min-width: 58px;
        min-height: 58px;
        color: #FFFFFF;
        background: var(--gradient-brand);
        border: none;
        box-shadow: 0 6px 24px rgba(244, 63, 94, 0.45);
    }

        .dock-btn.btn-like:hover {
            box-shadow: 0 10px 30px rgba(244, 63, 94, 0.6);
        }

.card-status-dock {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 16px 10px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 10;
}

    .card-status-dock .dock-btn-row {
        display: flex;
        gap: 8px;
        width: 100%;
    }

        .card-status-dock .dock-btn-row .btn {
            flex: 1;
            justify-content: center;
        }

.dock-status-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.dock-pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary);
}

/* Directional Stamps */
.swipe-stamp-tag {
    position: absolute;
    top: 28px;
    z-index: 8;
    padding: 6px 20px;
    border-radius: var(--radius-md);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.12em;
    opacity: 0;
    pointer-events: none;
    border: 3.5px solid;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.12s ease;
}

    .swipe-stamp-tag.stamp-like {
        right: 24px;
        color: #10B981;
        border-color: #10B981;
        transform: rotate(14deg);
    }

    .swipe-stamp-tag.stamp-pass {
        left: 24px;
        color: #EF4444;
        border-color: #EF4444;
        transform: rotate(-14deg);
    }

/* Card Deal Animation */
.card-deal-animation {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.deal-fan {
    position: relative;
    width: 110px;
    height: 160px;
}

.deal-sheet {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.deal-sheet-1 {
    animation: dealSheet1 1.1s ease-in-out infinite;
}

.deal-sheet-2 {
    animation: dealSheet2 1.1s ease-in-out infinite;
}

.deal-sheet-3 {
    animation: dealSheet3 1.1s cubic-bezier(0.34, 1.4, 0.64, 1) infinite;
}

@keyframes dealSheet1 {
    0%, 100% {
        transform: translateX(-40px) rotate(-12deg);
    }

    50% {
        transform: translateX(-50px) rotate(-16deg) translateY(-8px);
    }
}

@keyframes dealSheet2 {
    0%, 100% {
        transform: translateX(40px) rotate(12deg);
    }

    50% {
        transform: translateX(50px) rotate(16deg) translateY(-8px);
    }
}

@keyframes dealSheet3 {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06) translateY(-12px);
    }
}

.deal-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.deal-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    animation: dealDotPulse 1.2s ease-in-out infinite;
}

@keyframes dealDotPulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.deal-caption {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}

/* Empty States */
.discover-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 32px;
    text-align: center;
    max-width: 380px;
    margin: auto;
}

.empty-icon-wrap {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-hover);
    color: var(--text-muted);
}

    .empty-icon-wrap.caught-up {
        background: var(--primary-soft);
        color: var(--primary);
    }

.empty-title {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.empty-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ----------------- Filter Preferences Drawer ----------------- */
.filter-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: stretch;
    justify-content: flex-end;
}

    .filter-drawer-overlay.open {
        display: flex;
    }

.filter-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.filter-drawer {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.filter-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
}

.filter-drawer-title {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.filter-drawer-sub {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

.filter-close-btn {
    border: none;
    background: var(--surface-hover);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

    .filter-close-btn:hover {
        color: var(--text);
        background: var(--border);
    }

.filter-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.filter-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--surface-hover);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.toggle-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: block;
}

.toggle-hint {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-section-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-inactive);
}

.filter-pill-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-choice-pill {
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

    .filter-choice-pill:hover {
        border-color: var(--primary);
    }

    .filter-choice-pill.active {
        background: var(--primary);
        color: #FFFFFF;
        border-color: var(--primary);
        box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
    }

.filter-age-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-age-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--surface-hover);
    border: 1px solid var(--border);
}

    .filter-age-box span {
        font-size: 12px;
        font-weight: 700;
        color: var(--text-muted);
    }

    .filter-age-box input {
        width: 100%;
        border: none;
        background: transparent;
        font-size: 15px;
        font-weight: 700;
        color: var(--text);
        padding: 0;
    }

        .filter-age-box input:focus {
            outline: none;
        }

.filter-age-dash {
    font-size: 18px;
    color: var(--text-muted);
}

.filter-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--surface-hover);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

    .filter-input-wrap input {
        width: 100%;
        border: none;
        background: transparent;
        font-size: 13.5px;
        color: var(--text);
        padding: 0;
    }

        .filter-input-wrap input:focus {
            outline: none;
        }

.filter-drawer-footer {
    display: flex;
    gap: 12px;
    padding: 18px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.filter-reset-btn {
    flex: 1;
}

.filter-apply-btn {
    flex: 2;
}


.editorial-photo-pane {
    position: relative;
    min-height: 300px;
    background: var(--surface-hover);
}

.editorial-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.editorial-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 10, 16, 0.05) 50%, rgba(9, 10, 16, 0.55) 100%);
    pointer-events: none;
}

.editorial-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.badge-premium {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
    background: rgba(9, 10, 16, 0.6);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
}

.badge-verification {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success);
    color: #04251a;
    box-shadow: 0 4px 14px rgba(52, 211, 153, 0.4);
    flex-shrink: 0;
}

.editorial-details-pane {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 30px 32px;
    overflow-y: auto;
    max-height: 640px;
}

.editorial-name-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.editorial-name {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 700;
    line-height: 1.1;
}

.editorial-age {
    font-size: 21px;
    font-weight: 600;
    color: var(--text-muted);
}

.editorial-pronouns {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    padding: 3px 12px;
    border-radius: var(--radius-full);
}

.editorial-subtext {
    font-size: 14px;
    color: var(--text-muted);
}

.editorial-intention {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    width: fit-content;
}

.editorial-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-inactive);
    margin-top: 6px;
}

.editorial-bio {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-muted);
}

.editorial-prompt-box {
    background: var(--gradient-brand-soft);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.editorial-prompt-question {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.editorial-prompt-answer {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    font-style: italic;
}

.editorial-interests-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.interest-tag {
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid rgba(139, 92, 246, 0.16);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 13px;
    border-radius: var(--radius-full);
}

.editorial-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 12px;
}

/* ================= MATCHES TAB ================= */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding: 24px 32px;
    align-content: start;
}

.matches-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 48px 24px;
    color: var(--text-muted);
}

.matches-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    margin-bottom: 6px;
}

.matches-empty-title {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.matches-empty-sub {
    max-width: 340px;
    font-size: 13.5px;
    line-height: 1.6;
}

/* ================= CHATS TAB ================= */
.chats-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Sessions list */
.sessions-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--border);
    background: var(--surface);
}

.sessions-sidebar-title {
    padding: 18px 20px;
    font-size: 15px;
    font-weight: 700;
    font-family: "DM Sans", sans-serif;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sessions-list-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.sessions-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.sessions-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

    .sessions-item:hover {
        background: var(--surface-hover);
    }

    .sessions-item.active {
        background: var(--primary-soft);
        border-color: rgba(139, 92, 246, 0.2);
    }

.sessions-item-details {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sessions-item-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.sessions-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sessions-item-time {
    font-size: 11px;
    color: var(--text-inactive);
    flex-shrink: 0;
}

.sessions-item-status-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.sessions-item-lastmsg {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Unread-message pill on a conversation in the sessions list */
.sessions-unread-badge {
    flex-shrink: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sessions-phase-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

    .sessions-phase-badge.active {
        background: var(--accent-soft);
        color: var(--accent);
    }

    .sessions-phase-badge.decision {
        background: var(--warning-bg);
        color: var(--warning);
    }

    .sessions-phase-badge.matched {
        background: var(--success-bg);
        color: var(--success);
    }

    .sessions-phase-badge.closed {
        background: var(--surface-hover);
        color: var(--text-inactive);
    }

/* Chat view */
.chat-view {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    grid-template-rows: 1fr;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: var(--bg);
}

.chat-empty-state {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

.chat-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.chat-empty-desc {
    font-size: 14px;
    max-width: 340px;
    line-height: 1.55;
}

.chat-main {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

/* Chat header */
.chat-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    min-height: 64px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}

.chat-view-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.chat-view-header-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

    .chat-view-header-text .chat-view-header-title,
    .chat-view-header-text .chat-view-header-status {
        width: 100%;
        display: block;
    }

.chat-view-header-title {
    font-size: 16px;
    font-weight: 700;
    font-family: "DM Sans", sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.chat-view-header-status {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Live partner presence under the chat title (online / offline + last active). */
.chat-header-presence .presence-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    flex: 0 0 auto;
}

.chat-header-presence.online {
    color: var(--success);
}

    .chat-header-presence.online .presence-dot {
        background: #10B981;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
    }

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.chat-timer-capsule {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: var(--radius-full);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

    .chat-timer-capsule.warn {
        background: var(--danger-bg);
        color: var(--danger);
        animation: pulseWarn 1s ease infinite;
    }

@keyframes pulseWarn {
    50% {
        opacity: 0.55;
    }
}

.mobile-only-btn {
    display: none;
}

.chat-action-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
}

/* More menu dropdown */
.more-menu-container {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 30;
    min-width: 170px;
    margin-top: 8px;
    padding: 6px;
    background: var(--glass-bg-strong);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

    .dropdown-menu.show {
        display: block;
        animation: dropdownIn 0.18s ease;
    }

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    background: transparent;
    border: none;
    text-align: left;
}

    .dropdown-item:hover {
        background: var(--surface-hover);
        color: var(--text);
    }

    .dropdown-item.danger {
        color: var(--danger);
    }

        .dropdown-item.danger:hover {
            background: var(--danger-bg);
        }

/* Messages */
.chat-messages-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.message-group {
    display: flex;
    flex-direction: column;
    max-width: 74%;
}

    .message-group.mine {
        align-self: flex-end;
        align-items: flex-end;
    }

    .message-group.theirs {
        align-self: flex-start;
        align-items: flex-start;
    }

.message-bubble-editorial {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    word-break: break-word;
    white-space: pre-wrap;
}

.message-group.mine .message-bubble-editorial {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 5px;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.22);
}

.message-group.theirs .message-bubble-editorial {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-bottom-left-radius: 5px;
}

.message-time-meta {
    font-size: 11px;
    color: var(--text-inactive);
    margin-top: 4px;
    padding: 0 4px;
}

/* Delivery/read receipts (WhatsApp-style ticks) */
.message-ticks {
    display: inline-block;
    margin-left: 5px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -2px;
    vertical-align: -1px;
}

    .message-ticks.sent {
        color: var(--text-inactive);
    }

    .message-ticks.delivered {
        color: var(--text-muted);
    }

    .message-ticks.read {
        color: var(--accent);
    }

/* Media messages (image / GIF / voice note) */
.message-media-bubble {
    padding: 6px;
    max-width: 300px;
    overflow: hidden;
}

.message-group.mine .message-media-bubble {
    background: var(--primary-soft);
    color: var(--text);
    box-shadow: none;
}

.message-media {
    display: block;
    width: 100%;
    max-width: 288px;
    max-height: 320px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.message-voice-bubble {
    padding: 8px 10px;
    max-width: 300px;
    display: flex;
    align-items: center;
}

.message-group.mine .message-voice-bubble {
    background: var(--primary-soft);
    color: var(--text);
    box-shadow: none;
}

.message-voice-bubble audio {
    width: 100%;
    min-width: 200px;
    max-width: 280px;
    height: 40px;
}

    .message-voice-bubble audio::-webkit-media-controls-panel {
        background: transparent;
    }

.system-event-bubble {
    align-self: center;
    max-width: 90%;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

/* Icebreakers */
.icebreakers-shelf {
    display: flex;
    gap: 8px;
    padding: 10px 20px;
    overflow-x: auto;
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.icebreaker-chip {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

    .icebreaker-chip:hover {
        color: var(--accent);
        border-color: rgba(236, 72, 153, 0.32);
        background: var(--accent-soft);
    }

/* Composer */
.chat-composer-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}

.chat-composer-main {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

    .chat-composer-main textarea {
        flex: 1;
        min-width: 0;
        min-height: 46px;
        max-height: 168px;
        resize: none;
        overflow-y: auto;
        border-radius: var(--radius-full);
        line-height: 1.4;
        padding-top: 12px;
        padding-bottom: 12px;
    }

.chat-composer-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.composer-btn {
    width: 42px;
    height: 42px;
    min-height: 42px;
    border-radius: var(--radius-full);
    background: var(--surface-elevated);
    transition: var(--transition);
}

    .composer-btn:hover {
        background: var(--surface-hover);
    }

    .composer-btn.active {
        background: var(--accent-soft);
        color: var(--accent);
    }

    .composer-btn.gif-composer-btn {
        color: var(--accent);
    }

    .composer-btn.recording {
        background: var(--danger);
        color: #fff;
        animation: pulseWarn 1s ease infinite;
    }

#chatSendBtn {
    flex-shrink: 0;
    min-width: 46px;
    padding: 0;
}

/* Emoji picker */
.emoji-picker {
    display: none;
    max-height: 220px;
    overflow-y: auto;
    padding: 10px 14px 14px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}

    .emoji-picker.open {
        display: block;
        animation: dropdownIn 0.18s ease;
    }

.emoji-picker-header {
    position: sticky;
    top: -10px;
    padding: 4px 2px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-inactive);
    background: var(--surface);
    z-index: 1;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
}

.emoji-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-size: 20px;
    line-height: 1;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

    .emoji-cell:hover {
        background: var(--surface-hover);
        transform: scale(1.15);
    }

    .emoji-cell:active {
        transform: scale(1.25);
    }

/* Voice note recorder */
.voice-recorder-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    background: var(--danger-bg);
    color: var(--text);
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
}

.rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
    animation: pulseWarn 1s ease infinite;
    flex-shrink: 0;
}

.voice-rec-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-rec-timer {
    font-variant-numeric: tabular-nums;
    color: var(--danger);
    font-weight: 700;
}

/* GIF picker */
.gif-picker-card {
    max-width: 560px;
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 40px);
}

.gif-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.gif-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.gif-cat-chip {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

    .gif-cat-chip:hover {
        color: var(--text);
        border-color: var(--border-hover);
    }

    .gif-cat-chip.active {
        background: var(--primary);
        border-color: var(--primary);
        color: #fff;
    }

.gif-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    overflow-y: auto;
    min-height: 0;
}

.gif-item {
    position: relative;
    padding: 0;
    border: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-hover);
    aspect-ratio: 1;
    cursor: pointer;
    transition: var(--transition);
}

    .gif-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .gif-item:hover {
        transform: scale(1.03);
        box-shadow: var(--shadow-md);
    }

/* Decision overlay (Like / Pass) */
.decision-shelf {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--glass-bg-strong);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    overflow-y: auto;
}

.decision-view-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-lg);
}

.decision-view-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.decision-view-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 26px;
}

.decision-view-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

    .decision-view-actions .btn {
        flex: 1;
        min-height: 50px;
        font-size: 15px;
    }

/* Partner details panel */
.partner-profile-panel {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    min-height: 0;
    overflow-y: auto;
    background: var(--surface);
    border-left: 1px solid var(--border);
}

.partner-profile-header-title {
    font-size: 15px;
    font-weight: 700;
    font-family: "DM Sans", sans-serif;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.partner-locked-state {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .partner-locked-state > svg {
        color: var(--accent);
    }

.partner-locked-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.partner-locked-desc {
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-muted);
}

.partner-unlocked-state {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.partner-detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-inactive);
    margin-bottom: 4px;
}

.partner-detail-value {
    font-size: 14px;
    color: var(--text);
    line-height: 1.45;
}

/* ================= MUTUAL MATCH CELEBRATION ================= */
.match-celebration-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    overflow-y: auto;
}

.confetti-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 10001;
}

.confetti-piece {
    position: absolute;
    top: -20px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    to {
        transform: translateY(115vh) rotate(720deg);
        opacity: 0.75;
    }
}

.celebration-card {
    max-width: 460px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
    animation: fadeInCelebration 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fadeInCelebration {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.celebration-title {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 8px;
}

.celebration-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 36px;
}

.celebration-avatars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 26px;
    margin-bottom: 36px;
    position: relative;
}

.celebration-avatar-ring {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    padding: 4px;
    background: var(--gradient-brand);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.35);
}

.celebration-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface);
}

.celebration-heart {
    position: absolute;
    z-index: 2;
    background: var(--bg);
    border: 1px solid var(--border);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.celebration-intro-text {
    font-size: 14px;
    color: var(--text-muted);
    background: var(--gradient-brand-soft);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 32px;
    line-height: 1.5;
}

/* ================= PROFILE STUDIO TAB ================= */
.profile-studio-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding: 24px 32px 48px;
}

.studio-header {
    margin-bottom: 32px;
}

.studio-eyebrow {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.studio-title {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: clamp(26px, 3.2vw, 32px);
    font-weight: 700;
    line-height: 1.15;
    margin: 4px 0 0;
}

.studio-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin: 4px 0 0;
    max-width: 600px;
}

.studio-grid-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 32px;
    align-items: start;
}

@media (max-width: 1020px) {
    .studio-grid-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .studio-form-column {
        min-width: 0;
    }

    .studio-preview-column {
        display: none;
    }

    .profile-studio-page {
        padding: 16px;
    }
}

.studio-form-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.studio-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: var(--shadow-sm);
}

.studio-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.card-header-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.studio-card-title {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 17px;
    font-weight: 700;
    margin: 0;
}

.studio-card-sub {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 3px 0 0;
}

/* Photo Dropzone */
.studio-photo-dropzone {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 20px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    background: var(--surface-hover);
    transition: var(--transition);
}

    .studio-photo-dropzone:hover {
        border-color: var(--primary);
        background: var(--primary-soft);
    }

.studio-avatar-ring {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    padding: 3px;
    background: var(--gradient-brand);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.25);
}

.studio-avatar-img,
.studio-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.studio-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    color: var(--text-muted);
}

.studio-photo-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.photo-action-hint {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.photo-spec-note {
    font-size: 12px;
    color: var(--text-muted);
}

.photo-controls-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

    .input-with-icon svg {
        position: absolute;
        left: 12px;
        color: var(--text-muted);
        pointer-events: none;
    }

    .input-with-icon input {
        padding-left: 36px;
        width: 100%;
    }

/* Intention Selector Grid */
.intention-grid-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.intention-choice-card {
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    background: var(--surface-hover);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .intention-choice-card:hover {
        border-color: rgba(244, 63, 94, 0.5);
        background: var(--surface);
        transform: translateY(-2px);
    }

    .intention-choice-card.active {
        border-color: var(--primary);
        background: var(--primary-soft);
        box-shadow: 0 4px 16px rgba(244, 63, 94, 0.18);
    }

.intention-card-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

.intention-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
}

.intention-card-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Suggested Tags */
.suggested-tags-tray {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.suggested-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-right: 4px;
}

.suggested-tag-btn {
    padding: 7px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface-hover);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

    .suggested-tag-btn:hover {
        background: var(--primary-soft);
        border-color: var(--primary);
        color: var(--primary);
    }

.studio-save-bar {
    margin-top: 12px;
}

.studio-save-btn {
    display: flex;
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 30px rgba(244, 63, 94, 0.4);
}

@media (max-width: 640px) {
    .studio-save-btn {
        max-width: none;
    }
}

/* ----------------- Smartphone Simulator Preview ----------------- */
.studio-preview-column {
    position: sticky;
    top: 0;
}

.preview-sticky-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.preview-pill-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.preview-sync-hint {
    font-size: 11.5px;
    color: var(--text-muted);
}

.phone-mockup-frame {
    width: 100%;
    max-width: 360px;
    height: 600px;
    border-radius: 40px;
    background: #090A10;
    padding: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    border: 4px solid rgba(255, 255, 255, 0.12);
    position: relative;
    margin: 0 auto;
}

.phone-camera-notch {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 18px;
    border-radius: var(--radius-full);
    background: #000000;
    z-index: 10;
}

.phone-screen-content {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background: #141620;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.sim-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 18px 8px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
}

.sim-app-name {
    font-family: var(--font-serif, "Playfair Display", serif);
    letter-spacing: 0.02em;
}

.sim-presence-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 8px #10B981;
}

.sim-dating-card {
    flex: 1;
    margin: 6px 12px 10px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: #232635;
}

.sim-photo-layer {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.sim-photo-img,
.sim-photo-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sim-photo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    font-weight: 700;
}

.sim-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.85) 100%);
}

.sim-card-overlay-top {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.sim-online-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    color: #FFFFFF;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.sim-online-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10B981;
}

.sim-card-overlay-bottom {
    position: relative;
    z-index: 2;
    padding: 14px;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sim-name-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.sim-name {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 18px;
    font-weight: 700;
}

.sim-age {
    font-size: 15px;
    opacity: 0.85;
}

.sim-subtext {
    font-size: 11px;
    opacity: 0.75;
}

.sim-bio {
    font-size: 11px;
    line-height: 1.4;
    margin: 4px 0 0;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sim-dock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 0 16px;
}

.sim-dock-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
}

    .sim-dock-circle.pass {
        background: rgba(239, 68, 68, 0.15);
        color: #EF4444;
        border: 1px solid rgba(239, 68, 68, 0.3);
    }

    .sim-dock-circle.star {
        background: rgba(245, 158, 11, 0.15);
        color: #F59E0B;
        border: 1px solid rgba(245, 158, 11, 0.3);
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .sim-dock-circle.heart {
        background: var(--gradient-brand);
        color: #FFFFFF;
        width: 44px;
        height: 44px;
        font-size: 17px;
    }

/* ================= SETTINGS & SAFETY TAB ================= */
.settings-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding: 28px 32px 48px;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

.settings-hero-header {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.settings-shield-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-xl);
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(244, 63, 94, 0.2);
}

.settings-badge-eyebrow {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.settings-hero-heading {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: clamp(26px, 3.2vw, 32px);
    font-weight: 700;
    margin: 3px 0 0;
}

.settings-hero-description {
    font-size: 14px;
    color: var(--text-muted);
    margin: 4px 0 0;
    line-height: 1.5;
}

.settings-grid-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-panel-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 24px 26px;
    box-shadow: var(--shadow-sm);
}

.settings-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.settings-head-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--surface-hover);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .settings-head-icon.danger {
        background: rgba(239, 68, 68, 0.12);
        color: var(--danger);
    }

.settings-panel-title {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 17px;
    font-weight: 700;
    margin: 0;
}

.settings-panel-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 3px 0 0;
}

.settings-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

    .settings-row-item:last-child {
        border-bottom: none;
        padding-bottom: 4px;
    }

.settings-item-info {
    flex: 1;
    min-width: 0;
}

.settings-item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.settings-vip-tag {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #FFFFFF;
}

.settings-check-tag {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.settings-item-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 3px 0 0;
    line-height: 1.45;
}

.danger-zone-card {
    border-color: rgba(239, 68, 68, 0.25);
    background: linear-gradient(180deg, var(--surface) 0%, rgba(239, 68, 68, 0.02) 100%);
}

/* Modern Switch */
.modern-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

    .modern-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border-hover);
    border-radius: 24px;
    transition: var(--transition);
}

    .switch-slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background: #FFFFFF;
        border-radius: 50%;
        transition: var(--transition);
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

.modern-switch input:checked + .switch-slider {
    background: var(--primary);
}

    .modern-switch input:checked + .switch-slider:before {
        transform: translateX(20px);
    }

/* Safe Dating Toolkit Modal */
.safety-guide-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.safety-guide-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.safety-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
}

.safety-tip-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: var(--surface-hover);
    border: 1px solid var(--border);
}

.tip-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.tip-content {
    flex: 1;
}

.tip-title {
    font-size: 13.5px;
    font-weight: 700;
    margin: 0 0 3px;
    color: var(--text);
}

.tip-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

.modal-warning-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.14);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.modal-actions-row {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Detail Page Header & Container */
.profile-detail-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 28px 40px;
}

.detail-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12.5px;
    font-weight: 700;
}

    .status-pill.connected {
        background: rgba(16, 185, 129, 0.15);
        color: #10B981;
        border: 1px solid rgba(16, 185, 129, 0.25);
    }

    .status-pill.candidate {
        background: var(--surface-hover);
        color: var(--text-muted);
        border: 1px solid var(--border);
    }

.detail-container {
    display: flex;
    justify-content: center;
    width: 100%;
}


/* ================= ADMIN PANEL ================= */
.admin-page {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.admin-layout {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 0 0 auto;
    padding: 28px 32px 40px;
}

    /* Hero sits inside the centered layout container so the shield icon, title,
   and description line up exactly with the stats/toolbar/table below. */
    .admin-layout .settings-hero-header {
        margin-bottom: 0;
    }

/* Consistent violet identity for the admin suite (icon, glow, eyebrow). */
.settings-shield-icon.admin-accent {
    background: rgba(139, 92, 246, 0.14);
    color: #8B5CF6;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.25);
}

.settings-badge-eyebrow.admin-accent-text {
    color: #8B5CF6;
}

.admin-stats {
    display: grid;
    /* Fluid: 3-up on desktop/tablet, wraps to 1 column on narrow phones
       without any extra breakpoints (fixes off-screen "Blocked" card). */
    grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
    gap: 14px;
}

.admin-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-stat-chip {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .admin-stat-chip.chip-online {
        background: rgba(16, 185, 129, 0.12);
        color: #10B981;
    }

    .admin-stat-chip.chip-blocked {
        background: color-mix(in srgb, var(--danger) 12%, transparent);
        color: var(--danger);
    }

.admin-stat-value {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: var(--primary);
}

.admin-stat-label {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-search {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-muted);
}

    .admin-search input {
        flex: 1;
        min-height: 34px;
        border: none;
        background: none;
        color: var(--text);
        font-size: 14px;
        outline: none;
    }

.admin-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 9px 14px;
    cursor: pointer;
    user-select: none;
}

    .admin-filter-chip input {
        accent-color: var(--primary);
    }

.admin-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: visible;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

    .admin-table thead th {
        text-align: left;
        font-size: 11.5px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--text-muted);
        padding: 14px 18px;
        border-bottom: 1px solid var(--border);
        background: color-mix(in srgb, var(--surface) 96%, var(--text) 4%);
    }

    .admin-table tbody td {
        padding: 14px 18px;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
    }

    .admin-table tbody tr:last-child td {
        border-bottom: none;
    }

.admin-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 18px !important;
}

.admin-member {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-soft, rgba(154, 52, 18, 0.14));
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    overflow: hidden;
    flex-shrink: 0;
    /* Initials stay underneath; the photo overlays them and removes itself
       on load failure (404), so broken images fall back to initials. */
    position: relative;
}

    .admin-avatar img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.admin-member-info {
    min-width: 0;
}

.admin-member-name {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-member-email {
    font-size: 12.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-detail {
    color: var(--text-muted);
    font-size: 13px;
}

.admin-status-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.admin-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
}

.admin-badge-admin {
    background: var(--primary-soft, rgba(154, 52, 18, 0.14));
    color: var(--primary);
}

.admin-badge-verified {
    background: rgba(16, 185, 129, 0.14);
    color: #0f9d6e;
}

.admin-badge-blocked {
    background: var(--danger-bg, rgba(248, 113, 113, 0.16));
    color: var(--danger);
}

.admin-badge-plain {
    background: var(--surface-hover, rgba(255, 255, 255, 0.04));
    color: var(--text-muted);
}

.admin-presence-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-online {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #0f9d6e;
}

.admin-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.admin-offline {
    font-size: 12.5px;
    color: var(--text-muted);
}

.admin-last {
    font-size: 12px;
    color: var(--text-muted);
}

.admin-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.admin-actions-note {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
    border-radius: var(--radius-md);
}

.btn-danger-outline {
    background: none;
    border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
    color: var(--danger);
}

    .btn-danger-outline:hover {
        background: var(--danger-bg, rgba(248, 113, 113, 0.12));
        border-color: var(--danger);
    }

/* ================= MODALS ================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 6, 10, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

    .modal-overlay.open {
        opacity: 1;
        visibility: visible;
    }

.modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    font-family: "DM Sans", sans-serif;
    margin-bottom: 12px;
}

.modal-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.55;
}

/* ================= CALL OVERLAYS (voice & video) ================= */
.call-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 24px;
}

    .call-overlay .active-call-backdrop {
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse at 50% 30%, #141621 0%, #090a10 75%);
        z-index: -1;
    }

/* Incoming call card */
.incoming-call-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    animation: fadeInCelebration 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.call-avatar-ring {
    width: 116px;
    height: 116px;
    border-radius: 50%;
    padding: 4px;
    background: var(--gradient-brand);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.4);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .call-avatar-ring img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
        background: var(--surface);
    }

.call-overlay-title {
    font-size: 20px;
    font-weight: 700;
    font-family: "DM Sans", sans-serif;
}

.call-overlay-sub {
    font-size: 14px;
    color: var(--text-muted);
}

.call-overlay-timer {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.call-overlay-actions {
    display: flex;
    gap: 28px;
    margin-top: 28px;
}

.call-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--surface-elevated);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    min-width: 84px;
    cursor: pointer;
    transition: var(--transition);
}

    .call-action-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .call-action-btn.call-accept {
        background: var(--success);
        color: #04251a;
        box-shadow: 0 8px 24px rgba(52, 211, 153, 0.4);
    }

    .call-action-btn.call-decline {
        background: var(--danger);
        color: #fff;
        box-shadow: 0 8px 24px rgba(248, 113, 113, 0.4);
    }

/* Active call */
.remote-video {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.remote-call-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.local-video-container {
    display: none;
    position: absolute;
    top: 24px;
    right: 24px;
    width: min(160px, 30vw);
    height: min(210px, 38vh);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    background: #111;
    z-index: 3;
    overflow: hidden;
}

    .local-video-container video.local-video-elem {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.local-video-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e1b4b; /* deep indigo background */
    z-index: 2;
}

    .local-video-fallback img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.local-video-fallback-initials {
    font-size: min(48px, 10vw);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    background: linear-gradient(135deg, var(--accent), var(--primary-soft));
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Call Avatar Fallback Initials for remote user placeholder */
.call-avatar-fallback-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--primary-soft));
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.call-controls {
    position: absolute;
    bottom: calc(28px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 16px;
    z-index: 5;
    padding: 14px 22px;
    background: rgba(9, 10, 16, 0.72);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
}

.call-control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 64px;
    min-height: 64px;
    padding: 10px 4px 8px;
    border-radius: 18px;
    border: 2px solid transparent;
    background: rgba(255,255,255,0.10);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    position: relative;
}

    .call-control-btn:hover {
        background: rgba(255,255,255,0.18);
        transform: translateY(-2px);
    }

    .call-control-btn:active {
        transform: translateY(0);
    }

/* ── Label under icon ── */
.call-btn-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1;
    color: rgba(255,255,255,0.80);
    white-space: nowrap;
    pointer-events: none;
    transition: color 0.2s;
}

/* ── Dual-state icon visibility ──
   By default show the "on" icon; when the button has .muted / .cam-off
   hide the "on" icon and show the "off" (slashed) icon instead. */
.call-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-btn-icon--off {
    display: none;
}

/* MUTED state (mic button) */
.call-control-btn.muted {
    background: rgba(239, 68, 68, 0.20);
    border-color: rgba(239, 68, 68, 0.60);
}

    .call-control-btn.muted .call-btn-icon--on {
        display: none;
    }

    .call-control-btn.muted .call-btn-icon--off {
        display: flex;
    }

    .call-control-btn.muted .call-btn-label {
        color: #f87171;
    }

/* CAM-OFF state (camera button) */
.call-control-btn.cam-off {
    background: rgba(239, 68, 68, 0.20);
    border-color: rgba(239, 68, 68, 0.60);
}

    .call-control-btn.cam-off .call-btn-icon--on {
        display: none;
    }

    .call-control-btn.cam-off .call-btn-icon--off {
        display: flex;
    }

    .call-control-btn.cam-off .call-btn-label {
        color: #f87171;
    }

/* END CALL button */
.call-control-btn.call-control-end {
    background: #ef4444;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.50);
    width: 72px;
    min-height: 72px;
    border-radius: 50%;
    padding: 12px 4px 8px;
}

    .call-control-btn.call-control-end:hover {
        background: #dc2626;
        transform: translateY(-2px) scale(1.05);
    }

/* ================= RESPONSIVE ================= */

/* --- Large screens (desktop) --- */
@media (min-width: 1440px) {
    .sidebar {
        width: 264px;
    }

    .chats-grid {
        grid-template-columns: 320px minmax(0, 1fr);
    }
}

/* --- Editorial card stacks below 1120px --- */
@media (max-width: 1120px) {
    .editorial-card {
        grid-template-columns: 1fr;
    }

    .editorial-photo-pane {
        height: clamp(300px, 44vh, 460px);
    }

    .editorial-details-pane {
        max-height: none;
        padding: 24px 28px;
    }

    .discover-layout {
        padding: 20px;
    }

    .profile-editor-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}

/* --- Partner details become a bottom sheet below 1024px --- */
@media (max-width: 1024px) {
    .chat-view {
        grid-template-columns: 1fr;
    }

    .partner-profile-panel {
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
        max-height: 72dvh;
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-2xl);
        box-shadow: var(--shadow-lg);
        z-index: 300;
        background: var(--glass-bg-strong);
        backdrop-filter: var(--blur);
        -webkit-backdrop-filter: var(--blur);
        transform: translateY(130%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

        .partner-profile-panel.partner-open {
            transform: translateY(0);
        }

    .profile-editor-layout {
        grid-template-columns: 1fr;
    }

    .profile-preview-card {
        position: static;
    }
}

/* --- App shell collapses to mobile layout --- */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        display: none;
    }

    .mobile-header {
        display: flex;
    }

    .mobile-nav-bar {
        display: grid;
    }

    .tab-header {
        padding: 20px 20px 16px;
    }

    .tab-subtitle {
        font-size: 13px;
    }
}

/* --- Chats collapse below 860px (list <-> chat navigation) --- */
@media (max-width: 860px) {
    .chats-grid {
        grid-template-columns: 1fr;
    }

    .chat-view {
        display: none;
    }

        .chat-view.active-mobile {
            display: grid;
            grid-template-columns: 1fr;
        }

    .sessions-sidebar.hide-mobile {
        display: none;
    }

    .mobile-only-btn {
        display: inline-flex;
    }

    .chat-view-header {
        padding: 10px 14px;
    }

    .chat-timer-capsule {
        padding: 6px 10px;
        font-size: 12px;
    }

    .chat-header-actions {
        gap: 6px;
    }

    .chat-composer-box {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    }

    .chat-composer-main {
        align-items: flex-end;
    }

    .chat-composer-tools {
        gap: 8px;
    }

    .composer-btn {
        width: 44px;
        height: 44px;
        min-height: 44px;
    }

    #chatSendBtn {
        min-width: 50px;
    }
}

/* --- Discover collapses to a single column below 900px --- */
@media (max-width: 900px) {
    .discover-container-layout {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 6px 10px 10px;
        gap: 6px;
        overflow: hidden;
        min-height: 0;
    }

    .discover-sidebar-card {
        display: none;
    }

    .discover-main-stage {
        flex: 1;
        min-height: 0;
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
        display: flex;
        align-items: stretch;
        justify-content: center;
        padding: 0;
    }

    /* Deck fills whatever space the top bar + nav leaves, so the
       action dock is always fully visible on screen. */
    .dating-card-deck {
        max-width: 400px;
        width: 100%;
        height: 100%;
        max-height: none;
        min-height: 0;
        flex-shrink: 0;
        margin: 0 auto;
    }

    .discover-hero-view {
        padding: 20px 12px 28px;
    }
}

/* --- Small phones --- */
@media (max-width: 640px) {
    .tab-header {
        padding: 18px 16px 14px;
    }

    .tab-title {
        font-size: 22px;
    }

    .tab-header-actions .btn span {
        display: none;
    }

    .tab-header-actions .btn {
        padding: 10px 12px;
    }

    .discover-top-bar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 16px 12px;
    }

    .discover-bar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .discover-heading {
        font-size: 21px;
    }

    .discover-subheading {
        font-size: 12px;
        line-height: 1.5;
    }

    .discover-layout {
        padding: 12px 10px 20px;
    }

    .discover-stack-card {
        border-radius: var(--radius-xl);
    }

    .circle-card {
        padding: 22px 18px 12px;
    }

    .circle-avatar-ring {
        width: 118px;
        height: 118px;
    }

    .circle-back .circle-avatar-ring {
        width: 100px;
        height: 100px;
    }

    .card-body {
        padding: 16px 4px 4px;
    }

    .card-action-bar,
    .card-connect-bar {
        padding: 14px 16px 16px;
    }

    .swipe-btn {
        width: 56px;
        height: 56px;
    }

    .chat-messages-container {
        padding: 14px;
    }

    .message-group {
        max-width: 84%;
    }

    .icebreakers-shelf {
        padding: 10px 14px;
    }

    .emoji-picker {
        max-height: 42dvh;
        padding: 8px 10px 12px;
    }

    .emoji-picker-header {
        font-size: 10px;
        padding-bottom: 6px;
    }

    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 4px;
    }

    .emoji-cell {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .gif-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .local-video {
        width: 110px;
        height: 150px;
        top: 12px;
        right: 12px;
    }

    .call-control-btn {
        width: 46px;
        height: 46px;
    }

    .call-controls {
        gap: 14px;
        padding: 8px 14px;
    }

    .onboarding-card {
        padding: 28px 20px;
        border-radius: var(--radius-xl);
    }

    .onboarding-title {
        font-size: 21px;
    }

    .onboarding-actions {
        flex-direction: column-reverse;
    }

        .onboarding-actions .btn {
            width: 100%;
        }

    .profile-editor-layout {
        padding: 20px 16px;
    }

    .profile-editor-card,
    .settings-section {
        padding: 20px;
    }

    .studio-form-column {
        min-width: 0;
    }

    .studio-card {
        padding: 20px 18px;
    }

        .studio-card .form-row {
            min-width: 0;
        }

    .studio-photo-dropzone {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
        text-align: center;
    }

    .studio-photo-details {
        align-items: center;
        min-width: 0;
    }

    .photo-controls-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .intention-grid-selector {
        grid-template-columns: 1fr;
    }

    .matches-grid {
        padding: 16px 16px;
    }

    .matches-empty {
        padding: 32px 16px;
    }

    .settings-layout {
        padding: 20px 16px;
    }

    .settings-hero {
        padding: 28px 16px 0;
    }

    .settings-hero-title {
        font-size: 28px;
    }

    .admin-layout {
        padding: 20px 16px;
    }

    .admin-stat-value {
        font-size: 24px;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 12px;
        padding: 14px 16px;
    }

    .admin-table tbody td {
        display: block;
        border: none;
        padding: 2px 0;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .admin-member {
        align-items: flex-start;
        gap: 10px;
    }

    .admin-member-info {
        min-width: 0;
    }

    .admin-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 8px;
    }

    .settings-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

        .settings-row .btn {
            width: 100%;
        }

    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal-card {
        max-width: 100%;
        border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
        max-height: 90dvh;
        padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    }

    .decision-view-card {
        padding: 26px 20px;
    }

    .celebration-avatar-ring {
        width: 84px;
        height: 84px;
    }

    .celebration-avatar {
        width: 76px;
        height: 76px;
    }

    .match-celebration-overlay {
        padding: 24px 16px;
    }
}

/* --- Narrow phones: declutter the chat header so nothing overlaps --- */
@media (max-width: 480px) {
    #partnerDetailsBtn {
        display: none;
    }

    .chat-timer-capsule {
        padding: 5px 8px;
        font-size: 11px;
    }

    .chat-view-header-left {
        gap: 8px;
    }
}

@media (max-width: 380px) {
    .chat-view-header-title {
        font-size: 14px;
    }

    .chat-view-header-status {
        font-size: 11px;
    }

    .chat-header-actions .icon-btn {
        width: 38px;
        height: 38px;
        min-height: 38px;
    }

    .chat-action-btn {
        width: 38px;
        height: 38px;
    }
}

/* ==========================================================================
   DISCOVER — REDESIGN (photo card deck, responsive for laptop & mobile)
   Supersedes the older circular-avatar deck styles above.
   ========================================================================== */

/* ------------------------- Page shell ------------------------- */
.discover-page {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.discover-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}

.discover-bar-info {
    min-width: 0;
}

.discover-heading {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 23px;
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
}

.discover-subheading {
    font-size: 13px;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.discover-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.discover-action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: var(--radius-full);
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

    .discover-action-btn svg {
        flex-shrink: 0;
    }

    .discover-action-btn:hover {
        border-color: var(--border-hover);
        background: var(--surface-hover);
        color: var(--primary);
    }

.filter-indicator-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px var(--surface);
    display: none;
}

/* ------------------------- Layout grid ------------------------- */
.discover-container-layout {
    position: relative;
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    padding: 20px 24px;
    align-items: stretch;
    overflow: hidden;
}

/* ------------------------- Sidebar: your dating card ------------------------- */
.discover-sidebar-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    align-self: start;
    position: relative;
    overflow: hidden;
}

    .discover-sidebar-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--gradient-brand);
        z-index: 1;
    }

    .discover-sidebar-card::after {
        content: "";
        position: absolute;
        top: -60px;
        right: -60px;
        width: 160px;
        height: 160px;
        border-radius: 50%;
        background: var(--gradient-brand-soft);
        filter: blur(40px);
        pointer-events: none;
    }

.sidebar-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.sidebar-card-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.sidebar-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--surface-hover);
    transition: var(--transition);
}

    .sidebar-edit-link:hover {
        color: var(--accent);
        background: var(--primary-soft);
    }

.sidebar-profile-box {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 2;
}

.sidebar-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.sidebar-avatar-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 2.5px;
    background: var(--gradient-brand);
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.25);
    position: relative;
    overflow: hidden;
}

.sidebar-avatar-img,
.sidebar-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-hover);
    font-weight: 700;
    font-size: 20px;
    color: var(--text);
}

.sidebar-online-beacon {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #10B981;
    border: 2.5px solid var(--surface);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.sidebar-profile-name {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.sidebar-profile-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 3px 0 0;
}

.sidebar-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    position: relative;
    z-index: 2;
}

.sidebar-tag {
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--surface-hover);
    color: var(--text);
    border: 1px solid var(--border);
}

    .sidebar-tag.highlight {
        background: var(--primary-soft);
        color: var(--primary);
        border-color: rgba(244, 63, 94, 0.2);
    }

/* Profile strength meter */
.sidebar-completeness {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    z-index: 2;
}

.completeness-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.completeness-pct {
    color: var(--primary);
    letter-spacing: 0;
}

.completeness-track {
    height: 6px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.completeness-bar {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: var(--gradient-brand);
    transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Radar insight */
.discovery-radar-card {
    background: linear-gradient(145deg, var(--surface-hover) 0%, var(--surface) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.radar-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radar-icon-pulse {
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
}

.radar-ping {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid var(--primary);
    opacity: 0.7;
    animation: radarPingAnim 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radarPingAnim {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.radar-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
}

.radar-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

.radar-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.radar-pill {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

/* ------------------------- Main stage ------------------------- */
.discover-main-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 0;
    overflow: visible;
    padding: 6px 6px 14px;
}

    .discover-main-stage::before,
    .discover-main-stage::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        filter: blur(80px);
        pointer-events: none;
        z-index: 0;
    }

    .discover-main-stage::before {
        width: 360px;
        height: 360px;
        top: 5%;
        left: 8%;
        background: radial-gradient(circle, rgba(244, 63, 94, 0.15), transparent 70%);
        animation: blobDrift 14s ease-in-out infinite;
    }

    .discover-main-stage::after {
        width: 300px;
        height: 300px;
        bottom: 5%;
        right: 8%;
        background: radial-gradient(circle, rgba(251, 113, 133, 0.13), transparent 70%);
        animation: blobDrift 16s ease-in-out infinite reverse;
    }

@keyframes blobDrift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-20px, 24px) scale(1.06);
    }
}

/* ------------------------- Hero view ------------------------- */
.discover-hero-view {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 100%;
    padding: 28px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.hero-sparkle-halo {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-brand-soft);
    border: 1px solid rgba(244, 63, 94, 0.25);
    box-shadow: 0 0 50px rgba(244, 63, 94, 0.2);
    animation: heroHaloPulse 3s ease-in-out infinite;
}

.hero-sparkle-icon {
    color: var(--primary);
    animation: heroIconFloat 3s ease-in-out infinite;
}

@keyframes heroHaloPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 35px rgba(244, 63, 94, 0.2);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 0 65px rgba(244, 63, 94, 0.4);
    }
}

@keyframes heroIconFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.hero-headline {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: clamp(26px, 3.2vw, 34px);
    font-weight: 700;
    line-height: 1.18;
    margin: 0;
}

.hero-lead {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    max-width: 380px;
}

.hero-cta-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 36px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--gradient-brand);
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 10px 32px rgba(244, 63, 94, 0.4);
    transition: var(--transition);
    overflow: hidden;
}

    .hero-cta-btn:hover {
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 14px 44px rgba(244, 63, 94, 0.55);
    }

    .hero-cta-btn:active {
        transform: translateY(0) scale(0.98);
    }

.hero-trust-badges {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 6px;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-inactive);
}

    .trust-badge svg {
        color: var(--primary);
    }

/* ------------------------- Dating card deck ------------------------- */
.dating-card-deck {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    height: min(calc(100dvh - 190px), 640px);
    min-height: 470px;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    flex-shrink: 0;
}

.dating-card {
    position: absolute;
    inset: 0;
    border-radius: 26px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    user-select: none;
    touch-action: pan-y;
    will-change: transform;
    cursor: grab;
}

    .dating-card.dragging {
        cursor: grabbing;
    }

    .dating-card.deck-back-1 {
        z-index: 1;
        transform: translateY(14px) scale(0.965);
        opacity: 0.95;
        pointer-events: none;
    }

    .dating-card.deck-back-2 {
        z-index: 0;
        transform: translateY(28px) scale(0.93);
        opacity: 0.85;
        pointer-events: none;
    }

    .dating-card.top-active-card {
        z-index: 2;
    }

    .dating-card.card-reveal-in {
        animation: cardRevealPop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

@keyframes cardRevealPop {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.94);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ------------------------- Photo card ------------------------- */
.discover-card-photo-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.discover-card-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discover-card-photo-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: clamp(46px, 9vw, 88px);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text);
    background: linear-gradient(160deg, var(--gradient-brand-soft), var(--surface-hover));
    border-radius: 0;
}

.discover-card-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0) 32%, rgba(0, 0, 0, 0.30) 55%, rgba(0, 0, 0, 0.82) 100%);
    pointer-events: none;
    z-index: 1;
}

.discover-card-scrim-thin {
    opacity: 0.35;
}

.discover-card-top-row {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 3;
}

.pulse-beacon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    display: inline-block;
    flex-shrink: 0;
}

.presence-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    color: #FFFFFF;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    max-width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .presence-badge.online .pulse-beacon {
        animation: beaconPulse 1.8s ease-out infinite;
    }

@keyframes beaconPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }

    70% {
        box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.discover-card-detail {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 13px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
}

    .discover-card-detail:hover {
        background: rgba(244, 63, 94, 0.82);
        border-color: rgba(255, 255, 255, 0.3);
        color: #FFFFFF;
    }

.discover-card-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 18px 20px 20px;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
}

.discover-card-name-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.discover-card-name {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 800;
    line-height: 1.05;
    color: #FFFFFF;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.discover-card-age {
    font-size: 22px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.verified-shield {
    width: 21px;
    height: 21px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #10B981;
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.5);
    flex-shrink: 0;
    transform: translateY(2px);
}

.discover-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.86);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.discover-card-meta-sep {
    color: #FB7185;
    font-size: 10px;
}

.discover-card-prompt {
    max-width: 100%;
    font-size: 12.5px;
    font-style: italic;
    color: #FFFFFF;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 6px 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.discover-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.discover-card-chip {
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Card entrance choreography */
.dating-card.card-reveal-in .discover-card-info {
    animation: circleFadeUp 0.5s 0.14s both;
}

.dating-card.card-reveal-in .discover-card-top-row {
    animation: circleFadeUp 0.5s 0.08s both;
}

/* ------------------------- Floating action dock ------------------------- */
.floating-action-dock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 3vw, 26px);
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}

.dock-btn {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    flex-shrink: 0;
    padding: 0;
}

    .dock-btn:hover {
        transform: translateY(-2px) scale(1.06);
    }

    .dock-btn:active {
        transform: translateY(0) scale(0.94);
    }

    .dock-btn.btn-rewind {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        color: var(--text-muted);
    }

        .dock-btn.btn-rewind:hover {
            color: var(--text);
            background: var(--surface-hover);
        }

    .dock-btn.btn-pass {
        width: 54px;
        height: 54px;
        min-width: 54px;
        min-height: 54px;
        color: #EF4444;
        border-color: rgba(239, 68, 68, 0.35);
    }

        .dock-btn.btn-pass:hover {
            background: rgba(239, 68, 68, 0.12);
            box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
        }

    .dock-btn.btn-spark {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        color: #F59E0B;
        border-color: rgba(245, 158, 11, 0.35);
    }

        .dock-btn.btn-spark:hover {
            background: rgba(245, 158, 11, 0.14);
            box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
        }

    .dock-btn.btn-like {
        width: 60px;
        height: 60px;
        min-width: 60px;
        min-height: 60px;
        color: #FFFFFF;
        background: var(--gradient-brand);
        border: none;
        box-shadow: 0 6px 24px rgba(244, 63, 94, 0.45);
    }

        .dock-btn.btn-like:hover {
            box-shadow: 0 10px 30px rgba(244, 63, 94, 0.6);
        }

.card-status-dock {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px 14px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}

    .card-status-dock .dock-btn-row {
        display: flex;
        gap: 8px;
        width: 100%;
    }

        .card-status-dock .dock-btn-row .btn {
            flex: 1;
            justify-content: center;
        }

.dock-status-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.dock-pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary);
}

/* ------------------------- Swipe stamps ------------------------- */
.swipe-stamp-tag {
    position: absolute;
    top: 26px;
    z-index: 8;
    padding: 5px 16px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.12em;
    opacity: 0;
    pointer-events: none;
    border: 3px solid;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.25);
    transition: opacity 0.12s ease;
}

    .swipe-stamp-tag.stamp-like {
        right: 22px;
        color: #10B981;
        border-color: #10B981;
        transform: rotate(14deg);
    }

    .swipe-stamp-tag.stamp-pass {
        left: 22px;
        color: #EF4444;
        border-color: #EF4444;
        transform: rotate(-14deg);
    }

/* ------------------------- Card deal animation ------------------------- */
.card-deal-animation {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
}

.deal-fan {
    position: relative;
    width: 120px;
    height: 170px;
}

.deal-sheet {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: linear-gradient(145deg, var(--surface-elevated), var(--surface-hover));
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.deal-sheet-1 {
    animation: dealSheet1 1.1s ease-in-out infinite;
}

.deal-sheet-2 {
    animation: dealSheet2 1.1s ease-in-out infinite;
}

.deal-sheet-3 {
    animation: dealSheet3 1.1s cubic-bezier(0.34, 1.4, 0.64, 1) infinite;
}

@keyframes dealSheet1 {
    0%, 100% {
        transform: translateX(-40px) rotate(-12deg);
    }

    50% {
        transform: translateX(-50px) rotate(-16deg) translateY(-8px);
    }
}

@keyframes dealSheet2 {
    0%, 100% {
        transform: translateX(40px) rotate(12deg);
    }

    50% {
        transform: translateX(50px) rotate(16deg) translateY(-8px);
    }
}

@keyframes dealSheet3 {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06) translateY(-12px);
    }
}

.deal-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.deal-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    animation: dealDotPulse 1.2s ease-in-out infinite;
}

@keyframes dealDotPulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.deal-caption {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}

/* ------------------------- Empty states ------------------------- */
.discover-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 32px;
    text-align: center;
    max-width: 380px;
    margin: auto;
    z-index: 1;
}

.empty-icon-wrap {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-hover);
    color: var(--text-muted);
}

    .empty-icon-wrap.caught-up {
        background: var(--primary-soft);
        color: var(--primary);
    }

.empty-title {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.empty-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ------------------------- Filter preferences drawer ------------------------- */
.filter-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: none;
    align-items: stretch;
    justify-content: flex-end;
}

    .filter-drawer-overlay.open {
        display: flex;
    }

.filter-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: filterFadeIn 0.2s ease;
}

@keyframes filterFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.filter-drawer {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: var(--surface);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    animation: filterSlideIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes filterSlideIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.filter-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.filter-drawer-title {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.filter-drawer-sub {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

.filter-close-btn {
    border: none;
    background: var(--surface-hover);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

    .filter-close-btn:hover {
        color: var(--text);
        background: var(--border);
    }

.filter-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    -webkit-overflow-scrolling: touch;
}

.filter-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    background: var(--surface-hover);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.toggle-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: block;
}

.toggle-hint {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.modern-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

    .modern-switch input {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

.switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    border-radius: 999px;
    background: var(--border-hover);
    transition: background 0.2s ease;
}

    .switch-slider::before {
        content: "";
        position: absolute;
        top: 3px;
        left: 3px;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #FFFFFF;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

.modern-switch input:checked + .switch-slider {
    background: var(--primary);
}

    .modern-switch input:checked + .switch-slider::before {
        transform: translateX(20px);
    }

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-section-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-inactive);
}

.filter-pill-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-choice-pill {
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

    .filter-choice-pill:hover {
        border-color: var(--primary);
    }

    .filter-choice-pill.active {
        background: var(--primary);
        color: #FFFFFF;
        border-color: var(--primary);
        box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
    }

.filter-age-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-age-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--surface-hover);
    border: 1px solid var(--border);
}

    .filter-age-box span {
        font-size: 12px;
        font-weight: 700;
        color: var(--text-muted);
    }

    .filter-age-box input {
        width: 100%;
        border: none;
        background: transparent;
        font-size: 15px;
        font-weight: 700;
        color: var(--text);
        padding: 0;
    }

        .filter-age-box input:focus {
            outline: none;
        }

.filter-age-dash {
    font-size: 18px;
    color: var(--text-muted);
}

.filter-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--surface-hover);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

    .filter-input-wrap input {
        width: 100%;
        border: none;
        background: transparent;
        font-size: 13.5px;
        color: var(--text);
        padding: 0;
    }

        .filter-input-wrap input:focus {
            outline: none;
        }

.filter-drawer-footer {
    display: flex;
    gap: 12px;
    padding: 18px 24px calc(18px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}

.filter-reset-btn {
    flex: 1;
}

.filter-apply-btn {
    flex: 2;
}

@keyframes circleFadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ------------------------- Responsive ------------------------- */
@media (min-width: 1440px) {
    .discover-container-layout {
        grid-template-columns: 320px minmax(0, 1fr);
    }

    .dating-card-deck {
        max-width: 420px;
    }
}

@media (max-width: 1180px) {
    .discover-container-layout {
        grid-template-columns: 270px minmax(0, 1fr);
        gap: 18px;
        padding: 16px 20px;
    }

    .dating-card-deck {
        height: min(calc(100dvh - 170px), 620px);
        max-width: 380px;
    }
}

/* Single column: profile sidebar tucks away */
@media (max-width: 1024px) {
    .discover-container-layout {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 12px 16px 16px;
    }

    .discover-sidebar-card {
        display: none;
    }

    .discover-main-stage {
        height: auto;
        padding: 0;
    }

    .dating-card-deck {
        height: min(calc(100dvh - 170px), 620px);
        min-height: 440px;
        max-width: 420px;
    }
}

/* Matches the app-shell mobile collapse */
@media (max-width: 900px) {
    .discover-top-bar {
        padding: 12px 16px 10px;
    }

    .discover-container-layout {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 12px 6px;
        overflow: hidden;
        min-height: 0;
    }

    .discover-main-stage {
        flex: 1;
        min-height: 0;
        height: auto;
        overflow: visible;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .dating-card-deck {
        height: 100%;
        max-height: none;
        min-height: 0;
        max-width: 430px;
    }

    .discover-hero-view {
        padding: 16px 12px 20px;
    }
}

/* Small phones */
@media (max-width: 640px) {
    .discover-top-bar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 14px 10px;
    }

    .discover-heading {
        font-size: 20px;
    }

    .discover-subheading {
        font-size: 12px;
    }

    .discover-bar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .dating-card-deck {
        max-width: 100%;
    }

    .discover-card-info {
        padding: 14px 16px 16px;
        gap: 7px;
    }

    .discover-card-name {
        font-size: 22px;
    }

    .discover-card-age {
        font-size: 19px;
    }

    .discover-card-prompt {
        font-size: 12px;
    }

    .floating-action-dock {
        gap: 14px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    }

    .dock-btn.btn-pass {
        width: 52px;
        height: 52px;
        min-width: 52px;
        min-height: 52px;
    }

    .dock-btn.btn-like {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
    }

    .filter-drawer-body {
        padding: 20px 18px;
    }

    .filter-drawer-header {
        padding: 18px 20px;
    }

    .filter-drawer-footer {
        padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
    }
}

/* Narrow phones */
@media (max-width: 380px) {
    .discover-bar-actions {
        flex-wrap: wrap;
    }

    .discover-action-btn {
        flex: 1;
        justify-content: center;
    }

    .dating-card-deck {
        height: calc(100dvh - 160px);
    }

    .discover-card-top-row {
        top: 10px;
        left: 10px;
        right: 10px;
    }

    .swipe-stamp-tag {
        top: 20px;
        font-size: 16px;
        padding: 4px 12px;
    }
}

/* Short laptop screens: shrink the deck so the action dock never clips */
@media (max-height: 760px) {
    .dating-card-deck {
        height: calc(100dvh - 140px);
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .discover-main-stage::before,
    .discover-main-stage::after,
    .hero-sparkle-halo,
    .hero-sparkle-icon,
    .radar-ping,
    .presence-badge.online .pulse-beacon,
    .dating-card.card-reveal-in,
    .dating-card.card-reveal-in .discover-card-info,
    .dating-card.card-reveal-in .discover-card-top-row,
    .deal-sheet-1,
    .deal-sheet-2,
    .deal-sheet-3,
    .deal-pulse-dot {
        animation: none !important;
        transition: none !important;
    }
}

/* Nav Badge Indicator for pending requests */
.nav-badge {
    position: absolute;
    top: 6px;
    right: 14px;
    background: #ef4444; /* bright red */
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
    z-index: 10;
    pointer-events: none;
}

/* Adjust position for mobile bottom nav bar links */
.mobile-nav-bar a .nav-badge {
    top: 4px;
    right: calc(50% - 20px);
}



/* ==========================================================================
   QUICK MATCH — DISCOVER INLINE CHAT
   The temporary chat intentionally lives inside the Discover stage. It uses
   the existing DeepMatch surface/border/type system and becomes full-width
   within the right-hand stage on desktop and the entire viewport stage on
   mobile.
   ========================================================================== */

.quick-match-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.quick-match-panel {
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
}

.quick-match-waiting {
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.quick-match-waiting-card {
    width: min(100%, 560px);
    padding: 44px 34px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

    .quick-match-waiting-card h2,
    .quick-match-decision-card h2 {
        margin: 0 0 10px;
        font-family: var(--font-serif, "Playfair Display", serif);
        font-size: clamp(24px, 3vw, 32px);
        line-height: 1.2;
    }

    .quick-match-waiting-card p,
    .quick-match-decision-card p {
        margin: 0 auto 24px;
        max-width: 520px;
        color: var(--text-muted);
        font-size: 14px;
        line-height: 1.6;
    }

.quick-match-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 26px;
}

    .quick-match-dots span {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--accent);
        opacity: .35;
        animation: quickMatchDotPulse 1.25s ease-in-out infinite;
    }

        .quick-match-dots span:nth-child(2) {
            animation-delay: .15s;
        }

        .quick-match-dots span:nth-child(3) {
            animation-delay: .3s;
        }

@keyframes quickMatchDotPulse {
    0%, 100% {
        transform: translateY(0);
        opacity: .3;
    }

    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

.quick-match-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.quick-match-partner {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.quick-match-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    overflow: visible;
    border-radius: 50%;
    padding: 2px;
    background: var(--gradient-brand);
}

    .quick-match-avatar img,
    .quick-match-avatar-fallback {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
        background: var(--surface-hover);
    }

.quick-match-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.quick-match-avatar img + .quick-match-avatar-fallback {
    display: none;
}

.quick-match-online-dot {
    position: absolute;
    right: -1px;
    bottom: 0;
    width: 11px;
    height: 11px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: #10B981;
}

.quick-match-partner-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .quick-match-partner-meta strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14px;
    }

    .quick-match-partner-meta span {
        color: var(--text-muted);
        font-size: 11.5px;
    }

.quick-match-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.quick-match-timer {
    min-width: 68px;
    padding: 7px 10px;
    border-radius: var(--radius-full);
    background: var(--surface-hover);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

    .quick-match-timer.warn {
        color: var(--danger);
        border-color: rgba(244, 63, 94, .35);
        background: rgba(244, 63, 94, .08);
    }

.quick-match-stop-top,
.quick-match-stop-btn {
    border: 1px solid var(--border);
    background: var(--surface-hover);
    color: var(--text-muted);
    border-radius: var(--radius-full);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.quick-match-stop-top {
    padding: 7px 12px;
    font-size: 12px;
}

    .quick-match-stop-top:hover,
    .quick-match-stop-btn:hover {
        color: var(--danger);
        border-color: rgba(244, 63, 94, .35);
        background: rgba(244, 63, 94, .08);
    }

.quick-match-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: radial-gradient(circle at 20% 10%, rgba(244, 63, 94, .045), transparent 35%), var(--surface);
}

.quick-match-message {
    max-width: min(72%, 620px);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .quick-match-message.mine {
        align-self: flex-end;
        align-items: flex-end;
    }

    .quick-match-message.theirs {
        align-self: flex-start;
        align-items: flex-start;
    }

.quick-match-message-bubble {
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-hover);
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.quick-match-message.mine .quick-match-message-bubble {
    background: var(--primary-soft);
    border-color: rgba(244, 63, 94, .2);
}

.quick-match-message-time {
    padding: 0 3px;
    color: var(--text-muted);
    font-size: 10px;
}

.quick-match-system-message {
    align-self: center;
    max-width: 90%;
    margin: 4px auto 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface-hover);
    color: var(--text-muted);
    font-size: 11.5px;
    text-align: center;
}

.quick-match-composer {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

    .quick-match-composer textarea {
        width: 100%;
        min-width: 0;
        min-height: 46px;
        max-height: 140px;
        resize: none;
        padding: 12px 14px;
        border: 1px solid var(--border);
        border-radius: 14px;
        outline: none;
        background: var(--surface-hover);
        color: var(--text);
        font: inherit;
        font-size: 14px;
        line-height: 1.45;
        transition: var(--transition);
    }

        .quick-match-composer textarea:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--primary-soft);
        }

.quick-match-stop-btn {
    min-width: 72px;
    min-height: 46px;
    padding: 0 14px;
    font-size: 12px;
}

.quick-match-send-btn {
    width: 48px;
    min-width: 48px;
    height: 46px;
    border: 0;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

    .quick-match-send-btn:hover {
        transform: translateY(-1px);
        filter: brightness(1.05);
    }

.quick-match-decision {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background: var(--surface);
}

.quick-match-decision-card {
    width: min(100%, 560px);
    padding: 34px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.quick-match-decision-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: var(--primary-soft);
    font-size: 22px;
}

.quick-match-decision-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.quick-match-success .quick-match-decision-icon {
    background: rgba(16, 185, 129, .12);
    color: var(--success);
}

@media (max-width: 900px) {
    .quick-match-shell {
        height: 100%;
        min-height: 0;
    }

    .quick-match-panel {
        border-radius: var(--radius-xl);
    }

    .quick-match-messages {
        padding: 16px;
    }
}

@media (max-width: 640px) {
    .quick-match-waiting {
        padding: 12px 4px;
    }

    .quick-match-waiting-card {
        padding: 34px 20px;
        border-radius: var(--radius-xl);
    }

    .quick-match-header {
        padding: 12px;
        gap: 8px;
    }

    .quick-match-avatar {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .quick-match-stop-top {
        display: none;
    }

    .quick-match-timer {
        min-width: 62px;
    }

    .quick-match-messages {
        padding: 14px 10px;
    }

    .quick-match-message {
        max-width: 86%;
    }

    .quick-match-composer {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 7px;
        padding: 8px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }

    .quick-match-stop-btn {
        min-width: 58px;
        padding: 0 10px;
        font-size: 11px;
    }

    .quick-match-composer textarea {
        min-height: 46px;
        padding: 11px 12px;
        font-size: 14px;
    }

    .quick-match-send-btn {
        width: 46px;
        min-width: 46px;
        height: 46px;
    }

    .quick-match-decision {
        padding: 14px;
    }

    .quick-match-decision-card {
        padding: 26px 18px;
    }

    .quick-match-decision-actions {
        flex-direction: column;
    }

        .quick-match-decision-actions .btn,
        .quick-match-decision-actions a {
            width: 100%;
            justify-content: center;
        }
}

/* ========================================================================== 
   Voice Rooms — live directory, stage, audience and room chat
   ========================================================================== */
.voice-room-page {
    padding: 22px 28px 36px;
    overflow-y: auto;
}

.voice-room-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.voice-room-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.voice-room-branding {
    min-width: 0;
}

.voice-room-eyebrow, .voice-section-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    color: var(--accent);
}

.voice-room-title {
    margin: 3px 0 3px;
    font-size: 31px;
    letter-spacing: -.04em;
}

.voice-room-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.voice-room-top-actions {
    display: flex;
    gap: 10px;
}

.voice-create-icon-btn {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--gradient-brand);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 24px var(--btn-glow);
    transition: transform .18s ease, box-shadow .18s ease;
}

    .voice-create-icon-btn:hover, .voice-create-icon-btn:focus-visible {
        transform: translateY(-1px);
        box-shadow: 0 12px 28px var(--btn-glow);
        outline: none;
    }

    .voice-create-icon-btn:focus-visible {
        box-shadow: 0 0 0 3px var(--primary-soft), 0 12px 28px var(--btn-glow);
    }

.voice-room-discovery {
    min-height: calc(100vh - 150px);
}

.voice-room-discovery-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 10px 0 17px;
}

.voice-room-discovery-copy {
    min-width: 0;
}

.voice-room-discovery-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.voice-room-discovery-head h2 {
    margin: 4px 0 5px;
    font-size: 22px;
    letter-spacing: -.025em;
}

.voice-room-discovery-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    max-width: 650px;
    line-height: 1.5;
}

.voice-room-live-indicator {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

    .voice-room-live-indicator span {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--success);
        box-shadow: 0 0 0 4px rgba(34,197,94,.10);
    }

.voice-room-list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 7px 2px 12px;
    color: var(--text-muted);
    font-size: 10px;
}

    .voice-room-list-meta strong {
        color: var(--text);
    }

.voice-room-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 30px;
}

.voice-room-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 17px 18px 15px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    outline: none;
    overflow: hidden;
}

    .voice-room-card::after {
        content: "";
        position: absolute;
        inset: auto -10% -55% 35%;
        height: 130px;
        background: radial-gradient(circle, var(--primary-soft), transparent 68%);
        pointer-events: none;
    }

    .voice-room-card:hover, .voice-room-card:focus-visible {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--border-focus);
    }

.voice-room-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.voice-room-live-label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--success);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .09em;
}

    .voice-room-live-label i {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--success);
    }

.voice-room-card h3 {
    position: relative;
    z-index: 1;
    margin: 14px 0 12px;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -.02em;
    max-width: 90%;
}

.voice-room-card-owner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text-muted);
    font-size: 12px;
}

    .voice-room-card-owner b {
        color: var(--accent);
        font-size: 10px;
    }

.voice-room-card-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    min-width: 0;
}

.voice-room-card-avatars {
    display: flex;
    align-items: center;
    padding-left: 2px;
    min-width: 118px;
}

    .voice-room-card-avatars .voice-avatar {
        width: 35px;
        height: 35px;
        margin-left: -7px;
        border: 2px solid var(--surface);
    }

        .voice-room-card-avatars .voice-avatar:first-child {
            margin-left: 0;
        }

.voice-room-more {
    width: 35px;
    height: 35px;
    margin-left: -7px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid var(--surface);
    background: var(--surface-hover);
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 800;
}

.voice-room-card-count {
    flex: 1;
    min-width: 0;
    color: var(--text-muted);
    font-size: 10px;
}

.voice-room-join-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 7px 10px;
    background: var(--gradient-brand-soft);
    color: var(--accent);
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

    .voice-room-join-pill b {
        font-size: 15px;
        line-height: 8px;
    }

.voice-room-empty-state {
    border: 1px dashed var(--border);
    border-radius: 20px;
    padding: 55px 24px;
    text-align: center;
    background: var(--surface);
}

.voice-room-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--gradient-brand-soft);
    font-size: 24px;
}

.voice-room-empty-state h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.voice-room-empty-state p {
    margin: 0 auto 17px;
    max-width: 440px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.voice-room-workspace {
    display: grid;
    grid-template-columns: minmax(0,2fr) minmax(320px,1fr);
    gap: 18px;
    align-items: stretch;
    height: calc(100vh - 135px);
    min-height: 620px;
}

.voice-room-main-column {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
}

.voice-room-header-card, .voice-stage-card, .voice-audience-card, .voice-chat-card {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.voice-room-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 19px;
    margin-bottom: 15px;
}

.voice-room-header-copy {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.voice-room-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(34,197,94,.12);
    flex-shrink: 0;
}

.voice-room-header-card h2 {
    margin: 2px 0;
    font-size: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-room-header-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 11px;
}

.voice-room-mic-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 10px 13px;
    background: var(--surface-hover);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
}

    .voice-room-mic-btn:disabled {
        opacity: .55;
        cursor: not-allowed;
    }

    .voice-room-mic-btn.muted {
        color: var(--danger);
    }

.voice-stage-card, .voice-audience-card {
    padding: 19px;
    margin-bottom: 15px;
}

.voice-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

    .voice-section-heading h3 {
        margin: 3px 0 0;
        font-size: 17px;
    }

.voice-stage-capacity, .voice-chat-status {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--gradient-brand-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
}

.voice-stage-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 9px;
}

.voice-stage-seat, .voice-stage-empty-seat {
    min-height: 175px;
    border-radius: 17px;
    border: 1px solid var(--border);
    background: var(--surface-hover);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px 7px;
    overflow: hidden;
}

    .voice-stage-seat.owner-seat {
        border-color: var(--border-focus);
        background: var(--gradient-brand-soft);
    }

    .voice-stage-seat.self-seat {
        box-shadow: inset 0 0 0 1px var(--primary-soft);
    }

.voice-seat-number {
    position: absolute;
    left: 8px;
    top: 8px;
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
}

.voice-seat-avatar-wrap {
    position: relative;
    margin-bottom: 9px;
}

.voice-avatar {
    width: 43px;
    height: 43px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--gradient-brand-soft);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 800;
    color: var(--accent);
    flex-shrink: 0;
}

    .voice-avatar.large {
        width: 72px;
        height: 72px;
        font-size: 19px;
        box-shadow: 0 8px 22px rgba(0,0,0,.08);
    }

    .voice-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.voice-seat-name {
    font-size: 13px;
    font-weight: 800;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-seat-role {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
}

.voice-you {
    color: var(--accent);
    font-weight: 800;
    font-size: 9px;
}

.voice-muted-photo-badge {
    position: absolute;
    right: -3px;
    bottom: 0;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--danger);
    color: #fff;
    border: 2px solid var(--surface);
    pointer-events: none;
    z-index: 2;
}

    .voice-muted-photo-badge svg {
        width: 11px;
        height: 11px;
    }

.voice-speaking-ring {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid transparent;
    pointer-events: none;
}

    .voice-speaking-ring[data-speaking] {
        border-color: rgba(34,197,94,.25);
    }

.voice-seat-controls {
    display: flex;
    gap: 4px;
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

    .voice-seat-controls button {
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--text);
        border-radius: 7px;
        padding: 4px 6px;
        font-size: 9px;
        cursor: pointer;
    }

        .voice-seat-controls button.danger {
            color: var(--danger);
        }

.voice-stage-empty-seat {
    border-style: dashed;
    background: transparent;
    color: var(--text-muted);
}

    .voice-stage-empty-seat span {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        border: 1px dashed var(--border);
        font-size: 17px;
    }

    .voice-stage-empty-seat small {
        margin-top: 7px;
        font-size: 10px;
    }

.voice-audience-list {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
}

.voice-audience-member {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 9px;
    background: var(--surface-hover);
    min-width: 0;
}

.voice-audience-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.voice-audience-info {
    min-width: 0;
    flex: 1;
}

    .voice-audience-info strong, .voice-audience-info span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .voice-audience-info strong {
        font-size: 12px;
    }

    .voice-audience-info span {
        color: var(--text-muted);
        font-size: 10px;
        margin-top: 2px;
    }

.voice-invite-btn {
    border: 1px solid var(--border-focus);
    color: var(--accent);
    background: var(--surface);
    border-radius: 9px;
    padding: 6px 8px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.voice-audience-empty {
    grid-column: 1/-1;
    padding: 22px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    border: 1px dashed var(--border);
    border-radius: 14px;
}

.voice-chat-card {
    position: relative;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.voice-chat-header {
    padding: 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .voice-chat-header h3 {
        margin: 3px 0 0;
        font-size: 17px;
    }

.voice-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.voice-chat-message {
    max-width: 88%;
    align-self: flex-start;
}

    .voice-chat-message.mine {
        align-self: flex-end;
    }

.voice-chat-message-meta {
    display: flex;
    gap: 7px;
    align-items: center;
    margin: 0 5px 4px;
    font-size: 9px;
    color: var(--text-muted);
}

    .voice-chat-message-meta strong {
        color: var(--text);
        font-size: 10px;
    }

.voice-chat-message-body {
    border-radius: 13px 13px 13px 4px;
    padding: 9px 11px;
    background: var(--surface-hover);
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.voice-chat-message.mine .voice-chat-message-body {
    border-radius: 13px 13px 4px 13px;
    background: var(--gradient-brand-soft);
}

.voice-chat-message.system {
    align-self: center;
    max-width: 96%;
    width: 100%;
}

    .voice-chat-message.system .voice-chat-message-meta {
        justify-content: center;
    }

    .voice-chat-message.system .voice-chat-message-body {
        border-radius: 10px;
        text-align: center;
        background: var(--gradient-brand-soft);
        color: var(--text-muted);
        border: 1px solid var(--border);
        font-size: 11px;
    }

.voice-chat-composer {
    border-top: 1px solid var(--border);
    padding: 12px;
    display: flex;
    gap: 8px;
}

    .voice-chat-composer textarea {
        flex: 1;
        resize: none;
        min-height: 42px;
        max-height: 100px;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 11px;
        font: inherit;
        font-size: 12px;
        background: var(--surface-hover);
        color: var(--text);
    }

/* Minimized voice-room bar shown on every app page so members can keep
   talking while browsing Profile / Chats / etc. */
.voice-room-minimized {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 7px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-width: min(92vw, 420px);
    touch-action: none;
    cursor: grab;
}

    .voice-room-minimized.dragging {
        cursor: grabbing;
        user-select: none;
        box-shadow: var(--shadow-lg), 0 0 0 3px var(--accent-soft);
    }

    .voice-room-minimized[hidden] {
        display: none;
    }

.voice-room-min-open {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    padding: 5px 8px;
    border-radius: 999px;
    cursor: pointer;
    min-width: 0;
}

    .voice-room-min-open:hover {
        background: var(--surface-hover);
    }

.voice-room-min-live {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,.18);
    flex-shrink: 0;
    animation: voice-breathe 2.2s ease-in-out infinite;
}

@keyframes voice-breathe {
    0%, 100% { opacity: 1; }
    50% { opacity: .45; }
}

.voice-room-min-title {
    font-weight: 800;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-room-min-count {
    color: var(--text-muted);
    font-size: 10px;
    white-space: nowrap;
}

.voice-room-min-divider {
    width: 1px;
    height: 22px;
    background: var(--border);
    flex-shrink: 0;
}

.voice-room-min-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 15px;
}

    .voice-room-min-btn:hover {
        background: var(--surface-hover);
    }

    .voice-room-min-btn.muted {
        color: var(--danger);
    }

    .voice-room-min-btn:disabled {
        opacity: .5;
        cursor: not-allowed;
    }

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

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

.voice-room-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,10,30,.58);
    backdrop-filter: blur(7px);
}

.voice-room-modal-card, .voice-room-invite-card {
    position: relative;
    z-index: 1;
    width: min(500px,100%);
    padding: 28px;
    border-radius: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
}

    .voice-room-modal-card h2, .voice-room-invite-card h2 {
        margin: 7px 0 8px;
        font-size: 24px;
    }

    .voice-room-modal-card p, .voice-room-invite-card p {
        color: var(--text-muted);
        font-size: 13px;
        line-height: 1.55;
    }

    .voice-room-modal-card label {
        display: block;
        font-size: 11px;
        font-weight: 800;
        margin: 18px 0 7px;
    }

    .voice-room-modal-card input, .voice-room-modal-card select {
        width: 100%;
    }

.voice-create-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.voice-room-modal-submit {
    width: 100%;
    margin-top: 17px;
}

.voice-room-modal-close {
    position: absolute;
    right: 13px;
    top: 10px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 26px;
    cursor: pointer;
}

.voice-room-invite-card {
    text-align: center;
}

    .voice-room-invite-card .voice-room-orb {
        margin-left: auto;
        margin-right: auto;
    }

.voice-room-invite-actions {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 20px;
}

.voice-remote-audio {
    position: fixed;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 1100px) {
    .voice-room-workspace {
        grid-template-columns: 1fr;
    }

    .voice-room-workspace {
        height: auto;
        min-height: 0;
    }

    .voice-chat-card {
        position: relative;
        top: auto;
        height: 500px;
        min-height: 0;
    }
}

@media (max-width: 760px) {
    .voice-room-page {
        padding: 16px 12px 90px;
    }

    .voice-room-topbar {
        align-items: flex-start;
    }

    .voice-room-discovery-head {
        align-items: flex-start;
        flex-direction: row;
        gap: 12px;
    }

    .voice-room-discovery-copy {
        flex: 1;
    }

    .voice-room-discovery-actions {
        align-self: flex-start;
    }

    .voice-room-card {
        padding: 15px;
    }

        .voice-room-card h3 {
            font-size: 18px;
        }

    .voice-room-card-footer {
        flex-wrap: wrap;
    }

    .voice-room-card-count {
        order: 3;
        flex-basis: 100%;
    }

    .voice-room-join-pill {
        margin-left: auto;
    }

    .voice-stage-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .voice-audience-list {
        grid-template-columns: 1fr;
    }

    .voice-stage-seat {
        min-height: 165px;
    }

    .voice-room-header-card {
        align-items: flex-start;
        gap: 12px;
    }

        .voice-room-header-card .voice-room-mic-btn {
            padding: 9px;
        }

    .voice-room-mic-btn span:last-child {
        display: none;
    }
}

.voice-audience-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    flex-wrap: wrap;
    margin-left: auto;
}

    .voice-audience-actions button {
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--text);
        border-radius: 8px;
        padding: 5px 7px;
        font-size: 9px;
        font-weight: 700;
        cursor: pointer;
        white-space: nowrap;
    }

        .voice-audience-actions button:hover,
        .voice-seat-controls button:hover {
            border-color: var(--border-focus);
            color: var(--accent);
        }

        .voice-audience-actions button.danger {
            color: var(--danger);
        }

    .voice-audience-actions .voice-invite-btn {
        color: var(--accent);
        border-color: var(--border-focus);
    }

@media (max-width: 760px) {
    .voice-audience-member {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .voice-audience-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
        padding-left: 44px;
    }
}

/* ================= USERNAME SEARCH ================= */
.dm-search {
    position: relative;
    margin-bottom: 18px;
}

.dm-search-field {
    position: relative;
    display: flex;
    align-items: center;
}

    .dm-search-icon {
        position: absolute;
        left: 11px;
        color: var(--text-muted);
        pointer-events: none;
    }

.dm-search-input {
    width: 100%;
    padding: 9px 34px 9px 33px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
    transition: var(--transition);
}

    .dm-search-input::placeholder {
        color: var(--text-muted);
        opacity: 0.75;
    }

    .dm-search-input:focus {
        outline: none;
        border-color: var(--border-focus);
        box-shadow: 0 0 0 3px var(--primary-soft);
    }

.dm-search-submit-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

    .dm-search-submit-btn:hover {
        color: var(--primary);
        background: var(--primary-soft);
    }

/* Hide the WebKit "x" so the field matches the rest of the app's inputs. */
.dm-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.dm-search-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 220;
    max-height: 340px;
    overflow-y: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.dm-search-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

    .dm-search-result:last-child {
        border-bottom: none;
    }

    .dm-search-result:hover,
    .dm-search-result.active {
        background: var(--surface-hover);
    }

.dm-search-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-hover);
}

.dm-search-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-muted);
}

.dm-search-result-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.dm-search-result-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-search-result-age {
    font-weight: 400;
    color: var(--text-muted);
}

.dm-search-result-handle {
    font-size: 12px;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-search-result-flags {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}

.dm-search-flag {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

.dm-search-flag-online {
    color: var(--success);
    background: rgba(34, 197, 94, 0.12);
}

.dm-search-flag-match {
    color: var(--primary);
    background: var(--primary-soft);
}

.dm-search-message {
    padding: 14px 12px;
    font-size: 12.5px;
    color: var(--text-muted);
    text-align: center;
}

.dm-search-error {
    color: var(--danger);
}

/* Compact inline handle, used where a card already has a line for metadata. */
.dm-username-chip {
    color: var(--primary);
    font-weight: 600;
}

/* Public handle on a candidate profile. */
.dm-profile-handle {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.dm-profile-handle-at {
    font-weight: 500;
    opacity: 0.75;
}

/* Shared inline @handle, used on cards, list rows and panel headers so a member
   sees the same public address everywhere. The "@" comes from ::before so the
   markup only ever carries the bare handle. */
.dm-handle {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-handle::before {
    content: "@";
    font-weight: 500;
    opacity: 0.75;
}

.dm-handle:empty {
    display: none;
}

/* The chat header stacks name / handle / status, so keep the handle line tight. */
.chat-view-header-text .chat-header-handle {
    margin: -2px 0 3px;
}

/* Sits directly under the "Partner details" heading. */
.partner-panel-handle {
    margin: -6px 0 14px;
}

/* Quick-match header stacks name / handle / status. */
.quick-match-partner-handle {
    margin: 1px 0 2px;
}

/* The chat list row is justify-content: space-between; the auto right-margin
   keeps the handle hard left and pushes message/badge/phase to the right edge. */
.sessions-item-status-row .sessions-item-handle {
    margin-right: auto;
    flex-shrink: 0;
}

/* Mobile placement: the field shares the sticky header row with the logo. */
.dm-search-mobile {
    flex: 1;
    margin: 0 10px;
    max-width: 320px;
}

@media (max-width: 900px) {
    .dm-search-mobile .dm-search-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        top: 60px;
        max-width: none;
    }
}

/* ================= USERNAME FIELD ================= */
.dm-username-field {
    position: relative;
    display: flex;
    align-items: center;
}

.dm-username-prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    pointer-events: none;
    line-height: 1;
    z-index: 2;
    user-select: none;
    transition: color var(--transition);
}

.dm-username-field:focus-within .dm-username-prefix {
    color: var(--primary);
}

.dm-username-field input,
.dm-username-input {
    padding-left: 36px !important;
}

.dm-username-hint {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
}

    .dm-username-hint.is-available {
        color: var(--success);
    }

    .dm-username-hint.is-taken {
        color: var(--danger);
    }

    .dm-username-hint.is-invalid {
        color: var(--warning);
    }

.dm-username-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.dm-username-suggestion {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--primary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
}

    .dm-username-suggestion:hover {
        border-color: var(--border-focus);
        background: var(--primary-soft);
    }

.dm-profile-handle {
    font-size: 13px;
    color: var(--text-muted);
}

    .dm-profile-handle .dm-profile-handle-at {
        color: var(--primary);
        font-weight: 600;
    }

/* ================= DEDICATED SEARCH PAGE ================= */
.search-page {
    padding: 0;
}

.search-page-box {
    margin-top: 20px;
    margin-bottom: 24px;
}

.search-page-form {
    display: flex;
    gap: 12px;
    max-width: 680px;
}

.search-page-input-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-page-at {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 600;
    pointer-events: none;
    line-height: 1;
    z-index: 2;
    transition: color var(--transition);
}

.search-page-input-wrap:focus-within .search-page-at {
    color: var(--primary);
}

.search-page-input-wrap input[type="text"],
.search-page-input-wrap input,
input.search-page-input,
.search-page-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 42px 12px 38px !important;
    font-size: 15px;
    font-family: inherit;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    transition: var(--transition);
}

    .search-page-input-wrap input:focus,
    .search-page-input:focus {
        outline: none;
        border-color: var(--border-focus);
        box-shadow: 0 0 0 3px var(--primary-soft);
    }

.search-page-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: var(--border);
    color: var(--text-muted);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

    .search-page-clear-btn:hover {
        background: var(--primary-soft);
        color: var(--primary);
    }

.search-page-action-btn {
    min-height: 48px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14.5px;
    flex-shrink: 0;
}

.search-page-status {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 16px;
}

    .search-page-status.is-error {
        color: var(--danger);
    }

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.search-profile-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

    .search-profile-card:hover {
        border-color: var(--border-focus);
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.search-card-top {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-card-avatar-wrap {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border);
    background: var(--surface-elevated);
}

.search-card-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-card-avatar-fallback {
    width: 100%;
    height: 100%;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
}

.search-card-main {
    flex: 1;
    min-width: 0;
}

.search-card-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.search-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-card-handle {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary);
    margin-top: 1px;
}

.search-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-card-bio {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-card-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.search-card-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 14px;
}

.search-page-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    margin-top: 16px;
}

.search-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.search-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 6px 0;
}

.search-empty-sub {
    font-size: 13.5px;
    color: var(--text-muted);
    max-width: 380px;
    margin: 0;
    line-height: 1.5;
}