* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

:root {
    --primary: #c9a962;
    --primary-dark: #a88b4a;
    --primary-light: #e8d5a3;
    --secondary: #b8866b;
    --accent: #d4b896;
    --gradient: linear-gradient(135deg, #a88b4a 0%, #c9a962 40%, #e8d5a3 100%);
    --gradient-soft: linear-gradient(180deg, rgba(201, 169, 98, 0.14) 0%, rgba(201, 169, 98, 0) 100%);
    --bg: #0a0908;
    --bg-elevated: #12100e;
    --card: #1a1714;
    --card-elevated: #221e1a;
    --surface: #2a2622;
    --surface-muted: #1f1c19;
    --text: #f7f3ed;
    --text-muted: #9c9288;
    --success: #7aab8a;
    --danger: #c47070;
    --border: rgba(201, 169, 98, 0.16);
    --border-strong: rgba(201, 169, 98, 0.32);
    --primary-soft: rgba(201, 169, 98, 0.12);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    --shadow-gold: 0 4px 24px rgba(201, 169, 98, 0.18);
    --radius: 20px;
    --radius-sm: 12px;
    --profile-photo-ratio: 3 / 4;
    --bottom-nav-height: 60px;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 169, 98, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(184, 134, 107, 0.06), transparent);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
    overscroll-behavior: none;
}

input,
select,
textarea {
    font-size: 16px;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.02em;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary);
}

/* Auth pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(201, 169, 98, 0.12), transparent),
        radial-gradient(ellipse 50% 40% at 80% 100%, rgba(184, 134, 107, 0.08), transparent);
    padding: 20px;
}

.preferences-page.auth-page {
    align-items: flex-start;
    justify-content: center;
    padding: 16px 16px 40px;
}

.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 30px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow), var(--shadow-gold);
}

.preferences-page .auth-card {
    max-width: 480px;
    padding: 24px 20px 32px;
}

.preferences-page .auth-card h1 {
    font-size: 2rem;
    text-align: left;
}

.preferences-page .auth-card .subtitle {
    text-align: left;
    margin-bottom: 24px;
}

.preferences-page .profile-back-link {
    margin-bottom: 16px;
}

.preferences-edit-page .preferences-form {
    padding-bottom: 16px;
}

.preferences-edit-page .preferences-form .btn-block {
    margin-top: 8px;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 2.4rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group > label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
    background: var(--surface-muted);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):focus,
.form-group select:focus {
    outline: none;
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.field-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: -4px 0 10px;
}

.option-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-grid:not(.option-grid-multi) .option-chip {
    flex: 0 1 auto;
}

.option-grid-multi {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.option-grid-multi .option-chip {
    min-width: 0;
    max-width: 100%;
}

.option-chip {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}

.option-chip input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.option-chip span {
    display: block;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.35;
    word-break: break-word;
    background: var(--surface-muted);
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.option-chip input:checked + span {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-light);
    box-shadow: none;
    outline: 1px solid rgba(201, 169, 98, 0.45);
    outline-offset: -1px;
}

.option-chip:hover span {
    border-color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 28px;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-body);
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--gradient);
    color: #1a1510;
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    box-shadow: 0 6px 28px rgba(201, 169, 98, 0.35);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-block {
    width: 100%;
}

.btn[hidden] {
    display: none !important;
}

.btn-like {
    background: var(--gradient);
    color: #1a1510;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    font-size: 1.8rem;
    box-shadow: var(--shadow-gold);
    border: 1px solid rgba(232, 213, 163, 0.4);
}

.btn-pass {
    background: var(--card-elevated);
    color: var(--text-muted);
    width: 68px;
    height: 68px;
    border-radius: 50%;
    font-size: 1.8rem;
    border: 1px solid var(--border);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.error-msg {
    background: rgba(196, 112, 112, 0.12);
    color: #e8a0a0;
    border: 1px solid rgba(196, 112, 112, 0.25);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.success-msg {
    background: rgba(122, 171, 138, 0.12);
    color: #a8d4b8;
    border: 1px solid rgba(122, 171, 138, 0.25);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* Landing */
html:has(.landing-page),
body.landing-page {
    height: 100%;
    height: 100svh;
    height: -webkit-fill-available;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
}

.landing-page {
    overflow: hidden;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100svh;
    height: -webkit-fill-available;
}

.landing {
    position: relative;
    height: 100%;
    max-height: 100svh;
    max-height: -webkit-fill-available;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-items: stretch;
    background:
        radial-gradient(ellipse 120% 80% at 50% 0%, rgba(201, 169, 98, 0.07), transparent 55%),
        radial-gradient(ellipse 90% 60% at 50% 100%, rgba(184, 134, 107, 0.05), transparent 50%),
        linear-gradient(180deg, #0c0a09 0%, var(--bg) 40%, #080706 100%);
    color: var(--text);
    text-align: center;
    padding:
        max(6px, env(safe-area-inset-top))
        max(16px, env(safe-area-inset-right))
        max(8px, env(safe-area-inset-bottom))
        max(16px, env(safe-area-inset-left));
    overflow: hidden;
    gap: 2px;
}

.landing-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background:
        radial-gradient(ellipse 85% 70% at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.55) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, transparent 18%, transparent 82%, rgba(0, 0, 0, 0.35) 100%);
}

.landing-header {
    position: relative;
    z-index: 30;
    width: 100%;
    max-width: 400px;
    justify-self: center;
    pointer-events: none;
    padding-bottom: 4px;
}

.landing-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    padding: 2px 0;
}

.landing-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(90px);
    z-index: 0;
}

.landing-glow-1 {
    width: 380px;
    height: 380px;
    top: 6%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(201, 169, 98, 0.18);
    animation: landingPulse 7s ease-in-out infinite;
}

.landing-glow-2 {
    width: 240px;
    height: 240px;
    top: 38%;
    right: -60px;
    background: rgba(184, 134, 107, 0.12);
    animation: landingPulse2 9s ease-in-out infinite;
}

.landing-glow-3 {
    width: 200px;
    height: 200px;
    bottom: 12%;
    left: -50px;
    background: rgba(232, 213, 163, 0.08);
    animation: landingPulse2 11s ease-in-out infinite reverse;
}

@keyframes landingPulse2 {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.1); }
}

@keyframes landingPulse {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.landing-cards {
    position: relative;
    z-index: 20;
    height: 100%;
    max-height: 76%;
    width: auto;
    max-width: min(72vw, 260px);
    margin: 0 auto;
    perspective: 900px;
    pointer-events: auto;
    min-height: 0;
    contain: layout style;
}

.landing-card {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(201, 169, 98, 0.28);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.65),
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 1px 0 rgba(232, 213, 163, 0.12) inset;
    transform-origin: center bottom;
}


