/* Mesas 11 a 14 y botones de la cabecera. 1px = 1 píxel del diseño. */

/* Cabecera del inicio */
.rule-home { top: 165px; }
.tag-home { top: 106.5px; }
.nav-l, .nav-r { position: absolute; top: 101px; }
.nav-l { left: 77px; width: 267px; }
.nav-r { left: 1578px; width: 265px; }

/* La firma de la mesa 10 no debe tapar los botones cuando esa mesa está oculta */
.stage:not([data-view="story"]) .story-right .firma-negra { visibility: hidden; }

/* Páginas nuevas */
.page { position: absolute; z-index: 6; top: calc(-1 * var(--bv)); bottom: calc(-1 * var(--bv)); left: calc(-1 * var(--bl)); right: calc(-1 * var(--bl)); background: var(--cream); opacity: 0; visibility: hidden; transition: opacity .55s var(--soft), visibility 0s .55s; }
.page-in { position: absolute; left: var(--bl); top: var(--bv); width: 1920px; height: 1080px; }
.stage[data-page="firmar"] .sign, .stage[data-page="gracias"] .thanks,
.stage[data-page="mural"] .wall, .stage[data-page="resultado"] .wall { opacity: 1; visibility: visible; transition: opacity .6s var(--soft), visibility 0s; }

