:root {
    --bg: #14070d;
    --bg-soft: #2a1018;
    --surface: #2f1420;
    --surface-strong: #3a1726;
    --text: #fff4f7;
    --muted: #e5b5c2;
    --primary: #ff4f7b;
    --primary-strong: #ff2f64;
    --primary-deep: #b20c46;
    --danger: #ff6d8f;
    --radius: 18px;
    --shadow: 0 22px 55px rgba(56, 4, 25, 0.45);
    /* Topbar height. Declared here so layouts that depend on it (e.g. the
       stream room) get a stable value before JS runs — eliminating the
       "jump" caused when JS later replaces the fallback in the calc(). */
    --header-h: 76px;
}

html {
    scrollbar-gutter: stable;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", "Helvetica Neue", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 127, 163, 0.3) 0%, transparent 32%),
        radial-gradient(circle at 86% 10%, rgba(255, 74, 122, 0.24) 0%, transparent 30%),
        radial-gradient(circle at 90% 82%, rgba(168, 11, 63, 0.38) 0%, transparent 38%),
        linear-gradient(170deg, #1a0810 0%, #0f040a 52%, #16050f 100%);
    min-height: 100vh;
    overflow-y: scroll;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 48px;
    background: rgba(22, 8, 14, 0.78);
    border-bottom: 1px solid rgba(255, 199, 219, 0.2);
    backdrop-filter: blur(10px);
    /* Lock height (not just min-height) so font swap, async <img>/SVG
       decoding, or nav wrap-state changes can never resize the topbar and
       shift the page below it. Applies to every page so the layout is
       identical across navigations. */
    height: 76px;
    min-height: 76px;
    max-height: 76px;
    box-sizing: border-box;
    flex: 0 0 76px;
    overflow: hidden;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.3px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(255, 56, 112, 0.5);
}

.brand-text {
    letter-spacing: 0.4px;
}

.topbar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    row-gap: 8px;
    align-items: center;
}

.topbar nav a,
.topbar nav .nav-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* CSRF-protected logout sits in a form; the button must match nav <a> exactly. */
.nav-logout-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
}
.nav-logout-btn {
    background: transparent;
    border: 0;
    padding: 8px 10px;
    border-radius: 999px;
    color: inherit;
    font: inherit;
    cursor: pointer;
    line-height: inherit;
    text-decoration: none;
}
.nav-logout-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 3px;
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 26px;
    padding: 0 !important;
    border-radius: 7px !important;
    font-size: 1.05rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s, background 0.15s;
    text-decoration: none;
}

.lang-btn:hover {
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.08);
}

.lang-btn--active {
    opacity: 1 !important;
    background: rgba(255, 79, 123, 0.22) !important;
    box-shadow: 0 0 0 1px rgba(255, 79, 123, 0.35);
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar a {
    padding: 8px 10px;
    border-radius: 999px;
}

.topbar a:hover {
    background: rgba(255, 153, 188, 0.18);
}

.page {
    width: min(1100px, 94vw);
    margin: 0 auto;
    padding: 0;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 28px;
    align-items: stretch;
    height: calc(100vh - 72px);
    padding: 28px 0;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.hero-copy h1 {
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    margin: 0;
    line-height: 1.15;
    flex-shrink: 0;
}

.hero-copy>p {
    color: var(--muted);
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    flex-shrink: 0;
}

.hero-image-wrap {
    flex: 1;
    min-height: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 50px rgba(255, 79, 123, 0.3);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    display: block;
}

.hero-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-card,
.auth-card,
.panel,
.reel-card {
    background: linear-gradient(150deg, rgba(64, 23, 38, 0.95), rgba(36, 12, 22, 0.95));
    border: 1px solid rgba(255, 191, 213, 0.2);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card,
.auth-card,
.panel {
    padding: 32px 28px;
}

.auth-card {
    width: min(700px, 94vw);
    margin: 0 auto;
}

.auth-shell {
    width: min(560px, 94vw);
    margin: 0 auto;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 20px;
    align-items: stretch;
}

.auth-side {
    display: grid;
    gap: 14px;
}

.auth-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 92, 138, 0.16);
    border: 1px solid rgba(255, 159, 192, 0.24);
    color: #ffd7e2;
    font-size: 0.85rem;
    font-weight: 700;
}

.auth-points {
    display: grid;
    gap: 10px;
}

.auth-point {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 191, 213, 0.14);
    color: var(--muted);
}

.auth-form-card {
    display: grid;
    gap: 14px;
}

.auth-compact {
    padding: 18px;
}

.auth-compact h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 79, 123, 0.3);
    margin-bottom: 4px;
}

.auth-tab {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 0 16px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease;
}

.auth-tab+.auth-tab {
    border-left: 1px solid rgba(255, 79, 123, 0.3);
}

.auth-tab:hover {
    background: rgba(255, 79, 123, 0.08);
    color: var(--text);
}

.auth-tab-active {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.auth-switch {
    color: var(--muted);
    text-align: center;
}

.auth-switch a {
    color: #ffd7e2;
    font-weight: 700;
}

.landing-access {
    display: flex;
    flex-direction: column;
    gap: 22px;
    justify-content: flex-start;
}

.access-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.access-mini {
    color: var(--muted);
    font-size: 0.95rem;
}

.form-grid {
    display: grid;
    gap: 12px;
}

.profile-editor {
    margin-top: 16px;
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
}

input,
select,
textarea,
button {
    font: inherit;
}

input[type="file"] {
    padding: 10px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(255, 191, 213, 0.22);
    background: rgba(10, 2, 8, 0.55);
    color: var(--text);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1rem;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffd7e2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: center, right 14px center;
    background-size: auto, 16px;
    padding-right: 42px;
}

select option,
select optgroup {
    background: #2a1018;
    color: #fff4f7;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(255, 123, 164, 0.95);
    box-shadow: 0 0 0 3px rgba(255, 79, 123, 0.25);
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    width: 100%;
    letter-spacing: 0.3px;
    transition: filter 160ms ease, transform 160ms ease;
}

.btn-primary {
    background: linear-gradient(140deg, var(--primary), var(--primary-strong));
    color: #fff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
    box-shadow: 0 10px 24px rgba(255, 56, 114, 0.35);
}

.btn-primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

#btn-request-code:hover {
    transform: none;
}

.btn-ghost {
    border: 1px solid rgba(255, 190, 212, 0.45);
}

.alert {
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 12px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: slideDown 280ms ease;
}

