@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --brand-color: #FF4B4B;
    --bg-page: #EDE8E3;
    --text-primary: #2D3436;
    --text-secondary: rgba(45, 52, 54, 0.72);
    --text-muted: rgba(45, 52, 54, 0.5);
    --surface: #F7F5F2;
    --surface-border: rgba(45, 52, 54, 0.1);
    --input-bg: #FFFCFA;
    --radius-card: 18px;
    --radius-btn: 14px;
    --shadow-card: 0 8px 24px rgba(45, 52, 54, 0.08);
    --shadow-header: 0 2px 16px rgba(45, 52, 54, 0.06);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --header-height: 56px;
    --app-max-width: 430px;
}

body.theme-female {
    --brand-color: #E11D48;
    --bg-page: #FFF1F2;
    --surface: #FFF5F6;
    --input-bg: #FFFBFC;
}

body.theme-male {
    --brand-color: #2563EB;
    --bg-page: #EFF6FF;
    --surface: #F5F9FF;
    --input-bg: #FAFCFF;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    margin: 0;
}

.brand-bg {
    background-color: var(--brand-color);
}

.brand-text {
    color: var(--brand-color);
}

.brand-btn {
    background-color: var(--brand-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-btn);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.brand-btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--brand-color) 35%, transparent);
    transform: translateY(-1px);
}

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

.auth-in {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-btn);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    outline: none;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-in:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-color) 12%, transparent);
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.auth-card__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-card__logo img {
    height: 40px;
    width: auto;
}

.auth-card__step {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-card__link {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    margin-top: 1rem;
}

.auth-card__link a {
    color: var(--brand-color);
    text-decoration: underline;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    user-select: none;
    padding: 0.25rem 0;
}

.auth-remember__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.auth-remember__box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--surface-border);
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}

.auth-remember__box::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    margin-top: -2px;
    transition: transform 0.15s;
}

.auth-remember__input:checked + .auth-remember__box {
    background: var(--brand-color);
    border-color: var(--brand-color);
}

.auth-remember__input:checked + .auth-remember__box::after {
    transform: rotate(45deg) scale(1);
}

.auth-remember__text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.auth-alert {
    border-radius: var(--radius-btn);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.auth-alert--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #dc2626;
}

.auth-alert--success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #16a34a;
}

.chat-messages {
    scroll-behavior: smooth;
}

.typing-dots span {
    animation: blink 1.4s infinite both;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

.pay-btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

/* App shell */
.app-body {
    background: var(--bg-page);
    color: var(--text-primary);
    min-height: 100dvh;
}

.app-shell {
    width: 100%;
    max-width: var(--app-max-width);
    min-height: 100dvh;
    margin: 0 auto;
    background: var(--surface);
    border-left: 1px solid var(--surface-border);
    border-right: 1px solid var(--surface-border);
    box-shadow: var(--shadow-card);
    position: relative;
    display: flex;
    flex-direction: column;
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: rgba(247, 245, 242, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--surface-border);
    box-shadow: var(--shadow-header);
}

.app-header__inner {
    max-width: var(--app-max-width);
    margin: 0 auto;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    width: 100%;
}

.app-header__logo {
    height: 40px;
    width: auto;
    display: block;
}

.app-header__code {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: ui-monospace, monospace;
}

.app-main {
    flex: 1;
    width: 100%;
    max-width: 100%;
    min-height: calc(100dvh - var(--header-height));
    padding: calc(var(--header-height) + 16px) 16px calc(6.5rem + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
}

/* ── Нижня панель: круглі іконки по центру ── */
.app-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 0 12px calc(10px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
    box-sizing: border-box;
}

.app-dock__inner {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(100%, var(--app-max-width));
    max-width: var(--app-max-width);
    margin: 0 auto;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    box-shadow: 0 8px 28px rgba(45, 52, 54, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-sizing: border-box;
}

.app-dock__btn {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.app-dock__circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--input-bg);
    color: var(--text-muted);
    font-size: 22px;
    line-height: 1;
    border: 1px solid var(--surface-border);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-dock__btn:hover .app-dock__circle {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--brand-color) 35%, transparent);
    color: var(--brand-color);
}

.app-dock__btn.is-active .app-dock__circle {
    background: var(--brand-color);
    border-color: var(--brand-color);
    color: #fff;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--brand-color) 40%, transparent);
    transform: translateY(-2px);
}

.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;
}

