/* memorias.boook.ing — 14/10/2026 */
:root { --creme: #FFFBF3; --tinta: #1f1b17; --cinza: #8a847a; --linha: #e6e0d4; --rubi: #AC0000; }
* { box-sizing: border-box; }
a, button, input, select, textarea, [tabindex] { outline: none; -webkit-tap-highlight-color: transparent; }
:focus, :focus-visible { outline: none; box-shadow: none; }
html, body { margin: 0; background: var(--creme); color: var(--tinta); }
body { font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; text-transform: lowercase; min-height: 100vh; min-height: 100dvh; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-transform: lowercase; }
a { color: inherit; }

/* entrada */
.capa { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 96px 24px 64px; gap: 40px; }
.capa h1 { font-weight: 600; font-size: clamp(34px, 9vw, 56px); line-height: 1.05; letter-spacing: -.02em; margin: 0; max-width: 11ch; text-wrap: balance; }
.pilula { display: inline-block; background: var(--rubi); color: var(--creme); border-radius: 999px; padding: 16px 36px; font-size: 18px; font-weight: 600; text-decoration: none; }
.pilula.leve { background: transparent; color: var(--rubi); box-shadow: inset 0 0 0 1.5px var(--rubi); }
.pilula:disabled { opacity: .5; }
.meus { display: flex; flex-direction: column; gap: 10px; align-items: center; font-size: 15px; color: var(--cinza); }
.meus a { color: var(--tinta); text-decoration: none; }

/* deck */
.topo { padding: 72px 16px 8px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.titulo { font-weight: 600; font-size: 28px; letter-spacing: -.01em; border: 0; background: none; text-align: center; width: 100%; max-width: 560px; color: var(--tinta); font-family: inherit; text-transform: lowercase; padding: 0; }
.titulo::placeholder { color: #c8c4b9; }
.conta { font-size: 15px; color: var(--cinza); font-variant-numeric: tabular-nums; }
.acoes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 8px 16px 20px; }
.acoes .pilula { padding: 11px 18px; font-size: 14px; }
.acoes .linkinho { flex-basis: 100%; text-align: center; font-size: 13px; color: var(--cinza); padding-top: 4px; }
.vazio { display: flex; justify-content: center; padding: 48px 16px 96px; }
.vazio .pilula { padding: 22px 40px; font-size: 20px; }

.grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 8px 16px 96px; max-width: 980px; margin: 0 auto; }
@media (min-width: 640px) { .grade { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 900px) { .grade { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* a carta: 9:16, cantos = 10% da largura, borda creme */
.carta { position: relative; aspect-ratio: 9 / 16; border-radius: 10% / 5.625%; background: var(--creme); padding: 4.5%; box-shadow: 0 1px 2px rgba(31,27,23,.08), 0 6px 18px rgba(31,27,23,.10); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.carta .foto { width: 100%; height: 100%; border-radius: 6.5% / 3.6%; overflow: hidden; background: #ece6da; }
.carta img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.carta .num { position: absolute; left: 0; right: 0; bottom: -22px; text-align: center; font-size: 11px; color: var(--cinza); font-variant-numeric: tabular-nums; }
.carta .marca { position: absolute; top: 9%; right: 11%; width: 8px; height: 8px; border-radius: 50%; background: var(--rubi); box-shadow: 0 0 0 2px var(--creme); }
.carta.subindo .foto { opacity: .45; }
.carta.fantasma { opacity: .3; }
.carta.escondida { visibility: hidden; }
.grade .carta { margin-bottom: 18px; }

/* aberta: cresce e vira */
.fundo { position: fixed; inset: 0; background: rgba(255,251,243,.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .45s ease; z-index: 10; }
.fundo.on { opacity: 1; }
.palco { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 11; pointer-events: none; perspective: 1600px; }
.grande { position: relative; width: min(88vw, calc(84dvh * 9 / 16)); aspect-ratio: 9 / 16; pointer-events: auto; transform-origin: 0 0; will-change: transform; }
.vira { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.75,.2,1); }
.grande.virada .vira { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: 10% / 5.625%; background: var(--creme); padding: 4.5%; -webkit-backface-visibility: hidden; backface-visibility: hidden; box-shadow: 0 2px 6px rgba(31,27,23,.10), 0 24px 60px rgba(31,27,23,.18); overflow: hidden; }
.face.frente .foto { width: 100%; height: 100%; border-radius: 6.5% / 3.6%; overflow: hidden; background: #ece6da; }
.face.frente img { width: 100%; height: 100%; object-fit: cover; display: block; }
.face.verso { transform: rotateY(180deg); display: flex; flex-direction: column; padding: 14% 12% 11%; gap: 16px; }
/* depois de virar, tira o 3d (o teclado do iPhone se perde dentro do 3d) */
.grande.pousada .vira { transform: none; transition: none; }
.grande.pousada .face.frente { display: none; }
.grande.pousada .face.verso { transform: none; }

.verso .numero { font-size: 14px; color: var(--cinza); font-variant-numeric: tabular-nums; text-align: center; }
.verso textarea, .verso .texto { flex: 1; width: 100%; border: 0; resize: none; background: transparent; font: inherit; font-size: 18px; line-height: 1.45; color: var(--tinta); padding: 0; text-transform: none; overflow-y: auto; white-space: pre-wrap; text-align: center; }
.verso textarea::placeholder { color: #c8c4b9; text-transform: lowercase; }
.verso .texto:empty { display: none; }
.gravador { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.gravador .linha { display: flex; gap: 14px; align-items: center; justify-content: center; min-height: 18px; }
.bola { width: 68px; height: 68px; border-radius: 50%; background: var(--creme); box-shadow: inset 0 0 0 2px var(--rubi); display: flex; align-items: center; justify-content: center; flex: none; }
.bola i { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--rubi); transition: border-radius .2s, width .2s, height .2s; }
.bola.gravando i { width: 22px; height: 22px; border-radius: 5px; }
.bola.tocar i { width: 0; height: 0; border-radius: 0; background: none; border-left: 20px solid var(--rubi); border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 6px; }
.bola.tocando i { width: 20px; height: 22px; border-radius: 0; background: none; border-left: 6px solid var(--rubi); border-right: 6px solid var(--rubi); margin-left: 0; }
.bola.gravando { animation: pulsa 1.2s ease-in-out infinite; }
@keyframes pulsa { 50% { box-shadow: inset 0 0 0 2px var(--rubi), 0 0 0 8px rgba(172,0,0,.12); } }
.miudo { font-size: 13px; color: var(--cinza); font-variant-numeric: tabular-nums; }
.miudo.botao { color: var(--rubi); }
.rodape-verso { display: flex; justify-content: center; }

.aviso { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--tinta); color: var(--creme); padding: 12px 20px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .25s, transform .25s; z-index: 30; pointer-events: none; white-space: nowrap; }
.aviso.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.progresso { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 14px; background: rgba(255,251,243,.92); z-index: 20; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.progresso.on { display: flex; }
.progresso .barra { width: 200px; height: 3px; background: var(--linha); border-radius: 3px; overflow: hidden; }
.progresso .barra i { display: block; height: 100%; width: 0; background: var(--rubi); transition: width .2s; }
.oculto { display: none !important; }
.msg { text-align: center; padding: 160px 24px; color: var(--cinza); font-size: 18px; }
