/* V5 — a sala inteira é o teatro. Arte local; atores canônicos preservados. */
:root{color-scheme:dark;--cream:#f2e5cc;--plum:#f2e5cc;--wine:#f2e5cc;--ink:#f2e5cc;--gold:#c59a5d;--muted:#ceb99e;font-family:Arial,Helvetica,sans-serif;background:#0c080e;color:var(--cream)}
html{background:#0c080e}body{max-width:520px;min-height:100svh;background:#180c19;color:var(--cream);position:relative;isolation:isolate;padding-bottom:max(12px,env(safe-area-inset-bottom));box-shadow:0 0 100px #000}
body:after{content:'';position:fixed;inset:0;max-width:520px;margin:auto;z-index:-2;background:linear-gradient(#180c1915,#180c1900 65%,#130b16a0),url('assets/theatre-v5.webp') center top/100% auto no-repeat #180c19;pointer-events:none;transition:opacity 2s}
body:before{z-index:15;opacity:.055;mix-blend-mode:screen}.world-light{position:fixed;inset:0;max-width:520px;margin:auto;pointer-events:none;z-index:-1;background:radial-gradient(ellipse at 55% 40%,#d68b4120,transparent 68%);transition:background 3s}
.topline{padding:16px 23px 12px;border:0;color:#e1be80;position:relative;z-index:1}.topline .eyebrow{font-size:8px;letter-spacing:.16em}.topline .tiny{color:#e1be80}.monogram{font-size:25px}.tiny,.intro,.complaint,.seal-response,.footer,.sound-hint{color:var(--muted)}main{padding:0 24px}.waiting,.invite{padding-top:75px}.waiting h1{color:#f8e6c6;font-size:clamp(38px,11vw,53px);text-shadow:0 4px 18px #000;line-height:1.05}.waiting>.eyebrow{color:#d8ab68}.complaint{font-size:14px;max-width:270px;margin:auto}.intro{font-size:13px;line-height:1.65}.waiting .intro{margin:14px auto}.countdown-wrap{background:#140d18d9;border:1px solid #c8a06666;border-radius:2px;padding:10px 12px;margin:20px auto;max-width:270px;box-shadow:0 0 0 4px #180e1899,0 0 0 5px #b68b4430}.countdown{font-size:28px;letter-spacing:.12em;margin:7px 0;color:#f4d69b}.countdown-wrap .eyebrow{font-size:8px}.waiting-door{height:190px;width:220px;margin:18px auto;background:#5c3c25;border-color:#b48a4d;box-shadow:inset 0 0 0 7px #302017,inset 0 0 0 8px #b38d52,0 10px 25px #0009}.door-number{top:24px}.door-footnote{bottom:15px}.door-content{padding-top:48px}.door-leaf{background:repeating-linear-gradient(90deg,#260e1c 0,#6d2942 20%,#2b0e20 37%)}.door-halo{background:radial-gradient(ellipse at bottom,#fff0b8,#805222)}.key-control #key-symbol{font-size:40px}.cord-control{gap:0}.sconce{min-height:66px}.waiting[data-step=room] .waiting-door{height:95px}.waiting[data-step=room] .door-number{top:15px}.waiting[data-step=room]{padding-top:42px}#waiting-room h2{color:#f4e2c1;font-size:28px}.primary,button.primary{color:#2c1822;background:linear-gradient(110deg,#bb8d4f,#f0d7a0 50%,#cda26a);border:1px solid #f5deb0;border-radius:2px;box-shadow:0 5px 0 #57351e,0 12px 24px #0005;min-height:48px;padding:13px 20px}.primary:active{transform:translateY(3px);box-shadow:0 2px 0 #57351e}.secondary,.quiet{color:#ecd5b1;border-color:#aa8355;background:#1d111dcc}.secondary{border-radius:2px}.quiet{background:none}.sound-toggle{color:#e5cdab;background:#1b111ddb;border:1px solid #92714e;min-width:44px;border-radius:2px;font-size:11px}.sound-hint{display:none}.sound-controls{flex-direction:row;margin:6px 0}.global-sound{margin:10px auto}.footer{color:#b49c85;font-size:9px;margin:0}.seal-response{color:#dac6a8}.room-objects{gap:7px}.room-objects button{color:#ecd4ad;background:linear-gradient(#4a2634,#24131f);border:1px solid #b38a55;box-shadow:inset 0 0 0 4px #26151e;min-height:78px}.room-objects span{color:#e2b76c}.exploration{background:#120c17eb;margin-top:18px;padding:18px 12px;border:1px solid #967341}.clue-shelf{display:flex;gap:10px;justify-content:center;margin:15px 0;font:11px/1.6 Georgia;color:#dbc59c}.room-panel h3{font:22px Georgia;margin:10px 0}.room-panel p{font-size:12px;line-height:1.6}.mechanism-row{display:flex;gap:12px;justify-content:center;margin:18px 0}.mechanism-row button{height:58px;width:58px;background:#301928;color:#e6c88b;border:1px solid #99723f;border-radius:50%;font:30px Georgia}.mechanism-row [aria-pressed=true]{background:#b98b42;color:#fff1be;box-shadow:0 0 24px #e7b35377}.fragment-pair{display:flex;justify-content:center;margin:20px}.fragment-pair button{background:#e8d5b3;color:#966f31;border:1px solid #9c794b;width:90px;height:92px;font:80px/1 Georgia}.fragment-pair span{display:block;transition:transform .3s}.secret-star{font:80px Georgia;color:#ecd49a}.waiting[data-explored='1'] .door-halo,.waiting[data-explored='2'] .door-halo,.waiting[data-explored='3'] .door-halo{box-shadow:inset 0 0 60px #fff0b8;opacity:1}.waiting[data-explored='3'] .door-number:after{content:' ✧';color:#fff5bd}
.invite h1{font-size:46px;color:#f4e1bd}.puzzle{background:#291420;border-color:#b28b51;box-shadow:0 18px 45px #0008;width:min(300px,100%);gap:5px;padding:8px}.piece{border:1px solid #c7aa77;border-radius:0}.piece[aria-pressed=true]{outline:3px solid #ffda86;outline-offset:1px}.piece:disabled{opacity:1}.piece[data-correct=true]:after{display:none}.puzzle-progress{margin-top:15px}.puzzle-message{padding:12px 5px;color:#e4cda9}.ticket{background:#efe0bf;color:#3a2230;border:3px double #ab854e;box-shadow:0 20px 45px #0005}.ticket .tiny{color:#664b43}.late,.audio-error,.music-warning{background:#2b1827;color:#f5dabb}.experience{margin:60px auto 0}.theater-heading{margin:0 auto 14px}.theater-heading h1{font-size:43px;color:#f6dfb4;text-shadow:0 3px 15px #000}.theater-heading .subtitle{color:#dcc298;font-size:13px}.theater-heading .eyebrow{color:#cba975}.stage-shell{margin:12px -12px 0;padding-top:5px;min-height:260px;display:flex;align-items:flex-end;transition:margin 2s,background 2s;background:radial-gradient(ellipse at bottom,#b8753030,transparent 70%)}#stage{position:relative;z-index:1;filter:drop-shadow(0 14px 12px #0008)}#camera>path:nth-of-type(-n+3){opacity:.45}#cities{filter:drop-shadow(5px 10px 5px #100c1b99)}#stage text{fill:#ebd9be}#backstage{filter:drop-shadow(3px 7px 2px #0006)}#spotlight{opacity:.3}#stage-shell .hotspot{position:absolute;z-index:6;transform:none;width:auto;min-width:70px;max-width:104px;min-height:44px;border-radius:2px;padding:4px 8px;font-size:10px;background:#241323e8;color:#efd0a0;border-color:#a07a4c;display:flex;gap:6px;align-items:center}.hotspot span:first-child{font-size:19px}.dialogue{min-height:110px;display:flex;flex-direction:column;justify-content:center;text-align:center;padding:14px 10px;color:#f5e6cf;position:relative}.dialogue>span{font-size:9px;letter-spacing:.25em;text-transform:uppercase;color:#d5a76d;min-height:13px;margin-bottom:7px}.dialogue p{font:italic 19px/1.4 Georgia;text-shadow:0 2px 8px #000}.dialogue[data-speaker=Bel] p{font-style:normal;color:#dce3ec}.dialogue[data-speaker=Ayla] p{color:#f3cddd}.dialogue[data-final=true] p{font-size:21px}.caption{padding:10px 1px;border-bottom:1px solid #bb945344}.act-name{font:16px/1.25 Georgia}.act-number{font-size:8px;letter-spacing:.06em}.player{margin:12px auto;padding:14px 8px 7px;border:1px solid #876345;background:linear-gradient(120deg,#21151bcc,#120c14f2);box-shadow:inset 0 0 0 3px #140d14,0 12px 24px #0004}.player-actions{margin-bottom:9px}.player-actions .primary,.player-actions .secondary{font-size:12px;min-height:44px;padding:10px 15px}.seek-label{display:block;text-transform:uppercase;font-size:8px;letter-spacing:.2em;color:#c29b66}#seek{width:100%;height:44px;accent-color:#d7b371;cursor:pointer;background:transparent}#narration{display:none}#blackout{z-index:16}.player,.global-sound{position:relative;z-index:17}.player .tiny{margin-top:4px}.sentence{top:9%;left:10%;right:10%;padding:24px 17px;background:repeating-linear-gradient(0deg,#e9d9b8 0,#f2e5c9 3px,#f2e5c9 5px);box-shadow:2px 15px 30px #0009;color:#362632;z-index:5}.sentence p{font:italic 24px/1.4 Georgia}.sentence .eyebrow{color:#754c42}.outside{bottom:-36%;width:110%;left:-5%}.ending{border:0;padding:45px 0 20px;animation:epilogue 2s ease both}.ending h2{font-size:31px}.last-page{position:relative;background:#eddfc2;color:#442b32;padding:40px 24px;margin:32px 10px;box-shadow:5px 15px 30px #0004;transform:rotate(-2deg);border:1px solid #af8859}.last-page p{font:italic 22px/1.5 Georgia;margin:20px 0}.signature{display:block;font:26px Georgia;margin-top:36px}.signature small{font:italic 16px Georgia}.ending .eyebrow{font:9px Arial;letter-spacing:.2em}.ending button{display:block;margin:20px auto}.ending .tiny{font:12px Arial}
body[data-act='2'] .stage-shell{background:radial-gradient(ellipse at 50% 80%,#e6a24d40,transparent)}body[data-act='2'] #note{filter:drop-shadow(0 0 9px #f9d98b)}body[data-act='3']:after{opacity:.2}body[data-act='3']{background:#090d21}body[data-act='3'] .world-light{background:radial-gradient(ellipse at 70% 20%,#7382b54a,transparent 60%)}body[data-act='4']{background:#100910}body[data-act='4']:after{opacity:.23}body[data-act='4'] .world-light{background:radial-gradient(ellipse at 50% 70%,#8b223833,transparent)}body[data-act='4'] .theater-heading h1{color:#bb9d9e}body[data-act='4'] #cities{opacity:0}body[data-act='5']:after{opacity:.1}body[data-act='5']{background:repeating-linear-gradient(90deg,#201917 0,#201917 38px,#3d2c2090 40px,#130f13 45px)}body[data-act='5'] .stage-shell{background:linear-gradient(135deg,transparent 46%,#73502c30 48%,transparent 51%)}body[data-act='5'] .world-light{background:linear-gradient(70deg,transparent,#c7863330,transparent)}body[data-act='5'] #camera>path{opacity:.15}body[data-act='6'],body[data-finale=true]{background:#eee5d1;color:#49333d;--muted:#6f5556}body[data-act='6']:after{opacity:0}body[data-act='6'] .world-light{background:radial-gradient(ellipse at 50% 40%,#fffef6,#e6d5bd)}body[data-act='6'] .theater-heading{opacity:.5}body[data-act='6'] .theater-heading h1{color:#634552;text-shadow:none}body[data-act='6'] .stage-shell{margin-bottom:100px}body[data-act='6'] .dialogue p{color:#503543;text-shadow:none}body[data-act='6'] .dialogue>span{color:#826342}body[data-act='6'] .player{background:#4a343de8}body[data-act='6'] .caption{border-color:#96734555}body[data-act='6'] .topline,body[data-act='6'] .topline .tiny{color:#715439}body[data-act='6'] .theater-heading .eyebrow,body[data-act='6'] .theater-heading .subtitle{color:#715439}body[data-act='6'] .player .tiny{color:#e5d4be}
@keyframes epilogue{0%,30%{opacity:0;transform:translateY(16px)}100%{opacity:1;transform:none}}button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid #ffdb88;outline-offset:4px}@media(max-width:350px){main{padding:0 20px}.waiting,.invite{padding-top:56px}.topline{padding:13px 17px}.topline .eyebrow{font-size:7px}.experience{margin-top:44px}.theater-heading h1{font-size:36px}.dialogue p{font-size:17px}.dialogue{min-height:108px}.sentence p{font-size:20px}.sentence{padding:17px 12px}.stage-shell{min-height:230px}.waiting h1{font-size:39px}}
@media(max-height:690px){.waiting,.invite{padding-top:32px}.experience{margin-top:24px}.theater-heading h1{font-size:34px}.theater-heading{margin-bottom:3px}.stage-shell{min-height:210px;margin-top:3px}.dialogue{min-height:100px;padding:8px}.player{margin-top:8px}.waiting-door{height:170px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}#blackout{transition:none!important}}
/* Correções após inspeção das capturas reais. */
.stage-shell{flex-direction:column;justify-content:flex-end;align-items:stretch}.sentence{position:relative;order:-1;left:auto;right:auto;top:auto;width:88%;margin:0 auto 14px}.outside{width:100%;left:0}body[data-act='4'] .stage-shell{padding-top:16px}.stage-shell #stage{width:100%}body[data-act='6'] .stage-shell{margin-bottom:125px}
#cities rect{filter:drop-shadow(0 0 5px #f8cd78)}#cities>g{filter:drop-shadow(3px 4px 1px #190d24)}#stage-shell[data-reaction='3'] #book{filter:drop-shadow(0 0 16px #f2d59b)}
body[data-act='6'] .player .sound-controls,body[data-act='6'] .player>.tiny{display:none}body[data-completed=true] .theater-heading,body[data-completed=true] .caption,body[data-completed=true] .dialogue,body[data-completed=true] .player{display:none}body[data-completed=true] .stage-shell{display:none}body[data-completed=true] .experience{margin-top:25px}body[data-completed=true] .ending{margin-top:0;padding-top:35px}.experience{margin-top:40px}@media(max-height:690px){.experience{margin-top:24px}}
.player,.global-sound{opacity:calc(1 - var(--blackout,0)*.88)}
/* Evita o hover legado persistente em navegadores touch. */
button.primary:hover,button.primary:focus{background:linear-gradient(110deg,#bb8d4f,#f0d7a0 50%,#cda26a);color:#2c1822}