/* legacy tab-bar (не використовується) */
.tab-bar,
.bottom-nav,
#lovendys-bottom-nav {
    display: none !important;
}

/* ── Tinder-style swipe ── */
.swipe-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 160px);
    padding-bottom: 5rem;
}

.swipe-deck {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 3 / 4.2;
    margin: 0 auto;
}

.tinder-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-card);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-card);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s ease;
    will-change: transform, opacity;
}

.tinder-card__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.tinder-card__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.2) 40%,
        transparent 70%
    );
    pointer-events: none;
}

.tinder-card__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1.25rem 1.75rem;
    z-index: 2;
}

.tinder-card__name {
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.tinder-card__age {
    font-weight: 400;
}

.tinder-card__city {
    margin-top: 0.35rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.tinder-card--exit-like {
    transform: translateX(120%) rotate(18deg);
    opacity: 0;
}

.tinder-card--exit-nope {
    transform: translateX(-120%) rotate(-18deg);
    opacity: 0;
}

.swipe-stamp {
    position: absolute;
    top: 2.5rem;
    padding: 0.35rem 0.75rem;
    border: 3px solid;
    border-radius: 0.5rem;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    opacity: 0;
    z-index: 3;
    pointer-events: none;
    transform: rotate(-12deg);
}

.swipe-stamp--like {
    left: 1.5rem;
    color: #4ade80;
    border-color: #4ade80;
}

.swipe-stamp--nope {
    right: 1.5rem;
    color: #f87171;
    border-color: #f87171;
    transform: rotate(12deg);
}

.tinder-card--exit-like .swipe-stamp--like,
.tinder-card--exit-nope .swipe-stamp--nope {
    opacity: 1;
}

.swipe-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.75rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.swipe-btn {
    width: 4.75rem;
    height: 4.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-card);
}

.swipe-btn:hover {
    transform: scale(1.08);
}

.swipe-btn:active {
    transform: scale(0.95);
}

.swipe-btn--nope {
    background: var(--surface);
    color: #FF4B4B;
    border: 2px solid rgba(255, 75, 75, 0.2);
}

.swipe-btn--nope:hover {
    box-shadow: 0 8px 24px rgba(255, 75, 75, 0.25);
}

.swipe-btn--like {
    background: var(--brand-color);
    color: #fff;
}

.swipe-btn--like:hover {
    box-shadow: 0 8px 28px rgba(255, 75, 75, 0.45);
}

.swipe-empty {
    text-align: center;
    padding: 3rem 16px;
    color: var(--text-muted);
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.swipe-empty i {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
    color: var(--brand-color);
    opacity: 0.85;
}

.swipe-empty p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.swipe-empty span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.swipe-empty-link,
.empty-state__btn {
    display: inline-block;
    margin-top: 1.25rem;
    padding: 0.75rem 1.75rem;
    border-radius: 25px;
    background: var(--brand-color);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

.swipe-empty-link:hover,
.empty-state__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 75, 75, 0.35);
}

.empty-state {
    text-align: center;
    padding: 3rem 16px;
    color: var(--text-muted);
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.empty-state__icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
    color: var(--brand-color);
    opacity: 0.85;
}

.empty-state__title {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state__hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.match-popup {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(45, 52, 54, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.match-popup.hidden {
    display: none;
}

.match-popup__box {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-card);
    padding: 2rem;
    text-align: center;
    max-width: 20rem;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.match-popup__icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.match-popup__box h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.match-popup__box p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.match-popup__btn {
    display: block;
    padding: 0.875rem;
    border-radius: var(--radius-btn);
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.match-popup__close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.match-popup__close:hover {
    color: var(--text-primary);
}

/* Gender selection */
.gender-option {
    display: block;
    cursor: pointer;
}

.gender-option__box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-btn);
    border: 2px solid var(--surface-border);
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.gender-option__box:hover {
    border-color: rgba(255, 75, 75, 0.35);
    box-shadow: var(--shadow-card);
}

/* Chats list */
.chats-page {
    margin: 0;
}

.chats-search-wrap {
    position: relative;
    margin-bottom: 1.25rem;
}

.chats-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.chats-search-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 9999px;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    color: var(--text-primary);
    outline: none;
    font-size: 0.875rem;
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chats-search-input:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.12);
}

.chats-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.chat-row-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-card);
}

.chat-row-actions {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 140px;
    display: flex;
    flex-direction: column;
    z-index: 0;
}