.alert.error {
    background: rgba(255, 95, 122, 0.25);
    border: 1px solid rgba(255, 95, 122, 0.6);
    color: #ffb3c6;
}

.alert.success {
    background: rgba(255, 93, 138, 0.25);
    border: 1px solid rgba(255, 122, 164, 0.6);
    color: #ffb3c6;
}

/* Toast stack: desktop ancora no canto inferior esquerdo (longe das ações
   principais do form). Mobile mantém em cima e full-width pra ficar visível
   sem competir com o teclado virtual quando ele sobe pelo bottom. */
.profile-status-stack {
    position: fixed;
    bottom: max(24px, env(safe-area-inset-bottom, 0));
    left: max(24px, env(safe-area-inset-left, 0));
    z-index: 10000;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 48px));
    pointer-events: none;
}
@media (max-width: 560px) {
    .profile-status-stack {
        bottom: auto;
        top: max(12px, env(safe-area-inset-top, 0));
        left: 12px;
        right: 12px;
        width: auto;
    }
}

.profile-status {
    pointer-events: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(28, 8, 18, 0.88);
    border: 1px solid rgba(255, 191, 213, 0.24);
    color: #fff4f7;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: profileToastIn 220ms ease;
}

.profile-status[hidden] {
    display: none;
}

/* Estado de fade-out — toast desliza pra baixo no desktop (afundando) e
   pra cima no mobile (saindo pelo topo). Ambos fazem fade simultâneo. */
.profile-status.is-dismissing {
    transition: opacity 320ms ease, transform 320ms ease;
    opacity: 0;
    transform: translateY(8px) scale(0.98);
}
@media (max-width: 560px) {
    .profile-status.is-dismissing {
        transform: translateY(-8px) scale(0.98);
    }
}

.profile-status--success {
    border-color: rgba(70, 255, 170, 0.26);
}

.profile-status--error {
    border-color: rgba(255, 95, 122, 0.5);
}

.profile-status__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 79, 123, 0.16);
    color: #ff7ba4;
}

.profile-status--success .profile-status__icon {
    background: rgba(70, 255, 170, 0.12);
    color: #79ffc6;
}

.profile-status p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
    font-weight: 650;
}

.profile-status__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 244, 247, 0.8);
    cursor: pointer;
    line-height: 1;
}

.profile-status__close:hover,
.profile-status__close:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    outline: none;
}

@keyframes profileToastIn {
    from {
        opacity: 0;
        /* Slide UP entrando do canto inferior (desktop default). */
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* Em mobile o toast nasce em cima da tela — entra deslizando pra baixo. */
@media (max-width: 560px) {
    @keyframes profileToastIn {
        from {
            opacity: 0;
            transform: translateY(-12px) scale(0.98);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feed-subtitle {
    color: var(--muted);
}

/* Feed gender filter */
/* Aviso transitório quando o user liga/desliga o filtro "Mesma Região".
   Pílula fixa centralizada no rodapé com slide-up + fade. */
.feed-toast {
    position: fixed;
    left: 50%;
    bottom: max(24px, env(safe-area-inset-bottom, 0));
    transform: translate(-50%, 12px);
    z-index: 10001;
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(28, 8, 18, 0.92);
    border: 1px solid rgba(255, 191, 213, 0.32);
    color: #fff4f7;
    font-size: 0.86rem;
    font-weight: 650;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms ease, transform 280ms ease;
    max-width: calc(100vw - 32px);
    text-align: center;
}
.feed-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
.feed-toast[hidden] { display: none; }

.feed-filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.feed-filter {
    display: contents;
}

.feed-filter-option {
    cursor: pointer;
}

.feed-filter-option input[type="radio"],
.feed-filter-option input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.feed-filter-option>span,
.feed-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 191, 213, 0.25);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.35;
    transition: background 150ms, border-color 150ms, color 150ms;
    user-select: none;
}

.feed-filter-chip {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.feed-filter-text {
    display: inline-block;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    white-space: nowrap;
}

.feed-filter-icon {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    min-height: 16px;
    max-width: 16px;
    max-height: 16px;
    flex: 0 0 16px !important;
    display: block;
    vertical-align: middle;
}

.feed-filter-option input[type="radio"]:checked+span {
    background: rgba(255, 123, 164, 0.18);
    border-color: rgba(255, 123, 164, 0.7);
    color: var(--text);
}

.feed-filter-option input[type="checkbox"]:checked+span {
    background: rgba(255, 123, 164, 0.18);
    border-color: rgba(255, 123, 164, 0.7);
    color: var(--text);
}

.feed-filter-option span:hover {
    border-color: rgba(255, 123, 164, 0.45);
    color: var(--text);
}

/* Gender radio group inside name modal */
.gender-radio-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gender-radio-option {
    cursor: pointer;
    flex: 1;
    min-width: 80px;
}

.gender-radio-option input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.gender-radio-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 191, 213, 0.25);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
    transition: background 150ms, border-color 150ms, color 150ms;
    user-select: none;
    text-align: center;
}

.gender-radio-option input[type="radio"]:checked+span {
    background: rgba(255, 123, 164, 0.18);
    border-color: rgba(255, 123, 164, 0.7);
    color: var(--text);
}

.gender-radio-option span:hover {
    border-color: rgba(255, 123, 164, 0.45);
    color: var(--text);
}

.feed-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 260px));
    gap: 16px;
    /* Cards stay at 260px (so the WhatsApp button keeps its original size),
       but any leftover width is split EQUALLY on both sides instead of being
       dumped only on the right — feed visually centered and aligned with
       every other page. */
    justify-content: center;
}

.feed-locked {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

.reel-card {
    position: relative;
    aspect-ratio: 9 / 14;
    border-radius: 24px;
    perspective: 1600px;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 180ms ease, box-shadow 180ms ease;
    animation: cardFadeIn 420ms ease both;
}

.reel-card:hover {
    transform: none;
    box-shadow: 0 24px 40px rgba(53, 4, 22, 0.48);
}

.reel-card:focus-visible {
    outline: 2px solid rgba(255, 123, 164, 0.95);
    outline-offset: 4px;
}

.reel-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: translateZ(0) rotateY(0deg);
    transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.reel-card.is-flipped .reel-card-inner {
    transform: translateZ(0) rotateY(180deg);
}

.reel-face {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.reel-face-back {
    transform: translateZ(0) rotateY(180deg);
}

.reel-media {
    position: relative;
    width: 100%;
    height: 100%;
    background: #230914;
    overflow: hidden;
}

.reel-media img,
.reel-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.reel-media-initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 38% 28%, rgba(255, 100, 158, 0.34) 0%, transparent 52%),
        radial-gradient(ellipse at 68% 72%, rgba(160, 38, 98, 0.22) 0%, transparent 48%),
        linear-gradient(148deg, #2d0b2f 0%, #190420 50%, #0c0213 100%);
    font-size: clamp(4.25rem, 26vw, 6.75rem);
    font-weight: 800;
    color: rgba(255, 215, 232, 0.92);
    letter-spacing: 0.04em;
    text-shadow:
        0 0 48px rgba(255, 82, 132, 0.50),
        0 6px 28px rgba(200, 55, 108, 0.32),
        0 1px 0 rgba(255, 255, 255, 0.08);
    user-select: none;
    pointer-events: none;
}

.reel-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    background:
        linear-gradient(to bottom, rgba(14, 4, 9, 0.78) 0%, transparent 28%),
        linear-gradient(to top, rgba(14, 4, 9, 0.92) 0%, transparent 40%);
}

