:root {
    color-scheme: dark;
    --bg: #090909;
    --panel: #111111;
    --text: #f7f2ee;
    --muted: #b29f95;
    --accent: #cb2f3b;
    --accent-2: #e65d54;
    --border: rgba(255,255,255,0.1);
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 50% -20%, rgba(107, 32, 32, 0.42), transparent 38%),
        linear-gradient(180deg, #0a0a0a 0%, #100909 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 18%, rgba(201, 47, 59, 0.12), transparent 18%),
        radial-gradient(circle at 82% 24%, rgba(230, 93, 84, 0.09), transparent 16%),
        radial-gradient(circle at 50% 88%, rgba(255, 255, 255, 0.025), transparent 22%);
    mix-blend-mode: screen;
    opacity: 0.8;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 42px 42px;
    opacity: 0.05;
}

a { color: inherit; text-decoration: none; }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    max-width: 1120px;
    margin: 0 auto;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(14px);
    background: linear-gradient(180deg, rgba(9, 9, 9, 0.88), rgba(9, 9, 9, 0));
}

.brand {
    font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
    font-size: 1.55rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.brand span { color: var(--accent); }

nav { display: flex; gap: 18px; align-items: center; color: var(--muted); }
nav a { font-weight: 400; }
nav a:hover { color: var(--text); }

.nav-button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.nav-button:hover {
    color: var(--text);
}

.nav-cta {
    padding: 10px 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #bf001f);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 30px -10px rgba(203, 47, 59, 0.65);
}

.nav-cta:hover,
.btn-primary:hover,
.auth-form button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.nav-cta,
.btn,
.auth-form button,
.btn-secondary,
.cards article {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease, filter 180ms ease;
}

main { max-width: 1120px; margin: 0 auto; padding: 52px 24px 60px; }

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 36px;
    padding: 56px 0 46px;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 10px 42% 0 -8px;
    border-radius: 40px;
    background: radial-gradient(circle at 40% 40%, rgba(203, 47, 59, 0.12), transparent 46%);
    filter: blur(20px);
    z-index: -1;
}

.hero-copy { text-align: left; padding-top: 10px; }

.badge {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #c8a79a;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.26em;
    background: rgba(255,255,255,0.015);
}

.hero h1, .auth-card h1 {
    font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
    font-size: clamp(3.2rem, 6vw, 5.9rem);
    line-height: 0.94;
    margin: 24px 0 20px;
    letter-spacing: -0.01em;
    max-width: 7.8ch;
    font-weight: 500;
}

.hero h1 {
    text-shadow: 0 10px 35px rgba(0, 0, 0, 0.38);
}

.hero h1 span, .auth-card h1 span { color: var(--accent); }

.lead {
    max-width: 650px;
    margin: 0;
    font-size: 1.05rem;
    color: #b8a59b;
    font-weight: 300;
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 22px;
    border-radius: 999px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #d34e44, #cc0020);
    color: white;
    box-shadow: 0 0 40px -8px rgba(211, 78, 68, 0.45);
}

.btn-secondary {
    border: 1px solid var(--border);
    color: var(--text);
    background: rgba(255,255,255,0.015);
}

.hero-visual {
    position: relative;
    min-height: 420px;
    border-radius: 26px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(31, 14, 14, 0.98), rgba(19, 12, 12, 0.98));
    overflow: hidden;
    box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
    transform: translateZ(0);
}

.hero-visual-frame {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 25%, rgba(116, 22, 27, 0.65), transparent 16%),
                radial-gradient(circle at 22% 76%, rgba(102, 22, 22, 0.65), transparent 18%);
}

.hero-visual-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(96, 24, 24, 0.8);
    animation: drift 10s ease-in-out infinite;
}

.hero-visual-circle-large {
    width: 128px;
    height: 128px;
    right: 38px;
    top: 18px;
}

.hero-visual-circle-small {
    width: 154px;
    height: 154px;
    left: 74px;
    bottom: 26px;
    opacity: 0.7;
    animation-delay: -4s;
}

.hero-visual-card {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 270px;
    height: 154px;
    transform: translate(-50%, -44%);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(20, 12, 12, 0.92);
    box-shadow: inset 0 0 0 1px rgba(118, 49, 49, 0.12);
    animation: float 8s ease-in-out infinite;
}

.hero-visual-tile {
    position: absolute;
    top: 30px;
    width: 92px;
    height: 92px;
    border-radius: 10px;
    background: rgba(40, 20, 20, 0.75);
}

.hero-visual-tile-left { left: 20px; }
.hero-visual-tile-right { right: 20px; }

.hero-visual-tile-left span {
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d74d45, #c11023);
}

.hero-visual-tile-right span {
    position: absolute;
    left: 28px;
    top: 20px;
    width: 36px;
    height: 36px;
    border: 5px solid #f3bbaf;
    border-bottom: 0;
    border-radius: 36px 36px 0 0;
    opacity: 0.95;
}

.hero-visual-bar {
    position: absolute;
    left: 34px;
    right: 34px;
    bottom: 22px;
    height: 10px;
    border-radius: 999px;
    background: rgba(150, 75, 75, 0.5);
}

.hero-visual-bar-short {
    width: 120px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: 12px;
}

.hero-visual::after {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
}

.hero-visual:hover .hero-visual-card {
    transform: translate(-50%, -46%) scale(1.01);
}

.hero-visual:hover .hero-visual-circle-large {
    transform: translateY(-6px) scale(1.03);
}

.hero-visual:hover .hero-visual-circle-small {
    transform: translateY(6px) scale(1.02);
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 36px;
}

