:root {
    --bg: #f5f0e9;
    --bg-soft: #ece3d6;
    --paper: rgba(255, 253, 249, 0.9);
    --paper-strong: #fffdf9;
    --ink: #161412;
    --muted: #6d675f;
    --line: rgba(22, 20, 18, 0.12);
    --brand: #171513;
    --brand-dark: #171513;
    --teal: #d8ccbd;
    --gold: #b48b62;
    --shadow: 0 18px 50px rgba(20, 18, 17, 0.08);
    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
    --font-body: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(214, 196, 174, 0.24), transparent 38%),
        radial-gradient(circle at 90% 20%, rgba(160, 145, 127, 0.12), transparent 28%),
        linear-gradient(180deg, #f8f4ee 0%, #f2ece3 100%);
    line-height: 1.5;
}

body.is-authenticated {
    padding-bottom: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.ambient {
    position: fixed;
    inset: auto;
    z-index: -1;
    border-radius: 999px;
    filter: blur(90px);
    opacity: 0.28;
}

.ambient-one {
    width: 22rem;
    height: 22rem;
    top: 8rem;
    right: 6%;
    background: rgba(202, 183, 159, 0.34);
}

.ambient-two {
    width: 18rem;
    height: 18rem;
    left: 6%;
    bottom: 8rem;
    background: rgba(123, 111, 95, 0.18);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(248, 244, 238, 0.8);
    border-bottom: 1px solid rgba(22, 20, 18, 0.08);
}

.site-header__inner,
.page-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.site-header--app {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 50;
    background: rgba(248, 244, 238, 0.88);
    border-bottom: 1px solid rgba(22, 20, 18, 0.06);

    /* Safe area (notch / status bar) */
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

.site-header__inner--app {
    min-height: 5.85rem;
    padding: 1.2rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-weight: 700;
}

.brand__symbol {
    display: inline-grid;
    place-items: center;
    width: 8.4rem;
    height: 3.7rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--ink);
}

.brand__symbol svg {
    width: 100%;
    height: 100%;
    display: block;
}

.brand__logo-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.brand__wordmark {
    font-family: var(--font-display);
    font-size: 1.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand--app .brand__symbol {
    width: 9.15rem;
    height: 4.02rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.site-nav a {
    padding: 0.72rem 0.98rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.96rem;
}

.site-nav a.is-active,
.site-nav a:hover,
.cta-link {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(22, 20, 18, 0.06);
}

.site-user {
    display: none;
}

.site-user__label {
    display: inline-flex;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(22, 20, 18, 0.06);
    font-weight: 600;
}

.page-shell {
    padding: 2rem 0 4rem;
}

.is-authenticated .page-shell {
    padding-top: calc(7.65rem + env(safe-area-inset-top));
    padding-bottom: 7.4rem;
}

.app-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.app-icon-button {
    display: inline-grid;
    place-items: center;
    width: 2.95rem;
    height: 2.95rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(22, 20, 18, 0.08);
    color: var(--muted);
    box-shadow: 0 10px 24px rgba(20, 18, 17, 0.05);
    transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.app-icon-button svg {
    width: 1.2rem;
    height: 1.2rem;
    display: block;
}

.app-icon-button:hover,
.app-icon-button.is-active {
    color: var(--ink);
    border-color: rgba(22, 20, 18, 0.16);
    background: #fff;
    transform: translateY(-1px);
}

.app-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    width: min(392px, calc(100% - 1.2rem));
    padding: 0.38rem;
    transform: translateX(-50%);
    border-radius: 23px;
    background: rgba(255, 253, 249, 0.96);
    border: 1px solid rgba(22, 20, 18, 0.08);
    box-shadow: 0 18px 40px rgba(20, 18, 17, 0.12);
    backdrop-filter: blur(18px);
}

.app-bottom-nav__item {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 3.35rem;
    padding: 0.3rem;
    border-radius: 17px;
    color: var(--muted);
    transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.app-bottom-nav__item:hover,
.app-bottom-nav__item.is-active {
    color: var(--ink);
    background: rgba(22, 20, 18, 0.06);
    transform: translateY(-1px);
}

.app-bottom-nav__item--brand:hover,
.app-bottom-nav__item--brand.is-active {
    background: transparent;
}

.app-bottom-nav__icon {
    display: inline-grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
}

.app-bottom-nav__icon svg {
    width: 1.28rem;
    height: 1.28rem;
    display: block;
}

.app-bottom-nav__icon--brand svg {
    width: 2.36rem;
    height: 1.5rem;
}

.app-bottom-nav__brand-image {
    width: 3.45rem;
    height: 2.26rem;
    display: block;
    object-fit: contain;
}

.app-profile-avatar,
.app-profile-fallback {
    width: 2.18rem;
    height: 2.18rem;
    border-radius: 50%;
    border: 2px solid rgba(22, 20, 18, 0.08);
}

.app-profile-avatar {
    object-fit: cover;
}

.app-profile-fallback {
    display: grid;
    place-items: center;
    background: var(--brand);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-nav-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.52rem;
    min-width: 1.05rem;
    padding: 0.12rem 0.28rem;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
}

.app-nav-badge--soft {
    background: rgba(180, 139, 98, 0.18);
    color: #7a5a39;
}

.app-nav-badge--heart {
    background: #bc4863;
    color: #fff;
}

.flash {
    margin-bottom: 1.2rem;
    padding: 1rem 1.2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    font-weight: 600;
}

.flash-success {
    background: rgba(22, 129, 122, 0.14);
    color: #0f5f59;
}

.flash-info {
    background: rgba(58, 134, 255, 0.12);
    color: #29588c;
}

.flash-error {
    background: rgba(255, 107, 87, 0.14);
    color: #8d2a1b;
}

.eyebrow {
    margin: 0 0 0.6rem;
    color: #8b6e56;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 700;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-display);
    line-height: 1.05;
}

p {
    margin: 0;
}

.hero,
.auth-shell,
.profile-page,
.discover-page,
.matches-page {
    display: grid;
    gap: 1.4rem;
}

.hero {
    align-items: center;
}

.page-landing .hero {
    gap: 2rem;
}

.hero__mobile-intro {
    display: none;
}

.hero__content,
.hero__visual,
.feature-card,
.auth-card,
.info-panel,
.panel,
.hero-card {
    backdrop-filter: blur(10px);
    background: var(--paper);
    border: 1px solid rgba(22, 20, 18, 0.07);
    box-shadow: var(--shadow);
}

.hero__content,
.hero__visual,
.feature-card,
.auth-card,
.info-panel,
.panel {
    border-radius: var(--radius-xl);
}

.hero__content {
    padding: 2.4rem;
}

.page-landing .hero__content {
    padding: 0.6rem 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.hero__content h1 {
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    margin-bottom: 1rem;
    max-width: 10.5ch;
    letter-spacing: -0.03em;
}

.hero__lead {
    max-width: 38rem;
    color: var(--muted);
    font-size: 1.02rem;
}

.hero__actions,
.hero__meta,
.button-row,
.panel-actions,
.swipe-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.hero__actions {
    margin-top: 1.6rem;
}

.hero__meta {
    margin-top: 1.6rem;
}

.hero__meta div {
    display: grid;
    gap: 0.2rem;
    min-width: 110px;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(22, 20, 18, 0.05);
}

.hero__meta strong {
    font-size: 1.2rem;
}

.hero__meta span {
    color: var(--muted);
    font-size: 0.88rem;
}

.hero__visual {
    position: relative;
    min-height: 420px;
    padding: 1.6rem;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(241, 233, 223, 0.9));
}

.page-landing .hero__visual {
    min-height: 700px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.hero-card {
    position: absolute;
    width: min(88%, 280px);
    padding: 1.15rem;
    border-radius: 28px;
    background: rgba(255, 253, 249, 0.92);
}

.hero-card--front {
    left: 0;
    bottom: 1.2rem;
    color: var(--ink);
    z-index: 2;
}

.hero-card--back {
    right: 0;
    top: 1.6rem;
    z-index: 1;
}

.hero-card__badge {
    display: inline-flex;
    margin-bottom: 1.1rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(180, 139, 98, 0.12);
    color: #7a5a39;
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-card__badge--hot {
    background: rgba(22, 20, 18, 0.06);
    color: var(--ink);
}

.hero-card h3 {
    margin-bottom: 0.45rem;
    font-size: 1.5rem;
    line-height: 1.1;
}

.hero-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.hero-card__chips span,
.swipe-card__chips span,
.pill,
.chip-option span,
.match-list__badge {
    border-radius: 999px;
}

.hero-card__chips span,
.swipe-card__chips span {
    padding: 0.45rem 0.75rem;
    background: rgba(22, 20, 18, 0.06);
    font-size: 0.82rem;
}

.hero-phone {
    position: absolute;
    inset: 0.4rem 4rem 0.4rem 4rem;
    overflow: hidden;
    border-radius: 38px;
    border: 10px solid rgba(23, 21, 19, 0.98);
    box-shadow: 0 26px 70px rgba(20, 18, 17, 0.18);
    background: #d9d1c7;
    z-index: 1;
}

.hero-phone__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 0.75s ease, transform 0.75s ease;
    pointer-events: none;
}

.hero-phone__slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-phone__media {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
}

.hero-phone__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(22, 20, 18, 0.02) 10%, rgba(22, 20, 18, 0.18) 60%, rgba(22, 20, 18, 0.48) 100%);
}

.hero-phone__sheet {
    position: absolute;
    inset: auto 1rem 1rem;
    display: grid;
    gap: 0.72rem;
    padding: 1.2rem;
    background: rgba(255, 253, 249, 0.96);
    border: 1px solid rgba(22, 20, 18, 0.08);
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(20, 18, 17, 0.18);
}

.hero-phone__metrics,
.hero-phone__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.hero-phone__job {
    display: inline-flex;
    width: fit-content;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-phone h3 {
    font-size: clamp(2rem, 4vw, 2.6rem);
    line-height: 1;
}

.hero-phone__city {
    color: var(--muted);
    font-size: 0.96rem;
}

.hero-phone__prompt {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 1rem;
    border-radius: 22px;
    background: rgba(22, 20, 18, 0.04);
}

.hero-phone__prompt span {
    color: #8b6e56;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.68rem;
    font-weight: 700;
}

.hero-phone__prompt p {
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.55;
}

.hero-phone__chips span {
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(22, 20, 18, 0.05);
    border: 1px solid rgba(22, 20, 18, 0.08);
    font-size: 0.8rem;
    font-weight: 700;
}

.hero-phone__pager {
    position: absolute;
    top: 1rem;
    left: 50%;
    z-index: 4;
    display: flex;
    gap: 0.45rem;
    padding: 0.38rem 0.48rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(255, 253, 249, 0.22);
    backdrop-filter: blur(8px);
}

.hero-phone__dot {
    width: 0.48rem;
    height: 0.48rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 253, 249, 0.52);
    transition: width 0.22s ease, background 0.22s ease, opacity 0.22s ease;
    opacity: 0.75;
}

.hero-phone__dot.is-active {
    width: 1.45rem;
    background: rgba(255, 253, 249, 0.98);
    opacity: 1;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.feature-card {
    padding: 1.5rem;
    background: rgba(255, 253, 249, 0.78);
}

.feature-card h2 {
    margin-bottom: 0.8rem;
    font-size: 1.7rem;
}

.feature-card p,
.info-panel p,
.empty-state p,
.feature-list,
.match-list__item p,
.swipe-card__bio,
.swipe-card__city,
.chat-panel__identity p {
    color: var(--muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 3.1rem;
    padding: 0.9rem 1.3rem;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.button-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 14px 28px rgba(23, 21, 19, 0.18);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.82);
    color: var(--ink);
    border: 1px solid rgba(22, 20, 18, 0.08);
}

.button-danger-soft {
    background: rgba(186, 26, 26, 0.08);
    color: #8d2a1b;
    border: 1px solid rgba(186, 26, 26, 0.14);
}

.button-dislike {
    background: rgba(22, 20, 18, 0.08);
    color: var(--ink);
}

.button-small {
    min-height: 2.5rem;
    padding: 0.6rem 0.95rem;
    font-size: 0.88rem;
}

.button-full {
    width: 100%;
}

.auth-shell,
.discover-page,
.matches-page {
    grid-template-columns: 1fr;
}

.auth-card,
.info-panel,
.panel {
    padding: 1.65rem;
}

.filter-panel,
.matches-sidebar,
.chat-panel,
.account-panel,
.profile-page .panel,
.admin-page .panel,
.profile-preview-page .panel {
    background: rgba(255, 253, 249, 0.94);
}

.auth-card h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.2rem;
}

.auth-footnote {
    margin-top: 1.1rem;
    color: var(--muted);
}

.stack-form,
.profile-grid,
.form-grid,
.match-list {
    display: grid;
    gap: 1rem;
}

.form-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    align-items: start;
}

.form-field {
    display: grid;
    gap: 0.45rem;
    align-content: start;
}

.form-field--wide {
    grid-column: 1 / -1;
}

.form-field span {
    font-size: 0.9rem;
    font-weight: 700;
}

.form-field__required {
    display: inline-block;
    margin-left: 0.18rem;
    color: #b64a3b;
    font-weight: 800;
}

.form-field__hint {
    margin-top: -0.1rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.js-other-choice-field[hidden] {
    display: none;
}

.upload-dropzone {
    position: relative;
    cursor: pointer;
    outline: none;
}

.upload-dropzone .js-image-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.upload-dropzone__surface {
    position: relative;
    min-height: 172px;
    border: 1px dashed rgba(22, 20, 18, 0.16);
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 253, 249, 0.94);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.upload-dropzone__surface:focus-visible {
    outline: 2px solid rgba(22, 20, 18, 0.28);
    outline-offset: 3px;
}

.upload-dropzone__surface::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.94), rgba(244, 237, 227, 0.92));
    transition: background 0.18s ease;
}