.chat-action {
    flex: 1;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    cursor: pointer;
    color: #fff;
}

.chat-action--delete {
    background: #ef4444;
}

.chat-action--block {
    background: #52525b;
}

.chat-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.2s ease;
    will-change: transform;
}

.chat-row:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.chat-row__link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.chat-row__link--inactive {
    opacity: 0.55;
    pointer-events: none;
}

.chat-row__avatar-wrap {
    position: relative;
    shrink: 0;
}

.chat-row__avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    object-fit: cover;
}

.chat-row__online {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 0.75rem;
    height: 0.75rem;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid var(--surface);
}

.chat-row__body {
    flex: 1;
    min-width: 0;
}

.chat-row__top,
.chat-row__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.chat-row__name {
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-row__pin {
    color: var(--brand-color);
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

.chat-row__time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.chat-row__preview {
    font-size: 0.8125rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.chat-row__status {
    font-size: 0.625rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.chat-row__status--online {
    color: #22c55e;
}

.chat-row__badge {
    align-self: center;
    margin-right: 0.25rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: var(--brand-color);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-row__pin-btn {
    width: 2.5rem;
    shrink: 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: color 0.2s ease;
}

.chat-row__pin-btn:hover {
    color: var(--brand-color);
}

@media (min-width: 480px) {
    .swipe-deck {
        max-width: 400px;
    }

    .swipe-btn {
        width: 4.25rem;
        height: 4.25rem;
    }
}


.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--bg-page);
}

.auth-shell {
    width: 100%;
    max-width: 28rem;
}

.chat-body {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    background: var(--bg-page);
    display: flex;
    justify-content: center;
}

.chat-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: var(--app-max-width);
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    background: var(--surface);
    border-left: 1px solid var(--surface-border);
    border-right: 1px solid var(--surface-border);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

select.auth-in {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%232D3436'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

/* Search page */
.search-page {
    padding-top: 0.5rem;
}

.search-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.search-alert--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #dc2626;
}

.search-form__label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.search-form__row {
    display: flex;
    gap: 0.5rem;
}

.search-form__input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-btn);
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    outline: none;
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form__input:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.12);
}

.search-form__btn {
    width: 3rem;
    border-radius: var(--radius-btn);
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-form__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 75, 75, 0.35);
}

.search-form__hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.search-empty {
    text-align: center;
    padding: 3rem 16px;
    color: var(--text-muted);
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-empty i,
.search-empty .empty-state__icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 0.75rem;
    color: var(--brand-color);
    opacity: 0.85;
}

/* Profile page */
.profile-page {
    padding-bottom: 1rem;
}

.profile-back,
.anketa-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    margin-bottom: 1rem;
}

.profile-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.profile-alert--success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
}

.profile-alert--error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.profile-header__avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 9999px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.profile-header__name {
    font-size: 1.375rem;
    font-weight: 700;
}

.profile-header__age {
    font-weight: 400;
}

.profile-header__status {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.15rem;
}

.profile-header__status--online {
    color: #22c55e;
}

.profile-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.875rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
}

.profile-code-box__label {
    display: block;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-code-box__value {
    font-size: 1.125rem;
    color: var(--brand-color);
}

.profile-code-box__copy {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #fff;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
}

.profile-stats {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.875rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.profile-stats__item {
    flex: 1;
    text-align: center;
}

.profile-stats__num {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-color);
}

.profile-stats__label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
}

.profile-stats__divider {
    width: 1px;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
}

.profile-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.profile-gallery--readonly .profile-gallery__item {
    aspect-ratio: 1;
}

.profile-gallery__item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 0.625rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.profile-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-gallery__item--empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.profile-gallery__item--empty i {
    font-size: 1.5rem;
}

.profile-gallery__item--wide {
    grid-column: span 3;
    aspect-ratio: 2 / 1;
}

.profile-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.profile-field {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
}

.profile-field__label {
    display: block;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.profile-field__value {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.profile-actions__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.profile-actions__btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
}

.profile-actions__btn--danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.profile-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.profile-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

.profile-settings-block {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.875rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.profile-settings-block__title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.profile-edit-form .auth-in {
    margin-bottom: 0.75rem;
}

/* Anketa (view profile) */
.anketa-page {
    padding-bottom: 1rem;
}

.anketa-hero {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.anketa-hero__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.anketa-hero__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 55%);
}

.anketa-hero__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
}