.pill.big { height: 66px; border-radius: 33px; font-size: 46.1px; letter-spacing: -4.2px; gap: 11px; padding-bottom: 5px; }
.pill.big .arr { width: 30px; height: 22.6px; }
.field { position: absolute; border: 0; outline: 0; background: transparent; color: #000; text-align: center; font: inherit; font-size: 28.3px; letter-spacing: -2.6px; padding: 0 12px; }
.field::-webkit-search-cancel-button, .field::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.field::placeholder { color: rgba(0, 0, 0, .25); opacity: 1; transition: color .25s; }
.ln { position: absolute; display: block; height: 1.4px; background: #000; transition: background .25s; }
.form-msg { color: var(--red); }

/* Mesa 11 */
.sign .back-sign { left: 121px; top: 100px; width: 155px; }
.back-sign { position: absolute; box-shadow: none; border: 1px solid #000; background: transparent; }
#f-nombre { left: 121px; top: 306px; width: 843px; height: 46px; }
.ln-nombre { left: 121px; top: 353px; width: 843px; }
#f-correo { left: 121px; top: 435px; width: 843px; height: 46px; }
.ln-correo { left: 121px; top: 482px; width: 843px; }
.f-enviar { position: absolute; left: 426px; top: 547px; width: 233px; }
.f-enviar[aria-busy="true"] { opacity: .5; cursor: progress; }
.f-enviar.shake { animation: shake .46s cubic-bezier(.36, .07, .19, .97); }
.declara { position: absolute; left: 180px; top: 671px; width: 740px; display: block; cursor: pointer; font-size: 21.25px; line-height: 26.4px; padding-left: 40px; }
.declara input { position: absolute; left: 0; top: 0; width: 26px; height: 26px; margin: 0; appearance: none; -webkit-appearance: none; background: transparent; border: 1px solid #000; border-radius: 0; cursor: pointer; transition: border-color .2s, background .2s; }
.declara input:checked { background: #000; box-shadow: inset 0 0 0 4px var(--cream); }
.declara input:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.form-msg { position: absolute; left: 121px; top: 778px; width: 843px; min-height: 26px; text-align: center; font-size: 20px; line-height: 26px; }
.pad-box { position: absolute; left: 1087px; top: 80px; width: 753px; height: 767px; background: #fff; transition: box-shadow .25s; }
#pad { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
#pad-borrar { position: absolute; right: 14px; bottom: 12px; border: 0; background: transparent; color: #000; font: inherit; font-size: 19px; letter-spacing: -1px; padding: 6px 8px; cursor: pointer; opacity: .55; transition: opacity .2s; }
#pad-borrar:hover { opacity: 1; }
.pad-t { position: absolute; left: 1087px; width: 753px; text-align: center; }
.pad-h { top: 874px; font-size: 33.7px; line-height: 1.2; }
.ln-pad { left: 1208px; top: 922px; width: 509px; height: 1px; opacity: .8; }
.pad-p { top: 934px; font-size: 19.8px; line-height: 25px; }
.pad-p2 { top: 1013px; font-size: 19.8px; line-height: 25px; }
.e-nombre #f-nombre::placeholder, .e-correo #f-correo::placeholder { color: var(--red); }
.e-nombre .ln-nombre, .e-correo .ln-correo { background: var(--red); }
.e-check .declara input { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.e-check .declara { color: var(--red); }
.e-firma .pad-box { box-shadow: 0 0 0 2px var(--red); }

/* Mesa 12 */
.thanks h2 { position: absolute; left: 0; width: 1920px; top: 312px; text-align: center; font-size: 53.8px; font-weight: 700; line-height: 1.2; }
.ok { position: absolute; left: 856px; top: 424px; width: 208px; height: 208px; fill: none; stroke: #000; stroke-width: 2; }
.ok path { stroke-width: 3; stroke-linejoin: round; }
.ok circle, .ok path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.stage[data-page="gracias"] .ok circle { animation: traza 1s var(--ease) .15s forwards; }
.stage[data-page="gracias"] .ok path { animation: traza .55s var(--ease) .95s forwards; }
@keyframes traza { to { stroke-dashoffset: 0; } }
.t-inicio { position: absolute; left: 616px; top: 693px; width: 231px; }
.t-mural { position: absolute; left: 879px; top: 693px; width: 425px; }

/* Mesa 13 */
.wall-head { position: absolute; left: 0; top: 0; width: 1920px; height: 345px; transition: transform .7s var(--soft); }
.stage[data-page="resultado"] .wall-head { transform: translateY(-19px); }
.w-inicio { position: absolute; left: 844px; top: 70px; width: 231px; }
.wall-head h2 { position: absolute; left: 0; width: 1920px; top: 206px; text-align: center; font-size: 33.7px; line-height: 1.2; }
#q { left: 539px; top: 292px; width: 842px; height: 46px; }
.ln-q { left: 539px; top: 341px; width: 842px; }
.e-q #q::placeholder { color: var(--red); }
.e-q .ln-q { background: var(--red); }
#buscar-msg { position: absolute; left: 0; width: 1920px; top: 352px; text-align: center; font-size: 20px; line-height: 26px; color: var(--red); }
.nube-box { position: absolute; left: 380px; top: 440px; width: 1160px; height: 560px; transition: opacity .5s var(--soft); }
.stage[data-page="resultado"] .nube-box { opacity: 0; pointer-events: none; }
#nube { position: absolute; inset: 0; }
.fm { position: absolute; aspect-ratio: 2.2; margin: 0; transform: translate(-50%, -50%); opacity: var(--o); transition: opacity .9s var(--soft); color: #000; }
.fm.fuera { opacity: 0; }
.fm svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: flota var(--d) ease-in-out var(--e) infinite alternate; }
.fm path, .res-firma path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.fm-c path { stroke-width: 2.6px; } .fm-m path { stroke-width: 2px; } .fm-l path { stroke-width: 1.6px; }
@keyframes flota { from { transform: translate(-6px, 5px) rotate(calc(-1 * var(--r))); } to { transform: translate(6px, -5px) rotate(var(--r)); } }
#mural-vacio { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; text-align: center; font-size: 22px; }
#mural-vacio[hidden] { display: none; }

/* Mesa 14 */
.res { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; opacity: 0; visibility: hidden; transition: opacity .6s var(--soft), visibility 0s .6s; }
.stage[data-page="resultado"] .res { opacity: 1; visibility: visible; transition: opacity .7s var(--soft) .15s, visibility 0s; }
.res-yo { position: absolute; left: 0; width: 1890px; top: 378px; text-align: center; font-size: 74.6px; font-weight: 700; line-height: 1.2; }
.res-firma { position: absolute; left: 700px; top: 498px; width: 520px; height: 192px; color: #000; }
.res-firma svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.res-firma path { stroke-width: 4.6px; }
.res-firma.nueva { animation: fade .6s var(--soft); }
.res-q { position: absolute; left: 0; width: 1920px; top: 752px; text-align: center; font-size: 74.6px; font-weight: 700; line-height: 1.2; }
#res-nota { position: absolute; left: 0; width: 1920px; top: 866px; text-align: center; font-size: 20px; line-height: 26px; }
.r-volver { position: absolute; left: 744px; top: 912px; width: 432px; }
/* El resultado no debe tapar el buscador ni el botón de inicio */
.res { pointer-events: none; }
.stage[data-page="resultado"] .res .r-volver, .stage[data-page="resultado"] .res .qr-box * { pointer-events: auto; }
.wall-head { z-index: 2; }
/* QR para la historia de Instagram */
.qr-box { position: absolute; left: 1590px; top: 410px; width: 280px; text-align: center; }
.qr { width: 196px; height: 196px; margin: 0 auto; padding: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.qr svg { display: block; width: 100%; height: 100%; }
.qr-t { margin-top: 16px; font-size: 19px; line-height: 24px; letter-spacing: -1px; }
.qr-link { margin-top: 18px; height: 40px; padding: 0 16px 2px; font-size: 22px; letter-spacing: -2.2px; }
.qr-box .qr { transform: scale(.96); opacity: 0; transition: opacity .7s var(--soft) .45s, transform .9s var(--soft) .45s; }
.stage[data-page="resultado"] .qr-box .qr { opacity: 1; transform: none; }

/* Pantallas verticales */
@media (max-aspect-ratio: 1/1), (max-width: 760px) {
  .stage[data-page] .home, .stage[data-page] .mods { display: none; }
  .nav-l, .nav-r { position: static; display: inline-flex; width: auto; height: 34px; padding: 0 12px 2px; margin: 12px 3px 0; font-size: 17px; letter-spacing: -1.6px; }
  .rule-home { margin-top: 12px; }
  .page { position: relative; inset: auto; display: none; opacity: 1; visibility: visible; min-height: 100dvh; }
  .stage[data-page="firmar"] .sign, .stage[data-page="gracias"] .thanks, .stage[data-page="mural"] .wall, .stage[data-page="resultado"] .wall { display: block; }
  .page-in { position: relative; left: 0; top: 0; width: auto; height: auto; min-height: 100dvh; padding: 18px 16px 28px; }
  .pill.big { font-size: 23px; letter-spacing: -2.2px; height: 42px; gap: 6px; padding-bottom: 3px; }
  .pill.big .arr { width: 20.4px; height: 15.4px; }
  .field { position: static; width: 100% !important; height: 44px !important; font-size: 17px; letter-spacing: -1.2px; }
  .ln, .ln-pad { position: static; width: auto !important; height: 1px; }

  #form-firma { display: flex; flex-direction: column; }
  .sign .back-sign { position: relative; left: auto; top: auto; align-self: flex-start; width: 110px; }
  #f-nombre { margin-top: 14px; } #f-correo { margin-top: 8px; }
  .pad-box { position: relative; left: auto; top: auto; width: 100%; height: auto; aspect-ratio: 1 / .78; margin-top: 22px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
  .pad-t { position: static; width: auto; }
  .pad-h { font-size: 21px; margin-top: 14px; }
  .ln-pad { margin: 8px 12% 0; }
  .pad-p, .pad-p2 { font-size: 13.5px; line-height: 19px; margin-top: 10px; }
  .pad-p2 { display: none; }
  .declara { position: relative; left: auto; top: auto; width: auto; margin-top: 20px; font-size: 13.5px; line-height: 19px; padding-left: 32px; }
  .declara br { display: none; }
  .declara input { width: 22px; height: 22px; }
  .form-msg { position: static; width: auto; margin-top: 12px; font-size: 14px; line-height: 19px; }
  .f-enviar { position: relative; left: auto; top: auto; align-self: center; width: 150px; margin-top: 12px; }
  .pad-box { order: 1; } .pad-h { order: 2; } .ln-pad { order: 3; } .pad-p { order: 4; } .declara { order: 5; } .form-msg { order: 6; } .f-enviar { order: 7; }

  .thanks .page-in { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
  .thanks h2 { position: static; width: auto; font-size: 27px; }
  .ok { position: static; width: 132px; height: 132px; }
  .t-inicio, .t-mural { position: static; width: 240px; }

  .wall-head { position: static; width: auto; height: auto; text-align: center; }
  .stage[data-page="resultado"] .wall-head { transform: none; }
  .w-inicio { position: relative; left: auto; top: auto; display: inline-flex; width: 150px; }
  .wall-head h2 { position: static; width: auto; font-size: 21px; margin-top: 20px; }
  #q { margin-top: 8px; }
  #buscar-msg { position: static; width: auto; margin-top: 10px; font-size: 14px; min-height: 19px; }
  .nube-box { position: relative; left: auto; top: auto; width: 118%; height: 56dvh; margin: 10px -9% 0; }
  .stage[data-page="resultado"] .nube-box { display: none; }
  #mural-vacio { font-size: 15px; padding: 0 12%; }
  .fm-c path { stroke-width: 2px; } .fm-m path { stroke-width: 1.5px; } .fm-l path { stroke-width: 1.2px; }
  .res { position: static; width: auto; height: auto; display: none; margin-top: 18px; text-align: center; }
  .stage[data-page="resultado"] .res { display: flex; flex-direction: column; align-items: center; gap: 12px; }
  .res-yo, .res-q, #res-nota { position: static; width: auto; }
  .res-yo { font-size: 42px; align-self: center; }
  .res-q { font-size: 25px; }
  .res-firma { position: relative; left: auto; top: auto; width: 86%; height: 30dvh; max-height: 200px; }
  .res-firma path { stroke-width: 3px; }
  #res-nota { font-size: 14px; line-height: 19px; }
  .r-volver { position: static; width: 240px; margin-top: 10px; }
  .qr-box { position: static; width: auto; margin-top: 18px; }
  .qr, .qr-t { display: none; }
  .qr-link { margin-top: 0; }
}