.landing-card-img {
    background: #1a1510;
}

.landing-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(10, 9, 8, 0.08) 0%,
            transparent 35%,
            rgba(10, 9, 8, 0.2) 65%,
            rgba(10, 9, 8, 0.72) 100%
        ),
        radial-gradient(ellipse 100% 80% at 50% 100%, rgba(0, 0, 0, 0.35), transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.landing-card-front::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 18px;
    border: 1px solid rgba(232, 213, 163, 0.14);
    pointer-events: none;
    z-index: 3;
}

.landing-card-shine {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        115deg,
        transparent 38%,
        rgba(255, 248, 235, 0.09) 50%,
        transparent 62%
    );
    animation: landingShine 7s ease-in-out infinite;
    pointer-events: none;
}

@keyframes landingShine {
    0%, 100% { opacity: 0; transform: translateX(-30%); }
    50% { opacity: 1; transform: translateX(30%); }
}

.landing-card-back {
    transform: rotate(-10deg) scale(0.96) translate(-10px, 18px);
    opacity: 0.6;
    z-index: 1;
    animation: landingStackBack 7s ease-in-out infinite;
    animation-delay: -2s;
}

.landing-card-mid {
    transform: rotate(7deg) scale(0.98) translate(8px, 10px);
    opacity: 0.8;
    z-index: 2;
    animation: landingStackMid 5.5s ease-in-out infinite;
    animation-delay: -1s;
}

.landing-card-front {
    z-index: 3;
    transform: scale(0.88);
    border-color: rgba(201, 169, 98, 0.42);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.7),
        0 12px 32px rgba(201, 169, 98, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 1px 0 rgba(232, 213, 163, 0.18) inset;
    will-change: transform, opacity;
}

.landing-card-front:not(.is-swipe-right):not(.is-swipe-left):not(.is-entering) {
    animation: landingCardFloat 4.5s ease-in-out infinite;
    animation-delay: -0.5s;
}

@keyframes landingStackBack {
    0%, 100% { transform: rotate(-10deg) scale(0.96) translate(-10px, 18px); }
    50% { transform: rotate(-13deg) scale(0.97) translate(-14px, 14px); }
}

@keyframes landingStackMid {
    0%, 100% { transform: rotate(7deg) scale(0.98) translate(8px, 10px); }
    50% { transform: rotate(10deg) scale(0.99) translate(12px, 7px); }
}

@keyframes landingCardFloat {
    0%, 100% { transform: scale(0.88) rotate(0deg) translate(0, 0); }
    25% { transform: scale(0.88) rotate(-2.5deg) translate(-8px, -5px); }
    50% { transform: scale(0.88) rotate(1deg) translate(0, -8px); }
    75% { transform: scale(0.88) rotate(2.5deg) translate(8px, -4px); }
}