.anketa-hero__name {
    font-size: 1.5rem;
    font-weight: 700;
}

.anketa-hero__status {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.2rem;
}

.anketa-hero__status--online {
    color: #22c55e;
}

.anketa-hero__code {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.35rem;
}

/* Shop page */
.shop-page {
    padding-bottom: 1rem;
}

.shop-balance {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(255, 68, 88, 0.15), rgba(255, 165, 0, 0.1));
    border: 1px solid rgba(255, 68, 88, 0.25);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.shop-balance--compact {
    padding: 0.625rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.shop-balance__icon {
    font-size: 2.5rem;
}

.shop-balance__label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.shop-balance__value {
    font-size: 2rem;
    font-weight: 800;
    color: #fbbf24;
}

.shop-balance__unit {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.shop-section {
    margin-bottom: 1.75rem;
}

.shop-section__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shop-section__desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.shop-packages {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.625rem;
}

.shop-package {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-card);
    padding: 0.875rem 0.5rem;
    text-align: center;
    min-width: 0;
    box-shadow: var(--shadow-card);
}

.shop-package__coins {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.shop-package__label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.shop-package__price {
    font-size: 0.8125rem;
    color: var(--brand-color);
    font-weight: 600;
    margin-bottom: 0.625rem;
}

.shop-buy-coins {
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
}

.shop-gifts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.shop-gift {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    min-width: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.shop-gifts--action .shop-gift {
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.shop-gifts--action .shop-gift:hover {
    border-color: var(--brand-color);
    background: rgba(255, 68, 88, 0.08);
}

.shop-gifts--action .shop-gift:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.shop-gift__emoji {
    font-size: 2.5rem;
    line-height: 1;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gift-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.gift-icon__img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.gift-icon__img--sm {
    width: 48px;
    height: 48px;
}

.gift-icon__img--chat {
    width: 52px;
    height: 52px;
}

.gift-icon__price {
    font-size: 11px;
    font-weight: 600;
    color: #d97706;
    white-space: nowrap;
}

.shop-gift__name {
    display: none;
}

.shop-gift__price {
    display: none;
}

.shop-boost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.875rem;
    padding: 1.25rem;
}

.shop-boost__desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.75rem;
}

.shop-boost__price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 1rem;
}

.shop-boost__active {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fbbf24;
}

.shop-boost__active i {
    font-size: 2rem;
}

.shop-toast {
    position: fixed;
    bottom: 6.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(34, 197, 94, 0.95);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    z-index: 60;
    max-width: 90%;
    text-align: center;
}

.shop-toast--error {
    background: rgba(239, 68, 68, 0.95);
}

.shop-toast.hidden {
    display: none;
}

.profile-gifts-received {
    margin-bottom: 1.25rem;
}

.profile-gifts-received__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.625rem;
}

.profile-gifts-received__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-gifts-received__item {
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-gifts-received__emoji {
    font-size: 1.5rem;
}

.anketa-gifts-send {
    margin-bottom: 1rem;
}

/* Chat conversation view */
.chat-view-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-height: var(--header-height);
    padding: 0.5rem 0.875rem;
    padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
    background: var(--surface);
    border-bottom: 1px solid var(--surface-border);
    box-shadow: var(--shadow-header);
    flex-shrink: 0;
    z-index: 10;
}

.chat-view-header__back {
    color: var(--text-secondary);
    transition: color 0.2s ease;
    text-decoration: none;
}

.chat-view-header__back:hover {
    color: var(--brand-color);
}

.chat-view-header__avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.chat-view-header__avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    object-fit: cover;
}

.chat-view-header__online {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0.75rem;
    height: 0.75rem;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid var(--surface);
}

.chat-view-header__info {
    flex: 1;
    min-width: 0;
}

.chat-view-header__name {
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.chat-view-header__status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chat-view-header__status--online {
    color: #16a34a;
}

.chat-view-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.625rem 0.875rem;
    background: var(--bg-page);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.chat-view-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding: 2rem 0;
}

.chat-bubble {
    max-width: min(78%, 280px);
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-card);
    font-size: 0.875rem;
    line-height: 1.45;
    word-break: break-word;
}

.chat-bubble--mine {
    background: var(--brand-color);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-bubble--theirs {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-card);
    border-bottom-left-radius: 4px;
}

.chat-view-input-bar {
    padding: 0.5rem 0.625rem;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-top: 1px solid var(--surface-border);
    flex-shrink: 0;
    z-index: 20;
}

