/* MEYDORA 16.29 — Haunted Cabin: readable high-tension HUD and touch interactions */
#qomHorrorHud1629[hidden],#qomHorrorModal1629[hidden],#qomHorrorFlash1629[hidden]{display:none!important}
body.qom-horror-playing1629:before{content:"";position:fixed;inset:0;z-index:77;pointer-events:none;background:radial-gradient(ellipse at 52% 46%,transparent 20%,#2106092a 68%,#05070ad0 105%);animation:qomHorrorBreathe 4s ease-in-out infinite}
#qomHorrorHud1629{position:fixed;top:12px;left:12px;z-index:760;box-sizing:border-box;width:min(355px,calc(100vw - 24px));max-height:min(64dvh,420px);overflow:auto;padding:12px;border:1px solid #c34a5d;border-radius:15px;color:#f8f1f0;background:linear-gradient(145deg,#190c16f5,#0c1827f2);box-shadow:0 14px 38px #000c,0 0 26px #be304633;font:12px/1.7 Vazirmatn,Tahoma,Arial,sans-serif;backdrop-filter:blur(10px)}
#qomHorrorHud1629 header{display:flex;justify-content:space-between;align-items:center;gap:9px;padding-bottom:10px;border-bottom:1px solid #ffffff25}
#qomHorrorHud1629 header div{display:grid;gap:2px}
#qomHorrorHud1629 header small{color:#ee8395;font:600 9px monospace;letter-spacing:.8px;direction:ltr;text-align:right}
#qomHorrorHud1629 header b{color:#ffe3d7;font-size:13px}
#qomHorrorHud1629 button,#qomHorrorModal1629 button{border:1px solid #b75e6a;border-radius:10px;background:#4b182a;color:#fff;min-height:36px;padding:7px 12px;cursor:pointer;font:700 11px Vazirmatn,Tahoma,Arial,sans-serif}
#qomHorrorHud1629 button:focus-visible,#qomHorrorModal1629 button:focus-visible{outline:2px solid #76f6df;outline-offset:2px}
#qomHorrorHud1629 .horrorTop{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:7px;margin-top:10px}
#horrorTimer1629{font:800 23px ui-monospace,Consolas,monospace;color:#c7fbeb;text-shadow:0 0 12px #3acdbb77;direction:ltr}
#horrorTimer1629.urgent{color:#ff6d70;animation:qomHorrorUrgent .66s ease-in-out infinite alternate}
#horrorStage1629{color:#eac5c8;text-align:center;font-size:10px}
#horrorScore1629{color:#ffdd93;font-size:10px;white-space:nowrap}
#qomHorrorHud1629 .horrorBars{display:grid;gap:7px;margin-top:9px}
#qomHorrorHud1629 .horrorBars label{display:grid;grid-template-columns:58px 1fr 38px;align-items:center;gap:7px;font-size:10px}
#qomHorrorHud1629 .horrorBars label i{height:9px;border-radius:99px;background:#162633;overflow:hidden;border:1px solid #607084}
#qomHorrorHud1629 .horrorBars label em{height:100%;display:block;width:0;transition:width .22s ease;background:linear-gradient(90deg,#a81638,#ff7767);border-radius:99px}
#qomHorrorHud1629 #horrorFuse1629{background:linear-gradient(90deg,#26aa92,#9ef2e1)}
#qomHorrorHud1629 #horrorObjective1629{margin:12px 0 8px;padding:8px 9px;border-radius:9px;background:#ffffff0e;color:#f1d9bc;line-height:1.9}
#qomHorrorHud1629 .horrorActions{display:flex;gap:7px}
#qomHorrorHud1629 .horrorActions button{flex:1;background:#185f60;border-color:#4fd2cd;font-size:12px;min-height:43px}
#qomHorrorHud1629 .horrorActions button+button{background:#252c42;border-color:#5f7698}
#qomHorrorHud1629 .horrorMessage{min-height:23px;margin:8px 0 0;color:#ffb1b9;font-size:10px;line-height:1.7}
#qomHorrorModal1629{position:fixed;inset:0;z-index:920;display:grid;place-items:center;padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom));background:#03040bc9;backdrop-filter:blur(8px);box-sizing:border-box}
#qomHorrorModal1629 .horrorDialog{position:relative;width:min(475px,95vw);max-height:86dvh;overflow:auto;padding:23px;border-radius:18px;color:#f7ecea;background:radial-gradient(circle at 80% 3%,#502331 0,#190d21 42%,#081725 100%);border:1px solid #c9666c;box-shadow:0 22px 80px #000d,0 0 45px #e12a3633;box-sizing:border-box;font:13px/2 Vazirmatn,Tahoma,Arial,sans-serif}
#qomHorrorModal1629 .horrorDialog:before{content:"";position:absolute;width:72px;height:72px;left:-25px;top:-25px;border:2px solid #ff4c6c;border-radius:0;transform:rotate(45deg);opacity:.52}
#qomHorrorModal1629 .horrorEyebrow{font:600 10px Consolas,monospace;letter-spacing:1px;color:#d88089;display:block;direction:ltr;text-align:right}
#qomHorrorModal1629 h2{font-size:21px;margin:8px 0 9px;color:#ffe0df}
#qomHorrorModal1629 p{line-height:2;margin:0 0 20px;color:#d4d5de;white-space:pre-wrap}
#qomHorrorModal1629 .horrorModalActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#qomHorrorModal1629 .horrorModalActions button{min-height:46px;white-space:normal;background:#262434;border-color:#685668;font-size:12px}
#qomHorrorModal1629 .horrorModalActions button.horrorPrimary{background:#9a2944;border-color:#e97c85;box-shadow:0 0 14px #a7204b4a}
#qomHorrorFlash1629{position:fixed;inset:0;z-index:1010;pointer-events:none;display:grid;place-items:center;font-size:min(50vw,260px);color:#ffe3dc;background:radial-gradient(ellipse,#9f1129 5%,#09010b 75%);text-shadow:0 0 30px #f13c53;opacity:0}
#qomHorrorFlash1629.scareOn{animation:qomHorrorFlash .55s ease-out both}
@keyframes qomHorrorFlash{0%{opacity:0;transform:scale(.9)}20%{opacity:.96;transform:scale(1.07)}60%{opacity:.55;transform:scale(1)}100%{opacity:0;transform:scale(1.12)}}
@keyframes qomHorrorBreathe{0%,100%{opacity:.62}50%{opacity:1}}
@keyframes qomHorrorUrgent{0%{opacity:1;filter:brightness(1)}100%{opacity:.65;filter:brightness(1.5)}}
@media(max-width:700px),(pointer:coarse){
 #qomHorrorHud1629{top:calc(7px + env(safe-area-inset-top));left:7px;width:min(325px,calc(100vw - 14px));max-height:48dvh;padding:9px;box-shadow:0 8px 18px #000b}
 #qomHorrorHud1629 header b{font-size:11px}
 #qomHorrorHud1629 .horrorTop{margin-top:6px}
 #qomHorrorHud1629 #horrorObjective1629{margin:7px 0 5px;padding:6px;font-size:10px}
 #qomHorrorHud1629 #horrorTimer1629{font-size:19px}
 #qomHorrorHud1629 .horrorActions button{min-height:45px}
 #qomHorrorModal1629 .horrorDialog{padding:18px 14px;max-height:86dvh}
 #qomHorrorModal1629 h2{font-size:18px}
 #qomHorrorModal1629 .horrorModalActions button{min-height:46px}
}
@media(orientation:landscape) and (max-height:500px){
 #qomHorrorHud1629{top:6px;left:6px;width:min(295px,38vw);max-height:calc(100dvh - 12px)}
 #qomHorrorHud1629 .horrorBars{gap:3px}
 #qomHorrorHud1629 .horrorBars label{grid-template-columns:50px 1fr 32px}
 #qomHorrorModal1629 .horrorDialog{max-height:calc(100dvh - 16px);padding:12px 18px;width:min(590px,84vw)}
 #qomHorrorModal1629 h2{font-size:18px;margin:3px 0}
 #qomHorrorModal1629 p{margin:4px 0 12px;line-height:1.7}
}
@media(prefers-reduced-motion:reduce){body.qom-horror-playing1629:before,#horrorTimer1629.urgent,#qomHorrorFlash1629.scareOn{animation:none!important}}

#qomHorrorHud1629 .horrorTarget{display:flex;gap:10px;align-items:center;justify-content:center;min-height:40px;margin:0 0 8px;padding:5px 9px;border:1px solid #4e6c70;border-radius:10px;background:#101a20;color:#b0f0e0}
#horrorTargetArrow1629{display:inline-grid;place-items:center;font-size:23px;font-weight:bold;min-width:30px;min-height:30px;border:1px solid #39988e;border-radius:8px;color:#98f5e7;transition:transform .2s ease}
#horrorTargetText1629{font-size:11px;line-height:1.4}
#horrorTargetText1629.danger{color:#ff7574;animation:qomHorrorUrgent .65s ease infinite alternate}
@media(orientation:landscape) and (max-height:500px){#qomHorrorHud1629 .horrorTarget{min-height:25px;margin-bottom:4px;padding:2px 7px}#horrorTargetArrow1629{min-height:24px;min-width:24px;font-size:17px}}

/* V16.39: compact in-game HUD leaves the 3D scene and cabin visible. */
#qomHorrorHud1629{width:min(298px,calc(100vw - 22px));max-height:56dvh;padding:9px 10px;border-radius:11px;box-shadow:0 8px 24px #0009}
#qomHorrorHud1629 header{padding-bottom:5px}
#qomHorrorHud1629 .horrorTop{margin-top:6px}
#qomHorrorHud1629 #horrorObjective1629{margin:6px 0;padding:5px 7px;line-height:1.45}
#qomHorrorHud1629 .horrorBars{margin-top:5px;gap:4px}
#qomHorrorHud1629 .horrorBars label i{height:6px}
#qomHorrorHud1629 .horrorActions button{min-height:32px;padding:4px 6px;font-size:10px}
#qomHorrorHud1629 .horrorMessage{min-height:14px;margin:3px 0 0}
#qomHorrorHud1629 .horrorTarget{min-height:27px;padding:2px 6px;margin-bottom:4px}
#horrorTargetArrow1629{min-width:23px;min-height:23px;font-size:18px}
@media(max-width:700px),(pointer:coarse){#qomHorrorHud1629{width:min(275px,calc(100vw - 12px));max-height:44dvh;padding:7px}#qomHorrorHud1629 header b{font-size:10px}}