.landing-cards.is-swiping .landing-card-mid {
    animation: landingMidPromote 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.landing-cards.is-swiping .landing-card-back {
    animation: landingBackPromote 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.landing-card-front.is-swipe-right {
    animation: landingSwipeRight 0.55s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.landing-card-front.is-swipe-left {
    animation: landingSwipeLeft 0.55s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.landing-card-front.is-entering {
    animation: landingCardEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes landingSwipeRight {
    0% {
        transform: scale(0.88) translate3d(0, 0, 0) rotate(0deg);
        opacity: 1;
    }
    65% {
        opacity: 1;
    }
    100% {
        transform: scale(0.86) translate3d(115%, -28px, 0) rotate(14deg);
        opacity: 0;
    }
}

@keyframes landingSwipeLeft {
    0% {
        transform: scale(0.88) translate3d(0, 0, 0) rotate(0deg);
        opacity: 1;
    }
    65% {
        opacity: 1;
    }
    100% {
        transform: scale(0.86) translate3d(-115%, -28px, 0) rotate(-14deg);
        opacity: 0;
    }
}

@keyframes landingMidPromote {
    0% {
        transform: rotate(7deg) scale(0.98) translate(8px, 10px);
        opacity: 0.8;
    }
    100% {
        transform: rotate(2deg) scale(0.9) translate(0, 4px);
        opacity: 0.95;
    }
}

@keyframes landingBackPromote {
    0% {
        transform: rotate(-10deg) scale(0.96) translate(-10px, 18px);
        opacity: 0.6;
    }
    100% {
        transform: rotate(5deg) scale(0.96) translate(6px, 10px);
        opacity: 0.75;
    }
}

@keyframes landingCardEnter {
    0% {
        transform: scale(0.8) translate3d(0, 18px, 0);
        opacity: 0;
    }
    100% {
        transform: scale(0.88) translate3d(0, 0, 0);
        opacity: 1;
    }
}

.landing-card-actions {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 10;
    pointer-events: auto;
}

.landing-card-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid rgba(201, 169, 98, 0.22);
    background: rgba(12, 10, 9, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    font-family: var(--font-display);
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.landing-card-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.landing-card-btn:not(:disabled):active {
    transform: scale(0.92);
}

.landing-card-pass {
    color: rgba(247, 243, 237, 0.55);
    font-size: 0.95rem;
}

.landing-card-like {
    background: linear-gradient(145deg, #a88b4a 0%, #c9a962 45%, #e0c98a 100%);
    color: #14100c;
    border-color: rgba(232, 213, 163, 0.55);
    box-shadow:
        0 4px 20px rgba(201, 169, 98, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    animation: landingLikePulse 3.5s ease-in-out infinite;
}

@keyframes landingLikePulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(201, 169, 98, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 32px rgba(201, 169, 98, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
        transform: scale(1.04);
    }
}

.landing-content {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 400px;
    justify-self: center;
    pointer-events: none;
}

.landing-cta,
.landing-signin {
    pointer-events: auto;
}

.landing-africdate {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 6px;
    opacity: 0.85;
    animation: landingAfricdate 4s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(201, 169, 98, 0.4);
}

@keyframes landingAfricdate {
    0%, 100% { opacity: 0.65; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.landing-header h1 {
    font-size: clamp(1.65rem, 6.5vw, 2.25rem);
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(160deg, #f0e4c8 0%, #c9a962 40%, #a88b4a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.landing-rule {
    width: 32px;
    height: 1px;
    margin: 0 auto 8px;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 98, 0.7), transparent);
}

.landing-hook {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-style: italic;
    font-weight: 400;
    color: rgba(232, 213, 163, 0.75);
    margin-bottom: 0;
    letter-spacing: 0.06em;
}

.landing-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 18px;
}

.landing-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 52px;
}

.landing-step-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(12, 10, 9, 0.6);
    border: 1px solid rgba(201, 169, 98, 0.3);
    box-shadow: 0 0 12px rgba(201, 169, 98, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--primary-light);
    font-family: var(--font-display);
}

.landing-step-label {
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(156, 146, 136, 0.85);
    font-family: var(--font-body);
}

.landing-step-line {
    width: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 98, 0.35), transparent);
    margin-bottom: 12px;
}

.landing-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-top: 4px;
}

.btn-landing {
    width: auto;
    min-width: 0;
    padding: 9px 20px;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid rgba(232, 213, 163, 0.35);
    background: linear-gradient(160deg, #b8944f 0%, #c9a962 35%, #dcc07a 100%);
    box-shadow:
        0 4px 20px rgba(201, 169, 98, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.landing-signin {
    font-size: 0.78rem;
    color: rgba(156, 146, 136, 0.9);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s ease;
    padding-bottom: 2px;
}

.landing-signin:hover {
    color: var(--primary-light);
}

/* Bottom nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: rgba(18, 16, 14, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    min-height: var(--bottom-nav-height);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 200;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    gap: 3px;
    padding: 4px 12px;
    transition: color 0.2s ease;
}

.nav-item.active {
    color: var(--primary-light);
}

.nav-icon {
    font-size: 1.15rem;
    opacity: 0.55;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-item.active .nav-icon {
    opacity: 1;
    color: var(--primary-light);
}

.nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(160deg, #b8944f 0%, #c9a962 45%, #dcc07a 100%);
    color: #1a1510;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border: 1.5px solid rgba(10, 9, 8, 0.9);
    box-shadow: 0 2px 10px rgba(201, 169, 98, 0.55);
    pointer-events: none;
}

.nav-badge[hidden] {
    display: none;
}

/* App container */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 16px);
    min-height: 100vh;
    min-height: 100dvh;
}

/* Shell pages — fixed nav at bottom, scrollable content above */
html:has(.app-shell-page),
html:has(.app-list-page),
body:has(.app-shell-page),
body:has(.app-list-page) {
    height: 100%;
    height: 100dvh;
    height: 100svh;
    height: -webkit-fill-available;
    overflow: hidden;
    overscroll-behavior: none;
}

.app-shell-page.app-container,
.app-list-page.app-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    height: auto;
    margin: 0;
    min-height: 0;
}

.app-shell-page.app-container {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 20px 16px 24px;
}

/* List pages (messages, matches) — sticky header + scroll body */
.app-list-page.app-container {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.app-list-header {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    flex-shrink: 0;
    padding:
        max(12px, env(safe-area-inset-top))
        max(16px, env(safe-area-inset-right))
        12px
        max(16px, env(safe-area-inset-left));
    background: rgba(26, 23, 20, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-list-header .page-back {
    grid-column: 1;
    justify-self: start;
}

.app-list-header-title {
    grid-column: 2;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
    text-align: center;
}

.page-back,
.chat-back {
    font-size: 1.2rem;
    color: var(--text-muted);
    flex-shrink: 0;
    line-height: 1;
    padding: 4px;
    text-decoration: none;
}

.page-back:hover,
.chat-back:hover {
    color: var(--primary-light);
}

.app-list-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px 8px;
}

.app-list-page .empty-state {
    padding: 48px 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 1.75rem;
    color: var(--text);
}

.page-header p {
    color: var(--text-muted);
}

/* Photo upload grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.photo-slot {
    aspect-ratio: var(--profile-photo-ratio);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    background: var(--surface-muted);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.photo-slot:hover {
    border-color: var(--primary);
}

.photo-slot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.photo-slot .placeholder {
    color: var(--text-muted);
    font-size: 2rem;
}

.photo-slot-input {
    display: none;
}

.photo-slot > input[type="file"]:not(.photo-slot-input) {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Profile photos — uniform 3:4 portrait everywhere */
.profile-photo-frame,
.photo-slot,
.swipe-slideshow,
.match-profile-slideshow,
.match-profile-no-photo,
.profile-preview-photo,
.landing-cards {
    aspect-ratio: var(--profile-photo-ratio);
}

.swipe-slide img,
.photo-slot img,
.profile-photo-frame img,
.profile-preview-photo img,
.profile-hero-photo img,
.landing-card-img,
.match-profile-slideshow .swipe-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.profile-photo-thumb,
.match-avatar,
.chat-header-profile img,
.match-popup .avatars img,
.photo-gallery img,
.profile-photos-row img {
    display: block;
    aspect-ratio: var(--profile-photo-ratio);
    object-fit: cover;
    object-position: center top;
}

.profile-photo-frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #111;
}

/* Swipe cards */
.swipe-container {
    position: relative;
    margin: 0 auto;
}

.swipe-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow), var(--shadow-gold);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.swipe-card.is-entering {
    animation: discoverCardIn 0.35s ease;
}

@keyframes discoverCardIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.swipe-slideshow {
    position: relative;
    overflow: hidden;
    background: #111;
    width: 100%;
    flex: 0 0 auto;
    flex-shrink: 0;
}

.swipe-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.swipe-slide.active {
    opacity: 1;
    z-index: 1;
}

.swipe-no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1.1rem;
    background: #222;
}

.swipe-slide .interest-label {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
}

.slide-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.slide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.2s;
}

.slide-dot.active {
    background: var(--primary-light);
    box-shadow: 0 0 8px rgba(201, 169, 98, 0.5);
}

.swipe-info {
    padding: 20px;
    background: var(--card);
    border-top: 1px solid var(--border);
}

.swipe-info h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.match-badge {
    background: var(--primary-soft);
    color: var(--primary-light);
    border: 1px solid var(--border-strong);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-body);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.swipe-info .location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.discover-traits {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.discover-trait-section {
    margin-bottom: 16px;
}

.discover-trait-section:last-child {
    margin-bottom: 0;
}

.discover-trait-section h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 10px;
    font-weight: 600;
}

.discover-trait-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.discover-trait-card {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.discover-trait-card.is-match {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-gold);
}

.discover-trait-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.discover-trait-card span {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    padding: 6px 4px;
    line-height: 1.2;
}

.trait-match-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--gradient);
    color: #1a1510;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.matching-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.match-tag {
    background: var(--primary-soft);
    color: var(--primary-light);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.swipe-actions {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px;
}

