body { min-height: 100dvh; }
.v { min-height: 100dvh; max-width: 520px; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; }
.logo { width: min(260px, 62vw); height: auto; }
h1.tit { font-size: clamp(2.1rem, 10vw, 3.2rem); text-wrap: balance; overflow-wrap: anywhere; max-width: 100%; }
.lead { font-size: 1.1rem; line-height: 1.4; max-width: 30ch; text-wrap: balance; }
.caja { width: 100%; padding: 22px; display: grid; gap: 12px; text-align: left; }
.err { min-height: 1.3em; color: #ffc2d9; font-size: .95rem; }
.grande { font-size: 1.35rem; padding: 20px 32px; width: 100%; }
.v .mono b { color: #fff; font-size: 1.1em; }

.v-carton { justify-content: flex-start; gap: 10px; height: 100dvh; min-height: 540px; padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom)); text-align: left; }
.cab { width: 100%; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 0 4px; }
.cab > div:first-child { display: grid; min-width: 0; }
.cab strong { font-size: 1.25rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marc { font-weight: 900; transform: skewX(-8deg); white-space: nowrap; line-height: 1; padding-right: 4px; }
.marc b { font-size: 2.4rem; color: #ff78b2; font-weight: 900; }
.marc > span { font-size: 1.1rem; }
.carton { flex: 1; width: 100%; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 8px; perspective: 700px; }
.cel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 6px; border-radius: 14px; border: 1.5px solid rgba(255, 255, 255, .22); background: rgba(26, 5, 70, .9); text-align: center; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: background .2s, border-color .2s, opacity .2s, transform .12s ease-out; }
.cel:active { transform: scale(.96); }
.cel .t { position: relative; z-index: 1; font-weight: 800; font-size: clamp(.9rem, 4.4vw, 1.25rem); line-height: 1.08; overflow-wrap: break-word; text-wrap: balance; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cel .a { position: relative; z-index: 1; font-size: clamp(.74rem, 3.3vw, .95rem); line-height: 1.1; color: var(--white-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cel.si { background: var(--pink-2); border-color: #ff8dbc; }
.cel.si .a { color: #fff; }
/* Marcado: el damero de la invitación en la esquina */
.cel.si::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(45deg, rgba(255,255,255,.4) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.4) 75%), linear-gradient(45deg, rgba(255,255,255,.4) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.4) 75%); background-size: 14px 14px; background-position: 0 0, 7px 7px; -webkit-mask-image: linear-gradient(315deg, #000 6%, transparent 26%); mask-image: linear-gradient(315deg, #000 6%, transparent 26%); }
.cel.pop { animation: pop .38s cubic-bezier(.2, 1.2, .4, 1); }
.cel.mal { animation: mal .4s ease-out; border-color: #ffc2d9; }
.carton.freno .cel:not(.si) { opacity: .5; }
.carton.quieto .cel { cursor: default; }
.carton.quieto .cel:active { transform: none; }
.cel.nace { animation: nace .42s cubic-bezier(.2, .9, .3, 1) backwards; animation-delay: calc(var(--i) * 55ms); }
@keyframes pop { 0% { transform: scale(.9); } 55% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes mal { 20% { transform: translateX(-7px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-4px); } }
@keyframes nace { from { opacity: 0; transform: rotateX(80deg) scale(.9); } }
.pie { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 2px 4px; min-height: 1.6em; }
.pie .mono { color: #fff; letter-spacing: .06em; }
.aviso { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); background: #fff; color: var(--violet); font-weight: 800; border-radius: 14px; padding: 12px 18px; z-index: 20; text-align: center; box-shadow: 0 10px 40px rgba(10, 0, 40, .5); }
.bingo { position: fixed; inset: 0; z-index: 40; background: rgba(26, 5, 80, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; text-align: center; }
.bingo .tit { font-size: clamp(4rem, 23vw, 8rem); color: var(--pink-soft); animation: golpe .6s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes golpe { 0% { transform: skewX(-8deg) scale(.6); } 60% { transform: skewX(-8deg) scale(1.08); } }
.bingo p { font-size: 1.3rem; max-width: 24ch; line-height: 1.3; text-wrap: balance; }
body:has(.v-carton:not([hidden])) .pixels { opacity: .28; }
