/* =====================================================================
   Ultima Solteirice — Ana Luiza & Denis Henrique
   Paleta cream/warm, tipografia serif classica.
   Mobile-first, sem framework.
   ===================================================================== */

/* Fix critico: atributo [hidden] deve vencer display: flex */
[hidden] { display: none !important; }

:root {
    /* Fundos */
    --bg:            #EAE4D6;   /* creme base */
    --bg-elev:       #F2EDE2;   /* creme claro (elevado) */
    --bg-elev-2:     #FDF9F0;   /* quase branco (cards) */

    /* Tipografia */
    --texto:         #2E2A1F;   /* marrom quase preto */
    --texto-suave:   #6B5F42;   /* marrom medio */
    --texto-mut:     #93835F;   /* marrom claro (accent) */

    /* Accent */
    --acento:        #93835F;   /* marrom quente principal */
    --acento-escuro: #7A6D4F;
    --acento-claro:  #B5A67F;

    /* Bordas e sombras */
    --borda:         #D4CBB2;
    --borda-suave:   #E1D9C3;
    --sombra:        0 8px 32px rgba(93, 78, 46, .12);
    --sombra-fab:    0 12px 24px rgba(147, 131, 95, .35);

    /* Estados */
    --verde:         #6B8E5A;
    --erro:          #A85E42;

    --raio:          14px;
    --raio-lg:       20px;

    --serif:         'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
    --sans:          -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    --safe-top:      env(safe-area-inset-top, 0px);
    --safe-bottom:   env(safe-area-inset-bottom, 0px);
}

/* ------------------------- Reset ------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

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

body {
    background: var(--bg);
    color: var(--texto);
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.5;
    min-height: 100dvh;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overscroll-behavior-y: contain;
}

.tela { min-height: 100dvh; }

/* =====================================================================
   TELA 1 — Boas-vindas (hero estilo iCasei)
   ===================================================================== */
#tela-boas-vindas {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    background: var(--bg);
}

/* --------- Hero com foto de capa --------- */
.hero-capa {
    position: relative;
    width: 100%;
    min-height: 55dvh;
    padding: 20px 20px 32px;
    padding-top: max(20px, calc(20px + var(--safe-top)));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #FDF9F0;

    /* Foto do casal + degrade escuro pra legibilidade do texto */
    background-color: #2E2A1F; /* fallback se a foto nao carregar */
    background-image:
        linear-gradient(
            to bottom,
            rgba(30, 26, 18, .15) 0%,
            rgba(30, 26, 18, .10) 45%,
            rgba(30, 26, 18, .55) 100%
        ),
        url('../img/capa.jpg');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
}
@media (min-width: 700px) {
    .hero-capa { min-height: 62dvh; background-position: center 25%; }
}