.discover-page .swipe-slideshow .swipe-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    z-index: 4;
    padding: 0;
    gap: 48px;
    pointer-events: none;
}

.discover-page .swipe-slideshow .swipe-actions .btn {
    pointer-events: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.discover-page .swipe-slideshow .slide-dots {
    bottom: 108px;
    z-index: 3;
}

html:has(.onboarding-page),
body:has(.onboarding-page) {
    height: 100%;
    height: 100dvh;
    height: 100svh;
    height: -webkit-fill-available;
    overflow: hidden;
    overscroll-behavior: none;
}

.onboarding-page.app-container {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    height: 100svh;
    max-height: -webkit-fill-available;
    min-height: 0;
    padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
    overflow: hidden;
    box-sizing: border-box;
}

.onboarding-page .profile-back-link {
    flex-shrink: 0;
    margin-bottom: 4px;
}

.onboarding-page .page-header {
    flex-shrink: 0;
    margin-bottom: 8px;
}

.onboarding-page .page-header h1 {
    font-size: 1.5rem;
}

.onboarding-hint {
    flex-shrink: 0;
}

.onboarding-progress {
    flex-shrink: 0;
}

.onboarding-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 8px;
    background: linear-gradient(180deg, transparent 0%, var(--bg) 24%);
    z-index: 20;
}

.onboarding-actions .btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 76px;
    height: 76px;
    padding: 10px 8px;
}

.onboarding-action-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.onboarding-action-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.1;
}

.btn-like .onboarding-action-label {
    color: #1a1510;
}

.btn-pass .onboarding-action-label {
    color: var(--text-muted);
}

.onboarding-actions .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.onboarding-done-wrap {
    text-align: center;
    margin: 0;
    padding: 4px 0 2px;
}

.onboarding-done-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-light);
    text-decoration: none;
    border-bottom: 1px solid rgba(201, 169, 98, 0.35);
}

.onboarding-done-link:hover {
    color: var(--text);
}

.onboarding-card {
    display: none;
    position: relative;
    touch-action: pan-y;
}

.onboarding-card.is-active {
    display: flex;
}

.onboarding-swipe-container {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.onboarding-swipe-container .onboarding-card.is-active {
    width: 100%;
    max-height: 100%;
    height: 100%;
    align-self: center;
    flex: 1 1 auto;
    min-height: 0;
}

.onboarding-swipe-container .onboarding-card.is-active .swipe-slideshow {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    aspect-ratio: unset;
}

.onboarding-swipe-container .onboarding-card.is-active .swipe-slide,
.onboarding-swipe-container .onboarding-card.is-active .swipe-slide img {
    width: 100%;
    height: 100%;
}

.onboarding-swipe-container .onboarding-card.is-active .swipe-slide img {
    object-fit: cover;
    object-position: center;
}

.onboarding-empty {
    margin-top: 24px;
}

.onboarding-selected-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(122, 171, 138, 0.9);
    color: #0f1a12;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.onboarding-selected-badge[hidden] {
    display: none;
}

.onboarding-swipe-stamp {
    position: absolute;
    top: 24px;
    z-index: 3;
    padding: 8px 14px;
    border-radius: 8px;
    border: 3px solid;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

.onboarding-swipe-stamp--like {
    left: 24px;
    color: #9fd4b0;
    border-color: #9fd4b0;
    transform: rotate(-12deg);
}

.onboarding-swipe-stamp--pass {
    right: 24px;
    color: #e8a0a0;
    border-color: #e8a0a0;
    transform: rotate(12deg);
}

.onboarding-card.is-selected .swipe-slideshow {
    outline: 2px solid rgba(122, 171, 138, 0.55);
    outline-offset: -2px;
}

.onboarding-page .onboarding-hint {
    text-align: center;
    padding: 12px 14px;
    background: var(--primary-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--primary-light);
}

.onboarding-step-label {
    text-align: center;
    color: var(--primary-light);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.onboarding-page .onboarding-progress {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.onboarding-continue-btn {
    margin: 8px 16px 0;
}

.onboarding-continue-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 8px 16px 0;
    padding-bottom: 4px;
}

.discover-empty-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.onboarding-actions {
    padding: 8px 20px 4px;
}

/* Matches */
.matches-section-head {
    margin-bottom: 14px;
}

.matches-section-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px;
}

.matches-section-meta {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.matches-view-more {
    margin-top: 16px;
    margin-bottom: 35px;
}

.match-traits-preview {
    font-size: 0.8rem;
    color: var(--primary);
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-list.matches-at-end .match-card:last-child {
    margin-bottom: 35px;
}

.match-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}

.match-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow), var(--shadow-gold);
}

.match-avatar {
    width: 48px;
    height: auto;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-strong);
    box-shadow: var(--shadow-gold);
    flex-shrink: 0;
}

.match-info h3 {
    font-size: 1.1rem;
}