.chat-view-input-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
    width: 100%;
}

.chat-view-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 0;
    background: var(--bg-page);
    border: 1px solid var(--surface-border);
    border-radius: 9999px;
    padding: 0.625rem 1rem;
    outline: none;
    font-size: 16px;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-view-input:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.12);
}

.chat-view-send {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-view-send:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 75, 75, 0.35);
}

.chat-view-blocked {
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-top: 1px solid var(--surface-border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.chat-view-alert {
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.08);
    border-bottom: 1px solid rgba(239, 68, 68, 0.15);
    color: #dc2626;
    font-size: 0.75rem;
    text-align: center;
}

.verified-badge {
    color: #3b82f6;
    font-size: 1.125rem;
    vertical-align: middle;
    margin-left: 0.25rem;
}

.verified-badge--inline {
    font-size: 0.875rem;
}

.chat-row__name .verified-badge {
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Light theme overrides — profile, shop, anketa */
.profile-back,
.anketa-back {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.profile-back:hover,
.anketa-back:hover {
    color: var(--brand-color);
}

.profile-alert--success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.25);
    color: #16a34a;
}

.profile-alert--error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #dc2626;
}

.profile-header__avatar {
    border-radius: 50%;
    border-color: var(--surface);
    box-shadow: var(--shadow-card);
}

.profile-header__status {
    color: var(--text-muted);
}