/* Monograma A + D no canto superior */
.hero-capa-monograma {
    position: absolute;
    top: calc(18px + var(--safe-top));
    left: 22px;
    font-family: var(--serif);
    font-weight: 400;
    font-size: 20px;
    letter-spacing: .04em;
    color: #FDF9F0;
    text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.hero-capa-monograma span {
    font-family: 'Pinyon Script', var(--serif);
    padding: 0 4px;
    font-size: 22px;
    opacity: .95;
}

/* Bloco central com nomes + data */
.hero-capa-conteudo {
    text-align: center;
    padding-bottom: 8px;
}

.hero-nomes-script {
    font-family: 'Pinyon Script', 'Cormorant Garamond', cursive, serif;
    font-weight: 400;
    color: #FDF9F0;
    margin: 0;
    line-height: 1.1;
    font-size: clamp(38px, 10vw, 56px);
    text-shadow: 0 3px 20px rgba(0,0,0,.35);
}

.hero-nomes-script .linha-nome {
    display: block;
}

.hero-e {
    display: block;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: rgba(253, 249, 240, .85);
    margin: 6px 0 4px;
    text-shadow: 0 1px 6px rgba(0,0,0,.3);
}

.hero-data {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 14px;
    letter-spacing: .4em;
    text-transform: uppercase;
    color: rgba(253, 249, 240, .95);
    margin: 18px 0 0;
    text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

/* --------- Formulario abaixo do hero --------- */
.hero-form-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 24px;
    padding-bottom: max(32px, calc(24px + var(--safe-bottom)));
}

/* Introducao com card sutil para realce */
.hero-intro {
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin: 0 0 32px;
    padding: 24px 22px 22px;
    background: var(--bg-elev-2);
    border: 1px solid var(--borda-suave);
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(93, 78, 46, .06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.hero-intro-diamante {
    width: 8px; height: 8px;
    background: var(--acento);
    transform: rotate(45deg);
}
.hero-intro-texto {
    font-family: var(--serif);
    font-size: 17.5px;
    line-height: 1.6;
    color: var(--texto);
    margin: 0;
    letter-spacing: .005em;
}
.hero-intro-texto em {
    font-style: italic;
    color: var(--acento);
    font-weight: 500;
}

.form-boas-vindas {
    width: 100%;
    max-width: 380px;
    display: flex; flex-direction: column; gap: 14px;
    text-align: left;
}
.form-boas-vindas label {
    font-family: var(--sans);
    color: var(--texto-mut);
    font-size: 11px;
    letter-spacing: .3em;
    text-transform: uppercase;
    padding-left: 2px;
}
.form-boas-vindas input {
    background: var(--bg-elev-2);
    border: 1px solid var(--borda-suave);
    border-radius: var(--raio);
    padding: 18px 20px;
    font-family: var(--serif);
    font-size: 18px;
    color: var(--texto);
    outline: none;
    transition: border-color .18s, background .18s;
    width: 100%;
}
.form-boas-vindas input::placeholder {
    color: var(--texto-mut);
    opacity: .6;
    font-style: italic;
}
.form-boas-vindas input:focus {
    border-color: var(--acento);
    background: #FFFDF7;
}

.btn-primario {
    margin-top: 8px;
    padding: 18px 24px;
    background: var(--acento);
    color: var(--bg-elev-2);
    font-family: var(--sans);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: .35em;
    text-transform: uppercase;
    border-radius: var(--raio);
    transition: transform .1s, background .18s, opacity .18s;
    box-shadow: 0 4px 14px rgba(147,131,95,.28);
}
.btn-primario:hover { background: var(--acento-escuro); }
.btn-primario:active { transform: scale(.98); }
.btn-primario:disabled { opacity: .5; cursor: not-allowed; }

.msg-erro {
    margin: 4px 0 0;
    color: var(--erro);
    font-family: var(--sans);
    font-size: 13px;
    padding-left: 4px;
}

/* =====================================================================
   TELA 2 — Feed
   ===================================================================== */
#tela-feed {
    padding-top: max(0px, var(--safe-top));
    padding-bottom: calc(120px + var(--safe-bottom));
}

/* Header */
.header-feed {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(234, 228, 214, .88);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    padding: 12px 16px 10px;
    padding-top: calc(12px + var(--safe-top));
    border-bottom: 1px solid var(--borda-suave);
}

.header-topo {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.ola {
    font-family: var(--serif);
    font-size: 15px;
    color: var(--texto-suave);
    max-width: 60%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ola strong { color: var(--texto); font-weight: 500; }
.btn-sair {
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--texto-mut);
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--bg-elev);
    border: 1px solid var(--borda-suave);
}
.btn-sair:hover { color: var(--texto); background: var(--bg-elev-2); }

/* Toggle de eventos */
.toggle-eventos {
    display: flex;
    background: var(--bg-elev);
    border: 1px solid var(--borda-suave);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}
.toggle-eventos button {
    flex: 1;
    padding: 11px 12px;
    border-radius: 8px;
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--texto-mut);
    transition: color .2s, background .2s, box-shadow .2s;
    white-space: nowrap;
}
.toggle-eventos button[aria-selected="true"] {
    background: var(--bg-elev-2);
    color: var(--acento-escuro);
    box-shadow: 0 2px 6px rgba(147,131,95,.15);
}

/* Pill "N novas fotos" */
.pill-novas {
    position: fixed;
    top: calc(128px + var(--safe-top));
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    z-index: 15;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: var(--acento);
    color: var(--bg-elev-2);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    border-radius: 999px;
    box-shadow: var(--sombra-fab);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
    pointer-events: none;
}
.pill-novas.visivel {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Banner fino do feed com foto do casal */
.feed-banner {
    position: relative;
    width: 100%;
    min-height: 120px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FDF9F0;
    text-align: center;
    overflow: hidden;

    background-color: #2E2A1F;
    background-image:
        linear-gradient(
            to bottom,
            rgba(30, 26, 18, .35) 0%,
            rgba(30, 26, 18, .50) 100%
        ),
        url('../img/capa.jpg');
    background-size: cover;
    background-position: center 32%;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--borda-suave);
}

.feed-banner-conteudo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.feed-banner-mono {
    font-family: var(--serif);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .5em;
    text-transform: uppercase;
    opacity: .85;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
    padding-left: .5em; /* compensa o tracking pra centralizar */
}

.feed-banner-nomes {
    font-family: 'Pinyon Script', 'Cormorant Garamond', cursive, serif;
    font-weight: 400;
    font-size: clamp(28px, 6vw, 34px);
    line-height: 1;
    margin: 2px 0 4px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .4);
}
.feed-banner-nomes em {
    font-style: italic;
    font-size: .8em;
    opacity: .95;
    padding: 0 3px;
}