.match-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.message-preview {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.message-time {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.match-percent {
    margin-left: auto;
    background: var(--primary-soft);
    color: var(--primary-light);
    border: 1px solid var(--border-strong);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

/* Chat */
html:has(.chat-container),
body:has(.chat-container) {
    height: 100%;
    height: 100dvh;
    height: 100svh;
    height: -webkit-fill-available;
    overflow: hidden;
    overscroll-behavior: none;
}

.chat-container {
    position: fixed;
    inset: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    height: 100%;
    height: 100dvh;
    height: 100svh;
    height: -webkit-fill-available;
    overflow: hidden;
    z-index: 1;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding:
        max(12px, env(safe-area-inset-top))
        max(16px, env(safe-area-inset-right))
        12px
        max(16px, env(safe-area-inset-left));
    background: rgba(26, 23, 20, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.chat-header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.chat-header-profile:hover .chat-header-name {
    color: var(--primary-light);
}

.chat-header-profile img {
    width: 36px;
    height: auto;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

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

.chat-header-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.chat-header-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-menu {
    position: relative;
    flex-shrink: 0;
    z-index: 2;
}

.chat-menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--primary-light);
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.chat-menu-btn:hover {
    background: var(--primary-soft);
    border-color: var(--border-strong);
}

/* App modals (menu, block, report) */
.app-modal {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.app-modal[hidden] {
    display: none;
}

.app-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    cursor: pointer;
}

.app-modal-card {
    position: relative;
    z-index: 2;
    pointer-events: auto;
    width: 100%;
    max-width: 400px;
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 24px 20px 20px;
    box-shadow: var(--shadow), var(--shadow-gold);
    animation: popIn 0.25s ease;
}

.app-modal-sm {
    max-width: 340px;
}

.app-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.app-modal-close:hover {
    color: var(--text);
    background: var(--primary-soft);
}

.app-modal-title {
    font-size: 1.35rem;
    margin-bottom: 8px;
    padding-right: 28px;
}

.app-modal-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.app-modal-actions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.app-modal-action-btn {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.app-modal-action-btn:hover {
    background: var(--primary-soft);
    border-color: var(--border-strong);
}

.app-modal-action-warn {
    color: #e8a0a0;
}

.app-modal-action-warn:hover {
    background: rgba(196, 112, 112, 0.12);
    border-color: rgba(196, 112, 112, 0.35);
}

.app-modal-action-muted {
    color: var(--text-muted);
    text-align: center;
}

.app-modal-btn-row {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

.app-modal-btn-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.app-modal-cancel-btn {
    margin-top: 4px;
}

.report-reason-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font-body);
    resize: vertical;
    min-height: 100px;
}

.report-reason-input:focus {
    outline: none;
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.report-error {
    color: #e8a0a0;
    font-size: 0.85rem;
    margin-top: 8px;
}

.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.message.sent {
    align-self: flex-end;
    background: var(--gradient);
    color: #1a1510;
    border-bottom-right-radius: 4px;
    box-shadow: var(--shadow-gold);
}

.message.received {
    align-self: flex-start;
    background: var(--card-elevated);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.message .time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
}

.message--photo {
    padding: 6px;
    max-width: min(75%, 260px);
}

.message-image {
    display: block;
    width: 100%;
    max-width: 240px;
    border-radius: 14px;
    cursor: zoom-in;
}

.message--photo .message-text {
    display: block;
    padding: 6px 8px 0;
}

.message.sent.message--photo .message-image {
    border-bottom-right-radius: 6px;
}

.message.received.message--photo .message-image {
    border-bottom-left-radius: 6px;
}

.message.received {
    position: relative;
}

.message.received.message--new {
    border: 2px solid rgba(232, 213, 163, 0.75);
    box-shadow:
        0 0 28px rgba(201, 169, 98, 0.55),
        inset 5px 0 0 var(--primary-light);
    animation: messageHighlight 4.5s ease-out forwards;
}

.message.received.message--new::before {
    content: 'New';
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: var(--font-body);
    background: var(--gradient);
    color: #1a1510;
    padding: 3px 8px;
    border-radius: 999px;
    box-shadow: 0 2px 12px rgba(201, 169, 98, 0.55);
    z-index: 1;
}

@keyframes messageHighlight {
    0%, 45% {
        background: rgba(201, 169, 98, 0.42);
        transform: translateX(-10px) scale(1.02);
        border-color: rgba(232, 213, 163, 0.9);
        box-shadow:
            0 0 32px rgba(201, 169, 98, 0.65),
            inset 5px 0 0 var(--primary-light);
    }
    70% {
        background: rgba(201, 169, 98, 0.24);
        transform: translateX(0) scale(1);
    }
    100% {
        background: var(--card-elevated);
        transform: translateX(0) scale(1);
        border: 1px solid var(--border);
        box-shadow: none;
    }
}

.match-card--unread {
    border: 2px solid rgba(201, 169, 98, 0.55);
    background: linear-gradient(90deg, rgba(201, 169, 98, 0.32) 0%, rgba(201, 169, 98, 0.1) 45%, var(--card) 100%);
    box-shadow: var(--shadow), 0 0 20px rgba(201, 169, 98, 0.28);
}

.match-card--unread .match-info h3 {
    color: var(--primary-light);
    font-weight: 700;
}

.match-card--unread .message-preview {
    color: #fff;
    font-weight: 700;
}

.match-card-unread-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.unread-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1a1510;
    background: var(--gradient);
    padding: 3px 8px;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(201, 169, 98, 0.5);
    line-height: 1;
}

.chat-photo-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text);
    font-size: 1.15rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s;
}

.chat-photo-btn:hover:not(:disabled) {
    border-color: var(--border-strong);
    background: var(--surface);
}

.chat-photo-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding:
        12px
        max(16px, env(safe-area-inset-right))
        max(12px, env(safe-area-inset-bottom))
        max(16px, env(safe-area-inset-left));
    background: rgba(26, 23, 20, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 25px;
    font-size: 1rem;
    background: var(--surface-muted);
    color: var(--text);
    font-family: var(--font-body);
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-input #chat-send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(232, 213, 163, 0.3);
    background: var(--gradient);
    color: #1a1510;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-gold);
    flex-shrink: 0;
}

.chat-input #chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.profile-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.profile-section h3 {
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--text-muted);
}

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

.interest-item {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4/5;
}

.interest-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.interest-item span {
    display: block;
    text-align: center;
    font-size: 0.7rem;
    padding: 4px;
    font-weight: 600;
}

.match-profile-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow), var(--shadow-gold);
    margin-bottom: 16px;
}

.match-photo-wrap {
    position: relative;
}