.reel-media-back {
    background: rgba(23, 6, 13, 0.96);
}

.reel-media-back::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 110, 150, 0.10) 0%, rgba(255, 110, 150, 0) 32%);
    pointer-events: none;
}

.reel-bio-block {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    overflow: hidden;
}

.reel-bio-label {
    margin: 0 0 6px;
    color: rgba(255, 215, 226, 0.72);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.35;
}

.reel-bio-copy {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 123, 164, 0.45) transparent;
}

.reel-bio-copy .bio {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
    line-height: 1.35;
    word-break: break-word;
    text-wrap: pretty;
}

.reel-actions {
    display: grid;
    gap: 10px;
}

/* When the card has BOTH WhatsApp and Telegram, lay the two CTA buttons in a
   single row (50/50). The quota chip below stays on its own row via the grid
   "/ row" implicit break, since chip lives outside the flex children. */
.reel-actions:has(.btn-telegram) {
    grid-template-columns: 1fr;
}
.reel-actions:has(.btn-telegram) .btn-whatsapp,
.reel-actions:has(.btn-telegram) .btn-telegram {
    grid-column: auto;
}
.reel-actions:has(.btn-telegram) {
    grid-template-areas: "buttons" "chip";
}
.reel-actions:has(.btn-telegram) .wa-quota-chip {
    grid-area: chip;
}
.reel-actions:has(.btn-telegram)::before {
    /* Use a wrapping flex container via a CSS grid trick: turn the two anchor
       buttons into a 2-column row using subgrid-like behavior. Fallback: just
       a flex row that wraps if there's no space. */
    content: none;
}
/* Simpler reliable layout: flex row for the two buttons when both present.
   Buttons get shorter (40px), smaller font and tighter padding so the two
   labels ("WhatsApp" / "Telegram") fit comfortably side by side on phones. */
.reel-actions.has-tg {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.reel-actions.has-tg .btn-whatsapp,
.reel-actions.has-tg .btn-telegram {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    padding: 9px 10px;
    font-size: 0.86rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.35);
    gap: 6px;
    order: 0;
}
.reel-actions.has-tg .btn-whatsapp .wa-icon,
.reel-actions.has-tg .btn-telegram .wa-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.reel-actions.has-tg .btn-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Pseudo-elemento força quebra de linha antes do chip (flex-basis:100%) e
   `justify-content: center` no pai cuida do alinhamento horizontal. O chip
   mantém largura auto/shrink-to-fit, preservando o visual de pill. */
.reel-actions.has-tg::after {
    content: '';
    flex: 0 0 100%;
    height: 0;
    order: 1;
}
.reel-actions.has-tg .wa-quota-chip {
    flex: 0 0 auto;
    order: 2;
    margin-top: 2px;
    justify-self: center;
}

.wa-quota-chip {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.2;
    border: 1px solid transparent;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.wa-quota-chip--free {
    background: rgba(37, 211, 102, .14);
    color: #b6f0c8;
    border-color: rgba(37, 211, 102, .35);
}

.wa-quota-chip--paid {
    background: rgba(255, 174, 12, .15);
    color: #ffd17a;
    border-color: rgba(255, 174, 12, .4);
}

.wa-quota-chip--vip {
    background: linear-gradient(135deg, rgba(255, 174, 12, .2), rgba(255, 79, 123, .2));
    color: #ffd17a;
    border-color: rgba(255, 174, 12, .5);
}

.reel-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.reel-info {
    flex: 1;
    min-width: 0;
}

.reel-info h3 {
    margin: 0 0 2px;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    word-break: break-word;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.reel-info .meta {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.35;
    word-break: break-word;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none;
    transition: opacity 180ms ease;
    box-shadow: 0 4px 20px rgba(18, 140, 126, 0.45);
    letter-spacing: 0.01em;
}

.btn-whatsapp:hover {
    opacity: 0.82;
}

/* Telegram button — same shape/sizing as WhatsApp, different brand color. */
.btn-telegram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2aabee 0%, #229ed9 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none;
    transition: opacity 180ms ease;
    box-shadow: 0 4px 20px rgba(20, 110, 180, 0.55);
    letter-spacing: 0.01em;
}
.btn-telegram:hover { opacity: 0.85; }

.btn-primary.is-loading,
.btn-ghost.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    opacity: 0.82;
}

.btn-primary.is-loading::after,
.btn-ghost.is-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 50%;
    top: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.36);
    border-top-color: #fff;
    animation: feedSpin 0.75s linear infinite;
}

.wa-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.meta,
.bio {
    color: var(--muted);
    margin: 0;
}

.feed-loader {
    text-align: center;
    color: var(--muted);
    padding: 20px 0 30px;
    transition: opacity 220ms ease, color 220ms ease;
}

.feed-loader-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 191, 213, 0.22);
    background: rgba(255, 255, 255, 0.04);
    color: #ffe6ee;
    font-weight: 600;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.feed-loader.is-error {
    color: #ffd2dc;
}

.feed-loader.is-done {
    color: rgba(255, 225, 236, 0.82);
}

.feed-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 230, 0.3);
    border-top-color: #fff;
    animation: feedSpin 900ms linear infinite;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(10, 2, 6, 0.64);
    backdrop-filter: blur(10px);
    /* iOS Safari: respeita safe-area-inset pra modal não esconder atrás do notch */
    padding-top: max(24px, env(safe-area-inset-top, 0));
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0));
}
@media (max-width: 560px) {
    .modal-backdrop {
        padding: 16px;
        padding-top: max(16px, env(safe-area-inset-top, 0));
        padding-bottom: max(16px, env(safe-area-inset-bottom, 0));
    }
}