.feed-banner-data {
    font-family: var(--serif);
    font-size: 11px;
    letter-spacing: .4em;
    text-transform: uppercase;
    opacity: .95;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
    padding-left: .4em;
}

/* Feed masonry via CSS columns */
.feed {
    column-count: 2;
    column-gap: 8px;
    padding: 8px;
}
@media (min-width: 640px) { .feed { column-count: 3; } }
@media (min-width: 900px) { .feed { column-count: 4; } }

.foto-card {
    break-inside: avoid;
    margin-bottom: 8px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: var(--bg-elev);
    border: 1px solid var(--borda-suave);
    cursor: pointer;
    animation: aparecer .4s ease both;
}

@keyframes aparecer {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.foto-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .35s ease;
}
.foto-card:active img { transform: scale(.97); }

.foto-card .autor {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 24px 12px 10px;
    color: #fff;
    font-family: var(--serif);
    font-style: italic;
    font-size: 13px;
    background: linear-gradient(to top, rgba(46,42,31,.85), transparent);
    pointer-events: none;
}

/* Badge NOVO */
.badge-novo {
    position: absolute;
    top: 8px; left: 8px;
    background: var(--bg-elev-2);
    color: var(--acento-escuro);
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .3em;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--borda);
    animation: pulsar 1.6s ease-in-out infinite alternate;
}
@keyframes pulsar {
    from { box-shadow: 0 2px 8px rgba(147,131,95,.25); }
    to   { box-shadow: 0 4px 14px rgba(147,131,95,.5); }
}

/* Estado do feed */
.feed-estado {
    text-align: center;
    padding: 32px 24px;
    color: var(--texto-suave);
    font-family: var(--serif);
    font-style: italic;
    font-size: 15px;
}

/* FAB */
.fab {
    position: fixed;
    right: 20px;
    bottom: calc(24px + var(--safe-bottom));
    width: 62px; height: 62px;
    display: flex; align-items: center; justify-content: center;
    background: var(--acento);
    color: var(--bg-elev-2);
    border-radius: 50%;
    box-shadow: var(--sombra-fab);
    cursor: pointer;
    z-index: 30;
    transition: transform .15s ease, background .2s;
    overflow: hidden;
}
.fab:hover { background: var(--acento-escuro); }
.fab:active { transform: scale(.92); }

.fab-icone { display: block; }
.fab-contador {
    display: none;
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 500;
    letter-spacing: .02em;
    line-height: 1;
    color: var(--acento);
}

/* Cooldown: mostra numero, esconde icone da camera */
.fab.cooldown {
    background: var(--bg-elev-2);
    border: 2px solid var(--acento);
    box-shadow: 0 4px 12px rgba(147,131,95,.18);
    pointer-events: none;
}
.fab.cooldown .fab-icone { display: none; }
.fab.cooldown .fab-contador { display: block; }

/* =====================================================================
   CAMERA EMBUTIDA
   Modal 100% viewport com video absoluto por baixo dos controles.
   ===================================================================== */