.match-photo-actions {
    position: absolute;
    right: 12px;
    bottom: 48px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.match-photo-action {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(201, 169, 98, 0.25);
    background: rgba(10, 9, 8, 0.55);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.15s ease;
    text-decoration: none;
    padding: 0;
}

.match-photo-action:hover {
    background: rgba(201, 169, 98, 0.22);
    color: #fff;
}

.match-photo-action:active {
    transform: scale(0.94);
}

.match-photo-action-warn:hover {
    background: rgba(196, 112, 112, 0.25);
    border-color: rgba(196, 112, 112, 0.4);
    color: #f0b0b0;
}

.match-profile-no-photo {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-muted);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.match-detail-header {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.match-page .match-detail-header {
    background: var(--card);
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
}

.match-traits-section .discover-traits {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.match-traits-section .discover-trait-section h4 {
    font-size: 1rem;
    font-family: var(--font-display);
}

.match-traits-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.match-traits-legend .trait-match-badge {
    position: static;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
}

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

.photo-gallery img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Match popup */
.match-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.match-popup-content {
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    max-width: 340px;
    box-shadow: var(--shadow), var(--shadow-gold);
    animation: popIn 0.4s ease;
}

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

.match-popup h2 {
    font-size: 2rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.match-popup .avatars {
    display: flex;
    justify-content: center;
    gap: -10px;
    margin-bottom: 20px;
}

.match-popup .avatars img {
    width: 64px;
    height: auto;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-strong);
    box-shadow: var(--shadow-gold);
}

.match-popup .avatars img:last-child {
    margin-left: -20px;
}

/* Fullscreen photo modal */
.photo-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-modal[hidden] {
    display: none;
}

.photo-modal:not(.is-open) {
    pointer-events: none;
}

.photo-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.photo-modal-backdrop {
    position: absolute;
    inset: 0;
    background: #000;
    cursor: pointer;
}

.photo-modal-slideshow {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.photo-modal-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    touch-action: manipulation;
}

.photo-modal-track {
    display: flex;
    height: 100%;
    transition: transform 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.photo-modal-track.is-dragging {
    transition: none;
}

.photo-modal-slide {
    flex-shrink: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.photo-modal-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: auto;
    cursor: default;
}

.swipe-slideshow img.photo-zoomable {
    cursor: zoom-in;
}

.photo-modal-chrome {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.photo-modal-chrome > * {
    pointer-events: auto;
}

.photo-modal-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: max(12px, env(safe-area-inset-top)) 12px 24px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 100%);
}

.photo-modal-counter {
    color: var(--primary-light);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(201, 169, 98, 0.12);
    border: 1px solid rgba(201, 169, 98, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.photo-modal-counter[hidden] {
    display: none;
}

.photo-modal-close {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(201, 169, 98, 0.2);
    border-radius: 50%;
    background: rgba(201, 169, 98, 0.1);
    color: var(--primary-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.15s ease;
    margin-left: auto;
}

.photo-modal-close:hover {
    background: rgba(201, 169, 98, 0.22);
    border-color: rgba(201, 169, 98, 0.4);
}

.photo-modal-close:active {
    transform: scale(0.94);
}

.photo-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 1px solid rgba(201, 169, 98, 0.2);
    border-radius: 50%;
    background: rgba(201, 169, 98, 0.1);
    color: var(--primary-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s ease, opacity 0.2s ease;
}

.photo-modal-nav:hover {
    background: rgba(201, 169, 98, 0.22);
}

.photo-modal-nav[hidden] {
    display: none;
}

.photo-modal-prev {
    left: 12px;
}

.photo-modal-next {
    right: 12px;
}

.photo-modal-dots {
    position: absolute;
    bottom: max(20px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: rgba(10, 9, 8, 0.6);
    border: 1px solid rgba(201, 169, 98, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: calc(100% - 32px);
    overflow-x: auto;
    scrollbar-width: none;
}

.photo-modal-dots::-webkit-scrollbar {
    display: none;
}

.photo-modal-dots[hidden] {
    display: none;
}

.photo-modal-dot {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, width 0.2s ease;
}

.photo-modal-dot.active {
    background: var(--gradient);
    transform: scale(1.15);
    width: 20px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .photo-modal-nav:not([hidden]) {
        display: none;
    }
}

/* Profile page */
.profile-page .page-header {
    text-align: left;
    margin-bottom: 16px;
}

.profile-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.profile-preview-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow), var(--shadow-gold);
    margin-bottom: 16px;
}

.profile-preview-photo {
    position: relative;
    overflow: hidden;
    background: #111;
}

.profile-preview-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #666;
    background: #222;
}

.profile-preview-info {
    padding: 16px;
}

.profile-preview-info h2 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.profile-preview-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-meta {
    margin-top: 4px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.profile-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 10px;
    text-align: center;
    box-shadow: var(--shadow);
}

.profile-stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--primary-light);
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.profile-block {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.profile-block-alt {
    background: linear-gradient(180deg, var(--card) 0%, var(--card-elevated) 100%);
    border-color: var(--border-strong);
}

.profile-block-header {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.profile-block-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.profile-block-header h3 {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.profile-block-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.profile-photos-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 14px;
    -webkit-overflow-scrolling: touch;
}

.profile-photos-row img {
    width: 72px;
    height: auto;
    border-radius: 10px;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

.profile-trait-group {
    margin-bottom: 14px;
}

.profile-trait-group:last-child {
    margin-bottom: 0;
}

.profile-trait-group h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.profile-count {
    background: var(--primary-soft);
    color: var(--primary-light);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 4px;
}

.profile-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    padding: 6px 12px 6px 6px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.profile-pill img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-pill-list-simple .profile-pill {
    padding: 6px 12px;
}

.profile-info-rows {
    margin-bottom: 14px;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-info-value {
    font-weight: 700;
    font-size: 0.95rem;
}

.profile-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 16px;
    background: var(--surface-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.profile-logout {
    margin: 16px 0 8px;
    text-align: center;
}

.profile-logout-link {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-logout-link:hover {
    color: #e8a0a0;
}

.profile-footer-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    padding: 0 8px 20px;
}

/* Profile edit */
.profile-edit-page .page-header {
    display: none;
}

.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 0;
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: var(--shadow), var(--shadow-gold);
}

.profile-hero-photo {
    position: relative;
    width: 100%;
    aspect-ratio: var(--profile-photo-ratio);
    overflow: hidden;
    flex-shrink: 0;
    background: #111;
    border-bottom: 1px solid var(--border);
}

.profile-hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-muted);
    font-size: 2.5rem;
}

.profile-hero-info {
    min-width: 0;
    padding: 14px 16px;
}

.profile-hero-info h1 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
}

.profile-hero-info p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.4;
}

.profile-hero-note {
    margin-top: 8px !important;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 0.78rem !important;
    color: var(--primary-light) !important;
    letter-spacing: 0.02em;
}

.profile-progress {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 16px;
}

.profile-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.profile-progress-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-progress-value {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--primary-light);
}

.profile-progress-track {
    height: 6px;
    background: var(--surface-muted);
    border-radius: 3px;
    overflow: hidden;
}

.profile-progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.profile-progress-hint {
    margin: 8px 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.profile-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.profile-panel-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.profile-panel-summary::-webkit-details-marker {
    display: none;
}

.profile-panel[open] .profile-panel-summary {
    border-bottom: 1px solid var(--border);
}

.profile-panel[open] .profile-panel-chevron {
    transform: rotate(90deg);
}

.profile-panel-icon {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
}

.profile-panel-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-panel-text strong {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
}

.profile-panel-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-panel-chevron {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.profile-panel-body {
    padding: 14px 16px 16px;
}

.profile-panel-body .form-group:last-child {
    margin-bottom: 0;
}

.profile-panel-tip {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 14px;
    line-height: 1.45;
}

.profile-edit-page .profile-edit-form {
    margin-bottom: 10px;
}

.profile-edit-page .input-disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.profile-save-bar {
    position: sticky;
    bottom: calc(70px + env(safe-area-inset-bottom));
    z-index: 50;
    padding: 10px 0 4px;
    background: linear-gradient(180deg, transparent 0%, var(--bg) 30%);
}

.profile-save-bar.is-hidden {
    display: none;
}

.profile-photo-grid .photo-slot {
    position: relative;
    aspect-ratio: var(--profile-photo-ratio);
    overflow: hidden;
    cursor: default;
}

.profile-photo-grid .photo-slot--empty {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.profile-photo-grid .photo-slot--filled {
    display: grid;
    grid-template-rows: 1fr auto;
}

.photo-slot-drag {
    position: relative;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
}

.photo-slot-drag:active {
    cursor: grabbing;
}

.photo-slot-drag img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center top;
    pointer-events: none;
}

.photo-slot-drag-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.photo-slot--filled:hover .photo-slot-drag-hint,
.photo-slot.is-dragging .photo-slot-drag-hint {
    opacity: 1;
}

.photo-slot-add-btn,
.photo-slot-change-btn {
    flex-shrink: 0;
    width: 100%;
    border: none;
    background: var(--surface-muted);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.photo-slot-add-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
}

.photo-slot-add-btn .placeholder {
    font-size: 2rem;
    line-height: 1;
}

.photo-slot-add-label {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.photo-slot-change-btn {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border);
    color: var(--primary-light);
    background: rgba(10, 9, 8, 0.92);
}

.photo-slot-change-btn:hover,
.photo-slot-add-btn:hover {
    background: rgba(201, 169, 98, 0.1);
    color: var(--primary-light);
}

.photo-slot.is-dragging {
    opacity: 0.35;
}

.photo-slot.is-drop-target {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.35);
}

.photo-slot-ghost {
    position: fixed;
    z-index: 400;
    pointer-events: none;
    opacity: 0.92;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow), 0 12px 40px rgba(0, 0, 0, 0.45);
    transform: scale(1.03);
}

.profile-photo-grid.is-reordering {
    user-select: none;
}

.photo-slot-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: var(--primary-light);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    pointer-events: none;
}

.photo-slot-main .photo-slot-badge {
    background: rgba(201, 169, 98, 0.85);
    color: #1a1510;
}

.profile-trait-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.profile-trait-group-head h4 {
    margin-bottom: 0;
}

.profile-edit-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-light);
    white-space: nowrap;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-muted);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.profile-trait-boost {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-light);
    background: rgba(201, 169, 98, 0.15);
    border: 1px solid rgba(201, 169, 98, 0.3);
    vertical-align: middle;
}

