/* Jornada do participante: capa, carta (escrita), falha de carregamento e recibo (08). */
.letter-app[hidden] { display: none; }
.letter-app {
  --lt-paper: #faf7f0;
  --lt-paper-edge: #e4dcd0;
  --lt-rule: #d5ccbe;
  --lt-ink: #242231;
  --lt-muted: #665e64;
  --lt-wine: #6e273b;
  --lt-back: #1b1927;
  --lt-display: var(--editorial, Georgia, 'Times New Roman', serif);
  min-width: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--lt-ink);
  background: #eae4da;
  font-family: var(--font-ui);
}
#main { display: flex; flex-direction: column; }
.symbol-defs, .lt-sr, .lt-skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lt-skip:focus { position: fixed; z-index: 8; top: 8px; left: 8px; padding: 12px; background: var(--lt-paper); color: var(--navy); }
.letter-app svg:not(.symbol-defs):not([data-selo] svg) { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.letter-app button { color: inherit; font-family: inherit; }
.letter-app :focus-visible { outline: 3px solid #873a6c; outline-offset: 3px; }
/* Títulos recebem foco por script para anunciar a etapa; o contorno ficaria sem função. */
.letter-app [tabindex="-1"]:focus { outline: none; }
.lt-mast { position: relative; z-index: 2; color: #fff7f3; background: var(--lt-back); }
.lt-mast::after { content: ''; position: absolute; inset: auto 0 0; height: 1px; background: linear-gradient(90deg, transparent, #b4a8b033 25%, #d9b9c933 65%, transparent); }
.lt-mast-inner, .lt-cover-inner { width: min(calc(100% - 48px), 1152px); margin-inline: auto; }
.lt-mast-inner { height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lt-brand { display: flex; align-items: center; gap: 14px; }
.lt-brand img { display: block; width: 90px; height: auto; }
.lt-brand span { color: #e2d9df; padding-left: 14px; border-left: 1px solid #a59ba04f; font-size: 11px; font-weight: 550; line-height: 20px; }
.lt-exit { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 44px; min-height: 44px; border: 0; background: none; padding: 0; color: #eadfe3 !important; font-size: 11px; font-weight: 600; }
.lt-exit svg { width: 14px !important; height: 14px !important; }
.lt-exit[aria-busy="true"] { cursor: progress; opacity: .7; }
.lt-mast :focus-visible { outline-color: #ffd7e3; }
.lt-page-alert { margin: 0; padding: 11px 24px; border-bottom: 1px solid #e6c3bf; background: #f8e6e2; color: #7a1f2d; font-size: 13px; font-weight: 650; line-height: 1.5; text-align: center; }
.lt-cover { position: relative; isolation: isolate; overflow: hidden; color: #fff9f2; }
.lt-cover::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.lt-cover-inner { position: relative; isolation: isolate; }
.lt-cover-copy { position: relative; z-index: 1; padding: 28px 0 67px; pointer-events: none; }
.lt-kicker { margin: 0; display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 9px; line-height: 1.5; letter-spacing: .15em; text-transform: uppercase; color: #f3dbe0; }
.lt-kicker span { width: 20px; height: 2px; background: #eb6770; }
.lt-cover h1 { width: max-content; max-width: 100%; margin: 13px 0 0; font-weight: 600; font-size: clamp(35px, 9.65vw, 47px); line-height: .98; letter-spacing: -.056em; }
.lt-cover h1 em { display: inline-block; color: #fff4e7; font: italic 400 1.3em/.99 var(--lt-display); letter-spacing: -.055em; margin-top: 3px; }
.lt-date { margin: 19px 0 0; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 570; line-height: 1.45; color: #e5d3da; }
.lt-date svg { width: 14px !important; height: 14px !important; }
.lt-envelope { position: absolute; z-index: 0; display: block; object-fit: contain; height: auto; pointer-events: none; user-select: none; width: 54%; left: 52.5%; top: 17%; transform: rotate(-5deg); filter: drop-shadow(-10px 15px 11px rgb(13 6 16 / 42%)); }
.lt-paper-zone { position: relative; display: flow-root; background: #eae5dc; }
.lt-paper { position: relative; z-index: 1; padding: 23px 24px 8px; margin: -23px auto 0; border-radius: 19px 25px 0 0; background: linear-gradient(115deg, color-mix(in srgb, var(--papel-fundo) 65%, white), var(--papel-fundo) 80%); box-shadow: 0 -1px 0 #fff7e5a1, 0 -9px 20px rgb(19 11 20 / 8%); }
.lt-letterhead { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 73px; padding-bottom: 13px; border-bottom: 1px solid var(--lt-rule); }
.lt-letterhead::after { content: ''; position: absolute; bottom: -1px; left: 0; display: block; width: 40px; height: 2px; background: linear-gradient(90deg, var(--navy) 0 68%, transparent 68% 75%, var(--red) 75%); }
.lt-heading { display: grid; gap: 2px; }
.lt-letterhead .lt-postage { width: 60px; flex: 0 0 60px; align-self: center; margin: 0 4px 0 0; transform: rotate(3deg); }
.lt-recipient .lt-name { font-size: 18px; font-weight: 650; line-height: 1.27; letter-spacing: -.035em; }
.lt-paper.is-addressed .lt-recipient .lt-name { color: #3f2637; }
.lt-paper.is-addressed .lt-team { color: #65575a; }
.lt-recipient:focus-visible { outline-offset: 4px; }
.lt-recipient[aria-busy="true"] { cursor: progress; }
.lt-recipient[aria-busy="true"] .lt-change { opacity: .45; }
.lt-postage { display: block; }
.lt-letterhead h2 { margin: 0; font: 400 41px/.99 var(--lt-display); color: var(--lt-ink); letter-spacing: -.045em; }
#compose { display: grid; gap: 0; }
.lt-recipient-block { position: relative; padding: 13px 0 13px; border-bottom: 1px solid var(--lt-rule); min-width: 0; }
.lt-caption { display: block; color: var(--lt-muted); font-size: 10px; line-height: 1.4; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.lt-recipient { margin-top: 2px; display: flex; align-items: center; width: 100%; gap: 11px; text-align: left; border: 0; border-radius: 6px; padding: 1px 0; background: none; min-height: 46px; }
.lt-person-info { display: block; min-width: 0; flex: 1; }
.lt-name, .lt-team { display: block; }
.lt-name { color: var(--lt-ink); font-weight: 700; font-size: 16px; line-height: 1.32; letter-spacing: -.025em; overflow-wrap: anywhere; }
.lt-team { margin-top: 3px; color: var(--lt-muted); font-weight: 510; font-size: 11px; line-height: 1.4; }
.lt-team:empty { display: none; }
.lt-change { display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--lt-wine); font-size: 11px; font-weight: 700; margin-left: auto; }
.lt-change svg { width: 14px !important; height: 14px !important; }
.lt-recipient:hover .lt-name { color: #752e45; }
.lt-paper:not(.is-addressed) .lt-change { min-width: 29px; min-height: 29px; border: 1px solid #b7a99c; border-radius: 50%; }
.lt-writing { padding-top: 14px; min-width: 0; }
.lt-writing-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lt-counter { font: 600 10px/1.5 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--lt-muted); }
#praise { --ruled: 31px; width: 100%; height: calc(3 * var(--ruled) + 1px); resize: vertical; min-height: calc(3 * var(--ruled) + 1px); display: block; color: #332736; font: 400 24px/var(--ruled) var(--lt-display); letter-spacing: -.01em; padding: 0 1px; border: 0; border-radius: 0; margin: 10px 0 7px; background: repeating-linear-gradient(transparent 0 calc(var(--ruled) - 1px), var(--lt-rule) calc(var(--ruled) - 1px) var(--ruled)); background-attachment: local; caret-color: var(--lt-wine); }
#praise::placeholder { color: #756c65; opacity: 1; font-style: italic; }
#praise:focus-visible { outline-offset: 3px; border-radius: 2px; }
#praise[aria-invalid="true"] { box-shadow: 0 2px 0 #b2283b; }
.lt-privacy { display: flex; align-items: flex-start; gap: 5px; margin: 0; color: var(--lt-muted); font-size: 11px; line-height: 1.6; }
.lt-submit-row { display: grid; align-items: center; gap: 10px; margin-top: 15px; }
.letter-app .lt-primary { min-height: 47px; padding: 11px 18px; width: 100%; display: inline-flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid transparent; border-radius: 100px; color: white; background: linear-gradient(135deg, var(--red), var(--red-deep)); font-size: 14px; font-weight: 710; letter-spacing: -.01em; box-shadow: 0 3px 7px #6c17251b, inset 0 1px 0 #ef79883d; transition: background-color .18s ease, transform .18s ease; }
.letter-app .lt-primary:hover { background: var(--red-deep); }
.letter-app .lt-primary:active { transform: translateY(1px); }
.letter-app .lt-primary:disabled { background: #e6e0d9; color: #6c6263; box-shadow: none; cursor: default; }
.lt-primary svg { width: 17px !important; height: 17px !important; }
.lt-error { margin: 0; font-size: 12px; font-weight: 700; color: #982237; }

/* Rodapé fora do <main>: continua a faixa da carta e permanece no recibo. */
.lt-foot { flex: 1; display: flex; flex-direction: column; background: #eae5dc; }
/* Tom mais escuro que --lt-muted: o degradê do desktop começa em #ded7cc (5,5:1). */
.lt-footer { width: 100%; margin: 0 auto; padding: 4px 24px; border-top: 1px solid #d9d1c6; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #574f55; font-size: 10px; font-weight: 550; }
.lt-footer a { min-height: 44px; display: flex; align-items: center; gap: 5px; text-decoration: none; color: inherit; }
.lt-footer a:hover, .lt-exit:hover { text-decoration: underline; }
.lt-footer svg { width: 12px !important; height: 12px !important; }

/* Falha ao carregar a campanha ou a sessão: mesma folha, com uma ação só. */
.lt-paper.lt-failure { display: block; padding-bottom: 26px; }
.lt-failure h2 { margin: 8px 0 10px; color: var(--papel-tinta); font: 400 34px/1.04 var(--lt-display); letter-spacing: -.035em; }
.lt-failure p { margin: 0 0 20px; max-width: 52ch; color: var(--lt-muted); font-size: 14px; line-height: 1.6; }
.letter-app .lt-failure .lt-primary { width: auto; min-width: 220px; }

@media (max-width: 749px) {
  .letter-app, .lt-paper-zone, .lt-foot { background: var(--lt-paper); }
  .lt-foot { justify-content: flex-end; }
  .lt-paper { width: 100%; }
  .lt-recipient-block { position: static; }
  #praise { resize: none; }
  .lt-name { line-height: 1.3; }
}
@media (max-width: 354px) {
  .lt-mast-inner, .lt-cover-inner { width: calc(100% - 36px); }
  .lt-brand { gap: 9px; }
  .lt-brand span { padding-left: 9px; font-size: 10px; }
  .lt-kicker { font-size: 8px; gap: 7px; }
  .lt-paper { padding-inline: 18px; }
  .lt-footer { padding-inline: 18px; }
  .lt-cover h1 { font-size: 33px; }
  .lt-envelope { width: 55%; left: 53%; top: 19.5%; }
  .lt-name { font-size: 15px; }
  .lt-change .change-label { display: none; }
  .lt-letterhead .lt-postage { width: 53px; flex-basis: 53px; }
}
@media (min-width: 530px) and (max-width: 749px) {
  .lt-cover-copy { padding-block: 42px 68px; }
  .lt-envelope { width: 46%; left: 54%; top: 0; }
  .lt-cover h1 { font-size: 55px; }
  .lt-paper { padding-inline: max(30px, calc((100% - 500px) / 2)); }
  .lt-footer { padding-inline: max(30px, calc((100% - 500px) / 2)); }
}
@media (min-width: 750px) {
  .lt-mast-inner, .lt-cover-inner { width: min(100% - 112px, 1152px); }
  .lt-mast-inner { height: 62px; }
  .lt-brand { gap: 20px; }
  .lt-brand img { width: 100px; }
  .lt-brand span { font-size: 12px; padding-left: 20px; line-height: 23px; }
  .lt-exit { font-size: 13px; }
  .lt-cover-inner { min-height: 344px; }
  .lt-cover-copy { padding: 39px 0 72px; }
  .lt-kicker { font-size: 10px; gap: 11px; }
  .lt-kicker span { width: 28px; }
  .lt-cover h1 { font-size: clamp(52px, 5.8vw, 76px); margin-top: 15px; line-height: .88; }
  .lt-cover h1 em { font-size: 1.23em; margin-top: 4px; }
  .lt-date { font-size: 12px; margin-top: 17px; }
  .lt-envelope { width: clamp(274px, 27vw, 361px); left: calc(70% - clamp(137px, 13vw, 181px)); top: 2%; transform: rotate(-5deg); filter: drop-shadow(-12px 25px 12px rgb(9 4 12 / 39%)); }
  .lt-paper-zone, .lt-foot { background: linear-gradient(105deg, #ded7cc, #e9e3d8 62%, #e4dcd0); }
  .lt-paper { width: min(calc(100% - 112px), 1152px); padding: 25px clamp(26px, 3.6vw, 56px) 9px; margin-top: -53px; margin-bottom: 26px; border-radius: 7px 20px 4px 6px; border: 1px solid #eee7d9; box-shadow: 0 13px 35px rgb(35 23 28 / 9%), 0 3px 0 -1px #d1c7b8, 0 5px 0 -2px #faf3e8; }
  .lt-paper.lt-failure { padding-block: 34px 36px; }
  .lt-failure h2 { font-size: 44px; }
  .lt-letterhead { padding-bottom: 15px; }
  .lt-heading { display: grid; align-items: center; gap: 2px; }
  .lt-letterhead .lt-postage { width: 73px; flex-basis: 73px; }
  .lt-letterhead h2 { font-size: 47px; }
  #compose { grid-template-columns: minmax(0,.77fr) minmax(0,1.23fr); column-gap: clamp(24px, 4vw, 72px); }
  .lt-recipient-block { grid-area: 1 / 1 / 3; padding: 21px clamp(18px, 2.3vw, 38px) 12px 0; border: 0; border-right: 1px solid var(--lt-paper-edge); }
  .lt-recipient { gap: 12px; margin-top: 8px; }
  .lt-recipient .lt-name { font-size: clamp(20px, 1.85vw, 27px); }
  .lt-recipient .lt-team { margin-top: 7px; font-size: 13px; }
  .lt-writing { grid-area: 1 / 2; padding-top: 21px; }
  .lt-writing-caption { min-height: 15px; }
  .lt-counter, .lt-caption { font-size: 11px; }
  #praise { --ruled: 33px; font-size: 26px; margin-block: 7px; }
  .lt-privacy { font-size: 12px; }
  .lt-submit-row { grid-area: 2 / 2; display: flex; justify-content: flex-end; gap: 16px; margin-top: 14px; }
  .lt-submit-row .lt-primary { width: auto; min-width: 190px; }
  .lt-footer { width: min(100% - 112px, 1152px); min-height: 65px; padding: 6px 0; border: 0; font-size: 11px; }
}
@media (min-width: 750px) and (max-width: 950px) {
  .lt-mast-inner, .lt-cover-inner, .lt-paper, .lt-footer { width: calc(100% - 64px); }
  .lt-envelope { left: 59%; width: 292px; top: 3%; }
  .lt-cover-copy { padding-bottom: 66px; }
  #compose { grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); column-gap: 24px; }
  .lt-recipient { gap: 8px; }
  .lt-change .change-label { display: none; }
}
@supports (field-sizing: content) {
  #praise { field-sizing: content; height: auto; min-height: calc(3 * var(--ruled) + 1px); max-height: calc(8 * var(--ruled) + 1px); }
}

/* Recortes dos glifos usados na capa; o texto digitado utiliza a família completa. */
@font-face {
  font-family: "Capa da carta";
  src: url("assets/fonts/carta-frase.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Titulo da carta";
  src: url("assets/fonts/carta-titulo.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
.lt-cover h1 em, .lt-writing textarea::placeholder {
  font-family: "Capa da carta", var(--lt-display);
}
.lt-letterhead h2 { font-family: "Titulo da carta", var(--lt-display); }
#praise:placeholder-shown { font-family: var(--font-ui); }
.lt-cover-inner > picture { display: contents; }

@font-face {
  font-family: Manrope;
  src: url("assets/fonts/manrope-form.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0020,U+002E,U+0030,U+0032,U+0036-0037,U+0041-0045,U+0047-0049,U+004C-0055,U+0061,U+0063-0069,U+006B-0076,U+0078,U+007A,U+00E1;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/contador.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0020, U+002F-0030, U+0036;
}

/* Papel marcado em duas tintas, presente também na folha de revisão. */
.lt-paper-zone::before {
  content: ''; display: block; position: absolute; pointer-events: none; top: -25px; left: 2%; right: 5%;
  height: 45px; transform: rotate(-.8deg); border-radius: 4px 17px 0 0;
  background: linear-gradient(90deg, #dfd3bd, #f7f1e2 40%, #dfcfb6); box-shadow: 0 -1px 0 #fff3;
}
@media (min-width: 750px) {
  .lt-paper-zone::before { top: -55px; left: max(5.5%, calc((100% - 1130px) / 2)); right: max(5.8%, calc((100% - 1115px) / 2)); transform: rotate(-.55deg); }
}

@media (min-width: 900px) {
  .lt-paper {
    display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
    grid-template-rows: auto 1fr auto auto; column-gap: clamp(25px, 3.2vw, 56px);
    padding-top: 27px; padding-bottom: 7px; align-items: start;
  }
  .lt-paper.lt-failure { display: block; padding-block: 34px 36px; }
  #compose { display: contents; }
  .lt-letterhead { grid-area: 1 / 1; min-height: 80px; padding-bottom: 12px; }
  .lt-heading { display: grid; gap: 2px; }
  .lt-letterhead .lt-postage { width: 63px; flex-basis: 63px; }
  .lt-recipient-block { grid-area: 2 / 1 / 4; padding: 17px 0 4px; border: 0; }
  .lt-recipient { margin-top: 4px; }
  .lt-recipient .lt-name { font-size: clamp(20px, 1.67vw, 25px); }
  .lt-writing { grid-area: 1 / 2 / 3; padding: 5px 0 6px clamp(24px, 2.9vw, 48px); align-self: stretch; border-left: 1px solid #d5c8b588; box-shadow: inset 7px 0 11px -10px #826a4b46; }
  #praise { --ruled: 34px; min-height: calc(3 * var(--ruled) + 1px); }
  .lt-submit-row { grid-area: 3 / 2; border-left: 1px solid #d5c8b588; box-shadow: inset 7px 0 11px -10px #826a4b46; margin-top: 0; padding: 12px 0 1px 24px; }
  .lt-rules { grid-area: 4 / 1 / 5 / 3; margin-top: 20px; }
}

.lt-paper[data-papel] { --lt-rule: var(--papel-borda); }
.lt-paper .lt-letterhead { gap: 6px; padding-block-end: 8px; }
.lt-franking { position: relative; min-width: 0; flex: 1 1 auto; display: flex; justify-content: flex-end; align-items: center; }
.lt-franking .vinheta-papel { position: absolute; right: 48px; width: min(84%, 112px); height: 74px; pointer-events: none; }
.lt-paper .lt-letterhead h2, .lt-paper.is-addressed .lt-recipient .lt-name { color: var(--papel-tinta); }
.lt-paper #praise { color: color-mix(in srgb, var(--papel-tinta) 68%, #29232c); }
#choose-paper { display: inline-flex; align-items: center; justify-self: start; gap: 6px; min-height: 44px; padding: 0 2px 0 0; border: 0; background: transparent; color: var(--lt-muted); font-size: 11px; font-weight: 550; }
#paper-selected { color: var(--papel-tinta); font-weight: 760; }
#choose-paper svg { width: 12px; height: 12px; color: var(--papel-tinta); }
#choose-paper:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.lt-privacy svg { width: 13px !important; height: 13px !important; margin-top: 2px; }
.lt-privacy strong { font-weight: 680; }
@media (max-width: 354px) {
  #choose-paper { gap: 4px; }
  .lt-franking .vinheta-papel { right: 38px; width: 69%; height: 60px; }
}

/* 08 · Participação registrada: o envelope fechado guarda a carta sem mostrar o conteúdo. */
.is-registered #main { flex: 1; }
.is-registered .lt-foot { flex: none; border-top: 1px solid #e3d7ca; background: #f8f4ec; }
.lt-receipt { flex: 1; display: flow-root; color: #322834; background: radial-gradient(ellipse at 85% 8%, #e3cfce, transparent 50%), linear-gradient(112deg, #f0e8dc 0%, #eee2d7 60%, #e2d0c7); }
.lt-receipt-frame { width: min(calc(100% - 40px), 1144px); margin-inline: auto; padding: 32px 0 24px; }
.lt-receipt-card { position: relative; isolation: isolate; display: grid; padding: 19px 20px 22px; background: linear-gradient(130deg, #fffaf0, #faf2e1 75%, #fbefd9); border: 1px solid #fff6e6; box-shadow: 0 3px 0 -1px #d3c2b1, 0 6px 0 -2px #fbf3e4, 0 8px 0 -3px #cfbdab, 0 14px 28px #5437441a; }
.lt-receipt-card::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 23px; height: 23px; background: linear-gradient(135deg, transparent 46%, #c5ae97 50%, #f2e6d3 74%, #c5b097); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.lt-receipt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lt-receipt-kicker { margin: 0; color: #744555; font-size: 8px; font-weight: 735; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase; }
.lt-seal-check { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #2a6653; border: 1px solid #6d8d7d; box-shadow: inset 0 0 0 3px #faf4e9, inset 0 0 0 4px #6b8c7d4f; }
.lt-seal-check svg { width: 14px !important; height: 14px !important; stroke-width: 1.8 !important; }
.lt-receipt-message { z-index: 1; }
.lt-receipt-message h1 { margin: 18px 0 12px; color: #4c293a; font: 400 clamp(44px, 12vw, 60px)/.93 var(--editorial); letter-spacing: -.045em; }
.lt-receipt-message h1 em { color: #773d4c; font-weight: 400; }
.lt-receipt-message p { margin: 0; max-width: 36ch; color: #67555b; font-size: 13px; line-height: 1.62; }
.lt-receipt-art { display: block; width: 74%; max-width: 235px; margin: 10px 0 10px auto; transform: rotate(-5deg); filter: drop-shadow(-6px 10px 8px #533d3b2b); }
.lt-receipt-art img { display: block; width: 100%; height: auto; }
.lt-receipt-divider { position: relative; height: 1px; background: #d7c6b4; }
.lt-receipt-divider::after { content: ''; position: absolute; left: 0; bottom: 0; width: 37px; height: 2px; background: linear-gradient(90deg, var(--navy) 0 67%, transparent 67% 75%, var(--red) 75%); }
.lt-receipt-meta { display: flex; flex-wrap: wrap; gap: 7px 15px; padding-top: 13px; }
.lt-receipt-meta p { margin: 0; display: flex; align-items: center; gap: 5px; color: #635a5e; font-size: 10px; font-weight: 600; }
.lt-receipt-meta svg { width: 13px !important; height: 13px !important; }
.lt-receipt-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 20px; }
.lt-receipt-bottom p { margin: 0; color: #5f535a; font-size: 12px; line-height: 1.5; }
.lt-receipt-return { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border: 1px solid #a8918e; border-radius: 100px; background: transparent; color: #5e3442 !important; font-size: 12px; font-weight: 620; }
.lt-receipt-return:hover { text-decoration: underline; text-underline-offset: 3px; }
.lt-receipt-return[aria-busy="true"] { cursor: progress; opacity: .7; }
.lt-receipt-return svg { width: 14px !important; height: 14px !important; }
@media (max-width: 354px) {
  .lt-receipt-frame { width: calc(100% - 32px); }
  .lt-receipt-card { padding-inline: 16px; }
  .lt-receipt-message h1 { font-size: 40px; }
}
@media (min-width: 530px) and (max-width: 749px) {
  .lt-receipt-frame { width: min(calc(100% - 48px), 540px); }
}
@media (min-width: 750px) {
  .lt-receipt-frame { width: min(calc(100% - 96px), 990px); padding: 56px 0 45px; }
  .lt-receipt-card { grid-template-columns: minmax(0, 1.18fr) minmax(0, .95fr); gap: 0 30px; padding: 30px 38px 28px; }
  .lt-receipt-head { grid-area: 1 / 1 / 2 / 3; }
  .lt-receipt-kicker { font-size: 10px; }
  .lt-seal-check { width: 34px; height: 34px; }
  .lt-receipt-message { grid-area: 2 / 1; align-self: center; padding: 26px 0 34px; }
  .lt-receipt-message h1 { margin: 0 0 16px; font-size: clamp(61px, 5.7vw, 83px); line-height: .98; }
  .lt-receipt-message p { font-size: 15px; }
  .lt-receipt-art { grid-area: 2 / 2; align-self: center; width: 100%; max-width: 315px; margin: 10px auto 23px; }
  .lt-receipt-divider { grid-area: 3 / 1 / 4 / 3; }
  .lt-receipt-meta { grid-area: 4 / 1 / 5 / 3; gap: 21px; padding-top: 15px; }
  .lt-receipt-meta p { font-size: 12px; }
}

/* Quem está na sessão, ao lado do Sair. No celular, só o primeiro nome. */
.lt-session { display: flex; align-items: center; gap: 14px; min-width: 0; }
.lt-who { margin: 0; color: #eadfe3; font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.lt-who strong { font-weight: 700; color: #fff7f3; }
@media (max-width: 480px) { .lt-who-label { display: none; } }

/* Enquanto a sessão é conferida, a carta ainda não existe: sem a borda da folha de baixo. */
.lt-paper-zone:not(:has(> .lt-paper:not([hidden])))::before { display: none; }

/* Papel de papelaria fina, só na tela: fibra de algodão em multiply (o tile já vem atenuado,
   o equivalente a opacidade .08) e relevo seco nos títulos. Impressão fica como antes. */
@media screen {
  .lt-paper {
    background-image: url("assets/envio/fibra.webp"), linear-gradient(115deg, color-mix(in srgb, var(--papel-fundo) 65%, white), var(--papel-fundo) 80%);
    background-size: 240px 240px, auto;
    background-blend-mode: multiply, normal;
  }
  .lt-receipt-card {
    background-image: url("assets/envio/fibra.webp"), linear-gradient(130deg, #fffaf0, #faf2e1 75%, #fbefd9);
    background-size: 240px 240px, auto;
    background-blend-mode: multiply, normal;
  }
  .lt-letterhead h2, .lt-failure h2, .lt-receipt-message h1 { text-shadow: 0 1px 0 rgb(255 255 255 / .78), 0 -1px 0 rgb(72 36 40 / .14); }
}

/* Holofote na capa (primeira tela de quem vem pelo link): uma única varredura de dois feixes
   quentes, até 1,6 s, que pousa num halo parado atrás do envelope. A caixa repete a do
   envelope (.lt-envelope), então os ângulos valem em todas as larguras. Só transform e
   opacity; com movimento reduzido, base.css encurta a animação e fica o estado final. */
.lt-ribalta { position: absolute; z-index: 0; width: 54%; left: 52.5%; top: 17%; aspect-ratio: 1; pointer-events: none; }
.lt-halo {
  position: absolute; inset: -26% -22% -20%; border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, rgb(255 228 200 / .4), rgb(255 206 190 / .15) 52%, transparent);
  animation: lt-halo 1.6s cubic-bezier(.3, .1, .2, 1) .1s both;
}
.lt-feixe {
  position: absolute; top: -170%; width: 160%; height: 330%; transform-origin: 50% 0; opacity: 0;
  background: conic-gradient(from 167deg at 50% 0, transparent 0deg, rgb(255 230 200 / .1) 6deg, rgb(255 238 216 / .25) 13deg, rgb(255 230 200 / .1) 20deg, transparent 26deg);
  -webkit-mask-image: linear-gradient(to bottom, transparent 4%, #000 36%, #000 70%, transparent 96%);
  mask-image: linear-gradient(to bottom, transparent 4%, #000 36%, #000 70%, transparent 96%);
}
.lt-feixe:nth-child(2) { left: -135%; animation: lt-feixe-a 1.6s cubic-bezier(.45, .05, .25, 1) .1s both; }
.lt-feixe:nth-child(3) { left: 70%; animation: lt-feixe-b 1.6s cubic-bezier(.45, .05, .25, 1) .1s both; }
@keyframes lt-feixe-a {
  0% { opacity: 0; transform: rotate(40deg); }
  16% { opacity: 1; }
  74% { opacity: 1; transform: rotate(-34deg); }
  100% { opacity: .62; transform: rotate(-25deg); }
}
@keyframes lt-feixe-b {
  0% { opacity: 0; transform: rotate(-42deg); }
  16% { opacity: 1; }
  74% { opacity: 1; transform: rotate(33deg); }
  100% { opacity: .62; transform: rotate(24deg); }
}
@keyframes lt-halo {
  0%, 48% { opacity: 0; transform: scale(.78); }
  100% { opacity: 1; transform: scale(1); }
}
@media (max-width: 354px) { .lt-ribalta { width: 55%; left: 53%; top: 19.5%; } }
@media (min-width: 530px) and (max-width: 749px) { .lt-ribalta { width: 46%; left: 54%; top: 0; } }
@media (min-width: 750px) { .lt-ribalta { width: clamp(274px, 27vw, 361px); left: calc(70% - clamp(137px, 13vw, 181px)); top: 2%; } }
@media (min-width: 750px) and (max-width: 950px) { .lt-ribalta { left: 59%; width: 292px; top: 3%; } }
/* No celular a capa é curta e o fundo vinho engole a luz: feixes mais largos e mais fortes. */
@media (max-width: 529px) {
  .lt-feixe { background: conic-gradient(from 164deg at 50% 0, transparent 0deg, rgb(255 230 200 / .15) 7deg, rgb(255 238 216 / .36) 16deg, rgb(255 230 200 / .15) 25deg, transparent 32deg); }
  .lt-halo { background: radial-gradient(closest-side, rgb(255 228 200 / .48), rgb(255 206 190 / .18) 52%, transparent); }
}