.camera-modal {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 9999 !important;
    background: #000;
    overflow: hidden;
    animation: fade .18s ease both;
}
.camera-video,
.camera-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}
.camera-video.espelhada {
    transform: scaleX(-1); /* espelha preview quando esta na camera frontal */
}
.camera-icone-topo {
    position: absolute;
    top: calc(16px + var(--safe-top));
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.5);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    color: #fff;
    z-index: 3;
    transition: background .18s, transform .1s;
}
.camera-icone-topo:hover  { background: rgba(0,0,0,.7); }
.camera-icone-topo:active { transform: scale(.94); }
.camera-fechar  { right: 16px; font-size: 26px; }

.camera-controles {
    position: absolute;
    left: 0; right: 0;
    bottom: calc(28px + var(--safe-bottom));
    display: flex; align-items: center; justify-content: center;
    gap: 40px;
    z-index: 3;
}

/* Botoes laterais (galeria e trocar camera) */
.camera-btn-secundario {
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.5);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    color: #fff;
    transition: background .18s, transform .1s;
}
.camera-btn-secundario:hover  { background: rgba(0,0,0,.7); }
.camera-btn-secundario:active { transform: scale(.92); }
.camera-btn-tirar {
    width: 74px; height: 74px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    border-radius: 50%;
    background: transparent;
    transition: transform .1s ease;
}
.camera-btn-tirar:active { transform: scale(.92); }
.camera-btn-tirar-anel {
    position: absolute; inset: 0;
    border: 3px solid rgba(255,255,255,.85);
    border-radius: 50%;
}
.camera-btn-tirar-nucleo {
    width: 58px; height: 58px;
    background: #FDF9F0;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
}

.camera-controles-review {
    gap: 20px;
    padding: 0 20px;
}
.camera-btn-review {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .28em;
    text-transform: uppercase;
    transition: background .18s, transform .1s;
}
.camera-btn-review:active { transform: scale(.97); }
.camera-btn-refazer {
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
}
.camera-btn-refazer:hover { background: rgba(255,255,255,.2); }
.camera-btn-enviar {
    background: var(--acento);
    color: #fff;
    box-shadow: var(--sombra-fab);
}
.camera-btn-enviar:hover { background: var(--acento-escuro); }

/* Overlay de upload */
.upload-overlay {
    position: fixed; inset: 0; z-index: 40;
    background: rgba(46,42,31,.35);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
}
.upload-box {
    background: var(--bg-elev-2);
    padding: 32px 44px;
    border-radius: var(--raio-lg);
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    box-shadow: var(--sombra);
}
.upload-box p {
    margin: 0;
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--texto-mut);
}
.spinner {
    width: 32px; height: 32px;
    border: 2px solid var(--borda-suave);
    border-top-color: var(--acento);
    border-radius: 50%;
    animation: girar 0.9s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* Toast */
.toast {
    position: fixed;
    left: 50%; bottom: calc(100px + var(--safe-bottom));
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-elev-2);
    color: var(--texto);
    padding: 14px 24px;
    border-radius: 999px;
    box-shadow: var(--sombra);
    border: 1px solid var(--borda-suave);
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: .1em;
    max-width: 90vw;
    z-index: 35;
    opacity: 0;
    transition: opacity .2s, transform .2s;
    pointer-events: none;
}
.toast.visivel { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.erro { color: var(--erro); border-color: var(--erro); }
.toast.sucesso { color: var(--verde); border-color: var(--verde); }

/* =====================================================================
   ONBOARDING (primeira entrada)
   ===================================================================== */
.onboarding {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh; height: 100dvh;
    z-index: 80;
    background: rgba(30, 26, 18, .55);
    backdrop-filter: blur(6px) saturate(140%);
    -webkit-backdrop-filter: blur(6px) saturate(140%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fade .25s ease both;
}

.onboarding-card {
    background: var(--bg-elev-2);
    border: 1px solid var(--borda-suave);
    border-radius: 20px;
    padding: 34px 26px 26px;
    box-shadow: var(--sombra);
    max-width: 380px;
    width: 100%;
    text-align: center;
    animation: subir .3s ease both;
}
@keyframes subir {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.onboarding-diamante {
    width: 8px; height: 8px;
    transform: rotate(45deg);
    background: var(--acento);
    margin: 0 auto 18px;
}

.onboarding-card h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 24px;
    letter-spacing: .08em;
    color: var(--texto);
    margin: 0 0 6px;
}

.onboarding-sub {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--texto-mut);
    margin: 0 0 26px;
}

.onboarding-lista {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.onboarding-lista li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.onboarding-icone {
    flex-shrink: 0;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-elev);
    border: 1px solid var(--borda-suave);
    border-radius: 12px;
    color: var(--acento);
}

.onboarding-lista li div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-top: 3px;
}
.onboarding-lista li b {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 16px;
    color: var(--texto);
    letter-spacing: .01em;
}
.onboarding-lista li span {
    font-family: var(--serif);
    font-size: 14px;
    color: var(--texto-suave);
    line-height: 1.4;
}