.profile-edit-link:hover {
    background: var(--primary-soft);
    border-color: var(--border-strong);
    color: var(--primary-light);
}

.profile-pill-editable {
    position: relative;
    padding-right: 28px;
}

.profile-pill-remove {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(196, 112, 112, 0.2);
    color: #e8a0a0;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.profile-pill-remove:hover {
    background: rgba(196, 112, 112, 0.35);
}

.profile-empty-inline {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.profile-back-link {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.profile-back-link:hover {
    color: var(--primary-light);
}

.discover-trait-card span {
    color: var(--text-muted);
}

.discover-trait-card.is-match span {
    color: var(--primary-light);
}

.discover-trait-section h4 {
    font-family: var(--font-display);
    letter-spacing: 0.04em;
}

.page-header .profile-subtitle {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Discover preferences panel */
.discover-page .discover-prefs {
    margin-bottom: 20px;
}

.discover-prefs-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.discover-prefs-top h1 {
    font-size: 1.75rem;
    margin-bottom: 4px;
}

.discover-prefs-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.discover-prefs-edit {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-light);
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.discover-prefs-edit:hover {
    background: var(--primary-soft);
    border-color: var(--border-strong);
    color: var(--primary-light);
}

.discover-prefs-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.discover-prefs-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.discover-filter-chip {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--primary-soft);
    border: 1px solid var(--border);
    color: var(--primary-light);
    white-space: nowrap;
}

.discover-prefs-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 10px 0 0;
    border: none;
    border-top: 1px solid var(--border);
    background: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--font-body);
}

.discover-prefs-toggle-icon {
    transition: transform 0.2s ease;
    font-size: 0.65rem;
}

.discover-prefs-toggle.is-open .discover-prefs-toggle-icon {
    transform: rotate(180deg);
}

.discover-prefs-details {
    padding-top: 12px;
}

.discover-prefs-details[hidden] {
    display: none;
}

.discover-for-you {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.age-range-inputs {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.age-range-inputs > div {
    flex: 1;
}

.age-range-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.age-range-sep {
    color: var(--text-muted);
    padding-bottom: 12px;
    font-size: 0.9rem;
}

@media (max-width: 400px) {
    .option-grid-multi {
        grid-template-columns: 1fr;
    }

    .preferences-page .auth-card {
        padding: 20px 16px 28px;
    }
}

.discover-prefs-group {
    margin-bottom: 12px;
}

.discover-prefs-group:last-child {
    margin-bottom: 0;
}

.discover-prefs-group h4 {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    font-family: var(--font-body);
    font-weight: 600;
}

.discover-prefs-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.discover-prefs-pills-compact .profile-pill {
    font-size: 0.72rem;
    padding: 4px 10px 4px 4px;
}

.discover-prefs-pills-compact .profile-pill img {
    width: 22px;
    height: 22px;
}

.discover-prefs-more {
    font-size: 0.75rem;
    color: var(--primary-light);
    align-self: center;
    padding: 4px 8px;
}


.match-popup-content p {
    color: var(--text-muted);
}

.match-popup-content strong {
    color: var(--text);
}

select option {
    background: var(--card);
    color: var(--text);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--surface-muted);
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 3px;
}

/* Responsive */
@media (max-height: 750px) {
    .landing-header h1 {
        font-size: 1.65rem;
    }

    .landing-hook {
        font-size: 0.8rem;
    }

    .landing-africdate {
        font-size: 0.9rem;
        margin-bottom: 0;
    }

    .landing-step-icon {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .landing-step-label {
        font-size: 0.55rem;
    }

    .landing-step-line {
        margin-bottom: 10px;
    }

    .landing-steps {
        margin-bottom: 14px;
    }

    .landing-cta {
        gap: 12px;
    }

    .btn-landing {
        padding: 8px 18px;
        font-size: 0.74rem;
    }

    .landing-signin {
        font-size: 0.75rem;
    }
}

/* iPhone SE, mini */
@media (max-height: 670px) {
    .landing {
        gap: 0;
        padding-top: max(4px, env(safe-area-inset-top));
        padding-bottom: max(6px, env(safe-area-inset-bottom));
    }

    .landing-header h1 {
        font-size: 1.5rem;
    }

    .landing-cta {
        gap: 10px;
    }

    .landing-steps {
        margin-bottom: 12px;
    }
}

@media (max-width: 380px) {
    .discover-page .swipe-slideshow .swipe-actions { gap: 32px; }
}

/* Admin */
.admin-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.admin-welcome-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
}

.admin-role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid var(--border);
}

