:root {
    --papel: #fffaf1;
    --papel-2: #f7ead8;
    --marrom: #593b31;
    --marrom-claro: #806054;
    --vinho: #743f45;
    --dourado: #b88a4a;
    --sombra: rgba(64, 40, 27, .18);
    --bloqueado: #d7c8b9;
    --fundo: #ead8c4;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--marrom);

    background:
        radial-gradient(
            circle at 20% 10%,
            rgba(255,255,255,.75),
            transparent 30%
        ),
        radial-gradient(
            circle at 80% 90%,
            rgba(180,130,85,.18),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #f5e8d8,
            #e4cdb5 48%,
            #d6b99c
        );
}

/* -------------------------------------------------
   TOPO
------------------------------------------------- */

.topo {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.marca {
    display: flex;
    align-items: center;
    gap: 13px;
}

.marca-selo {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        radial-gradient(circle at 35% 30%, #d5a36a, #8b593d);

    color: #fff8ec;
    font-size: 21px;

    box-shadow:
        0 5px 12px rgba(60,35,20,.22),
        inset 0 1px 2px rgba(255,255,255,.45);
}

.marca-texto strong {
    display: block;
    font-size: 19px;
}

.marca-texto span {
    display: block;
    margin-top: 2px;

    font-family: Arial, sans-serif;
    font-size: 12px;
    color: var(--marrom-claro);
}

.usuario-area {
    display: flex;
    align-items: center;
    gap: 12px;

    font-family: Arial, sans-serif;
    font-size: 13px;
}

.usuario {
    padding: 9px 13px;

    background: rgba(255,250,241,.72);
    border: 1px solid rgba(117,83,62,.18);
    border-radius: 999px;
}

.usuario strong {
    font-weight: 700;
}

.sair {
    color: var(--vinho);
    text-decoration: none;
    font-weight: bold;
}

/* -------------------------------------------------
   PAINEL PRINCIPAL
------------------------------------------------- */

.pagina {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 60px;
}

.hero {
    position: relative;

    padding: 42px 35px 38px;
    overflow: hidden;

    border: 1px solid rgba(117,83,62,.20);
    border-radius: 28px;

    background:
        linear-gradient(
            135deg,
            rgba(255,252,246,.97),
            rgba(248,233,215,.96)
        );

    box-shadow:
        0 22px 55px var(--sombra),
        inset 0 1px 0 rgba(255,255,255,.9);

    text-align: center;
}

.hero::before {
    content: "";
    position: absolute;

    width: 230px;
    height: 230px;

    top: -120px;
    left: -80px;

    border-radius: 50%;

    background: rgba(184,138,74,.08);
}

.hero::after {
    content: "♥";
    position: absolute;

    right: 30px;
    top: 20px;

    color: rgba(116,63,69,.13);
    font-size: 85px;
    transform: rotate(12deg);
}

.hero .mini {
    position: relative;
    z-index: 1;

    margin-bottom: 9px;

    color: var(--vinho);

    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero h1 {
    position: relative;
    z-index: 1;

    margin: 0;

    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.05;
    font-weight: normal;
}

.hero p {
    position: relative;
    z-index: 1;

    max-width: 650px;
    margin: 17px auto 0;

    color: var(--marrom-claro);

    font-size: 17px;
    line-height: 1.65;
}

/* -------------------------------------------------
   STATUS
------------------------------------------------- */

.resumo {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

    margin: 23px 0;
}

.status {
    display: flex;
    align-items: center;
    gap: 7px;

    padding: 8px 13px;

    border-radius: 999px;

    background: rgba(255,250,241,.72);
    border: 1px solid rgba(117,83,62,.15);

    font-family: Arial, sans-serif;
    font-size: 12px;
}

.status i {
    width: 9px;
    height: 9px;

    display: block;

    border-radius: 50%;
    background: var(--bloqueado);
}

.status.aberto i {
    background: var(--dourado);
}

.status.lido i {
    background: #8b6558;
}

.status.resposta i {
    background: #743f45;
}

/* -------------------------------------------------
   CALENDARIO
------------------------------------------------- */

.calendario-container {
    margin-top: 25px;

    padding: 30px;

    border-radius: 28px;

    background:
        linear-gradient(
            145deg,
            rgba(255,251,244,.94),
            rgba(242,224,204,.95)
        );

    border: 1px solid rgba(117,83,62,.18);

    box-shadow:
        0 18px 45px var(--sombra),
        inset 0 1px 0 rgba(255,255,255,.8);
}

.calendario-titulo {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 25px;
}

.calendario-titulo h2 {
    margin: 0;
    font-size: 27px;
    font-weight: normal;
}

.calendario-titulo span {
    color: var(--marrom-claro);

    font-family: Arial, sans-serif;
    font-size: 12px;
}

.grade {
    display: grid;

    grid-template-columns:
        repeat(7, minmax(0, 1fr));

    gap: 13px;
}

/* -------------------------------------------------
   DIA
------------------------------------------------- */

.dia {
    position: relative;

    min-height: 142px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 16px 10px;

    border-radius: 17px;

    border: 1px solid rgba(112,76,57,.17);

    background:
        linear-gradient(
            145deg,
            #fffaf2,
            #f3dfc7
        );

    box-shadow:
        0 8px 16px rgba(70,45,30,.10),
        inset 0 1px 0 rgba(255,255,255,.9);

    transition:
        transform .22s ease,
        box-shadow .22s ease;
}

.dia::after {
    content: "";

    position: absolute;

    width: 50px;
    height: 2px;

    bottom: 14px;

    background: rgba(112,76,57,.12);
}

.dia:hover {
    transform: translateY(-4px);

    box-shadow:
        0 13px 24px rgba(70,45,30,.17),
        inset 0 1px 0 rgba(255,255,255,.9);
}

.numero {
    position: absolute;

    top: 10px;
    left: 12px;

    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;

    color: var(--marrom-claro);
}

.icone-dia {
    font-size: 31px;
    margin-bottom: 8px;
}

.nome-dia {
    font-size: 16px;
    font-weight: bold;
}

.estado {
    margin-top: 5px;

    font-family: Arial, sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .6px;

    color: var(--marrom-claro);
}

/* Bloqueado */

.dia.bloqueado {
    background:
        linear-gradient(
            145deg,
            #ddd2c7,
            #cfc0b2
        );

    opacity: .72;
}

.dia.bloqueado .icone-dia {
    filter: grayscale(1);
    opacity: .7;
}

.dia.bloqueado:hover {
    transform: none;
}

/* Desbloqueado */

.dia.desbloqueado {
    cursor: pointer;

    border-color: rgba(184,138,74,.45);

    background:
        linear-gradient(
            145deg,
            #fffaf0,
            #f5dfbc
        );
}

.dia.desbloqueado .icone-dia {
    filter: none;
}

/* Lido */

.dia.lido {
    border-color: rgba(139,101,88,.4);
}

/* Respondido */

.dia.respondido {
    border-color: rgba(116,63,69,.42);

    background:
        linear-gradient(
            145deg,
            #fff6f2,
            #efd8d2
        );
}

/* Completo */

.dia.completo {
    border-color: rgba(184,138,74,.55);

    background:
        linear-gradient(
            145deg,
            #fff9e9,
            #ead2a4
        );
}

.dia.completo .estado {
    color: #795522;
    font-weight: bold;
}

/* -------------------------------------------------
   RODAPE
------------------------------------------------- */

.rodape {
    margin-top: 25px;

    text-align: center;

    color: rgba(89,59,49,.65);

    font-family: Arial, sans-serif;
    font-size: 11px;
}

@media (max-width: 850px) {

    .grade {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .dia {
        min-height: 130px;
    }
}

@media (max-width: 600px) {

    .topo {
        margin-top: 15px;

        align-items: flex-start;
    }

    .usuario-area {
        gap: 7px;
        flex-direction: column;
        align-items: flex-end;
    }

    .marca-texto span {
        display: none;
    }

    .pagina {
        width: min(100% - 18px, 1180px);
        margin-top: 16px;
    }

    .hero {
        padding: 32px 20px;
        border-radius: 22px;
    }

    .hero p {
        font-size: 15px;
    }

    .calendario-container {
        padding: 17px 12px;
        border-radius: 22px;
    }

    .calendario-titulo {
        display: block;
    }

    .calendario-titulo h2 {
        font-size: 23px;
    }

    .calendario-titulo span {
        display: block;
        margin-top: 5px;
    }

    .grade {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 8px;
    }

    .dia {
        min-height: 112px;
        padding: 12px 5px;
        border-radius: 14px;
    }

    .numero {
        top: 7px;
        left: 8px;
    }

    .icone-dia {
        font-size: 25px;
    }

    .nome-dia {
        font-size: 13px;
    }

    .estado {
        font-size: 8px;
    }
}

@media (max-width: 380px) {

    .grade {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

/*
 * Formulário usado nos dias que o Ellyan pode desbloquear.
 * O botão mantém exatamente a aparência de um envelope.
 */

.form-dia {
    margin: 0;
    padding: 0;
    border: 0;
}

.form-dia .dia {
    width: 100%;
    height: 100%;
    min-height: 142px;

    font-family: Georgia, "Times New Roman", serif;
    color: var(--marrom);

    cursor: pointer;
}

.form-dia .dia:hover {
    transform: translateY(-5px);
}

.form-dia .dia:active {
    transform: translateY(-1px) scale(.98);
}

.form-dia button {
    appearance: none;
    -webkit-appearance: none;
}

@media (max-width: 850px) {

    .form-dia .dia {
        min-height: 130px;
    }
}

@media (max-width: 600px) {

    .form-dia .dia {
        min-height: 112px;
    }
}


.dia-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.dia-link .dia {
    height: 100%;
}

.dia-link:hover {
    color: inherit;
}

.dia-link:focus-visible {
    outline: 3px solid rgba(126, 79, 62, .35);
    outline-offset: 4px;
    border-radius: 18px;
}


/* =========================================================
   EDITOR DE CARTAS — NOSSO OUTUBRO JUNTOS
   ========================================================= */

.editor-pagina {
    width: min(100% - 32px, 980px);
    margin: 42px auto 80px;
}

.editor-cabecalho {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 26px;
}

.selo-editor {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #fff8fb 0%, #f8d9e3 48%, #d99aaa 100%);
    box-shadow:
        0 8px 20px rgba(91, 43, 58, .16),
        inset 0 2px 5px rgba(255,255,255,.8);
    font-size: 30px;
    transform: rotate(-5deg);
}

.editor-cabecalho h1 {
    margin: 2px 0 4px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1;
    color: #542c3a;
}

.editor-cabecalho p:not(.eyebrow) {
    margin: 0;
    color: #8a6872;
    font-size: .95rem;
}

.eyebrow {
    margin: 0 0 6px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .18em;
    color: #a66b7d;
}

/* mensagens */

.mensagem-sucesso,
.mensagem-erro {
    border-radius: 16px;
    padding: 15px 18px;
    margin: 0 0 22px;
    box-shadow: 0 5px 18px rgba(80,40,50,.08);
}

.mensagem-sucesso {
    background: #fff4f7;
    border: 1px solid #efcbd5;
    color: #70404e;
}

.mensagem-erro {
    background: #fff3f1;
    border: 1px solid #efc1b9;
    color: #8a4037;
}

/* corpo geral da carta */

.carta-editor {
    position: relative;
}

/*
 * A sombra cria a sensação de que o papel está
 * sobre a mesa, separado do fundo.
 */
.papel-editor {
    position: relative;
    overflow: hidden;
    min-height: 570px;
    padding: 58px clamp(25px, 6vw, 75px) 65px;
    border-radius: 4px;
    background:
        linear-gradient(
            90deg,
            rgba(119,76,48,.045) 1px,
            transparent 1px
        ),
        linear-gradient(
            #fffdf8,
            #fffaf0
        );
    background-size: 28px 28px, auto;
    border: 1px solid #eadcc8;
    box-shadow:
        0 25px 55px rgba(65,42,32,.16),
        0 5px 12px rgba(65,42,32,.08);
    transform: rotate(-.25deg);
}

/* pequenas imperfeições decorativas do papel */

.papel-editor::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(171,127,89,.18);
    pointer-events: none;
}

.papel-editor::after {
    content: "♡";
    position: absolute;
    right: 30px;
    top: 20px;
    color: rgba(169,94,116,.18);
    font-family: Georgia, serif;
    font-size: 38px;
    pointer-events: none;
}

.papel-linha {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.3rem;
    color: #67424a;
}

.papel-editor textarea {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    min-height: 350px;
    resize: vertical;
    padding: 4px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #49363b;
    font-family:
        "Segoe Print",
        "Bradley Hand",
        "Comic Sans MS",
        cursive;
    font-size: clamp(1rem, 2vw, 1.12rem);
    line-height: 2;
}

.papel-editor textarea::placeholder {
    color: #b6a1a3;
    opacity: .9;
}

.assinatura-editor {
    position: relative;
    z-index: 1;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed rgba(155,111,83,.3);
    font-family: Georgia, "Times New Roman", serif;
    color: #77545d;
    line-height: 1.5;
}

.assinatura-editor strong {
    font-size: 1.15rem;
    color: #5c3441;
}

/* área de fotos */

.fotos-editor {
    position: relative;
    margin-top: 30px;
    padding: 30px;
    border-radius: 22px;
    background:
        linear-gradient(145deg, #fffaf8, #fdf3f5);
    border: 1px solid #eed9df;
    box-shadow: 0 15px 35px rgba(91,43,58,.08);
}

.fotos-editor h2 {
    margin: 0 0 6px;
    font-family: Georgia, "Times New Roman", serif;
    color: #59333f;
    font-size: 1.65rem;
}

.texto-ajuda {
    margin: 0 0 20px;
    color: #8d727a;
    font-size: .9rem;
}

.upload-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 175px;
    padding: 25px;
    border: 2px dashed #dcaeba;
    border-radius: 20px;
    background: rgba(255,255,255,.65);
    color: #774452;
    text-align: center;
    cursor: pointer;
    transition:
        transform .2s ease,
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}

.upload-area:hover {
    transform: translateY(-2px);
    border-color: #bd7e91;
    background: #fff8fa;
    box-shadow: 0 10px 25px rgba(91,43,58,.09);
}

.upload-area > span:not(.upload-icone) {
    font-weight: 700;
}

.upload-area small {
    color: #a1848b;
    font-size: .78rem;
}

.upload-icone {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: #f7dce4;
    font-size: 25px;
}

.upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* fotos já existentes */

.fotos-existentes {
    margin-top: 28px;
}

.fotos-existentes h3 {
    margin: 0 0 15px;
    font-family: Georgia, "Times New Roman", serif;
    color: #67404b;
}

.grade-fotos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.foto-existente {
    position: relative;
    margin: 0;
    padding: 8px 8px 14px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(50,30,30,.13);
    transform: rotate(-1deg);
    transition: transform .2s ease, box-shadow .2s ease;
}

.foto-existente:nth-child(even) {
    transform: rotate(1.5deg);
}

.foto-existente:hover {
    z-index: 2;
    transform: translateY(-4px) rotate(0);
    box-shadow: 0 15px 30px rgba(50,30,30,.18);
}

.foto-existente img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.foto-existente figcaption {
    overflow: hidden;
    margin-top: 9px;
    color: #765b61;
    font-family: Georgia, "Times New Roman", serif;
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ações */

.editor-acoes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 28px;
    padding: 0 4px;
}

.botao-principal,
.botao-secundario {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 14px;
    text-decoration: none;
    font-family: inherit;
    font-weight: 700;
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.botao-principal {
    border: 0;
    background: linear-gradient(135deg, #9d526b, #bd7187);
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(135,67,87,.24);
}

.botao-principal:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(135,67,87,.3);
}

.botao-secundario {
    border: 1px solid #e3cbd1;
    background: rgba(255,255,255,.72);
    color: #714754;
    box-shadow: 0 5px 14px rgba(70,35,45,.06);
}

.botao-secundario:hover {
    transform: translateY(-1px);
    background: #fff;
}

/* responsivo */

@media (max-width: 720px) {

    .editor-pagina {
        width: min(100% - 20px, 980px);
        margin-top: 25px;
        margin-bottom: 45px;
    }

    .editor-cabecalho {
        gap: 14px;
    }

    .selo-editor {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
        font-size: 24px;
    }

    .editor-cabecalho h1 {
        font-size: 2rem;
    }

    .papel-editor {
        min-height: 500px;
        padding: 45px 24px 50px;
    }

    .papel-editor textarea {
        min-height: 300px;
        line-height: 1.8;
    }

    .fotos-editor {
        padding: 22px 17px;
        border-radius: 18px;
    }

    .grade-fotos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .editor-acoes {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .editor-acoes .botao-principal,
    .editor-acoes .botao-secundario {
        width: 100%;
    }
}

@media (max-width: 420px) {

    .editor-cabecalho {
        align-items: flex-start;
    }

    .papel-editor {
        padding-left: 19px;
        padding-right: 19px;
    }

    .papel-editor textarea {
        font-size: 1rem;
    }

    .grade-fotos {
        gap: 10px;
    }
}


/* =========================================================
   PRÉVIA DAS FOTOS SELECIONADAS
   ========================================================= */

.preview-fotos {
    margin-top: 24px;
    padding: 22px;
    border-radius: 18px;
    background: rgba(255,255,255,.78);
    border: 1px solid #ead5db;
    box-shadow: 0 8px 22px rgba(70,35,45,.07);
}

.preview-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 17px;
}

.preview-cabecalho h3 {
    margin: 0;
    color: #613a46;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
}

#preview-contador {
    padding: 7px 12px;
    border-radius: 999px;
    background: #f7e2e8;
    color: #754755;
    font-size: .78rem;
    font-weight: 700;
}

.grade-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.foto-preview {
    position: relative;
    margin: 0;
    padding: 7px 7px 12px;
    background: #fff;
    box-shadow: 0 7px 17px rgba(50,30,30,.12);
    transform: rotate(-1deg);
    animation: fotoEntrando .25s ease both;
}

.foto-preview:nth-child(even) {
    transform: rotate(1deg);
}

.foto-preview img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.foto-preview figcaption {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 8px;
    color: #72565d;
    font-family: Georgia, "Times New Roman", serif;
    font-size: .68rem;
}

.foto-preview figcaption span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.foto-preview figcaption small {
    color: #aa8e95;
    font-family: inherit;
}

@keyframes fotoEntrando {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.97) rotate(-2deg);
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 720px) {
    .grade-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .preview-fotos {
        padding: 17px;
    }
}

@media (max-width: 390px) {
    .grade-preview {
        gap: 9px;
    }

    .foto-preview {
        padding: 5px 5px 9px;
    }
}


/* =========================================================
   PREVIEW DE FOTOS — VERSAO CORRIGIDA
   ========================================================= */

.preview-fotos {
    margin-top: 24px;
    padding: 22px;
    border-radius: 18px;
    background: #fffafc;
    border: 1px solid #ead5db;
    box-shadow: 0 8px 22px rgba(70,35,45,.07);
}

.preview-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.preview-cabecalho h3 {
    margin: 0;
    color: #613a46;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
}

#preview-contador {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f7e2e8;
    color: #754755;
    font-size: .78rem;
    font-weight: 700;
}

.grade-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.foto-preview {
    margin: 0;
    padding: 8px 8px 12px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 7px 18px rgba(50,30,30,.13);
    overflow: hidden;
}

.foto-preview:nth-child(even) {
    transform: rotate(1deg);
}

.foto-preview:nth-child(odd) {
    transform: rotate(-1deg);
}

.foto-preview img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 1px;
    background: #f3e9ec;
}

.foto-preview figcaption {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 8px;
    color: #72565d;
    font-family: Georgia, "Times New Roman", serif;
    font-size: .68rem;
}

.foto-preview figcaption span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.foto-preview figcaption small {
    color: #aa8e95;
}

@media (max-width: 720px) {
    .grade-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}


/* ==========================================================
   FOTOS — câmera, galeria e pré-visualização
   ========================================================== */

.acoes-fotos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.botao-camera,
.botao-galeria {
    position: relative;
    min-height: 120px;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(120, 78, 52, .16);
    background: rgba(255,255,255,.72);
    box-shadow: 0 8px 22px rgba(72, 42, 25, .08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.botao-camera:hover,
.botao-galeria:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(72, 42, 25, .13);
}

.botao-camera > span,
.botao-galeria > span {
    font-size: 30px;
}

.botao-camera strong,
.botao-galeria strong {
    font-size: 16px;
}

.botao-camera small,
.botao-galeria small {
    opacity: .65;
}

.botao-camera input,
.botao-galeria input {
    display: none;
}

.contador-carta {
    text-align: right;
    margin-top: 8px;
    font-size: 13px;
    color: #806d60;
    transition: color .2s ease;
}

.contador-carta.contador-quase {
    color: #b36b39;
}

.contador-carta.contador-limite {
    color: #a43f3f;
    font-weight: 700;
}

.preview-fotos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.foto-preview-item {
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(120, 78, 52, .13);
    box-shadow: 0 7px 20px rgba(72, 42, 25, .09);
}

.foto-preview-imagem {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eee;
}

.foto-preview-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.foto-preview-info {
    padding: 9px;
}

.foto-preview-info > span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
    margin-bottom: 7px;
}

.botao-remover-preview,
.botao-apagar-foto {
    border: 0;
    border-radius: 9px;
    padding: 7px 9px;
    cursor: pointer;
    background: #f4e3df;
    color: #7f3f3f;
    font-size: 12px;
}

.botao-remover-preview:hover,
.botao-apagar-foto:hover {
    background: #ead0cb;
}

.botao-apagar-foto:disabled {
    opacity: .55;
    cursor: wait;
}

.foto-existente {
    position: relative;
}

.foto-existente-imagem {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.foto-existente-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.foto-existente figcaption {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px;
}

.foto-existente figcaption > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

@media (max-width: 800px) {

    .preview-fotos {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 560px) {

    .acoes-fotos {
        grid-template-columns: 1fr;
    }

    .preview-fotos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .botao-camera,
    .botao-galeria {
        min-height: 100px;
    }

}

/* ==========================================================
   FOTOS — câmera, galeria e pré-visualização
   ========================================================== */

.acoes-fotos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.botao-camera,
.botao-galeria {
    position: relative;
    min-height: 120px;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(120, 78, 52, .16);
    background: rgba(255,255,255,.72);
    box-shadow: 0 8px 22px rgba(72, 42, 25, .08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.botao-camera:hover,
.botao-galeria:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(72, 42, 25, .13);
}

.botao-camera > span,
.botao-galeria > span {
    font-size: 30px;
}

.botao-camera strong,
.botao-galeria strong {
    font-size: 16px;
}

.botao-camera small,
.botao-galeria small {
    opacity: .65;
}

.botao-camera input,
.botao-galeria input {
    display: none;
}

.contador-carta {
    text-align: right;
    margin-top: 8px;
    font-size: 13px;
    color: #806d60;
    transition: color .2s ease;
}

.contador-carta.contador-quase {
    color: #b36b39;
}

.contador-carta.contador-limite {
    color: #a43f3f;
    font-weight: 700;
}

.preview-fotos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.foto-preview-item {
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(120, 78, 52, .13);
    box-shadow: 0 7px 20px rgba(72, 42, 25, .09);
}

.foto-preview-imagem {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eee;
}

.foto-preview-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.foto-preview-info {
    padding: 9px;
}

.foto-preview-info > span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
    margin-bottom: 7px;
}

.botao-remover-preview,
.botao-apagar-foto {
    border: 0;
    border-radius: 9px;
    padding: 7px 9px;
    cursor: pointer;
    background: #f4e3df;
    color: #7f3f3f;
    font-size: 12px;
}

.botao-remover-preview:hover,
.botao-apagar-foto:hover {
    background: #ead0cb;
}

.botao-apagar-foto:disabled {
    opacity: .55;
    cursor: wait;
}

.foto-existente {
    position: relative;
}

.foto-existente-imagem {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.foto-existente-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.foto-existente figcaption {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px;
}

.foto-existente figcaption > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

@media (max-width: 800px) {

    .preview-fotos {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 560px) {

    .acoes-fotos {
        grid-template-columns: 1fr;
    }

    .preview-fotos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .botao-camera,
    .botao-galeria {
        min-height: 100px;
    }

}

/* ==========================================================
   NOSSO OUTUBRO — PÁGINA DO DIA
   ========================================================== */

.dia-app {
    min-height: 100vh;
}

.dia-topbar {
    width: min(1100px, calc(100% - 30px));
    margin: 0 auto;
    padding: 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dia-marca {
    color: inherit;
    text-decoration: none;
    font-family: Georgia, serif;
    font-size: 18px;
}

.dia-marca span {
    margin-right: 6px;
}

.dia-menu {
    display: flex;
    gap: 10px;
}

.dia-link {
    color: inherit;
    text-decoration: none;
    font-size: 13px;
    opacity: .65;
}

.pagina-dia-romantica {
    width: min(940px, calc(100% - 28px));
    margin: 0 auto;
    padding: 30px 0 80px;
}

.cabecalho-dia-romantico {
    text-align: center;
    margin-bottom: 28px;
}

.dia-overline {
    letter-spacing: .22em;
    font-size: 10px;
    opacity: .5;
    margin-bottom: 12px;
}

.numero-dia-grande {
    width: 90px;
    height: 90px;
    margin: 0 auto 13px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f4e4d0;
    border: 1px solid rgba(100,65,45,.14);
    box-shadow:
        0 12px 30px rgba(70,42,25,.11),
        inset 0 0 0 7px rgba(255,255,255,.3);
}

.numero-dia-grande span {
    font-family: Georgia, serif;
    font-size: 30px;
    color: #76523e;
}

.cabecalho-dia-romantico h1 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: clamp(30px, 5vw, 47px);
    font-weight: 500;
}

.data-romantica {
    margin: 5px 0 0;
    font-family: Georgia, serif;
    font-style: italic;
    opacity: .6;
}

.estado-romantico {
    width: min(700px, 100%);
    margin: 0 auto 35px;
    padding: 15px 19px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,.65);
    border: 1px solid rgba(120,78,52,.12);
    box-shadow: 0 8px 24px rgba(72,42,25,.06);
}

.estado-romantico-icone {
    width: 47px;
    height: 47px;
    min-width: 47px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.8);
    font-size: 21px;
}

.estado-romantico-texto {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.estado-romantico-texto strong {
    font-family: Georgia, serif;
    font-size: 17px;
}

.estado-romantico-texto span {
    font-size: 13px;
    opacity: .62;
}

.envelope-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px auto 20px;
    min-height: 280px;
    justify-content: center;
}

.envelope-container {
    position: relative;
    width: min(430px, 88vw);
    aspect-ratio: 1.55 / 1;
    cursor: pointer;
    outline: none;
    perspective: 1100px;
}

.envelope-container:focus-visible {
    outline: 3px solid rgba(160,105,75,.35);
    outline-offset: 7px;
}

.envelope-shadow {
    position: absolute;
    width: 82%;
    height: 18px;
    left: 9%;
    bottom: -17px;
    background: rgba(50,30,20,.22);
    filter: blur(12px);
    border-radius: 50%;
    transition: .8s ease;
}

.envelope {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    transform-style: preserve-3d;
    box-shadow:
        0 18px 38px rgba(70,42,25,.19),
        0 3px 7px rgba(70,42,25,.12);
}

.envelope-marrom {
    background: linear-gradient(145deg,#c69b76,#a97855);
}

.envelope-rosa {
    background: linear-gradient(145deg,#e4b7b0,#c98e8d);
}

.envelope-interior {
    position: absolute;
    inset: 0;
    background: #ead7bf;
    clip-path: polygon(
        0 0,
        50% 54%,
        100% 0,
        100% 100%,
        0 100%
    );
    border-radius: 8px;
}

.envelope-carta {
    position: absolute;
    left: 10%;
    right: 10%;
    top: 7%;
    height: 82%;
    background: #fffdf6;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 3px 9px rgba(50,30,20,.12);
    transition:
        transform 1s cubic-bezier(.2,.75,.2,1);
}

.carta-mini-conteudo {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    color: #694b3b;
    gap: 6px;
}

.carta-mini-conteudo strong {
    font-size: 23px;
    font-weight: 500;
}

.carta-mini-conteudo small {
    font-size: 20px;
}

.envelope-flap {
    position: absolute;
    inset: 0 0 auto 0;
    height: 62%;
    z-index: 5;
    transform-origin: top center;
    background: linear-gradient(145deg,#d0a480,#b8845f);
    clip-path: polygon(
        0 0,
        100% 0,
        50% 100%
    );
    transition:
        transform .8s cubic-bezier(.4,0,.2,1);
}

.envelope-rosa .envelope-flap {
    background: linear-gradient(145deg,#edc3bc,#d99b9a);
}

.envelope-frente {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    border-radius: 8px;
    background: linear-gradient(
        145deg,
        rgba(255,255,255,.07),
        rgba(90,50,30,.10)
    );
    clip-path: polygon(
        0 0,
        50% 55%,
        100% 0,
        100% 100%,
        0 100%
    );
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 23px;
}

.envelope-destinatario {
    font-family: Georgia, serif;
    font-style: italic;
    color: rgba(70,42,28,.72);
    font-size: 16px;
}

.selo-cera {
    position: absolute;
    z-index: 8;
    left: 50%;
    top: 56%;
    transform: translate(-50%, -50%);
    width: 57px;
    height: 57px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(
        circle at 35% 30%,
        #b85c58,
        #813d3b
    );
    box-shadow:
        0 4px 7px rgba(60,30,25,.3),
        inset 2px 2px 4px rgba(255,255,255,.14);
    color: #f8dfd7;
    font-family: Georgia, serif;
    font-size: 23px;
    transition:
        transform .8s ease,
        opacity .5s ease;
}

.selo-rosa {
    background: radial-gradient(
        circle at 35% 30%,
        #b66a70,
        #81464e
    );
}

.envelope-aberto .envelope-flap {
    transform: rotateX(180deg);
}

.envelope-aberto .envelope-carta {
    transform: translateY(-75%);
    z-index: 7;
}

.envelope-aberto .selo-cera {
    transform:
        translate(-50%, -50%)
        scale(.7);
    opacity: .15;
}

.envelope-aberto .envelope-shadow {
    transform: scale(.75);
    opacity: .5;
}

.toque-envelope {
    margin: 18px 0 0;
    font-size: 13px;
    opacity: .55;
    font-style: italic;
    text-align: center;
}

.carta-aberta {
    width: min(760px, 100%);
    margin: 15px auto 38px;
    opacity: 0;
    transform:
        translateY(35px)
        scale(.97);
    pointer-events: none;
    transition:
        opacity .8s ease,
        transform .9s cubic-bezier(.2,.75,.2,1);
}

.carta-aberta.carta-visivel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.carta-aberta-papel {
    position: relative;
    padding: clamp(32px, 6vw, 58px);
    min-height: 390px;
    background: linear-gradient(
        180deg,
        #fffef9,
        #fffaf0
    );
    border: 1px solid rgba(120,78,52,.12);
    box-shadow:
        0 18px 40px rgba(70,42,25,.12),
        0 2px 5px rgba(70,42,25,.06);
    border-radius: 3px;
    overflow: hidden;
}

.carta-aberta-papel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 31px,
        rgba(130,100,70,.075) 32px
    );
}

.carta-aberta-papel::after {
    content: "♡";
    position: absolute;
    right: 28px;
    bottom: 18px;
    font-family: Georgia, serif;
    font-size: 28px;
    opacity: .1;
}

.carta-aberta-topo,
.carta-aberta-texto,
.carta-aberta-assinatura {
    position: relative;
    z-index: 1;
}

.carta-aberta-topo {
    display: flex;
    justify-content: space-between;
    font-family: Georgia, serif;
    font-style: italic;
    margin-bottom: 30px;
}

.carta-aberta-topo small {
    opacity: .42;
    font-size: 12px;
}

.carta-aberta-texto {
    white-space: normal;
    overflow-wrap: anywhere;
    font-family: Georgia, serif;
    font-size: 18px;
    line-height: 2;
    color: #513d31;
}

.carta-aberta-assinatura {
    margin-top: 38px;
    text-align: right;
    font-family: Georgia, serif;
    font-style: italic;
}

.carta-aberta-assinatura strong {
    display: block;
    font-size: 22px;
    font-style: normal;
}

.memorias-polaroid {
    margin: 35px auto 48px;
    padding: 27px 20px 40px;
    background: rgba(255,255,255,.34);
    border-radius: 22px;
}

.titulo-memorias {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.titulo-memorias > span {
    font-size: 24px;
    opacity: .55;
}

.titulo-memorias p,
.resposta-titulo p {
    margin: 0 0 2px;
    letter-spacing: .16em;
    font-size: 10px;
    opacity: .5;
}

.titulo-memorias h2,
.resposta-titulo h2 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 21px;
    font-weight: 500;
}

.polaroids {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.polaroid {
    width: 190px;
    margin: 0;
    padding: 10px 10px 17px;
    background: #fffdf8;
    box-shadow: 0 10px 22px rgba(55,35,25,.15);
    transform: rotate(-2deg);
    transition: transform .25s ease;
}

.polaroid:hover {
    transform: translateY(-7px) rotate(0);
}

.polaroid img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.polaroid figcaption {
    padding-top: 10px;
    text-align: center;
    font-family: Georgia, serif;
    font-size: 12px;
    font-style: italic;
    opacity: .65;
}

.polaroid-2 {
    transform: rotate(3deg);
}

.polaroid-3 {
    transform: rotate(-4deg);
}

.polaroid-4 {
    transform: rotate(2deg);
}

.resposta-secao {
    margin-top: 55px;
    padding-top: 40px;
    border-top: 1px dashed rgba(120,78,52,.20);
}

.resposta-titulo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    margin-bottom: 15px;
}

.resposta-coracao {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(215,153,153,.13);
    font-size: 22px;
}

.convite-resposta,
.aguardando-resposta,
.dia-completo {
    width: min(570px, 100%);
    margin: 40px auto;
    padding: 32px 24px;
    text-align: center;
    border-radius: 24px;
    background: rgba(255,255,255,.62);
    border: 1px solid rgba(120,78,52,.12);
    box-shadow: 0 12px 30px rgba(72,42,25,.07);
}

.convite-coracao,
.aguardando-icone {
    font-size: 31px;
    margin-bottom: 6px;
}

.convite-resposta h2,
.aguardando-resposta h2,
.dia-completo h2 {
    margin: 0 0 8px;
    font-family: Georgia, serif;
    font-weight: 500;
}

.convite-resposta p,
.aguardando-resposta p,
.dia-completo p {
    max-width: 450px;
    margin: 0 auto 22px;
    line-height: 1.65;
    opacity: .63;
}

.linha-espera,
.linha-completa {
    width: min(350px, 90%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: Georgia, serif;
}

.linha-espera i {
    height: 1px;
    flex: 1;
    background: rgba(120,78,52,.3);
}

.linha-completa strong {
    font-size: 23px;
}

.voltar-calendario {
    text-align: center;
    margin-top: 45px;
}

.botao-abrir-escrita {
    text-decoration: none;
}

.envelope-vazio {
    min-height: 320px;
}

.envelope-fechado {
    cursor: default;
}

@media (max-width: 600px) {

    .dia-topbar {
        padding: 17px 0;
    }

    .dia-menu {
        gap: 7px;
    }

    .dia-link {
        font-size: 12px;
    }

    .pagina-dia-romantica {
        width: calc(100% - 18px);
        padding-top: 25px;
    }

    .numero-dia-grande {
        width: 76px;
        height: 76px;
    }

    .numero-dia-grande span {
        font-size: 26px;
    }

    .estado-romantico {
        padding: 13px;
    }

    .estado-romantico-icone {
        width: 42px;
        min-width: 42px;
        height: 42px;
    }

    .envelope-container {
        width: 91vw;
    }

    .carta-aberta-papel {
        padding: 27px 21px;
        min-height: 350px;
    }

    .carta-aberta-texto {
        font-size: 16px;
        line-height: 1.85;
    }

    .polaroid {
        width: min(160px, 43vw);
    }

    .titulo-memorias h2 {
        font-size: 18px;
    }
}

/* =========================================================
   RESPOSTA DA JESKA
   ========================================================= */

.resposta-secao {
    width: min(760px, calc(100% - 32px));
    margin: 20px auto 70px;
    padding: 44px 34px;
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(116,75,49,.13);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(65,39,25,.12);
    text-align: center;
}

.resposta-coracao {
    font-size: 42px;
    margin-bottom: 8px;
    color: #8e5b4f;
}

.resposta-secao h2 {
    margin: 0 0 10px;
    font-family: Georgia, serif;
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 500;
    color: #4d342b;
}

.resposta-secao > p {
    max-width: 560px;
    margin: 0 auto 30px;
    color: #806b61;
    line-height: 1.7;
}

.formulario-romantico {
    text-align: left;
}

.formulario-romantico label {
    display: block;
    margin-bottom: 10px;
    color: #5b4035;
    font-weight: 600;
}

.formulario-romantico textarea {
    display: block;
    width: 100%;
    min-height: 280px;
    resize: vertical;
    padding: 22px;
    border: 1px solid rgba(116,75,49,.18);
    border-radius: 20px;
    background: #fffdf9;
    color: #49362e;
    font: 17px/1.75 Georgia, serif;
    outline: none;
    box-sizing: border-box;
    box-shadow: inset 0 2px 10px rgba(65,39,25,.035);
}

.formulario-romantico textarea:focus {
    border-color: rgba(142,91,79,.5);
    box-shadow:
        0 0 0 4px rgba(142,91,79,.08),
        inset 0 2px 10px rgba(65,39,25,.035);
}

.contador-caracteres {
    text-align: right;
    margin-top: 7px;
    color: #9a877e;
    font-size: 13px;
}

.seletor-fotos {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 24px 0 16px;
}

.botao-foto {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 13px 18px;
    border-radius: 999px;
    background: #f4ebe5;
    color: #63463b !important;
    cursor: pointer;
    font-weight: 600;
    transition: transform .2s ease, background .2s ease;
}

.botao-foto:hover {
    transform: translateY(-2px);
    background: #ecdfd7;
}

.preview-fotos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
    margin: 15px 0 25px;
}

.preview-foto-card {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #f7f0eb;
    padding: 7px;
}

.preview-foto-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
}

.preview-foto-nome {
    overflow: hidden;
    margin: 6px 2px 2px;
    color: #806b61;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.preview-foto-remover {
    position: absolute;
    top: 11px;
    right: 11px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(55,35,28,.78);
    color: white;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}

.botao-principal {
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 16px 22px;
    background: #745044;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(76,48,39,.18);
    transition: transform .2s ease, opacity .2s ease;
}

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

.botao-principal:disabled {
    opacity: .65;
    cursor: wait;
    transform: none;
}

.mensagem-erro {
    margin: 0 auto 22px;
    padding: 14px 18px;
    border-radius: 14px;
    background: #f8e7e5;
    color: #824c47;
    text-align: left;
}

@media (max-width: 600px) {

    .resposta-secao {
        width: calc(100% - 22px);
        padding: 30px 20px;
        border-radius: 22px;
    }

    .formulario-romantico textarea {
        min-height: 240px;
        font-size: 16px;
    }

    .seletor-fotos {
        flex-direction: column;
    }

    .botao-foto {
        width: 100%;
        box-sizing: border-box;
    }

}


/* =========================================================
   CORREÇÃO FINAL — CARTA DA JESKA
   A .resposta-secao usa text-align:center para o cabeçalho,
   mas a folha da carta deve ter o mesmo alinhamento da
   carta principal.
   ========================================================= */

.resposta-secao .carta-aberta {
    text-align: left;
}

.resposta-secao .carta-aberta-papel {
    text-align: left;
}

.resposta-secao .carta-aberta-topo {
    text-align: left;
}

.resposta-secao .carta-aberta-texto {
    text-align: left;
}

.resposta-secao .carta-aberta-assinatura {
    text-align: right;
}

.resposta-secao .carta-aberta-texto * {
    text-align: left;
}


/* =========================================================
   PAPEL DA CARTA ABERTA
   MESMO VISUAL DO PAPEL USADO EM ESCREVER.PHP
   ========================================================= */

/* A carta aberta mantém apenas a animação de entrada */
.carta-aberta {
    position: relative;
    width: min(760px, 100%);
    margin: 15px auto 38px;
    opacity: 0;
    transform: translateY(35px) scale(.97);
    pointer-events: none;
    transition:
        opacity .8s ease,
        transform .9s cubic-bezier(.2,.75,.2,1);
}

/* Estado aberto */
.carta-aberta.carta-visivel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/*
 * ESTE É O MESMO PAPEL DO .papel-editor
 */
.carta-aberta-papel {
    position: relative;
    overflow: hidden;

    min-height: 570px;

    padding: 58px clamp(25px, 6vw, 75px) 65px;

    border-radius: 4px;

    background:
        linear-gradient(
            90deg,
            rgba(119,76,48,.045) 1px,
            transparent 1px
        ),
        linear-gradient(
            #fffdf8,
            #fffaf0
        );

    background-size: 28px 28px, auto;

    border: 1px solid #eadcc8;

    box-shadow:
        0 25px 55px rgba(65,42,32,.16),
        0 5px 12px rgba(65,42,32,.08);

    transform: rotate(-.25deg);

    box-sizing: border-box;

    text-align: left;
}

/* Mesma moldura interna do papel de escrever */
.carta-aberta-papel::before {
    content: "";
    position: absolute;
    inset: 12px;

    border: 1px solid rgba(171,127,89,.18);

    pointer-events: none;
}

/* Mesmo coração decorativo */
.carta-aberta-papel::after {
    content: "♡";

    position: absolute;

    right: 30px;
    top: 20px;

    color: rgba(169,94,116,.18);

    font-family: Georgia, serif;
    font-size: 38px;

    pointer-events: none;
}

/* Cabeçalho */
.carta-aberta-topo {
    position: relative;
    z-index: 1;

    display: flex;
    justify-content: space-between;

    margin-bottom: 20px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.3rem;
    font-style: normal;

    color: #67424a;

    text-align: left;
}

.carta-aberta-topo small {
    opacity: .55;

    font-family:
        Arial,
        sans-serif;

    font-size: 12px;
    font-style: normal;

    color: #77545d;
}

/*
 * TEXTO DA CARTA
 *
 * Aqui está a principal diferença:
 * usamos a mesma fonte do textarea de escrever.php.
 */
.carta-aberta-texto {
    position: relative;
    z-index: 1;

    display: block;

    width: 100%;

    min-height: 350px;

    padding: 4px 0;

    box-sizing: border-box;

    font-family:
        "Segoe Print",
        "Bradley Hand",
        "Comic Sans MS",
        cursive;

    font-size: clamp(1rem, 2vw, 1.12rem);

    line-height: 2;

    color: #49363b;

    white-space: normal;

    overflow-wrap: anywhere;

    text-align: left;
}

/*
 * nl2br cria <br>.
 * Garantimos que nenhum elemento interno
 * volte a centralizar o texto.
 */
.carta-aberta-texto,
.carta-aberta-texto br {
    text-align: left;
}

/* Assinatura igual à página de escrever */
.carta-aberta-assinatura {
    position: relative;
    z-index: 1;

    margin-top: 22px;
    padding-top: 16px;

    border-top:
        1px dashed
        rgba(155,111,83,.3);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    color: #77545d;

    line-height: 1.5;

    text-align: left;
}

.carta-aberta-assinatura strong {
    display: block;

    font-size: 1.15rem;

    color: #5c3441;
}

/*
 * A seção da resposta usa text-align:center
 * para o título. A folha, porém, deve continuar
 * alinhada como o editor.
 */
.resposta-secao .carta-aberta,
.resposta-secao .carta-aberta-papel,
.resposta-secao .carta-aberta-topo,
.resposta-secao .carta-aberta-texto,
.resposta-secao .carta-aberta-assinatura {
    text-align: left;
}

/* A resposta da Jeska usa exatamente o mesmo papel */
.carta-resposta .carta-aberta-papel {
    min-height: 570px;
}

/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 720px) {

    .carta-aberta-papel {
        min-height: 570px;

        padding:
            48px
            25px
            55px;
    }

    .carta-aberta-texto {
        min-height: 350px;

        font-size: 1rem;
    }

}

