/* 49 SUNSET BLVD — room-specific dressings */

/* ============ FRONT HALL (index) ============ */
.screen { position: fixed; inset: 0; z-index: 200; background: #000; display: flex; flex-direction: column; align-items: center; text-align: center; overflow-y: auto; overflow-x: hidden; }

/* CLICK TO ENTER — the porch */
.pre-inner { position: relative; margin: auto; max-width: 720px; width: 100%; padding: calc(60px + var(--safe-t)) 24px calc(40px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; }
.pre-house { width: min(620px, 92vw); filter: grayscale(1) brightness(.3) contrast(1.25); opacity: .9; transition: filter 4s, opacity 4s; mask-image: radial-gradient(ellipse at 50% 46%, #000 55%, transparent 78%); -webkit-mask-image: radial-gradient(ellipse at 50% 46%, #000 55%, transparent 78%); }
.pre-house.lit { filter: grayscale(1) brightness(.48) contrast(1.2) sepia(.35); }
.pre-addr { font-family: var(--term); letter-spacing: .6em; font-size: 15px; color: #4a4438; margin: 34px 0 26px; text-indent: .6em; }
#btn-enter { background: transparent; border: 1px solid #3a0d0d; color: var(--blood-hi); font-family: var(--fell-sc); letter-spacing: .4em; font-size: clamp(16px, 3.5vw, 22px); padding: 18px 40px; min-height: 56px; animation: pulse 3s infinite; text-indent: .4em; transition: all .5s; }
#btn-enter:hover { background: rgba(110,20,20,.18); border-color: var(--blood); box-shadow: 0 0 50px rgba(163,26,26,.35); animation: none; }
.pre-hint { font-family: var(--type); font-size: 11px; color: #33302a; margin-top: 30px; letter-spacing: .12em; }
#pregate { cursor: pointer; transition: opacity 1.4s; }
#pregate.gone { opacity: 0; pointer-events: none; }
.gate-inner { max-width: 660px; width: 100%; margin: auto; padding: calc(60px + var(--safe-t)) 24px calc(40px + var(--safe-b)); position: relative; }
.gate-line { position: absolute; top: 0; left: 50%; width: 2px; height: 0; background: linear-gradient(#a31a1a, transparent); animation: drip 4s ease-out forwards; }
@keyframes drip { to { height: 120px; } }
.gate-title { font-family: var(--fell-sc); font-weight: normal; font-size: clamp(38px, 10.5vw, 108px); letter-spacing: .05em; line-height: 1.05; color: var(--blood-hi); margin: 0 0 24px; text-shadow: 0 0 50px rgba(163,26,26,.5); opacity: 0; text-align: center; }
.gate-title .gw { display: inline-block; white-space: nowrap; }
.gate-title .gw span { opacity: 0; display: inline-block; transform: scale(1.6); filter: blur(6px); transition: all .5s; }
.gate-title .gw span.on { opacity: 1; transform: none; filter: none; }
.gate-body { opacity: 0; transform: translateY(12px); transition: all 2s; text-align: left; }
.gate-body.show, .gate-buttons.show, .gate-fine.show { opacity: 1; transform: none; }
.gate-body p { color: var(--bone-dim); margin: 0 0 14px; }
.gate-body b { color: var(--bone); font-weight: normal; }
.gate-q { color: var(--bone) !important; font-style: italic; text-align: center; margin-top: 26px !important; }
.gate-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 30px; opacity: 0; transform: translateY(12px); transition: all 2s; }
.gate-leave-msg { font-family: var(--hand); font-size: 26px; color: var(--blood-hi); min-height: 34px; margin: 20px 0 0; }
.gate-fine { opacity: 0; transition: all 2s; font-family: var(--type); font-size: 11px; color: #3c3832; margin-top: 34px; line-height: 1.6; }

#ritual { background: #000; }
#ritual img { position: absolute; left: 50%; top: 50%; translate: -50% -50%; height: 92vh; max-width: none; opacity: 0; filter: grayscale(1) contrast(2) brightness(.55); }
#ritual-paul { height: 100vh !important; width: 100vw; object-fit: cover; }
#ritual-rigo.g1 { scale: .8; } #ritual-rigo.g2 { scale: 1.02; } #ritual-rigo.g3 { scale: 1.28; }
#ritual-rigo.hit { animation: rigoin .5s ease-out forwards; }
#ritual-rigo.fade { animation: rigoout 1.7s ease-in forwards; }
@keyframes rigoout { from { opacity: .88; filter: grayscale(1) contrast(2) brightness(.55); } to { opacity: 0; filter: grayscale(1) contrast(2.6) brightness(.3) blur(4px); } }
@keyframes rigoin { 0% { opacity: 0; filter: grayscale(1) contrast(3) brightness(2); } 25% { opacity: .95; } 60% { opacity: .7; } 100% { opacity: .88; filter: grayscale(1) contrast(2) brightness(.55); } }
#ritual-cap { position: absolute; bottom: calc(10vh + var(--safe-b)); left: 0; right: 0; margin: 0; font-family: var(--fell-sc); letter-spacing: .35em; font-size: clamp(15px, 3vw, 26px); color: var(--blood-hi); opacity: 0; transition: opacity 1.2s; padding: 0 20px; }
#ritual-cap.on { opacity: 1; }

.ticker { position: relative; z-index: 1; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 7px 0; background: #060505; }
.ticker-track { display: inline-flex; gap: 60px; white-space: nowrap; font-family: var(--type); font-size: 13px; color: var(--bone-dim); animation: tick 90s linear infinite; padding-left: 100%; }
.ticker-track span::before { content: '▪ '; color: var(--blood); }
@keyframes tick { to { transform: translateX(-100%); } }

.board { position: relative; min-height: 420px; background: #151009 radial-gradient(circle at 30% 20%, #1d160f, #100c08); border: 10px solid #241a10; box-shadow: inset 0 0 60px rgba(0,0,0,.8), 0 20px 50px rgba(0,0,0,.8); padding: 26px; display: flex; flex-wrap: wrap; gap: 16px; align-content: flex-start; }
#strings { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
#strings path { stroke: #7a1d1d; stroke-width: 1.4; fill: none; opacity: .75; }
.card { position: relative; z-index: 1; width: 150px; min-height: 120px; background: #dcd3bd; color: #221c14; padding: 16px 10px 10px; transform: rotate(var(--r, 0deg)); box-shadow: 0 8px 16px rgba(0,0,0,.6); font-family: var(--type); text-decoration: none; transition: transform .3s, box-shadow .3s; }
.card.found { cursor: pointer; }
.card.found:hover { transform: rotate(0deg) scale(1.06); box-shadow: 0 14px 30px rgba(0,0,0,.8); z-index: 2; }
.card.unfound { background: #171310; color: #3a352d; border: 1px dashed #26211b; }
.card .pin { position: absolute; top: -7px; left: 50%; margin-left: -7px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d44, #6e1414 60%, #300); box-shadow: 0 3px 4px rgba(0,0,0,.7); }
.card .pc-img { display: block; height: 74px; background-size: cover; background-color: #000; filter: grayscale(1) contrast(1.4) brightness(.8) sepia(.2); margin: -6px -4px 8px; border: 1px solid rgba(0,0,0,.3); }
.card .c-title { display: block; font-family: var(--fell-sc); font-size: 15px; letter-spacing: .08em; line-height: 1.1; }
.card .c-note { display: block; font-size: 10.5px; color: #4a4234; margin-top: 6px; line-height: 1.3; }
.card.unfound .c-note { color: #2c2823; }
.card .c-q { display: block; font-size: 30px; text-align: center; color: #2a251f; }
.board-note { text-align: center; color: var(--blood-hi); font-size: 24px; margin: 26px 0 0; }

/* ============ THE HOUSE ============ */
.blueprint { display: grid; grid-template-columns: 1fr; gap: 20px; }
#plan { width: 100%; background: #0a0d12; border: 1px solid #1c2430; }
.bp-legend { font-family: var(--type); font-size: 11px; fill: #44506a; letter-spacing: .1em; }
.room rect { fill: rgba(20, 30, 44, .5); stroke: #33415c; stroke-width: 1.2; }
.room text { font-family: var(--term); font-size: 15px; fill: #8fa3c8; text-anchor: middle; pointer-events: none; letter-spacing: .05em; }
.room { cursor: pointer; }
.room:hover rect, .room.sel rect { fill: rgba(110, 20, 20, .35); stroke: #a31a1a; }
.room.added rect { stroke-dasharray: 6 4; stroke: #5c3a6d; }
.room text.vert { font-size: 11px; fill: #7a68a0; }
.room.new rect { fill: rgba(80, 10, 10, .4); }
.room-note { min-height: 120px; }
@media (min-width: 900px) { .blueprint { grid-template-columns: 1fr 320px; align-items: start; } .room-note { position: sticky; top: 80px; } }

.timeline { border-left: 1px solid var(--line); margin-left: 8px; padding-left: 22px; }
.tl { position: relative; margin-bottom: 20px; color: var(--bone-dim); max-width: 720px; }
.tl::before { content: ''; position: absolute; left: -26px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--blood-hi); box-shadow: 0 0 8px var(--blood-hi); }
.tl > b:first-child { font-family: var(--term); color: var(--blood-hi); font-size: 22px; margin-right: 10px; font-weight: normal; }
.tl-now { color: var(--bone); }
.tl-now::before { animation: pulse 1.5s infinite; }

.fridge { background: #111; border: 1px solid #222; padding: 26px 24px; transform: rotate(-.4deg); box-shadow: 0 14px 40px rgba(0,0,0,.8); max-width: 640px; }
.fridge h3 { font-family: var(--type); font-weight: normal; letter-spacing: .12em; color: var(--bone-dim); font-size: 15px; margin: 0 0 16px; }
.fridge h3 small { color: var(--mute); letter-spacing: 0; text-transform: none; }
.fridge ol { margin: 0; padding-left: 24px; }
.fridge li { font-family: var(--hand); font-size: 26px; color: var(--bone); margin-bottom: 8px; line-height: 1.15; }
.fridge li::marker { color: var(--blood); }
.rule7 { position: relative; }
.strike { text-decoration: line-through; text-decoration-color: var(--blood-hi); text-decoration-thickness: 2px; }
.r7-cover { position: relative; }
.rule7:hover .strike, .rule7:active .strike { display: none; }

/* ============ THE FAMILY ============ */
.dossiers { display: flex; flex-direction: column; gap: 34px; }
.tilt { transition: transform .2s ease-out; transform-style: preserve-3d; }
.dossier-paul { border-color: #3a0f0f; }
.dossier-paul::after { content: 'SEALED — SEE THE PAUL FILES'; color: var(--blood-hi); }
.paul-photo img { filter: grayscale(1) contrast(1.5) brightness(.65) !important; }
.paul-photo.staring img { filter: grayscale(1) contrast(2.2) brightness(.9) sepia(.6) !important; transform: scale(1.25); }
.paul-photo.staring::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 60px rgba(163,26,26,.5); }
.d-warn { border: 1px dashed var(--blood); padding: 10px 12px; font-size: 14px; }
.d-stare { font-size: 28px; min-height: 34px; margin-top: 10px !important; }
.d-live { font-family: var(--term); font-size: 20px; }
.d-live b { color: var(--blood-hi); }
.d-nophoto, .d-missing { display: flex; align-items: center; justify-content: center; }
.frame-empty { display: flex; align-items: center; justify-content: center; height: 100%; width: 100%; border: 1px dashed #2a2722; }
.frame-empty span { font-family: var(--type); font-size: 12px; letter-spacing: .3em; color: #3a352d; padding: 20px; text-align: center; }
.d-missing svg.d-ghost { width: 70%; opacity: .8; position: absolute; }
.d-missing { position: relative; }
.a-real { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.4) brightness(.5) sepia(.2); opacity: .75; animation: photoback 11s steps(1) infinite; }
@keyframes photoback { 0%,100% { opacity: .75 } 42% { opacity: .75 } 44% { opacity: .12 } 45% { opacity: .75 } 71% { opacity: .75 } 72% { opacity: .05 } 74% { opacity: .8 } }
.antonio-msg { position: absolute; inset: auto 0 0 0; font-family: var(--term); font-size: 15px; color: var(--blood-hi); background: rgba(0,0,0,.85); padding: 8px; opacity: 0; transition: opacity 1.5s; text-align: center; }
.antonio-msg.on { opacity: 1; }
.friend { background: #0a0908; border: 1px solid var(--line); padding: 18px; }
.friend h4 { font-family: var(--fell-sc); font-weight: normal; letter-spacing: .14em; font-size: 19px; margin: 0 0 10px; }
.friend p { font-family: var(--type); font-size: 13px; color: var(--bone-dim); margin: 0; line-height: 1.55; }

/* ============ THE DOORFRAME ============ */
.door-wrap { display: grid; grid-template-columns: 1fr; gap: 26px; align-items: start; }
@media (min-width: 900px) { .door-wrap { grid-template-columns: minmax(280px, 400px) 1fr; } .door { position: sticky; top: 70px; } }
.door { max-width: 420px; margin: 0 auto; width: 100%; }
#frame { width: 100%; display: block; box-shadow: 0 20px 60px rgba(0,0,0,.9); }
.door-cap { text-align: center; margin-top: 12px; }
.df-num { font-family: var(--term); font-size: 11px; fill: rgba(201,194,178,.4); }
.df-mark { stroke: #6b5f4d; stroke-width: 1.4; }
.df-mark.faint { stroke: #453d31; stroke-width: 1; }
.df-mark.gone { stroke: #332c22; stroke-dasharray: 3 3; }
.df-lbl { font-family: var(--type); font-size: 10px; fill: #6b5f4d; letter-spacing: .06em; }
.df-lbl.red { fill: var(--blood-hi); }
.df-big { font-family: var(--fell-sc); font-size: 34px; fill: var(--blood-hi); letter-spacing: .1em; }
.df-red { stroke: var(--blood-hi); stroke-width: 1.6; }
.df-you { stroke: var(--blood-hi); stroke-width: 2.4; filter: drop-shadow(0 0 6px var(--blood-hi)); }
.measure { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-family: var(--type); }
.measure label { color: var(--bone-dim); font-size: 14px; letter-spacing: .15em; display: flex; align-items: center; gap: 8px; }
.measure select { background: #111; color: var(--bone); border: 1px solid #2a2722; font-family: var(--term); font-size: 22px; padding: 8px 14px; min-width: 70px; }
.measure-out { font-size: 28px; max-width: 700px; min-height: 38px; }

/* ============ THE KITCHEN (diane) ============ */
.photo-print { background: #0c0b0a; padding: 14px 14px 10px; border: 1px solid #201d19; box-shadow: 0 16px 50px rgba(0,0,0,.85); max-width: 680px; margin: 0 auto; transform: rotate(-.5deg); }
.photo-print svg, .photo-print img { width: 100%; display: block; }
.photo-print figcaption { font-size: 22px; color: var(--bone-dim); padding: 10px 4px 4px; line-height: 1.25; }
.recipes .card-recipe { min-height: 220px; }
.card-recipe.child { background-color: #f4eedd; transform: rotate(1.2deg); }
.card-recipe.child .hand { color: #4a2c8a; }
.calendar .hand p { border-bottom: 1px dotted rgba(0,0,0,.15); padding-bottom: 10px; }
.env-link { display: inline-block; text-decoration: none; margin-top: 10px; }

/* ============ HOME MOVIES (tapes) ============ */
.vcr { max-width: 720px; margin: 0 auto; }
#screen { width: 100%; }
.osd-tl { top: 10px; left: 14px; }
.osd-tr { top: 10px; right: 14px; }
.osd-br { bottom: 10px; right: 14px; font-size: clamp(12px, 2.4vw, 18px); }
.osd.rec { color: #ff4444; animation: pulse 1.2s infinite; }
.cc { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; font-family: var(--term); font-size: clamp(15px, 3vw, 24px); color: #e8e8d8; text-shadow: 2px 2px 0 #000, 0 0 8px #000; padding: 0 8%; z-index: 4; pointer-events: none; min-height: 30px; }
.tapes { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.tape { display: flex; flex-direction: column; gap: 3px; text-align: left; background: linear-gradient(#1b1815, #100e0c); border: 1px solid #2a2520; padding: 12px 16px; min-height: 56px; position: relative; transition: all .25s; }
.tape::before { content: ''; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 6px; background: #060505; border: 1px solid #222; }
.tape:hover { border-color: var(--blood); }
.tape.in { border-color: var(--blood-hi); box-shadow: 0 0 20px rgba(163,26,26,.3); transform: translateX(8px); }
.tape.t-bad { border-style: dashed; border-color: #4a1414; }
.t-lbl { font-family: var(--term); font-size: 21px; color: var(--bone); letter-spacing: .06em; padding-left: 18px; }
.t-sub { font-family: var(--hand); font-size: 20px; color: #7a6f5c; padding-left: 18px; }
.t-bad .t-sub { color: var(--blood-hi); }

/* ============ THE LAKEHOUSE ============ */
.lake-photo .mtn-light { animation: mtnblink 4s steps(1) infinite; }
.lake-photo .mtn-light.blink { animation: mtnblink .8s steps(1) infinite; }
@keyframes mtnblink { 0%, 60%, 100% { opacity: .9; } 70%, 90% { opacity: .1; } }
.war { border: 1px solid #241d18; background: #080706; padding: 26px 20px; margin: 34px 0; }
.war-meta { font-family: var(--term); font-size: 17px; color: var(--bone-dim); letter-spacing: .04em; margin: -4px 0 20px; }
.war-meta b { color: var(--blood-hi); font-weight: normal; }
.casualties { margin-top: 22px; background-color: #cfc5ae; }
.guestbook .hand p:nth-child(odd) { transform: rotate(-.4deg); }
.guestbook .hand p:nth-child(even) { transform: rotate(.5deg); }
.you-entry { color: #7a0000 !important; border-top: 2px solid rgba(122,0,0,.4); padding-top: 12px; }
.docklight { text-align: center; padding: 20px 0 10px; }
.lamp { width: 74px; height: 74px; border-radius: 50%; border: 2px solid #2a2520; background: radial-gradient(circle at 40% 35%, #2a241c, #0a0806 70%); transition: all .15s; }
.lamp.on, .lamp:active { background: radial-gradient(circle at 40% 35%, #ffe9b0, #c9a96a 45%, #4a3a20 80%); box-shadow: 0 0 60px 18px rgba(255, 200, 110, .35); border-color: #c9a96a; }
#morse { font-size: 22px; color: var(--bone-dim); letter-spacing: .2em; min-height: 30px; }

/* ============ LOOM LAKE ============ */
.pg-loom { --bone: #b8c2c9; }
.loom-water { position: relative; height: 340px; background: radial-gradient(ellipse at 50% -10%, #1a222c, transparent 60%), linear-gradient(#10161d, #070b10 45%, #020304); border: 1px solid #161c22; overflow: hidden; cursor: pointer; touch-action: manipulation; }
.loom-water::before { content: ''; position: absolute; left: 0; right: 0; top: 38%; height: 1px; background: rgba(160, 180, 200, .14); }
.loom-water .fig { position: absolute; bottom: 30%; width: 10px; height: 46px; background: linear-gradient(#1e2830, #05070a); opacity: .95; border-radius: 5px 5px 0 0; box-shadow: 0 0 8px rgba(160, 180, 200, .12), inset 0 -6px 6px rgba(120, 140, 160, .08); }
.loom-water .fig::after { content: ''; position: absolute; top: -8px; left: 1px; width: 8px; height: 9px; border-radius: 50%; background: #1a2129; }
.loom-water .ripple { position: absolute; border: 1px solid rgba(160, 180, 200, .35); border-radius: 50%; animation: rip 3.5s ease-out forwards; pointer-events: none; }
.loom-water.held-water { box-shadow: inset 0 0 80px rgba(90,10,10,.7), inset 0 -40px 60px rgba(20,30,45,.9); }
.loom-water.held-water .fig { box-shadow: 0 0 16px rgba(214,60,60,.5), inset 0 -6px 6px rgba(180,60,60,.25); }
.loom-water .fig { transition: transform 3s ease, opacity 2s, left 20s linear; }
@keyframes rip { from { width: 4px; height: 2px; opacity: .9; } to { width: 300px; height: 90px; opacity: 0; } }
.loom-count { font-family: var(--term); font-size: 20px; color: var(--blood-hi); text-align: center; margin-top: 14px; min-height: 26px; }
.fogbank { position: relative; overflow: hidden; }
.fogbank::after { content: ''; position: absolute; inset: -20%; background: radial-gradient(ellipse at 30% 60%, rgba(140, 150, 160, .08), transparent 60%), radial-gradient(ellipse at 70% 30%, rgba(140, 150, 160, .06), transparent 55%); animation: fogmove 26s ease-in-out infinite alternate; pointer-events: none; }
@keyframes fogmove { to { transform: translateX(6%) scale(1.1); } }

/* ============ GERALD ON THE MOUNTAIN ============ */
.radio { background: #141210; border: 1px solid #2a2520; padding: 22px; box-shadow: 0 16px 50px rgba(0,0,0,.85); }
.freq-out { font-family: var(--term); font-size: clamp(40px, 10vw, 72px); color: #9fe89f; text-shadow: 0 0 14px rgba(120, 255, 120, .35); background: #050805; border: 1px solid #1c2a1c; padding: 6px 18px; text-align: center; letter-spacing: .1em; }
.tuner { width: 100%; margin: 18px 0; accent-color: #6e1414; height: 40px; }
.g-log { font-family: var(--term); font-size: 18px; color: #8fa88f; background: #070907; border: 1px solid #182018; padding: 14px; min-height: 120px; max-height: 260px; overflow-y: auto; }
.g-log p { margin: 0 0 6px; }
.g-log .g-voice { color: #cfe8cf; }
.g-notes .paper { max-width: 640px; margin: 0 auto; }
.mtn { position: relative; height: 300px; overflow: hidden; border: 1px solid #16181d; }
.mtn svg { width: 100%; height: 100%; display: block; }
.mtn .mtn-light { animation: mtnblink 5s steps(1) infinite; }
.mtn .mtn-light.blink { animation: mtnblink .7s steps(1) infinite; }

/* ============ GHOULS OF THE PAST ============ */
.registry { display: flex; flex-direction: column; gap: 16px; }
.ghoul { background: #0a0908; border: 1px solid var(--line); padding: 18px 20px; position: relative; transition: border-color .4s; }
.ghoul:hover, .ghoul.near { border-color: var(--blood); }
.ghoul h4 { font-family: var(--fell-sc); font-weight: normal; font-size: 21px; letter-spacing: .12em; margin: 0 0 8px; color: var(--bone); }
.ghoul .g-meta { font-family: var(--type); font-size: 12px; color: var(--mute); letter-spacing: .1em; margin-bottom: 10px; }
.ghoul p { font-family: var(--type); font-size: 14px; color: var(--bone-dim); margin: 0 0 8px; }
.ghoul .g-stat { font-family: var(--term); font-size: 18px; color: var(--blood-hi); }
.ghoul.gone h4 { color: #4a443a; }
.dinner-count { font-family: var(--term); font-size: 24px; color: var(--blood-hi); text-align: center; letter-spacing: .2em; padding: 14px; border: 1px dashed var(--blood); }

/* ============ SKELETONS OF THE PAST ============ */
.closets { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.closet { position: relative; aspect-ratio: 1/2; background: #0d0a07; border: 1px solid #241d15; cursor: pointer; overflow: hidden; transition: border-color .3s; }
.closet .c-inside { position: absolute; inset: 6px; background: #020202; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px; text-align: center; opacity: 0; transition: opacity .6s .5s; }
.closet .c-door { position: absolute; inset: 0; background: linear-gradient(90deg, #241a10, #1a1209 55%, #0f0a05); border: 1px solid #2e2214; transform-origin: left center; transition: transform 1.1s cubic-bezier(.6,0,.3,1); }
.closet .c-door::after { content: ''; position: absolute; right: 8px; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: #4a3a24; }
.closet.open { border-color: var(--blood); cursor: default; }
.closet.open .c-door { transform: perspective(500px) rotateY(-84deg); }
.closet.open .c-inside { opacity: 1; }
.closet .c-num { position: absolute; top: 6px; left: 8px; font-family: var(--term); font-size: 15px; color: #3a3227; z-index: 2; }
.closet .c-tag { position: absolute; bottom: 6px; left: 0; right: 0; font-family: var(--type); font-size: 9.5px; color: #4a4234; text-align: center; letter-spacing: .08em; z-index: 2; }
.c-inside .bones { font-size: 30px; line-height: 1; }
.c-inside p { font-family: var(--hand); font-size: 17px; color: var(--bone-dim); margin: 6px 0 0; line-height: 1.1; }
.c-inside .red { font-family: var(--hand); }
.closet.yours .c-door { border-color: var(--blood); border-style: dashed; }
.closet.knocked .c-door { animation: doorrattle .3s; }
.closet.knocked { border-color: #3a2e1e; }
@keyframes doorrattle { 25% { transform: perspective(500px) rotateY(-4deg) } 60% { transform: perspective(500px) rotateY(-1deg) } }

/* ============ THE PAUL FILES ============ */
.sealbox { text-align: center; padding: 40px 0; }
.seal-input { background: #0c0a08; border: 1px solid #3a1414; color: var(--bone); font-family: var(--term); font-size: 26px; letter-spacing: .3em; text-align: center; padding: 12px; width: min(400px, 88vw); text-transform: uppercase; }
.seal-msg { font-family: var(--hand); font-size: 26px; color: var(--blood-hi); min-height: 34px; }
.wax { width: 110px; height: 110px; margin: 0 auto 20px; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #8a1f1f, #571010 55%, #2b0606); box-shadow: 0 6px 20px rgba(0,0,0,.8), inset 0 -8px 18px rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; font-family: var(--fell-sc); font-size: 44px; color: rgba(0,0,0,.6); position: relative; }
.wax::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; border: 1px solid rgba(0,0,0,.35); }
.paulfile { counter-increment: pf; }
.paulfile h4::before { content: 'PF-0' counter(pf) ' — '; color: #8a6a2a; }
.paulfile .type .pf-stamp { display: inline-block; font-size: 11px; border: 1px solid #5a1010; color: #5a1010; padding: 1px 6px; margin-right: 8px; letter-spacing: .2em; }

/* ============ THE TALLY (game page) ============ */
.pg-tally .masthead { padding-bottom: 10px; }
.tally-intro { text-align: center; max-width: 640px; margin: 0 auto 10px; font-family: var(--type); font-size: 14px; color: var(--bone-dim); }
#g-reset { margin-top: 8px; }
#g-reset-msg { font-family: var(--hand); font-size: 22px; color: var(--blood-hi); min-height: 28px; text-align: center; }
#paddle-insc { font-family: var(--hand); fill: #d8cfbb; font-size: 15px; letter-spacing: .1em; }
#tally-marks line { stroke: #d8cfbb; stroke-width: 1.6; opacity: .85; }
@media (max-width: 520px) { .paddle-wrap { margin: 0 auto; } }

/* ============ THE BASEMENT ============ */
.pg-basement { background: #050505; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto; }
.key { background: #111; border: 1px solid #26211b; color: var(--bone); font-family: var(--term); font-size: 30px; padding: 16px 0; min-height: 60px; transition: all .15s; }
.key:active, .key.pressed { background: #2a0d0d; border-color: var(--blood); }
.key.worn { color: var(--blood-hi); }
.code-out { font-family: var(--term); font-size: 38px; letter-spacing: .6em; text-align: center; color: #9fe89f; text-shadow: 0 0 12px rgba(120,255,120,.3); background: #050805; border: 1px solid #1c2a1c; padding: 8px; max-width: 300px; margin: 0 auto 16px; min-height: 58px; padding-left: calc(8px + .6em); }
.term { background: #020402; border: 1px solid #16200f; padding: 16px; font-family: var(--term); font-size: 19px; color: #8fb88f; min-height: 300px; max-height: 60vh; overflow-y: auto; box-shadow: inset 0 0 60px rgba(20,60,20,.15); }
.term p { margin: 0 0 4px; word-break: break-word; }
.term .t-sys { color: #5a7a5a; }
.term .t-in { color: #cfe8cf; }
.term .t-bad { color: #b46a6a; }
.term .t-antonio { color: #b8c9d4; }
.term form { display: flex; gap: 8px; margin-top: 8px; }
.term .prompt { color: #5a7a5a; }
.term input { flex: 1; background: transparent; border: 0; outline: 0; color: #cfe8cf; font: inherit; caret-color: #9fe89f; }
.stairwell { text-align: center; font-family: var(--type); color: var(--mute); font-size: 13px; }

/* ============ SEVEN O'CLOCK (end) ============ */
.dinner { text-align: center; padding: 30px 0 10px; }
.table { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 30px; margin: 40px auto; max-width: 720px; }
.seat { width: 130px; }
.seat .plate { width: 90px; height: 90px; margin: 0 auto 10px; border-radius: 50%; background: radial-gradient(circle at 42% 38%, #2a2620, #14110d 70%); border: 1px solid #3a342a; box-shadow: 0 10px 24px rgba(0,0,0,.8), inset 0 0 20px #000; transition: all .5s; }
.seat.sat .plate { background: radial-gradient(circle at 42% 38%, #4a1a1a, #1a0808 70%); border-color: var(--blood); box-shadow: 0 0 30px rgba(163,26,26,.3); }
.seat .s-name { font-family: var(--type); font-size: 12px; color: var(--bone-dim); letter-spacing: .15em; }
.seat.you { cursor: pointer; }
.seat.you .chair-back { width: 96px; height: 30px; margin: 0 auto -6px; border: 1px solid #4a443a; border-bottom: 0; border-radius: 10px 10px 0 0; background: linear-gradient(#201a13, #14100b); box-shadow: inset 0 -8px 14px rgba(0,0,0,.7); }
.seat.you .plate { position: relative; border-style: dashed; border-color: #6a5a40; animation: seatPulse 2.4s infinite; }
.seat.you .plate::after { content: ''; position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle, rgba(196,170,130,.35), transparent 68%); animation: plateSteam 3.2s ease-in-out infinite; }
.seat.you .s-name { color: var(--bone); }
.seat.you .sit-cta { font-family: var(--type); font-size: 11px; color: var(--blood-hi); letter-spacing: .22em; margin-top: 9px; text-shadow: 0 0 12px rgba(163,26,26,.6); animation: sitBlink 2.4s ease-in-out infinite; }
.seat.you:hover .plate { border-color: var(--blood-hi); }
.seat.you.sat { cursor: default; }
.seat.you.sat .plate { border-style: solid; animation: none; }
.seat.you.sat .plate::after, .seat.you.sat .sit-cta, .seat.you.sat .chair-back { display: none; }
@keyframes seatPulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(0,0,0,.8), inset 0 0 20px #000, 0 0 0 0 rgba(163,26,26,0); }
  50% { box-shadow: 0 10px 24px rgba(0,0,0,.8), inset 0 0 20px #000, 0 0 26px 5px rgba(163,26,26,.5); }
}
@keyframes plateSteam { 0%, 100% { opacity: .12; transform: translateY(0) scale(.9); } 50% { opacity: .45; transform: translateY(-5px) scale(1.06); } }
@keyframes sitBlink { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.sentence { font-family: var(--fell-sc); font-size: clamp(24px, 6vw, 46px); letter-spacing: .3em; color: var(--blood-hi); line-height: 1.8; text-shadow: 0 0 30px rgba(163,26,26,.4); }
.sentence .pk { font-size: inherit; border: 0; color: inherit; padding: 0; }
.sentence .pk.has { font-family: inherit; }
.sentence span:not(.has) { color: #1c1a17; }

/* print-ish safety */
@media (max-width: 420px) {
  .board { padding: 16px; gap: 10px; }
  .card { width: 126px; min-height: 108px; }
  .gate-title { font-size: clamp(44px, 15vw, 80px); }
}

/* ============ PHOTO EVIDENCE (house + shared) ============ */
.ph-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ph { margin: 0; cursor: pointer; position: relative; overflow: hidden; border: 1px solid #201c16; background: #000; box-shadow: 0 10px 30px rgba(0,0,0,.7); }
.ph img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; filter: grayscale(.85) contrast(1.12) brightness(.82) sepia(.12); transition: filter .6s, transform 8s; }
.ph:hover img { filter: grayscale(.4) contrast(1.15) brightness(.95); transform: scale(1.06); }
.ph figcaption { font-family: var(--type); font-size: 11px; letter-spacing: .14em; color: var(--mute); padding: 8px 10px; background: #0a0908; }
.ph::after { content: 'EXAMINE'; position: absolute; top: 10px; right: 10px; font-family: var(--term); font-size: 13px; color: rgba(201,194,178,.0); background: rgba(0,0,0,.6); padding: 2px 8px; transition: color .4s; }
.ph:hover::after { color: var(--blood-hi); }
.ph-wide { width: 100%; margin-bottom: 14px; }
.ph-wide img { aspect-ratio: 21/9; }
@media (min-width: 760px) { .ph-grid { grid-template-columns: repeat(3, 1fr); } .ph-wide { grid-column: 1/-1; } }
.lbox { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.94); display: none; flex-direction: column; align-items: center; justify-content: center; padding: 30px 18px; cursor: pointer; }
.lbox.on { display: flex; animation: lbin .5s; }
@keyframes lbin { from { opacity: 0 } }
.lbox img { max-width: min(1100px, 94vw); max-height: 74vh; object-fit: contain; filter: grayscale(.6) contrast(1.15) brightness(.9) sepia(.1); border: 1px solid #2a2520; box-shadow: 0 30px 80px #000; }
.lbox p { font-family: var(--type); color: var(--bone-dim); font-size: 14px; max-width: 640px; text-align: center; margin-top: 18px; }

/* ============ THE HALLWAY ============ */
#hw-stage { position: relative; margin: 0 auto; max-width: 900px; aspect-ratio: 4/5; max-height: 72vh; overflow: hidden; background: #000; border: 1px solid #201c16; box-shadow: inset 0 0 90px #000, 0 30px 80px rgba(0,0,0,.9); }
#hw-view { position: absolute; inset: -6%; background-size: cover; background-position: 50% 40%; filter: grayscale(.9) brightness(.34) contrast(1.25); transition: transform 1.3s cubic-bezier(.4,0,.6,1), filter .8s; transform-origin: 50% 62%; }
#hw-view.near { filter: grayscale(.9) brightness(.45) contrast(1.3); }
#hw-view.dark { filter: grayscale(1) brightness(.1) contrast(1.4); }
#hw-dark { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, transparent 18%, rgba(0,0,0,.92) 78%); pointer-events: none; transition: opacity 1s; }
#hw-entity { position: absolute; top: 0; bottom: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 62%; opacity: 0; pointer-events: none; filter: brightness(.68) contrast(1.5) blur(1px); mix-blend-mode: lighten; -webkit-mask-image: radial-gradient(ellipse at 50% 44%, #000 50%, transparent 74%); mask-image: radial-gradient(ellipse at 50% 44%, #000 50%, transparent 74%); }
#hw-entity.cross { animation: hwx 3.4s linear forwards; }
@keyframes hwx { 0% { opacity: 0; transform: translateX(-60%) scale(1.4) } 30% { opacity: .9 } 70% { opacity: .9 } 100% { opacity: 0; transform: translateX(60%) scale(1.4) } }
#hw-entity.stare { opacity: .95; transform: none; filter: brightness(.82) contrast(1.7); transition: opacity .15s; }
#hw-doors { position: absolute; left: 0; right: 0; bottom: 26%; display: flex; justify-content: space-between; padding: 0 8%; pointer-events: none; }
.hw-door { pointer-events: auto; width: 34%; aspect-ratio: 1/2.1; border: 2px solid rgba(90,30,25,.9); background: linear-gradient(#170c0a, #050303); color: var(--bone-dim); font-family: var(--fell-sc); letter-spacing: .15em; font-size: 15px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12%; box-shadow: 0 0 30px rgba(0,0,0,.9), inset 0 -20px 40px rgba(110,20,20,.12); animation: doorin 1s ease-out; transition: all .3s; }
.hw-door:hover { border-color: var(--blood-hi); color: var(--bone); box-shadow: 0 0 40px rgba(163,26,26,.3); }
@keyframes doorin { from { opacity: 0; transform: translateY(24px) } }
.hw-door.red { border-color: var(--blood-hi); background: linear-gradient(#3a0808, #0c0202); box-shadow: 0 0 50px rgba(163,26,26,.4), inset 0 0 40px rgba(163,26,26,.15); color: var(--blood-hi); }
#hw-breath { position: absolute; inset: 0; display: none; align-items: flex-end; justify-content: center; padding-bottom: 12%; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
#hw-breath.on { display: flex; }
.breath-btn { font-family: var(--fell-sc); letter-spacing: .25em; font-size: clamp(15px, 3vw, 20px); color: var(--bone); background: rgba(20,14,10,.85); border: 1px solid var(--bone-dim); padding: 20px 34px; min-height: 60px; animation: pulse 1.1s infinite; touch-action: none; user-select: none; -webkit-user-select: none; }
.breath-btn.held { color: var(--blood-hi); border-color: var(--blood-hi); animation: none; }
.breath-ring { position: absolute; left: 50%; top: 34%; width: 90px; height: 90px; margin-left: -45px; border-radius: 50%; border: 2px solid rgba(163,26,26,.6); transform: scale(var(--bs, .3)); opacity: .8; pointer-events: none; }
#hw-status { font-family: var(--term); font-size: clamp(15px, 3vw, 19px); color: var(--bone-dim); text-align: center; min-height: 30px; margin: 16px 0 0; }
#hw-status .red { letter-spacing: .1em; }
#hw-walk { display: block; margin: 22px auto 0; }
.hw-look { display: block; margin: 14px auto 0; background: none; border: none; font-family: var(--hand); font-size: 17px; color: rgba(201,194,178,.28); cursor: pointer; letter-spacing: .08em; }
.hw-look:hover { color: rgba(214,60,60,.7); }
.calendar .hand p { transition: color .4s; }
.calendar .hand p:hover { color: var(--blood-hi); }
.calendar .hand p.cal-read { opacity: .75; font-style: italic; }
/* THE MEASURING */
#ms-stage { position: relative; height: 420px; margin: 26px auto 0; max-width: 460px; border: 1px solid #1f1712; background: radial-gradient(120% 90% at 50% 100%, rgba(50,36,22,.35), transparent 60%), #040302; overflow: hidden; box-shadow: inset 0 0 80px rgba(0,0,0,.9); }
#ms-jamb { position: absolute; left: 50%; bottom: 0; width: 112px; height: 400px; transform: translateX(-50%); }
#ms-tape { position: absolute; left: calc(50% - 26px); bottom: 4%; width: 14px; height: 396px; z-index: 1; transform-origin: bottom center; background: repeating-linear-gradient(to top, #8a7a3a 0 2px, #a89448 2px 10px, #8a7a3a 10px 11px, #6b5e2e 11px 12px); box-shadow: 0 0 12px rgba(0,0,0,.8), inset -2px 0 3px rgba(0,0,0,.5); opacity: .85; transition: bottom 2.5s ease-in; }
#ms-tape i { position: absolute; left: -4px; right: -4px; top: 0; height: 3px; background: var(--blood-hi); box-shadow: 0 0 8px rgba(196,30,30,.8); }
#ms-you { position: absolute; left: 50%; bottom: 0; width: 46px; height: 250px; transform: translateX(-58%); background: linear-gradient(to top, rgba(20,14,10,.95), rgba(10,7,5,.6)); border-radius: 50% 50% 0 0 / 22% 22% 0 0; opacity: 0; transition: opacity 2s; filter: blur(.4px); }
#ms-you.on { opacity: 1; }
#ms-line { position: absolute; left: 0; right: 0; top: 0; z-index: 3; text-align: center; padding: 12px 20px 20px; color: var(--bone-dim); font-family: var(--fell); font-style: italic; font-size: 16px; text-shadow: 0 2px 8px #000; background: linear-gradient(rgba(0,0,0,.92) 40%, transparent); }
#ms-bar { position: absolute; left: 18%; right: 18%; bottom: 12px; height: 4px; background: #131009; border: 1px solid #241d15; }
#ms-bar i { display: block; height: 100%; width: calc(var(--ms, 0) * 100%); background: linear-gradient(90deg, #4a1010, var(--blood-hi)); transition: width .1s linear; }
#ms-line b { color: var(--blood-hi); }
#hw-log { max-width: 640px; margin: 26px auto 0; font-family: var(--type); font-size: 13px; color: var(--mute); }
#hw-log p { margin: 0 0 8px; }
#hw-log p.fresh { color: var(--bone-dim); }

/* ============ FIVE NIGHTS AT PAUL'S ============ */
#fn { position: relative; max-width: 1080px; margin: 0 auto; user-select: none; -webkit-user-select: none; }
#fn-hud { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; font-family: var(--term); font-size: 21px; color: var(--bone-dim); padding: 12px 6px; }
/* during the watch the office IS the page */
#fn.playing { position: fixed; inset: 0; z-index: 160; background: #000; display: flex; flex-direction: column; }
#fn.playing #fn-office { flex: 1; height: auto; min-height: 0; border: none; }
#fn.playing #fn-hud { padding: 8px 14px; background: #040303; border-bottom: 1px solid #171310; flex: none; }
#fn.playing .fn-side { width: 23%; }
#fn.playing .fn-center { left: 23%; right: 23%; }
#fn.playing .fn-doorway { bottom: 42%; }
body.fn-play { overflow: hidden; }
#fn-leave { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 6; font-family: var(--hand); font-size: 14px; color: rgba(201,194,178,.3); background: none; border: none; cursor: pointer; letter-spacing: .1em; }
#fn-leave:hover { color: rgba(214,60,60,.7); }
#fn-hud .fn-clock { font-size: 32px; color: var(--bone); letter-spacing: .1em; margin-right: auto; text-shadow: 0 0 14px rgba(214,180,110,.25); }
#fn-hud b { color: var(--blood-hi); font-weight: normal; }
#fn-power { flex: 1 1 200px; min-width: 170px; }
#fn-power b { font-size: 24px; }
#fn-powerbar { height: 16px; border: 1px solid #3a342c; background: #0a0806; position: relative; margin-top: 2px; }
#fn-powerbar i { position: absolute; inset: 1px auto 1px 1px; width: calc(var(--p, 100) * 1%); background: linear-gradient(#7a5a2a, #4a3414); transition: width .3s; }
#fn-powerbar.low i { background: var(--blood-hi); animation: pulse .8s infinite; }
#fn-office { position: relative; height: min(58vh, 560px); min-height: 340px; background: #030202; border: 1px solid #241f19; overflow: hidden; box-shadow: inset 0 0 120px #000; }
.fn-side { position: absolute; top: 0; bottom: 0; width: 26%; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 12px; }
.fn-side.l { left: 0; border-right: 1px solid #191512; }
.fn-side.r { right: 0; border-left: 1px solid #191512; }
.fn-doorway { position: absolute; top: 8%; bottom: 34%; width: 88%; left: 6%; background: radial-gradient(ellipse at 50% 30%, #0d0a08, #000 75%); border: 1px solid #221c16; overflow: hidden; }
.fn-doorway img.fn-there { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.5) contrast(1.5); opacity: 0; transition: opacity .12s; }
.fn-doorway.lit { box-shadow: inset 0 0 60px rgba(214,180,110,.25); background: radial-gradient(ellipse at 50% 35%, #241a10, #050303 78%); }
.fn-doorshut { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, #16110c 0 14px, #0c0906 14px 16px); transform: translateY(-101%); transition: transform .45s cubic-bezier(.6,0,.4,1); box-shadow: 0 6px 30px #000; }
.fn-doorshut.closed { transform: none; }
.fn-btn { display: block; width: 100%; font-family: var(--term); font-size: 16px; letter-spacing: .12em; padding: 10px 6px; min-height: 44px; background: #0e0b08; border: 1px solid #332b22; color: var(--bone-dim); position: relative; z-index: 2; touch-action: manipulation; }
#fn-windbtn { touch-action: none; -webkit-touch-callout: none; }
.fn-btn:active { transform: translateY(1px); }
.fn-btn.on { border-color: var(--blood-hi); color: var(--blood-hi); background: #170a08; box-shadow: 0 0 18px rgba(163,26,26,.25); }
.fn-center { position: absolute; left: 26%; right: 26%; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 14px; background: radial-gradient(ellipse at 50% 0%, rgba(30,24,18,.5), transparent 60%); }
.fn-desknote { font-family: var(--hand); font-size: clamp(16px, 2.6vw, 22px); color: rgba(201,194,178,.75); transform: rotate(-1.5deg); max-width: 90%; text-align: center; }
#fn-cambtn { margin-top: 10px; width: min(300px, 80%); font-size: 18px; padding: 14px; letter-spacing: .3em; }
#fn-cams { position: absolute; inset: 0; z-index: 5; background: #020202; display: none; flex-direction: column; }
#fn-cams.on { display: flex; }
#fn-cams::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3; background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0,0,0,.35) 4px); }
#fn-camview { flex: 1; position: relative; overflow: hidden; background: #000; }
#fn-camview img.camfeed { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.5) contrast(1.4); }
#fn-camview .cam-static { position: absolute; inset: 0; opacity: .16; mix-blend-mode: screen; }
#fn-camview img.cam-fig { position: absolute; height: 52%; bottom: 6%; left: 36%; filter: brightness(.3) contrast(1.7) grayscale(.9); opacity: .95; transform: scaleY(1.12); }
#fn-camview img.cam-fig.entity { left: 60%; height: 34%; filter: brightness(.5) contrast(1.6) blur(.5px); mix-blend-mode: screen; -webkit-mask-image: radial-gradient(ellipse at 50% 44%, #000 50%, transparent 74%); mask-image: radial-gradient(ellipse at 50% 44%, #000 50%, transparent 74%); }
#fn-camlist { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 10px; background: #060505; }
#fn-camlist button { font-family: var(--term); font-size: 14px; padding: 10px 4px; min-height: 42px; background: #0d0a08; border: 1px solid #2a251e; color: var(--bone-dim); letter-spacing: .06em; }
#fn-camlist button.on { border-color: var(--blood-hi); color: var(--blood-hi); }
#fn-camlist button .mini { display: block; font-size: 10px; color: var(--mute); }
#fn-camosd { position: absolute; top: 12px; left: 14px; z-index: 4; font-family: var(--term); font-size: clamp(15px, 2.6vw, 22px); color: #cfd8cf; text-shadow: 2px 2px 0 #000; }
#fn-wind { position: absolute; right: 14px; top: 12px; z-index: 4; font-family: var(--term); font-size: 15px; color: var(--bone-dim); text-align: right; }
#fn-windbar { width: 130px; height: 10px; border: 1px solid #3a342c; margin-top: 4px; }
#fn-windbar i { display: block; height: 100%; width: calc(var(--w, 100) * 1%); background: #6a5a3a; }
#fn-windbar.low i { background: var(--blood-hi); animation: pulse .7s infinite; }
#fn-card { position: absolute; inset: 0; z-index: 8; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
#fn-card h2 { font-family: var(--fell-sc); font-weight: normal; letter-spacing: .2em; font-size: clamp(26px, 6vw, 54px); margin: 0 0 10px; color: var(--bone); }
#fn-card .fn-sub { font-family: var(--type); color: var(--bone-dim); font-size: 14px; max-width: 560px; }
#fn-card .fn-call { font-family: var(--type); color: #8a8375; font-size: 14px; max-width: 600px; text-align: left; margin-top: 18px; border-left: 2px solid var(--blood); padding-left: 14px; }
#fn-card .fn-call b { color: var(--blood-hi); font-weight: normal; }
#fn-jump { position: absolute; inset: 0; z-index: 9; background: #000; display: none; align-items: center; justify-content: center; }
#fn-jump.on { display: flex; }
#fn-jump img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.7) brightness(.8); animation: jshake .12s infinite; }
@keyframes jshake { 25% { transform: translate(6px, -9px) scale(1.12) } 50% { transform: translate(-8px, 6px) scale(1.15) } 75% { transform: translate(5px, 8px) scale(1.1) } }
@media (max-width: 700px) {
  #fn-office { height: 62vh; }
  .fn-side { width: 30%; }
  .fn-center { left: 30%; right: 30%; }
  #fn-camlist { grid-template-columns: repeat(3, 1fr); }
}

/* ============ THE RED ROOM ============ */
.pg-red main { max-width: none; padding: 0; }
.pg-red .sitefoot { position: relative; z-index: 5; }
.rr-stage { position: relative; height: 100dvh; min-height: 600px; display: flex; flex-direction: column; overflow: hidden; --bloodlv: 0;
  background: radial-gradient(ellipse 75% 55% at 50% 24%, #300604, #140302 58%, #000 95%); }
.rr-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 4;
  box-shadow: inset 0 0 160px #000, inset 0 -90px 130px rgba(120, 10, 8, calc(.1 + var(--bloodlv, 0) * .45)); transition: box-shadow .8s; }
.rr-stage::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 4; opacity: calc(.5 + var(--bloodlv, 0) * .5);
  background: repeating-linear-gradient(115deg, transparent 0 90px, rgba(90, 8, 6, .05) 90px 100px, transparent 100px 260px, rgba(60, 5, 4, .08) 260px 274px); }

/* the lamp — push it, the shadows go wrong */
#rr-lamp { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); z-index: 6; transform-origin: 50% 0; cursor: pointer; }
#rr-lamp.swing { animation: lampswing 4.2s ease-in-out; }
@keyframes lampswing { 0% { transform: translateX(-50%) rotate(0) } 14% { transform: translateX(-50%) rotate(8deg) } 30% { transform: translateX(-50%) rotate(-6.5deg) } 50% { transform: translateX(-50%) rotate(4.5deg) } 70% { transform: translateX(-50%) rotate(-2.6deg) } 86% { transform: translateX(-50%) rotate(1.2deg) } 100% { transform: translateX(-50%) rotate(0) } }
.rr-cord { width: 3px; height: clamp(60px, 13vh, 120px); background: #0d0a07; margin: 0 auto; }
.rr-bulb { width: 16px; height: 22px; margin: 0 auto; border-radius: 50% 50% 46% 46%; background: radial-gradient(#ffdf9a, #8a5c14 62%, #241603);
  box-shadow: 0 0 40px 14px rgba(255, 190, 90, .3), 0 0 130px 46px rgba(255, 170, 60, .13); animation: bulbfl 7s infinite; }
@keyframes bulbfl { 0%, 93%, 100% { opacity: 1 } 94% { opacity: .55 } 95% { opacity: 1 } 96.5% { opacity: .5 } }
.rr-cone { position: absolute; top: 70%; left: 50%; transform: translateX(-50%); width: 90vw; height: 100vh; pointer-events: none;
  background: radial-gradient(ellipse 42% 60% at 50% 0%, rgba(255, 190, 110, .12), transparent 68%); }

#rr-room { position: relative; flex: 1; margin: 0; max-width: none; max-height: none; border: none; overflow: hidden; background: transparent; box-shadow: none; cursor: crosshair; }
#rr-room::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; mix-blend-mode: screen;
  background: radial-gradient(ellipse at 50% 22%, rgba(163, 26, 26, calc(.2 + var(--bloodlv, 0) * .4)), transparent 55%); }
#rr-paul-wrap { position: absolute; left: 50%; bottom: 24%; width: min(46vw, 320px); transform: translateX(-50%) rotate(.5deg); z-index: 2; transition: opacity 2s; }
#rr-paul { width: 100%; filter: grayscale(.9) contrast(1.35) brightness(.55) sepia(.5) hue-rotate(-30deg); display: block; }
#rr-paul-wrap.rr-photo { width: min(66vw, 430px); bottom: 13%; }
#rr-paul-wrap.rr-photo #rr-paul { filter: grayscale(.35) contrast(1.2) brightness(.62) sepia(.35) hue-rotate(-15deg); }

/* when the photograph is the room */
#rr-scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 36%; z-index: 2; transition: opacity 2.2s, filter .6s; }
#rr-room.photoed::before { z-index: 3; }
#rr-room.photoed #rr-blood { z-index: 4; }
#rr-room.photoed #rr-paul-wrap { display: none; }
#rr-room.photoed #rr-drain { left: 51%; bottom: 25%; background: none; border-color: rgba(90,20,14,.55); }
#rr-room.photoed #rr-drain::after { opacity: .4; }
#rr-room.photoed #rr-cushion { left: 46%; bottom: 42%; }
#rr-room.photoed #rr-ledger { left: 35%; bottom: 48%; }
#rr-room.photoed #rr-lamp { left: 50%; }
#rr-room.photoed #rr-lamp .rr-cord, #rr-room.photoed #rr-lamp .rr-bulb { opacity: 0; }
#rr-room.photoed #rr-lamp { height: 22%; cursor: pointer; }
#rr-room.hit #rr-scene { animation: rrhit .3s; }
#rr-chair { position: absolute; left: 50%; bottom: 10%; width: min(56vw, 400px); height: 26%; transform: translateX(-50%); z-index: 1;
  background: linear-gradient(#1a0c06, #000); border: 1px solid #2a1408; border-radius: 4px 4px 0 0; }
#rr-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 16%; z-index: 1; pointer-events: none;
  background: linear-gradient(transparent, rgba(70, 9, 6, .65)); }
#rr-drain { position: absolute; bottom: 5%; left: 50%; width: 74px; height: 26px; margin-left: -37px; z-index: 4; border-radius: 50%;
  background: radial-gradient(#000 40%, #1c0505 75%, #2a0a06); border: 1px solid #3a1008; cursor: pointer; }
#rr-drain::after { content: ''; position: absolute; inset: 5px 12px; border-radius: 50%; background: repeating-linear-gradient(90deg, transparent 0 5px, #1a0604 5px 8px); }
#rr-drain.gulp { animation: gulping .5s; }
@keyframes gulping { 40% { transform: scale(1.25, .7); } }
#rr-cushion, #rr-ledger { position: absolute; z-index: 5; background: none; border: none; font-size: 22px; opacity: .35; cursor: pointer; filter: grayscale(1) brightness(.7); transition: opacity .3s; }
#rr-cushion:hover, #rr-ledger:hover { opacity: .95; }
#rr-cushion { left: 57%; bottom: 30%; } #rr-ledger { left: 36%; bottom: 12%; }
#rr-blood { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
#rr-splash { position: fixed; inset: 0; z-index: 140; pointer-events: none; }
#rr-resolve { width: min(880px, 94vw); margin: 8px auto 0; position: relative; z-index: 6; }
#rr-resolve .rr-bar { height: 22px; border: 2px solid #4a1414; background: #0a0302; position: relative; box-shadow: 0 0 18px rgba(122,20,20,.25), inset 0 2px 6px #000; }
#rr-resolve .rr-bar::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 9.4%, rgba(0,0,0,.55) 9.4% 10%); pointer-events: none; }
#rr-resolve .rr-bar i { position: absolute; inset: 2px auto 2px 2px; width: calc(var(--r, 100) * 1%); background: linear-gradient(180deg, #a32222, #7a1a1a 45%, #3a0808); transition: width .5s; box-shadow: 0 0 12px rgba(163,26,26,.4); }
#rr-resolve .rr-lab { font-family: var(--term); font-size: 17px; color: var(--bone-dim); display: flex; justify-content: space-between; margin-bottom: 4px; letter-spacing: .08em; }
#rr-resolve .rr-lab b { color: var(--blood-hi); font-size: 20px; }
#rr-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 8px 8px 4px; position: relative; z-index: 6; }
.rr-tool { font-family: var(--term); font-size: 14px; letter-spacing: .1em; padding: 12px 14px; min-height: 48px; background: #0d0705; border: 1px solid #331410; color: var(--bone-dim); }
.rr-tool.sel { border-color: var(--blood-hi); color: var(--blood-hi); background: #1c0806; box-shadow: 0 0 24px rgba(163,26,26,.35); }
.rr-tool:hover { border-color: var(--blood); }
#rr-says { max-width: 720px; margin: 4px auto 10px; min-height: 62px; padding: 0 16px; position: relative; z-index: 6; }
#rr-says .rr-line { font-family: var(--type); color: var(--bone); font-size: 15px; text-align: center; margin-bottom: 8px; }
#rr-says .rr-line.thought { font-family: var(--hand); font-size: 26px; color: var(--blood-hi); }
#rr-room.hit #rr-paul-wrap { animation: rrhit .3s; }
@keyframes rrhit { 30% { transform: translateX(-52%) rotate(-1.5deg) } 60% { transform: translateX(-49%) rotate(1deg) } }
.rr-empty .rr-stage { align-items: center; justify-content: center; text-align: center; }
.rr-empty .chair-glyph { font-size: 90px; opacity: .5; filter: grayscale(1) brightness(.4); }
.rr-after { max-width: 1000px; margin: 40px auto; }
#rr-read { position: fixed; inset: 0; z-index: 230; background: rgba(0,0,0,.9); display: none; align-items: center; justify-content: center; padding: 22px; }
#rr-read.on { display: flex; }
#rr-read-body { max-width: 640px; max-height: 82vh; overflow: auto; }
#rr-read-x { position: absolute; top: 14px; right: 20px; background: none; border: none; color: var(--bone-dim); font-size: 34px; cursor: pointer; }
#fn-office.out .fn-side, #fn-office.out .fn-center { opacity: .12; }
#fn-office.out { box-shadow: inset 0 0 200px #000; }
/* INSIDE THE WALLS */
#wl-stage { position: relative; margin: 24px auto 0; max-width: 560px; }
#wl-view { position: relative; height: 400px; overflow: hidden; border: 1px solid #241a10; cursor: pointer;
  background: #030202; }
#wl-view::after { content: ''; position: absolute; inset: 0; z-index: 6; pointer-events: none; background: radial-gradient(ellipse at 50% 56%, transparent 30%, rgba(0,0,0,.85) 84%); }
#wl-tunnel { position: absolute; inset: 0; }
#wl-c { width: 100%; height: 100%; display: block; }
/* dead styles kept for the flat-fallback comments in the log; the 3D tunnel owns the view now */
.wl-p { position: absolute; pointer-events: none; backface-visibility: hidden; }
.wl-p.floor { left: 50%; top: calc(54% + 188px); width: 560px; height: 900px; transform-origin: 50% 0%; transform: translateX(-50%) rotateX(-90deg);
  background:
    linear-gradient(rgba(0,0,0,.05), rgba(0,0,0,.9) 78%),
    repeating-linear-gradient(90deg, rgba(88,62,33,.8) 0 34px, rgba(46,30,15,.9) 34px 46px),
    linear-gradient(#55391d, #241708); }
.wl-p.ceil { left: 50%; bottom: calc(46% + 188px); width: 560px; height: 900px; transform-origin: 50% 100%; transform: translateX(-50%) rotateX(-90deg);
  background:
    linear-gradient(rgba(0,0,0,.9), rgba(0,0,0,.3) 55%, rgba(0,0,0,.05)),
    repeating-linear-gradient(90deg, rgba(52,36,19,.85) 0 34px, rgba(28,18,9,.9) 34px 46px); }
.wl-p.wlL { left: calc(50% - 280px); top: 54%; width: 900px; height: 376px; transform-origin: 0% 50%; transform: translateY(-50%) rotateY(90deg);
  background:
    linear-gradient(90deg, rgba(0,0,0,.1), rgba(0,0,0,.88) 82%),
    repeating-linear-gradient(0deg, rgba(96,68,36,.75) 0 26px, rgba(48,32,16,.9) 26px 38px, rgba(24,15,8,.9) 38px 44px); }
.wl-p.wlR { right: calc(50% - 280px); top: 54%; width: 900px; height: 376px; transform-origin: 100% 50%; transform: translateY(-50%) rotateY(-90deg);
  background:
    linear-gradient(-90deg, rgba(0,0,0,.1), rgba(0,0,0,.88) 82%),
    repeating-linear-gradient(0deg, rgba(96,68,36,.75) 0 26px, rgba(48,32,16,.9) 26px 38px, rgba(24,15,8,.9) 38px 44px); }
/* each frame = one stud bay — a doorway cross-section, receding by real depth */
.wl-fr { position: absolute; left: 50%; top: 54%; width: 560px; height: 376px; transform: translate(-50%, -50%) translateZ(var(--z)); pointer-events: none; }
.wl-fr::before, .wl-fr::after { content: ''; position: absolute; top: -3%; bottom: -3%; width: 34px;
  background: linear-gradient(90deg, #503718 0%, #6b4a22 40%, #33200e 100%);
  box-shadow: inset 0 0 10px rgba(0,0,0,.7), 0 0 22px rgba(0,0,0,.65); }
.wl-fr::before { left: 0; } .wl-fr::after { right: 0; }
.wl-fr .plate { position: absolute; left: 0; right: 0; top: -1%; height: 24px;
  background: linear-gradient(#4a3218, #241708); box-shadow: inset 0 -5px 10px rgba(0,0,0,.8); }
.wl-fr .sill { position: absolute; left: 0; right: 0; bottom: -1%; height: 22px;
  background: linear-gradient(#241708, #3a2812); box-shadow: inset 0 6px 10px rgba(0,0,0,.85); }
/* a side gap = the stud bay opens into blackness beside you */
.wl-fr.gap-l::before { background: radial-gradient(ellipse at 30% 50%, #0c0805, #000 75%); box-shadow: inset -6px 0 14px #000; }
.wl-fr.gap-r::after { background: radial-gradient(ellipse at 70% 50%, #0c0805, #000 75%); box-shadow: inset 6px 0 14px #000; }
/* tally marks pencilled on the studs */
.wl-fr .marks { position: absolute; left: 5px; top: 16%; font: 12px 'Reenie Beanie', cursive; color: rgba(190,170,140,.45); transform: rotate(90deg); transform-origin: left top; letter-spacing: 4px; white-space: nowrap; }
.wl-fr .marks.r { left: auto; right: 5px; transform: rotate(-90deg); transform-origin: right top; }
/* the end wall — insulation face where the corridor dies */
.wl-end { position: absolute; left: 50%; top: 54%; width: 560px; height: 376px; transform: translate(-50%, -50%) translateZ(var(--z)); pointer-events: none;
  background:
    repeating-linear-gradient(35deg, rgba(96,74,60,.2) 0 6px, rgba(44,32,25,.25) 6px 11px, rgba(22,15,10,.32) 11px 14px),
    radial-gradient(ellipse at 50% 55%, #4a3828 0%, #221509 55%, #0a0604 90%);
  box-shadow: inset 0 0 60px rgba(0,0,0,.85); }
.wl-end .tally { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); font: 16px 'Reenie Beanie', cursive; color: rgba(205,185,150,.5); letter-spacing: 4px; text-align: center; line-height: 1.7; }
.wl-end.x { background:
    radial-gradient(ellipse at 50% 50%, rgba(200,168,96,.4), rgba(66,44,22,.5) 45%, rgba(12,7,4,.97) 85%),
    repeating-linear-gradient(35deg, rgba(96,74,60,.22) 0 6px, rgba(44,32,25,.28) 6px 11px); }
/* him, down the passage — your own sketch, at real depth in the corridor */
.wl-face { position: absolute; left: 50%; top: 54%; width: 96px; pointer-events: none;
  transform: translate(-50%, -50%) translateZ(var(--z));
  filter: brightness(.9) contrast(1.3) sepia(.35); mix-blend-mode: screen; }
.wl-face img { width: 100%; display: block; -webkit-mask-image: radial-gradient(ellipse at 50% 42%, #000 42%, transparent 68%); mask-image: radial-gradient(ellipse at 50% 42%, #000 42%, transparent 68%); animation: wlsway 3.4s ease-in-out infinite; }
@keyframes wlsway { 50% { transform: translateY(3%) rotate(1.2deg); } }
/* your forearms — you are the thing crawling */
#wl-hands { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
#wl-hands i { position: absolute; bottom: -4%; width: 34%; height: 30%; background: radial-gradient(ellipse at 50% 100%, #16110a 30%, transparent 72%); transition: transform .3s; }
#wl-hands .l { left: 4%; } #wl-hands .r { right: 4%; }
#wl-hands.step .l { transform: translateY(14%); } #wl-hands.step .r { transform: translateY(-5%); }
#wl-hands.step.alt .l { transform: translateY(-5%); } #wl-hands.step.alt .r { transform: translateY(14%); }
/* dust in the beam */
#wl-dust { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
#wl-dust i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: rgba(200,180,140,.35); animation: wldust 6s linear infinite; }
#wl-dust i:nth-child(1) { left: 20%; top: 40%; } #wl-dust i:nth-child(2) { left: 45%; top: 55%; animation-delay: 1.2s; }
#wl-dust i:nth-child(3) { left: 62%; top: 38%; animation-delay: 2.6s; } #wl-dust i:nth-child(4) { left: 74%; top: 60%; animation-delay: .8s; }
#wl-dust i:nth-child(5) { left: 33%; top: 62%; animation-delay: 3.9s; } #wl-dust i:nth-child(6) { left: 55%; top: 47%; animation-delay: 5.1s; }
@keyframes wldust { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: .5; } 85% { opacity: .3; } 100% { transform: translate(34px, -52px); opacity: 0; } }
/* the flashlight finds the middle */
#wl-shine { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse 52% 44% at 50% 56%, rgba(224,196,142,.26), rgba(216,190,140,.07) 55%, transparent 78%); }
#wl-breathe { position: absolute; inset: 0; z-index: 5; pointer-events: none; background: radial-gradient(60% 50% at calc(50% + var(--near, 0) * 30% - 15%) 50%, rgba(60,20,14, calc(var(--near, 0) * .55)), transparent 70%); transition: background 1s; }
#wl-keys { text-align: center; font: 11px 'Courier New', monospace; letter-spacing: .12em; color: #6e6250; margin: 10px 0 0; }
#wl-pad { display: grid; grid-template-areas: 'tl fw tr' '. bk .'; grid-template-columns: 1fr 1.3fr 1fr; gap: 8px; max-width: 360px; margin: 18px auto 0; }
.wl-tl { grid-area: tl; } .wl-fw { grid-area: fw; } .wl-tr { grid-area: tr; } .wl-bk { grid-area: bk; }
.wl-fw { border-color: #4a3a2c; }
.wl-dir { font-family: var(--term); font-size: 14px; letter-spacing: .14em; padding: 14px 6px; min-height: 48px; background: #0d0a07; border: 1px solid #332b22; color: var(--bone-dim); }
.wl-dir:active { transform: translateY(1px); }
.wl-dir:hover { color: var(--bone); border-color: var(--bone-dim); }
#wl-stat { text-align: center; margin-top: 16px; font-family: var(--fell); font-style: italic; color: var(--bone-dim); min-height: 26px; }
#wl-it { text-align: center; min-height: 30px; font-size: 21px; margin-top: 6px; }
#wl-log { max-width: 520px; margin: 14px auto 0; font-family: var(--hand); font-size: 19px; color: rgba(201,194,178,.75); }
#wl-log .fresh { color: var(--bone); }
#wl-stage .hw-door { display: block; margin: 14px auto 0; }
/* THE YARD AT 3 AM */
#yd-field { position: relative; height: min(56vh, 430px); overflow: hidden; border: 1px solid #141a14; background: #020402; }
#yd-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.8) brightness(.32) contrast(1.3) sepia(.2); }
#yd-dark { position: absolute; inset: 0; background: radial-gradient(130% 90% at 50% 12%, transparent 34%, rgba(0,0,0,.88) 80%); transition: opacity 3s; }
#yd-moon { position: absolute; top: 6%; right: 12%; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 40% 38%, #cfd4cd, #8e938c 60%, #5c615a); box-shadow: 0 0 44px 12px rgba(200,208,196,.14); opacity: .75; }
.yd-spot { position: absolute; width: 58px; height: 30px; margin-left: -29px; border: none; cursor: pointer; background: radial-gradient(ellipse at 50% 100%, rgba(46,64,36,.85), rgba(16,26,12,.5) 62%, transparent 78%); border-radius: 50% 50% 46% 46% / 90% 90% 30% 30%; transition: transform .5s, background .5s; animation: ydsway 4s ease-in-out infinite; }
.yd-spot:nth-child(2n) { animation-delay: -1.6s; } .yd-spot:nth-child(3n) { animation-delay: -2.8s; }
@keyframes ydsway { 0%,100% { transform: skewX(0deg) scaleY(1); } 50% { transform: skewX(-4deg) scaleY(1.06); } }
.yd-spot:hover { background: radial-gradient(ellipse at 50% 100%, rgba(74,96,52,.95), rgba(26,40,20,.6) 62%, transparent 78%); }
.yd-spot.dug { animation: none; transform: none; background: radial-gradient(ellipse at 50% 60%, #0a0704 30%, #1c130a 62%, transparent 85%); box-shadow: inset 0 6px 14px #000, 0 4px 0 rgba(30,22,12,.6); cursor: default; }
.yd-spot.refill { background: radial-gradient(ellipse at 50% 100%, rgba(46,64,36,.9), rgba(16,26,12,.55) 62%, transparent 78%); box-shadow: none; animation: ydsway 4s ease-in-out infinite; }
#yd-stat { text-align: center; margin-top: 16px; font-family: var(--fell); font-style: italic; color: var(--bone-dim); min-height: 26px; }
#yd-finds { max-width: 560px; margin: 18px auto 0; display: flex; flex-direction: column; gap: 10px; }
.yd-find { border: 1px solid #241d15; background: rgba(10,7,5,.85); padding: 12px 16px; opacity: 0; transform: translateY(8px); transition: all .8s; }
.yd-find.in { opacity: 1; transform: none; }
.yd-find b { display: block; font-family: var(--term); font-size: 14px; letter-spacing: .16em; color: #9a8f6a; }
.yd-find span { display: block; margin-top: 5px; font-family: var(--fell); font-size: 15px; color: var(--bone-dim); font-style: italic; }
/* THE ATTIC */
#at-tvwrap { text-align: center; margin-top: 22px; }
#at-tv { position: relative; display: inline-block; padding: 14px 14px 30px; background: linear-gradient(160deg, #221a12, #14100a); border: 2px solid #2e2418; border-radius: 10px; box-shadow: 0 10px 40px #000, inset 0 0 30px rgba(0,0,0,.7); }
#at-tv::after { content: ''; position: absolute; right: 10px; bottom: 7px; width: 8px; height: 8px; border-radius: 50%; background: #4a1010; box-shadow: 0 0 6px rgba(214,60,60,.6); }
#at-static { display: block; width: min(420px, 78vw); height: auto; aspect-ratio: 220/150; image-rendering: pixelated; background: #050505; }
#at-feed { position: absolute; left: 14px; top: 14px; width: calc(100% - 28px); height: calc(100% - 44px); object-fit: cover; filter: grayscale(.6) brightness(.5) contrast(1.5); animation: tvroll .5s steps(2) infinite; }
@keyframes tvroll { 50% { transform: translateY(2px); } }
#at-osd { position: absolute; left: 22px; top: 20px; font-family: var(--term); color: #9fd8c8; font-size: 14px; text-shadow: 0 0 6px rgba(120,220,190,.5); }
#at-tvstat { margin-top: 12px; font-family: var(--fell); font-style: italic; color: var(--bone-dim); min-height: 26px; }
#at-horse-stage { position: relative; height: 210px; margin-top: 20px; background: radial-gradient(60% 80% at 50% 100%, rgba(30,22,14,.5), transparent 70%); }
#at-horse { position: absolute; left: 18%; bottom: 20px; width: 90px; height: 100px; transform-origin: 50% 96%; transition: transform .2s; }
#at-horse i { position: absolute; left: 12px; top: 6px; width: 66px; height: 52px; background: radial-gradient(ellipse at 40% 35%, #4a3626, #241a10 75%); border-radius: 46% 54% 50% 50% / 60% 70% 40% 50%; box-shadow: inset -8px -8px 16px rgba(0,0,0,.6); }
#at-horse i::before { content: ''; position: absolute; right: -16px; top: -14px; width: 26px; height: 34px; background: radial-gradient(ellipse at 40% 30%, #4a3626, #1c130a 80%); border-radius: 60% 40% 46% 54% / 50% 60% 40% 50%; }
#at-horse b { position: absolute; left: 4px; right: -6px; bottom: 4px; height: 8px; background: linear-gradient(#3a2a18, #1a120a); border-radius: 50%; }
#at-horse u { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #2a1d10; border-radius: 50%; box-shadow: 0 2px 6px #000; }
#at-horse.rocking { animation: rock .62s ease-in-out infinite; }
@keyframes rock { 0%,100% { transform: rotate(-7deg); } 50% { transform: rotate(9deg); } }
#at-corner { position: absolute; right: 12%; bottom: 14px; width: 90px; height: 150px; }
#at-cornerfig { position: absolute; inset: 0; opacity: 0; transition: opacity 2.6s; background: radial-gradient(42px 90px at 50% 100%, rgba(5,4,3,.95), transparent 75%); }
#at-cornerfig::after { content: ''; position: absolute; left: 50%; top: 22%; width: 34px; height: 12px; margin-left: -17px; background: radial-gradient(4px 6px at 8px 4px, rgba(214,60,60,.75), transparent 70%), radial-gradient(4px 6px at 26px 4px, rgba(214,60,60,.75), transparent 70%); }
#at-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; margin-top: 20px; }
.at-box { position: relative; overflow: hidden; height: 92px; background: linear-gradient(165deg, #1d160e, #100b06); border: 1px solid #332a1c; color: #8a7f68; font-family: var(--term); font-size: 14px; letter-spacing: .14em; touch-action: none; user-select: none; -webkit-user-select: none; }
.at-box:hover { border-color: #55452e; }
.at-box.open { background: linear-gradient(165deg, #241a0e, #171008); border-color: #6a5a3a; color: #c9b98a; box-shadow: inset 0 0 24px rgba(0,0,0,.8); }
.at-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #14100a; }
.at-fill i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #4a3616, #9a7f3e); }
.paul-photo.held img { filter: brightness(.45) contrast(1.7) saturate(1.5) !important; transform: scale(1.04); transition: filter 1.5s, transform 4s; }
/* ghouls candles */
#candles { display: flex; justify-content: center; gap: 18px; margin: 26px 0 8px; flex-wrap: wrap; }
.candle { position: relative; width: 16px; height: 64px; cursor: pointer; }
.candle b { position: absolute; left: 2px; right: 2px; bottom: 0; top: 16px; background: linear-gradient(#2a2018, #171009); border-radius: 3px 3px 0 0; }
.candle i { position: absolute; left: 50%; top: 0; width: 12px; height: 16px; margin-left: -6px; background: radial-gradient(ellipse at 50% 80%, #e8c96a, #c77b2a 55%, transparent 75%); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; filter: blur(.4px); animation: flame .4s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.candle:nth-child(2n) i { animation-delay: -.19s; } .candle:nth-child(3n) i { animation-delay: -.31s; }
@keyframes flame { from { transform: scaleY(.92) skewX(-3deg); } to { transform: scaleY(1.1) skewX(3deg); } }
.candle.out i { display: none; }
.candle.out::after { content: ''; position: absolute; left: 50%; top: -4px; width: 8px; height: 26px; margin-left: -4px; background: linear-gradient(rgba(160,160,160,.35), transparent); border-radius: 50%; filter: blur(1.5px); animation: smoke 3s ease-out forwards; }
@keyframes smoke { from { opacity: .9; transform: translateY(0) scaleY(1); } to { opacity: 0; transform: translateY(-18px) scaleY(1.8); } }
.candle.out { cursor: default; }
.closet.earpulse .c-door { box-shadow: inset 0 0 0 2px rgba(163,26,26,.7), 0 0 18px rgba(163,26,26,.35); }
#df-carvewrap { text-align: center; margin-top: 18px; }
#df-carve { width: min(520px, 92%); height: auto; border: 1px solid #241a10; box-shadow: inset 0 0 40px rgba(0,0,0,.7); cursor: crosshair; touch-action: none; }

/* ============================================================
   THE DARK REVISION — clinical, wrong, no halloween.
   loaded last; it wins.
   ============================================================ */
:root {
  --black: #000000; --ink: #050505;
  --bone: #a8a49b; --bone-dim: #6e6a62; --mute: #44413b;
  --blood: #4d0f0f; --blood-hi: #7c1414;
  --paper: #b3ada0; --line: #12100e;
  --hand: 'Special Elite', 'Courier New', monospace; /* no cute handwriting. nothing here was written kindly. */
}
body, .hand, .th-you, #whisper-text { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M11 2v7M11 13v7M2 11h7M13 11h7' stroke='%23a8a49b' stroke-width='1.6'/%3E%3Ccircle cx='11' cy='11' r='1' fill='%23a8a49b'/%3E%3C/svg%3E") 11 11, crosshair; }
html { background: #000; }
body { text-shadow: 0 0 1px rgba(0,0,0,.6); }
::selection { background: #3a0a0a; color: #c9c2b2; }
a { text-decoration-color: #3a0a0a; }
a:hover { color: #9c2020; }
::-webkit-scrollbar-thumb { background: repeating-linear-gradient(to bottom, #310909 0 14px, #1a0404 14px 16px, #3d0b0b 16px 30px); }
::-webkit-scrollbar-thumb:hover { background: repeating-linear-gradient(to bottom, #4d0f0f 0 14px, #2a0606 14px 16px, #571010 16px 30px); }

/* heavier atmosphere */
#grain { opacity: .085; }
.scanlines { opacity: .5; background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.5) 2px 4px); }
.vignette { box-shadow: inset 0 0 22vmax 8vmax #000, inset 0 0 8vmax 2vmax rgba(0,0,0,.9); }
/* chemical staining, bottom corners — never clean */
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 89;
  background:
    radial-gradient(34vmax 22vmax at 0% 100%, rgba(46,26,14,.22), transparent 70%),
    radial-gradient(30vmax 20vmax at 100% 100%, rgba(38,14,20,.18), transparent 70%),
    radial-gradient(26vmax 16vmax at 50% -4%, rgba(20,24,26,.15), transparent 70%);
  mix-blend-mode: multiply; }

/* panels and papers: no cream, no warmth */
.panel { background: rgba(7,7,7,.82); border: 1px solid #141210; box-shadow: 0 18px 60px rgba(0,0,0,.9), inset 0 0 70px rgba(0,0,0,.75); }
.paper { background: linear-gradient(175deg, #23231f, #191a17 70%, #141412); border: 1px solid #26251f; color: #a8a49b;
  box-shadow: 0 14px 40px rgba(0,0,0,.85), inset 0 0 50px rgba(0,0,0,.55); }
.paper.lined { background: linear-gradient(175deg, #20211d, #161713); background-image: repeating-linear-gradient(to bottom, transparent 0 27px, rgba(120,130,120,.05) 27px 28px), linear-gradient(175deg, #20211d, #161713); }
.paper h4 { color: #8f8a80; border-bottom: 1px solid #2a2924; }
.paper .hand { color: #94907f; }
.paper .type { color: #9c968a; }
.mono { color: #8f8a7c; }
.hand { color: #949083; }
.hand.red { color: #8a1616; }

/* every photo: darker, deader, wronger */
main img { filter: grayscale(.92) brightness(.5) contrast(1.55) saturate(.7); }
main img:hover { filter: grayscale(.4) brightness(.62) contrast(1.7) saturate(.9); transition: filter .3s; }
.ph img { filter: grayscale(1) brightness(.42) contrast(1.8) !important; }
.ph:hover img { filter: grayscale(.6) invert(.06) brightness(.55) contrast(2) !important; }

/* buttons: flat, cold, no halloween glow */
.btn-blood { border-color: #3a0c0c; color: #9c2020; letter-spacing: .3em; background: rgba(10,4,4,.6); }
.btn-blood:hover { background: #4d0f0f; color: #d8d2c6; box-shadow: 0 0 26px rgba(90,16,16,.35); }
.btn-ghost { color: #6e6a62; border-color: #1a1917; }
.btn-ghost:hover { color: #a8a49b; border-color: #3a3934; }

/* threshold: no warm light under the door — a cold fluorescent that flickers */
.th-doorlight i { background: linear-gradient(rgba(190,205,205,.5), rgba(120,140,150,.12) 70%, transparent) !important; box-shadow: 0 0 24px 5px rgba(160,180,190,.16) !important; animation: coldlight 7s steps(1) infinite !important; }
.th-doorlight.out i { background: linear-gradient(rgba(120,16,16,.4), transparent) !important; box-shadow: 0 0 18px 4px rgba(110,14,14,.25) !important; }
@keyframes coldlight { 0%,88%,92%,100% { opacity: 1 } 89%,91% { opacity: .25 } 94% { opacity: .7 } }
.th-ch { color: #6e6a62 !important; }
.th-title span { color: #c9c2b2 !important; text-shadow: none !important; }
.th-title span.on { color: #b7b2a6 !important; }
.th-you { color: #7c1414 !important; }
.th-hp { color: #514e46 !important; }
#threshold { background: #000 !important; }

/* board: evidence, not halloween corkboard */
.board { background: #0c0c0b radial-gradient(circle at 30% 20%, #131311, #080807); border: 8px solid #191813; }
.card { background: linear-gradient(#2e2c26, #211f1a); color: #8f8a7c; box-shadow: 0 10px 22px rgba(0,0,0,.75); filter: saturate(.55); }
.card.found { background: linear-gradient(#37342c, #26231d); }
.card .c-title { color: #b3ada0; }
.card .c-note { color: #6e6a5e; }
.card .pin { width: 10px; height: 10px; margin-left: -5px; top: -5px; background: radial-gradient(circle at 35% 28%, #8a8a86, #3a3a38 45%, #0c0c0a 80%); box-shadow: 0 1px 2px rgba(0,0,0,.9), inset 0 -1px 1px #000; }
.card .pin::after { content: ''; position: absolute; inset: -5px -7px; border-radius: 50%; background: radial-gradient(circle, transparent 42%, rgba(0,0,0,.45) 78%, transparent); }
.card { transform-origin: 50% -5px; }
.card .pc-img { filter: grayscale(1) contrast(1.75) brightness(.42) !important; }
.card.unfound { background: #0d0d0c; border: 1px dashed #1c1a17; }

/* dossiers, fridges, doors: desaturate hard */
.fridge { background: #0a0a0a; border-color: #161616; }
.fridge li { color: #8f8a7c; }
.hw-door { border-color: #2a2724 !important; color: #a8a49b !important; background: rgba(5,5,5,.9) !important; }
.hw-door:hover, .hw-door:focus { border-color: #7c1414 !important; color: #d8d2c6 !important; }
.closet .c-door { background: linear-gradient(#141210, #0b0a09) !important; border-color: #1e1b18 !important; }
.wl-dir { background: #0a0908; border-color: #26231d; color: #6e6a62; }
.wl-dir:hover { color: #a8a49b; border-color: #3a3934; }

/* bare layout: full-game pages lose the nav — there is no nav in there */
body[data-bare] #topbar, body[data-bare] footer.sitefoot, body[data-bare] #mute { display: none !important; }
body[data-bare] main { padding-top: 10px; }

/* escape game chrome */
#esc-wrap { position: relative; max-width: 680px; margin: 20px auto 0; border: 1px solid #141210; background: #000; overflow: hidden; }
#esc { display: block; width: 100%; image-rendering: pixelated; }
#esc-hud { position: absolute; top: 8px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 12px; font-family: var(--term); font-size: 19px; color: #6e6a62; pointer-events: none; }
#esc-move { font-size: 12px; letter-spacing: .18em; color: #8f8468; border: 1px dashed #3a342c; padding: 3px 8px; animation: escmove 2.4s ease-in-out infinite; }
@keyframes escmove { 50% { border-color: #7a5f30; color: #b8a878; } }
#esc-keysym { color: #7c1414; font-size: 17px; } #esc-keysym.off { opacity: .22; }
#esc-msg { text-align: center; margin: 12px 6px 0; font-family: var(--fell); font-style: italic; color: #8f8a80; min-height: 26px; }
/* the pointer-lock tell — the game owns your mouse, and says so */
.pl-lock { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-family: var(--type); font-size: 11px; letter-spacing: .18em; color: #9a8d6a; background: rgba(0,0,0,.6); border: 1px solid #3a342c; padding: 4px 12px; pointer-events: none; opacity: 0; transition: opacity .4s; white-space: nowrap; z-index: 6; }
.pl-lock.on { opacity: .95; }
#esc-dpad { display: none; grid-template-areas: '. u .' 'l . r' '. d .'; gap: 6px; position: absolute; left: 12px; bottom: 12px; z-index: 3; }
.dp { width: 54px; height: 54px; font-size: 24px; background: rgba(5,5,5,.72); border: 1px solid #26231d; color: #6e6a62; touch-action: none; user-select: none; -webkit-user-select: none; }
.dp:active { background: #1a1815; color: #b7b2a6; }
@media (pointer: coarse) { #esc-dpad { display: grid; } }
.dp-u { grid-area: u } .dp-l { grid-area: l } .dp-r { grid-area: r } .dp-d { grid-area: d }
/* the face event — drawn, not photographed */
#wface { position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; background: rgba(0,0,0,.93); opacity: 0; transition: opacity .55s; pointer-events: none; }
#wface.on { opacity: 1; }
#wface canvas { width: min(52vw, 300px); image-rendering: pixelated; filter: contrast(1.35) grayscale(.5) brightness(.85); }
/* ghouls: the visitor portrait is the composite on file; clicking lets the registry redraw it worse */
.you-redraw { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.ghoul-you .d-photo { display: grid; place-items: center; background: #050505 !important; }
.ghoul-you canvas { width: 84%; filter: contrast(1.3) grayscale(.6) brightness(.8); }

/* ============================================================
   THE ARCHIVE — the site is no longer decorated.
   it is a recovered evidence server. plain. mundane. wrong.
   system fonts, file headers, photocopies, dial-up images.
   ============================================================ */
:root {
  --fell: 'Times New Roman', Times, serif;
  --fell-sc: Arial, Helvetica, sans-serif;
  --type: 'Courier New', Courier, monospace;
  --hand: 'Courier New', Courier, monospace;
  --bone: #b4b4b0; --bone-dim: #7d7d78; --mute: #4d4d4a;
}
body { font-size: 16px; line-height: 1.5; letter-spacing: 0; background: #000; text-shadow: none; }
main { max-width: 820px; padding: 0 16px; }
a { color: #7b93c9; text-decoration: underline; text-decoration-color: #3b4a6e; text-underline-offset: 2px; }
a:visited { color: #9a7fb8; }
a:hover { color: #c43030; text-decoration-color: #c43030; }

/* the recovered-file header, injected by core.js */
.arc-head { position: relative; z-index: 1; max-width: 820px; margin: calc(58px + var(--safe-t)) auto 0; padding: 0 16px; font-family: var(--type); font-size: 12px; line-height: 1.55; color: #5d5d59; white-space: pre-wrap; word-break: break-all; }
.arc-head b { color: #9a9a95; font-weight: normal; }
.arc-head .bad { color: #8a1c1c; }
.arc-head hr { border: 0; border-top: 1px solid #1d1d1b; margin: 8px 0 0; }
body[data-bare] .arc-head { margin-top: calc(14px + var(--safe-t)); }

/* masthead: a document title, not a movie poster */
.masthead { text-align: left; max-width: 820px; margin: 0 auto; padding: 18px 16px 6px; }
.kicker { font-family: var(--type); letter-spacing: .02em; font-size: 12px; color: #5d5d59; text-transform: none; }
.pg-title { font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: clamp(26px, 6vw, 40px); letter-spacing: -.01em; line-height: 1.1; margin: 6px 0 10px; color: #d0d0cb; text-shadow: none; display: block; }
.glitch::before { opacity: .55; } .glitch::after { opacity: .25; }
.lede { max-width: none; margin: 0; font-style: normal; color: #9c9c97; font-size: 16px; }
.lede b, .lede .red { color: #b52626; }

/* sections: rules, not boxes */
.panel { background: transparent !important; border: 0 !important; border-top: 1px solid #1d1d1b !important; box-shadow: none !important; padding: 26px 0 22px; }
.sec-title { font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: #c9c9c4; margin: 0 0 10px; }
.sec-title > span:first-child { color: #5d5d59; font-weight: normal; }
.sec-sub { font-style: normal; color: #8c8c87; max-width: none; font-size: 15px; }
.next { font-family: var(--type); font-size: 13px; color: #5d5d59; border-top: 1px dashed #1d1d1b; padding-top: 14px; }
.next a { font-family: var(--type); letter-spacing: 0; font-size: 13px; }

/* documents: photocopies of photocopies. toner at the edges. */
.paper, .paper.lined { background: #cfcec8 !important; background-image: none !important; color: #141414 !important; border: 0 !important; transform: rotate(-.35deg);
  box-shadow: inset 0 0 38px rgba(0,0,0,.55), inset 0 0 4px rgba(0,0,0,.6), 0 12px 30px rgba(0,0,0,.9) !important;
  filter: grayscale(1) contrast(1.18); font-family: var(--type); padding: 22px 22px 18px; }
.grid2 > .paper:nth-child(even) { transform: rotate(.45deg); }
.paper::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.035) 3px 4px), radial-gradient(120px 60px at 85% 8%, rgba(0,0,0,.18), transparent 70%), radial-gradient(160px 90px at 6% 96%, rgba(0,0,0,.16), transparent 70%); }
.paper :is(p, li, h4, span, div, b, i, td, th, dd, dt) { color: #161616 !important; }
.paper h4 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; letter-spacing: .06em; border-bottom: 1px solid #555 !important; padding-bottom: 6px; }
.paper .red, .paper b.red, .paper .red * { color: #7a0d0d !important; }
.paper .frag { color: #7a0d0d !important; }
.paper a { color: #1f3c8a !important; }
.paper .redact { background: #000 !important; color: #000 !important; }
.paper .redact.revealed { background: transparent !important; color: #7a0d0d !important; }

/* buttons: system buttons from a machine nobody maintains */
.btn-blood, .btn-ghost { font-family: var(--type) !important; font-size: 14px !important; letter-spacing: .12em !important; padding: 11px 22px !important; min-height: 44px; border-radius: 0; background: #0a0a0a !important; border: 1px solid #4a4a47 !important; color: #c4c4bf !important; box-shadow: none !important; animation: none !important; }
.btn-blood::before { content: '[ '; } .btn-blood::after { content: ' ]'; }
.btn-blood:hover, .btn-ghost:hover { background: #c4c4bf !important; color: #000 !important; }

/* top bar: a plain status line */
#topbar { background: #000; border-bottom: 1px solid #1d1d1b; font-family: var(--type); font-size: 12px; letter-spacing: .04em; padding: calc(6px + var(--safe-t)) 12px 6px; }
#topbar button { font-family: var(--type); font-size: 12px; border-radius: 0; min-height: 30px; background: #000; border-color: #2c2c2a; }
.tb-home { font-family: var(--type) !important; font-size: 12px !important; letter-spacing: .1em !important; }
.sitefoot { font-family: var(--type); font-size: 11px; text-align: left; max-width: 820px; margin-left: auto; margin-right: auto; border-top: 1px solid #1d1d1b; }

/* photographs load the way they used to: one line at a time. you watch it arrive. */
main :is(figure, .d-photo, .photo-print, .lake-photo) img { animation: dialup 3.6s steps(28) both; }
@keyframes dialup { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
main :is(figure, .d-photo, .photo-print) { background: #0b0b0b; }
figcaption { font-family: var(--type) !important; font-size: 12px !important; color: #7d7d78 !important; }

/* the board: photocopied index cards nailed to the hanging board itself */
.board { background: linear-gradient(rgba(5,4,3,.72), rgba(5,4,3,.84)), url("../assets/ai/wood-board.png") center / cover no-repeat, #050505 !important; border: 1px solid #1d1d1b !important; box-shadow: inset 0 0 60px rgba(0,0,0,.7) !important; }
.card { background: #c6c5bf !important; color: #111 !important; font-family: var(--type); filter: grayscale(1) contrast(1.1) !important; box-shadow: inset 0 0 18px rgba(0,0,0,.45), 0 8px 16px rgba(0,0,0,.8) !important; }
.card .c-title { color: #000 !important; font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 13px; letter-spacing: .02em; }
.card .c-note { color: #333 !important; }
.card.unfound { background: #070707 !important; border: 1px dashed #222 !important; filter: none !important; }
.card.unfound .c-q { color: #2a2a28 !important; }
#strings path { stroke: #5a1010; opacity: .5; }

/* the knock screen: an access prompt */
.th-title { font-family: Arial, Helvetica, sans-serif !important; font-weight: bold !important; letter-spacing: .02em !important; }
.th-ch, .th-you, .th-hp, .th-count, .th-knock { font-family: var(--type) !important; }
.th-you { font-size: 15px !important; color: #a52a2a !important; }
.th-knock { border-radius: 0 !important; letter-spacing: .14em !important; }
/* title cards: one line. nothing else. */
.th-inner > *:not(.th-knock):not(.th-count) { display: none !important; }
.th-inner { min-height: 40vh; }
/* the cursor tells you what the room wants */
a[href], button, .key, .tuner, .card.found, .closet, .yd-spot, .door-bit, .gong-btn { cursor: pointer; }
#term-in, input[type="text"], input:not([type]), textarea { cursor: text; }
.frag:not(.taken) { cursor: grab; }
.frag:not(.taken):active { cursor: grabbing; }
.redact:not(.revealed) { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M3 19 L13 3 M8.5 20 L18.5 5 M14 20 L21 8' stroke='%23a52a2a' stroke-width='1.7' fill='none'/%3E%3C/svg%3E") 10 16, help; }
.photo-print img, .ph img, .d-photo img { cursor: zoom-in; }
.th-knock { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Crect x='5.5' y='4' width='13' height='11' rx='6' fill='%23c9c2b2'/%3E%3Cpath d='M8.6 4.5v5M12 4.5v5.5M15.4 4.5v5' stroke='%23555' stroke-width='1'/%3E%3Crect x='8' y='15' width='8' height='5' rx='1.6' fill='%23a8a49b'/%3E%3C/svg%3E") 12 12, pointer; }

/* the grain stays. the theatre doesn't. */
.scanlines { opacity: .22; }
#grain { opacity: .07; }
.hand { font-size: 15px; }

/* BEDTIME */
#bt-wrap { position: relative; max-width: 660px; margin: 18px auto 0; background: #000; border: 1px solid #1d1d1b; overflow: hidden; height: 480px; }
#bt { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
#bt-hud { position: absolute; top: 6px; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 10px; font-family: var(--type); font-size: 12px; color: #8c8c87; pointer-events: none; }
#bt-hud b { color: #c4c4bf; font-weight: normal; } #bt-hud i { color: #a52a2a; font-style: normal; }
#bt-susp { display: inline-block; vertical-align: middle; width: 70px; height: 6px; border: 1px solid #3a3a37; margin-left: 4px; }
#bt-susp i { display: block; height: 100%; width: 0; background: #a52a2a; }
#bt-msg { text-align: left; margin: 10px 10px 12px; font-family: var(--type); font-size: 13px; color: #9c9c97; min-height: 38px; }
#bt-msg b { color: #c43030; font-weight: normal; }
#bt-see { position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .25s; background: radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(120,10,6,.55) 100%); }
#bt-hide { position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .5s; background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,.25) 20%, rgba(0,0,0,.92) 78%); }
#bt-dpad { display: none; grid-template-areas: '. u .' 'l . r' '. d .'; gap: 6px; position: absolute; right: 10px; bottom: 58px; z-index: 3; }
@media (pointer: coarse) { #bt-dpad { display: grid; } }
#esc-hud, #esc-msg { font-family: var(--type) !important; font-size: 13px !important; }
/* mobile: dossier text must never widen the page */
.dossier > * { min-width: 0; }
.d-text, .d-text dd, .d-text dt, .d-text p { overflow-wrap: anywhere; word-break: normal; }
/* movement games: the house is dark enough already. let the canvas through. */
body.pg-bedtime .vignette, body.pg-escape .vignette { opacity: .45; }
body.pg-bedtime::after, body.pg-escape::after { opacity: .4; }
body.pg-bedtime .scanlines, body.pg-escape .scanlines { opacity: .12; }

/* ---- legibility: the header and the edges were sinking into the vignette ---- */
.vignette { background: radial-gradient(ellipse 130% 105% at 50% 40%, transparent 52%, rgba(0,0,0,.55) 100%) !important; box-shadow: inset 0 -12vmax 16vmax -5vmax rgba(0,0,0,.9), inset 0 0 4vmax 0 rgba(0,0,0,.38) !important; }
body::after { background:
    radial-gradient(34vmax 22vmax at 0% 100%, rgba(46,26,14,.22), transparent 70%),
    radial-gradient(30vmax 20vmax at 100% 100%, rgba(38,14,20,.18), transparent 70%) !important; }
#topbar { background: #050505 !important; color: #a9a9a4; }
#topbar a, .tb-home { color: #c9c9c4 !important; }
#topbar button { color: #b4b4af !important; border-color: #3a3a37 !important; }
.arc-head { color: #8e8e89; }
.arc-head b { color: #d6d6d1; }
.kicker { color: #8e8e89 !important; }
.pg-title { color: #e6e6e1 !important; }
.lede { color: #b9b9b4 !important; }
.sec-sub { color: #a3a39e; }
.sec-title { color: #deded9; }

/* ---- the door out of rooms with no nav ---- */
.arc-exit { position: fixed; z-index: 300; left: calc(10px + env(safe-area-inset-left, 0px)); top: calc(8px + var(--safe-t)); font-family: var(--type); font-size: 12px; letter-spacing: .04em; color: #c9c9c4 !important; background: rgba(0,0,0,.82); border: 1px solid #3a3a37; padding: 7px 10px; text-decoration: none !important; min-height: 32px; display: inline-flex; align-items: center; }
.arc-exit:hover { background: #c9c9c4; color: #000 !important; }
body[data-bare] .arc-head { margin-top: calc(52px + var(--safe-t)); }

/* ---- the photographs that go wrong ---- */
canvas.uncanny { display: block; }

/* ---- the file is unstable: frame-shift and scanner-bleed events ---- */
body.shift main, body.shift .masthead, body.shift .arc-head { transform: translateX(3px) skewX(.35deg); }
#strip { position: fixed; left: 0; right: 0; z-index: 150; pointer-events: none; background: url(../rigo.jpg) 50% 30% / cover no-repeat; filter: grayscale(1) brightness(.55) contrast(1.7); mix-blend-mode: screen; opacity: 0; transition: opacity .05s; }
#strip.on { opacity: .5; }

/* ================= IMMERSIVE ROOMS ================= */
/* data-imm: the room IS the page. no masthead, no file header, no doc intro.
   the paperwork survives in [ the file ], top right. the door out stays top left. */
body.imm { padding: 0 !important; }
body.imm #topbar, body.imm footer.sitefoot { display: none !important; }
#imm-stage { position: fixed; inset: 0; z-index: 60; background: #020202; }
main#imm-stage { overflow: auto; padding: 0; max-width: none; }
#imm-stage > [data-stage] { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; }
body.imm [data-stage] > .sec-title, body.imm [data-stage] > .sec-sub, body.imm [data-stage] > h2 { display: none; }
#imm-file-btn { position: fixed; top: calc(8px + var(--safe-t)); right: calc(10px + env(safe-area-inset-right, 0px)); z-index: 300; font-family: var(--type); font-size: 12px; letter-spacing: .04em; color: #c9c9c4; background: rgba(0,0,0,.82); border: 1px solid #3a3a37; padding: 7px 10px; min-height: 32px; cursor: pointer; }
#imm-file-btn:hover { background: #c9c9c4; color: #000; }
#imm-file { position: fixed; inset: 0; z-index: 79; background: rgba(1,1,1,.96); overflow: auto; -webkit-overflow-scrolling: touch; }
.imm-in { max-width: 780px; margin: 0 auto; padding: calc(56px + var(--safe-t)) 14px 60px; }
.imm-in .masthead { padding-top: 20px; }
#imm-file-x { position: sticky; top: 8px; float: right; z-index: 2; font-family: var(--type); font-size: 13px; color: #c9c9c4; background: #0a0a0a; border: 1px solid #3a3a37; padding: 8px 14px; cursor: pointer; }

/* --- THE HALLWAY --- */
body.imm #hw-stage { position: absolute; inset: 0; max-width: none; max-height: none; aspect-ratio: auto; border: none; box-shadow: none; }
body.imm #hw-status { position: absolute; left: 0; right: 0; bottom: 86px; z-index: 6; margin: 0; padding: 14px 16px 10px; background: linear-gradient(transparent, rgba(0,0,0,.9) 50%); }
body.imm #hw-walk { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 7; margin: 0; }
body.imm #hw-log { position: absolute; left: 0; right: 0; bottom: 150px; z-index: 5; margin: 0; padding: 0 18px; max-height: 20vh; overflow: hidden; pointer-events: none; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
body.imm [data-stage] > .hw-look { position: absolute; right: 12px; bottom: 96px; z-index: 7; width: auto !important; aspect-ratio: auto !important; display: block; padding: 10px 14px; }
body.imm #hw-doors { bottom: 30%; }

/* --- FIVE NIGHTS: the office is the whole screen, always --- */
body.imm #fn { position: absolute; inset: 0; display: flex; flex-direction: column; max-width: none; }
body.imm #fn-office { flex: 1; height: auto; min-height: 0; border: none; }
body.imm #fn-hud { padding: 8px 14px; background: #040303; border-bottom: 1px solid #171310; flex: none; margin-top: calc(38px + var(--safe-t)); }
body.imm #fn .fn-side { width: 23%; }
body.imm #fn .fn-center { left: 23%; right: 23%; }
body.imm #fn .fn-doorway { bottom: 42%; }
#fn-office.camsup #fn-leave { display: none; }
#fn-camx { flex: none; margin: 0 10px 10px; width: calc(100% - 20px); letter-spacing: .2em; }
#fn-help { position: absolute; inset: 0; z-index: 7; background: rgba(0,0,0,.94); display: none; overflow: auto; padding: 20px 14px calc(30px + var(--safe-b)); }
#fn-help.on { display: block; }
#fn-help .grid2 { display: block; margin: 0 auto; max-width: 560px; }
#fn-help .grid2 .paper { margin-bottom: 16px; }
.fn-help-x { text-align: center; font-family: var(--type); color: #8e8e89; font-size: 13px; letter-spacing: .08em; margin: 6px 0 16px; }
#fn-helpbtn { margin-top: 8px; width: min(300px, 80%); font-size: 13px; padding: 10px; letter-spacing: .18em; opacity: .8; }
@media (max-width: 700px) {
  body.imm #fn .fn-side { width: 30%; }
  body.imm #fn .fn-center { left: 30%; right: 30%; }
}

/* --- BEDTIME / GET OUT: the canvas fills as much of the screen as its grid allows --- */
body.imm #bt-wrap, body.imm #esc-wrap { position: absolute; inset: 0; height: auto; max-width: none; margin: 0; border: none; display: flex; align-items: center; justify-content: center; background: #000; }
body.imm #bt { width: 100%; height: 100%; }
body.imm #esc { width: auto; height: auto; max-width: 100%; max-height: 100%; image-rendering: pixelated; }
body.imm #bt-hud, body.imm #esc-hud { top: calc(44px + var(--safe-t)); }
body.imm #bt-msg, body.imm #esc-msg { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; margin: 0; padding: 12px 14px calc(12px + var(--safe-b)); background: linear-gradient(transparent, rgba(0,0,0,.9) 60%); text-align: center; }
body.imm [data-stage] > p:has(#bt-start), body.imm [data-stage] > p:has(#esc-start) { position: absolute; inset: 0; z-index: 8; margin: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.68); }
body.imm #bt-pages { position: absolute; inset: 8% 5%; z-index: 9; overflow: auto; }
body.imm #esc-dpad { bottom: calc(64px + var(--safe-b)); }
body.imm #bt-dpad { bottom: calc(70px + var(--safe-b)); }

/* --- INSIDE THE WALLS --- */
body.imm #wl-stage { position: absolute; inset: 0; max-width: none; margin: 0; display: flex; flex-direction: column; }
body.imm #wl-view { flex: 1; min-height: 0; height: auto; border: none; border-bottom: 1px solid #241a10; }
body.imm #wl-pad { margin: 10px auto calc(10px + var(--safe-b)); max-width: 340px; }
body.imm #wl-stat { margin: 8px 0 0; padding: 0 16px; }
body.imm #wl-it { margin: 0; }
body.imm #wl-log { max-height: 15vh; overflow: hidden; margin: 0 auto; padding: 0 16px; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }

/* --- GERALD: just a radio and the dark --- */
body.pg-gerald.imm [data-stage] { display: flex; flex-direction: column; padding: calc(52px + var(--safe-t)) 18px calc(24px + var(--safe-b)); }
body.pg-gerald.imm .radio { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
body.pg-gerald.imm #freq { font-size: clamp(52px, 15vw, 110px); }
body.pg-gerald.imm .tuner { height: 54px; margin: 6px 0; }
body.pg-gerald.imm .g-log { flex: 1; min-height: 100px; max-height: none; }

/* --- HOME MOVIES: the CRT fills the room --- */
body.pg-tapes.imm [data-stage] { display: flex; flex-direction: column; padding: calc(52px + var(--safe-t)) 12px calc(16px + var(--safe-b)); }
body.pg-tapes.imm .vcr { flex: 1; display: flex; flex-direction: column; justify-content: center; }
body.pg-tapes.imm .crt { width: min(96vw, calc((100dvh - 250px) * 4 / 3)); margin: 0 auto; flex: none; }
body.pg-tapes.imm .tapes { margin-top: 14px; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; }
body.pg-tapes.imm .tapes > * { flex: 0 1 160px; }

/* --- THE BASEMENT: keypad, then the terminal, nothing else --- */
body.pg-basement.imm main#imm-stage { overflow: auto; padding: calc(52px + var(--safe-t)) 14px calc(20px + var(--safe-b)); }
body.pg-basement.imm #lock-panel { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; border: none; background: transparent; }
body.pg-basement.imm #term-panel { height: calc(100dvh - 80px); display: flex; flex-direction: column; border: none; background: transparent; }
body.pg-basement.imm #term-panel .term { flex: 1; min-height: 0; max-height: none; display: flex; flex-direction: column; }
body.pg-basement.imm #term-log { flex: 1; overflow-y: auto; }

/* --- THE RED ROOM: already the room; just remove the margins --- */
body.pg-red.imm main#imm-stage { overflow: auto; padding: 0; }
body.pg-red.imm .rr-stage { height: 100%; min-height: 100dvh; }
body.pg-red.imm .rr-empty .rr-stage { min-height: 100dvh; }
body.pg-red.imm .arc-head { display: none; }

/* --- THE MEASURING --- */
body.pg-measure.imm #ms-stage { position: absolute; inset: 0; height: auto; max-width: none; margin: 0; border: none; }
body.pg-measure.imm #ms-jamb { height: 82%; width: auto; }
body.pg-measure.imm #ms-tape { height: 36%; bottom: 60%; }
body.pg-measure.imm #ms-you { height: 34%; }
body.pg-measure.imm [data-stage] > p:has(#ms-begin) { position: absolute; left: 0; right: 0; bottom: calc(30px + var(--safe-b)); z-index: 7; margin: 0; }
body.pg-measure.imm #ms-out { position: absolute; left: 0; right: 0; bottom: calc(96px + var(--safe-b)); z-index: 7; margin: 0; padding: 0 16px; }
body.pg-measure.imm #ms-tries { position: absolute; right: 14px; top: calc(48px + var(--safe-t)); z-index: 7; margin: 0; }

/* --- THE YARD --- */
body.pg-yard.imm #yd-field { position: absolute; inset: 0; height: auto; border: none; }
body.pg-yard.imm #yd-bg { width: 100%; height: 100%; object-fit: cover; }
body.pg-yard.imm #yd-stat { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; margin: 0; padding: 12px 14px calc(12px + var(--safe-b)); background: linear-gradient(transparent, rgba(0,0,0,.9) 60%); text-align: center; }
body.pg-yard.imm #yd-finds { position: absolute; left: 0; right: 0; bottom: calc(56px + var(--safe-b)); z-index: 6; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 0 12px; max-height: 34vh; overflow-y: auto; }

/* ---- static is already running when you arrive: let it breathe through the gate ---- */
.screen { background: #000; }
/* RE4-slam: the enter press punches the screen in and cuts to black */
#pregate.slam .pre-inner { animation: reslam .55s cubic-bezier(.15,0,.4,1) forwards; }
#pregate.slam::after { content: ''; position: fixed; inset: 0; z-index: 5; pointer-events: none; background: #d8d0bc; opacity: 0; animation: reflash .5s forwards; }
@keyframes reslam {
  0% { transform: none; filter: none; }
  22% { transform: scale(1.14) translateY(-1.5%); filter: blur(4px) brightness(1.9) contrast(1.3); }
  38% { transform: scale(1.08) translate(1.5%, 1%); filter: blur(1px) brightness(.55); }
  55% { transform: scale(1.2) translate(-1%, -1.5%); filter: blur(6px) brightness(1.4); }
  100% { transform: scale(1.34); filter: blur(14px) brightness(0); }
}
@keyframes reflash { 10% { opacity: .85 } 45% { opacity: .12 } 100% { opacity: 0 } }
.vis-sketch { display: inline-block; height: 2.6em; vertical-align: -0.9em; margin: 0 2px; border: 1px solid #3a3a37; background: #d8d0bc; padding: 1px; filter: grayscale(1) contrast(1.25) brightness(.8); transform: rotate(-2deg); }
.vis-sketch:nth-of-type(2) { transform: rotate(1.6deg); }
#grain { opacity: .11; }
.screen .th-knock, .screen .btn-blood, .screen a { position: relative; z-index: 1; }

/* ---- the edges must never bury a control ---- */
.vignette { background: radial-gradient(ellipse 135% 110% at 50% 42%, transparent 58%, rgba(0,0,0,.42) 100%) !important; box-shadow: inset 0 -9vmax 13vmax -7vmax rgba(0,0,0,.82), inset 0 0 3.2vmax 0 rgba(0,0,0,.3) !important; }
body.imm .vignette { background: radial-gradient(ellipse 145% 120% at 50% 45%, transparent 64%, rgba(0,0,0,.32) 100%) !important; box-shadow: inset 0 -7vmax 11vmax -8vmax rgba(0,0,0,.7), inset 0 0 2.5vmax 0 rgba(0,0,0,.25) !important; }

/* ---- the monitor's way down must be impossible to miss ---- */
#fn-camx { min-height: 56px; font-size: 16px; border-color: #6a2020; color: #d8d2c4; background: #160a0a; }
#fn-howto { font-family: var(--type); font-size: 13px; color: #8a8a84; letter-spacing: .04em; line-height: 1.7; max-width: 520px; margin: 14px auto 0; padding: 10px 14px; border-top: 1px dashed #2e2e2a; border-bottom: 1px dashed #2e2e2a; }

/* ---- the camera's little map of the house ---- */
#fn-map { position: absolute; right: 10px; bottom: 10px; z-index: 4; width: min(190px, 42%); opacity: .88; }
.fn-mapcam { cursor: pointer; }
.fn-mapdot { fill: #0d0a08; stroke: #6a6252; stroke-width: 1.4; }
.fn-mapcam.on .fn-mapdot { stroke: #d8d2c4; stroke-width: 2.6; }
.fn-mapcam.on .fn-maplbl { fill: #d8d2c4; }
.fn-maplbl { font: 9px var(--term); fill: #6a6252; letter-spacing: .08em; }

/* ---- empty overlays must not eat clicks ---- */
body.imm #bt-pages:empty { display: none; }

/* ---- the film runs quiet while you play ---- */
body.imm #grain { opacity: .045; }
body.imm .scanlines { opacity: .13; }
body.pg-hallway .vignette, body.pg-nights .vignette { opacity: .7; }

/* ---- BEDTIME: the start screen is the bed you are about to leave ---- */
body.pg-bedtime.imm [data-stage] > p:has(#bt-start)::before { content: ''; position: absolute; inset: 0; background: url(../assets/ai/bedroom.jpg) center / cover no-repeat; opacity: .3; filter: grayscale(.7) brightness(.62) contrast(1.15); }
body.pg-bedtime.imm [data-stage] > p:has(#bt-start) > * { position: relative; z-index: 1; }

/* ---- filed photos still arrive line by line ---- */
#imm-file :is(figure, .d-photo, .photo-print, .lake-photo) img { animation: dialup 3.6s steps(28) both; }


/* ---------- HIDE ---------- */
#hd-stage { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:calc(100vh - 60px); padding:18px; gap:14px; }
#hd-count { font-family:'VT323',monospace; font-size:clamp(26px,6vw,52px); letter-spacing:.2em; color:#cfc7b4; text-shadow:0 0 12px rgba(160,140,110,.3); min-height:1.2em; margin:0; }
#hd-rooms { display:grid; grid-template-columns:repeat(3,minmax(86px,130px)); gap:10px; width:min(94vw,460px); }
.hd-room { position:relative; aspect-ratio:1/1.15; background:linear-gradient(180deg,#111,#0a0a0a); border:1px solid #2a2418; color:#8a7f66; font-family:'Special Elite',monospace; font-size:clamp(9px,2.4vw,12px); letter-spacing:.12em; cursor:pointer; overflow:hidden; transition:transform .2s,border-color .3s; }
.hd-room i { position:absolute; inset:0; background:radial-gradient(ellipse at 50% 100%,rgba(60,40,20,.35),transparent 70%); opacity:0; transition:opacity .3s; }
.hd-room::after { content:''; position:absolute; top:12%; left:50%; width:2px; height:70%; transform:translateX(-50%); background:#050505; box-shadow:0 0 6px #000; }
.hd-room span { position:absolute; inset:auto 4px 8px; z-index:2; }
.hd-room.open { border-color:#5a4526; transform:scale(1.04); }
.hd-room.open i { opacity:1; }
.hd-room.open::after { box-shadow:0 0 14px rgba(200,170,110,.5); background:#1a140a; }
.hd-room.hid { border-color:#6a5530; box-shadow:inset 0 0 20px rgba(120,90,40,.25); }
#hd-msg { font-family:'Special Elite',monospace; font-size:13px; letter-spacing:.1em; color:#8a7f66; min-height:2em; text-align:center; margin:0; }
#hd-tag { position:fixed; inset:0; z-index:275; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.92); opacity:0; pointer-events:none; transition:opacity .12s; }
#hd-tag.on { opacity:1; }
#hd-tag img { width:min(86vw,540px); filter:contrast(1.4) brightness(1.1) saturate(.7); animation:tagshake .4s steps(6) infinite; }
@keyframes tagshake { 0%{transform:translate(-4px,2px) rotate(-.6deg)} 50%{transform:translate(5px,-3px) rotate(.7deg)} 100%{transform:translate(-3px,-2px)} }

/* ---------- BE STILL ---------- */
#st-stage { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:calc(100vh - 60px); padding:20px; gap:16px; }
#st-her { position:fixed; left:50%; top:54%; width:34vmin; height:44vmin; transform:translate(-50%,-50%) scale(.6); opacity:0; pointer-events:none; z-index:1;
  background:radial-gradient(ellipse at 50% 30%, rgba(20,16,12,.9) 0%, rgba(8,6,4,.95) 55%, transparent 75%);
  border-radius:50% 50% 46% 46%/38% 38% 60% 60%; filter:blur(1px) drop-shadow(0 0 30px rgba(0,0,0,.9)); transition:opacity 1.4s, transform 8s ease-in; }
#st-her.in { opacity:1; transform:translate(-50%,-50%) scale(1); }
#st-her.close { transform:translate(-50%,-50%) scale(1.5); opacity:1; filter:blur(.5px) drop-shadow(0 0 50px rgba(90,20,12,.5)); }
#st-round { font-family:'VT323',monospace; font-size:clamp(18px,4vw,30px); letter-spacing:.18em; color:#9a8f76; margin:0; }
#st-bar { width:min(80vw,420px); height:8px; border:1px solid #2a2418; background:#0a0908; }
#st-fill { display:block; height:100%; width:0; background:linear-gradient(90deg,#4a3b22,#7a1a10); transition:width .1s linear; }
#st-msg { font-family:'Special Elite',monospace; font-size:13px; letter-spacing:.12em; color:#8a7f66; min-height:2.4em; text-align:center; max-width:520px; margin:0; }
.pg-still .next, .pg-hide .next { position:fixed; bottom:12px; left:50%; transform:translateX(-50%); z-index:300; }

/* ---------- THE FEAST (end.html takeover) ---------- */
#feast { position:fixed; inset:0; z-index:290; background:#000; opacity:0; pointer-events:none; transition:opacity 1.2s; overflow:hidden; }
#feast.on { opacity:1; pointer-events:auto; }
/* the world is wider than the window — you pan across the table */
#fe-world { position:absolute; top:0; bottom:0; left:0; width:230%; will-change:transform; }
#fe-photo { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; filter:brightness(.34) sepia(.5) contrast(1.15); }
#feast.dip #fe-photo { filter:brightness(.1) sepia(.6); }
#feast .flick #fe-photo { filter:brightness(.55) sepia(.3) contrast(1.3); }
#fe-lamp { position:absolute; top:0; left:50%; width:2px; height:14vh; background:#0d0a06; transform:translateX(-50%); }
#fe-lamp::after { content:''; position:absolute; top:100%; left:50%; width:14px; height:14px; transform:translateX(-50%); border-radius:50%; background:#e8d9a8; box-shadow:0 0 60px 30px rgba(220,190,120,.3), 0 0 140px 70px rgba(160,120,60,.14); }
#feast.dip #fe-lamp::after { background:#7a1610; box-shadow:0 0 40px 18px rgba(140,20,10,.25); }
.fe-head { position:absolute; top:44%; transform:translate(-50%,-50%); display:flex; flex-direction:column; align-items:center; gap:8px; transition:top 2.5s ease; }
.fe-head .fe-face { width:clamp(56px,9vw,120px); aspect-ratio:3/4; object-fit:cover; border:1px solid #241d12; background:#0a0806;
  filter:brightness(.07) sepia(.4); transform:rotate(-9deg) scaleY(.92); transition:transform 1.7s cubic-bezier(.3,.8,.3,1), filter 1.7s; }
.fe-head.facing .fe-face { filter:grayscale(.5) contrast(1.5) brightness(1.02) sepia(.55); transform:rotate(3deg) scaleY(1.04); box-shadow:0 0 34px rgba(140,30,16,.4); }
.fe-head.closer { top:56%; }
.fe-head.closer .fe-face { width:clamp(72px,12vw,150px); }
.fe-head.facing:hover .fe-face { animation:none; }
.fe-name { font-family:'Special Elite',monospace; font-size:clamp(7px,1.4vw,10px); letter-spacing:.14em; color:#6a5f4a; }
/* your end of the table — fixed to the camera, it is always in front of you */
#fe-you { position:absolute; bottom:9vh; left:50%; transform:translateX(-50%); display:flex; flex-direction:column; align-items:center; gap:10px; opacity:0; transition:opacity .9s; }
#feast.on #fe-you { opacity:1; }
.fe-plate { width:clamp(120px,24vw,220px); height:clamp(46px,9vw,80px); border-radius:50%; border:1px solid #2a2115; background:radial-gradient(ellipse,#171310,#080605); cursor:pointer; position:relative; transition:transform .2s; }
.fe-plate:hover { transform:scale(1.04); }
.fe-plate::after { content:''; display:block; width:100%; height:100%; border-radius:50%; background:radial-gradient(ellipse at 50% 40%,#5a1610,#1c0605 70%); opacity:0; transition:opacity .6s; }
.fe-plate.served::after { opacity:1; }
.fe-plate .bite { position:absolute; inset:0; border-radius:50%; background:radial-gradient(ellipse at 50% 40%,#080605 30%,transparent 60%); opacity:0; }
#fe-eat { position:absolute; bottom:3vh; left:50%; transform:translateX(-50%); font-family:'Special Elite',monospace; font-size:clamp(15px,3.4vw,22px); color:#a03028; letter-spacing:.4em; padding:14px 26px; pointer-events:none; opacity:0; transition:opacity .6s; cursor:pointer; white-space:nowrap; }
@media (max-width:520px){ #fe-eat { letter-spacing:.18em; font-size:14px; } }
#fe-eat.on { pointer-events:auto; }
#fe-eat.on { opacity:1; animation:fepulse 1.6s infinite; }
@keyframes fepulse { 50% { letter-spacing:.52em; opacity:.6; } }
#fe-msg { position:absolute; bottom:16vh; left:50%; transform:translateX(-50%); width:92vw; text-align:center; font-family:'Special Elite',monospace; font-size:clamp(11px,2.6vw,15px); letter-spacing:.14em; color:#8f8468; text-transform:lowercase; text-shadow:0 2px 10px #000; }
/* grace — the hands they hold out. hold both. */
#fe-hold { position:absolute; inset:0; pointer-events:none; opacity:0; transition:opacity .8s; }
#fe-hold.on { opacity:1; pointer-events:auto; }
#fe-hold .h { position:absolute; bottom:8vh; width:24vw; height:26vh; min-width:130px; border:1px solid rgba(190,140,110,.35); background:radial-gradient(ellipse at 50% 100%, rgba(90,50,35,.3), transparent 75%); cursor:pointer; transition:background .3s, border-color .3s; }
#fe-hold .h::after { content:'take it'; position:absolute; left:50%; top:46%; transform:translate(-50%,-50%); font:12px 'Special Elite',monospace; letter-spacing:.3em; color:rgba(200,170,140,.5); }
#fe-hold .h.l { left:4vw; border-radius:60% 60% 0 0/80% 80% 0 0; }
#fe-hold .h.r { right:4vw; border-radius:60% 60% 0 0/80% 80% 0 0; }
#fe-hold .h.held { background:radial-gradient(ellipse at 50% 100%, rgba(150,60,40,.4), transparent 80%); border-color:rgba(220,120,80,.7); }
#fe-hold .h.held::after { content:'it holds back'; color:rgba(230,150,100,.8); }
.fe-edge { position:absolute; top:0; bottom:0; width:9vw; display:grid; place-items:center; color:rgba(200,180,140,.35); font-size:24px; pointer-events:none; opacity:0; transition:opacity .4s; }
#fe-edgeL { left:0; background:linear-gradient(90deg,rgba(0,0,0,.5),transparent); }
#fe-edgeR { right:0; background:linear-gradient(-90deg,rgba(0,0,0,.5),transparent); }
#feast.on .fe-edge { opacity:1; animation:feedge 2.2s 2; }
@keyframes feedge { 50% { opacity:.2; } }
body.locked { overflow:hidden !important; }

/* ---------- THE SCARE (full jumpscare, holds you) ---------- */
#scare { position:fixed; inset:0; z-index:285; background:radial-gradient(ellipse at 50% 52%, #41270f 0%, #1a0d05 42%, #000 82%); display:none; align-items:center; justify-content:center; overflow:hidden; }
#scare.on { display:flex; }
#scare img { width:min(94vmin,780px); filter:contrast(1.5) brightness(1.15) saturate(.55) sepia(.25) drop-shadow(0 0 46px rgba(196,150,80,.3)); animation:scIn .16s steps(2) both, scShake .11s steps(3) infinite; }
#scare.lunge img { animation:scLunge .14s steps(2) both, scShake .1s steps(3) infinite; }
#scare .sc-glitch { position:absolute; inset:-2%; pointer-events:none; background:repeating-linear-gradient(0deg,transparent 0 3px,rgba(120,10,6,.14) 3px 4px); animation:scTear .28s steps(6) infinite; }
#scare .sc-glitch::after { content:''; position:absolute; inset:0; background:radial-gradient(ellipse at 50% 60%,transparent 30%,rgba(90,8,4,.35)); }
#scare p { position:absolute; bottom:5vh; left:0; right:0; margin:0; text-align:center; font-family:'Special Elite',monospace; color:#8a1410; letter-spacing:.22em; font-size:clamp(13px,3vw,21px); text-transform:lowercase; text-shadow:0 0 18px rgba(120,10,6,.5); }
#scare.fading { opacity:0; transition:opacity 1.05s; }
@keyframes scIn { from { transform:scale(.35); filter:brightness(3.5) contrast(2); } }
@keyframes scShake { 0%{transform:translate(-7px,3px) scale(1.03) rotate(-.4deg)} 33%{transform:translate(6px,-5px) scale(1.02)} 66%{transform:translate(-4px,-6px) scale(1.05) rotate(.5deg)} 100%{transform:translate(5px,4px) scale(1.03)} }
@keyframes scLunge { from{transform:scale(1.02)} to{transform:scale(1.42)} }
@keyframes scTear { to { transform:translateY(14px); } }
body.shake { animation:bShake .1s steps(2) infinite; }
@keyframes bShake { 0%{margin-left:-5px;margin-top:2px} 50%{margin-left:5px;margin-top:-3px} }

/* ---------- the file: you cannot miss it until you have read it ---------- */
#imm-file-btn { border-color:#6a1210; color:#d9c9b4; text-transform:lowercase; letter-spacing:.1em; }
#imm-file-btn .fi-dot { display:inline-block; width:7px; height:7px; margin-left:7px; border-radius:50%; background:#a01610; box-shadow:0 0 8px #a01610; animation:fiPulse 1.1s infinite; vertical-align:2px; }
#imm-file-btn.seen .fi-dot { display:none; }
#imm-file-btn:not(.seen) { animation:fiGlow 1.6s infinite; }
#imm-file-btn.nag { animation:fiNag .3s steps(4) 6, fiGlow 1.6s infinite; }
@keyframes fiPulse { 50% { opacity:.3; } }
@keyframes fiGlow { 0%,100% { box-shadow:0 0 0 rgba(160,22,16,0); border-color:#6a1210; } 50% { box-shadow:0 0 16px rgba(160,22,16,.55); border-color:#a01610; } }
@keyframes fiNag { 0%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} 100%{transform:translateX(0)} }

/* ---------- the word stamps itself ---------- */
#fragstamp { position:fixed; inset:0; z-index:287; display:none; place-items:center; background:radial-gradient(ellipse at 50% 50%,rgba(20,4,2,.55),rgba(0,0,0,.9)); pointer-events:none; opacity:0; transition:opacity 1.1s ease; }
#fragstamp.on { display:grid; opacity:1; transition:opacity .12s ease; }
#fragstamp.out { opacity:0; transition:opacity 1.1s ease; }
#fragstamp.out .fs-word { transform:rotate(-4deg) scale(1.08); filter:blur(3px); transition:all 1.1s ease; }
#fragstamp.out .fs-pre, #fragstamp.out .fs-count, #fragstamp.out .fs-sub { opacity:0; transition:opacity .7s ease; }
#fragstamp .fs-word, #fragstamp .fs-pre, #fragstamp .fs-count, #fragstamp .fs-sub { transition:opacity .5s ease, transform 1.1s ease, filter 1.1s ease; }
#fragstamp .fs-pre { position:absolute; top:26vh; left:0; right:0; text-align:center; font-family:'Special Elite',monospace; font-size:clamp(10px,2vw,13px); letter-spacing:.5em; color:#8f8468; text-transform:lowercase; animation:fsIn .5s both; }
#fragstamp .fs-word { font-family:'Reenie Beanie',cursive; font-size:clamp(64px,17vw,190px); color:#a01610; text-shadow:0 0 40px rgba(163,26,26,.6), 2px 2px 0 #300; transform:rotate(-4deg); animation:fsStamp .38s cubic-bezier(.1,1.4,.3,1) both; }
#fragstamp .fs-count { position:absolute; bottom:26vh; left:0; right:0; text-align:center; font-family:'VT323',monospace; font-size:clamp(20px,4.5vw,34px); color:#c8b060; letter-spacing:.4em; animation:fsIn .5s .15s both; }
#fragstamp .fs-sub { position:absolute; bottom:19vh; left:0; right:0; text-align:center; font-family:'Special Elite',monospace; font-size:clamp(10px,2vw,13px); color:#6a5f4a; font-style:italic; animation:fsIn .5s .3s both; }
@keyframes fsStamp { from { transform:rotate(-4deg) scale(2.6); opacity:0; filter:blur(6px); } 60% { opacity:1; filter:blur(0); } to { transform:rotate(-4deg) scale(1); } }
@keyframes fsIn { from { opacity:0; transform:translateY(8px); } }

/* ---------- HIS LEDGER (the staff page) ---------- */
#ledger { position:fixed; inset:0; z-index:295; display:none; place-items:center; background:rgba(0,0,0,.88); backdrop-filter:blur(2px); }
#ledger.on { display:grid; }
.lg-card { width:min(560px,92vw); max-height:86vh; overflow:auto; background:linear-gradient(175deg,#151009,#0b0805); border:1px solid #3a2c17; outline:4px double #241c0e; padding:26px 30px; font-family:'Special Elite',monospace; box-shadow:0 30px 90px #000, inset 0 0 60px rgba(60,30,10,.25); animation:lgIn .3s cubic-bezier(.1,1.3,.4,1) both; }
@keyframes lgIn { from { transform:translateY(24px) rotate(1deg); opacity:0; } }
.lg-card h3 { margin:0 0 4px; font-size:17px; letter-spacing:.3em; color:#c8b060; }
.lg-card h3 small { display:block; font-size:9px; color:#6a5f4a; letter-spacing:.2em; margin-top:4px; }
.lg-sub { font-size:11px; color:#7a6e55; line-height:1.7; margin:10px 0 18px; }
.lg-rows { display:flex; flex-direction:column; gap:8px; }
.lg-rows button { text-align:left; background:rgba(30,22,12,.5); border:1px dashed #4a3a20; color:#b8a888; font:inherit; font-size:12.5px; letter-spacing:.06em; padding:11px 14px; cursor:pointer; transition:border-color .2s,background .2s,transform .15s; }
.lg-rows button:hover { border-color:#a01610; background:rgba(50,16,10,.45); transform:translateX(5px); color:#d8cdb4; }
.lg-rows button b { color:#c8b060; font-weight:normal; }
.lg-rows .lg-red b { color:#a03028; }
.lg-rows .lg-red:hover { border-color:#a01610; box-shadow:inset 0 0 20px rgba(120,20,10,.3); }
.lg-rows .lg-dim { opacity:.55; }
.lg-foot { margin:18px 0 0; font-size:10px; color:#5a5040; font-style:italic; text-align:center; }
