 :root {
  --pink-light: #F8E7EC;
  --cream: #FFF9F0;
  --rose: #C98298;
  --wine: #62434D;
  --wine-soft: #765963;
  --paper-line: #EAD9D9;
  --shadow: 0 16px 48px rgba(98, 67, 77, .09);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--cream); color: var(--wine); font-family: var(--sans); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--rose); outline-offset: 4px; }
.skip-link { position: absolute; top: -60px; left: 1rem; z-index: 20; background: white; padding: .75rem 1rem; border-radius: .5rem; }
.skip-link:focus { top: 1rem; }
.hero { min-height: 94svh; position: relative; display: grid; place-items: center; overflow: hidden; padding: 5rem 1.25rem 6rem; background: var(--cream); text-align: center; }
.hero-content { width: min(100%, 34rem); position: relative; z-index: 1; }
.eyebrow { margin: 0 0 1rem; color: var(--rose); font-size: .7rem; font-weight: 600; letter-spacing: .19em; line-height: 1.5; }
.hero-mark { margin: 1.25rem 0 .6rem; color: var(--rose); font-size: 2.2rem; line-height: 1; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.18; }
h1 { font-size: clamp(2.65rem, 10vw, 4.7rem); margin: 0 auto 1.25rem; letter-spacing: -.035em; }
h2 { font-size: clamp(2rem, 7vw, 3.25rem); letter-spacing: -.025em; margin: 0 auto 1rem; }
.hero-copy { max-width: 28rem; margin: 0 auto 2rem; color: var(--wine-soft); font-size: 1.02rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 3.15rem; padding: .8rem 1.35rem; border: 0; border-radius: 999px; text-decoration: none; font-size: .92rem; font-weight: 600; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(98, 67, 77, .12); }
.button:active { transform: scale(.98); }
.button-primary { color: #fff; background: var(--rose); }
.tiny-note { margin: 1.3rem 0 0; font-family: var(--serif); font-size: .95rem; font-style: italic; color: var(--wine-soft); }
.hero-flower { position: absolute; color: #D7A0AE; opacity: .55; font-size: clamp(4rem, 14vw, 9rem); line-height: 1; pointer-events: none; }
.flower-one { top: 10%; left: -1.2rem; transform: rotate(-18deg); }
.flower-two { right: -1rem; bottom: 13%; transform: rotate(18deg); }
.scroll-cue { position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%); width: 2.6rem; height: 2.6rem; border: 1px solid var(--paper-line); border-radius: 50%; display: grid; place-items: center; text-decoration: none; color: var(--rose); font-size: 1.25rem; }
.section { padding: 5.25rem 1.15rem; }
.section-inner { width: min(100%, 68rem); margin: 0 auto; }
.section h2, .section-intro { text-align: center; }
.section-intro { max-width: 39rem; margin: 0 auto 2.25rem; color: var(--wine-soft); }
.music-section { background: var(--pink-light); }
.music-card { width: min(100%, 42rem); margin: 2.5rem auto 1rem; padding: 1rem; display: grid; grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr); gap: 1.25rem; align-items: center; border: 1px solid rgba(201,130,152,.25); border-radius: 1.25rem; background: rgba(255,249,240,.88); box-shadow: var(--shadow); }
.album-art { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; border-radius: .8rem; background: linear-gradient(145deg, #F1D5DD, #E7C0CB 58%, #F8E7EC); color: var(--wine); text-align: center; }
.album-flower { font-size: 3rem; line-height: 1; color: #A9647A; }
.album-art-caption { font-family: var(--serif); font-size: .95rem; line-height: 1.25; font-style: italic; }
.music-label { font-size: .63rem; letter-spacing: .14em; color: var(--rose); font-weight: 600; margin: 0 0 .35rem; }
.music-info h3 { margin: 0; font-size: 1.7rem; }
.artist { margin: .1rem 0 .75rem; color: var(--wine-soft); }
.audio-status { font-size: .75rem; line-height: 1.45; color: var(--wine-soft); margin: .5rem 0; }
.audio-controls { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin: .85rem 0; }
.round-button { border: 0; border-radius: 50%; width: 2.45rem; height: 2.45rem; color: white; background: var(--rose); cursor: pointer; }
.round-button:disabled { opacity: .4; cursor: not-allowed; }
.pause-button { color: var(--wine); background: #F0DDE2; }
.controls-hint { font-size: .67rem; color: var(--wine-soft); flex: 1 1 100%; }
.text-link { display: inline-block; margin-top: .25rem; color: var(--wine); font-size: .85rem; font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.fine-print { max-width: 42rem; margin: 1rem auto 0; color: var(--wine-soft); font-size: .75rem; text-align: center; }
.memories-section { background: var(--cream); }
.photo-button { display: block; width: 100%; border: 0; padding: 0; background: transparent; cursor: zoom-in; text-align: left; }
.photo-placeholder { aspect-ratio: 4 / 3; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .15rem; background: repeating-linear-gradient(135deg, #F9EDF0, #F9EDF0 12px, #F5E4E9 12px, #F5E4E9 24px); color: var(--wine-soft); border: 1px dashed #D9A8B6; border-radius: .3rem; font-size: .72rem; letter-spacing: .08em; }
.placeholder-icon { font-size: 2rem; color: var(--rose); line-height: 1.2; }
.photo-placeholder small { font-size: .65rem; letter-spacing: 0; }
figcaption { padding: .9rem .25rem .25rem; }
.photo-number { color: var(--rose); font-size: .63rem; letter-spacing: .12em; font-weight: 600; }
figcaption p { margin: .45rem 0 0; font-size: .88rem; line-height: 1.65; }
.draft-label { display: inline-block; margin-top: .55rem; font-size: .7rem; line-height: 1.4; color: #916775; font-style: italic; }
.letter-intro { background: var(--pink-light); padding: 5.5rem 1.25rem; text-align: center; }
.letter-intro-inner { max-width: 43rem; }
.decorative-sprig, .ending-flower { display: block; color: var(--rose); font-size: 2.3rem; margin-bottom: 1rem; }
.letter-intro h2 { max-width: 38rem; }
.letter-intro p:not(.eyebrow) { max-width: 33rem; margin: 0 auto 1.75rem; color: var(--wine-soft); }
.letter-section { background: #F7ECEB; padding-top: 4rem; padding-bottom: 4rem; }
.letter-paper { position: relative; width: min(100%, 46rem); margin: 0 auto; padding: clamp(1.5rem, 6vw, 4rem); overflow: hidden; background: var(--cream); border: 1px solid #E9D7D5; box-shadow: var(--shadow); }
.letter-paper > .eyebrow, .letter-paper > h2 { text-align: center; }
.letter-paper h2 { font-size: clamp(1.8rem, 6vw, 2.65rem); margin-bottom: 2rem; }
.letter-body p { margin: 0 0 1.15rem; line-height: 1.9; font-size: 1rem; }
.signature { font-family: var(--serif); font-style: italic; font-size: 1.35rem; text-align: right; margin: 2rem 0 0; color: var(--wine); }
.letter-flower { position: absolute; color: #D8A3B1; opacity: .48; font-size: 2.5rem; pointer-events: none; }
.letter-flower-top { top: .5rem; right: .8rem; }
.letter-flower-bottom { bottom: .5rem; left: .8rem; }
.ending { padding: 5.5rem 1.25rem; text-align: center; background: var(--cream); }
.ending-inner { max-width: 43rem; margin: 0 auto; }
.ending h2 { max-width: 39rem; }
.ending p:not(.signature) { max-width: 32rem; margin: 1rem auto; color: var(--wine-soft); }
.ending .signature { text-align: center; }
.lightbox { width: min(92vw, 40rem); max-width: none; max-height: 90dvh; padding: 1.25rem; border: 1px solid var(--paper-line); border-radius: 1rem; color: var(--wine); background: var(--cream); box-shadow: 0 24px 90px rgba(50,25,35,.28); }
.lightbox::backdrop { background: rgba(50, 30, 38, .58); backdrop-filter: blur(3px); }
.lightbox-close { position: absolute; right: .5rem; top: .25rem; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; color: var(--wine); background: var(--pink-light); font-size: 1.7rem; cursor: pointer; }
.lightbox-content { padding-top: 2rem; }
.lightbox-content .photo-placeholder { max-height: 62vh; }
.lightbox-note { margin: .75rem 0 0; text-align: center; font-size: .75rem; color: var(--wine-soft); }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.25rem; border-top: 1px solid var(--paper-line); color: var(--wine-soft); font-size: .75rem; }
.site-footer a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }



/* Tela inicial: infinito como progresso romântico */
.loading-screen { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow: hidden; padding: max(1.5rem, env(safe-area-inset-top)) 1.4rem max(1.5rem, env(safe-area-inset-bottom)); background: var(--cream); opacity: 1; visibility: visible; transition: opacity .65s ease, visibility .65s ease; }
.loading-screen.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-content { width: min(100%, 25rem); display: flex; flex-direction: column; align-items: center; text-align: center; }
.loading-heading { margin: .2rem 0 1.1rem; font-size: clamp(1.8rem, 7.5vw, 2.5rem); line-height: 1.2; }
.loading-infinity { display: block; width: min(100%, 20rem); height: auto; overflow: visible; margin: .2rem auto .5rem; }
.infinity-progress-fill { transform-origin: center; }
.loading-declaration { margin: .45rem 0 .65rem; font-size: clamp(1.5rem, 6.2vw, 2.05rem); line-height: 1.2; }
.loading-subtitle { max-width: 21rem; margin: 0 auto 1.3rem; color: var(--wine-soft); font-size: .9rem; line-height: 1.6; }
.loading-caption { width: min(100%, 17rem); display: flex; align-items: center; gap: .65rem; justify-content: center; margin-top: .1rem; }
.loading-caption p { margin: 0; color: var(--wine-soft); font-size: .75rem; }
.loading-caption-line { flex: 0 0 20px; height: 1px; background: var(--rose); opacity: .7; }
.loading-signature { margin: 1.5rem 0 0; color: var(--rose); font-size: .7rem; letter-spacing: .04em; }
.loading-screen.is-finishing .loading-infinity { animation: infinity-to-heart .55s ease-in-out forwards; }
.loading-screen.is-finishing .loading-declaration { animation: loading-text-soften .4s ease forwards; }
@keyframes infinity-to-heart {
  0% { transform: scale(1); opacity: 1; }
  55% { transform: scale(.72) rotate(-5deg); opacity: .9; }
  100% { transform: scale(.38) rotate(0deg); opacity: 0; }
}
@keyframes loading-text-soften {
  to { opacity: 0; transform: translateY(-5px); }
}
@media (max-height: 650px) {
  .loading-content { transform: scale(.88); }
  .loading-heading { margin-bottom: .55rem; }
  .loading-subtitle { margin-bottom: .7rem; }
  .loading-signature { margin-top: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-screen, .loading-screen.is-finishing .loading-infinity, .loading-screen.is-finishing .loading-declaration { animation: none !important; transition: none !important; }
  .loading-screen.is-leaving { display: none; }
}

/* Envelope interativo e abertura mobile-first */
.envelope-trigger { display: flex; flex-direction: column; align-items: center; gap: 1.35rem; width: 100%; padding: .25rem 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.envelope-scene { position: relative; display: block; width: min(76vw, 300px); height: min(48vw, 190px); min-height: 145px; perspective: 900px; filter: drop-shadow(0 16px 22px rgba(98,67,77,.12)); }
.envelope-back { position: absolute; inset: 0; border-radius: 9px; background: #E8C6D0; }
.envelope-letter { position: absolute; z-index: 1; left: 8%; right: 8%; top: 7%; height: 88%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; border: 1px solid #EAD9D9; border-radius: 4px; background: #FFF9F0; color: var(--wine); font-family: var(--serif); font-size: clamp(1rem, 4vw, 1.35rem); transition: transform .75s cubic-bezier(.2,.75,.25,1), opacity .5s ease; }
.envelope-letter-heart { color: var(--rose); font-size: 1.5rem; }
.envelope-front { position: absolute; z-index: 3; inset: 0; border-radius: 9px; background: linear-gradient(145deg, #F3D8E0, #E9C4D0); clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%); }
.envelope-flap { position: absolute; z-index: 4; inset: 0 0 auto; height: 68%; background: #DDAAB9; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0; transition: transform .65s ease, z-index .01s linear .3s; backface-visibility: hidden; }
.envelope-seal { position: absolute; z-index: 5; left: 50%; top: 53%; display: grid; place-items: center; width: 38px; height: 38px; transform: translate(-50%,-50%); border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: var(--rose); color: white; font-size: 1.25rem; box-shadow: 0 3px 8px rgba(98,67,77,.14); transition: opacity .25s ease, transform .35s ease; }
.envelope-trigger:hover .envelope-scene { transform: translateY(-3px); }
.envelope-scene { transition: transform .25s ease; }
.envelope-trigger.is-open .envelope-flap { transform: rotateX(180deg); z-index: 0; }
.envelope-trigger.is-open .envelope-letter { transform: translateY(-47%) scale(1.02); }
.envelope-trigger.is-open .envelope-seal { opacity: 0; transform: translate(-50%,-50%) scale(.6); }
.envelope-button-label { pointer-events: none; }
.envelope-hint { max-width: 19rem; min-height: 1.4em; margin: .7rem auto 0; color: var(--wine-soft); font-size: .75rem; }
.petal-layer { position: absolute; inset: 0; z-index: 6; overflow: hidden; pointer-events: none; }
.petal { position: absolute; top: 43%; left: 50%; width: 9px; height: 13px; border-radius: 80% 20% 75% 25%; background: #D99BAE; opacity: 0; animation: petal-burst 1.6s ease-out forwards; }
.petal:nth-child(3n) { background: #F0CBD6; width: 7px; height: 10px; }
.petal:nth-child(3n + 1) { background: #C98298; }
@keyframes petal-burst {
  0% { opacity: 0; transform: translate(0,0) rotate(0deg) scale(.6); }
  15% { opacity: .9; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.85); }
}
/* Mini-player fixo, compacto e com espaço seguro para a área inferior do celular */
.mini-player { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 38px minmax(0,1fr) 42px 36px; align-items: center; gap: .55rem; padding: .6rem .7rem; border: 1px solid rgba(234,217,217,.95); border-radius: 1rem; background: rgba(255,249,240,.96); color: var(--wine); box-shadow: 0 8px 30px rgba(67,39,49,.16); backdrop-filter: blur(14px); }
.mini-player[hidden] { display: none; }
.mini-player-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: .7rem; background: var(--pink-light); color: var(--rose); font-size: 1.35rem; }
.mini-player-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.mini-player-title { font-family: var(--serif); font-size: .95rem; }
.mini-player-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wine-soft); font-size: .68rem; }
.mini-player-play, .mini-player-spotify { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; text-decoration: none; background: var(--rose); color: white; font-size: 1rem; cursor: pointer; }
.mini-player-spotify { width: 34px; height: 34px; background: var(--pink-light); color: var(--wine); font-size: 1.15rem; }
.mini-player-play:disabled { opacity: .4; cursor: not-allowed; }
body.has-mini-player { padding-bottom: 84px; }
/* Mensagem adicional e encerramento conectado à abertura */
.longing-section { padding: 3.75rem 1.15rem; background: var(--pink-light); }
.longing-card { width: min(100%, 39rem); margin: 0 auto; padding: clamp(1.4rem, 6vw, 2.6rem); border: 1px solid rgba(201,130,152,.32); border-radius: 1.25rem; background: var(--cream); box-shadow: var(--shadow); text-align: center; }
.longing-heart { display: block; margin-bottom: .65rem; color: var(--rose); font-size: 2rem; }
.longing-card h2 { font-size: clamp(1.8rem, 7vw, 2.5rem); }
.longing-intro { margin: 0 auto 1.35rem; color: var(--wine-soft); }
.button-outline { color: var(--wine); border: 1px solid #DDB9C4; background: transparent; }
.longing-message { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--paper-line); text-align: left; }
.longing-message[hidden] { display: none; }
.longing-message p { line-height: 1.85; }
.longing-message .signature { margin-top: 1rem; }
.ending-seal { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 1.2rem; border: 1px solid #E7C8D1; border-radius: 50%; color: var(--rose); background: var(--pink-light); font-size: 1.8rem; }
@media (max-width: 360px) {
  .mini-player { left: 8px; right: 8px; grid-template-columns: 32px minmax(0,1fr) 36px 30px; gap: .4rem; padding: .5rem; }
  .mini-player-mark { width: 32px; height: 32px; }
  .mini-player-play { width: 34px; height: 34px; }
  .mini-player-spotify { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .envelope-flap, .envelope-letter, .envelope-seal, .envelope-scene { transition: none !important; }
  .petal { display: none !important; animation: none !important; }
}

/* Carrossel narrativo — desenhado primeiro para celular */
.gallery-carousel { width: min(100%, 34rem); margin: 2.5rem auto 0; }
.carousel-viewport { width: 100%; overflow: hidden; border-radius: 1rem; touch-action: pan-y pinch-zoom; }
.carousel-track { display: flex; align-items: stretch; transition: transform .48s cubic-bezier(.22,.75,.25,1); will-change: transform; }
.memory-slide { flex: 0 0 100%; min-width: 0; margin: 0; padding: .7rem; border: 1px solid var(--paper-line); border-radius: 1rem; background: #fffdf9; box-shadow: 0 10px 30px rgba(98,67,77,.07); }
.memory-slide[aria-hidden="true"] { pointer-events: none; }
.memory-slide .photo-placeholder-featured { aspect-ratio: 4 / 4.7; border-radius: .55rem; }
.memory-slide figcaption { padding: 1rem .35rem .45rem; }
.memory-slide figcaption p { font-size: .95rem; line-height: 1.75; }
.carousel-controls { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: .75rem; margin: 1rem auto .25rem; max-width: 20rem; }
.carousel-arrow { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--paper-line); border-radius: 50%; background: var(--cream); color: var(--wine); font-size: 2rem; line-height: 1; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.carousel-arrow:hover:not(:disabled) { background: var(--rose); color: #fff; transform: scale(1.04); }
.carousel-arrow:disabled { opacity: .38; cursor: not-allowed; }
.carousel-position { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.carousel-count { font-size: .78rem; font-weight: 600; color: var(--wine-soft); font-variant-numeric: tabular-nums; }
.carousel-dots { display: flex; align-items: center; justify-content: center; gap: .45rem; }
.carousel-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #DCC5CC; cursor: pointer; transition: width .25s ease, background .25s ease; }
.carousel-dot.is-active { width: 22px; border-radius: 99px; background: var(--rose); }
.carousel-hint { margin: .7rem 0 0; color: var(--wine-soft); text-align: center; font-size: .72rem; }
@media (max-width: 430px) {
  .gallery-carousel { margin-top: 2rem; }
  .memory-slide { padding: .55rem; }
  .memory-slide figcaption p { font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
  .carousel-track, .carousel-arrow, .carousel-dot { transition: none !important; }
}

@media (min-width: 760px) {
  .hero { min-height: 100svh; }
  .section { padding: 7rem 2rem; }
  .music-card { padding: 1.25rem; gap: 1.5rem; }
  .letter-intro { padding: 7rem 2rem; }
}
@media (max-width: 430px) {
  .music-card { grid-template-columns: 1fr; }
  .album-art { max-width: 12rem; width: 100%; margin: 0 auto; }
  .music-info { padding: .25rem .15rem .5rem; }
  .site-footer { flex-direction: column; align-items: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}


/* Desbloqueio da página após abrir o envelope */
html.gift-locked, body.gift-locked { overflow: hidden; overscroll-behavior: none; }
body.gift-locked main { visibility: hidden; pointer-events: none; }
body.gift-locked .scroll-cue { opacity: 0; visibility: hidden; pointer-events: none; }
.scroll-cue { transition: opacity .35s ease, visibility .35s ease; }
.scroll-cue.is-unlocked { opacity: 1; visibility: visible; pointer-events: auto; }
body.gift-unlocked main { visibility: visible; pointer-events: auto; animation: reveal-content .55s ease both; }
@keyframes reveal-content {
  from { opacity: .65; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  body.gift-unlocked main { animation: none !important; }
  .scroll-cue { transition: none !important; }
}



/* Espaços de foto com nomes de arquivos explícitos em assets/fotos/ */
.photo-slot { position: relative; }
.photo-slot .photo-asset { display: block; opacity: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.photo-slot.has-photo .photo-asset { opacity: 1; }
.photo-slot.has-photo > .placeholder-icon,
.photo-slot.has-photo > .photo-fallback-title,
.photo-slot.has-photo > .photo-fallback-note { display: none !important; }
.photo-fallback-title { font-weight: 600; }
.photo-fallback-note { display: block; max-width: 100%; overflow-wrap: anywhere; font-size: .62rem; line-height: 1.3; opacity: .8; }
.photo-fallback-note code { font-size: inherit; }
.photo-placeholder.photo-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; overflow: hidden; }
.photo-placeholder.photo-slot.has-photo { padding: 0; background: #F0E5E1; }
.photo-placeholder.photo-slot .photo-asset { position: absolute; inset: 0; }
.envelope-photo-sticker { width: 72px; height: 82px; position: absolute; right: max(1rem, calc(50% - 155px)); bottom: 5.5rem; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; padding: 4px; transform: rotate(7deg); border: 3px solid #FFFDF8; background: #F1E3E3; box-shadow: 0 3px 10px rgba(67,39,49,.16); color: var(--wine); text-align: center; font-size: .56rem; }
.envelope-photo-sticker .photo-asset { position: absolute; inset: 0; }
.envelope-photo-sticker.has-photo { padding: 0; }
.letter-photo-collage { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: .65rem; margin: .9rem auto 1.4rem; padding: .4rem .1rem .7rem; }
.photo-sticker { width: 27%; min-width: 72px; max-width: 108px; aspect-ratio: 3 / 4; margin: 0; padding: 5px 5px 16px; border: 1px solid #E7DAD3; background: #FFFCF7; box-shadow: 0 4px 10px rgba(67,39,49,.13); transform: rotate(-4deg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; color: var(--wine); text-align: center; font-size: .55rem; overflow: hidden; }
.photo-sticker .photo-asset { position: absolute; inset: 5px 5px 16px; width: calc(100% - 10px); height: calc(100% - 21px); }
.photo-sticker.sticker-two { transform: rotate(3deg) translateY(8px); }
.photo-sticker.sticker-three { transform: rotate(2deg) translateY(-2px); }
.photo-sticker.sticker-four { transform: rotate(-3deg) translateY(7px); }
.photo-sticker.has-photo { padding: 5px 5px 16px; }
.longing-photo { width: 112px; aspect-ratio: 4 / 5; margin: 0 auto 1.2rem; padding: 6px 6px 18px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .2rem; overflow: hidden; transform: rotate(-3deg); border: 1px solid #E7DAD3; background: #FFFCF7; box-shadow: 0 4px 10px rgba(67,39,49,.13); color: var(--wine); text-align: center; font-size: .58rem; }
.longing-photo .photo-asset { position: absolute; inset: 6px 6px 18px; width: calc(100% - 12px); height: calc(100% - 24px); }
.ending-photo { width: min(62vw, 230px); aspect-ratio: 4 / 5; margin: 1.2rem auto 1.5rem; padding: 7px 7px 23px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; overflow: hidden; border: 1px solid #E7DAD3; background: #FFFCF7; box-shadow: 0 7px 20px rgba(67,39,49,.16); color: var(--wine); text-align: center; font-size: .65rem; transform: rotate(2deg); }
.ending-photo .photo-asset { position: absolute; inset: 7px 7px 23px; width: calc(100% - 14px); height: calc(100% - 30px); }
.ending-photo.has-photo { padding: 7px 7px 23px; }
.photo-slot.has-photo { color: transparent; }
.photo-slot.has-photo .photo-asset { color: initial; }
@media (max-width: 360px) {
  .envelope-photo-sticker { width: 62px; height: 72px; bottom: 5.3rem; }
  .photo-sticker { min-width: 62px; padding-bottom: 14px; }
  .photo-sticker .photo-asset { inset: 5px 5px 14px; width: calc(100% - 10px); height: calc(100% - 19px); }
}



/* Carta editorial: fotos maiores integradas entre trechos do texto */
.letter-editorial { display: block; text-align: left; }
.letter-editorial-block { display: flow-root; margin: 1.1rem 0 1.45rem; }
.letter-editorial-block p { margin: 0 0 .95rem; line-height: 1.82; }
.letter-inline-photo {
  position: relative;
  float: right;
  width: 43%;
  max-width: 190px;
  min-width: 112px;
  aspect-ratio: 3 / 4;
  margin: .25rem 0 .8rem .9rem;
  padding: 7px 7px 23px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  overflow: hidden;
  border: 1px solid #E7DAD3;
  background: #FFFCF7;
  color: var(--wine);
  text-align: center;
  font-size: .66rem;
  line-height: 1.3;
  box-shadow: 0 5px 14px rgba(67,39,49,.14);
  transform: rotate(2deg);
}
.letter-inline-photo.photo-left { float: left; margin: .25rem .9rem .8rem 0; transform: rotate(-2.5deg); }
.letter-inline-photo .photo-asset { position: absolute; inset: 7px 7px 23px; width: calc(100% - 14px); height: calc(100% - 30px); object-fit: cover; }
.letter-inline-photo.has-photo { padding: 7px 7px 23px; }
.letter-inline-photo .photo-fallback-title { max-width: 100%; padding: 0 .15rem; font-size: .68rem; }
.letter-inline-photo .photo-fallback-note { position: absolute; bottom: 5px; left: 3px; right: 3px; font-size: .56rem; }
.letter-eyes-photo { width: 46%; max-width: 210px; aspect-ratio: 4 / 5; }
.letter-smile-photo { width: 45%; max-width: 200px; }
.letter-favorite-photo { width: 46%; max-width: 205px; }
@media (max-width: 380px) {
  .letter-inline-photo { width: 41%; min-width: 100px; margin-left: .65rem; }
  .letter-inline-photo.photo-left { margin-right: .65rem; margin-left: 0; }
  .letter-editorial-block p { line-height: 1.75; }
}



/* Capa da música: coloque o arquivo em assets/audio/capa-musica.jpg */
.album-art { position: relative; overflow: hidden; }
.album-art .album-cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 1;
}
.album-art.has-cover .album-cover-image { opacity: 1; }
.album-art.has-cover .album-flower,
.album-art.has-cover .album-art-caption { display: none; }
.album-art .album-flower,
.album-art .album-art-caption { position: relative; z-index: 2; }



/* Player musical cinematográfico: card expandido, vinil e forma de onda */
.music-section .section-inner { transition: max-width .55s ease, padding .55s ease; }
.music-card {
  position: relative;
  isolation: isolate;
  overflow: visible;
  transition: width .55s ease, max-width .55s ease, padding .55s ease, box-shadow .45s ease;
}
.music-card.is-active {
  width: min(100%, 1120px);
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(1rem, 3vw, 1.6rem);
  box-shadow: 0 24px 70px rgba(103,71,83,.17);
}
.music-card.is-active .album-art {
  transform: translateX(-9%);
  transition: transform .55s cubic-bezier(.2,.75,.25,1);
}
.album-art {
  position: relative;
  z-index: 2;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform .55s cubic-bezier(.2,.75,.25,1), box-shadow .45s ease;
  box-shadow: 0 8px 22px rgba(103,71,83,.08);
}
.music-card::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: clamp(2.4rem, 10vw, 7rem);
  top: 50%;
  width: clamp(175px, 32vw, 310px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-7%, -50%) rotate(-25deg) scale(.88);
  pointer-events: none;
  background:
    radial-gradient(circle at center, #E9C5CF 0 5%, #352A32 5.5% 8%, transparent 8.5%),
    repeating-radial-gradient(circle at center, #30252D 0 2px, #44333F 3px 5px, #261F27 6px 8px),
    #30252D;
  border: 5px solid #241D24;
  box-shadow: 0 12px 25px rgba(36,29,36,.3);
  transition: opacity .45s ease, transform .75s cubic-bezier(.2,.75,.25,1);
}
.music-card.is-active::before {
  opacity: 1;
  transform: translate(0, -50%) rotate(0deg) scale(1);
}
.music-card.is-playing::before {
  transform-origin: 50% 50%;
  animation: vinyl-spin 3.5s linear infinite;
}
@keyframes vinyl-spin {
  from { transform: translate(0, -50%) rotate(0deg) scale(1); }
  to   { transform: translate(0, -50%) rotate(360deg) scale(1); }
}
.album-art .album-cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 3;
}
.album-art.has-cover .album-cover-image { opacity: 1; }
.album-art.has-cover .album-flower,
.album-art.has-cover .album-art-caption { display: none; }
.album-art .album-flower,
.album-art .album-art-caption { position: relative; z-index: 2; }
.music-info { position: relative; z-index: 4; min-width: 0; }
.audio-controls { margin-bottom: .6rem; }
.audio-toggle { width: 3rem; height: 3rem; font-size: 1rem; flex: 0 0 auto; }
.audio-toggle[aria-pressed="true"] { background: #674753; }
.waveform-wrap { width: 100%; max-width: 520px; margin: .5rem 0 1rem; }
.waveform {
  height: 34px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: pan-y;
  outline-offset: 5px;
  border-radius: 6px;
}
.waveform-bars { display: flex; align-items: center; justify-content: space-between; gap: 2px; width: 100%; height: 100%; }
.waveform-bar {
  display: block;
  flex: 1 1 0;
  min-width: 2px;
  max-width: 5px;
  height: var(--bar-height, 35%);
  border-radius: 5px;
  background: #E6C9D2;
  transition: background-color .12s linear, height .12s ease;
}
.waveform-bar.is-played { background: #C98298; }
.audio-time { display: flex; justify-content: space-between; gap: 1rem; margin-top: .3rem; color: var(--wine-soft); font-size: .68rem; font-variant-numeric: tabular-nums; }
@media (min-width: 640px) {
  .music-card.is-active { grid-template-columns: minmax(230px, .9fr) minmax(0, 1.1fr); gap: clamp(1.6rem, 4vw, 3rem); }
  .music-card.is-active .album-art { transform: translateX(-5%); }
  .music-card::before { left: clamp(3rem, 8vw, 7rem); }
}
@media (max-width: 639px) {
  .music-card.is-active { width: calc(100% + 1rem); margin-left: -.5rem; padding: 1rem; }
  .music-card.is-active .album-art { transform: translateX(-7%); }
  .music-card::before { left: 2.25rem; top: 22%; width: min(58vw, 230px); }
  .music-card.is-active .music-info { padding-top: .2rem; }
  .waveform-wrap { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .music-card, .music-card::before, .album-art, .music-section .section-inner { transition: none !important; }
  .music-card.is-playing::before { animation: none; }
}



/* Paleta inspirada no Spotify: carvão, verde e texto claro */
.music-section { background: #F4F6F4; }
.music-card {
  background: #121212;
  border: 1px solid #2B2B2B;
  color: #FFFFFF;
  box-shadow: 0 22px 60px rgba(0,0,0,.18);
}
.music-card.is-active {
  background: linear-gradient(135deg, #171717 0%, #101810 100%);
  border-color: rgba(29,185,84,.45);
  box-shadow: 0 26px 75px rgba(18,75,38,.22);
}
.music-info h3,
.music-info .artist,
.music-info .audio-status,
.music-info .controls-hint,
.music-info .audio-time { color: #F5F5F5; }
.music-info .music-label { color: #1ED760; }
.music-info .text-link { color: #1ED760; }
.round-button,
.audio-toggle { background: #1DB954; color: #07140B; font-weight: 700; }
.audio-toggle[aria-pressed="true"] { background: #1ED760; color: #07140B; }
.waveform-bar { background: #315B40; }
.waveform-bar.is-played { background: #1ED760; }

/* Vinil: posicionado na borda direita da capa, girando em torno do próprio eixo. */
.music-card::before {
  left: clamp(18rem, 28vw, 23rem);
  top: 50%;
  width: clamp(190px, 29vw, 310px);
  opacity: 0;
  transform: translate(0, -50%) rotate(0deg) scale(.94);
  background:
    radial-gradient(circle at center, #1ED760 0 3.5%, #DFFFEA 3.8% 4.8%, #101010 5.2% 8%, transparent 8.4%),
    repeating-radial-gradient(circle at center, #111 0 2px, #292929 3px 4px, #171717 5px 7px),
    #101010;
  border: 5px solid #080808;
  box-shadow: 0 14px 28px rgba(0,0,0,.42);
  transition: opacity .45s ease, transform .6s cubic-bezier(.2,.75,.25,1);
}
.music-card.is-active::before {
  opacity: 1;
  transform: translate(0, -50%) rotate(0deg) scale(1);
}
.music-card.is-playing::before {
  animation: vinyl-spin 3.5s linear infinite;
}
@keyframes vinyl-spin {
  from { transform: translate(0, -50%) rotate(0deg) scale(1); }
  to   { transform: translate(0, -50%) rotate(360deg) scale(1); }
}
.music-card.is-active .album-art {
  transform: translateX(-9%);
  box-shadow: 0 10px 28px rgba(0,0,0,.3);
}
.album-art { box-shadow: 0 10px 28px rgba(0,0,0,.3); }
@media (min-width: 640px) {
  .music-card.is-active { grid-template-columns: minmax(230px, .9fr) minmax(0, 1.1fr); }
  .music-card::before { left: clamp(18rem, 28vw, 23rem); }
}
@media (max-width: 639px) {
  .music-section { padding-left: .75rem; padding-right: .75rem; }
  .music-card.is-active { width: calc(100% + .5rem); margin-left: -.25rem; }
  .music-card.is-active .album-art { transform: translateX(-7%); }
  .music-card::before {
    left: 2.25rem;
    top: 22%;
    width: min(58vw, 230px);
  }
  .music-info .text-link { color: #1ED760; }
}



/* Ajuste de proporções do cartão musical, seguindo a referência visual */
.music-section .section-inner {
  width: min(100%, 64rem);
}
.music-card,
.music-card.is-active {
  width: min(100%, 980px);
  max-width: 980px;
  margin: 2rem auto 1rem;
  padding: clamp(1rem, 2.2vw, 1.4rem);
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  box-sizing: border-box;
}
.music-card.is-active .album-art {
  width: 100%;
  min-width: 0;
  transform: none;
}
.music-card::before {
  left: 21%;
  top: 50%;
  width: clamp(190px, 24vw, 245px);
  max-width: 30%;
  z-index: 1;
  transform: translate(0, -50%) rotate(0deg) scale(.94);
}
.music-card.is-active::before {
  transform: translate(0, -50%) rotate(0deg) scale(1);
}
.music-card.is-playing::before {
  animation: vinyl-spin 3.5s linear infinite;
}
.music-card .music-info {
  min-width: 0;
  overflow-wrap: anywhere;
}
.music-card .waveform-wrap {
  width: 100%;
  max-width: 100%;
}
.music-card .waveform-bars {
  gap: 3px;
}
.music-card .waveform-bar {
  min-width: 2px;
  max-width: 5px;
}
.album-art {
  min-width: 0;
  aspect-ratio: 1;
}

/* Em telas pequenas, a capa e o disco ficam em um bloco próprio acima dos controles. */
@media (max-width: 639px) {
  .music-section {
    padding-left: .85rem;
    padding-right: .85rem;
  }
  .music-card,
  .music-card.is-active {
    width: 100%;
    max-width: 430px;
    margin: 1.5rem auto 1rem;
    padding: 1rem;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }
  .music-card .album-art,
  .music-card.is-active .album-art {
    width: 76%;
    max-width: 285px;
    justify-self: start;
    transform: none;
    position: relative;
    z-index: 2;
  }
  .music-card::before {
    left: 43%;
    top: calc(1rem + min(76vw, 285px) / 2);
    width: min(52vw, 190px);
    max-width: none;
    transform: translate(0, -50%) rotate(0deg) scale(.94);
  }
  .music-card.is-active::before {
    transform: translate(0, -50%) rotate(0deg) scale(1);
  }
  .music-card .music-info {
    padding-top: 0;
  }
  .music-card .audio-controls {
    margin-top: .8rem;
  }
  .music-card .waveform {
    height: 32px;
  }
}
@media (max-width: 360px) {
  .music-card,
  .music-card.is-active {
    padding: .8rem;
  }
  .music-card .album-art,
  .music-card.is-active .album-art {
    width: 74%;
  }
  .music-card::before {
    left: 42%;
    width: 165px;
  }
}