.upload-dropzone__preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.upload-dropzone__preview.is-placeholder {
    opacity: 0.92;
    filter: saturate(0.9);
}

.upload-dropzone__overlay {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: end;
    gap: 0.35rem;
    min-height: 100%;
    padding: 1rem;
}

.upload-dropzone__overlay strong,
.upload-dropzone__overlay p {
    position: relative;
    z-index: 1;
}

.upload-dropzone__overlay strong {
    font-size: 1rem;
    line-height: 1.3;
}

.upload-dropzone__hint {
    color: var(--muted);
    font-size: 0.88rem;
}

.upload-dropzone__file {
    color: #8b6e56;
    font-size: 0.82rem;
    font-weight: 700;
}

.upload-dropzone:hover .upload-dropzone__surface,
.upload-dropzone:focus-within .upload-dropzone__surface,
.upload-dropzone.is-dragover .upload-dropzone__surface {
    transform: translateY(-2px);
    border-color: rgba(22, 20, 18, 0.3);
    box-shadow: 0 18px 34px rgba(20, 18, 17, 0.08);
}

.upload-dropzone.is-dragover .upload-dropzone__surface::before {
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.9), rgba(231, 221, 209, 0.86));
}

.upload-dropzone.has-file .upload-dropzone__surface {
    border-style: solid;
    border-color: rgba(22, 20, 18, 0.08);
    color: #fff;
}

.upload-dropzone.has-file .upload-dropzone__surface::before {
    background: linear-gradient(180deg, rgba(22, 20, 18, 0.12), rgba(22, 20, 18, 0.58));
}

.upload-dropzone.has-file .upload-dropzone__hint,
.upload-dropzone.has-file .upload-dropzone__file {
    color: rgba(255, 255, 255, 0.88);
}

.panel h2,
.auth-card h1,
.discover-head h2,
.profile-page__header h1,
.profile-preview__header h1,
.admin-page__header h1,
.matches-sidebar__header h1 {
    letter-spacing: -0.02em;
}

.form-field input,
.form-field textarea,
.form-field select,
.chat-form textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    font: inherit;
    resize: vertical;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 5.2rem;
}

.password-field__toggle {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    background: rgba(22, 20, 18, 0.08);
    color: var(--ink);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.42rem 0.7rem;
    cursor: pointer;
}