.profile-code-box,
.profile-stats,
.profile-field,
.profile-settings-block,
.profile-gallery__item,
.shop-balance,
.shop-package,
.shop-gift,
.shop-boost,
.profile-gifts-received__item {
    background: var(--surface);
    border-color: var(--surface-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.profile-code-box__label,
.profile-field__label,
.shop-balance__label,
.shop-section__desc,
.profile-gifts-received__title,
.profile-stats__label {
    color: var(--text-muted);
}

.profile-code-box__copy,
.profile-actions__btn--ghost {
    background: var(--bg-page);
    border: 1px solid var(--surface-border);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-code-box__copy:hover,
.profile-actions__btn--ghost:hover {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.1);
}

.profile-field__value,
.shop-balance__unit,
.shop-boost__desc {
    color: var(--text-secondary);
}

.profile-stats__divider {
    background: var(--surface-border);
}

.profile-gallery__item--empty {
    color: var(--text-muted);
    border-color: var(--surface-border);
}

.profile-upload {
    background: var(--surface);
    border-color: var(--surface-border);
    color: var(--text-muted);
    border-radius: var(--radius-btn);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-upload:hover {
    border-color: var(--brand-color);
    box-shadow: var(--shadow-card);
}

.profile-actions__btn {
    border-radius: var(--radius-btn);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-actions__btn:hover {
    transform: translateY(-1px);
}

.profile-actions__btn--danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.shop-balance {
    background: linear-gradient(135deg, rgba(255, 75, 75, 0.08), rgba(255, 165, 0, 0.06));
    border-color: rgba(255, 75, 75, 0.15);
}

.shop-balance--compact {
    background: var(--surface);
    border-color: var(--surface-border);
}

.shop-buy-coins,
.profile-actions__btn.brand-btn {
    border-radius: var(--radius-btn);
}

.shop-gifts--action .shop-gift:hover {
    border-color: var(--brand-color);
    background: rgba(255, 75, 75, 0.06);
}

.anketa-hero {
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.anketa-hero__code {
    color: rgba(255, 255, 255, 0.75);
}

@media (min-width: 480px) {
    .app-body {
        padding: 0.75rem 0;
    }

    .app-shell {
        border-radius: 24px;
        min-height: calc(100dvh - 1.5rem);
    }
}

.hobby-picker__label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: center; }
.hobby-picker__hint { font-size: 0.72rem; color: var(--text-muted); }
.hobby-picker__grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hobby-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--surface-border);
    background: var(--input-bg);
    font-size: 0.78rem;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.hobby-chip__input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.hobby-chip__text {
    pointer-events: none;
}
.hobby-chip--active {
    background: color-mix(in srgb, var(--brand-color) 12%, transparent);
    border-color: var(--brand-color);
    color: var(--brand-color);
}
.profile-settlement-field { width: 100%; }

.search-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.search-tabs__item {
    flex: 1; text-align: center; padding: 0.65rem; border-radius: var(--radius-btn);
    background: var(--surface); border: 1px solid var(--surface-border);
    font-size: 0.875rem; font-weight: 600; color: var(--text-secondary);
}
.search-tabs__item--active { background: var(--brand-color); border-color: var(--brand-color); color: #fff; }

.search-results { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.search-result-card {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem;
    background: var(--surface); border-radius: var(--radius-card);
    border: 1px solid var(--surface-border); box-shadow: var(--shadow-card);
}
.search-result-card__photo { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.search-result-card__name { font-weight: 700; font-size: 0.95rem; }
.search-result-card__meta, .search-result-card__code { font-size: 0.75rem; color: var(--text-muted); }
.search-result-card__arrow { margin-left: auto; color: var(--text-muted); }

.tinder-card { position: relative; }
.tinder-card__link { position: absolute; inset: 0; z-index: 2; }
.tinder-card__info, .swipe-stamp { z-index: 3; pointer-events: none; position: relative; }
.swipe-actions { z-index: 4; position: relative; }

.profile-tabs { display: flex; gap: 0.35rem; margin-bottom: 1rem; overflow-x: auto; }
.profile-tabs__item {
    flex: 1; min-width: 0; text-align: center; padding: 0.55rem 0.35rem; border-radius: 12px;
    font-size: 0.75rem; font-weight: 600; background: var(--surface);
    border: 1px solid var(--surface-border); color: var(--text-secondary);
}
.profile-tabs__item--active {
    background: rgba(255, 75, 75, 0.12); border-color: var(--brand-color); color: var(--brand-color);
}

.profile-muted { color: var(--text-muted); }
.profile-verify-note { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 0.75rem; }
.profile-verify-note--ok { color: #27ae60; }

.chat-view-header__profile-link {
    display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; text-decoration: none; color: inherit;
}
.chat-view-icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--surface-border);
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
    cursor: pointer;
}
.chat-gift-panel {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    width: min(calc(100% - 1rem), calc(var(--app-max-width, 32rem) - 1rem));
    background: var(--surface); border: 1px solid var(--surface-border);
    border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,.12); padding: 0.75rem; z-index: 60;
}
.chat-gift-panel.is-hidden { display: none !important; }
.is-hidden { display: none !important; }
.chat-gift-panel__head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 600;
}
.chat-gift-panel__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.chat-gift-option {
    display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
    padding: 0.5rem; border-radius: 12px; border: 1px solid var(--surface-border);
    background: var(--input-bg); cursor: pointer; transition: border-color .15s, transform .15s;
    min-width: 0;
}
.chat-gift-option:hover:not(:disabled) { border-color: var(--brand-color); transform: translateY(-1px); }
.chat-gift-option:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-gift-option strong { font-size: 0.7rem; color: var(--brand-color); }
.chat-bubble__media { max-width: min(220px, 70vw); max-height: 280px; width: auto; height: auto; border-radius: 12px; display: block; object-fit: cover; cursor: zoom-in; }

.chat-bubble:has(.chat-photo-view) {
    padding: 0.35rem;
    background: transparent;
    border: none;
    box-shadow: none;
}

.chat-bubble--mine:has(.chat-photo-view) {
    background: transparent;
}

.chat-photo-view {
    display: block;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
}

.chat-photo-view:focus-visible {
    outline: 2px solid var(--brand-color);
    outline-offset: 2px;
}

.chat-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top, 16px) 16px env(safe-area-inset-bottom, 16px);
    box-sizing: border-box;
}

.chat-lightbox.is-hidden {
    display: none !important;
}

.chat-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    -webkit-user-drag: none;
}

.chat-lightbox__close {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: 12px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
}

.chat-bubble__gift { display: inline-flex; align-items: center; justify-content: center; padding: 0.25rem; }
.chat-bubble__gift-img { width: 72px; height: 72px; object-fit: contain; display: block; }

.profile-gifts-received__item--large { flex-direction: column; min-width: 72px; padding: 0.5rem; }
.profile-gifts-received__from { font-size: 0.65rem; color: var(--text-muted); margin-top: 0.25rem; text-align: center; }
.profile-gifts-received--full .profile-gifts-received__list { flex-wrap: wrap; }

.swipe-screen { position: relative; }
.swipe-filter-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 20;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--surface-border);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.25rem;
}
.swipe-filter-panel {
    position: absolute;
    top: 3.25rem;
    left: 0;
    right: 0;
    z-index: 25;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 1rem;
}
.swipe-filter-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