@media (max-width: 640px) {
    .modal-backdrop:has(.modal-box--picker) {
        padding: 16px;
        place-items: center;
    }
}

.modal-backdrop[hidden] {
    display: none !important;
}

.modal-card {
    width: min(460px, 95vw);
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(150deg, rgba(64, 23, 38, 0.98), rgba(36, 12, 22, 0.98));
    border: 1px solid rgba(255, 191, 213, 0.24);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
    max-height: 95vh;
    overflow-y: auto;
}

@media (max-width: 480px) {
    .modal-backdrop--onboarding {
        padding: 16px;
    }

    .modal-card {
        width: min(460px, calc(100vw - 32px));
        padding: 16px;
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
        align-self: center;
        justify-self: center;
    }
}

.modal-card h2 {
    margin: 0 0 8px;
}

.country-picker {
    position: relative;
}

.country-picker-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    border: 1px solid rgba(255, 191, 213, 0.22);
    background: rgba(10, 2, 8, 0.55);
    color: var(--text);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
}

.country-picker-trigger:focus {
    outline: none;
    border-color: rgba(255, 123, 164, 0.95);
    box-shadow: 0 0 0 3px rgba(255, 79, 123, 0.25);
}

.country-picker-trigger.is-loading {
    cursor: default;
    opacity: 0.7;
}

/* Checkbox label (age confirm, hidden from feed) */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #ff7ba4;
    cursor: pointer;
}

.checkbox-label--warning span {
    color: rgba(255, 191, 213, 0.75);
}

.checkbox-label--warning input[type="checkbox"]:checked+span {
    color: #ff7ba4;
}

.picker-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 191, 213, 0.25);
    border-top-color: rgba(255, 123, 164, 0.85);
    border-radius: 50%;
    animation: pickerSpin 0.65s linear infinite;
    flex-shrink: 0;
}

@keyframes pickerSpin {
    to {
        transform: rotate(360deg);
    }
}

.country-picker-panel {
    position: fixed;
    z-index: 62;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, 90vw);
    height: min(85vh, 560px);
    max-height: min(85vh, 560px);
    border: 1px solid rgba(255, 191, 213, 0.26);
    border-radius: 14px;
    background: linear-gradient(150deg, rgba(64, 23, 38, 0.98), rgba(36, 12, 22, 0.98));
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
    padding: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.country-picker-panel[hidden] {
    display: none !important;
}

/* Dim+blur backdrop behind the country / state / city pickers — matches the
   look of the WhatsApp country picker (modal-backdrop). Sits just below the
   panel z-index so it covers the page but not the picker itself. */