.password-field__toggle:hover,
.password-field__toggle:focus-visible {
    background: rgba(22, 20, 18, 0.14);
    outline: none;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus,
.chat-form textarea:focus {
    outline: none;
    border-color: rgba(22, 20, 18, 0.25);
    box-shadow: 0 0 0 4px rgba(180, 139, 98, 0.12);
}

.chip-select {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 0.8rem;
}

.profile-section-note {
    margin-bottom: 0.9rem;
    color: var(--muted);
    line-height: 1.5;
}

.profile-required-note {
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.chip-option {
    position: relative;
}

.chip-option input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.chip-option span {
    display: inline-flex;
    padding: 0.7rem 0.95rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid transparent;
    font-size: 0.88rem;
}

.chip-option input:checked + span {
    background: rgba(22, 20, 18, 0.07);
    border-color: rgba(22, 20, 18, 0.16);
    color: var(--ink);
}

.chip-option input:focus + span,
.chip-option input:focus-visible + span {
    border-color: rgba(22, 20, 18, 0.25);
    box-shadow: 0 0 0 4px rgba(180, 139, 98, 0.12);
}

.profile-page__header,
.discover-head,
.matches-sidebar__header,
.account-panel__header,
.chat-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.profile-page__header-actions,
.profile-preview__actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.profile-status {
    padding: 0.52rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.1;
}

.profile-status.is-complete {
    background: rgba(22, 129, 122, 0.14);
    color: #0f5f59;
}

.profile-status.is-pending {
    background: rgba(180, 139, 98, 0.16);
    color: #7a5a39;
}

.profile-status.profile-status--approved {
    background: rgba(22, 129, 122, 0.14);
    color: #0f5f59;
}

.profile-status.profile-status--pending_review {
    background: rgba(180, 139, 98, 0.16);
    color: #7a5a39;
}

.profile-status.profile-status--rejected {
    background: rgba(255, 107, 87, 0.16);
    color: #8d2a1b;
}

.profile-validation-banner {
    display: grid;
    gap: 0.25rem;
    margin-top: 0.2rem;
    padding: 1rem 1.1rem;
    border-left: 4px solid rgba(22, 129, 122, 0.7);
}

.profile-validation-banner strong {
    font-family: var(--font-display);
    font-size: 1.05rem;
}

.profile-validation-banner p {
    color: var(--muted);
}

.form-save-status {
    display: grid;
    gap: 0.28rem;
    align-content: start;
    padding: 0.9rem 1rem;
    border-radius: 20px;
    background: rgba(22, 20, 18, 0.04);
    border: 1px solid rgba(22, 20, 18, 0.08);
}

.form-save-status strong {
    color: var(--ink);
}

.form-save-status p {
    color: var(--muted);
    line-height: 1.45;
}

.form-save-status.is-pending,
.form-save-status.is-idle {
    background: rgba(180, 139, 98, 0.1);
    border-color: rgba(180, 139, 98, 0.18);
}

.form-save-status.is-saving {
    background: rgba(58, 134, 255, 0.08);
    border-color: rgba(58, 134, 255, 0.16);
}

.form-save-status.is-success {
    background: rgba(22, 129, 122, 0.1);
    border-color: rgba(22, 129, 122, 0.18);
}

.form-save-status.is-error {
    background: rgba(186, 26, 26, 0.08);
    border-color: rgba(186, 26, 26, 0.14);
}

.form-save-status--inline {
    min-width: min(100%, 18rem);
    min-height: 5.75rem;
    max-width: 20rem;
}

.form-save-status--inline p {
    min-height: 2.9em;
}

.form-save-status--panel {
    flex: 1 1 17rem;
}

.form-save-status--register {
    margin-top: 0.1rem;
}

.form-inline-errors {
    display: grid;
    gap: 0.4rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    background: rgba(186, 26, 26, 0.08);
    border: 1px solid rgba(186, 26, 26, 0.14);
    color: #8d2a1b;
    font-size: 0.92rem;
    line-height: 1.45;
}

.form-inline-errors.is-soft {
    background: rgba(180, 139, 98, 0.1);
    border-color: rgba(180, 139, 98, 0.18);
    color: #7a5a39;
}

.location-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 24px;
    background: rgba(22, 20, 18, 0.03);
    border: 1px solid rgba(22, 20, 18, 0.08);
}

.location-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.location-card__header h2,
.location-card__header h3 {
    font-size: 1.15rem;
}

.location-card__header p {
    max-width: 34rem;
    color: var(--muted);
}

.location-card__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.location-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    background: rgba(22, 20, 18, 0.07);
    border: 1px solid rgba(22, 20, 18, 0.08);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
}

.location-pill--soft {
    background: rgba(180, 139, 98, 0.12);
    border-color: rgba(180, 139, 98, 0.18);
    color: #7a5a39;
}

.location-card__status {
    margin: 0;
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(22, 20, 18, 0.08);
    color: var(--muted);
    line-height: 1.45;
}

.location-card__status.is-ready {
    background: rgba(22, 129, 122, 0.08);
    border-color: rgba(22, 129, 122, 0.16);
    color: #0f5f59;
}

.location-card__status.is-pending {
    background: rgba(180, 139, 98, 0.08);
    border-color: rgba(180, 139, 98, 0.16);
    color: #7a5a39;
}

.location-card__status.is-error {
    background: rgba(186, 26, 26, 0.08);
    border-color: rgba(186, 26, 26, 0.14);
    color: #8d2a1b;
}

.location-card__suggestions {
    display: grid;
    gap: 0.55rem;
}

.location-card__suggestions[hidden] {
    display: none !important;
}

.location-suggestion {
    display: grid;
    gap: 0.16rem;
    width: 100%;
    padding: 0.9rem 0.95rem;
    border: 1px solid rgba(22, 20, 18, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.location-suggestion strong {
    font-size: 0.95rem;
}

.location-suggestion span {
    color: var(--muted);
    font-size: 0.84rem;
}

.location-suggestion:hover {
    transform: translateY(-1px);
    border-color: rgba(22, 20, 18, 0.18);
    background: #fff;
}

.location-card__map {
    min-height: 18.5rem;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(22, 20, 18, 0.08);
    background: linear-gradient(180deg, rgba(233, 227, 216, 0.86), rgba(241, 235, 226, 0.95));
}

.gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.gallery-preview--slots {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.gallery-preview__item {
    position: relative;
    min-height: 170px;
}

.gallery-preview__image {
    width: 100%;
    min-height: 170px;
    border-radius: 18px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(22, 20, 18, 0.08);
    display: block;
}

.gallery-preview__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(22, 20, 18, 0.86);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.gallery-preview__remove {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    border: none;
    border-radius: 999px;
    padding: 0.5rem 0.78rem;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(22, 20, 18, 0.12);
}

.gallery-preview__remove:hover {
    transform: translateY(-1px);
}

.gallery-preview__remove:disabled {
    opacity: 0.82;
    cursor: wait;
}

.gallery-preview__item.is-removing {
    opacity: 0.58;
}

.upload-dropzone--slot {
    margin: 0;
}

.upload-dropzone--slot .upload-dropzone__surface {
    min-height: 220px;
}

.upload-dropzone--slot[draggable="true"] .upload-dropzone__surface {
    cursor: grab;
}

.upload-dropzone--slot.is-dragging .upload-dropzone__surface {
    transform: scale(0.98);
    opacity: 0.72;
}

.upload-dropzone--slot.is-removing {
    opacity: 0.58;
}

.upload-dropzone--slot .gallery-preview__badge,
.upload-dropzone--slot .gallery-preview__remove {
    z-index: 2;
}

.upload-dropzone--slot:not(.has-file) .upload-dropzone__overlay {
    display: grid;
}

.toggle-line {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.geo-status {
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(22, 20, 18, 0.04);
    border: 1px solid rgba(22, 20, 18, 0.08);
}

.geo-status strong {
    color: var(--ink);
}

.geo-status p {
    color: var(--muted);
}

.geo-status.is-ready {
    background: rgba(22, 129, 122, 0.1);
    border-color: rgba(22, 129, 122, 0.18);
}

.geo-status.is-pending {
    background: rgba(180, 139, 98, 0.12);
    border-color: rgba(180, 139, 98, 0.18);
}

.geo-status.is-error {
    background: rgba(186, 26, 26, 0.08);
    border-color: rgba(186, 26, 26, 0.14);
}

.geo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.voice-recorder {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.voice-recorder__status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.voice-recorder__status-main {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.voice-recorder__record-live {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    background: rgba(186, 26, 26, 0.1);
    color: #b51d1d;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.voice-recorder__record-dot {
    width: 0.68rem;
    height: 0.68rem;
    border-radius: 999px;
    background: #d11d1d;
    box-shadow: 0 0 0 0 rgba(209, 29, 29, 0.28);
}

.js-voice-recorder.is-recording .voice-recorder__record-live[hidden] {
    display: inline-flex;
}

.js-voice-recorder.is-recording .voice-recorder__record-dot {
    animation: record-pulse 1s ease infinite;
}

.voice-recorder__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@keyframes record-pulse {
    0% {
        transform: scale(0.92);
        box-shadow: 0 0 0 0 rgba(209, 29, 29, 0.34);
        opacity: 0.78;
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 8px rgba(209, 29, 29, 0);
        opacity: 1;
    }
    100% {
        transform: scale(0.92);
        box-shadow: 0 0 0 0 rgba(209, 29, 29, 0);
        opacity: 0.78;
    }
}

.voice-recorder audio,
.chat-audio-preview,
.profile-preview-page audio,
.swipe-card__audio audio,
.preview-card__audio audio {
    width: 100%;
}

.gallery-preview img,
.gallery-placeholder {
    width: 100%;
    min-height: 170px;
    border-radius: 18px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.74);
    border: 1px dashed var(--line);
}

.gallery-preview img,
.gallery-preview__image,
.js-gallery-item {
    cursor: zoom-in;
}

.gallery-placeholder {
    display: grid;
    place-items: center;
    padding: 1rem;
    color: var(--muted);
    text-align: center;
}

.profile-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.65rem;
}

.profile-link-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--line);
    color: var(--ink);
    box-shadow: 0 8px 20px rgba(17, 15, 13, 0.05);
}

.profile-link-list a:hover {
    background: rgba(22, 20, 18, 0.05);
    border-color: rgba(22, 20, 18, 0.16);
}

.profile-link-list__icon {
    display: inline-grid;
    place-items: center;
    width: 1.1rem;
    height: 1.1rem;
}

.profile-link-list__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.location-picker {
    grid-column: 1 / -1;
}

.map-main {
    width: min(920px, 100%);
}

.map-card {
    display: grid;
    gap: 1rem;
    overflow: hidden;
}

.map-card__header {
    display: grid;
    gap: 0.85rem;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.map-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}

.map-legend__dot,
.map-marker {
    display: inline-block;
    width: 0.82rem;
    height: 0.82rem;
    border-radius: 999px;
    background: var(--ink);
}

.map-legend__dot--liked,
.map-marker--liked {
    background: var(--gold);
}

.map-legend__dot--match,
.map-marker--match {
    background: #1f8a70;
}

.profile-map {
    min-height: 24rem;
    height: min(58vh, 34rem);
    border-radius: 1.6rem;
    overflow: hidden;
    border: 1px solid rgba(22, 20, 18, 0.08);
    background: linear-gradient(180deg, rgba(233, 227, 216, 0.86), rgba(241, 235, 226, 0.95));
}

.map-empty-state {
    margin-top: 0.25rem;
}

.map-marker {
    width: 1.18rem;
    height: 1.18rem;
    border: 0.2rem solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 22px rgba(20, 18, 17, 0.22);
}

.map-marker-icon {
    background: transparent;
    border: 0;
}

.map-marker-pin {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 10px 18px rgba(20, 18, 17, 0.22));
    transition: transform 0.18s ease, filter 0.18s ease;
}

.map-marker-pin__bubble {
    width: 2.85rem;
    height: 2.85rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 999px;
    background: #fffdf9;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border: 0.2rem solid rgba(22, 20, 18, 0.92);
    box-shadow: 0 0 0 0.16rem rgba(255, 255, 255, 0.94);
}

.map-marker-pin__fallback {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: inherit;
}

.map-marker-pin__fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(236, 227, 214, 0.98));
    color: var(--ink);
    font-size: 1rem;
    font-weight: 800;
}