.cards article, .join-box, .auth-card {
    background: rgba(18, 18, 18, 0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
}

.cards article:hover,
.auth-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.16);
    box-shadow: 0 28px 70px -24px rgba(0,0,0,0.65);
}

.cards h2, .join-box h2 {
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 600;
}

.cards p, .join-box p {
    font-weight: 400;
}

.cards article h2 {
    font-size: 1.9rem;
    margin: 0 0 12px;
}

.cards article p {
    color: #d4c0b8;
}

.auth-card {
    max-width: 520px;
    margin: 20px auto 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.auth-form label {
    color: var(--muted);
    font-size: 0.95rem;
}

.auth-form input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.15);
    background: #0f0f0f;
    color: var(--text);
}

.auth-form select,
.auth-form textarea,
.filter-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px;
    background: #0f0f0f;
    color: var(--text);
    font: inherit;
}

.auth-form textarea { resize: vertical; }

.auth-form input:focus,
.form input:focus {
    outline: none;
    border-color: rgba(203, 47, 59, 0.65);
    box-shadow: 0 0 0 3px rgba(203, 47, 59, 0.15);
}

.auth-form button {
    margin-top: 8px;
    padding: 12px 18px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.switch-link {
    margin-top: 16px;
    color: var(--muted);
}

.switch-link a {
    color: var(--accent);
    font-weight: 600;
}

.success {
    margin-top: 16px;
    color: #7cf0a2;
    font-weight: 600;
}

footer {
    text-align: center;
    padding: 24px;
    color: var(--muted);
    border-top: 1px solid rgba(255,255,255,.08);
    max-width: 1120px;
    margin: 0 auto;
}

.chat-page main {
    max-width: 1240px;
}

.chat-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}

.chat-sidebar,
.chat-room {
    background: rgba(18, 18, 18, 0.92);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
}

.chat-sidebar h1,
.chat-room h2 {
    font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
    margin: 14px 0 8px;
    font-weight: 600;
}

.chat-meta {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.chat-meta div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}

.chat-meta span {
    color: var(--muted);
    font-size: 0.85rem;
}

.chat-meta strong {
    font-weight: 600;
}

.chat-back {
    margin-top: 18px;
    width: 100%;
}

.chat-room {
    display: flex;
    flex-direction: column;
    min-height: 72vh;
}

.chat-room-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.chat-pill,
.chat-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    color: var(--muted);
    font-size: 0.85rem;
}