.country-picker-backdrop {
    position: fixed;
    inset: 0;
    z-index: 61;
    background: rgba(10, 2, 6, 0.64);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.country-picker-backdrop[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    .phone-field {
        grid-template-columns: auto 1fr;
    }

    .phone-field .btn-ghost--inline,
    .phone-field .btn-edit-wa {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        justify-content: center;
    }

    /* Mobile: keep the picker centered (matches the onboarding modal look
       used during the registration flow). Earlier this used a bottom-sheet,
       but that was inconsistent with the centered modals on /profile and the
       manual cadastro forms. Sizes via calc so we work on iOS Safari (dvh). */
    .country-picker-panel {
        width: min(560px, calc(100vw - 32px));
        max-width: calc(100vw - 32px);
        left: 50%;
        right: auto;
        top: 50%;
        bottom: auto;
        transform: translate(-50%, -50%);
        height: min(560px, calc(100vh - 32px));
        height: min(560px, calc(100dvh - 32px));
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
        border-radius: 16px;
        padding: 12px;
        animation: none;
    }

    .country-picker-search {
        font-size: 16px;
    }
}

@keyframes pickerSheetUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.country-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.country-picker-title {
    font-size: 1rem;
}

.country-picker-close {
    border: 1px solid rgba(255, 191, 213, 0.26);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font: inherit;
}

.country-picker-close:hover {
    border-color: rgba(255, 123, 164, 0.7);
    background: rgba(255, 123, 164, 0.16);
}

.country-picker-search::-webkit-search-cancel-button {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    cursor: pointer;
    border-radius: 50%;
    background:
        linear-gradient(45deg, transparent 43%, #ffe6ee 43%, #ffe6ee 57%, transparent 57%),
        linear-gradient(-45deg, transparent 43%, #ffe6ee 43%, #ffe6ee 57%, transparent 57%);
    opacity: 0.95;
}

.country-picker-search {
    width: 100%;
    border: 1px solid rgba(255, 191, 213, 0.22);
    background: rgba(10, 2, 8, 0.55);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.country-picker-search:focus {
    outline: none;
    border-color: rgba(255, 123, 164, 0.95);
}

.country-picker-list {
    flex: 1;
    min-height: 200px;
    height: 100%;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    align-content: start;
    grid-auto-rows: min-content;
    gap: 8px;
    padding-right: 4px;
}

@media (max-width: 480px) {
    .country-picker-list {
        max-height: none;
    }
}

.country-picker-option {
    width: auto;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    overflow: hidden;
    border: 1px solid rgba(255, 191, 213, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    text-align: left;
}

.country-picker-label {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-picker-option:hover {
    border-color: rgba(255, 123, 164, 0.6);
    background: rgba(255, 123, 164, 0.12);
}

.country-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 191, 213, 0.22);
    flex-shrink: 0;
}

.country-flag img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.country-flag-sm {
    width: 24px;
    height: 18px;
}

.country-flag-md {
    width: 28px;
    height: 20px;
}

.country-flag-fallback {
    font-size: 0.95rem;
    line-height: 1;
    padding-top: 1px;
}

.country-picker-label {
    font-size: 0.95rem;
    font-weight: 600;
}

.country-picker-empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    padding: 8px;
}

/* Esconde a card "Onde voce mora?" + form ate o JS terminar de criar e
   auto-abrir o picker panel — sem isso, ha um flash visual de ~50-300ms
   entre o paint inicial e a hidratacao. assets/app.js remove o atributo
   data-pending-picker apos openPanel(). */
.modal-card[data-pending-picker="1"] {
    visibility: hidden;
}

.country-picker-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.country-picker-trigger-text {
    flex: 1;
}

.country-picker-caret {
    opacity: 0.82;
}

.photo-upload-card {
    display: grid;
    grid-template-columns: minmax(250px, 260px) 1fr;
    gap: 20px;
    align-items: stretch;
}

.photo-upload-card--modal {
    /* min(240px, 100%) prevents the column from overflowing on narrow screens
       while capping it at 240px. justify-content: center keeps it centered at
       any viewport width — the placeholder is always in the middle. */
    grid-template-columns: min(240px, 100%);
    justify-content: center;
    align-items: center;
    gap: 0;
}

.profile-fields {
    display: grid;
    gap: 14px;
    align-content: start;
    height: auto;
    min-height: 0;
}

.profile-fields textarea {
    height: auto;
    min-height: 132px;
    resize: vertical;
}

.photo-upload-area {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 14;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    border: 2px dashed rgba(255, 79, 123, 0.35);
    transition: border-color 200ms;
}

.photo-upload-area:hover,
.photo-upload-area:focus,
.photo-upload-area.drag-over {
    border-color: rgba(255, 79, 123, 0.85);
    outline: none;
}

.photo-upload-area.drag-over {
    background: rgba(255, 79, 123, 0.08);
}

.photo-upload-area input[type="file"] {
    display: none;
}

.photo-upload-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(8, 2, 5, 0.55);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 200ms;
}

.photo-upload-area:hover .photo-upload-overlay,
.photo-upload-area:focus .photo-upload-overlay,
.photo-upload-area.drag-over .photo-upload-overlay {
    opacity: 1;
}

.photo-hint {
    font-size: 0.82rem;
    color: rgba(255, 200, 220, 0.55);
    margin: 4px 0 0;
    word-break: break-all;
    display: none;
}

.photo-identity-overlay {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(to top, rgba(12, 3, 8, 0.88) 0%, rgba(12, 3, 8, 0.62) 100%);
    border: 1px solid rgba(255, 191, 213, 0.2);
}

.photo-identity-overlay h2,
.photo-identity-overlay p {
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.photo-identity-overlay h2 {
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
}

.photo-identity-overlay p {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    opacity: 0.96;
}

.profile-photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    border: 0;
    box-shadow: none;
}

.profile-initials-avatar {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3a0a1e 0%, #1a0410 100%);
    font-size: clamp(3rem, 18vw, 6rem);
    font-weight: 900;
    color: rgba(255, 123, 164, 0.55);
    letter-spacing: 0.04em;
    user-select: none;
    pointer-events: none;
}

.phone-field {
    /* Flex em vez de grid 3-col fixa — sem o botão de editar (caso da modal
       de onboarding) a 3ª coluna ficava reservando 154px e cortava o input.
       Flex faz o input ocupar o espaço sobrando e o edit-button (quando
       presente) shrink-to-fit ao lado. */
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.phone-field > input {
    flex: 1 1 auto;
    min-width: 0;
}
.phone-field > .phone-prefix,
.phone-field > .phone-prefix--btn,
.phone-field > .btn-edit-wa,
.phone-field > .btn-ghost--inline {
    flex: 0 0 auto;
}

/* Responsivo mobile: em telas estreitas o botão "Liberar/Bloquear" ficava
   apertado ao lado do input ou empurrava o input pra largura mínima. Faz
   o flex quebrar e joga o botão pra linha de baixo, ocupando largura inteira
   pro toque ficar mais fácil. */
@media (max-width: 640px) {
    .phone-field {
        flex-wrap: wrap;
        row-gap: 8px;
    }
    .phone-field > .btn-edit-wa {
        flex: 1 1 100%;
        width: 100%;
        justify-content: center;
        min-height: 46px;
    }
    /* Centraliza o conteúdo (ícone + eyebrow/label) já que agora o botão é
       full-width e o text-align: left do __copy original ficaria desalinhado. */
    .phone-field > .btn-edit-wa .btn-edit-wa__copy {
        text-align: center;
        flex: 0 0 auto;
    }
}

.phone-prefix {
    min-width: 74px;
    text-align: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(140deg, rgba(255, 79, 123, 0.28), rgba(178, 12, 70, 0.26));
    border: 1px solid rgba(255, 191, 213, 0.32);
    color: var(--text);
    font-weight: 700;
}

.btn-ghost--inline {
    min-height: 44px;
    white-space: nowrap;
    padding-inline: 14px;
}

/* WhatsApp edit button */
.btn-edit-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 79, 123, 0.35);
    background: linear-gradient(140deg, rgba(255, 79, 123, 0.18), rgba(178, 12, 70, 0.18));
    color: rgba(255, 200, 220, 0.9);
    font-size: 0.86rem;
    font-weight: 600;
    font-family: inherit;
    white-space: nowrap;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn-edit-wa:hover,
.btn-edit-wa:focus-visible {
    background: linear-gradient(140deg, rgba(255, 79, 123, 0.28), rgba(178, 12, 70, 0.28));
    border-color: rgba(255, 79, 123, 0.6);
    color: #fff;
    outline: none;
}
.btn-edit-wa svg { flex-shrink: 0; }

.btn-edit-wa__copy {
    display: grid;
    gap: 1px;
    min-width: 0;
    text-align: left;
}

.btn-edit-wa__eyebrow {
    color: rgba(255, 215, 226, 0.66);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.05;
}

.btn-edit-wa__label {
    color: #fff4f7;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.1;
}

.btn-edit-wa.is-editing {
    background: linear-gradient(140deg, rgba(70, 255, 170, 0.13), rgba(255, 79, 123, 0.14));
    border-color: rgba(70, 255, 170, 0.32);
}

.btn-edit-wa.is-editing .btn-edit-wa__eyebrow {
    color: rgba(120, 255, 200, 0.82);
}

.btn-edit-wa:disabled {
    cursor: default;
    opacity: 0.82;
}


/* Edit button locked by cooldown — still clickable (opens an info modal)
   but visually marked as not-editable now. */
.btn-edit-wa.is-locked {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 200, 220, 0.45);
    cursor: help;
}
.btn-edit-wa.is-locked:hover,
.btn-edit-wa.is-locked:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 200, 220, 0.7);
}


/* Profile page header with delete button in top-right */
/* Transparent wrapper — h1/subtitle flow like every other page header. */
.profile-page-header {
    display: contents;
}
.btn-delete-account__label { display: none; }

.radio-delete-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.radio-delete-row .radio-group {
    flex: 1;
    min-width: 0;
}
.radio-delete-row .btn-delete-account {
    flex-shrink: 0;
    padding: 0;
    width: 42px;
    align-self: stretch;
    border-radius: 14px;
    justify-content: center;
}