.map-marker-pin__bubble.is-photo .map-marker-pin__fallback {
    display: none;
}

.map-marker-pin__tail {
    width: 0.95rem;
    height: 0.95rem;
    margin-top: -0.18rem;
    border-right: 0.18rem solid rgba(22, 20, 18, 0.92);
    border-bottom: 0.18rem solid rgba(22, 20, 18, 0.92);
    background: #fffdf9;
    transform: rotate(45deg);
}

.map-marker-pin--liked .map-marker-pin__bubble,
.map-marker-pin--liked .map-marker-pin__tail {
    border-color: var(--gold);
}

.map-marker-pin--match .map-marker-pin__bubble,
.map-marker-pin--match .map-marker-pin__tail {
    border-color: #1f8a70;
}

.map-marker-icon.is-active {
    z-index: 1000 !important;
}

.map-marker-icon.is-active .map-marker-pin {
    transform: translateY(-0.2rem) scale(1.06);
    filter: drop-shadow(0 16px 28px rgba(20, 18, 17, 0.28));
}

.map-sheet {
    position: sticky;
    bottom: 6.2rem;
    z-index: 8;
    display: grid;
    grid-template-columns: 5.9rem 1fr;
    gap: 0.95rem;
    padding: 0.95rem;
    box-shadow: 0 24px 48px rgba(20, 18, 17, 0.14);
}

.map-sheet[hidden] {
    display: none !important;
}

.map-sheet__close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(22, 20, 18, 0.08);
    color: var(--ink);
    font-size: 1.3rem;
    line-height: 1;
}