.chat-status[data-online="true"] {
    color: #8bf0ad;
    border-color: rgba(139, 240, 173, 0.25);
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 22px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    flex: 1;
    overflow: auto;
    min-height: 420px;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
}
.message-bubble-content { min-width: 0; flex: 1; }
.message-avatar { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.message-avatar-fallback { display: inline-grid; place-items: center; background: #49252a; color: #ffe0d9; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 700; }
.private-user-item .message-avatar { display: grid; width: 34px; height: 34px; margin: 0; padding: 0; overflow: visible; }
.private-user-item { display: flex; align-items: center; gap: 10px; }
.private-user-item .conversation-copy { min-width: 0; flex: 1; margin: 0; padding: 0; overflow: visible; white-space: normal; }
.private-message-image { display: block; width: min(100%, 320px); max-height: 350px; margin-top: 10px; border-radius: 8px; object-fit: contain; background: #080808; }
.chat-message footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.message-receipt { color: #a9e8b8; font-size: 0.72rem; }
.message-delete { border: 0; padding: 0; background: transparent; color: #d59a94; font: inherit; font-size: 0.72rem; cursor: pointer; }
.deleted-message { color: var(--muted) !important; font-style: italic; }
.message-photo-button { display: grid; place-items: center; width: 48px; min-height: 48px; border: 1px solid var(--border); border-radius: 14px; color: #ffd2cc; background: rgba(255,255,255,0.04); cursor: pointer; font-size: 1.4rem; }
.message-image-name { margin: 8px 0 0; color: var(--muted); font-size: 0.78rem; }

.chat-message.mine {
    background: linear-gradient(135deg, rgba(203,47,59,0.24), rgba(230,93,84,0.12));
    border-color: rgba(203,47,59,0.24);
}

.chat-message header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.chat-message p {
    margin: 0;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 16px;
}

.chat-form input {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.15);
    background: #0f0f0f;
    color: var(--text);
}

.chat-form button {
    border: 0;
    border-radius: 14px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #d34e44, #cc0020);
    color: white;
    font-weight: 700;
    cursor: pointer;
}
.message-access-note { margin: 10px 0 0; color: var(--muted); font-size: 0.82rem; }

.private-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}

.private-sidebar,
.private-room {
    background: rgba(18, 18, 18, 0.92);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
}

.private-users {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    max-height: 50vh;
    overflow: auto;
}

.private-user-item {
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    color: var(--text);
    padding: 12px 14px;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
}
.private-user-item strong, .private-user-item span { display: block; }
.private-user-item span { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }

.private-user-item.active {
    border-color: rgba(203,47,59,0.45);
    background: rgba(203,47,59,0.17);
}

.private-room {
    display: flex;
    flex-direction: column;
    min-height: 72vh;
}

.profile-view-card {
    max-width: 860px;
}

.profile-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.profile-section { padding: 22px 0; border-top: 1px solid var(--border); }
.profile-section:first-of-type { margin-top: 20px; }
.profile-section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.profile-section-heading > span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(230,93,84,0.45); border-radius: 50%; color: #f5b6ae; font-size: 0.7rem; }
.profile-section-heading p { margin: 0; color: var(--muted); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }
.profile-section-heading h2 { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.9rem; line-height: 1; }
.preference-group { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 8px; }
.preference-group > span { flex-basis: 100%; color: var(--muted); font-size: 0.8rem; }
.preference-group label { color: var(--text); font-size: 0.82rem; }

.profile-item {
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 10px 12px;
}

.profile-item span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
}

.profile-item strong {
    display: block;
    margin-top: 4px;
    font-weight: 600;
}

.profile-subtitle {
    margin: 18px 0 8px;
    font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
    font-size: 1.6rem;
}

.profile-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.profile-photo-item {
    margin: 0;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    padding: 6px;
}

.profile-photo-item img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.profile-remove-photo {
    margin-top: 6px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
}

.discover-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 28px;
    padding: 18px 0 34px;
}

.discover-header h1 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 3.4rem;
    line-height: 0.98;
    font-weight: 500;
    margin: 18px 0 14px;
    max-width: 13ch;
}

.discover-header h1 span { color: var(--accent); }

.discover-layout {
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.discover-filters {
    position: sticky;
    top: 92px;
    padding: 18px;
    background: rgba(18, 18, 18, 0.82);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.filter-heading, .results-bar, .card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.filter-heading h2 { margin: 0; font-size: 1rem; }
.text-button { border: 0; padding: 0; background: transparent; color: #e7a29b; font: inherit; cursor: pointer; }
.text-button:hover { color: var(--text); }

.filter-form { display: grid; gap: 10px; margin-top: 16px; }
.filter-form label { color: var(--muted); font-size: 0.82rem; }
.filter-form input {
    width: 100%; padding: 10px 11px; border: 1px solid var(--border); border-radius: 6px;
    background: #0d0d0d; color: var(--text); font: inherit;
}
.filter-form input:focus { outline: 2px solid rgba(203, 47, 59, 0.45); outline-offset: 1px; }
.filter-form button, .interest-button {
    border: 0; border-radius: 6px; padding: 11px 13px; background: var(--accent); color: #fff;
    font: inherit; font-weight: 700; cursor: pointer;
}
.filter-form button { margin-top: 8px; }
.interest-button:hover { filter: brightness(1.12); }
.interest-button:disabled { cursor: default; opacity: 0.72; }
.interest-button.is-liked { background: #5d3c42; }

.age-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.age-fields > div { display: grid; gap: 5px; }
.radius-control { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.radius-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.radius-heading output { color: #edaaa1; font-size: 0.8rem; font-weight: 700; }
.radius-control input[type="range"] { padding: 0; accent-color: var(--accent); }
.location-button { margin: 0 !important; padding: 9px 10px !important; background: rgba(255,255,255,0.08) !important; border: 1px solid var(--border) !important; }
.field-note { margin: 0; color: var(--muted); font-size: 0.75rem; line-height: 1.4; }
.city-picker { position: relative; }
.city-suggestions { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; max-height: 220px; overflow: auto; background: #171414; border: 1px solid rgba(255,255,255,0.18); border-radius: 6px; box-shadow: 0 16px 28px rgba(0,0,0,0.45); }
.city-suggestion { display: block; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid rgba(255,255,255,0.07); background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.city-suggestion:hover { background: rgba(203, 47, 59, 0.2); }
.relationship-filter { display: grid; gap: 7px; margin: 4px 0; padding: 10px 0; border: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.relationship-filter legend { padding: 0; color: var(--muted); font-size: 0.82rem; }
.relationship-filter label { color: var(--text); font-size: 0.84rem; }
.relationship-filter input { width: auto; margin: 0 5px 0 0; accent-color: var(--accent); }
.results-bar { margin: 0 0 18px; align-items: start; }
.results-bar p { margin: 0; }
#resultsCount { font-weight: 700; }
.consent-note { max-width: 37ch; color: var(--muted); font-size: 0.82rem; text-align: right; }

.profile-discovery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.discovery-card { position: relative; overflow: hidden; background: linear-gradient(180deg, #191516, #100f0f); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 16px 30px rgba(0,0,0,0.2); transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.discovery-card:hover { transform: translateY(-5px); border-color: rgba(230, 93, 84, 0.52); box-shadow: 0 25px 45px rgba(0,0,0,0.38); }
.profile-photo-button { display: block; width: 100%; height: 290px; padding: 0; border: 0; background: #26191a; cursor: pointer; overflow: hidden; }
.profile-photo-button::after { content: ""; position: absolute; inset: 205px 0 auto; height: 85px; pointer-events: none; background: linear-gradient(transparent, rgba(16,15,15,0.95)); }
.discovery-photo, .profile-avatar-fallback { display: grid; place-items: center; width: 100%; height: 100%; object-fit: cover; }
.discovery-card:hover .discovery-photo { transform: scale(1.035); }
.discovery-photo { transition: transform 380ms ease; }
.profile-avatar-fallback { color: #f4d2ca; font-family: "Cormorant Garamond", Georgia, serif; font-size: 4rem; background: linear-gradient(145deg, #381b20, #141111); }
.discovery-card-body { position: relative; z-index: 1; padding: 0 16px 16px; margin-top: -34px; }
.discovery-card h2 { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 2rem; font-weight: 600; line-height: 1; text-shadow: 0 2px 15px #000; }
.profile-meta { margin: 9px 0; color: #bba9a1; font-size: 0.82rem; }
.profile-presence { margin: 8px 0 0; color: var(--muted); font-size: 0.76rem; }
.profile-presence::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #74706d; }
.profile-presence.online { color: #92e8ae; }
.profile-presence.online::before { background: #4fda78; box-shadow: 0 0 9px rgba(79,218,120,0.75); }
.dialog-presence { margin: 14px 0; }
.profile-chips { display: flex; min-height: 24px; gap: 6px; flex-wrap: wrap; }
.profile-chip { padding: 3px 8px; border: 1px solid rgba(230, 93, 84, 0.38); border-radius: 999px; color: #f4c1b8; font-size: 0.7rem; background: rgba(114, 32, 37, 0.18); }
.profile-excerpt { display: -webkit-box; overflow: hidden; min-height: 46px; margin: 13px 0 15px; color: #d9c8c1; font-size: 0.87rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-actions { align-items: center; }
.card-actions .interest-button { padding: 8px 10px; font-size: 0.76rem; }
.empty-state { padding: 52px 20px; border: 1px dashed var(--border); text-align: center; }
.empty-state h2 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2rem; margin: 0; }
.empty-state p { color: var(--muted); }

.profile-dialog { width: min(900px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: visible; padding: 52px 0 0; color: var(--text); background: transparent; border: 0; }
.profile-dialog-body { max-height: min(800px, calc(100dvh - 100px)); overflow-y: auto; overscroll-behavior: contain; padding: 12px; background: #100e0e; border: 1px solid rgba(230, 93, 84, 0.3); border-radius: 8px; box-shadow: 0 32px 80px rgba(0,0,0,0.75); }
.profile-dialog::backdrop { background: rgba(0, 0, 0, 0.76); }
.dialog-close { position: absolute; z-index: 4; top: 24px; right: 24px; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,0.32); border-radius: 50%; background: rgba(12,10,10,0.65); color: var(--text); font-size: 1.45rem; cursor: pointer; }
.profile-dialog > .dialog-close { top: 0; right: 0; width: 44px; height: 44px; background: #191013; }
.public-profile-view { padding: 0 18px 20px; }
.dialog-profile-hero { position: relative; display: flex; align-items: flex-end; min-height: 420px; overflow: hidden; margin: 0 -18px 24px; padding: 34px; border-radius: 5px; isolation: isolate; }
.dialog-profile-hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(5,5,5,0.04) 26%, rgba(11,8,8,0.58) 65%, rgba(11,8,8,0.97)); }
.dialog-profile-photo { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; object-fit: cover; box-shadow: none; }
.dialog-profile-identity { max-width: 75%; }
.dialog-profile-hero h2 { margin: 7px 0 8px; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(3.5rem, 8vw, 5.7rem); line-height: 0.82; text-shadow: 0 3px 24px rgba(0,0,0,0.72); }
.public-profile-eyebrow, .public-profile-label { margin: 0; color: #e7a29b; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.public-profile-location { margin: 0; color: #f2dfd9; font-size: 1rem; text-shadow: 0 2px 10px #000; }
.public-profile-view > .profile-meta { margin: 0; padding: 15px 17px; border: 1px solid var(--border); border-radius: 6px; background: rgba(255,255,255,0.035); color: #d7c0b8; }
.public-profile-label { margin-top: 26px; }
.dialog-description { white-space: pre-wrap; margin: 9px 0 0; padding: 18px; border-left: 2px solid var(--accent); background: rgba(255,255,255,0.028); color: #ead9d3; line-height: 1.8; }
.dialog-chips { margin: 14px 0; }
.dialog-bite-counter { position: absolute; top: 20px; right: 20px; padding: 8px 11px; border: 1px solid rgba(255,255,255,0.35); border-radius: 999px; background: rgba(17,11,11,0.72); color: #ffd4ce; font-size: 0.82rem; font-weight: 700; backdrop-filter: blur(8px); }
.message-preference-note { margin: 0 0 14px; padding: 10px 12px; border-left: 2px solid var(--accent); background: rgba(203,47,59,0.09); color: #e2c6bf; font-size: 0.88rem; }
.dialog-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 9px; }
.dialog-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; transition: transform 200ms ease, filter 200ms ease; }
.dialog-gallery img:hover { transform: scale(1.025); filter: brightness(1.08); }
.public-profile-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin-top: 24px; }
.dialog-interest { width: 100%; margin-top: 0; }
.private-message-button { display: block; width: 100%; margin-top: 0; padding: 12px; border: 1px solid rgba(230,93,84,0.45); border-radius: 6px; color: #ffd2cc; background: rgba(203,47,59,0.12); font-weight: 700; text-align: center; }
.private-message-button:hover { background: rgba(203,47,59,0.22); }

.member-welcome { padding: 22px 0 42px; }
.member-welcome h1 { margin: 18px 0 14px; font-family: "Cormorant Garamond", Georgia, serif; font-size: 3.6rem; font-weight: 500; line-height: 0.95; }
.member-welcome h1 span { color: var(--accent); }
.member-welcome .btn { margin-top: 24px; }
.home-section { padding: 30px 0; border-top: 1px solid var(--border); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.section-heading h2 { margin: 2px 0 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 2.25rem; line-height: 1; font-weight: 600; }
.section-heading a { color: #e6a49d; font-size: 0.88rem; }
.eyebrow { margin: 0; color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.mini-profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mini-profile-card { display: grid; grid-template-rows: 170px auto auto; gap: 6px; overflow: hidden; padding-bottom: 12px; background: #121212; border: 1px solid var(--border); border-radius: 8px; transition: transform 160ms ease, border-color 160ms ease; }
.mini-profile-card:hover { transform: translateY(-3px); border-color: rgba(230, 93, 84, 0.55); }
.mini-profile-photo { width: 100%; height: 170px; object-fit: cover; }
.mini-profile-card strong, .mini-profile-card span { padding: 0 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-profile-card strong { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.3rem; }
.mini-profile-card span { color: var(--muted); font-size: 0.75rem; }
.section-empty { margin: 0; padding: 20px; color: var(--muted); background: rgba(255,255,255,0.025); }

.admin-header { padding: 24px 0 34px; }
.admin-header h1 { margin: 16px 0 10px; font-family: "Cormorant Garamond", Georgia, serif; font-size: 3.4rem; font-weight: 500; line-height: 1; }
.admin-section { padding: 26px 0; border-top: 1px solid var(--border); }
.admin-section h2 { margin: 0 0 14px; font-family: "Cormorant Garamond", Georgia, serif; font-size: 2rem; }
.admin-list { display: grid; gap: 10px; color: var(--muted); }
.admin-item { padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,0.025); color: var(--text); }
.admin-item h3 { margin: 0 0 7px; font-size: 1rem; }
.admin-item p { margin: 0; color: #cbbab2; white-space: pre-wrap; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.admin-action, .admin-danger { border: 1px solid var(--border); border-radius: 5px; padding: 8px 10px; color: var(--text); background: rgba(255,255,255,0.06); font: inherit; cursor: pointer; }
.admin-actions select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 5px; background: #171414; color: var(--text); font: inherit; }
.admin-danger { border-color: rgba(222, 83, 83, 0.55); color: #ffc4c4; background: rgba(181, 44, 44, 0.18); }
.dialog-report { display: block; margin: 14px auto 0; color: #d99a94; }

@keyframes float {
    0%, 100% { transform: translate(-50%, -44%) translateY(0); }
    50% { transform: translate(-50%, -44%) translateY(-8px); }
}

@keyframes drift {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.04); }
}

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .hero-copy { text-align: center; }
    .hero h1 { margin-left: auto; margin-right: auto; }
    .lead { margin-left: auto; margin-right: auto; }
    .actions { justify-content: center; }
    .profile-discovery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mini-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}



@media (max-width: 768px) {
    .cards { grid-template-columns: 1fr; }
    .topbar { flex-direction: column; gap: 10px; padding: 12px 16px; align-items: stretch; }
    .brand { align-self: center; font-size: 1.3rem; }
    .site-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 12px;
        width: 100%;
        padding: 5px 0 2px;
        font-size: 0.82rem;
        line-height: 1.25;
    }
    .site-nav a,
    .site-nav .nav-button { padding: 6px 3px; white-space: nowrap; }
.site-nav .nav-cta { padding: 7px 11px; border-radius: 6px; }
    main { padding: 24px 16px 48px; }
    .hero-visual { min-height: 320px; }
    .chat-shell { grid-template-columns: 1fr; }
    .private-shell { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .chat-room-head, .chat-form { grid-template-columns: 1fr; display: grid; }
    .chat-room { min-height: 64vh; }
    .discover-header { display: block; }
    .discover-header .btn { margin-top: 20px; }
    .discover-layout { grid-template-columns: 1fr; }
    .discover-filters { position: static; }
    .profile-discovery-grid { grid-template-columns: 1fr; }
    .results-bar { display: block; }
    .consent-note { margin-top: 8px !important; text-align: left; }
    .profile-dialog { padding: 52px 0 0; }
    .public-profile-view { padding: 0 12px 14px; }
    .dialog-profile-hero { min-height: 350px; margin: 0 -12px 20px; padding: 22px; }
    .dialog-profile-identity { max-width: 100%; }
    .dialog-profile-hero h2 { font-size: 3.5rem; }
    .public-profile-actions { grid-template-columns: 1fr; }
    .member-welcome h1 { font-size: 3rem; }
    .mini-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Shared community pages and member tools. */
:focus-visible { outline: 2px solid #ff9d95; outline-offset: 5px; }
html { scroll-padding-top: 100px; }
.site-nav { flex-wrap: wrap; justify-content: flex-end; gap: 10px 16px; }
.site-nav [aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 7px; }
.nav-toggle { display: none; }
#allFranceBtn { width: 100%; margin-top: 12px; }
#allFranceBtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
#filterRadius:disabled { opacity: .45; }
.topbar .site-nav:not([data-nav-ready]) { visibility: hidden; }
@media (max-width: 1000px) {
    .topbar .site-nav:not([data-nav-ready]) { display: none; }
}

.private-user-item .conversation-avatar { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; min-width: 42px; margin: 0; overflow: hidden; border-radius: 50%; }
.private-user-item .conversation-avatar .message-avatar { display: block; position: static; width: 100%; height: 100%; max-width: 100%; margin: 0; object-fit: cover; border-radius: 50%; overflow: hidden; }
.private-user-item .conversation-avatar .message-avatar-fallback { display: grid; place-items: center; }
.private-user-item .conversation-name { display: flex; align-items: center; gap: 7px; min-width: 0; margin: 0; }
.private-user-item .conversation-name strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.private-user-item .conversation-name .conversation-unread { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 22px; height: 22px; margin: 0; padding: 0 5px; border-radius: 99px; color: #fff; background: var(--accent); font: 700 12px/1 system-ui; }
.nav-toggle:disabled { opacity: .6; cursor: wait; }
.unread-badge { display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 5px;margin-left:7px;border-radius:99px;background:var(--accent);color:#fff;font:700 12px/1 system-ui;vertical-align:middle; }
.nav-drawer {
    position: fixed; inset: 0 0 0 auto; margin: 0;
    width: min(360px, 90vw); height: 100%; height: 100dvh;
    max-width: none; max-height: none;
    padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    border: 0; border-left: 1px solid var(--border);
    color: var(--text); background: linear-gradient(160deg, #261317, #111 45%);
    box-shadow: -20px 0 70px #0008; overflow-y: auto; overscroll-behavior: contain;
}
.nav-drawer[open] { animation: navigation-enter .22s ease-out; }
.nav-drawer::backdrop { background: #000a; backdrop-filter: blur(5px); }
.nav-drawer-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.nav-drawer-eyebrow { color: var(--accent-2); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.nav-drawer-heading h2 { margin: 4px 0 0; font-size: 1.4rem; }
.nav-drawer-close { flex-shrink: 0; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; color: var(--text); background: #ffffff08; cursor: pointer; font-size: 1.1rem; }
.nav-drawer .site-nav { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; justify-content: flex-start; gap: 6px; overflow: visible; width: 100%; padding: 0; }
.nav-drawer .site-nav a, .nav-drawer .site-nav .nav-button { display: block; width: 100%; min-height: 48px; padding: 12px 16px; text-align: left; border-radius: 12px; white-space: normal; font-size: .95rem; }
.nav-drawer .site-nav a:hover, .nav-drawer .nav-button:hover { background: #ffffff08; }
.nav-drawer .site-nav [aria-current="page"] { color: #fff; background: #cb2f3b24; box-shadow: inset 3px 0 var(--accent); text-decoration: none; }
.nav-drawer .nav-button { margin-top: 14px; border-top: 1px solid var(--border); color: var(--muted); }
.nav-drawer :focus-visible, .nav-toggle:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
body.navigation-open { overflow: hidden; }
@keyframes navigation-enter { from { transform: translateX(100%); opacity: .5; } to { transform: translateX(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nav-drawer[open] { animation: none; } }
.page-intro { padding: 20px 0 34px; max-width: 760px; }
.page-intro h1 { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(3rem, 6vw, 5rem); line-height: 1.05; font-weight: 500; margin: 18px 0; }
.page-intro h1 span { color: var(--accent-2); }
.content-section { margin-top: 76px; }
.content-section > h2, .community-note h2, .join-banner h2 { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; line-height: 1.15; margin: 10px 0 28px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.guide-grid, .account-layout, .dashboard-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.dashboard-tools { margin: 30px 0 48px; }
.surface-panel { padding: 28px; border: 1px solid var(--border); background: linear-gradient(145deg, #181213, #101010); border-radius: 18px; min-width: 0; }
.surface-panel h2 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2rem; font-weight: 500; line-height: 1.2; margin: 8px 0 20px; }
.surface-panel h3 { font-size: 1.1rem; line-height: 1.4; margin: 16px 0 10px; }
.surface-panel p, .community-note p, .join-banner p { color: var(--muted); }
.step-number { display: block; font-family: "Cormorant Garamond", Georgia, serif; font-size: 2.6rem; color: var(--accent-2); line-height: 1; }
.community-note { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 76px; padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.community-note h2 { margin-bottom: 0; }
.faq-section { max-width: 800px; margin-left: auto; margin-right: auto; }
.faq-section details { border-bottom: 1px solid var(--border); }
.faq-section summary { padding: 22px 30px 22px 0; cursor: pointer; font-weight: 500; }
.faq-section summary::marker { color: var(--accent-2); }
.faq-section details p { color: var(--muted); padding: 0 18px 18px; margin-top: 0; }
.faq-section details a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.faq-more { display: inline-block; margin-top: 24px; }
.join-banner { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-top: 76px; padding: 38px; border: 1px solid #633038; border-radius: 20px; background: radial-gradient(ellipse at top right, #4d1b24, #191113 70%); }
.join-banner h2 { margin-bottom: 12px; }
.join-banner .btn { flex-shrink: 0; }
.site-footer { max-width: 1120px; margin: 0 auto; padding: 36px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; text-align: left; border-top: 1px solid var(--border); }
.site-footer .brand { font-size: 1.2rem; }
.site-footer p { color: var(--muted); font-size: 0.85rem; }
.site-footer nav { justify-content: flex-end; flex-wrap: wrap; font-size: 0.88rem; gap: 14px 20px; }
.footer-note { grid-column: 1 / -1; margin-top: 12px; }
.account-details { margin: 0 0 28px; }
.account-details dt { font-size: 0.8rem; color: var(--muted); margin-top: 20px; }
.account-details dd { margin: 5px 0 0; overflow-wrap: anywhere; }
.auth-form .check-line { display: flex; align-items: center; gap: 10px; }
.check-line input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
button:disabled { cursor: wait; opacity: 0.65; }
#passwordStatus { overflow-wrap: anywhere; }
#profileProgress { display: block; width: 100%; height: 8px; margin: 14px 0 22px; accent-color: var(--accent); }
#profileProgressLabel { font-size: 0.85rem; color: var(--muted); }
.profile-checklist { padding: 0; list-style: none; color: var(--muted); font-size: 0.9rem; }
.profile-checklist li { margin: 9px 0; }
.profile-checklist .is-complete { color: #a8d6bd; }
.quick-links { display: grid; }
.quick-links a { display: grid; gap: 3px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.quick-links a:first-child { padding-top: 0; }
.quick-links a:last-child { border: 0; padding-bottom: 0; }
.quick-links span { color: var(--muted); font-size: 0.85rem; }
.quick-links a:hover strong { color: var(--accent-2); }
@media (max-width: 1000px) {
    .topbar { flex-wrap: wrap; gap: 14px; }
    .topbar > .brand { margin-right: auto; }
    .nav-toggle { display: block; color: var(--text); background: var(--panel); border: 1px solid var(--border); padding: 10px 16px; border-radius: 8px; cursor: pointer; font: inherit; }
    .nav-toggle ~ .site-nav { display: none; }
    .nav-toggle ~ .site-nav.is-open { display: flex; flex-basis: 100%; justify-content: flex-start; padding: 14px 0; }
    .site-nav a, .site-nav .nav-button { padding: 10px 8px; }
}
@media (max-width: 768px) {
    .topbar { flex-direction: row; align-items: center; background: rgba(9, 9, 9, 0.96); }
    .steps-grid, .guide-grid, .account-layout, .dashboard-tools, .community-note { grid-template-columns: 1fr; }
    .surface-panel { padding: 24px; }
    .content-section, .community-note, .join-banner { margin-top: 48px; }
    .community-note { gap: 16px; padding: 28px 0; }
    .join-banner { flex-direction: column; align-items: stretch; padding: 28px; }
    .site-footer { grid-template-columns: 1fr; padding: 28px 16px; }
    .site-footer nav { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Private messenger: a stable composer, readable bubbles and compact mobile layout. */
.prelaunch-hero { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 48px; padding: 20px 0 48px; }
.prelaunch-hero .page-intro { padding-bottom: 0; }
.launch-card { background: radial-gradient(ellipse at top right, #65273155, transparent 65%), #151113; padding: 34px; }
.launch-card h2 { font-size: 2.7rem; margin-bottom: 30px; }
.launch-steps { list-style: none; padding: 0; margin: 0 0 30px; }
.launch-steps li { display: flex; align-items: flex-start; gap: 18px; margin: 22px 0; }
.launch-steps li > span { color: var(--accent-2); font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.8rem; line-height: 1; }
.launch-steps strong { font-size: .95rem; }
.launch-steps p { margin: 5px 0 0; font-size: .85rem; }
.preregistration-notice { padding: 16px 20px; border-left: 3px solid var(--accent-2); border-radius: 0 10px 10px 0; background: #a13d4915; color: #eacbc6; }
#openingSettings { border-color: #70404a; }
#openingForm { max-width: 750px; }
#openingMessage { padding: 14px; background: #171014; color: var(--text); font: inherit; border: 1px solid var(--border); border-radius: 12px; resize: vertical; }
#maintenanceMessage { padding: 14px; background: #171014; color: var(--text); font: inherit; border: 1px solid var(--border); border-radius: 12px; resize: vertical; }
.maintenance-main { min-height: 75vh; display: grid; align-items: center; }
.maintenance-card { max-width: 800px; margin: auto; padding: clamp(24px, 5vw, 64px); text-align: center; background: radial-gradient(ellipse at top, #62243255, transparent 70%), #141013; }
.maintenance-symbol { display: block; color: var(--accent-2); font-size: 3.5rem; margin-bottom: 20px; }
.maintenance-card h1 { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(2.8rem, 6vw, 4.8rem); font-weight: 500; line-height: 1.1; }
.maintenance-card h1 span { color: var(--accent-2); }
.maintenance-card .lead { margin-left: auto; margin-right: auto; white-space: pre-wrap; }
.maintenance-card .actions { justify-content: center; flex-wrap: wrap; }
@media (max-width: 800px) {
    .prelaunch-hero { grid-template-columns: 1fr; gap: 24px; }
    .launch-card { padding: 24px; }
}

.mobile-chat-back, .mobile-chat-exit { display: none; }
.chat-page main { max-width: 1280px; padding-top: 24px; }
.chat-page .private-shell { grid-template-columns: 290px minmax(0, 1fr); gap: 0; border: 1px solid #352328; border-radius: 24px; overflow: hidden; box-shadow: 0 24px 80px #0005; }
.chat-page .private-sidebar { border: 0; border-right: 1px solid #352328; border-radius: 0; padding: 26px 18px; background: #120e10; }
.chat-page .private-sidebar h1 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2.3rem; margin: 12px 0 6px; }
.chat-page .private-sidebar .lead { font-size: .85rem; margin: 0 0 26px; }
.chat-page .private-sidebar .badge { font-size: .62rem; letter-spacing: .1em; }
.chat-page .private-users { gap: 6px; }
.chat-page .private-user-item { padding: 14px 12px; border-color: transparent; border-radius: 12px; }
.chat-page .private-user-item.active { background: #52232d66; border-color: #873a4855; box-shadow: inset 3px 0 #e65d54; }
.chat-page .private-user-item:hover { background: #ffffff08; }
.chat-page .private-room { min-width: 0; min-height: 0; height: min(800px, 82dvh); border: 0; border-radius: 0; padding: 24px; background: radial-gradient(ellipse at top right, #39202955, transparent 65%), #100e10; }
.chat-page .chat-room-head { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid #ffffff0d; }
.chat-page .chat-room-head h2 { margin: 5px 0 0; font-size: 1.2rem; overflow-wrap: anywhere; }
.chat-page .chat-room-head .badge { font-size: .65rem; }
.chat-page .chat-pill { flex-shrink: 0; font-size: .7rem; max-width: 42%; overflow-wrap: anywhere; }
.chat-page .chat-messages { min-height: 100px; margin: 0; padding: 24px 0; border: 0; border-radius: 0; background: none; gap: 16px; scrollbar-width: thin; scrollbar-color: #653640 transparent; }
.chat-page .chat-message { align-self: flex-start; max-width: 88%; padding: 14px; border-radius: 4px 18px 18px; background: #211a1e; border-color: #ffffff08; flex-shrink: 0; }
.chat-page .chat-message.mine { align-self: flex-end; border-radius: 18px 4px 18px 18px; background: linear-gradient(135deg, #582632, #361d27); border-color: #85414b66; }
.chat-page .chat-message header { gap: 18px; font-size: .72rem; flex-wrap: wrap; }
.chat-page .chat-message p { font-size: .92rem; line-height: 1.6; }
.chat-page .chat-message footer { padding: 0; margin: 8px 0 0; border: 0; text-align: left; }
.chat-page .chat-empty { margin: auto; max-width: 340px; padding: 30px; text-align: center; color: var(--muted); }
.chat-page .chat-form { grid-template-columns: 42px minmax(0, 1fr) auto; align-items: end; gap: 8px; margin-top: 10px; padding: 8px; border: 1px solid #51323c; border-radius: 18px; background: #1a1418; }
.chat-page .chat-form:focus-within { border-color: #b45562; box-shadow: 0 0 0 3px #b4556212; }
.chat-page .chat-form textarea { box-sizing: border-box; display: block; width: 100%; min-width: 0; min-height: 44px; max-height: 150px; padding: 10px 8px; color: var(--text); background: transparent; border: 0; resize: none; font: inherit; font-size: 16px; line-height: 24px; }
.chat-page .chat-form textarea:focus { outline: none; }
.chat-page .chat-form button { min-height: 44px; padding: 10px 16px; border-radius: 12px; }
.chat-page .chat-form .message-photo-button { width: 42px; padding: 0; background: #ffffff09; color: #e7b9c0; font-size: 1.65rem; border: 1px solid #ffffff0a; }
.chat-page .chat-form button:disabled { cursor: not-allowed; opacity: .4; }
.composer-hint { margin: 7px 4px 0; color: #ad939c; font-size: .66rem; }
.chat-page .message-access-note { font-size: .73rem; margin-top: 8px; }
.permission-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #6f4f3955; border-radius: 10px; background: #b8893410; color: #d8b88c; font-size: .72rem; margin-top: 12px; }
.permission-bar .text-button { color: #edc4a4; font-size: .72rem; }
.attachment-preview { display: flex; align-items: center; gap: 12px; padding: 10px; margin-top: 10px; background: #271d23; border-radius: 12px; }
.attachment-preview img { width: 58px; height: 58px; object-fit: cover; border-radius: 8px; }
.attachment-preview > div { min-width: 0; flex: 1; }
.attachment-preview strong { font-size: .8rem; }
.attachment-preview p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-preview button { border: 0; background: transparent; color: var(--text); font-size: 1.5rem; cursor: pointer; width: 40px; height: 40px; }
.message-image-link { display: block; }
.chat-page .private-message-image { border-radius: 10px; max-height: 320px; }
@media (max-width: 800px) {
    body.chat-page { height: 100dvh; min-height: 0; overflow: hidden; overscroll-behavior: none; }
    .chat-page > .topbar, .chat-page > .site-footer { display: none; }
    .chat-page main { position: fixed; top: var(--visible-top, 0px); left: 0; width: 100%; max-width: none; height: var(--visible-height, 100dvh); min-height: 0; margin: 0; padding: 0; overflow: hidden; }
    .chat-page .private-shell { display: block; width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
    .chat-page .private-sidebar { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); border: 0; }
    .chat-page[data-chat-view="conversation"] .private-sidebar { display: none; }
    .chat-page:not([data-chat-view="conversation"]) .private-room { display: none; }
    .chat-page .mobile-chat-back, .chat-page .mobile-chat-exit { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: #22191f; color: var(--text); font: inherit; font-size: .75rem; cursor: pointer; }
    .chat-page .close-conversations { align-self: flex-end; flex-shrink: 0; margin-bottom: 12px; }
    .chat-page .private-sidebar h1 { font-size: 1.7rem; margin-top: 0; }
    .chat-page .private-sidebar > .badge, .chat-page .private-sidebar > .lead { display: none; }
    .chat-page .private-users { flex: 1; min-height: 0; flex-direction: column; max-height: none; margin-top: 10px; overflow-y: auto; overscroll-behavior: contain; }
    .chat-page .private-user-item { width: 100%; min-width: 0; max-width: none; flex-shrink: 0; }
    .chat-page .chat-back { display: block; flex-shrink: 0; padding: 12px; margin-top: 12px; font-size: .85rem; }
    .chat-page .private-room { padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); height: 100%; min-height: 0; overflow: hidden; }
    .chat-page .chat-room-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 8px; padding-bottom: 6px; flex-shrink: 0; }
    .chat-page .chat-room-head > div { min-width: 0; }
    .chat-page .chat-room-head .badge { display: none; }
    .chat-page .chat-room-head h2 { font-size: .9rem; margin: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
    .chat-page .mobile-chat-exit { grid-column: 3; grid-row: 1; }
    .chat-page .chat-pill { grid-column: 1 / -1; grid-row: 2; max-width: none; margin: 0; padding: 0; border: 0; background: none; font-size: .65rem; max-height: 3em; overflow: auto; }
    .chat-page .chat-messages { flex: 1 1 0; min-height: 0; padding: 12px 0; overflow-y: auto; overscroll-behavior: contain; }
    .chat-page .chat-form, .chat-page .attachment-preview, .chat-page .permission-bar { flex-shrink: 0; }
    .chat-page .chat-form { margin-top: 4px; }
    .chat-page .chat-form textarea { max-height: min(100px, 25dvh); }
    .chat-page .composer-hint { display: none; }
    .chat-page .message-access-note { flex-shrink: 0; max-height: 2.8em; overflow-y: auto; margin: 4px 0 0; font-size: .65rem; }
    .chat-page[data-keyboard="open"] .message-access-note { display: none; }
    .chat-page .permission-bar { max-height: 80px; overflow-y: auto; margin-top: 4px; padding: 4px 8px; }
    .chat-page .chat-message { max-width: 96%; padding: 10px; gap: 7px; }
    .chat-page .bubble-avatar { width: 26px; height: 26px; }
    .chat-page .chat-form { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px; padding: 5px; }
    .chat-page .chat-form .message-photo-button { width: 36px; }
    .chat-page .chat-form button { padding: 10px; font-size: .8rem; }
    .permission-bar { align-items: flex-start; flex-direction: column; gap: 4px; }
}