/* Delete account zone (legacy - kept for fallback) */
.profile-danger-zone {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 60, 60, 0.12);
    display: flex;
    justify-content: flex-start;
}
.btn-delete-account {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 60, 60, 0.3);
    background: transparent;
    color: rgba(255, 130, 130, 0.75);
    font-size: 0.84rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-delete-account:hover,
.btn-delete-account:focus-visible {
    background: rgba(255, 60, 60, 0.1);
    color: #ff8585;
    border-color: rgba(255, 60, 60, 0.55);
    outline: none;
}

/* Prefix button — active (clickable) state when in WhatsApp edit mode */
.phone-prefix--btn {
    font: inherit;
    cursor: default;
    transition: background 150ms ease, border-color 150ms ease;
}
.phone-prefix--btn:not(:disabled) {
    cursor: pointer;
}
.phone-prefix--btn:not(:disabled):hover,
.phone-prefix--btn:not(:disabled):focus-visible {
    background: linear-gradient(140deg, rgba(255, 79, 123, 0.42), rgba(178, 12, 70, 0.38));
    border-color: rgba(255, 79, 123, 0.6);
    outline: none;
}

/* WhatsApp country picker modal */
.modal-box--picker {
    display: flex;
    flex-direction: column;
    width: min(380px, 95vw);
    max-height: min(560px, 90vh);
    padding: 0;
    overflow: hidden;
}

/* Mobile: keep the WhatsApp country picker centered instead of bottom-sheet. */
@media (max-width: 640px) {
    .modal-box--picker {
        width: min(380px, calc(100vw - 32px));
        max-width: calc(100vw - 32px);
        height: min(560px, calc(100dvh - 32px));
        max-height: calc(100dvh - 32px);
        border-radius: 18px;
        margin: 0;
        position: relative;
        inset: auto;
        padding-bottom: 0;
        animation: none;
    }
    .modal-box--picker .wa-country-search { font-size: 16px; }
    .modal-box--picker .modal-box-header { padding: 14px 18px 10px; }
}
.modal-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 79, 123, 0.15);
}
.modal-box-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.modal-box-close {
    background: none;
    border: none;
    color: var(--muted, #888);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    line-height: 1;
    font-family: inherit;
}
.modal-box-close:hover { background: rgba(255, 79, 123, 0.12); color: var(--text, #fff); }
.wa-country-search {
    margin: 10px 14px 6px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 191, 213, 0.2);
    border-radius: 12px;
    color: var(--text, #fff);
    font-size: 0.9rem;
    font-family: inherit;
    width: calc(100% - 28px);
    box-sizing: border-box;
    flex-shrink: 0;
    outline: none;
}
.wa-country-search:focus { border-color: rgba(255, 47, 100, 0.55); }
.wa-country-list {
    overflow-y: auto;
    flex: 1;
    padding: 4px 8px 8px;
}
.wa-country-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    background: none;
    border: none;
    color: var(--text, #fff);
    cursor: pointer;
    border-radius: 10px;
    text-align: left;
    font-size: 0.88rem;
    font-family: inherit;
    min-height: 44px;
    transition: background 120ms ease;
}
.wa-country-option:hover,
.wa-country-option:focus-visible { background: rgba(255, 79, 123, 0.1); outline: none; }
.wa-country-flag { font-size: 1.35rem; flex-shrink: 0; line-height: 1; }
.wa-country-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-country-empty { text-align: center; color: var(--muted, #888); padding: 24px; font-size: 0.88rem; }

/* Delete account modal */
.modal-box {
    /* Cálculo respeita o padding 24px de cada lado do .modal-backdrop pra
       garantir que o modal NUNCA encoste nas bordas em mobile (360px). */
    width: min(460px, calc(100vw - 48px));
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(150deg, rgba(52, 18, 32, 0.98), rgba(28, 10, 18, 0.98));
    border: 1px solid rgba(255, 191, 213, 0.22);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.42);
    max-height: 90vh;
    overflow-y: auto;
}
@media (max-width: 560px) {
    /* Em telas pequenas o backdrop usa 16px de padding; ajusta a conta. */
    .modal-box {
        width: min(460px, calc(100vw - 32px));
        padding: 20px;
        border-radius: 18px;
    }
}
.modal-body {
    margin: 0 0 18px;
}
.modal-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}
.modal-actions .btn-ghost,
.modal-actions .btn-danger,
.modal-actions .btn-primary {
    flex: 1;
    width: auto;
    min-height: 44px;
    font-size: 0.92rem;
}
/* Quando há um único botão no modal (caso dos cooldown modals "Entendi"),
   ele ocupa a linha inteira e fica centralizado — antes shrinkava ao tamanho
   do texto e ficava encostado à esquerda, dando impressão de modal quebrado. */
.modal-actions:has(> button:only-child) > button {
    width: 100%;
    flex: 1 1 100%;
}

body.modal-open {
    overflow: hidden;
}
.modal-box--danger h3 {
    color: #ff8585;
    margin: 0 0 14px;
    font-size: 1.1rem;
}
.delete-account-list {
    margin: 8px 0 12px 18px;
    padding: 0;
    color: rgba(255, 220, 232, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
}
.delete-account-notice {
    font-size: 0.88rem;
    color: rgba(255, 220, 200, 0.82);
    margin: 12px 0 0;
    padding: 10px 12px;
    background: rgba(200, 80, 40, 0.12);
    border: 1px solid rgba(255, 120, 80, 0.22);
    border-radius: 8px;
    line-height: 1.55;
}
/* Sucesso pos-solicitacao: troca o conteudo do mesmo backdrop ao confirmar
   exclusao. Tema verde calm pra contrastar com o card vermelho de confirm. */
.modal-box--success {
    text-align: center;
    padding: 28px 24px;
}
.delete-account-success__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff4f7b 0%, #ff2f64 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(255, 47, 100, 0.35);
}
.delete-account-success__icon svg {
    display: block;
}
.delete-account-success__title {
    margin: 0 0 10px;
    font-size: 1.15rem;
    color: #fff;
    font-weight: 800;
}
.delete-account-success__desc {
    margin: 0 auto 20px;
    max-width: 36ch;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 220, 232, 0.85);
}
.modal-box--success .modal-actions {
    justify-content: center;
}
.modal-box--success .btn-primary {
    min-width: 140px;
}
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, #c0392b, #922b21);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: inherit;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: filter 160ms ease;
}
.btn-danger:hover { filter: brightness(1.1); }

/* Aviso de cooldown de 30 dias do WhatsApp/Telegram — só uma linha de
   hint embaixo do campo, sem caixa/borda (deixava a página muito mais alta). */
.profile-whatsapp-note {
    margin: 4px 2px 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    color: rgba(255, 200, 145, 0.78);
    font-size: 0.72rem;
    line-height: 1.3;
}

.radio-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.radio-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 191, 213, 0.22);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    color: var(--text);
}