.map-sheet__media {
    min-height: 5.9rem;
    border-radius: 1.1rem;
    background-color: rgba(22, 20, 18, 0.08);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.map-sheet__body {
    display: grid;
    gap: 0.55rem;
}

.map-sheet__topline {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-right: 2rem;
}

.map-sheet__topline strong {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: -0.03em;
}

.map-sheet__status {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(22, 20, 18, 0.08);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.map-sheet__status.is-liked {
    background: rgba(180, 139, 98, 0.16);
    color: #8a673f;
}

.map-sheet__status.is-match {
    background: rgba(31, 138, 112, 0.14);
    color: #176a56;
}

.map-sheet__meta,
.map-sheet__bio {
    margin: 0;
}

.map-sheet__meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.map-sheet__bio {
    font-size: 0.92rem;
    line-height: 1.45;
}

.map-sheet__actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.leaflet-control-zoom {
    border: 0 !important;
    box-shadow: 0 12px 24px rgba(20, 18, 17, 0.12);
}

.leaflet-control-zoom a {
    width: 2.25rem !important;
    height: 2.25rem !important;
    line-height: 2.2rem !important;
    border: 0 !important;
    color: var(--ink) !important;
    background: rgba(255, 253, 249, 0.96) !important;
}

.leaflet-control-attribution {
    background: rgba(255, 253, 249, 0.86) !important;
    border-radius: 0.65rem 0 0 0 !important;
}

.leaflet-bottom.leaflet-right {
    bottom: 0.25rem;
}

.leaflet-top.leaflet-right {
    top: 0.8rem;
    right: 0.8rem;
}

@media (max-width: 720px) {
    .profile-page__header,
    .profile-page__header-actions {
        align-items: stretch;
    }

    .profile-page__header,
    .profile-page__header-actions,
    .location-card__header {
        grid-template-columns: 1fr;
    }

    .profile-page__header,
    .profile-page__header-actions {
        display: grid;
    }

    .form-save-status--inline {
        min-width: 0;
        max-width: none;
    }

    .location-card {
        padding: 0.9rem;
    }

    .location-card__map {
        min-height: 16rem;
    }

    .profile-map {
        height: 54vh;
        min-height: 22rem;
    }

    .map-marker-pin__bubble {
        width: 2.65rem;
        height: 2.65rem;
    }

    .map-sheet {
        grid-template-columns: 5rem 1fr;
        bottom: 5.8rem;
        padding: 0.85rem;
    }

    .map-sheet__media {
        min-height: 5rem;
    }

    .map-sheet__actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

.panel-actions--inline {
    grid-column: 1 / -1;
}

.discover-page {
    position: relative;
}

.discover-main {
    display: grid;
    gap: 0.85rem;
    width: min(760px, 100%);
    margin: 0 auto;
}

.discover-head {
    align-items: flex-end;
}

.discover-head__actions,
.filter-panel__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.discover-head__lead {
    max-width: 34rem;
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.55;
}

.discover-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.discover-metrics--panel {
    margin: 0 0 1rem;
}

.geo-filter-toggle {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    background: rgba(22, 20, 18, 0.04);
    border: 1px solid rgba(22, 20, 18, 0.08);
}

.geo-filter-toggle strong {
    display: block;
    margin-bottom: 0.18rem;
}

.geo-filter-toggle p {
    color: var(--muted);
    line-height: 1.45;
}

.geo-filter-toggle input[type="checkbox"] {
    margin-top: 0.15rem;
}

.geo-filter-toggle.is-disabled {
    opacity: 0.56;
}

.deck-frame {
    position: relative;
    display: grid;
    gap: 1rem;
}

.discover-filter-layer {
    position: fixed;
    inset: 0;
    z-index: 54;
    background: rgba(22, 20, 18, 0.22);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.filter-panel {
    position: fixed;
    top: 6.4rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 55;
    width: min(390px, calc(100% - 1rem));
    overflow-y: auto;
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.24s ease, opacity 0.24s ease;
}

.discover-page.is-filter-open .discover-filter-layer {
    opacity: 1;
    pointer-events: auto;
}

.discover-page.is-filter-open .filter-panel {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.discover-deck {
    position: relative;
    height: clamp(640px, calc(100dvh - 13.2rem), 840px);
    overflow: hidden;
}

.swipe-card {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: start;
    gap: 0.85rem;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 32px;
    background: rgba(255, 253, 249, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: var(--shadow);
    transform: translate3d(0, 1.5rem, 0) scale(0.985);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
    will-change: transform, opacity;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
    pointer-events: none;
    z-index: 0;
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom));
}

.swipe-card::-webkit-scrollbar {
    width: 0;
}

.swipe-card.is-active {
    z-index: 12;
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    pointer-events: auto;
}

.swipe-card.is-next {
    z-index: 11;
    opacity: 1;
    transform: translate3d(0, 1rem, 0) scale(0.982);
    overflow: hidden;
    filter: saturate(0.92) brightness(0.99);
    box-shadow: 0 12px 30px rgba(20, 18, 17, 0.08);
}

.swipe-card.is-next .swipe-card__hero {
    min-height: 100%;
    border-radius: 32px;
}

.swipe-card.is-next .swipe-card__content,
.swipe-card.is-next .swipe-card__gallery,
.swipe-card.is-next .swipe-card__stamp {
    display: none;
}

.swipe-card.is-gesturing {
    cursor: grabbing;
    transition: none;
}

.swipe-card.is-snap-back {
    transition: transform 0.26s cubic-bezier(0.22, 0.8, 0.24, 1), opacity 0.26s ease;
}

.swipe-card.is-liked {
    transform: translateX(110%) rotate(12deg);
    opacity: 0;
}

.swipe-card.is-disliked {
    transform: translateX(-110%) rotate(-12deg);
    opacity: 0;
}

.swipe-card__hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    border-radius: 32px 32px 0 0;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.swipe-card.is-gesturing .swipe-card__hero {
    cursor: grabbing;
}

.swipe-card__media,
.swipe-card__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.swipe-card__media {
    background-position: center;
    background-size: cover;
}

.swipe-card__overlay {
    background: linear-gradient(180deg, rgba(22, 20, 18, 0.02) 4%, rgba(22, 20, 18, 0.08) 44%, rgba(22, 20, 18, 0.32) 74%, rgba(22, 20, 18, 0.56) 100%);
}

.swipe-card__stamp {
    position: absolute;
    top: 1.25rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 4.35rem;
    height: 4.35rem;
    padding: 0;
    border: 2px solid currentColor;
    border-radius: 999px;
    background: rgba(255, 253, 249, 0.96);
    box-shadow: 0 14px 34px rgba(20, 18, 17, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.88);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.swipe-card__gallery-open,
.preview-card__gallery-open {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 3;
    display: inline-grid;
    place-items: center;
    width: 2.78rem;
    height: 2.78rem;
    padding: 0;
    border: 1px solid rgba(255, 253, 249, 0.24);
    border-radius: 999px;
    background: rgba(22, 20, 18, 0.34);
    color: #fff;
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 28px rgba(20, 18, 17, 0.16);
    transition: transform 0.18s ease, background 0.18s ease;
}

.swipe-card__gallery-open svg,
.preview-card__gallery-open svg {
    width: 1.05rem;
    height: 1.05rem;
}

.swipe-card__gallery-open:hover,
.preview-card__gallery-open:hover {
    transform: translateY(-1px);
    background: rgba(22, 20, 18, 0.48);
}

.swipe-card__photo-like {
    position: absolute;
    right: 1rem;
    bottom: 4.9rem;
    z-index: 3;
    display: inline-grid;
    place-items: center;
    width: 2.78rem;
    height: 2.78rem;
    padding: 0;
    border: 1px solid rgba(188, 72, 99, 0.16);
    border-radius: 999px;
    background: rgba(255, 253, 249, 0.96);
    color: #bc4863;
    box-shadow: 0 16px 32px rgba(20, 18, 17, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.swipe-card__photo-like svg {
    width: 1.08rem;
    height: 1.08rem;
}

.swipe-card__photo-like--gallery {
    right: 0.85rem;
    bottom: 0.85rem;
}

.swipe-card__photo-like:hover {
    transform: translateY(-1px) scale(1.02);
    background: #fff;
}

.swipe-card__stamp--like {
    right: 1.2rem;
    color: #bc4863;
}

.swipe-card__stamp--dislike {
    left: 1.2rem;
    color: #d92d20;
}

.swipe-card__stamp svg {
    width: 1.82rem;
    height: 1.82rem;
    display: block;
}

.swipe-card.is-drag-like .swipe-card__stamp--like {
    opacity: calc(0.22 + (var(--swipe-progress, 0) * 0.78));
    transform: scale(calc(0.92 + (var(--swipe-progress, 0) * 0.18)));
}

.swipe-card.is-drag-dislike .swipe-card__stamp--dislike {
    opacity: calc(0.22 + (var(--swipe-progress, 0) * 0.78));
    transform: scale(calc(0.92 + (var(--swipe-progress, 0) * 0.18)));
}

.swipe-card__headline {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(180deg, rgba(22, 20, 18, 0) 0%, rgba(22, 20, 18, 0.6) 100%);
    color: #fff;
    pointer-events: none;
}

.swipe-card__headline strong,
.swipe-card__headline span {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swipe-card__headline strong {
    flex: 0 0 auto;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.swipe-card__headline span {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.88rem;
}

.swipe-card__content {
    position: relative;
    display: grid;
    gap: 0.58rem;
    margin: 0 0.85rem;
    padding: 1rem 1.05rem;
    width: auto;
    background: rgba(255, 253, 249, 0.98);
    border: 1px solid rgba(22, 20, 18, 0.08);
    border-radius: 24px;
    box-shadow: 0 18px 42px rgba(20, 18, 17, 0.16);
    color: var(--ink);
    pointer-events: auto;
    text-shadow: none;
}

.swipe-card__meta,
.chat-panel__identity {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.pill {
    padding: 0.45rem 0.75rem;
    background: rgba(22, 20, 18, 0.06);
    border: 1px solid rgba(22, 20, 18, 0.08);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
}

.pill-soft {
    background: rgba(180, 139, 98, 0.12);
    border-color: rgba(180, 139, 98, 0.18);
    color: #7a5a39;
}

.pill-danger {
    background: rgba(186, 26, 26, 0.1);
    border-color: rgba(186, 26, 26, 0.14);
    color: #8d2a1b;
}

.swipe-card__job {
    display: inline-flex;
    width: fit-content;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: var(--brand);
    border: 1px solid rgba(22, 20, 18, 0.08);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.swipe-card__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.swipe-card__fact,
.swipe-card__prompt {
    display: grid;
    gap: 0.25rem;
    padding: 0.68rem 0.82rem;
    border-radius: 18px;
    background: rgba(22, 20, 18, 0.04);
}

.swipe-card__prompt {
    gap: 0.3rem;
}

.swipe-card__label {
    color: #8b6e56;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.68rem;
    font-weight: 700;
}

.swipe-card__city {
    color: var(--muted);
    font-size: 0.88rem;
}

.swipe-card__project {
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.45;
}

.swipe-card__bio {
    max-width: 100%;
    color: var(--ink);
    font-size: 0.92rem;
    line-height: 1.5;
}

.swipe-card__incoming-like,
.chat-like-context {
    display: grid;
    gap: 0.5rem;
    padding: 0.8rem 0.9rem;
    border-radius: 20px;
    background: rgba(188, 72, 99, 0.08);
    border: 1px solid rgba(188, 72, 99, 0.14);
}

.swipe-card__incoming-like-body,
.chat-like-context {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.75rem;
}

.swipe-card__incoming-like-body img,
.chat-like-context img {
    width: 4.1rem;
    height: 4.1rem;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 12px 26px rgba(20, 18, 17, 0.12);
}

.swipe-card__incoming-like-body strong,
.chat-like-context strong {
    display: block;
    margin-bottom: 0.18rem;
    color: var(--ink);
}

.swipe-card__incoming-like-body p,
.chat-like-context p {
    color: var(--muted);
    line-height: 1.5;
}

.chat-private-share {
    display: grid;
    gap: 0.8rem;
}

.chat-panel__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 20px;
    background: rgba(22, 20, 18, 0.04);
    border: 1px solid rgba(22, 20, 18, 0.08);
}

.chat-panel__status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.chat-panel__blacklist-form {
    margin: 0;
}

.chat-private-share__card,
.chat-private-gallery {
    display: grid;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border-radius: 20px;
    background: rgba(22, 20, 18, 0.04);
    border: 1px solid rgba(22, 20, 18, 0.08);
}

.chat-private-share__copy strong,
.chat-private-gallery__header strong {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--ink);
}

.chat-private-share__copy p,
.chat-private-gallery__header p,
.chat-private-share__hint {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.chat-private-share__status,
.chat-private-share__actions,
.chat-private-gallery__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.chat-private-share__actions {
    align-items: flex-start;
}

.chat-private-share__form {
    margin: 0;
}

.chat-private-gallery[hidden] {
    display: none !important;
}

.swipe-card__audio,
.preview-card__audio {
    display: grid;
    gap: 0.42rem;
    padding: 0.72rem 0.82rem;
    border-radius: 18px;
    background: rgba(22, 20, 18, 0.04);
}

.swipe-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.15rem;
}

.swipe-card__chips span {
    padding: 0.36rem 0.62rem;
    border-radius: 999px;
    background: rgba(22, 20, 18, 0.05);
    border: 1px solid rgba(22, 20, 18, 0.08);
    color: var(--ink);
    font-size: 0.74rem;
}

.swipe-card__gallery {
    display: grid;
    gap: 0.85rem;
    padding: 0 0.85rem 0;
}

.swipe-card__gallery-item {
    position: relative;
    margin: 0;
}

.swipe-card__gallery img {
    width: 100%;
    min-height: 280px;
    border-radius: 24px;
    object-fit: cover;
    border: 1px solid rgba(22, 20, 18, 0.08);
    box-shadow: 0 12px 28px rgba(20, 18, 17, 0.08);
    cursor: zoom-in;
}

.swipe-actions {
    justify-content: center;
}

.swipe-hint {
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
}

.match-list__badge--new {
    min-width: auto;
    padding-inline: 0.55rem;
    background: rgba(188, 72, 99, 0.12);
    color: #9f2e4a;
}

.match-reveal {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 180, 196, 0.2), rgba(255, 180, 196, 0) 42%),
        radial-gradient(circle at 50% 45%, rgba(255, 241, 228, 0.18), rgba(255, 241, 228, 0) 58%),
        rgba(22, 20, 18, 0.08);
    backdrop-filter: blur(4px);
}

.match-reveal[hidden] {
    display: none !important;
}

.match-reveal__backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.match-reveal__photo,
.match-reveal__veil {
    position: absolute;
    inset: 0;
}

.match-reveal__photo {
    background-position: center;
    background-size: cover;
    opacity: 0;
    filter: blur(7px) saturate(1.14) brightness(0.94);
    transform: scale(1.08);
}

.match-reveal__photo--self {
    clip-path: polygon(0 0, 62% 0, 47% 100%, 0 100%);
    transform-origin: left center;
}

.match-reveal__photo--other {
    clip-path: polygon(53% 0, 100% 0, 100% 100%, 38% 100%);
    transform-origin: right center;
}

.match-reveal__veil {
    background:
        linear-gradient(90deg, rgba(22, 20, 18, 0.14) 0%, rgba(22, 20, 18, 0.03) 24%, rgba(22, 20, 18, 0.03) 76%, rgba(22, 20, 18, 0.14) 100%),
        linear-gradient(180deg, rgba(22, 20, 18, 0.02) 0%, rgba(22, 20, 18, 0.18) 100%);
    opacity: 0;
}

.match-reveal::before,
.match-reveal::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(0.72);
    opacity: 0;
    pointer-events: none;
}

.match-reveal::before {
    width: 14rem;
    height: 14rem;
    background: radial-gradient(circle, rgba(255, 253, 249, 0.36), rgba(255, 253, 249, 0.04) 62%, rgba(255, 253, 249, 0) 70%);
}

.match-reveal::after {
    width: 20rem;
    height: 20rem;
    border: 1px solid rgba(255, 253, 249, 0.18);
}

.match-reveal__pair {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 1;
}

.match-reveal__burst {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.match-reveal__heart {
    position: absolute;
    display: grid;
    place-items: center;
    width: 1.7rem;
    height: 1.7rem;
    color: rgba(255, 253, 249, 0.92);
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.4) rotate(0deg);
}

.match-reveal__heart svg {
    width: 100%;
    height: 100%;
    display: block;
}

.match-reveal__heart--1 {
    left: 18%;
    top: 28%;
}

.match-reveal__heart--2 {
    left: 28%;
    top: 18%;
}

.match-reveal__heart--3 {
    right: 24%;
    top: 22%;
}

.match-reveal__heart--4 {
    right: 18%;
    top: 34%;
}

.match-reveal__heart--5 {
    left: 26%;
    bottom: 22%;
}

.match-reveal__heart--6 {
    right: 28%;
    bottom: 18%;
}

.match-reveal__avatar {
    width: 5.7rem;
    height: 5.7rem;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 253, 249, 0.92);
    box-shadow: 0 18px 36px rgba(20, 18, 17, 0.24);
    background: rgba(255, 253, 249, 0.92);
    opacity: 0;
}

.match-reveal__avatar--self {
    transform: translate3d(-1.8rem, 0.9rem, 0) rotate(-12deg) scale(0.86);
}

.match-reveal__avatar--other {
    transform: translate3d(1.8rem, 0.9rem, 0) rotate(12deg) scale(0.86);
}

.match-reveal__word {
    display: inline-grid;
    place-items: center;
    min-width: 6.3rem;
    padding: 0.9rem 1.15rem;
    border-radius: 999px;
    background: rgba(255, 253, 249, 0.98);
    color: #bc4863;
    font-size: 0.96rem;
    font-weight: 900;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    box-shadow: 0 22px 46px rgba(20, 18, 17, 0.24);
    opacity: 0;
    transform: translateY(1rem) scale(0.72);
}

.match-reveal__name {
    margin: 0.8rem 0 0;
    color: #fff;
    text-align: center;
    font-size: 1.04rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(0.85rem);
    z-index: 1;
}

.match-reveal.is-visible::before {
    animation: match-reveal-glow 1.9s ease forwards;
}

.match-reveal.is-visible::after {
    animation: match-reveal-ring 1.8s ease-out forwards;
}

.match-reveal.is-visible .match-reveal__photo--self {
    animation: match-photo-self 1.9s cubic-bezier(0.2, 0.92, 0.2, 1) forwards;
}

.match-reveal.is-visible .match-reveal__photo--other {
    animation: match-photo-other 1.9s cubic-bezier(0.2, 0.92, 0.2, 1) forwards;
}

.match-reveal.is-visible .match-reveal__veil {
    animation: match-veil-in 1.4s ease forwards;
}

.match-reveal.is-visible .match-reveal__avatar--self {
    animation: match-avatar-left 1.8s cubic-bezier(0.18, 0.92, 0.22, 1) forwards;
}

.match-reveal.is-visible .match-reveal__avatar--other {
    animation: match-avatar-right 1.8s cubic-bezier(0.18, 0.92, 0.22, 1) forwards;
}

.match-reveal.is-visible .match-reveal__word {
    animation: match-word-pop 1.8s cubic-bezier(0.2, 0.92, 0.18, 1) forwards;
}

.match-reveal.is-visible .match-reveal__name {
    animation: match-name-rise 1.6s ease forwards;
}

.match-reveal.is-visible .match-reveal__heart--1 {
    animation: match-heart-float 1.4s 0.04s ease-out forwards;
}

.match-reveal.is-visible .match-reveal__heart--2 {
    animation: match-heart-float 1.5s 0.18s ease-out forwards;
}

.match-reveal.is-visible .match-reveal__heart--3 {
    animation: match-heart-float 1.45s 0.1s ease-out forwards;
}

.match-reveal.is-visible .match-reveal__heart--4 {
    animation: match-heart-float 1.55s 0.24s ease-out forwards;
}

.match-reveal.is-visible .match-reveal__heart--5 {
    animation: match-heart-float 1.5s 0.16s ease-out forwards;
}

.match-reveal.is-visible .match-reveal__heart--6 {
    animation: match-heart-float 1.4s 0.3s ease-out forwards;
}

@keyframes match-reveal-glow {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.58);
    }
    18% {
        opacity: 1;
    }
    100% {
        opacity: 0.42;
        transform: translate(-50%, -50%) scale(1.08);
    }
}

@keyframes match-reveal-ring {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    22% {
        opacity: 0.72;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.18);
    }
}

@keyframes match-photo-self {
    0% {
        opacity: 0;
        transform: translate3d(-1rem, 0, 0) scale(1.18);
    }
    18% {
        opacity: 0.88;
    }
    100% {
        opacity: 0.98;
        transform: translate3d(0, 0, 0) scale(1.04);
    }
}

@keyframes match-photo-other {
    0% {
        opacity: 0;
        transform: translate3d(1rem, 0, 0) scale(1.18);
    }
    18% {
        opacity: 0.88;
    }
    100% {
        opacity: 0.98;
        transform: translate3d(0, 0, 0) scale(1.04);
    }
}

@keyframes match-veil-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 0.78;
    }
}

