/* PICK A DOOR episodes 01–10: the player (film, choice, scene, ending), its HUD and the catalog.
   Layering inside .ep-stage: blurred ambience (0) → 9:16 frame (1) → HUD (30) → pause menu (40).
   Layering inside the frame: film/still (0) → choice or scene (2) → spinner (4) → ending card (5) → skip/play (6). */

.ep-stage { z-index: 14; }
.ep-frame { z-index: 1; overflow: hidden; }
.ep-frame.ep-shake { animation: ep-shake .35s linear 1; }
@keyframes ep-shake { 20% { transform: translate(-6px, 2px); } 40% { transform: translate(5px, -3px); } 60% { transform: translate(-3px, 3px); } 80% { transform: translate(2px, -1px); } }

/* ---------------------------------------------------------------- HUD: always a way back, always a pause */
.ep-hud { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
.ep-hud > * { pointer-events: auto; }
.ep-back, .ep-pause { position: absolute; top: calc(10px + var(--safe-t)); min-height: 44px; font: 10px var(--pixel); color: var(--cream); background: rgba(18, 13, 28, .78); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(246, 231, 200, .25), 3px 3px 0 rgba(0, 0, 0, .5); }
.ep-back { left: 12px; padding: 0 12px; }
.ep-pause { right: 12px; width: 44px; font-size: 14px; }
.ep-back:hover, .ep-pause:hover { background: rgba(60, 40, 70, .9); }
.ep-title { position: absolute; top: calc(22px + var(--safe-t)); left: 50%; transform: translateX(-50%); max-width: calc(100% - 260px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 9px var(--pixel); color: rgba(246, 231, 200, .7); text-shadow: 0 2px 0 #000; pointer-events: none; }
.ep-timer { position: absolute; top: calc(62px + var(--safe-t)); left: 50%; transform: translateX(-50%); width: min(70vw, 320px); height: 6px; background: rgba(255, 255, 255, .14); border-radius: 3px; overflow: hidden; pointer-events: none; }
.ep-timer i { display: block; height: 100%; width: 100%; background: var(--mustard); transition: width .1s linear; }
.ep-timer.low i { background: var(--coral); }
.ep-goal { position: absolute; top: calc(74px + var(--safe-t)); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(92vw, 520px); padding: 6px 12px 5px; text-align: center; font: 22px/1.1 var(--term); color: #fff; background: rgba(10, 8, 16, .7); border-radius: 4px; text-shadow: 0 2px 0 #000; pointer-events: none; }
.ep-hint { position: absolute; bottom: calc(70px + var(--safe-b)); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(90vw, 480px); padding: 8px 14px 7px; text-align: center; font: 21px/1.15 var(--term); color: var(--ink); background: var(--mustard); border-radius: 3px; box-shadow: 3px 3px 0 #000; pointer-events: none; animation: fadein .25s; }
@media (max-width: 520px) {
  .ep-title { display: none; }
  .ep-back { font-size: 9px; padding: 0 10px; }
}

/* ---------------------------------------------------------------- pause */
.ep-pausemenu { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; background: rgba(8, 6, 12, .86); animation: fadein .2s; }
.ep-pausemenu h2 { margin: 0; font: 16px var(--pixel); color: #fff; letter-spacing: .1em; }
.ep-pause-row { display: flex; flex-direction: column; gap: 10px; width: min(84vw, 320px); }
.ep-pause-row button, .ep-result .ep-row button { min-height: 48px; padding: 10px 14px 9px; font: 11px var(--pixel); color: var(--cream); background: rgba(40, 30, 54, .9); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(246, 231, 200, .25), 3px 3px 0 #000; }
.ep-pause-row button.primary, .ep-result .ep-row button.primary { background: var(--mustard); color: var(--ink); box-shadow: 3px 3px 0 #000; }
.ep-pause-row button:hover, .ep-result .ep-row button:hover { filter: brightness(1.15); }

/* ---------------------------------------------------------------- the film */
.ep-skip { z-index: 6; bottom: calc(18px + var(--safe-b)); min-height: 40px; }
.ep-frame .video-play { z-index: 6; }

/* ---------------------------------------------------------------- the choice frame */
.ep-choice { position: absolute; inset: 0; z-index: 2; animation: fadein .35s; }
.ep-band { position: absolute; left: 0; right: 0; top: 64%; height: 18%; background: linear-gradient(transparent, rgba(0, 0, 0, .72) 30%, rgba(0, 0, 0, .72) 70%, transparent); pointer-events: none; }
.ep-prompt { top: 70%; }
.ep-door { border-radius: 4px; }
.ep-door-label { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); white-space: nowrap; font: 9px var(--pixel); color: #fff; background: rgba(0, 0, 0, .66); padding: 5px 7px 4px; border-radius: 2px; pointer-events: none; opacity: .85; }
.ep-door.listening { background: rgba(var(--glow), .16); box-shadow: 0 0 60px 14px rgba(var(--glow), .75); animation: none; }
.ep-door.seen.safe::after { content: "✓"; color: rgba(140, 255, 170, .75); }
.ep-door.seen.escape::after { content: "↩"; color: rgba(255, 210, 120, .75); }
.ep-door.seen.strange::after { content: "?"; color: rgba(210, 170, 255, .75); }
/* what you notice while listening at a door */
.ep-tell { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; pointer-events: none; border-radius: inherit; }
.ep-door.listening .ep-tell { opacity: 1; }
.ep-tell.heat { background: linear-gradient(transparent 55%, rgba(255, 110, 30, .55)); animation: ep-heat .5s infinite alternate; }
@keyframes ep-heat { to { filter: blur(2px); transform: scaleY(1.02); } }
.ep-tell.seep { background: linear-gradient(transparent 80%, rgba(40, 140, 120, .7)); animation: ep-seep 2.2s ease-in-out infinite; }
@keyframes ep-seep { 50% { background-position: 0 -6px; filter: brightness(1.3); } }
.ep-tell.warm { background: linear-gradient(transparent 88%, rgba(255, 220, 140, .9) 96%, transparent); }
.ep-tell.frost { box-shadow: inset 0 0 26px 8px rgba(220, 240, 255, .7); }
.ep-tell.dry { background: radial-gradient(circle at 30% 70%, rgba(255, 240, 200, .3) 1px, transparent 2px) 0 0 / 14px 14px; animation: ep-dust 3s linear infinite; }
@keyframes ep-dust { to { background-position: 14px -28px; } }
.ep-tell.current { background: repeating-linear-gradient(100deg, transparent 0 10px, rgba(120, 190, 230, .35) 10px 13px); animation: ep-current .6s linear infinite; }
@keyframes ep-current { to { background-position: 26px 0; } }

/* ---------------------------------------------------------------- scenes */
.ep-scene { position: absolute; inset: 0; z-index: 2; overflow: hidden; touch-action: none; }
.ep-frame img.ep-still { opacity: 0; transition: opacity .8s; will-change: transform; }
.ep-frame img.ep-still.on { opacity: 1; }
.ep-still.night { filter: brightness(.5) saturate(.45) sepia(.25) hue-rotate(175deg); }
.ep-still.ep-dust { filter: sepia(.35) saturate(.8) contrast(.95); }
.ep-frame img.ep-overlay { opacity: 0; transition: opacity .35s; pointer-events: none; }
.ep-frame img.ep-overlay.on { opacity: .92; }
.ep-flash { position: absolute; inset: 0; z-index: 8; pointer-events: none; animation: ep-flash .6s ease-out forwards; }
@keyframes ep-flash { from { opacity: 1; } to { opacity: 0; } }

/* clickable places in the film */
.ep-hot { position: absolute; z-index: 3; border-radius: 6px; }
.ep-hot:hover, .ep-hot:focus-visible { background: rgba(255, 255, 255, .08); outline: 1px solid rgba(255, 255, 255, .5); }
.ep-glow { box-shadow: 0 0 0 2px rgba(255, 230, 160, .7), 0 0 26px 4px rgba(255, 210, 120, .5); animation: ep-glow 1.6s ease-in-out infinite; }
.ep-glow.green { box-shadow: 0 0 0 2px rgba(150, 255, 170, .8), 0 0 26px 4px rgba(90, 230, 130, .55); }
@keyframes ep-glow { 50% { box-shadow: 0 0 0 2px rgba(255, 230, 160, .25), 0 0 12px 2px rgba(255, 210, 120, .2); } }
.ep-glow:disabled { opacity: .3; animation: none; }
.ep-tag { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); white-space: nowrap; font: 8px var(--pixel); color: #fff; background: rgba(0, 0, 0, .7); padding: 4px 6px 3px; border-radius: 2px; pointer-events: none; }
/* temptations: the film says don't touch */
.ep-lure { animation: ep-lure 2.4s ease-in-out infinite; }
.ep-lure.soft { animation-duration: 3.4s; }
@keyframes ep-lure { 50% { box-shadow: 0 0 30px 6px rgba(255, 190, 90, .35); } }
.ep-lure-btn { position: absolute; z-index: 5; left: 50%; bottom: 14%; transform: translateX(-50%); padding: 14px 18px 12px; font: 11px var(--pixel); color: #fff; background: rgba(150, 20, 20, .85); border-radius: 4px; box-shadow: 0 0 30px rgba(255, 40, 40, .6); animation: blink .5s steps(2) infinite; }
/* meters */
.ep-meter { position: absolute; z-index: 4; left: 6%; top: calc(124px + var(--safe-t)); width: 40%; height: 18px; background: rgba(0, 0, 0, .6); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); overflow: hidden; pointer-events: none; }
.ep-meter span { position: absolute; left: 6px; top: 4px; font: 8px var(--pixel); color: #fff; z-index: 1; text-shadow: 0 1px 0 #000; }
.ep-meter i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #3b8f6a, #6fdc9a); transition: width .12s linear; }
.ep-meter.danger i { background: linear-gradient(90deg, #6b1414, #e4572e); width: 0; }
.ep-meter.low:not(.danger) i { background: linear-gradient(90deg, #6b1414, #e4572e); }

/* 01 · meadow: curtains and the figure on the hill */
.ep-curtain { position: absolute; z-index: 2; pointer-events: none; }
.ep-curtain::before { content: ""; position: absolute; top: -4%; bottom: -4%; width: 0; transition: width .6s cubic-bezier(.3, .7, .3, 1); background: repeating-linear-gradient(90deg, #3a1714 0 12px, #5a241d 12px 20px, #2b100e 20px 26px); box-shadow: 0 0 20px rgba(0, 0, 0, .8); }
.ep-curtain.l::before { left: -3%; }
.ep-curtain.r::before { right: -3%; }
.ep-curtain.shut::before { width: 53%; }
.ep-pull { border: 2px dashed rgba(255, 230, 200, .45); animation: ep-glow 1.8s ease-in-out infinite; }
.ep-glass { cursor: default; }
.ep-glass:hover { background: none; outline: none; }
.ep-scene.ep-stare::after { content: ""; position: absolute; inset: 0; z-index: 6; pointer-events: none; box-shadow: inset 0 0 140px 40px rgba(170, 0, 0, .7); animation: blink .25s steps(2) infinite; }
/* 01 · corridor: the eye at the end */
.ep-eye { position: absolute; z-index: 2; pointer-events: none; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .9), rgba(140, 255, 190, .5) 45%, transparent); mix-blend-mode: screen; opacity: .2; transition: opacity .2s; }
/* 02 · archive: two footprints, one per beat */
.ep-beat { position: absolute; z-index: 4; left: 50%; bottom: 18%; transform: translateX(-50%); display: flex; gap: 22px; pointer-events: none; }
.ep-beat i { width: 26px; height: 40px; border-radius: 50% 50% 45% 45%; background: rgba(255, 255, 255, .15); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .4); transition: background .1s; }
.ep-beat i.on { background: rgba(140, 255, 190, .8); }
/* 02 · velvet: the phone */
.ep-pad { position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(78%, 280px); padding: 14px; background: #1b0b0d; border-radius: 8px; box-shadow: 0 0 0 3px #6a1c1c, 0 20px 50px #000; display: grid; gap: 10px; }
.ep-pad-screen { min-height: 40px; padding: 6px 10px; font: 30px var(--term); color: var(--phosphor); background: #020a05; border-radius: 3px; letter-spacing: .12em; }
.ep-pad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ep-pad-keys button { min-height: 46px; font: 14px var(--pixel); color: var(--cream); background: #3a1416; border-radius: 4px; box-shadow: 0 3px 0 #000; }
.ep-pad-keys button:last-child { grid-column: 2; }
.ep-pad-keys button:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
.ep-call { min-height: 46px; font: 12px var(--pixel); color: var(--ink); background: var(--mustard); border-radius: 4px; }
/* 04 · city: the way back, found places */
.ep-backdoor { position: absolute; z-index: 5; left: 5%; bottom: 8%; padding: 10px 12px 8px; display: grid; gap: 4px; text-align: left; background: rgba(40, 0, 0, .75); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255, 80, 80, .6); color: #ffb3b3; }
.ep-backdoor b { font: 10px var(--pixel); animation: ep-glitch 1.7s steps(1) infinite; }
.ep-backdoor small { font: 18px var(--term); }
@keyframes ep-glitch { 0%, 100% { transform: none; } 7% { transform: translateX(3px) skewX(10deg); } 9% { transform: translateX(-2px); opacity: .6; } 11% { transform: none; opacity: 1; } }
.ep-stamp { position: absolute; z-index: 5; left: 8%; right: 8%; top: 44%; padding: 14px 16px 12px; text-align: center; font: 26px/1.1 var(--term); color: #fff; background: rgba(10, 8, 6, .82); border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); animation: fadein .3s; }
/* 04 · shelter: the camera, the monitor */
.ep-cam { border-radius: 4px; }
.ep-cam::before { content: ""; position: absolute; right: 18%; top: 30%; width: 7px; height: 7px; border-radius: 50%; background: #ff2a2a; box-shadow: 0 0 8px 2px rgba(255, 40, 40, .8); animation: blink 1.4s steps(2) infinite; }
.ep-cam.hinted { box-shadow: 0 0 0 2px rgba(255, 80, 80, .7), 0 0 22px rgba(255, 40, 40, .5); }
.ep-monitor { position: absolute; z-index: 3; background-size: cover; background-position: center; filter: grayscale(1) contrast(1.2) brightness(1.1); box-shadow: 0 0 20px rgba(200, 230, 255, .5); animation: fadein .6s; }
.ep-monitor::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, .3) 2px 3px); }
.ep-monitor .rec { position: absolute; left: 6px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: #f22; z-index: 1; animation: blink 1s steps(2) infinite; }
/* 06 · decay: age */
.ep-age { position: absolute; z-index: 4; right: 6%; top: calc(124px + var(--safe-t)); padding: 4px 10px 3px; font: 30px var(--term); color: #fff; background: rgba(0, 0, 0, .55); border-radius: 3px; pointer-events: none; }
.ep-scene { --age: 0; }
.ep-scene::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: var(--age); background: radial-gradient(transparent 40%, rgba(40, 30, 10, .8)), repeating-linear-gradient(115deg, transparent 0 40px, rgba(30, 20, 10, .25) 40px 41px); }
/* 06 · guest: two at the door */
.ep-guest { position: absolute; z-index: 3; pointer-events: none; }
.ep-guest::before { content: ""; position: absolute; left: 22%; right: 22%; top: 18%; bottom: 0; background: radial-gradient(ellipse 30% 13% at 50% 12%, #0b0807 98%, transparent), radial-gradient(ellipse 50% 70% at 50% 75%, #0b0807 98%, transparent); filter: drop-shadow(0 0 6px rgba(255, 190, 120, .35)); }
.ep-bubble { position: absolute; left: -6%; right: -6%; top: -4%; min-height: 1em; padding: 6px 8px 5px; font: 19px/1.05 var(--term); color: #111; background: #f6efe0; border-radius: 6px; text-align: center; }
.ep-bubble:empty { display: none; }
.ep-questions { position: absolute; z-index: 5; left: 6%; right: 6%; bottom: 20%; display: grid; gap: 6px; }
.ep-questions button { min-height: 40px; padding: 6px 10px 5px; font: 20px/1.05 var(--term); color: var(--cream); background: rgba(20, 14, 30, .88); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(246, 231, 200, .3); text-align: left; }
.ep-questions button:disabled { opacity: .45; }
.ep-pick { position: absolute; z-index: 5; left: 6%; right: 6%; bottom: 7%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ep-pick button { min-height: 46px; font: 9px var(--pixel); color: var(--ink); background: var(--mustard); border-radius: 4px; box-shadow: 3px 3px 0 #000; }
/* 07 · mannequins */
.ep-mannequin { --d: .8; position: absolute; z-index: 3; bottom: calc(14% + var(--d) * 18%); height: calc((1.25 - var(--d)) * 60%); aspect-ratio: 1 / 3.1; transform: translateX(-50%); transition: height .15s, bottom .15s; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 124'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f2efe8'/%3E%3Cstop offset='.55' stop-color='%23c9c5bc'/%3E%3Cstop offset='1' stop-color='%238d8980'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='url(%23g)'%3E%3Cellipse cx='20' cy='10' rx='7' ry='9'/%3E%3Crect x='17' y='18' width='6' height='6'/%3E%3Cpath d='M8 26 Q20 22 32 26 L30 60 Q20 64 10 60Z'/%3E%3Cpath d='M8 27 L3 62 L6 63 L12 32Z'/%3E%3Cpath d='M32 27 L37 62 L34 63 L28 32Z'/%3E%3Cpath d='M11 60 L13 122 L18 122 L19 64Z'/%3E%3Cpath d='M29 60 L27 122 L22 122 L21 64Z'/%3E%3C/g%3E%3C/svg%3E"); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55)) brightness(.86) blur(.4px); opacity: .94; }
.ep-mannequin:hover { filter: drop-shadow(0 0 10px rgba(255, 255, 255, .7)); }
.ep-mannequin.caught { filter: drop-shadow(0 0 12px rgba(120, 255, 160, .9)); }
.ep-dark { position: absolute; inset: 0; z-index: 6; background: #000; opacity: 0; transition: opacity .08s; pointer-events: none; }
.ep-dark.on { opacity: .97; }
/* 08 · laundromat and the play place */
.ep-clock { position: absolute; z-index: 4; left: 50%; top: calc(124px + var(--safe-t)); transform: translateX(-50%); padding: 4px 12px 2px; font: 36px var(--term); color: #ff5050; background: #120404; border-radius: 3px; box-shadow: 0 0 14px rgba(255, 60, 60, .4); pointer-events: none; }
.ep-scene.ep-asleep::after { content: ""; position: absolute; inset: 0; z-index: 3; background: rgba(0, 0, 10, .78); pointer-events: none; transition: opacity .4s; }
.ep-note { position: absolute; z-index: 4; right: 7%; top: calc(124px + var(--safe-t)); font: 40px var(--term); color: rgba(255, 255, 255, .25); pointer-events: none; }
.ep-note.on { color: #ffd36b; text-shadow: 0 0 12px #ffb13b; animation: ep-bob .5s ease-in-out infinite alternate; }
@keyframes ep-bob { to { transform: translateY(-6px) rotate(8deg); } }
.ep-scene.ep-silent::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; box-shadow: inset 0 0 120px 30px rgba(120, 0, 0, .6); }
/* 09 · prize room and the chalk figure */
.ep-hours { position: absolute; z-index: 4; left: 50%; top: calc(124px + var(--safe-t)); transform: translateX(-50%); white-space: nowrap; padding: 6px 12px 4px; font: 26px var(--term); color: #ffd36b; background: rgba(0, 0, 0, .7); border-radius: 3px; box-shadow: inset 0 0 0 1px #b38a2a; pointer-events: none; }
.ep-chalk { position: absolute; z-index: 3; background: #1d2621; box-shadow: 0 0 0 4px #4a3220, 0 10px 30px rgba(0, 0, 0, .6); cursor: crosshair; touch-action: none; }
/* 10 · store of unused days and the word machine */
.ep-box { box-shadow: inset 0 0 0 2px rgba(255, 220, 160, .55), 0 0 24px rgba(255, 200, 120, .35); background: rgba(255, 230, 190, .06); animation: ep-glow 2s ease-in-out infinite; }
.ep-flame { border-radius: 40%; }
.ep-flame::before { content: ""; position: absolute; left: 50%; top: 35%; width: 4px; height: 8px; transform: translateX(-50%); background: #2a1a10; border-radius: 2px; }
.ep-flame:not(.lit) { box-shadow: 0 0 0 1px rgba(255, 220, 160, .5); }
.ep-flame.lit::before { width: 10px; height: 18px; top: 10%; background: radial-gradient(ellipse at 50% 70%, #fff6c0, #ffb13b 45%, rgba(255, 90, 20, 0) 75%); animation: ep-flicker .18s infinite alternate; }
@keyframes ep-flicker { to { transform: translateX(-50%) scaleY(1.15) skewX(4deg); } }
.ep-receipts { position: absolute; z-index: 4; right: 4%; top: calc(124px + var(--safe-t)); display: grid; gap: 6px; pointer-events: none; }
.ep-receipt { width: 120px; padding: 6px 8px 8px; font: 16px/1 var(--term); color: #222; background: #f2efe6; text-align: center; clip-path: polygon(0 0, 100% 0, 100% 92%, 90% 100%, 80% 92%, 70% 100%, 60% 92%, 50% 100%, 40% 92%, 30% 100%, 20% 92%, 10% 100%, 0 92%); animation: ep-print .5s steps(5); }
@keyframes ep-print { from { clip-path: inset(0 0 100% 0); } }
.ep-paper { position: absolute; z-index: 4; left: 50%; bottom: 22%; transform: translateX(-50%); min-width: 46%; padding: 14px 16px 12px; background: #f1ede2; box-shadow: 0 6px 20px rgba(0, 0, 0, .6); text-align: center; pointer-events: none; }
.ep-paper b { font: 16px/1.4 var(--pixel); color: #1a1a1a; letter-spacing: .08em; }
.ep-paper.jam { animation: ep-jam .12s linear infinite; }
@keyframes ep-jam { 50% { transform: translateX(calc(-50% + 2px)); } }
.ep-scene.ep-flat .ep-still { filter: contrast(.65) brightness(1.15); }
.ep-scene.ep-noglass .ep-still { transform: scaleX(-1) !important; }

/* ---------------------------------------------------------------- the ending card */
.ep-result { position: absolute; z-index: 5; left: 5%; right: 5%; bottom: 7%; padding: 18px 18px 16px; text-align: center; background: rgba(10, 8, 14, .9); border-radius: 6px; box-shadow: inset 0 0 0 2px var(--k), 0 20px 50px #000; opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; --k: #888; }
.ep-result.on { opacity: 1; transform: none; }
.ep-result.safe { --k: #6fdc9a; } .ep-result.dead { --k: #e4572e; } .ep-result.escape { --k: #e9b44c; } .ep-result.strange { --k: #b48cff; }
.ep-kind { font: 10px var(--pixel); color: var(--k); letter-spacing: .14em; }
.ep-result h2 { margin: 10px 0 8px; font: clamp(13px, 2.2vh, 18px)/1.5 var(--pixel); color: #fff; }
.ep-result p { margin: 0 0 10px; font: 22px/1.15 var(--term); color: var(--cream); }
.ep-found { margin-bottom: 12px; font: 8px var(--pixel); color: rgba(246, 231, 200, .55); }
.ep-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ep-row button { flex: 1 1 30%; }

/* ---------------------------------------------------------------- the catalog (wardrobe) */
.epc { position: absolute; inset: 0; z-index: 14; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 0%, #2a1730, #0d0912 70%); color: var(--cream); animation: fadein .25s; }
.epc-head { display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--safe-t)) 16px 10px; }
.epc-head h1 { flex: 1; margin: 0; font: clamp(13px, 2.4vw, 18px)/1.4 var(--pixel); color: #fff; text-shadow: 3px 3px 0 var(--red), -2px -2px 0 var(--blue); }
.epc-head h1 small { display: block; margin-top: 4px; font: 20px var(--term); color: rgba(246, 231, 200, .65); text-shadow: none; }
.epc-close { min-height: 44px; padding: 0 12px; font: 10px var(--pixel); color: var(--cream); background: rgba(18, 13, 28, .8); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(246, 231, 200, .25); }
.epc-list { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 16px calc(24px + var(--safe-b)); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 14px; grid-auto-rows: max-content; align-content: start; touch-action: pan-y; }
.epc-card { position: relative; display: flex; flex-direction: column; text-align: left; background: #17111f; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(246, 231, 200, .14), 4px 4px 0 #000; transition: transform .15s, box-shadow .15s; }
.epc-card:hover, .epc-card:focus-visible { transform: translateY(-3px); box-shadow: inset 0 0 0 2px var(--mustard), 6px 6px 0 #000; outline: none; }
.epc-card .pic { position: relative; aspect-ratio: 3 / 4; background: #000 center / cover no-repeat; }
.epc-card .pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(13, 9, 18, .95)); }
.epc-card .num { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 6px 7px 4px; font: 11px var(--pixel); color: var(--ink); background: var(--mustard); border-radius: 2px; box-shadow: 2px 2px 0 #000; }
.epc-card .badge { position: absolute; right: 10px; top: 10px; z-index: 1; padding: 5px 6px 4px; font: 8px var(--pixel); border-radius: 2px; background: rgba(0, 0, 0, .7); color: var(--cream); }
.epc-card .badge.done { background: #1f5c3a; color: #c9ffd9; }
.epc-card .txt { padding: 0 12px 12px; margin-top: -34px; z-index: 1; display: grid; gap: 6px; }
.epc-card h3 { margin: 0; font: 11px/1.5 var(--pixel); color: #fff; }
.epc-card p { margin: 0; font: 19px/1.05 var(--term); color: rgba(246, 231, 200, .78); }
.epc-card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font: 8px var(--pixel); color: rgba(246, 231, 200, .55); }
.epc-card .go { padding: 6px 8px 5px; color: var(--ink); background: var(--mustard); border-radius: 2px; }
.epc-foot { padding: 0 16px calc(14px + var(--safe-b)); display: flex; flex-wrap: wrap; gap: 8px; font: 18px var(--term); color: rgba(246, 231, 200, .6); }
.epc-foot button { min-height: 40px; padding: 0 12px; font: 9px var(--pixel); color: var(--cream); background: rgba(40, 30, 54, .9); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(246, 231, 200, .2); }

@media (prefers-reduced-motion: reduce) {
  .ep-glow, .ep-lure, .ep-pull, .ep-box, .ep-tell, .ep-note.on, .ep-backdoor b, .ep-lure-btn, .ep-flame.lit::before, .ep-paper.jam, .ep-frame.ep-shake, .ep-scene.ep-stare::after { animation: none !important; }
  .ep-frame img.ep-still { transition: none; }
}
.ep-back.ep-studio { left: auto; right: 66px; background: rgba(28, 78, 138, .85); }
@media (max-width: 520px) { .ep-back.ep-studio { top: calc(60px + var(--safe-t)); right: 12px; } }
@media (max-width: 520px) {
  .epc-list { grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 12px calc(20px + var(--safe-b)); }
  .epc-card h3 { font-size: 9px; }
  .epc-card p { font-size: 17px; }
  .epc-card .txt { padding: 0 9px 10px; }
  .epc-card .meta { flex-direction: column; align-items: flex-start; gap: 6px; }
}