.radio-card input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.card-topline {
    display: flex;
    justify-content: flex-start;
}

.intent-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 92, 138, 0.2);
    border: 1px solid rgba(255, 159, 192, 0.28);
    color: #ffd7e2;
    font-size: 0.84rem;
    font-weight: 700;
}

#verification-code,
input[name="email_verification_code"] {
    width: 100%;
    min-height: 68px;
    text-align: center;
    font-size: 1.65rem;
    letter-spacing: 12px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.profile-fields .phone-prefix {
    padding: 10px 12px;
}

.profile-fields input,
.profile-fields select,
.profile-fields textarea {
    padding: 10px 12px;
}

.profile-photo {
    width: min(220px, 70vw);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid rgba(255, 191, 213, 0.35);
    box-shadow: var(--shadow);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        height: auto;
        padding: 24px 0 40px;
        gap: 20px;
    }

    .hero-image-wrap {
        height: 280px;
        flex: none;
    }

    .landing-access {
        position: static;
    }

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-wrap: wrap;
        gap: 10px;
        /* Release the desktop height lock so the wrapped nav has room to
           render (multi-row layout on small viewports). */
        height: auto;
        min-height: 76px;
        max-height: none;
        flex: 0 0 auto;
        overflow: visible;
    }

    .topbar nav {
        width: 100%;
        flex-wrap: wrap;
        overflow-x: visible;
        padding-bottom: 0;
        scrollbar-width: none;
    }

    .topbar nav::-webkit-scrollbar {
        display: none;
    }

    .brand-logo {
        width: 38px;
        height: 38px;
    }

    .photo-upload-card {
        grid-template-columns: minmax(190px, 220px) 1fr;
        gap: 14px;
    }

    .photo-upload-area {
        aspect-ratio: 9 / 14;
        height: auto;
    }

    .profile-fields {
        gap: 12px;
    }

    .radio-group {
        grid-template-columns: 1fr;
    }

    .access-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .profile-status-stack {
        top: auto;
        right: 16px;
        bottom: 16px;
        left: 16px;
        width: auto;
    }

    .phone-field {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .phone-field .btn-edit-wa {
        grid-column: 1 / -1;
        width: 100%;
    }

    .btn-edit-wa__copy {
        text-align: center;
    }
}

@media (max-width: 600px) {
    /* Tighter inner sizes only — positioning stays centered (set in the
       640px rule above so we match the onboarding modal layout). */
    .country-picker-panel {
        width: min(560px, calc(100vw - 20px));
        max-width: calc(100vw - 20px);
        padding: 12px;
    }

    .country-picker-list {
        height: 44vh;
        max-height: 44vh;
    }

    .country-picker-option {
        padding: 8px 10px;
    }

    .country-picker-search {
        font-size: 1rem;
        padding: 12px;
    }

    .feed-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .reel-overlay {
        padding: 10px;
    }

    .reel-info {
        padding: 7px 10px;
    }

    .reel-bio-block {
        padding: 10px;
    }

    .reel-info h3 {
        font-size: 0.88rem;
    }

    .reel-info .meta {
        font-size: 0.74rem;
    }

    .btn-whatsapp {
        padding: 11px 10px;
        font-size: 0.84rem;
        border-radius: 11px;
    }

    .intent-badge {
        font-size: 0.74rem;
        padding: 5px 8px;
    }
}

@media (max-width: 420px) {
    .country-picker-panel {
        width: min(560px, calc(100vw - 16px));
        max-width: calc(100vw - 16px);
    }
}

@media (max-width: 640px) {
    .modal-backdrop--onboarding .country-picker-panel {
        width: min(560px, calc(100vw - 32px));
        max-width: calc(100vw - 32px);
        height: min(560px, calc(100vh - 32px));
        height: min(560px, calc(100dvh - 32px));
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
        left: 50%;
        right: auto;
        top: 50%;
        bottom: auto;
        transform: translate(-50%, -50%);
        border-radius: 16px;
        padding: 12px;
        animation: none;
    }
}

@media (max-width: 400px) {
    .feed-grid {
        grid-template-columns: 1fr;
    }

    .reel-card {
        aspect-ratio: 3 / 4;
    }
}

@media (max-width: 480px) {
    .photo-upload-card {
        grid-template-columns: 1fr;
    }

    .photo-upload-area {
        aspect-ratio: 3 / 4;
        height: auto;
        max-width: 280px;
        margin: 0 auto;
    }

    .profile-fields {
        gap: 12px;
    }
}

@keyframes feedSpin {
    100% {
        transform: rotate(360deg);
    }
}

/* === Nav wallet badge (global, identical on every page) === */
.nav-wallet {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}

.nav-wallet-badge {
    background: linear-gradient(135deg, #ffae0c, #ff7600);
    color: #fff;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .78rem;
    min-width: 24px;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 2px 6px rgba(255, 118, 0, .35);
}

/* ============================================================
   Wallet "insufficient coins" modal (global)
   ============================================================ */
.wallet-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(8, 2, 6, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: auto;
    overscroll-behavior: contain;
    animation: walletModalFade .18s ease-out;
}

.wallet-modal[hidden] {
    display: none !important;
}

@keyframes walletModalFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes walletModalPop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wallet-modal-card {
    position: relative;
    width: min(100%, 420px);
    background: linear-gradient(160deg, #1c0712 0%, #2a0a1c 100%);
    border: 1px solid rgba(255, 191, 213, 0.18);
    border-radius: 22px;
    padding: 32px 26px 26px;
    color: var(--text);
    text-align: center;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, .55),
        0 0 0 1px rgba(255, 79, 123, .08) inset,
        0 -40px 80px -40px rgba(255, 79, 123, .35) inset;
    animation: walletModalPop .22s cubic-bezier(.2, .9, .35, 1.1);
}

.wallet-modal-card::before {
    content: "🪙";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 50%;
    font-size: 36px;
    background: radial-gradient(circle at 30% 30%, #ffd17a, #ff9b1a 60%, #b25a00 100%);
    box-shadow:
        0 10px 24px rgba(255, 155, 26, .35),
        0 0 0 6px rgba(255, 155, 26, .08);
}

.wallet-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    font-size: 22px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}

.wallet-modal-close:hover {
    background: rgba(255, 255, 255, .14);
    transform: scale(1.05);
}

#wallet-modal-title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

#wallet-modal-msg {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, .78);
    font-size: .98rem;
    line-height: 1.45;
}