@keyframes match-avatar-left {
    0% {
        opacity: 0;
        transform: translate3d(-1.8rem, 1rem, 0) rotate(-12deg) scale(0.82);
    }
    24% {
        opacity: 1;
        transform: translate3d(0.35rem, -0.28rem, 0) rotate(-5deg) scale(1.02);
    }
    42% {
        transform: translate3d(0, 0, 0) rotate(-8deg) scale(1);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) rotate(-8deg) scale(1);
    }
}

@keyframes match-avatar-right {
    0% {
        opacity: 0;
        transform: translate3d(1.8rem, 1rem, 0) rotate(12deg) scale(0.82);
    }
    24% {
        opacity: 1;
        transform: translate3d(-0.35rem, -0.28rem, 0) rotate(5deg) scale(1.02);
    }
    42% {
        transform: translate3d(0, 0, 0) rotate(8deg) scale(1);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) rotate(8deg) scale(1);
    }
}

@keyframes match-word-pop {
    0% {
        opacity: 0;
        transform: translateY(1rem) scale(0.68) rotate(-8deg);
    }
    18% {
        opacity: 1;
        transform: translateY(0) scale(1.12) rotate(3deg);
    }
    32% {
        transform: translateY(-0.12rem) scale(0.96) rotate(-2deg);
    }
    48% {
        transform: translateY(0) scale(1.04) rotate(1deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

@keyframes match-name-rise {
    0% {
        opacity: 0;
        transform: translateY(0.85rem);
    }
    30% {
        opacity: 0;
        transform: translateY(0.85rem);
    }
    55% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes match-heart-float {
    0% {
        opacity: 0;
        transform: translate3d(0, 0.7rem, 0) scale(0.3) rotate(-10deg);
    }
    20% {
        opacity: 0.95;
    }
    100% {
        opacity: 0;
        transform: translate3d(0, -2.8rem, 0) scale(1) rotate(10deg);
    }
}

.empty-state {
    display: grid;
    gap: 0.7rem;
    place-items: center;
    text-align: center;
    min-height: 220px;
}

.deck-finished {
    position: absolute;
    inset: 0;
    z-index: 14;
    align-content: center;
    min-height: 0;
    padding: 1.5rem;
    border-radius: 32px;
    background: rgba(255, 253, 249, 0.98);
    border: 1px solid rgba(22, 20, 18, 0.08);
    box-shadow: var(--shadow);
}

.deck-finished h3,
.deck-finished p {
    max-width: 22rem;
}

.empty-state--compact {
    min-height: 180px;
}

.matches-sidebar,
.chat-panel {
    min-height: 680px;
}

.matches-page--list,
.matches-page--chat {
    grid-template-columns: 1fr;
}

.matches-sidebar.is-hidden,
.chat-panel.is-hidden {
    display: none;
}

.match-list {
    margin-top: 1.2rem;
}

.match-list__item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(22, 20, 18, 0.06);
    box-shadow: 0 10px 28px rgba(20, 18, 17, 0.05);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.match-list__item:hover,
.match-list__item.is-active {
    border-color: rgba(22, 20, 18, 0.14);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(20, 18, 17, 0.08);
    transform: translateY(-1px);
}

.match-list__item img,
.chat-panel__identity img {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    object-fit: cover;
}

.match-list__body {
    display: grid;
    gap: 0.15rem;
}

.match-list__meta {
    color: #8b6e56;
    font-size: 0.82rem;
    font-weight: 700;
}

.match-list__statusline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.08rem;
}

.match-list__waiting {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.52rem;
    border-radius: 999px;
    background: rgba(180, 139, 98, 0.12);
    border: 1px solid rgba(180, 139, 98, 0.18);
    color: #7a5a39;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.match-list__excerpt {
    color: var(--muted);
}

.match-list__badge {
    min-width: 2rem;
    padding: 0.25rem 0.55rem;
    background: var(--ink);
    color: #fff;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
}

.chat-panel {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
}

.chat-panel__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.chat-panel__header {
    display: grid;
    gap: 1rem;
    align-items: flex-start;
}

.profile-preview-page,
.admin-page {
    display: grid;
    gap: 1rem;
}

.profile-preview__header,
.admin-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-preview-grid {
    display: grid;
    gap: 1rem;
}

.preview-card {
    position: relative;
    display: grid;
    align-content: start;
    gap: 0.85rem;
    min-height: 680px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 32px;
    background: rgba(255, 253, 249, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: var(--shadow);
    scrollbar-width: none;
}

.preview-card::-webkit-scrollbar {
    width: 0;
}

.preview-card__hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    border-radius: 32px 32px 0 0;
}

.preview-card__media,
.preview-card__overlay,
.preview-card__headline {
    position: absolute;
    inset: 0;
}

.preview-card__media {
    background-position: center;
    background-size: cover;
}

.preview-card__overlay {
    background: linear-gradient(180deg, rgba(22, 20, 18, 0.03) 8%, rgba(22, 20, 18, 0.12) 46%, rgba(22, 20, 18, 0.52) 100%);
}

.preview-card__headline {
    inset: auto 0 0;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(180deg, rgba(22, 20, 18, 0) 0%, rgba(22, 20, 18, 0.6) 100%);
    color: #fff;
}

.preview-card__headline strong,
.preview-card__headline span {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-card__headline strong {
    flex: 0 0 auto;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.preview-card__headline span {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.88rem;
}

.preview-card__content {
    position: relative;
    display: grid;
    gap: 0.58rem;
    margin: 0 0.85rem;
    padding: 1rem 1.05rem;
    background: rgba(255, 253, 249, 0.98);
    border: 1px solid rgba(22, 20, 18, 0.08);
    border-radius: 24px;
    box-shadow: 0 18px 42px rgba(20, 18, 17, 0.16);
    color: var(--ink);
}

.profile-preview-stack {
    display: grid;
    gap: 1rem;
}

.preview-section-stack {
    display: grid;
    gap: 0.9rem;
}

.preview-subsection {
    display: grid;
    gap: 0.75rem;
    padding: 1rem 1.05rem;
    border-radius: 22px;
    background: rgba(22, 20, 18, 0.035);
    border: 1px solid rgba(22, 20, 18, 0.08);
}

.preview-subsection h3 {
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.preview-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.preview-detail-grid--compact {
    gap: 0.85rem 1rem;
}

.preview-detail-grid strong {
    display: block;
    margin-bottom: 0.35rem;
}

.preview-subsection .swipe-card__chips {
    margin-top: 0;
}

.admin-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.admin-summary span {
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(22, 20, 18, 0.08);
    font-weight: 700;
}

.admin-defaults-form,
.admin-row-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.admin-panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.admin-panel-heading h2 {
    margin-bottom: 0.35rem;
}

.admin-panel-heading p {
    margin: 0;
}

.admin-landing-form {
    display: grid;
    gap: 1rem;
}

.admin-landing-grid,
.admin-rubric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.admin-landing-card,
.admin-rubric-card {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(22, 20, 18, 0.08);
}

.admin-landing-card h3 {
    margin: 0;
    font-size: 1rem;
}

.admin-rubric-card__header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.admin-rubric-card__header h3 {
    margin: 0 0 0.2rem;
    font-size: 1rem;
}

.admin-rubric-card__header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-rubric-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    max-height: 12rem;
    overflow: auto;
    padding-right: 0.2rem;
}

.admin-rubric-form {
    display: grid;
    gap: 0.75rem;
}

.admin-table-shell {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem 0.8rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-profile-cell {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.admin-profile-cell img {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    object-fit: cover;
}

.admin-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.admin-pill-danger {
    background: rgba(186, 26, 26, 0.14);
    color: #8b1414;
}

.admin-inline-field {
    display: grid;
    gap: 0.35rem;
    min-width: 96px;
}

.admin-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.admin-readonly {
    margin: 0;
    color: var(--muted);
}

.chat-messages {
    display: grid;
    gap: 0.8rem;
    align-content: start;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.3rem;
}

.chat-message {
    display: flex;
}

.chat-message.is-mine {
    justify-content: flex-end;
}

.chat-message__bubble {
    max-width: min(80%, 460px);
    padding: 0.9rem 1rem;
    border-radius: 20px 20px 20px 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(22, 20, 18, 0.06);
    box-shadow: 0 10px 28px rgba(20, 18, 17, 0.08);
}

.chat-message.is-mine .chat-message__bubble {
    background: var(--brand);
    color: #fff;
    border-radius: 20px 20px 8px 20px;
}

.chat-message__bubble time {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.78rem;
    opacity: 0.76;
}

.chat-form {
    display: grid;
    gap: 0.8rem;
}

.chat-form__notice {
    margin: 0;
    padding: 0.8rem 0.9rem;
    border-radius: 18px;
    background: rgba(186, 26, 26, 0.08);
    border: 1px solid rgba(186, 26, 26, 0.14);
    color: #8d2a1b;
    line-height: 1.5;
}

body.has-gallery-open {
    overflow: hidden;
}

.photo-gallery {
    position: fixed;
    inset: 0;
    z-index: 74;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.photo-gallery[hidden] {
    display: none !important;
}

.photo-gallery__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.78);
    backdrop-filter: blur(12px);
}

.photo-gallery__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 980px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
}

.photo-gallery__figure {
    margin: 0;
    display: grid;
    gap: 0.85rem;
}

.photo-gallery__image {
    width: 100%;
    max-height: min(78dvh, 820px);
    border-radius: 28px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}

.photo-gallery__caption {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.92rem;
}

.photo-gallery__count {
    font-weight: 800;
}

.photo-gallery__nav,
.photo-gallery__close {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    backdrop-filter: blur(10px);
}

.photo-gallery__nav svg,
.photo-gallery__close svg {
    width: 1.2rem;
    height: 1.2rem;
}

.photo-gallery__close {
    position: absolute;
    top: 0;
    right: 0;
    transform: translateY(calc(-100% - 0.6rem));
}

.photo-like-sheet {
    position: fixed;
    inset: 0;
    z-index: 72;
    display: grid;
    place-items: end center;
    padding: 1rem;
}

.photo-like-sheet[hidden] {
    display: none !important;
}

.photo-like-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 20, 18, 0.34);
    backdrop-filter: blur(8px);
}

.photo-like-sheet__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 31rem);
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-radius: 28px;
    background: rgba(255, 253, 249, 0.98);
    border: 1px solid rgba(22, 20, 18, 0.08);
    box-shadow: 0 28px 60px rgba(20, 18, 17, 0.22);
    transform: translateY(1.4rem);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.photo-like-sheet.is-visible .photo-like-sheet__panel {
    transform: translateY(0);
    opacity: 1;
}

.photo-like-sheet__preview {
    min-height: 180px;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 253, 249, 0.2), rgba(22, 20, 18, 0.18)),
        rgba(22, 20, 18, 0.08);
    background-position: center;
    background-size: cover;
}