/* =====================================================================
   LIGHTBOX
   ===================================================================== */
.lightbox {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(30, 26, 18, .96);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: fade .18s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox-fechar {
    position: absolute;
    top: calc(16px + var(--safe-top)); right: 16px;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(242, 237, 226, .1);
    border: 1px solid rgba(242, 237, 226, .2);
    border-radius: 50%;
    font-family: var(--serif);
    font-size: 26px;
    color: var(--bg-elev-2);
    z-index: 2;
}
.lightbox-conteudo {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    max-width: 100%; max-height: 100%;
}
.lightbox img {
    max-width: 100%;
    max-height: 78dvh;
    border-radius: 8px;
    object-fit: contain;
    touch-action: pan-y;
}
.lightbox-legenda {
    display: flex; gap: 16px;
    color: var(--bg-elev);
    font-family: var(--serif);
    font-style: italic;
    font-size: 14px;
}
.lightbox-legenda span:first-child {
    color: var(--bg-elev-2);
    font-style: normal;
    letter-spacing: .05em;
}
.lightbox-baixar {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 2px;
    padding: 11px 20px;
    background: rgba(242, 237, 226, .1);
    border: 1px solid rgba(242, 237, 226, .3);
    border-radius: 999px;
    color: var(--bg-elev-2);
    font-family: var(--serif);
    font-size: 15px;
    letter-spacing: .04em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease, opacity .15s ease;
}
.lightbox-baixar:hover { background: rgba(242, 237, 226, .18); }
.lightbox-baixar:disabled { opacity: .55; cursor: default; }

/* =====================================================================
   DICA DE DOWNLOAD (balao dispensavel no topo do feed)
   ===================================================================== */
.feed-dica {
    display: flex; align-items: center; gap: 10px;
    margin: 12px 14px 4px;
    padding: 11px 12px 11px 14px;
    background: var(--bg-elev-2);
    border: 1px solid rgba(30, 26, 18, .12);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(30, 26, 18, .06);
    animation: fade .25s ease both;
}
.feed-dica-icone {
    display: flex; flex: 0 0 auto;
    color: var(--acento);
}
.feed-dica-texto {
    flex: 1 1 auto;
    font-family: var(--serif);
    font-size: 14px;
    line-height: 1.35;
    color: var(--texto);
}
.feed-dica-texto strong { font-weight: 600; }
.feed-dica-fechar {
    flex: 0 0 auto;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    border: none;
    font-family: var(--serif);
    font-size: 22px;
    line-height: 1;
    color: inherit;
    opacity: .5;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.feed-dica-fechar:hover { opacity: .8; }

/* =====================================================================
   REACOES (curtidas), LEGENDA e CONTADOR
   ===================================================================== */
.foto-card .autor {
    display: flex; flex-direction: column; gap: 2px;
    padding-right: 64px;   /* espaco pro botao de curtir */
}
.autor-nome { font-style: italic; }
.foto-legenda {
    font-style: normal;
    font-size: 12px;
    line-height: 1.3;
    opacity: .95;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.foto-curtir {
    position: absolute;
    bottom: 8px; right: 8px;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 10px;
    background: rgba(46,42,31,.5);
    color: #fff;
    border: none; border-radius: 999px;
    font-family: var(--serif); font-size: 13px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(2px);
    z-index: 2;
    transition: transform .12s ease, background .15s ease;
}
.foto-curtir svg { fill: none; stroke: currentColor; stroke-width: 2px; }
.foto-curtir:active { transform: scale(.86); }
.foto-curtir.curtido { color: #ff5a7a; }
.foto-curtir.curtido svg { fill: #ff5a7a; stroke: #ff5a7a; }
.curtir-num:empty { display: none; }

.feed-contador {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 6px 10px;
    margin: 10px 14px 2px;
    color: var(--texto-mut);
    font-family: var(--serif);
    font-size: 14px; letter-spacing: .02em;
}
.feed-contador-item { display: inline-flex; align-items: center; gap: 6px; }
.feed-contador-sep { color: var(--texto-mut); opacity: .6; }
.feed-contador b { color: var(--texto); font-weight: 600; }

.lightbox-recado {
    max-width: 640px;
    text-align: center;
    color: var(--bg-elev-2);
    font-family: var(--serif);
    font-style: italic;
    font-size: 16px; line-height: 1.4;
    padding: 0 8px;
}

.camera-legenda {
    position: absolute;
    left: 50%; transform: translateX(-50%);
    bottom: calc(100px + var(--safe-bottom));
    width: min(86%, 420px);
    padding: 12px 16px;
    border: 1px solid rgba(242,237,226,.35);
    border-radius: 999px;
    background: rgba(30,26,18,.55);
    color: #fff;
    font-family: var(--serif); font-size: 16px;
    text-align: center;
    backdrop-filter: blur(4px);
    z-index: 3;
}
.camera-legenda::placeholder { color: rgba(242,237,226,.7); }
.camera-legenda:focus { outline: none; border-color: rgba(242,237,226,.7); }

/* =====================================================================
   RESPONSIVIDADE — telas pequenas (iPhone SE, 375x667 e similares)
   ===================================================================== */
@media (max-height: 700px), (max-width: 380px) {
    /* --- Tela de boas-vindas --- */
    .hero-capa {
        min-height: 42dvh;
        padding: 16px 16px 20px;
    }
    .hero-capa-monograma {
        font-size: 17px;
        top: calc(14px + var(--safe-top));
        left: 18px;
    }
    .hero-nomes-script {
        font-size: clamp(30px, 8vw, 42px);
    }
    .hero-e {
        font-size: 11px;
        margin: 3px 0 2px;
    }
    .hero-data {
        font-size: 12px;
        margin-top: 12px;
        letter-spacing: .35em;
    }

    .hero-form-wrap {
        padding: 22px 20px;
        padding-bottom: max(20px, calc(20px + var(--safe-bottom)));
    }
    .hero-intro {
        padding: 18px 18px 16px;
        margin: 0 0 22px;
        gap: 10px;
        border-radius: 14px;
    }
    .hero-intro-diamante {
        width: 7px; height: 7px;
    }
    .hero-intro-texto {
        font-size: 15.5px;
        line-height: 1.5;
    }

    .form-boas-vindas {
        gap: 10px;
    }
    .form-boas-vindas input {
        padding: 14px 16px;
        font-size: 16px;
    }
    .btn-primario {
        padding: 14px 20px;
        font-size: 11.5px;
    }

    /* --- Banner do feed --- */
    .feed-banner {
        min-height: 96px;
        padding: 14px 20px;
    }
    .feed-banner-nomes {
        font-size: clamp(24px, 7vw, 30px);
    }
    .feed-banner-mono {
        font-size: 9px;
    }
    .feed-banner-data {
        font-size: 10px;
    }

    /* --- Onboarding --- */
    .onboarding {
        padding: 14px;
    }
    .onboarding-card {
        padding: 26px 20px 20px;
        border-radius: 16px;
    }
    .onboarding-card h2 {
        font-size: 22px;
    }
    .onboarding-sub {
        margin-bottom: 22px;
    }
    .onboarding-lista {
        gap: 14px;
        margin-bottom: 22px;
    }
    .onboarding-icone {
        width: 38px; height: 38px;
    }
    .onboarding-icone svg {
        width: 20px; height: 20px;
    }
    .onboarding-lista li b {
        font-size: 15px;
    }
    .onboarding-lista li span {
        font-size: 13.5px;
        line-height: 1.35;
    }
}

/* --- Ajuste extra para telas MUITO curtas (iPhone SE em landscape, etc) --- */
@media (max-height: 620px) {
    .hero-capa {
        min-height: 36dvh;
    }
    .hero-nomes-script {
        font-size: clamp(26px, 8vw, 36px);
    }
    .hero-data {
        margin-top: 8px;
    }
    .hero-intro {
        margin: 0 0 16px;
    }
    .hero-intro-texto {
        font-size: 14.5px;
    }
}
