@font-face { font-family: 'Lilita One'; src: url(fonts/lilita-one-latin-400-normal.woff2) format('woff2'); font-display: block; }
@font-face { font-family: 'Nunito'; font-weight: 900; src: url(fonts/nunito-latin-900-normal.woff2) format('woff2'); }
* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #2a1260; overflow: hidden; font-family: 'Nunito', system-ui, sans-serif; }
body { display: flex; align-items: center; justify-content: center; }
#frame { position: relative; height: 100vh; aspect-ratio: 9 / 16; max-width: 100vw; overflow: hidden; background: #ffd6e8; container-type: size; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
#hud { position: absolute; inset: 0; pointer-events: none; color: #fff; }
body.noui #hud, body.noui #help, body.film #hud, body.film #help, body.capture #help { display: none; }
#top { position: absolute; top: 2cqh; left: 3cqw; right: 3cqw; display: flex; justify-content: space-between; align-items: flex-start; }
#cast { display: flex; gap: 1.2cqw; }
.port { width: 6cqh; height: 6cqh; border-radius: 1.6cqh; border: .35cqh solid #fff; display: grid; place-items: center; font-family: 'Lilita One', sans-serif; font-size: 1.5cqh; color: #fff; box-shadow: 0 .5cqh 0 rgba(0,0,0,.25); }
.port.me { outline: .45cqh solid #ffe14d; outline-offset: .25cqh; }
.port.out { filter: grayscale(1) brightness(.7); }
.port.esc { background: #19c46f !important; }
#keybox { font-family: 'Lilita One', sans-serif; font-size: 2.4cqh; background: rgba(30,15,70,.6); border: .35cqh solid #fff; border-radius: 99px; padding: .6cqh 1.8cqh; }
#keybox.got { background: #ffb800; }
#msg { position: absolute; bottom: 9cqh; left: 0; right: 0; text-align: center; font-family: 'Lilita One', sans-serif; font-size: 2.6cqh; text-shadow: 0 .3cqh 0 #1b1035; }
#help { position: absolute; left: 0; right: 0; bottom: 0; padding: .6cqh 1cqh; background: rgba(0,0,0,.45); color: #fff; font-size: 1.2cqh; line-height: 1.4; text-align: center; z-index: 5; }

#fx { position: absolute; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 30; }
#flash.on { animation: flash .35s ease-out; }
@keyframes flash { 0% { opacity: .9 } 100% { opacity: 0 } }
#slam { position: absolute; left: 0; right: 0; top: 44cqh; text-align: center; pointer-events: none; z-index: 31; font-family: 'Lilita One', sans-serif; font-size: 8cqh; line-height: 1; color: #fff; -webkit-text-stroke: .5cqh #1b1035; paint-order: stroke fill; text-shadow: 0 1cqh 0 #1b1035; opacity: 0; }
#slam.on { animation: slam 1.3s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes slam { 0% { opacity: 0; transform: scale(3) rotate(-8deg) } 15% { opacity: 1; transform: scale(1) rotate(-4deg) } 80% { opacity: 1; transform: scale(1.04) rotate(-4deg) } 100% { opacity: 0; transform: scale(.9) rotate(-4deg) } }

#cap { white-space: pre-line; position: absolute; top: 5cqh; left: 2cqw; right: 2cqw; text-align: center; z-index: 32; pointer-events: none; font-family: 'Lilita One', sans-serif; font-size: 5.4cqh; line-height: 1.05; color: #fff; -webkit-text-stroke: .5cqh #1b1035; paint-order: stroke fill; text-shadow: 0 .8cqh 0 #1b1035; opacity: 0; }
#cap.on { animation: capIn .35s cubic-bezier(.2,1.7,.45,1) forwards; }
@keyframes capIn { 0% { opacity: 0; transform: scale(.4) rotate(-6deg) } 100% { opacity: 1; transform: scale(1) rotate(-2deg) } }

.rays { position: absolute; left: 50%; top: 42%; width: 220cqh; height: 220cqh; margin: -110cqh 0 0 -110cqh; background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.18) 0deg 9deg, rgba(255,255,255,0) 9deg 18deg); animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
#endcard { position: absolute; inset: 0; z-index: 40; overflow: hidden; background: radial-gradient(circle at 50% 42%, #ffe14d 0%, #ff9d1c 30%, #ff4f8b 62%, #8f2bd9 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; }
#endcard .logo { position: relative; text-align: center; font-family: 'Lilita One', sans-serif; line-height: .86; transform: rotate(-4deg); }
#endcard .l1, #endcard .l2 { font-size: 13cqh; color: #fff; -webkit-text-stroke: .8cqh #1b1035; paint-order: stroke fill; text-shadow: 0 1.4cqh 0 #1b1035; }
#endcard .l1 { color: #ffe14d; }
#endcard .l2 { color: #7cf06b; font-size: 11.5cqh; }
#endcard .lid { position: absolute; left: 50%; top: -6.5cqh; width: 36cqh; height: 6cqh; margin-left: -18cqh; background: #ff2d4f; border: .7cqh solid #1b1035; border-radius: 3cqh 3cqh 1cqh 1cqh; box-shadow: 0 1cqh 0 #1b1035; }
#endcard .lid::after { content: ''; position: absolute; left: 50%; top: -3.2cqh; width: 9cqh; height: 3.2cqh; margin-left: -4.5cqh; background: #ff2d4f; border: .7cqh solid #1b1035; border-bottom: 0; border-radius: 1.6cqh 1.6cqh 0 0; }
#endcard.play .lid { animation: lidDrop .5s cubic-bezier(.5,0,.75,0) .25s both, lidBounce .35s ease-out .75s; }
@keyframes lidDrop { 0% { transform: translateY(-60cqh) rotate(-20deg) } 100% { transform: none } }
@keyframes lidBounce { 0% { transform: none } 40% { transform: translateY(-2cqh) rotate(3deg) } 100% { transform: none } }
#endcard.play .logo { animation: logoSquash .35s ease-out .75s; }
@keyframes logoSquash { 0% { transform: rotate(-4deg) } 40% { transform: rotate(-4deg) scale(1.08, .88) } 100% { transform: rotate(-4deg) } }
#endcard .feat { position: relative; margin-top: 5cqh; font-family: 'Lilita One', sans-serif; font-size: 3.2cqh; color: #1b1035; background: #ffe14d; border: .4cqh solid #1b1035; padding: 1cqh 2.6cqh; border-radius: 99px; box-shadow: 0 .7cqh 0 #1b1035; transform: rotate(-2deg); }
#endcard .cta { position: relative; margin-top: 2.4cqh; font-family: 'Lilita One', sans-serif; font-size: 4cqh; color: #fff; background: #1b1035; border: .45cqh solid #fff; padding: 1.2cqh 3cqh; border-radius: 99px; box-shadow: 0 .8cqh 0 rgba(0,0,0,.35); animation: cta 1s ease-in-out infinite; }
@keyframes cta { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.07) } }
#loading { position: absolute; inset: 0; display: grid; place-items: center; background: #ffd6e8; font-family: 'Lilita One', sans-serif; font-size: 3cqh; color: #ff4f8b; z-index: 50; }
.pop { position: absolute; transform: translate(-50%, -50%); font-family: 'Lilita One', sans-serif; font-size: 4.2cqh; color: #fff; -webkit-text-stroke: .4cqh #1b1035; paint-order: stroke fill; text-shadow: 0 .5cqh 0 #1b1035; animation: popUp 1.1s ease-out forwards; white-space: nowrap; }
@keyframes popUp { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.4) } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) } 100% { opacity: 0; transform: translate(-50%, -180%) scale(1) } }