.photo-like-sheet__body {
    display: grid;
    gap: 0.7rem;
}

.photo-like-sheet__lead,
.photo-like-sheet__count {
    color: var(--muted);
}

.photo-like-sheet__count {
    justify-self: end;
    font-size: 0.82rem;
    font-weight: 700;
}

.photo-like-sheet__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.feature-list {
    padding-left: 1rem;
}

@keyframes pop-in {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (min-width: 760px) {
    .hero {
        grid-template-columns: minmax(0, 0.95fr) minmax(380px, 0.95fr);
    }

    .page-landing .hero {
        grid-template-columns: minmax(300px, 0.7fr) minmax(620px, 1.28fr);
        gap: clamp(2rem, 4vw, 4.5rem);
        align-items: center;
    }

    .page-landing .hero__content h1 {
        max-width: 8.2ch;
        font-size: clamp(2.55rem, 4vw, 4.05rem);
    }

    .page-landing .hero__lead {
        max-width: 31rem;
    }

    .page-landing .hero__visual {
        min-height: 760px;
        overflow: visible;
    }

    .page-landing .hero-phone {
        inset: 0.4rem 0.8rem 0.4rem 2.2rem;
        border-width: 11px;
        border-radius: 44px;
        box-shadow: 0 34px 86px rgba(20, 18, 17, 0.22);
    }

    .page-landing .hero-phone__sheet {
        inset: auto 1.1rem 1.1rem;
        max-width: min(82%, 27rem);
        gap: 0.58rem;
        padding: 1.02rem 1.08rem;
    }

    .page-landing .hero-phone h3 {
        font-size: clamp(1.95rem, 2.8vw, 2.45rem);
    }

    .page-landing .hero-phone__prompt p {
        font-size: 0.95rem;
        line-height: 1.48;
    }

    .page-landing .hero-card {
        width: min(62%, 224px);
        padding: 0.92rem;
        box-shadow: 0 18px 42px rgba(20, 18, 17, 0.14);
    }

    .page-landing .hero-card h3 {
        font-size: 1.32rem;
    }

    .page-landing .hero-card--back {
        top: 1.4rem;
        right: -0.95rem;
        opacity: 0.96;
    }

    .page-landing .hero-card--front {
        display: none;
    }

    .auth-shell {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: start;
    }

    .discover-head__actions {
        justify-content: flex-end;
    }

    .matches-page {
        grid-template-columns: 340px minmax(0, 1fr);
        align-items: start;
    }

    .matches-page--list,
    .matches-page--chat {
        grid-template-columns: 1fr;
    }

    .profile-preview-grid {
        grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.85fr);
        align-items: start;
    }
}

