*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#172927;color:#1b2926;font-family:Arial,Helvetica,sans-serif}button,input{font:inherit}button{cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent}button:disabled{cursor:not-allowed;opacity:.48}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,[tabindex]:focus-visible{outline:3px solid #ee8656;outline-offset:4px}[hidden]{display:none!important}a{color:inherit;text-decoration:none}.comic-book{height:var(--app-height,100dvh);min-height:540px;position:relative;overflow:hidden;background:radial-gradient(ellipse at 70% 65%,#54766f,#243d37 60%,#182c27)}.scene-canvas,.scene-fallback{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 60%;z-index:1}.scene-fallback{z-index:0;opacity:.9}.scene-canvas canvas{width:100%;height:100%;display:block;touch-action:none}.comic-texture{position:absolute;inset:0;z-index:2;pointer-events:none;opacity:.18;background-image:radial-gradient(#13231c 1px,transparent 1.2px);background-size:5px 5px;mask-image:linear-gradient(#000,transparent 45%,transparent 80%,#000)}.panel-frame{position:absolute;inset:11px;border:3px solid #131f1b;box-shadow:0 0 0 11px #e8e2ca,inset 0 0 85px #101d1955;z-index:7;pointer-events:none}.comic-header{position:absolute;top:26px;left:33px;right:30px;display:flex;align-items:center;gap:24px;z-index:8;pointer-events:none}.comic-header>*{pointer-events:auto}.brand{font-weight:950;font-size:36px;letter-spacing:-2px;color:#f2edda;text-shadow:2px 2px 0 #132a22;line-height:.9;transform:rotate(-3deg)}.brand span{display:block;font:7px monospace;letter-spacing:1.6px;margin-top:8px;color:#d8e7d4;text-shadow:none}.hud{display:flex;gap:8px;align-items:center;margin-left:auto}.hud>span{font-size:10px;padding:9px 12px;border:2px solid #172820;border-radius:5px;background:#e6ead8;box-shadow:2px 2px 0 #14271b;color:#293c2d;white-space:nowrap}.hud b{font-size:16px}.hud .hud-heart{background:#e4a576}.hud .hud-water{background:#98c6b2}.round-button{width:44px;height:44px;border:2px solid #18291f;border-radius:50%;background:#f0ecd9;box-shadow:3px 3px 0 #18291f;font-size:20px;flex-shrink:0}.chapter{position:absolute;right:36px;top:108px;z-index:5;color:#e9ebd6;text-align:right;text-shadow:1px 2px 3px #123a25}.chapter>span{font:9px monospace;letter-spacing:2px;display:block}.chapter>strong{font-size:23px;display:block;margin:7px 0 10px;letter-spacing:-.7px}.chapter>i{display:flex;gap:3px;width:165px}.chapter b{height:3px;flex:1;background:#dbe7cc33}.chapter b.filled{background:#e9f0d0}.chapter b:nth-child(4n){margin-right:4px}.comic-overlay{position:absolute;inset:0;z-index:5;pointer-events:none}.comic-overlay>section,.comic-overlay button{pointer-events:auto}.caption{display:inline-block;background:#edb26e;border:2px solid #1b2a21;padding:8px 11px;font-size:9px;font-weight:800;letter-spacing:1.4px;box-shadow:3px 3px 0 #1b2a21;transform:rotate(-1deg)}.opening-panel{position:absolute;left:6%;top:16%;width:370px}.opening-panel h1{font-size:83px;font-weight:950;line-height:.85;letter-spacing:-5px;margin:27px 0 20px;color:#f2edd8;text-shadow:4px 5px 0 #193126;transform:rotate(-3deg)}.opening-panel h1>span{color:#ebaa71}.opening-lead{font-size:22px;line-height:1.2;color:#f3efd9;font-weight:700;letter-spacing:-.5px;text-shadow:1px 2px 0 #1a3327}.opening-copy{color:#d9e4d1;font-size:12px;line-height:1.65;max-width:300px;text-shadow:1px 1px #183225}.roads{border:0;margin:20px 0 15px;padding:0}.roads legend{font-size:10px;color:#e9ecd9;font-weight:700;margin-bottom:10px}.roads>div{display:flex;gap:7px}.roads label{position:relative;display:flex;flex-direction:column;gap:7px;flex:1;border:2px solid #1c3022;background:#d9e4cf;padding:10px;border-radius:8px;box-shadow:2px 2px 0 #193126;cursor:pointer}.roads label:has(:checked){background:#eeb783;transform:translateY(-4px)}.roads input{position:absolute;right:8px;top:10px;width:11px;height:11px;accent-color:#243d2b}.roads label>span{font-size:9px;padding-right:10px}.roads label>b{font-size:22px}.ink-button{min-height:46px;border:2px solid #17291e;box-shadow:4px 4px 0 #17291e;border-radius:8px 4px 9px 5px;background:#eab17a;padding:12px 17px;font-size:12px;font-weight:800;display:inline-flex;justify-content:space-between;align-items:center;gap:18px;transition:transform .15s,box-shadow .15s}.ink-button:hover:not(:disabled){transform:translate(-1px,-2px);box-shadow:5px 6px 0 #17291e}.ink-button:active:not(:disabled){transform:translate(2px,2px);box-shadow:1px 1px 0 #17291e}.ink-button b{font-size:21px}.start-button{width:100%;font-size:12px;min-height:53px}.opening-note{display:block;color:#b3c8b5;font-size:8px;margin-top:15px}.cover-sticker{position:absolute;right:14%;bottom:12%;padding:16px;background:#eab17a;color:#26392b;border:3px solid #203223;transform:rotate(9deg);font-weight:950;letter-spacing:-1px;font-size:23px;line-height:.95;box-shadow:5px 5px #203223}.scene-tools{position:absolute;bottom:55px;left:36px;display:flex;gap:10px;z-index:8}.tool-button{background:#213d30aa;border:1px solid #e4ebd447;min-height:44px;padding:10px 13px;font-size:10px;color:#e5ecdb;border-radius:6px;backdrop-filter:blur(8px)}.scene-footer{position:absolute;bottom:26px;left:37px;right:35px;z-index:6;display:flex;justify-content:space-between;font:8px monospace;letter-spacing:1.4px;color:#dae8d1;pointer-events:none}.scene-status{position:absolute;bottom:68px;right:36px;z-index:6;font-size:9px;color:#d4e6cd;max-width:220px;text-align:right;text-shadow:1px 2px 3px #15301d}.scene-status.ready{color:#aac5a8}.speech-tails{position:absolute;inset:0;z-index:4;pointer-events:none;width:100%;height:100%;overflow:visible}.speech-panel,.confirm-cloud,.thought-deck{position:absolute;left:6%;top:17%;width:420px}.speech-panel,.confirm-cloud{border:3px solid #192525;border-radius:34px 37px 30px 35px;background:#f4f0da;box-shadow:7px 8px 0 #17261eb3;padding:26px 27px 19px;transform:rotate(-.7deg)}.speaker-tag{display:inline-block;background:#efb779;border:2px solid #223021;padding:7px 12px;font-size:10px;letter-spacing:.1px;font-weight:800;border-radius:6px;box-shadow:2px 2px 0 #223021;position:relative;margin-top:-42px;vertical-align:top;transform:rotate(-2deg)}.owner-speech .speaker-tag{background:#a2c7b0}.speech-copy{max-height:31vh;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#819c78 transparent;padding-right:4px}.speech-copy p{font-size:19px;font-weight:600;line-height:1.45;letter-spacing:-.45px;margin:15px 0 16px;white-space:pre-wrap;overflow-wrap:anywhere}.speech-copy small{display:block;font-size:10px;color:#697d60;margin:8px 0}.speech-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:11px}.speech-bottom>span{font-size:9px;color:#6b7c61}.compact{padding:9px 14px;font-size:11px;min-height:44px;white-space:nowrap}.beat-caption{position:absolute;bottom:115px;right:40px;transform:rotate(-4deg);max-width:290px;text-align:right}.beat-caption>span{background:#f0dcad;display:block;padding:10px 14px;border:2px solid #1b2d20;box-shadow:4px 4px 0 #1b2d20;font-size:15px;font-weight:900;letter-spacing:-.5px}.beat-caption small{display:inline-block;font:9px monospace;color:#cde0c4;padding:8px;background:#1a342b}.narrator-speech{border-radius:3px;transform:rotate(-1deg);background:#e5d8b3}.narrator-speech .speaker-tag{background:#e5d8b3}.thought-heading h2{font-size:27px;line-height:1.05;letter-spacing:-1px;color:#f0edd8;text-shadow:2px 3px #1b3929;margin:14px 0 17px;transform:rotate(-2deg)}.thought-heading h2 small{font:12px monospace;color:#d6e2c7}.thought-heading .speaker-tag{margin-top:0;background:#f4f0da}.thought-clouds{display:flex;flex-direction:column;gap:11px}.thought-cloud{position:relative;border:3px solid #192525;background:#f4f0da;border-radius:30px 36px 28px 38px;box-shadow:5px 5px 0 #162f2499;text-align:left;padding:16px 23px 13px 43px;min-height:84px;transition:transform .15s,background .15s;max-width:100%}.thought-cloud:nth-child(2){margin-left:22px;transform:rotate(1.2deg)}.thought-cloud:nth-child(3){margin-right:10px;transform:rotate(-1deg)}.thought-cloud:hover:not(:disabled){background:#fffbe9;transform:translateX(6px)}.thought-number{position:absolute;left:14px;top:16px;font-weight:900;font-size:16px;color:#9baa81;font-style:italic}.thought-words{display:block;font-size:14px;line-height:1.38;font-weight:650;letter-spacing:-.1px;overflow-wrap:anywhere}.thought-cost{display:flex;justify-content:space-between;align-items:center;gap:5px;font-size:8px;color:#6b7f61;margin-top:8px}.thought-cost b{font-size:14px;color:#314d31}.thought-tools{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:10px}.thought-tools>span{font-size:8px;line-height:1.4;color:#cbddc7;max-width:150px;text-shadow:1px 1px #1a3121}.pencil-button{min-height:44px;border:0;background:transparent;color:#284330;font-size:12px;font-weight:750;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;padding:10px 4px}.thought-tools .pencil-button{color:#eef1d9;text-shadow:1px 1px #243b28;white-space:nowrap}.your-turn-stamp{position:absolute;right:10%;top:25%;transform:rotate(11deg);font-style:italic;font-size:44px;font-weight:950;line-height:.85;letter-spacing:-2px;color:#efb26e;text-shadow:3px 4px #1a3323;pointer-events:none}.all-thoughts{top:15%;width:470px}.all-thoughts .thought-clouds{max-height:57vh;overflow-y:auto;padding:2px 9px 12px 2px;scrollbar-width:thin;scrollbar-color:#cfdaad #19382a}.all-thoughts .thought-cloud{margin:0;transform:none}.all-thoughts .thought-words{font-size:12px}.confirm-cloud{width:500px;top:18%;padding:27px 29px 23px}.full-quote{max-height:44vh;overflow:auto;scrollbar-width:thin;scrollbar-color:#849b70 transparent}.full-quote p{font-size:23px;line-height:1.4;font-weight:650;letter-spacing:-.7px;margin:17px 0;white-space:pre-wrap;overflow-wrap:anywhere}.confirm-meta{font-size:10px;color:#6c7b60;margin:15px 0}.confirm-actions{display:flex;gap:21px;align-items:center}.confirm-actions .ink-button{min-width:130px}.old-screens blockquote{background:#e2dfc8;border:1px solid #b1b295;margin:10px 0;padding:10px;font-size:12px}.ending-panel{position:absolute;top:14%;left:6%;width:470px;background:#f0ebd3;border:3px solid #24301f;box-shadow:8px 9px #182c22b8;padding:24px 27px;max-height:77vh;overflow-y:auto;scrollbar-width:thin;transform:rotate(-.5deg)}.ending-panel h1{font-size:47px;line-height:.95;letter-spacing:-2px;margin:25px 0 18px;font-weight:950}.ending-panel h1>span{color:#b36c3f}.ending-panel blockquote{margin:15px 0;font-size:14px;font-style:italic;line-height:1.5}.ending-panel cite{display:block;font-size:9px;font-style:normal;color:#7c896d;margin-top:9px}.ending-table{overflow-x:auto}.ending-table table{width:100%;border-collapse:collapse;font-size:11px}.ending-table th,.ending-table td{padding:10px 5px;border-bottom:1px solid #a8b59b;text-align:left}.ending-table th{font-size:9px;color:#7a886b;font-weight:500}.owner-verdict{padding:12px 0;border-bottom:2px solid #adbc98;font-weight:800;font-size:12px}.owner-verdict span{display:block;font-size:10px;color:#71815f;font-weight:400;margin-left:15px;margin-top:4px}.ending-note{font-size:9px;line-height:1.5;color:#728263;display:block}.ending-actions{display:flex;align-items:center;gap:17px;margin:18px 0}.recovery{background:#efd4b0;border:2px solid #5b633e;padding:13px;font-size:11px;margin:15px 0}.recovery button{display:block;margin-top:10px}.notice{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);z-index:30;max-width:calc(100% - 40px);width:max-content;background:#f3e3bc;border:2px solid #273523;box-shadow:4px 4px #172820;padding:12px 17px;font-size:12px;border-radius:9px}.empty,.muted{color:#738360}dialog{color:#253526;background:#f1ecd7;border:3px solid #263221;box-shadow:9px 9px 0 #15271c;border-radius:5px;max-width:620px;width:calc(100% - 38px);max-height:85dvh;padding:32px;overflow:auto;scrollbar-width:thin}dialog::backdrop{background:#11251ecc;backdrop-filter:blur(5px)}.dialog-close{position:absolute;right:12px;top:12px;box-shadow:none}.dialog-close+ .caption{margin-top:20px}dialog h2{font-size:36px;letter-spacing:-1.5px;margin:20px 0}dialog h3{font-size:17px;letter-spacing:-.4px}#journal-body{font-size:12px;line-height:1.55}#journal-body section{border-top:1px solid #afbba0;padding:13px 0}summary{cursor:pointer;min-height:44px;padding:12px 0;font-weight:600}.journal-list{list-style:none;padding:0;margin:0}.journal-list li{border-bottom:1px solid #c1c8ae;padding:11px 0}.journal-list small{display:block;font-size:9px;color:#778767;margin-top:6px}.journal-list p{white-space:pre-wrap;overflow-wrap:anywhere}.counter-list{margin:0}.counter-list>div{display:flex;justify-content:space-between;border-bottom:1px solid #bdc8af;padding:9px 0}.counter-list dd{font-weight:800}.danger{background:#dda27b}.secondary{background:#e8ddbc}#app[data-mode=welcome] .chapter,#app[data-mode=welcome] #skip-beats{display:none}
@media(min-width:1450px){.opening-panel{left:8%;top:18%;width:400px}.opening-panel h1{font-size:98px}.speech-panel,.thought-deck,.confirm-cloud{left:8%;top:19%}.speech-panel{width:460px}.thought-deck{width:450px}.speech-copy p{font-size:22px}.thought-words{font-size:16px}.thought-cloud{min-height:95px}.scene-tools{left:4%}}
@media(max-width:950px){.speech-panel,.thought-deck{left:5%;width:370px;top:18%}.confirm-cloud{left:5%;width:430px}.opening-panel{left:5%;width:325px;top:17%}.opening-panel h1{font-size:72px}.opening-copy{font-size:11px}.your-turn-stamp{right:8%;font-size:36px}.scene-status{max-width:170px}.hud{gap:4px}.hud>span{padding:7px 8px}.ending-panel{width:410px}}
@media(max-width:600px){.comic-book{min-height:560px}.panel-frame{inset:6px;border-width:2px;box-shadow:0 0 0 6px #e8e2ca,inset 0 0 50px #101d1944}.comic-header{top:max(19px,env(safe-area-inset-top));left:20px;right:18px;gap:10px;align-items:flex-start}.brand{font-size:28px;letter-spacing:-1.7px}.brand span{font-size:5px;letter-spacing:1px;margin-top:6px}.round-button{width:42px;height:42px;font-size:18px}.hud{gap:3px;flex-wrap:wrap;max-width:190px;justify-content:flex-end}.hud>span{padding:5px 7px;font-size:8px;border-width:1px;box-shadow:1px 1px #14271b;border-radius:4px}.hud b{font-size:11px}.hud-grudge{order:3}.chapter{top:77px;right:21px;display:flex;align-items:baseline;gap:9px}.chapter>span{font-size:7px;letter-spacing:.5px}.chapter>strong{font-size:12px;letter-spacing:-.2px;margin:0}.chapter>i{display:none}.opening-panel{top:105px;left:23px;width:calc(100% - 46px);max-width:350px}.caption{font-size:7px;letter-spacing:1px;padding:6px 8px;box-shadow:2px 2px #1b2a21}.opening-panel h1{font-size:63px;letter-spacing:-4px;margin:20px 0 15px;line-height:.88}.opening-panel h1 br{display:none}.opening-lead{font-size:18px;line-height:1.1;margin:14px 0 10px;max-width:210px}.opening-lead br{display:none}.opening-copy{font-size:10px;max-width:230px;line-height:1.55;margin:0 0 15px}.roads{margin:15px 0 12px;max-width:315px}.roads legend{font-size:9px;margin-bottom:9px}.roads label{padding:9px 8px;gap:4px;border-radius:6px}.roads input{width:10px;height:10px;right:6px;top:9px}.roads label>span{font-size:8px}.roads label>b{font-size:20px}.start-button{font-size:10px;min-height:46px;padding:10px 12px;max-width:315px}.opening-note{font-size:7px;margin-top:10px;max-width:250px}.cover-sticker{display:none}.scene-tools{bottom:45px;left:19px;gap:6px}.tool-button{font-size:8px;min-height:42px;padding:9px 10px;background:#173b2ac9}.scene-footer{left:20px;right:20px;bottom:20px;font-size:6px;letter-spacing:.5px}.scene-status{right:20px;bottom:96px;font-size:7px;max-width:125px}.speech-panel,.thought-deck,.confirm-cloud{top:123px;left:21px;width:calc(100% - 42px)}.speech-panel{padding:21px 19px 15px;border-width:2px;border-radius:28px 30px 27px 31px;box-shadow:5px 6px #17261ea1}.speaker-tag{font-size:9px;padding:6px 9px;margin-top:-36px;box-shadow:2px 2px #223021}.speech-copy{max-height:23vh;padding-right:1px}.speech-copy p{font-size:16px;line-height:1.4;letter-spacing:-.3px;margin:12px 0}.speech-copy small{font-size:8px}.speech-bottom{margin-top:7px;gap:8px}.speech-bottom>span{font-size:7px;max-width:100px}.compact{padding:8px 12px;font-size:10px;min-height:42px}.beat-caption{right:24px;bottom:138px;max-width:190px}.beat-caption>span{font-size:10px;padding:7px 9px}.beat-caption small{font-size:7px;padding:5px}.thought-deck{top:110px}.thought-heading .speaker-tag{font-size:8px;padding:5px 8px}.thought-heading h2{font-size:22px;margin:10px 0 13px}.thought-clouds{gap:9px}.thought-cloud{border-width:2px;border-radius:23px 29px 24px 31px;padding:11px 16px 9px 34px;min-height:70px;box-shadow:3px 4px #162f2499}.thought-cloud:nth-child(2){margin-left:17px}.thought-cloud:nth-child(3){margin-right:9px}.thought-number{font-size:12px;left:12px;top:13px}.thought-words{font-size:11px;line-height:1.35;letter-spacing:0}.thought-cost{font-size:7px;margin-top:5px}.thought-cost b{font-size:11px}.thought-tools{margin-top:5px;gap:8px}.thought-tools .pencil-button{font-size:10px;min-height:42px}.thought-tools>span{font-size:7px;max-width:120px}.your-turn-stamp{font-size:27px;right:24px;top:auto;bottom:153px;letter-spacing:-1px}.all-thoughts{top:111px}.all-thoughts .thought-clouds{max-height:48vh;padding-right:6px}.all-thoughts .thought-words{font-size:11px}.confirm-cloud{top:130px;border-width:2px;padding:21px 20px 18px}.full-quote{max-height:32vh}.full-quote p{font-size:19px;line-height:1.4;letter-spacing:-.45px;margin:12px 0}.confirm-meta{font-size:9px;margin:11px 0}.confirm-actions{gap:20px}.confirm-actions .ink-button{font-size:11px;min-width:115px;padding:9px 13px;min-height:44px}.confirm-actions .pencil-button{font-size:11px}.ending-panel{top:114px;left:21px;width:calc(100% - 42px);max-height:65vh;padding:19px;border-width:2px;box-shadow:5px 5px #182c22b8}.ending-panel h1{font-size:35px;letter-spacing:-1.5px;margin:20px 0 14px}.ending-panel blockquote{font-size:12px}.ending-panel cite{font-size:8px}.ending-table table{font-size:9px}.ending-table th{font-size:7px}.ending-table th,.ending-table td{padding:9px 3px}.owner-verdict{font-size:10px}.owner-verdict span{font-size:8px}.ending-note{font-size:8px}.ending-actions{gap:12px;margin:14px 0}.ending-actions .ink-button{font-size:10px;padding:10px 12px}.ending-actions .pencil-button{font-size:10px}dialog{padding:24px 20px;max-height:86dvh}dialog h2{font-size:29px}.dialog-close{top:8px;right:8px}.notice{font-size:11px;bottom:25px}.recovery{font-size:9px;padding:10px}}
@media(max-width:380px){.hud{max-width:163px}.hud>span{padding:5px;font-size:7px}.brand{font-size:25px}.brand span{font-size:4px}.thought-words{font-size:10px}.thought-cloud{min-height:68px}.opening-panel h1{font-size:56px}.speech-copy p{font-size:15px}.scene-footer{font-size:5.5px}.scene-status{font-size:6px;max-width:110px}.thought-tools>span{max-width:100px}}
@media(max-height:700px) and (max-width:600px){.opening-panel{top:89px}.opening-panel h1{font-size:48px;margin:14px 0}.opening-copy{font-size:9px;max-width:260px}.opening-lead{font-size:15px;margin:9px 0}.roads{margin-top:11px}.speech-panel{top:112px}.thought-deck{top:106px}.thought-cloud{min-height:60px;padding-top:9px;padding-bottom:7px}.thought-words{font-size:10px}.thought-cost{margin-top:3px}.thought-clouds{gap:7px}.thought-heading h2{font-size:20px;margin:8px 0 10px}.your-turn-stamp{font-size:24px;bottom:125px}.scene-status{bottom:91px}.beat-caption{bottom:119px}.confirm-cloud{top:119px}.full-quote{max-height:31vh}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
button,.round-button,.tool-button,.compact,.thought-tools .pencil-button{min-height:44px}.round-button{min-width:44px}@media(max-width:600px){.hud{max-width:188px}.hud>span{padding:4px 6px}.hud-position{order:4}.comic-header{gap:7px}.hud b{font-size:11px}.round-button{width:44px;height:44px}.scene-status{bottom:96px}}
.ending-scene-toggle{display:block;margin:5px 0 8px;min-height:44px}.ending-scene-label{position:absolute;top:17%;left:6%;max-width:430px}.ending-scene-label h2{font-size:39px;line-height:1;letter-spacing:-1.5px;color:#f1edd7;text-shadow:2px 3px #183022;margin:22px 0 17px}.ending-scene-label>div{display:flex;align-items:center;gap:20px}.ending-scene-label .pencil-button{color:#ecedd5;text-shadow:1px 1px #193426}@media(max-width:600px){.ending-scene-label{top:118px;left:23px;right:23px}.ending-scene-label h2{font-size:29px;margin:18px 0 13px}.ending-scene-label>div{gap:17px}.ending-scene-label .pencil-button{font-size:10px}.ending-scene-label .ink-button{font-size:11px;padding:10px 18px}}
.stagnation-caption{display:block;font-size:10px;font-weight:500;font-style:normal;letter-spacing:0;color:#d3ddc8;line-height:1.4;margin-top:10px;max-width:200px;margin-left:auto;text-shadow:1px 1px 3px #1b3125}.speech-copy:focus-visible,.full-quote:focus-visible{outline-offset:2px}.thought-cloud.unavailable .thought-words{color:#66765d}@media(max-width:600px){.stagnation-caption{font-size:7px;line-height:1.2;flex-basis:100%;max-width:none;margin-top:0}.chapter{flex-wrap:wrap;justify-content:flex-end;gap:4px 9px;max-width:calc(100% - 42px)}.chapter>strong{max-width:190px}}
/* Small landscape keeps every control reachable while preserving the scene. */
@media(max-height:540px) and (orientation:landscape){.comic-book{min-height:0;height:var(--app-height,100dvh)}.comic-header{top:14px;left:22px;right:20px}.brand{font-size:26px}.brand span{font-size:5px}.chapter{top:72px;right:25px}.chapter>strong{font-size:16px}.chapter>span{font-size:7px}.chapter>i{display:none}.stagnation-caption{font-size:8px;max-width:160px}.opening-panel{top:82px;left:4%;width:330px;max-height:calc(var(--app-height,100dvh) - 140px);overflow-y:auto;padding:0 8px 12px 0;scrollbar-width:thin}.opening-panel h1{font-size:49px;margin:15px 0;line-height:.95}.opening-panel h1 br{display:none}.opening-lead{font-size:16px;margin:10px 0}.opening-copy{font-size:10px;max-width:280px}.roads{margin:12px 0}.opening-note{font-size:7px}.speech-panel,.confirm-cloud{top:94px;left:4%;width:42%;max-width:430px;padding:19px 19px 12px}.speech-copy{max-height:calc(var(--app-height,100dvh) - 240px)}.speech-copy p{font-size:15px;margin:10px 0}.speech-bottom{margin-top:5px}.speech-bottom>span{font-size:7px}.speaker-tag{font-size:8px;margin-top:-33px}.thought-deck{top:81px;left:4%;width:41%;max-width:430px}.thought-heading .speaker-tag{margin-top:0}.thought-heading h2{font-size:21px;margin:9px 0 10px}.thought-clouds{max-height:calc(var(--app-height,100dvh) - 229px);min-height:75px;overflow-y:auto;padding:2px 8px 8px 2px;gap:8px;scrollbar-width:thin}.thought-cloud{min-height:67px;padding:10px 14px 9px 34px;border-width:2px}.thought-words,.all-thoughts .thought-words{font-size:11px}.thought-number{font-size:12px;left:11px;top:11px}.thought-cost{font-size:7px;margin-top:5px}.thought-tools{margin-top:4px}.thought-tools .pencil-button{font-size:10px}.thought-tools>span{font-size:7px}.all-thoughts .thought-clouds{max-height:calc(var(--app-height,100dvh) - 229px)}.your-turn-stamp{font-size:27px;top:auto;bottom:86px;right:7%}.scene-tools{bottom:32px;left:24px}.scene-footer{bottom:14px;left:24px;right:24px;font-size:6px}.scene-status{bottom:39px;font-size:8px;right:24px;max-width:180px}.beat-caption{bottom:91px;right:27px;max-width:225px}.beat-caption>span{font-size:11px;padding:7px 10px}.beat-caption small{font-size:7px}.full-quote{max-height:calc(var(--app-height,100dvh) - 260px)}.full-quote p{font-size:18px}.confirm-meta{font-size:9px;margin:9px 0}.confirm-actions{gap:16px}.ending-panel{top:82px;left:4%;width:43%;max-height:calc(var(--app-height,100dvh) - 141px);padding:20px;overflow-y:auto}.ending-panel h1{font-size:31px;margin:18px 0 12px}.ending-scene-label{top:92px;left:5%;max-width:43%}.ending-scene-label h2{font-size:29px}.cover-sticker{display:none}.ink-button{font-size:11px}.panel-frame{inset:6px;border-width:2px;box-shadow:0 0 0 6px #e8e2ca}dialog{max-height:calc(var(--app-height,100dvh) - 30px)}}

.comic-book{min-height:0}
#app[data-inspection=owner] .beat-caption,#app[data-inspection=owner] .your-turn-stamp{visibility:hidden}

/* Keep income separate from the game's changing market index. */
.salary-banner {
 position:absolute;z-index:8;top:82px;left:36px;
 display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 10px;
 max-width:calc(100% - 72px);padding:8px 12px;
 border:1px solid #dce6cb66;border-radius:7px;
 background:#18382eee;color:#f5efdb;pointer-events:none;
}
.salary-banner>span {font-size:11px}
.salary-banner>strong {font-size:16px;white-space:nowrap}
.salary-banner>small {font-size:10px;white-space:nowrap}
.salary-note {font-size:12px;line-height:1.5}
.camera-actors {display:flex;flex-wrap:wrap;gap:10px}
.camera-directions {display:flex;gap:10px;margin-top:22px}
.camera-directions button {min-width:48px;background:#244837;font-size:20px}
.camera-key-help {font-size:12px;line-height:1.6}
.scene-canvas canvas {touch-action:pan-y}
.scene-tools {max-width:calc(100% - 50px);flex-wrap:wrap}
.scene-status {max-width:190px}

/* Every panel gets a bounded scroll area, including short desktop windows.
 * The scene and its tools keep their own space outside that scroll area. */
.comic-book {--panel-top:154px;--panel-bottom:113px;--salary-base-top:82px;--chapter-base-top:108px}
.opening-panel,.speech-panel,.thought-deck,.confirm-cloud,.ending-panel {
 top:max(var(--panel-top),var(--content-safe-top,0px));
 max-height:calc(var(--app-height,100dvh) - max(var(--panel-top),var(--content-safe-top,0px)) - max(var(--panel-bottom),var(--content-safe-bottom,0px)));
}
.opening-panel,.ending-panel {overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:12px;padding-bottom:14px}
.opening-panel {width:min(400px,calc(100% - 48px))}
.opening-panel h1 {margin-top:18px}
.speech-panel,.confirm-cloud,.thought-deck {display:flex;flex-direction:column}
.speech-copy,.full-quote {min-height:0;overflow-y:auto;overscroll-behavior:contain}
.speech-bottom,.confirm-actions,.thought-tools {flex-shrink:0}
.thought-heading {flex-shrink:0}
.thought-clouds,.all-thoughts .thought-clouds {
 min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;
 padding:4px 10px 12px 2px;scrollbar-width:thin;
}
.thought-cloud {flex-shrink:0}
.ending-scene-label {top:max(var(--panel-top),var(--content-safe-top,0px))}
@media(max-width:600px) {
 .comic-book {--panel-top:156px;--panel-bottom:111px;--salary-base-top:77px;--chapter-base-top:123px}
 .salary-banner {top:77px;left:20px;max-width:calc(100% - 40px);padding:6px 9px;gap:2px 8px}
 .salary-banner>span {font-size:10px}
 .salary-banner>strong {font-size:14px}
 .salary-banner>small {font-size:9px}
 .chapter {top:123px}
 .opening-panel {left:23px;width:calc(100% - 46px)}
 .scene-status {bottom:97px;max-width:160px}
 .scene-tools {gap:5px;max-width:calc(100% - 38px)}
 .tool-button {padding:8px;font-size:9px}
 .thought-tools {flex-wrap:wrap;gap:0 8px}
 .thought-tools>span {max-width:160px}
 .ending-actions {flex-wrap:wrap}
}
@media(max-height:540px) and (orientation:landscape) {
 .comic-book {--panel-top:119px;--panel-bottom:88px;--salary-base-top:66px;--chapter-base-top:78px}
 .salary-banner {top:66px;left:24px;max-width:calc(55% - 34px);padding:5px 8px;gap:2px 7px}
 .salary-banner>span {font-size:9px}
 .salary-banner>strong {font-size:13px}
 .salary-banner>small {font-size:9px}
 .chapter {top:78px}
 .opening-panel {width:43%}
 .speech-copy,.full-quote {max-height:none}
 .thought-heading h2 {font-size:19px;margin:7px 0}
 .thought-clouds,.all-thoughts .thought-clouds {min-height:0;max-height:none}
 .scene-tools {bottom:28px}
 .scene-status {bottom:36px}
}
.speech-panel>.speaker-tag,.confirm-cloud>.speaker-tag {align-self:flex-start;flex-shrink:0}

/* Runtime reserves space from actual text dimensions when type grows or wraps. */
.salary-banner {top:var(--salary-top,var(--salary-base-top))}
.chapter {top:var(--chapter-top,var(--chapter-base-top))}
.comic-overlay>section {z-index:1}
.your-turn-stamp {z-index:0}

/* Telegram supplies a stable content viewport; ordinary browsers use 100dvh. */
html[data-telegram] .comic-book {
 min-height:0;
 margin-top:var(--telegram-inset-top,0px);margin-left:var(--telegram-inset-left,0px);
 width:calc(100% - var(--telegram-inset-left,0px) - var(--telegram-inset-right,0px));
}
html[data-telegram] dialog {
 top:var(--telegram-inset-top,0px);
 bottom:calc(100dvh - var(--telegram-height,100dvh) + var(--telegram-inset-bottom,0px));
 left:var(--telegram-inset-left,0px);right:var(--telegram-inset-right,0px);
 max-width:calc(100% - var(--telegram-inset-left,0px) - var(--telegram-inset-right,0px) - 24px);
 max-height:calc(var(--app-height,100dvh) - 24px);
}
html[data-telegram] .notice {bottom:calc(var(--telegram-inset-bottom,0px) + 30px)}
@media(max-width:600px){html[data-telegram] .comic-header{top:19px}}
