*{box-sizing:border-box}html,body{margin:0;background:#000;color:#fff;overflow:hidden;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}main{position:relative;max-width:980px;height:100dvh;margin:auto}canvas{width:100%;height:100%;display:block;touch-action:none;outline:0;image-rendering:pixelated}header{position:absolute;top:max(28px,env(safe-area-inset-top));left:28px;right:28px;display:flex;align-items:center;gap:18px;pointer-events:none}header b{font-size:15px;font-weight:400;letter-spacing:3px}header span{font-size:12px;letter-spacing:1px;color:#aaa}header small{margin-left:auto;font-size:12px;color:#aaa}footer{position:absolute;bottom:max(28px,env(safe-area-inset-bottom));left:0;width:100%;text-align:center;font-size:12px;color:#aaa;pointer-events:none}#loading{position:absolute;top:45%;width:100%;text-align:center;font-size:14px}#action{position:absolute;bottom:70px;left:50%;transform:translateX(-50%);background:#000;border:1px solid #999;color:#fff;padding:14px 20px;font:14px ui-monospace,monospace;min-height:48px;white-space:nowrap;cursor:pointer}#action:focus-visible{outline:2px solid white;outline-offset:4px}#speech{position:absolute;left:50%;top:72%;transform:translateX(-50%);max-width:90%;padding:12px 18px;border-left:1px solid #fff;background:#000;font-size:14px;line-height:1.5;text-align:center;pointer-events:none;white-space:pre-line}.touch{display:none}[hidden]{display:none!important}@media(max-width:600px){header{left:20px;right:20px;gap:8px;flex-wrap:wrap}header span{width:100%;order:3}header b{font-size:14px}.desktop{display:none}.touch{display:inline}}

#loading{inset:0;top:0;z-index:5;display:grid;place-items:center;background:#000;text-align:left;padding:28px}.boot-terminal{width:min(420px,100%)}.boot-terminal small{color:#888;font-size:12px;letter-spacing:2px}.boot-terminal pre{font:14px/1.9 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;min-height:108px;margin:24px 0}.boot-terminal span{font-size:12px;letter-spacing:1px}.boot-terminal i{font-style:normal;margin-left:10px;animation:cursor-blink .7s steps(1) infinite}@keyframes cursor-blink{50%{visibility:hidden}}@media(prefers-reduced-motion:reduce){.boot-terminal i{animation:none}}

#sound{position:absolute;right:24px;top:72px;min-height:44px;padding:8px 12px;border:1px solid #444;color:#aaa;background:#000;font:12px ui-monospace,monospace;cursor:pointer}#sound:focus-visible{outline:2px solid white}#sound:hover{color:#fff;border-color:#aaa}

@font-face{font-family:ColdBootPixel;src:url('fonts/cold-boot-pixel.ttf') format('truetype');font-display:swap}
#speech{top:auto;bottom:138px;width:min(640px,calc(100% - 36px));max-width:none;min-height:90px;padding:18px 20px 22px;text-align:left;border:2px solid #fff;box-shadow:4px 4px 0 #000,6px 6px 0 #fff;background:#000;font-family:ColdBootPixel,monospace;font-size:16px;line-height:24px;pointer-events:auto;cursor:pointer;image-rendering:pixelated}
#dialog-speaker{display:block;font-size:16px;line-height:16px;margin-bottom:14px;padding-bottom:10px;border-bottom:2px dotted #fff}#dialog-copy{display:block;min-height:48px}.dialog-cursor{position:absolute;right:12px;bottom:6px;font:12px monospace}#speech.typing .dialog-cursor{visibility:hidden}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#room-loading{position:absolute;inset:0;display:grid;place-items:center;z-index:4;font:16px/24px ColdBootPixel,monospace;color:#fff;pointer-events:none;text-align:center;padding:24px}#retry-room{position:absolute;z-index:4;left:50%;bottom:90px;transform:translateX(-50%);font:16px ColdBootPixel,monospace;color:#fff;background:#000;border:2px solid #fff;padding:16px;min-height:48px}
#haptics{position:absolute;right:24px;top:122px;min-height:40px;padding:8px 12px;border:1px solid #444;color:#aaa;background:#000;font:12px ui-monospace,monospace;cursor:pointer}#haptics:focus-visible{outline:2px solid #fff}#action{font-family:ColdBootPixel,monospace;font-size:16px;border-width:2px}
@media(max-width:600px){#speech{bottom:132px;padding:14px 12px 20px;font-size:16px;line-height:24px}#dialog-speaker{margin-bottom:10px}#haptics{right:20px;top:120px}}

/* Compact tty dialogue and the field terminal share the same quiet frame. */
#speech{width:min(510px,calc(100% - 32px));min-height:0;bottom:128px;padding:10px 14px 14px;border:1px solid #777;box-shadow:none;font:13px/18px ui-monospace,SFMono-Regular,Consolas,monospace;text-align:left;background:rgba(0,0,0,.96)}#dialog-speaker{font:11px/15px ui-monospace,monospace;border:0;padding:0;margin:0 0 6px;color:#aaa}#dialog-speaker:before{content:'guest@';color:#777}#dialog-speaker:after{content:':~$';color:#777}#dialog-copy{min-height:0;white-space:pre-line}.dialog-cursor{font-size:10px;bottom:5px;right:8px}#action{font:13px ui-monospace,monospace;padding:10px 14px;border-width:1px;min-height:44px}
#field-open{position:absolute;left:24px;top:82px;background:#000;color:#ccc;border:1px solid #555;min-height:40px;padding:8px 12px;font:12px ui-monospace,monospace;cursor:pointer}#field-terminal{color:#eee;background:#080808;border:1px solid #999;width:min(660px,calc(100% - 24px));max-height:82dvh;padding:0;font:14px/1.5 ui-monospace,monospace;overflow:auto}#field-terminal::backdrop{background:rgba(0,0,0,.82)}.field-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #444}.field-head span{font-size:12px}.field-head button{font:24px monospace;padding:0 12px;min-height:36px;background:none;border:0;color:white}#field-terminal nav{display:flex;gap:0;border-bottom:1px solid #444}#field-terminal nav button{flex:1;font:13px ui-monospace,monospace;border:0;border-bottom:2px solid transparent;min-height:44px;color:#999;background:#080808;padding:10px 6px}#field-terminal nav button[aria-pressed=true]{color:#fff;border-bottom-color:#fff;background:#161616}.field-content{padding:18px;display:flex;align-items:flex-start;gap:20px}#field-portrait{width:110px;height:180px;object-fit:contain;image-rendering:pixelated;flex:none}#field-body{min-width:0;flex:1}.field-title{margin:0 0 12px;color:#fff}#field-body p{margin:6px 0 12px}#field-body dl{display:grid;grid-template-columns:105px 1fr;gap:8px;font-size:13px}#field-body dt{color:#888}#field-body dd{margin:0}#field-body article{padding:12px 0;border-bottom:1px dashed #444}#field-body h3{font-size:14px;margin:0 0 5px;font-weight:400;color:#fff}#field-body article p,.field-muted{font-size:12px;color:#aaa}#field-body button{background:#111;color:white;border:1px solid #888;padding:8px 14px;min-height:40px;font:13px monospace}#field-result{margin:0 18px 12px;color:#fff;font-size:13px}#field-save{display:block;border-top:1px solid #333;padding:10px 18px;color:#888;font-size:11px}#field-terminal button:focus-visible,#field-open:focus-visible{outline:2px solid #fff;outline-offset:-3px}
@media(max-width:600px){#speech{bottom:122px;font-size:12px;line-height:17px;padding:9px 11px 13px}#field-open{left:20px;top:82px}.field-content{gap:12px;padding:14px}#field-portrait{width:68px;height:130px}#field-body dl{display:block}#field-body dd{margin:0 0 7px}#field-terminal nav button{font-size:12px}}

/* V28 — monochrome RPG character window, equipment and item inspection. */
#field-terminal{width:min(860px,calc(100% - 24px));max-height:92dvh;background:#090909;border:2px solid #aaa;box-shadow:0 0 0 3px #080808,0 0 0 4px #444;font-size:14px}#field-terminal::backdrop{background:rgba(0,0,0,.75)}.field-head{background:#171717;padding:9px 16px;border-bottom:1px solid #777}.field-head span{font-size:14px;letter-spacing:1px}#field-terminal nav{background:#0d0d0d}#field-terminal nav button{font-size:14px;letter-spacing:.5px}#field-terminal nav button[aria-pressed=true]{background:#222}.field-content{display:block;padding:16px}#field-body{width:100%}#field-body .rpg-label{font:12px ui-monospace,monospace;letter-spacing:1.2px;margin:0 0 14px;color:#aaa}.rpg-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:18px 24px}.rpg-paper,.rpg-stats{min-height:310px}.paper-grid{display:grid;grid-template-columns:58px minmax(0,1fr) 58px;gap:9px;align-items:center}.gear-column{display:grid;gap:20px}.paper-figure{position:relative;min-width:0;display:flex;align-items:center;flex-direction:column;height:294px;background:radial-gradient(ellipse at 50% 76%,#252525 0,#0a0a0a 62%);border-bottom:1px solid #555}.rpg-hero{width:160px;height:240px;max-width:100%;object-fit:contain;image-rendering:pixelated;filter:grayscale(1) contrast(1.25)}.level-tag{position:absolute;top:0;left:0;font-size:12px;border:1px solid #666;background:#111;padding:3px 6px;color:#ddd}#field-body .paper-name{letter-spacing:5px;font-size:15px;margin:4px 0 3px}.paper-figure small{font-size:10px;color:#888;white-space:nowrap}.item-icon{width:100%;height:100%;display:block;background-image:url('art/items-v28.png');background-size:400% 300%;background-position:var(--icon-x) var(--icon-y);background-repeat:no-repeat;image-rendering:pixelated;filter:grayscale(1)}#field-body .item-slot{position:relative;border:1px solid #777;border-top-color:#999;border-left-color:#999;border-bottom-color:#333;border-right-color:#333;box-shadow:inset 0 0 0 2px #111;background:linear-gradient(135deg,#222,#090909);aspect-ratio:1;min-height:0;padding:3px;cursor:pointer;overflow:hidden}.gear-slot{width:58px;height:58px}.item-slot:hover{background:#333!important}.item-slot.selected{outline:2px solid #fff;outline-offset:1px}#field-body .item-slot:disabled{background:#0d0d0d;border-color:#333;cursor:default}.empty-slot{font:9px ui-monospace,monospace;color:#666;word-break:break-word}.equipped-mark{position:absolute;right:2px;bottom:1px;color:white;background:black;font-size:9px;padding:0 2px}.rpg-stats{border-left:1px solid #333;padding-left:22px}#field-body .rpg-stats dl{display:grid;grid-template-columns:1fr auto;gap:9px;margin:0 0 20px;font-size:14px}#field-body .rpg-stats dd{margin:0;text-align:right;color:#ddd}#field-body .rpg-stats dt{color:#999}.rpg-meter{display:flex;flex-wrap:wrap;justify-content:space-between;gap:9px;font-size:13px}.rpg-meter strong{font-weight:400}.meter-track{height:8px;background:#202020;width:100%;border:1px solid #666;padding:1px}.meter-track i{display:block;height:100%;background:#ddd}#field-body .rpg-passive{font-size:12px;line-height:1.6;color:#aaa;margin:14px 0 0}.bag-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:5px}.rpg-bag{border-top:1px solid #444;padding-top:14px}.item-details{border:1px solid #444;background:#0e0e0e;padding:12px;min-height:162px}#field-body .item-details .rpg-label{font-size:11px}#field-body .item-details p{font-size:12px;color:#bbb;line-height:1.5;margin:7px 0}.item-details small{font-size:11px;line-height:1.5;display:block;color:#888}.item-title{display:flex;gap:10px;align-items:center}.item-title .item-icon{flex:none;width:42px;height:42px}#field-body .item-title h3{font-size:14px;font-weight:400;line-height:1.5;margin:0}.item-bonus{display:block;font-size:12px;font-weight:400;margin-top:8px;color:#fff}#field-body .rpg-use{margin-top:8px;font:13px ui-monospace,monospace;border:1px solid #888;background:#242424;min-height:36px;padding:7px 14px}.item-flavour{font-style:italic;color:#888!important}.rpg-muted{color:#999!important}.journal-head{display:flex;justify-content:space-between;border-bottom:1px solid #444;margin-bottom:10px}.journal-head span{font-size:12px;color:#aaa}.journal-list{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}#field-body .journal-list article{padding:12px 0}#field-body .journal-list h3{font-size:14px}.bag-view .bag-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.bag-view .item-slot{max-height:80px}.bag-view .rpg-bag{border:0;padding:0}#field-result:empty{display:none}#field-result{font-size:12px}#field-save{font-size:10px;padding:8px 16px;background:#111}
@media(max-width:600px){#field-terminal{width:calc(100% - 16px);max-height:94dvh}.field-head{padding:6px 10px}.field-head span{font-size:12px;letter-spacing:0}.field-content{padding:12px}#field-terminal nav button{font-size:13px}.rpg-layout{grid-template-columns:1fr;gap:16px}.paper-grid{grid-template-columns:54px minmax(0,1fr) 54px;gap:8px}.gear-slot{width:54px;height:54px}.rpg-paper{min-height:0}.paper-figure{height:280px}.rpg-hero{height:228px}.rpg-stats{border-left:0;border-top:1px solid #333;padding:12px 0 0;min-height:0;order:3}.rpg-bag{order:1}.item-details{order:2;min-height:110px}.rpg-stats dl{grid-template-columns:1fr auto!important;font-size:13px!important;gap:7px!important;margin-bottom:14px!important}.rpg-passive{font-size:12px!important}.bag-grid{gap:4px}.journal-list{grid-template-columns:1fr}.bag-view .bag-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.field-head button{min-height:36px}}

.item-icon{background-image:none;overflow:hidden;padding:2px}.item-icon image{image-rendering:pixelated}
#field-terminal{scrollbar-color:#555 #111;scrollbar-width:thin}.field-head{position:sticky;top:0;z-index:3}#field-terminal nav{position:sticky;top:55px;z-index:2}#field-terminal nav button{background:#0d0d0d}@media(max-width:600px){#field-terminal nav{top:49px}.bag-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
/* Small tactile responses; motion stays monochrome and respects reduced motion. */
.rpg-hero-canvas{width:180px;height:240px;touch-action:auto;cursor:pointer;filter:grayscale(1) contrast(1.25)}#field-body .item-slot{transition:transform .12s ease,border-color .12s,background .12s}#field-body .item-slot:not(:disabled):hover{transform:translateY(-2px)}#field-body .item-slot:not(:disabled):active{transform:translateY(1px) scale(.95)}.item-details{animation:item-reveal .16s ease-out}.item-reaction .paper-name{animation:name-flash .65s ease-out}.rpg-use:active{transform:translateY(1px)}.meter-track i{transition:width .4s ease-out}@keyframes item-reveal{from{opacity:.5;transform:translateY(3px)}to{opacity:1;transform:none}}@keyframes name-flash{35%{text-shadow:0 0 9px #fff}}@media(prefers-reduced-motion:reduce){#field-body .item-slot,.meter-track i{transition:none}.item-details,.item-reaction .paper-name{animation:none}#field-body .item-slot:not(:disabled):hover,#field-body .item-slot:not(:disabled):active{transform:none}}
.rpg-hero-canvas{width:210px;height:280px;max-width:none;margin:-20px -20px;flex:none}
.rpg-hero-canvas:focus-visible{outline:1px dashed #777;outline-offset:-25px}
.rpg-hero-canvas{clip-path:none;width:180px;height:240px;max-width:100%;object-fit:contain;margin:0;filter:none}.paper-figure{overflow:visible}
#room-loading{white-space:pre;font:clamp(6px,1.35vw,10px)/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;background:rgba(0,0,0,.94);letter-spacing:0;align-content:center;justify-content:center;padding:12px;text-align:left}
#boot-ascii{font:clamp(6px,1.4vw,9px)/1.2 ui-monospace,monospace;white-space:pre;min-height:0;margin:0 0 22px;letter-spacing:0;color:#fff}
.boot-terminal{width:min(540px,100%)}
.ivan-portrait{display:block;width:180px;height:220px;max-width:100%;object-fit:contain;image-rendering:pixelated;flex:none}.ivan-portrait[hidden],.rpg-hero-canvas[hidden]{display:none}#field-body .portrait-switch{font:10px ui-monospace,monospace;letter-spacing:1px;min-height:24px;padding:4px 8px;background:transparent;border:0;color:#aaa}.paper-figure:has(.ivan-portrait:not([hidden])){height:294px}#interaction-status{position:absolute;bottom:80px;left:50%;transform:translateX(-50%);max-width:calc(100% - 40px);padding:6px 10px;border:1px solid #666;background:#050505;color:#ddd;font:11px/1.4 ui-monospace,monospace;pointer-events:none;z-index:4}#interaction-status[hidden]{display:none}@media(max-width:600px){#interaction-status{bottom:174px;font-size:10px}.ivan-portrait{height:210px}}
.paper-figure:has(.rpg-hero-canvas:not([hidden])){height:318px}
#zoom-controls{position:absolute;left:24px;top:134px;display:flex;gap:0;z-index:3;background:#050505;border:1px solid #555}#zoom-controls button{border:0;background:transparent;color:#ddd;font:14px ui-monospace,monospace;min-width:40px;min-height:40px;cursor:pointer}#zoom-controls #zoom-reset{min-width:60px;font-size:12px;border-inline:1px solid #333}#zoom-controls button:disabled{color:#444;cursor:default}#zoom-controls button:focus-visible{outline:1px solid #fff;outline-offset:-3px}.rpg-hero-canvas{width:210px;height:auto;aspect-ratio:3/4;max-width:100%;margin:0}.paper-figure,.paper-figure:has(.rpg-hero-canvas:not([hidden])){height:330px}@media(max-width:600px){#zoom-controls{left:20px;top:134px}.rpg-hero-canvas{height:auto}}

/* Dialogue stays above the room; action controls remain below. */
#speech{top:max(184px,calc(env(safe-area-inset-top) + 154px));bottom:auto;max-height:calc(100dvh - 340px);overflow-y:auto;z-index:6}
#interaction-status{bottom:124px} 
@media(max-width:600px){#speech{top:max(184px,calc(env(safe-area-inset-top) + 166px));bottom:auto;max-height:30dvh}#interaction-status{bottom:174px}}

#boot-ascii{font-size:clamp(8px,1.8vw,12px);line-height:1.05;letter-spacing:0;margin-bottom:24px}
#room-loading{font-size:clamp(7px,1.65vw,11px);line-height:1.15;letter-spacing:0}
@media(max-width:400px){#boot-ascii{font-size:8px}#room-loading{font-size:7px;padding:8px}}

/* Compact controls, with full touch targets on small screens. */
header{top:max(16px,env(safe-area-inset-top));left:16px;right:16px;gap:12px}
#field-open{top:52px;left:16px;min-height:34px;padding:7px 10px}
#zoom-controls{top:52px;left:154px}#zoom-controls button{min-height:32px;min-width:32px}#zoom-controls #zoom-reset{min-width:48px}
#sound{top:52px;right:16px;min-height:34px;padding:7px 10px}
#haptics{top:52px;right:152px;min-height:34px;padding:7px 10px}
#speech{top:100px;width:min(510px,calc(100% - 32px));padding:8px 12px 12px}
footer{bottom:max(14px,env(safe-area-inset-bottom));font-size:11px}
#action{bottom:42px}#interaction-status{bottom:98px;padding:4px 8px}
.boot-terminal{width:min(820px,calc(100% - 24px))}
#boot-ascii{font-size:clamp(4.5px,.87vw,10px);line-height:1; font-weight:700;margin-bottom:18px}
#room-loading{font-size:clamp(4.5px,.87vw,9px);line-height:1.12;font-weight:700}
@media(max-width:600px){header{left:12px;right:12px;gap:6px}#field-open{left:12px;top:58px;min-height:40px}#sound{right:12px;top:58px;min-height:40px}#zoom-controls{left:12px;top:104px}#zoom-controls button{min-height:40px;min-width:40px}#haptics{right:12px;top:104px;min-height:42px}#speech{top:156px;max-height:28dvh}#action{bottom:44px}#interaction-status{bottom:100px}#boot-ascii,#room-loading{font-size:clamp(4px,1.2vw,7px)}}

/* V51: terminal below, keyboard hints above; strict two-colour stipple frame. */
#speech{top:auto;bottom:max(18px,calc(env(safe-area-inset-bottom) + 12px));width:min(540px,calc(100% - 28px));max-height:32dvh;padding:12px 14px 38px;border:2px solid #fff;box-shadow:4px 4px 0 #000,6px 6px 0 #fff;background:#000;font:14px/20px ColdBootPixel,monospace;isolation:isolate}
#speech:before{content:'';position:absolute;inset:3px;z-index:-1;pointer-events:none;border:5px solid transparent;border-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Cpath fill='white' d='M0 0h1v1H0zm2 2h1v1H2z'/%3E%3C/svg%3E") 1 repeat}
#dialog-speaker{font:12px/16px ColdBootPixel,monospace;color:#fff;padding:0 0 8px;margin:0 0 8px;border-bottom:1px dashed #fff}
#dialog-speaker:before{content:'TTY / ';color:#fff}#dialog-speaker:after{content:'  >_';color:#fff}
#dialog-copy{font:inherit;line-height:20px;padding-right:2px}
.dialog-cursor{right:12px;bottom:8px;visibility:visible!important}
kbd,#action:before{display:inline-block;border:1px solid #fff;border-bottom:3px solid #fff;background:#000;color:#fff;box-shadow:2px 2px 0 #000,3px 3px 0 #fff;font:11px/16px ColdBootPixel,monospace;padding:2px 7px}
#speech.typing .dialog-cursor{opacity:.6}
#action{top:126px;bottom:auto;max-width:calc(100% - 32px);min-height:44px;padding:7px 12px 9px;white-space:normal;border:1px solid #fff;border-bottom-width:3px;box-shadow:3px 3px 0 #000,4px 4px 0 #fff;font:13px/18px ColdBootPixel,monospace;background:#000;z-index:4}
#action:before{content:'E';margin-right:12px;vertical-align:middle}#action:active{margin-top:2px;box-shadow:1px 1px 0 #fff}
#interaction-status{top:180px;bottom:auto;background:#000;color:#fff;border:1px dashed #fff;font:11px/16px ColdBootPixel,monospace;max-width:calc(100% - 28px)}
footer{top:100px;bottom:auto;font:10px/16px ColdBootPixel,monospace;color:#fff}
#speech:focus-visible{outline:2px dashed #fff;outline-offset:6px}
@media(max-width:600px){footer{top:156px;font-size:10px}#action{top:180px;font-size:12px}#interaction-status{top:236px}#speech{top:auto;bottom:max(14px,calc(env(safe-area-inset-bottom) + 10px));max-height:30dvh;font-size:13px;line-height:18px;padding:10px 12px 36px}#dialog-copy{line-height:18px}}
@media(max-height:560px) and (min-width:601px){#action{top:100px;left:16px;transform:none;max-width:42%}#interaction-status{top:153px;left:16px;transform:none;max-width:42%}footer{top:96px;left:auto;right:16px;width:auto;max-width:50%;text-align:right}#speech{max-height:32dvh;width:min(450px,calc(100% - 28px));font-size:12px;line-height:16px}}

/* V54: one quiet contextual strip; dialogue expands only when needed. */
#world-terminal{position:absolute;z-index:6;left:50%;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(460px,calc(100% - 32px));padding:10px 13px;background:#000;color:#fff;border:0;border-top:1px dotted #fff;box-shadow:none;font:12px/17px ColdBootPixel,monospace}
#world-terminal:before,.terminal-plate,.crt-housing:after,#terminal-idle,#world-terminal .dialog-cursor{display:none}
.crt-housing,.terminal-display{position:static;min-height:0;max-height:none;padding:0;border:0;outline:0;background:none;box-shadow:none;border-radius:0}
.terminal-display{max-height:24dvh;overflow:auto;scrollbar-width:thin;scrollbar-color:#fff #000}
#world-terminal #speech{position:static;inset:auto;transform:none;width:auto;max-width:none;min-height:0;max-height:none;padding:0;margin:0;border:0;box-shadow:none;background:none;font:12px/17px ColdBootPixel,monospace}
#world-terminal #speech:before{display:none}
#world-terminal #dialog-speaker{font:9px/12px ColdBootPixel,monospace;color:#bbb;margin:0 0 5px;padding:0;border:0}#world-terminal #dialog-speaker:before,#world-terminal #dialog-speaker:after{content:none}
#world-terminal #dialog-copy{font:12px/17px ColdBootPixel,monospace}
#world-terminal #interaction-status{position:static;inset:auto;transform:none;max-width:none;border:0;padding:0;margin:0;background:none;color:#ddd;font:11px/16px ColdBootPixel,monospace}
.terminal-keyboard{display:flex;align-items:center;justify-content:flex-end;gap:0;padding:0;min-height:0}.terminal-commands{display:flex;align-items:center;width:100%;gap:0}
#world-terminal #action,#terminal-next{position:static;inset:auto;transform:none;margin:0;padding:4px 0;min-height:32px;max-width:100%;border:0;background:none;color:#fff;box-shadow:none;font:12px/17px ColdBootPixel,monospace;text-align:left;white-space:normal;cursor:pointer}
#world-terminal #action{width:100%}#world-terminal #action:before{content:'E';display:inline-block;margin:0 10px 0 0;padding:2px 5px;border:1px solid #777;background:#000;color:#fff;box-shadow:none;font:10px/13px ColdBootPixel,monospace}
#terminal-next{margin-left:auto;font-size:10px;color:#bbb}#terminal-next kbd{font:10px/13px ColdBootPixel,monospace;border:0;padding:0;margin-right:6px;background:none;color:inherit;box-shadow:none}
#world-terminal #action:active,#terminal-next:active{color:#aaa;transform:none;padding-top:4px}
#world-terminal footer{position:static;inset:auto;transform:none;width:100%;max-width:none;display:flex;justify-content:center;gap:14px;margin:0;padding:0;background:none;color:#999;font:9px/14px ColdBootPixel,monospace;pointer-events:none}
#world-terminal footer kbd{padding:0;border:0;background:none;box-shadow:none;color:inherit;font:inherit}
#world-terminal[data-mode='idle']{background:none;border:0;padding:0}
#world-terminal[data-mode='idle'] .crt-housing,#world-terminal[data-mode='idle'] .terminal-commands{display:none}
#world-terminal:not([data-mode='idle']) footer{display:none}
#world-terminal[data-mode='action']{padding-top:4px;padding-bottom:4px}
#world-terminal[data-mode='action'] .crt-housing{display:none}
#world-terminal[data-mode='dialogue'] #action,#world-terminal[data-mode='dialogue'] #interaction-status{display:none!important}
#world-terminal[data-mode='dialogue'] .terminal-keyboard{padding-top:3px}
#world-terminal[data-mode='response'] .terminal-keyboard{display:none}
#world-terminal button:focus-visible,#world-terminal #speech:focus-visible{outline:1px dashed #fff;outline-offset:3px}
@media(max-width:600px){#world-terminal{width:calc(100% - 24px);bottom:max(12px,env(safe-area-inset-bottom));padding:8px 10px}#world-terminal #dialog-copy,#world-terminal #speech{font-size:11px;line-height:16px}#world-terminal #action{font-size:11px;min-height:40px}#terminal-next{min-height:36px}#world-terminal footer{font-size:9px;gap:10px}.terminal-display{max-height:23dvh}}
@media(max-height:560px){#world-terminal{bottom:8px}.terminal-display{max-height:23dvh}}
/* V55: compact masthead and one tactile primary key. */
header.game-topbar{position:absolute;top:max(12px,env(safe-area-inset-top));left:14px;right:14px;display:flex;align-items:center;justify-content:space-between;gap:18px;pointer-events:none;z-index:3}
.game-brand{flex:none;min-width:0}.game-ascii{margin:0;font:3.5px/3.5px ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:0;white-space:pre;color:#fff;font-weight:700}
.brand-meta{display:flex;justify-content:space-between;gap:12px;margin-top:5px}.game-topbar .brand-meta #room,.game-topbar .brand-meta #clock{width:auto;order:0;margin:0;font:9px/12px ColdBootPixel,monospace;letter-spacing:0;color:#aaa}
.game-controls{display:flex;align-items:center;gap:5px;pointer-events:auto;flex-wrap:wrap;justify-content:flex-end}
.game-topbar #club-open,.game-topbar #field-open,.game-topbar #sound,.game-topbar #haptics,.game-topbar #zoom-controls{position:static;inset:auto;margin:0;min-height:30px;border:1px solid #555;background:#000;color:#ddd;font:10px/14px ColdBootPixel,monospace;padding:6px 8px;white-space:nowrap}
.game-topbar #zoom-controls{display:flex;padding:0}.game-topbar #zoom-controls button{min-width:26px;min-height:28px;padding:3px;font:10px ColdBootPixel,monospace}.game-topbar #zoom-controls #zoom-reset{min-width:42px;font-size:10px}
#world-terminal #action,#world-terminal #terminal-next{min-height:40px;padding:9px 13px 11px;border:1px solid #fff;border-bottom:4px solid #555;background:#171717;box-shadow:0 2px 0 #000,inset 1px 1px 0 #777;color:#fff;cursor:pointer}
#world-terminal #action:before{background:#000;border:1px solid #777;border-bottom:2px solid #777;padding:2px 5px;margin-right:10px}
#world-terminal #terminal-next{margin-top:4px;min-width:104px;text-align:center}
#world-terminal #action:active,#world-terminal #terminal-next:active{transform:translateY(2px);border-bottom-width:2px;padding-top:9px;padding-bottom:11px;background:#080808;box-shadow:inset 1px 1px 0 #444;color:#fff}
#world-terminal[data-mode='action']{border-top:0;padding:0;background:none}
@media(max-width:700px){header.game-topbar{top:max(9px,env(safe-area-inset-top));left:10px;right:10px;gap:7px;flex-wrap:wrap}.game-brand{display:flex;align-items:center;justify-content:space-between;width:100%;gap:12px}.game-ascii{font-size:2.7px;line-height:2.7px}.brand-meta{flex-direction:column;align-items:flex-end;gap:2px;margin:0}.game-controls{width:100%;flex-wrap:nowrap;justify-content:flex-start;gap:4px}.game-topbar #club-open,.game-topbar #field-open,.game-topbar #sound,.game-topbar #haptics{min-height:32px;padding:6px;font-size:9px}.game-topbar #zoom-controls button{min-height:30px;min-width:23px}.game-topbar #zoom-controls #zoom-reset{min-width:37px}.game-topbar #sound{margin-left:auto}#world-terminal #action,#world-terminal #terminal-next{min-height:44px}}
@media(max-width:360px){.game-topbar #club-open,.game-topbar #field-open,.game-topbar #sound,.game-topbar #haptics{font-size:8px;padding:5px 4px}.game-topbar #zoom-controls button{min-width:20px}.game-topbar #zoom-controls #zoom-reset{min-width:33px}}

/* V57: both contextual keys share the screen centre. */
#world-terminal .terminal-keyboard,#world-terminal .terminal-commands{justify-content:center}
#world-terminal #action{width:auto;max-width:100%;text-align:center;margin:0 auto}
#world-terminal #terminal-next{margin:6px auto 0}
#world-terminal #interaction-status{text-align:center}

/* V72: small physical keys and one explicit object-action selector. */
.nearby-key{position:fixed;z-index:8;transform:translate(-50%,-50%);width:36px;height:36px;padding:0;border:1px solid #fff;border-bottom:4px solid #666;background:#080808;color:#fff;font:22px/1 monospace;box-shadow:2px 2px 0 #000;cursor:pointer;touch-action:manipulation}
.nearby-key:hover,.nearby-key:focus-visible{background:#fff;color:#000;outline:2px solid #fff;outline-offset:3px}
#interaction-choice{position:fixed;z-index:30;width:240px;max-width:calc(100vw - 20px);padding:8px;border:1px solid #eee;background:#080808;color:#fff;box-shadow:4px 4px 0 #000,5px 5px 0 #777;font:12px/1.4 monospace}
#interaction-choice .choice-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;border-bottom:1px dotted #777;padding-bottom:6px}
#interaction-choice button{font:inherit;color:inherit;border:1px solid #999;background:#111;min-height:40px;cursor:pointer;touch-action:manipulation}
#interaction-choice #choice-close{border:0;min-height:28px;width:28px;font-size:20px}
#choice-inspect,#choice-perform{display:block;width:100%;margin-top:5px;text-align:left;padding:8px 10px;border-bottom-width:3px!important}
#interaction-choice button:focus-visible,#interaction-choice button:hover{outline:1px solid #fff;background:#fff;color:#000}
#interaction-choice small{display:block;margin-top:8px;font-size:9px;color:#bbb}
#interaction-choice[hidden],.nearby-key[hidden]{display:none!important}
@media(pointer:coarse){.nearby-key{width:44px;height:44px}#interaction-choice button{min-height:44px}#interaction-choice small{display:none}}

/* V73 compact interaction selector */
#interaction-choice{width:180px;padding:5px;font-size:11px;line-height:1.25;box-shadow:2px 2px 0 #000,3px 3px 0 #777}
#interaction-choice .choice-heading{gap:4px;margin-bottom:3px;padding-bottom:3px}
#interaction-choice #choice-close{min-height:22px;width:22px;font-size:16px}
#interaction-choice button{min-height:28px}
#choice-inspect,#choice-perform{padding:5px 6px;margin-top:3px;border-bottom-width:2px!important}
#interaction-choice small{display:none}
.nearby-key{width:28px;height:28px;font-size:16px}
@media(pointer:coarse){.nearby-key{width:36px;height:36px}#interaction-choice button{min-height:36px}}

/* Tiny visible glyph; comfortable invisible pointer target. */
.nearby-key,.nearby-key:hover,.nearby-key:focus-visible{width:36px;height:36px;padding:0;border:0;background:transparent;box-shadow:none;font-size:0;outline:none}
.nearby-key::before{content:'+';display:grid;place-items:center;width:16px;height:16px;margin:auto;background:#000;color:#fff;border:1px solid #aaa;font:12px/1 monospace;box-shadow:1px 1px 0 #000}
.nearby-key:hover::before,.nearby-key:focus-visible::before{background:#fff;color:#000;border-color:#fff}
/* Telegram viewport includes its own chrome and device safe areas. */
.telegram-app main{height:var(--cb-height,100dvh)}
.telegram-app header.game-topbar{top:calc(9px + var(--cb-safe-top,0px));left:calc(10px + var(--cb-safe-left,0px));right:calc(10px + var(--cb-safe-right,0px))}
.telegram-app #world-terminal{bottom:calc(12px + var(--cb-safe-bottom,0px));max-width:calc(100% - 24px - var(--cb-safe-left,0px) - var(--cb-safe-right,0px))}

/* Cards stay monochrome: rarity is typography and frame rhythm, never colour. */
.postcard-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}.postcard{min-width:0;padding:8px;background:#000;color:#fff;border:1px solid #555;text-align:left;font:12px/1.4 ColdBootPixel,monospace;cursor:pointer}.postcard img,.postcard-detail img{display:block;width:100%;aspect-ratio:3/2;object-fit:cover;image-rendering:pixelated}.postcard strong,.postcard span,.postcard small{display:block;margin-top:6px}.postcard small{font-size:11px}.postcard span{color:#aaa}.postcard.locked{opacity:.65;cursor:default}.postcard-back{display:grid!important;place-items:center;aspect-ratio:3/2;font-size:36px;background:repeating-linear-gradient(135deg,#111 0 2px,#000 2px 5px)}.postcard.uncommon{border-style:dashed}.postcard.rare{border:2px solid #aaa}.postcard.epic{border:3px double #fff}.postcard.legendary{border:4px double #fff;box-shadow:0 0 0 1px #555}.postcard-detail{max-width:720px;margin:16px auto}.card-mail-status{display:block;margin:8px 0;color:#aaa}#card-toast{position:absolute;z-index:8;top:112px;left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);padding:9px 12px;background:#000;border:2px double #fff;color:#fff;font:11px/1.4 ColdBootPixel,monospace;cursor:pointer}.telegram-app #card-toast{top:calc(112px + var(--cb-safe-top,0px))}@media(max-width:600px){.postcard-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.postcard{font-size:11px}#field-terminal nav{flex-wrap:wrap}}
/* One UI stack; the native modal occupies the browser top layer. */
main{isolation:isolate}header.game-topbar{z-index:10}.nearby-key{z-index:20}#world-terminal{z-index:25}#interaction-choice{z-index:30}#card-toast{z-index:35}#room-loading,#retry-room{z-index:90}#loading{z-index:100}
/* Club notebook: monochrome terminal, compact outside the play area. */
#club-dialog{color:#fff;background:#080808;border:1px solid #aaa;width:min(680px,calc(100vw - 24px));max-height:calc(var(--cb-height,100dvh) - 36px - var(--cb-safe-top,0px));padding:0;box-sizing:border-box;font:14px/1.55 monospace;overflow:auto}#club-dialog::backdrop{background:#000b}#club-dialog .club-head{display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;background:#090909;padding:10px 16px;border-bottom:1px solid #666;z-index:1}#club-dialog button,#club-dialog a{font:inherit;color:#fff}#club-dialog button{background:#101010;border:1px solid #777;padding:8px 12px;box-shadow:0 2px 0 #444;cursor:pointer}#club-dialog button:disabled{opacity:.45;cursor:default}#club-dialog button:focus-visible,#club-dialog a:focus-visible{outline:2px solid #fff;outline-offset:3px}#club-dialog nav{display:flex;gap:6px;padding:12px 16px;flex-wrap:wrap;border-bottom:1px dashed #555}#club-dialog nav [aria-pressed=true]{background:#fff;color:#000;box-shadow:none}#club-body{padding:8px 20px 20px}#club-body h2{font-size:23px;line-height:1.25;letter-spacing:-1px}#club-body h3{font-size:16px;margin:8px 0}#club-body p{white-space:pre-line}#club-body small{font-size:12px;color:#ccc}#club-body details{border-top:1px dashed #666;padding:12px 0;margin:16px 0}#club-body summary{cursor:pointer}#club-status{padding:0 20px 14px;white-space:pre-line;font-size:13px}.club-products{display:grid;gap:12px}.club-product,.club-order{border:1px solid #555;padding:14px;background:repeating-linear-gradient(0deg,#0d0d0d 0 1px,#000 1px 3px)}.club-product>small{float:right;color:#fff!important;font-size:16px!important}.club-product p{max-width:51ch}.club-product button{width:100%}.club-agree{display:flex;gap:10px;align-items:start}.club-agree input{min-width:20px;min-height:20px;accent-color:#fff}.club-card{width:100%;height:auto;display:block;image-rendering:pixelated;border:1px solid #666;margin:12px 0}.club-log{border-left:2px solid #aaa;padding-left:12px}.club-rooms{display:grid;grid-template-columns:1fr 1fr;gap:8px}.club-order{margin-top:12px}.club-order small{display:block;overflow-wrap:anywhere;margin-bottom:8px}.club-link{display:inline-block;border:1px solid #aaa;padding:8px 12px}@media(max-width:420px){#club-body{padding:8px 14px 16px}#club-dialog nav{gap:5px;padding:10px}#club-dialog nav button{padding:7px 8px}.club-rooms{grid-template-columns:1fr}.game-controls{flex-wrap:wrap}}

/* V83: three compact top-level actions; preferences live in a native modal. */
header.game-topbar{gap:12px;flex-wrap:wrap}
.game-brand{min-width:0;max-width:100%}
.game-controls{min-width:0;max-width:100%;flex-wrap:wrap;gap:5px}
.game-topbar #settings-open,.game-topbar #club-open,.game-topbar #field-open{position:static;inset:auto;margin:0;min-height:36px;max-width:100%;padding:7px 9px;border:1px solid #777;background:#000;color:#fff;font:12px/16px ColdBootPixel,monospace;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
.game-topbar button:focus-visible{outline:2px solid #fff;outline-offset:2px}
#settings-dialog{width:min(380px,calc(100% - 24px));max-height:calc(var(--cb-height,100dvh) - 36px);padding:0;overflow:auto;border:1px solid #aaa;background:#000;color:#fff;font:14px/1.5 ColdBootPixel,monospace}
#settings-dialog::backdrop{background:#000b}
.settings-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid #777}
.settings-body{padding:16px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
#settings-dialog button{position:static;inset:auto;margin:0;min-height:44px;padding:8px 12px;font:inherit;color:#fff;background:#000;border:1px solid #777;cursor:pointer}
#settings-dialog button:focus-visible{outline:2px solid #fff;outline-offset:2px}
#settings-dialog #zoom-controls{position:static;inset:auto;display:flex;margin:0;padding:0;border:1px solid #777;background:#000}
#settings-dialog #zoom-controls button{border:0;min-width:40px;padding:8px}
#settings-dialog #zoom-reset{min-width:68px;border-inline:1px solid #777}
#settings-dialog #zoom-controls button:disabled{color:#555;cursor:default}
.settings-toggles{display:grid;gap:12px;margin-top:18px}.settings-body p{font:12px/1.5 monospace;color:#aaa;margin:16px 0 0}
@media(max-width:700px){.game-controls{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%}.game-topbar #settings-open{margin-left:auto}.game-topbar #club-open,.game-topbar #field-open,.game-topbar #settings-open{font-size:11px;padding:7px;min-height:40px}.game-brand{gap:8px}.game-ascii{font-size:clamp(1.9px,.65vw,2.7px);line-height:1}.game-topbar .brand-meta #room{max-width:145px;white-space:normal;text-align:right;overflow-wrap:anywhere}}
@media(max-width:360px){.game-topbar #club-open,.game-topbar #field-open,.game-topbar #settings-open{font-size:10px;padding:6px}.game-controls{gap:4px}}

#room-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;overflow:hidden}
#room-loading-title{display:block;max-width:100%;font:16px/1.4 ColdBootPixel,monospace;white-space:normal;text-align:center;overflow-wrap:anywhere}
#room-loading-copy{margin:0;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;line-height:1.12;font-weight:700;white-space:pre;letter-spacing:0}

#choice-alternate{display:block;width:100%;margin-top:3px;text-align:left;padding:5px 6px;border-bottom-width:2px!important}

#explore-hint{position:absolute;z-index:35;top:112px;left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);padding:8px 12px;background:#000;border:1px dashed #fff;color:#fff;font:12px/1.4 ColdBootPixel,monospace;cursor:pointer;min-height:40px}.telegram-app #explore-hint{top:calc(112px + var(--cb-safe-top,0px))}.journal-lead{padding:12px;border:1px dashed #fff;margin-bottom:16px;background:#000}.journal-lead p{margin:8px 0}.journal-lead small{display:block;margin-top:6px}.postcard-detail img{aspect-ratio:auto;object-fit:contain}


#field-body .item-details .item-hint{font-size:14px;color:#ddd}
#choice-perform:disabled{opacity:.45;cursor:default}

.choice-scenes{display:grid;gap:4px;margin-top:5px;border-top:1px dotted #666;padding-top:5px}.choice-scenes:empty{display:none}#interaction-choice{max-height:calc(100dvh - 140px);overflow:auto}#interaction-choice .choice-scenes button{min-height:36px;text-align:left;padding:6px}#interaction-choice button:disabled{opacity:.5;cursor:default}#field-body .postcard-save .rpg-use{color:#fff;min-height:44px;width:100%;cursor:pointer}#field-body .postcard-save p{font-size:13px;line-height:1.5}

.postcard-original{display:block;min-height:44px;padding:12px 4px;color:inherit;text-underline-offset:4px}.postcard-original:focus-visible{outline:2px solid currentColor;outline-offset:2px}

/* Album chapters share the same hierarchy on desktop and narrow screens. */
.postcard-chapter-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 16px;border-top:3px double #aaa;padding-top:20px;margin-top:28px;color:#fff}.postcard-chapter-head>small{grid-column:1/-1;font:12px/1.4 ColdBootPixel,monospace;letter-spacing:.16em;color:#bbb}.postcard-chapter-head h2{margin:0;font:clamp(20px,4vw,28px)/1.25 ColdBootPixel,monospace;overflow-wrap:anywhere}.postcard-chapter-count{align-self:center;font:11px/1.5 ColdBootPixel,monospace;color:#aaa;white-space:nowrap}.private-rewards{margin-top:40px}@media(max-width:420px){.postcard-chapter-head{grid-template-columns:minmax(0,1fr)}.postcard-chapter-count{white-space:normal}.private-rewards{margin-top:32px}}