@media (max-width: 759px) {
    .page-landing .hero {
        gap: 1.15rem;
    }

    .page-landing .hero__mobile-intro {
        display: block;
        order: 1;
        margin-bottom: 0.15rem;
    }

    .site-header__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav--auth {
        width: 100%;
    }

    .site-nav--auth a {
        flex: 1 1 auto;
        text-align: center;
    }

    .is-authenticated .page-shell {
        padding-top: calc(6.95rem + env(safe-area-inset-top));
        padding-bottom: calc(6.8rem + env(safe-area-inset-bottom));
    }

    .is-authenticated .site-header__inner {
        align-items: center;
        flex-direction: row;
    }

    .brand__symbol {
        width: 7.3rem;
        height: 3.24rem;
    }

    .brand--app .brand__symbol {
        width: 7.55rem;
        height: 3.36rem;
    }

    .app-topbar__actions {
        gap: 0.4rem;
    }

    .app-icon-button {
        width: 2.7rem;
        height: 2.7rem;
        border-radius: 0.92rem;
    }

    .app-bottom-nav {
        width: calc(100% - 0.9rem);
        bottom: calc(0.35rem + env(safe-area-inset-bottom));
    }

    .hero__visual {
        min-height: auto;
        display: grid;
        gap: 1rem;
        overflow: visible;
    }

    .page-landing .hero__visual {
        order: 2;
        gap: 0;
    }

    .page-landing .hero__content {
        order: 3;
        padding-top: 0;
        gap: 0.95rem;
    }

    .page-landing .hero__content > .eyebrow {
        display: none;
    }

    .page-landing .hero__content h1 {
        max-width: none;
        font-size: clamp(2.05rem, 9.6vw, 3.1rem);
    }

    .page-landing .hero__lead {
        font-size: 0.97rem;
        line-height: 1.6;
    }

    .page-landing .hero__actions {
        margin-top: 1.2rem;
        gap: 0.75rem;
    }

    .page-landing .hero__actions .button {
        flex: 1 1 calc(50% - 0.4rem);
        justify-content: center;
    }

    .page-landing .hero__meta {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.65rem;
        margin-top: 1.15rem;
    }

    .page-landing .hero__meta div {
        min-width: 0;
        padding: 0.85rem 0.72rem;
    }

    .page-landing .hero-phone,
    .page-landing .hero-card {
        position: relative;
        inset: auto;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        width: 100%;
        max-width: none;
    }

    .page-landing .hero-phone {
        min-height: 540px;
        margin: 0 auto;
        border-width: 8px;
    }

    .page-landing .hero-card {
        width: min(82%, 240px);
        padding: 1rem;
    }

    .page-landing .hero-card--back {
        display: none;
    }

    .page-landing .hero-phone {
        order: 1;
    }

    .page-landing .hero-card--front {
        display: none;
    }

    .page-landing .hero-phone__sheet {
        inset: auto 0.8rem 0.8rem;
        gap: 0.58rem;
        padding: 1rem;
        border-radius: 24px;
    }

    .page-landing .hero-phone h3 {
        font-size: clamp(1.85rem, 8vw, 2.35rem);
    }

    .page-landing .hero-phone__prompt p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .page-landing .hero-phone__pager {
        top: 0.8rem;
    }

    .page-landing .feature-grid {
        grid-template-columns: 1fr;
    }

    .page-landing .feature-card {
        padding: 1.15rem 1.05rem;
    }

    .page-landing .feature-card h2 {
        font-size: 1.35rem;
    }

    .discover-deck {
        height: calc(100dvh - 11.6rem);
        min-height: 620px;
    }

    .swipe-card__hero,
    .preview-card__hero {
        min-height: 470px;
    }

    .swipe-card__stamp {
        top: 1rem;
        font-size: 1rem;
    }

    .swipe-hint {
        font-size: 0.9rem;
    }

    .swipe-card__job {
        font-size: 0.82rem;
    }

    .swipe-card__facts {
        grid-template-columns: 1fr;
    }

    .swipe-card__headline,
    .preview-card__headline {
        gap: 0.5rem;
        padding: 0.9rem;
    }

    .swipe-card__headline strong,
    .preview-card__headline strong {
        font-size: 1rem;
    }

    .swipe-card__headline span,
    .preview-card__headline span {
        font-size: 0.78rem;
    }

    .swipe-card__content,
    .preview-card__content {
        margin: 0 0.75rem;
        padding: 0.9rem;
        border-radius: 22px;
    }

    .discover-head {
        align-items: flex-start;
    }

    .discover-head__actions {
        width: 100%;
    }

    .filter-panel {
        top: auto;
        right: 0.5rem;
        bottom: calc(0.5rem + env(safe-area-inset-bottom));
        left: 0.5rem;
        width: auto;
        max-height: min(78vh, 720px);
        border-radius: 26px;
        transform: translateY(calc(100% + 2rem));
    }

    .discover-page.is-filter-open .filter-panel {
        transform: translateY(0);
    }

    .swipe-card__bio {
        font-size: 0.94rem;
        line-height: 1.5;
    }

    .swipe-card__gallery {
        padding: 0 0.75rem 0;
    }

    .swipe-card__gallery img {
        min-height: 220px;
        border-radius: 20px;
    }

    .swipe-card__photo-like {
        right: 0.75rem;
        bottom: 4.35rem;
        width: 2.56rem;
        height: 2.56rem;
    }

    .swipe-card__gallery-open,
    .preview-card__gallery-open {
        top: 0.75rem;
        left: 0.75rem;
        width: 2.56rem;
        height: 2.56rem;
    }

    .matches-sidebar,
    .chat-panel {
        min-height: 0;
    }

    .chat-messages {
        max-height: 420px;
    }

    .match-reveal__avatar {
        width: 4.8rem;
        height: 4.8rem;
    }

    .match-reveal__word {
        min-width: 5.2rem;
        font-size: 0.84rem;
    }

    .photo-like-sheet {
        padding: 0.75rem;
    }

    .photo-like-sheet__panel {
        width: 100%;
        border-radius: 24px;
    }

    .photo-gallery {
        padding: 0.75rem;
    }

    .photo-gallery__dialog {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
    }

    .photo-gallery__nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }

    .photo-gallery__nav--prev {
        left: 0.4rem;
    }

    .photo-gallery__nav--next {
        right: 0.4rem;
    }

    .photo-gallery__image {
        max-height: min(74dvh, 680px);
        border-radius: 22px;
    }

    .photo-gallery__caption {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        padding-inline: 0.25rem;
    }
}

@media (min-width: 1280px) {
    .page-landing .hero {
        grid-template-columns: minmax(320px, 0.66fr) minmax(700px, 1.34fr);
    }

    .page-landing .hero__visual {
        min-height: 820px;
    }

    .page-landing .hero-phone {
        inset: 0.25rem 0 0.25rem 2.6rem;
    }
}
