
html,body{margin:0;background:#000;color:#d5d8d1;font-family:Arial,Helvetica,sans-serif}
body.nightmare-entry{min-height:100svh;overflow-x:hidden;overflow-y:auto;position:relative;padding:3svh 0 8svh;background:
radial-gradient(ellipse at 50% 5%,rgba(80,110,45,.08),transparent 28%),
linear-gradient(#010201,#000 52%,#010101)}
.nightmare-entry:before{content:"";position:fixed;inset:0;pointer-events:none;z-index:30;background:repeating-linear-gradient(0deg,rgba(255,255,255,.018) 0 1px,transparent 1px 4px),radial-gradient(circle at center,transparent 38%,rgba(0,0,0,.88) 100%);mix-blend-mode:screen}
.nightmare-noise{position:fixed;inset:0;z-index:-8;opacity:.5;background:
repeating-linear-gradient(90deg,rgba(118,140,82,.018) 0 1px,transparent 1px 90px),
repeating-linear-gradient(0deg,rgba(118,140,82,.015) 0 1px,transparent 1px 70px);animation:noiseshift 9s steps(2) infinite}
.liminal-hall{position:fixed;inset:0;z-index:-9;perspective:650px;overflow:hidden;background:linear-gradient(180deg,#020302,#000)}
.liminal-hall:before{content:"";position:absolute;left:50%;top:58%;width:150vw;height:120vh;transform:translate(-50%,-50%) rotateX(68deg);transform-origin:center;background:linear-gradient(rgba(104,126,76,.065) 1px,transparent 1px),linear-gradient(90deg,rgba(104,126,76,.055) 1px,transparent 1px);background-size:80px 80px;animation:floorcrawl 8s linear infinite}
.liminal-hall:after{content:"";position:absolute;left:22%;right:22%;top:9%;height:2px;background:#8da66a;box-shadow:0 0 13px rgba(160,190,120,.7),0 0 70px rgba(90,120,55,.16);animation:lightflicker 5s steps(1) infinite}
.ceiling-flicker{position:fixed;top:0;left:0;right:0;height:28vh;z-index:-7;background:linear-gradient(180deg,rgba(150,165,120,.028),transparent);animation:lightflicker 8.3s steps(1) infinite}
.uap-shadow{position:fixed;top:7vh;left:50%;width:64vw;max-width:520px;height:120px;transform:translateX(-50%);z-index:-5;opacity:.12;filter:blur(5px);animation:uapfloat 11s ease-in-out infinite}
.uap-shadow:before{content:"";position:absolute;left:12%;right:12%;top:26%;height:34%;border-radius:50%;background:#11180e;box-shadow:0 0 40px rgba(105,150,70,.18)}
.uap-shadow:after{content:"";position:absolute;left:42%;right:42%;top:50%;height:42vh;background:linear-gradient(rgba(120,160,80,.06),transparent);clip-path:polygon(35% 0,65% 0,100% 100%,0 100%)}
.watcher{position:fixed;width:40px;height:76px;z-index:-4;border-radius:50% 50% 40% 40%;background:#010201;opacity:0;filter:blur(1px);animation:watcher 14s steps(1) infinite}
.watcher:before,.watcher:after{content:"";position:absolute;top:22px;width:8px;height:4px;border-radius:50%;background:#78945b;box-shadow:0 0 12px rgba(130,160,90,.5)}
.watcher:before{left:8px}.watcher:after{right:8px}.watcher-a{right:7vw;top:39vh}.watcher-b{left:6vw;top:68vh;animation-delay:-7s}
.warning-ticker{position:sticky;top:0;z-index:50;padding:7px 10px;background:#060806;border-bottom:1px solid #273320;color:#66735d;font:9px monospace;letter-spacing:.17em;white-space:nowrap;overflow:hidden;text-align:center}
.nightmare-gate{position:relative;z-index:3;width:min(86vw,640px);margin:4svh auto 0;padding:26px 26px 24px;border:1px solid #263b1c;background:linear-gradient(180deg,rgba(2,4,2,.97),rgba(0,0,0,.985));box-shadow:0 0 0 1px #0b1208,inset 0 0 90px rgba(36,58,23,.08),0 20px 70px #000;animation:gatehaunt 7s ease-in-out infinite;overflow:hidden}
.gate-static{position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,rgba(255,255,255,.014) 0 1px,transparent 1px 3px);animation:staticjump 2.8s steps(2) infinite}
.terminal-head{display:flex;justify-content:space-between;gap:16px;color:#727b6a;font:10px monospace;letter-spacing:.18em;border-bottom:1px solid #1c2718;padding-bottom:10px}.terminal-head b{color:#8ba67b}
.hazard-line{margin:14px 0 18px;padding:8px 10px;border:1px solid #302d1a;color:#8f8a66;background:#070706;font:9px monospace;letter-spacing:.12em;text-align:center}
.void-emblem{width:98px;height:98px;border:1px solid #3b4b31;border-radius:50%;margin:0 auto 18px;display:grid;place-items:center;position:relative;box-shadow:0 0 22px rgba(92,130,64,.09),inset 0 0 30px rgba(30,45,22,.25);animation:emblempulse 5s ease-in-out infinite}.void-emblem:before,.void-emblem:after{content:"";position:absolute;border:1px dashed #293520;border-radius:50%;inset:-12px;animation:spin 18s linear infinite}.void-emblem:after{inset:-26px;animation-direction:reverse;animation-duration:31s}.void-emblem span{font:700 28px monospace;color:#697b5e}.void-emblem b{position:absolute;bottom:-34px;font:7px monospace;letter-spacing:.14em;color:#4f5b49}
.nightmare-gate h1{text-align:center;margin:48px 0 16px;font-size:clamp(42px,12vw,72px);line-height:.9;letter-spacing:-.055em}.ghost-title{color:#cfd1cc;text-shadow:3px 0 #293322,-3px 0 #0a0d09;animation:titleglitch 5s steps(1) infinite}.acid-title{color:#60764d;text-shadow:0 0 12px rgba(100,135,70,.14)}
.terminal-copy{max-width:520px;margin:0 auto;color:#858a82;font-size:16px;line-height:1.7;text-align:center}.distress{margin:18px auto 0;color:#6d493f;font:9px monospace;letter-spacing:.16em;text-align:center;animation:warningblink 7s steps(1) infinite}.clearance{margin:18px 0 16px;padding:12px 8px;border-top:1px solid #182214;border-bottom:1px solid #182214;color:#78866e;font:10px monospace;letter-spacing:.17em;text-align:center}
.enter-nightmare{display:block;width:min(100%,360px);box-sizing:border-box;margin:0 auto;padding:18px 20px;background:#263a1c;color:#d2dbcb;text-decoration:none;text-align:center;font:700 13px monospace;letter-spacing:.2em;border:1px solid #506746;box-shadow:0 0 22px rgba(90,125,65,.12);animation:buttonfear 3.6s ease-in-out infinite}.enter-nightmare:active{transform:scale(.985);background:#354c29}.microcopy{margin-top:12px;text-align:center;color:#343d31;font:7px monospace;letter-spacing:.16em}.version-mark{margin:18px auto 0;text-align:center;color:#20291d;font:8px monospace;letter-spacing:.15em}
@keyframes floorcrawl{to{background-position:0 160px,160px 0}}@keyframes lightflicker{0%,9%,11%,38%,40%,88%,100%{opacity:.9}10%,39%,89%{opacity:.08}}@keyframes uapfloat{50%{transform:translateX(-50%) translateY(12px) scale(1.05);opacity:.17}}@keyframes watcher{0%,73%,100%{opacity:0}74%{opacity:.2}75%{opacity:0}76%{opacity:.1}78%{opacity:0}}@keyframes gatehaunt{0%,100%{transform:translateY(0) rotate(.02deg)}38%{transform:translateY(-4px) rotate(-.08deg)}67%{transform:translateY(3px) rotate(.06deg)}}@keyframes staticjump{50%{transform:translateY(2px)}}@keyframes emblempulse{50%{box-shadow:0 0 35px rgba(92,130,64,.16),inset 0 0 34px rgba(30,45,22,.35)}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes titleglitch{0%,92%,100%{transform:none}93%{transform:translateX(5px)}94%{transform:translateX(-3px)}95%{transform:none}}@keyframes warningblink{0%,84%,100%{opacity:.5}85%{opacity:1}87%{opacity:.25}}@keyframes buttonfear{50%{box-shadow:0 0 34px rgba(90,125,65,.2)}}@keyframes noiseshift{50%{transform:translateX(1px)}}
@media(max-width:760px){body.nightmare-entry{padding-top:1.5svh}.nightmare-gate{width:84vw;margin-top:2svh;padding:20px 18px 22px}.nightmare-gate h1{font-size:clamp(42px,13vw,62px);margin-top:44px}.terminal-copy{font-size:14px;line-height:1.55}.void-emblem{width:82px;height:82px}.warning-ticker{font-size:8px}.enter-nightmare{padding:17px 14px;margin-top:4px}.uap-shadow{top:3vh}.hazard-line{font-size:8px}.distress{font-size:7px}.clearance{font-size:8px}}

/* NIGHTMARE-08 mobile lockscreen: entire entry stays inside one viewport */
@media (max-width:760px){
  html,body{height:100%;min-height:100%;}
  body.nightmare-entry{
    height:100svh;
    min-height:100svh;
    overflow:hidden;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .warning-ticker{
    position:fixed;
    top:max(0px,env(safe-area-inset-top));
    left:0;right:0;
    height:20px;
    box-sizing:border-box;
    padding:4px 8px;
    font-size:6px;
    line-height:12px;
    z-index:80;
    opacity:.72;
  }
  .nightmare-gate{
    width:88vw;
    max-width:560px;
    max-height:calc(100svh - 88px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    margin:18px auto 26px;
    padding:12px 14px 13px;
    box-sizing:border-box;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    justify-content:center;
  }
  .terminal-head{font-size:7px;letter-spacing:.13em;padding-bottom:6px;gap:8px}
  .hazard-line{margin:7px 0 8px;padding:5px 6px;font-size:6px;letter-spacing:.09em}
  .void-emblem{width:54px;height:54px;margin:0 auto 8px}
  .void-emblem span{font-size:20px}.void-emblem b{bottom:-18px;font-size:5px}.void-emblem:before{inset:-7px}.void-emblem:after{inset:-14px}
  .nightmare-gate h1{font-size:clamp(34px,10.6vw,52px);line-height:.84;margin:20px 0 8px}
  .terminal-copy{font-size:11px;line-height:1.35;max-width:94%;margin:0 auto}
  .distress{margin:8px auto 0;font-size:5px;letter-spacing:.11em;line-height:1.25}
  .clearance{margin:8px 0 8px;padding:7px 5px;font-size:6px;letter-spacing:.12em;line-height:1.25}
  .enter-nightmare{width:min(82%,320px);padding:13px 12px;font-size:10px;letter-spacing:.18em;margin:0 auto}
  .microcopy{display:none}
  .version-mark{position:fixed;bottom:calc(5px + env(safe-area-inset-bottom));left:0;right:0;margin:0;font-size:5px;opacity:.45;z-index:70}
  .uap-shadow{top:1vh;height:72px;opacity:.10}
  .uap-shadow:after{height:26vh}
  .watcher-a{top:31vh}.watcher-b{top:65vh}
}

@media (max-width:760px) and (max-height:740px){
  .nightmare-gate{max-height:calc(100svh - 60px);margin-top:14px;padding:9px 12px 10px}
  .terminal-head{font-size:6px}.hazard-line{font-size:5px;margin:5px 0}
  .void-emblem{width:44px;height:44px;margin-bottom:5px}.void-emblem span{font-size:17px}
  .nightmare-gate h1{font-size:clamp(30px,9.5vw,44px);margin:15px 0 6px}
  .terminal-copy{font-size:10px}.distress{display:none}.clearance{margin:6px 0;padding:5px 4px;font-size:5px}
  .enter-nightmare{padding:10px 10px;font-size:9px}
}

/* NIGHTMARE-09: true centered mobile viewport composition */
@media (max-width:760px){
  html,body{width:100%;height:100%;overflow:hidden!important;}
  body.nightmare-entry{
    width:100vw!important;height:100svh!important;min-height:100svh!important;
    padding:0!important;margin:0!important;display:block!important;overflow:hidden!important;
  }
  .warning-ticker{display:none!important;}
  .nightmare-gate{
    position:fixed!important;
    z-index:20!important;
    left:5vw!important;right:5vw!important;
    top:max(92px,10svh)!important;
    bottom:max(128px,12svh)!important;
    width:auto!important;max-width:none!important;max-height:none!important;
    margin:0!important;padding:clamp(12px,2.4vh,22px) clamp(14px,4vw,28px)!important;
    box-sizing:border-box!important;
    display:flex!important;flex-direction:column!important;justify-content:center!important;
    overflow:hidden!important;
    transform:none!important;animation:gateBreath09 6.5s ease-in-out infinite!important;
    border:1px solid rgba(92,130,73,.48)!important;
    background:linear-gradient(180deg,rgba(1,3,2,.96),rgba(0,0,0,.985))!important;
    box-shadow:0 0 0 1px rgba(83,118,64,.08),0 0 55px rgba(57,90,40,.09),inset 0 0 80px rgba(30,50,22,.07)!important;
  }
  .terminal-head{font-size:clamp(6px,1.75vw,8px)!important;line-height:1.25;padding-bottom:6px!important}
  .hazard-line{margin:7px 0 8px!important;padding:5px 6px!important;font-size:clamp(5px,1.55vw,7px)!important;line-height:1.2!important}
  .void-emblem{width:clamp(50px,12vw,68px)!important;height:clamp(50px,12vw,68px)!important;margin:1px auto 10px!important;flex:0 0 auto}
  .void-emblem span{font-size:clamp(18px,5vw,25px)!important}.void-emblem b{font-size:5px!important;bottom:-17px!important}
  .nightmare-gate h1{font-size:clamp(36px,11vw,58px)!important;line-height:.86!important;margin:16px 0 10px!important;letter-spacing:-.05em!important}
  .terminal-copy{font-size:clamp(10px,2.75vw,14px)!important;line-height:1.38!important;max-width:96%!important;margin:0 auto!important}
  .distress{margin:8px auto 0!important;font-size:clamp(5px,1.45vw,7px)!important;line-height:1.3!important;max-width:96%}
  .clearance{margin:8px 0!important;padding:6px 4px!important;font-size:clamp(6px,1.7vw,8px)!important;line-height:1.25!important}
  .enter-nightmare{width:min(78vw,360px)!important;padding:13px 12px!important;font-size:clamp(9px,2.5vw,12px)!important;margin:2px auto 0!important;flex:0 0 auto}
  .microcopy{display:none!important}.version-mark{display:none!important}
  .uap-shadow{top:4.5vh!important;width:68vw!important;height:78px!important;opacity:.10!important}
  .uap-shadow:after{height:29vh!important}
  .watcher-a{right:2vw!important;top:31vh!important}.watcher-b{left:2vw!important;top:63vh!important}
}
@media (max-width:760px) and (max-height:780px){
  .nightmare-gate{top:72px!important;bottom:108px!important;padding:9px 12px!important}
  .terminal-head{font-size:5px!important}.hazard-line{font-size:5px!important;margin:4px 0 5px!important}
  .void-emblem{width:42px!important;height:42px!important;margin-bottom:7px!important}.void-emblem span{font-size:16px!important}
  .nightmare-gate h1{font-size:clamp(30px,9.4vw,43px)!important;margin:12px 0 6px!important}
  .terminal-copy{font-size:9px!important}.distress{display:none!important}.clearance{margin:5px 0!important;padding:4px!important;font-size:5px!important}
  .enter-nightmare{padding:9px 10px!important;font-size:8px!important}
}
@keyframes gateBreath09{0%,100%{filter:brightness(.96);box-shadow:0 0 0 1px rgba(83,118,64,.08),0 0 45px rgba(57,90,40,.07),inset 0 0 80px rgba(30,50,22,.06)}50%{filter:brightness(1.02);box-shadow:0 0 0 1px rgba(83,118,64,.10),0 0 75px rgba(57,90,40,.12),inset 0 0 110px rgba(30,50,22,.09)}}