.admin-role-admin {
    background: rgba(201, 169, 98, 0.22);
    color: var(--primary-light);
    border-color: var(--border-strong);
}

.admin-role-moderator {
    background: rgba(122, 171, 138, 0.18);
    color: #9fd4b0;
    border-color: rgba(122, 171, 138, 0.35);
}

.admin-role-user {
    background: var(--surface-muted);
    color: var(--text-muted);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.admin-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    text-align: center;
}

.admin-stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-light);
}

.admin-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.admin-section {
    margin-bottom: 24px;
}

.admin-pref-field {
    margin-bottom: 18px;
}

.admin-pref-field:last-of-type {
    margin-bottom: 0;
}

.admin-form .admin-section > .admin-btn {
    margin-top: 24px;
}

.admin-pref-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-page .age-range-inputs .admin-input {
    width: 100%;
}

.admin-page .option-grid {
    gap: 8px;
}

.admin-page .option-grid:not(.option-grid-multi) {
    display: flex;
    flex-wrap: wrap;
}

.admin-page .option-grid:not(.option-grid-multi) .option-chip {
    flex: 0 1 auto;
}

.admin-page .option-grid-multi {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.admin-page .option-grid-multi .option-chip {
    flex: none;
    min-width: 0;
    max-width: 100%;
}

.admin-page .option-chip {
    position: relative;
    display: block;
    margin: 0;
}

.admin-page .option-chip input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.admin-page .option-chip span {
    padding: 10px 12px;
    font-size: 0.82rem;
    line-height: 1.35;
    word-break: break-word;
    hyphens: auto;
}

.admin-page .option-chip input:checked + span {
    box-shadow: none;
    border-color: var(--primary);
    outline: 1px solid rgba(201, 169, 98, 0.45);
    outline-offset: -1px;
}

.admin-section-title {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-body);
}

.admin-empty,
.admin-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 16px;
    background: var(--surface-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

.admin-hint--inline {
    padding: 0 0 12px;
    background: none;
    border: none;
}

.admin-report-list,
.admin-user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-report-card,
.admin-user-row {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.admin-report-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.admin-report-meta strong,
.admin-report-target {
    color: var(--text);
}

.admin-report-meta time {
    margin-left: auto;
    font-size: 0.75rem;
}

.admin-report-reason {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text);
}

.admin-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-user-avatar-wrap {
    width: 48px;
    height: 48px;
    min-width: 48px;
    max-width: 48px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-strong);
    box-shadow: var(--shadow-gold);
    background: var(--surface-muted);
}

.admin-user-avatar {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center top;
}

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

.admin-user-info strong {
    font-size: 0.95rem;
}

.admin-user-email,
.admin-user-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-role-select {
    flex-shrink: 0;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text);
    font-size: 0.8rem;
    font-family: var(--font-body);
}

.profile-admin-link {
    margin: 16px 0 8px;
}

@media (max-width: 400px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.admin-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.admin-nav-link {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    border-radius: calc(var(--radius-sm) - 2px);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.admin-nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.admin-nav-link.active {
    color: var(--primary-light);
    background: rgba(201, 169, 98, 0.15);
}

.admin-search {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.admin-search-input {
    flex: 1;
    min-width: 180px;
}

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

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.admin-btn--sm {
    padding: 6px 12px;
    font-size: 0.78rem;
}

.admin-btn--primary {
    background: var(--primary);
    border-color: var(--border-strong);
    color: #1a1510;
}

.admin-btn--secondary {
    background: var(--surface-muted);
    color: var(--text);
}

.admin-btn--ghost {
    background: transparent;
    color: var(--text-muted);
}

.admin-btn--danger {
    background: rgba(180, 70, 70, 0.2);
    border-color: rgba(180, 70, 70, 0.45);
    color: #e8a0a0;
}

.admin-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.admin-input--sm {
    padding: 6px 10px;
    font-size: 0.8rem;
}

.admin-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-label--checkbox {
    flex-direction: row;
    align-items: center;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.9rem;
    color: var(--text);
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.admin-form--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.admin-form--inline .admin-label {
    flex: 1;
    min-width: 140px;
}

.admin-flash {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.admin-flash--success {
    background: rgba(122, 171, 138, 0.18);
    border: 1px solid rgba(122, 171, 138, 0.35);
    color: #9fd4b0;
}

.admin-flash--error {
    background: rgba(180, 70, 70, 0.18);
    border: 1px solid rgba(180, 70, 70, 0.35);
    color: #e8a0a0;
}

.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.admin-photo-card {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card);
}

.admin-photo-img {
    width: 100%;
    aspect-ratio: var(--profile-photo-ratio, 3 / 4);
    object-fit: cover;
    display: block;
}

.admin-photo-card .admin-btn {
    width: 100%;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border);
}

.admin-trait-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.admin-trait-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.82rem;
}

.admin-trait-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.admin-trait-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.admin-trait-remove:hover {
    color: #e8a0a0;
}

.admin-trait-add {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-trait-add .admin-input {
    flex: 1;
}

.admin-section--danger {
    padding: 16px;
    border: 1px solid rgba(180, 70, 70, 0.35);
    border-radius: var(--radius-sm);
    background: rgba(180, 70, 70, 0.08);
}

.admin-catalog-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.admin-catalog-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-catalog-tab.active {
    color: var(--primary-light);
    border-color: var(--border-strong);
    background: rgba(201, 169, 98, 0.12);
}

.admin-catalog-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-catalog-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.admin-catalog-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.admin-catalog-edit-form {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.admin-catalog-edit-form .admin-input {
    flex: 1;
    min-width: 120px;
}

.admin-catalog-name {
    flex: 1;
    font-size: 0.9rem;
}

.admin-report-target {
    color: var(--primary-light);
    text-decoration: none;
}

.admin-report-target:hover {
    text-decoration: underline;
}

@media (max-width: 500px) {
    .admin-page .option-grid-multi {
        grid-template-columns: 1fr;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-user-row {
        flex-wrap: wrap;
    }

    .admin-user-info {
        flex: 1;
        min-width: 0;
    }

    .admin-user-actions {
        margin-left: auto;
    }

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