.entrance { position: fixed; inset: 0; z-index: 10000; overflow: hidden; background: #faf6eb; perspective: 1400px; touch-action: manipulation; }
.entrance[hidden] { display: none !important; }
html[data-entrance] .entrance { display: block !important; }
html[data-entrance] { overflow: hidden; }
.entrance-room { position: absolute; inset: 0; transform: scale(1.12); }
.entrance-room img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
.entrance-door { position: absolute; top: 0; bottom: 0; width: 50.1%; background-image: url("entrance-doors.webp"); background-size: 200% 100%; backface-visibility: hidden; }
.entrance-door-left { left: 0; background-position: left center; transform-origin: left center; }
.entrance-door-right { right: 0; background-position: right center; transform-origin: right center; }
.entrance-mark { position: absolute; left: 50%; top: 84%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 16px; opacity: 0; }
.entrance-machine { position: absolute; left: 50%; bottom: 26%; transform: translateX(-50%) scale(.42); transform-origin: bottom center; pointer-events: none; }
.entrance-machine .machine { width: 360px !important; }
.entrance-machine .glass { height: 260px !important; }
.entrance-mark strong { padding: 12px 22px; border: 2px solid #203047; background: #faf6eb; color: #203047; font: 700 clamp(20px, 5vw, 34px)/1.2 Georgia, serif; letter-spacing: .08em; white-space: nowrap; box-shadow: 5px 5px 0 #20304733; }
.entrance-ball { display: grid; place-items: center; width: 58px; height: 58px; border: 3px solid #203047; border-radius: 50%; background: linear-gradient(#faf6eb 49%, #203047 49% 53%, #bd5147 53%); color: #203047; font: bold 24px/1 Georgia, serif; }
.entrance-skip { position: absolute; right: max(20px, env(safe-area-inset-right)); top: max(20px, env(safe-area-inset-top)); min-height: 44px; padding: 10px 16px; border: 2px solid #203047; border-radius: 7px; color: #203047; background: #faf6eb; font: 15px/1.3 system-ui, sans-serif; cursor: pointer; }
.entrance-skip:focus-visible { outline: 3px solid #bd5147; outline-offset: 4px; }
.entrance.is-playing .entrance-door-left { animation: entranceLeft .95s cubic-bezier(.3,.05,.2,1) .1s both; }
.entrance.is-playing .entrance-door-right { animation: entranceRight .95s cubic-bezier(.3,.05,.2,1) .1s both; }
.entrance.is-playing .entrance-room { animation: entranceRoom 1.6s ease-out both; }
.entrance.is-playing .entrance-mark { animation: entranceMark .3s ease-out .95s both; }
.entrance.is-playing .entrance-ball { animation: entranceRoll .65s ease-out .95s both; }
.entrance.is-playing { animation: entranceFade .35s ease-in 1.85s forwards; }
@keyframes entranceLeft { to { transform: rotateY(-105deg); opacity: 0; } }
@keyframes entranceRight { to { transform: rotateY(105deg); opacity: 0; } }
@keyframes entranceRoom { to { transform: scale(1); } }
@keyframes entranceMark { from { opacity: 0; margin-top: 12px; } to { opacity: 1; margin-top: 0; } }
@keyframes entranceRoll { from { transform: translate(-90px,-60px) rotate(-160deg); } 65% { transform: translate(8px,3px) rotate(18deg); } to { transform: translate(0,0) rotate(0); } }
@keyframes entranceFade { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .entrance { display: none !important; } }