.wallet-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wallet-modal-actions .btn-primary,
.wallet-modal-actions .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 18px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
    border: none;
    cursor: pointer;
}

.wallet-modal-actions .btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #ffae0c, #ff6a00);
    box-shadow: 0 8px 22px rgba(255, 118, 0, .35);
}

.wallet-modal-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(255, 118, 0, .45);
}

.wallet-modal-actions .btn-ghost {
    color: var(--text);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
}

.wallet-modal-actions .btn-ghost:hover {
    background: rgba(255, 255, 255, .12);
}

/* ============================================================
   Generic app dialog
   ============================================================ */
.app-dialog {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(8, 2, 6, .72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: auto;
    overscroll-behavior: contain;
    animation: walletModalFade .18s ease-out;
}

.app-dialog__card {
    width: min(100%, 420px);
    padding: 26px;
    border-radius: 20px;
    background: linear-gradient(160deg, #1c0712 0%, #2a0a1c 100%);
    border: 1px solid rgba(255, 191, 213, .2);
    color: var(--text);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, .55),
        0 0 0 1px rgba(255, 79, 123, .08) inset;
    animation: walletModalPop .22s cubic-bezier(.2, .9, .35, 1.1);
}

.app-dialog--error .app-dialog__card {
    border-color: rgba(255, 109, 143, .42);
}

.app-dialog__title {
    margin: 0 0 8px;
    font-size: 1.22rem;
    line-height: 1.25;
}

.app-dialog__message {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, .78);
    line-height: 1.45;
    white-space: pre-line;
}

.app-dialog__actions {
    display: flex;
    justify-content: flex-end;
}

.app-dialog__actions .btn-primary,
.app-dialog__actions .btn-ghost {
    min-width: 112px;
    padding: 12px 18px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
}

@media (max-width: 480px) {
    .wallet-modal-card {
        padding: 28px 20px 22px;
        border-radius: 18px;
    }

    #wallet-modal-title {
        font-size: 1.2rem;
    }
}

/* ============================================================ */
/* Compact mobile topbar (<= 640px) — icon-only nav, single row */
/* ============================================================ */
@media (max-width: 640px) {
    .topbar {
        padding: 10px 12px;
        gap: 8px;
        min-height: 60px;
        flex-wrap: nowrap;
    }

    .topbar-left {
        gap: 8px;
        flex-shrink: 0;
        min-width: 0;
    }

    .brand {
        font-size: 1rem;
        gap: 6px;
    }

    .brand-logo {
        width: 32px;
        height: 32px;
    }

    .brand-text {
        display: none;
    }

    .lang-switcher {
        padding: 2px;
        gap: 0;
    }

    .lang-btn {
        width: 24px;
        height: 22px;
        font-size: 0.9rem;
    }

    .topbar nav {
        width: auto;
        flex-wrap: nowrap;
        gap: 2px;
        row-gap: 0;
        flex-shrink: 1;
        justify-content: flex-end;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .topbar nav::-webkit-scrollbar {
        display: none;
    }

    .topbar nav a {
        padding: 8px 9px;
        gap: 0;
        flex-shrink: 0;
    }

    /* Hide text labels (keep icons + svg + wallet badge) */
    .topbar nav a>svg {
        width: 18px;
        height: 18px;
    }

    /* Hide direct text nodes inside nav links */
    .topbar nav a {
        font-size: 0;
        line-height: 0;
    }

    .topbar nav a>svg,
    .topbar nav a>span {
        font-size: 0.78rem;
        line-height: 1;
    }

    /* Wallet keeps balance badge visible, hide its label */
    .topbar nav a.nav-wallet {
        gap: 4px;
        padding: 8px 8px;
    }

    .topbar nav a.nav-wallet>span:not(.nav-wallet-badge) {
        display: none;
    }

    .topbar nav a.nav-wallet .nav-wallet-badge {
        font-size: 0.72rem;
        padding: 2px 6px;
        line-height: 1;
    }
}

@media (max-width: 380px) {
    .topbar {
        padding: 8px 10px;
    }

    .brand {
        font-size: 0.9rem;
    }

    .brand-logo {
        width: 28px;
        height: 28px;
    }

    .topbar nav a {
        padding: 6px 7px;
    }

    .topbar nav a>svg {
        width: 16px;
        height: 16px;
    }
}

/* Keep the logged-in index navbar geometry stable while the feed hydrates. */
body.feed-index .topbar {
    height: var(--header-h);
    min-height: var(--header-h);
    max-height: var(--header-h);
    flex: 0 0 var(--header-h);
    flex-wrap: nowrap;
    overflow: hidden;
}

body.feed-index .topbar-left,
body.feed-index .brand,
body.feed-index .brand-logo {
    flex-shrink: 0;
}

body.feed-index .brand-logo {
    /* Only force display:block to keep vertical baseline stable during
       feed hydration. Size is NOT locked here — let the responsive rules
       (.brand-logo @media 900/640/380) apply so the logo on the feed page
       matches the size used on every other page at every viewport. */
    display: block;
}

@media (max-width: 640px) {
    body.feed-index .topbar {
        height: 60px;
        min-height: 60px;
        max-height: 60px;
        flex-basis: 60px;
    }

    body.feed-index .brand-logo {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 380px) {
    body.feed-index .brand-logo {
        width: 28px;
        height: 28px;
    }
}

/* ================================================================
   Tablet (iPad) layout fix
   At 641-900px (iPad portrait), the feed-page navbar should wrap to
   2 rows like every other page does. The feed-index height lock was
   forcing nowrap + overflow:hidden and clipping nav items.
   (Feed grid alignment is handled globally via auto-fit + 1fr in the
   default `.feed-grid` rule.)
   ================================================================ */
@media (min-width: 641px) and (max-width: 900px) {
    body.feed-index .topbar {
        height: auto;
        min-height: 76px;
        max-height: none;
        flex: 0 0 auto;
        flex-wrap: wrap;
        overflow: visible;
    }
}

/* ================================================================
   Global: kill the hover-jump (translateY) effect on every button.
   The user explicitly asked to remove this animation everywhere.
   We keep filter/brightness/box-shadow hover feedback intact.
   ================================================================ */
button:hover,
button:focus,
button:active,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-ghost:hover,
.btn-ghost:focus,
.btn-ghost:active,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
[role="button"]:hover,
[role="button"]:focus,
[role="button"]:active {
    transform: none !important;
}
