:root{--ink:#b8b9ad;--dim:#787f86;--line:#39414a;--panel:#10141beF;--amber:#baa071;--steel:#899cac;--dark:#080b10;color-scheme:dark}*{box-sizing:border-box}body{margin:0;background:#000;color:var(--ink);font:12px/1.5 'Courier New',monospace;overflow:hidden}button,input,select{font:inherit}button,select,label.import{cursor:pointer}button{color:var(--ink);background:#1b222b;border:1px solid #4a535e;border-top-color:#68717c;border-left-color:#68717c;padding:7px 12px;border-radius:0}button:hover{color:#e2d6bf;background:#29303a}button:active{border-color:#252d38}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:1px solid var(--amber);outline-offset:3px}a{color:var(--steel);text-decoration:none}a:hover{color:var(--amber)}[hidden]{display:none!important}#view{position:fixed;inset:0;width:100%;height:100%;display:block;outline:0}body:after{content:'';position:fixed;inset:54px 0 0;pointer-events:none;background:repeating-linear-gradient(0deg,#00000009 0px,#00000009 1px,transparent 1px,transparent 4px);z-index:1}#shade{display:none;position:fixed;inset:54px 0 0;background:#02050ab8;z-index:3}.browsing #shade{display:block}header{position:fixed;inset:0 0 auto;height:54px;padding:0 22px;display:flex;align-items:center;justify-content:space-between;background:#11151cf5;border-bottom:1px solid #515a65;box-shadow:0 3px #05070b;z-index:10}.brand{display:flex;gap:16px;align-items:center}.brand b{font:bold 25px/1 'Courier New',monospace;letter-spacing:-2px;color:#c4c5b8}.logo-three{color:var(--amber)}.brand>span{font-size:9px;color:var(--dim);letter-spacing:2px}.top-actions{display:flex;gap:8px;align-items:center}.top-actions button{font-size:11px}.tag{color:var(--dim);font-size:9px;letter-spacing:1px;margin-right:14px}kbd{font:9px monospace;color:var(--dim);padding-left:7px}#boot{position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:#080b10;z-index:4}#boot strong{font-size:28px;color:var(--amber);letter-spacing:3px}#boot-status{color:var(--dim);font-size:11px}#browser{position:fixed;z-index:4;top:50%;left:50%;transform:translate(-50%,-50%);width:min(900px,calc(100vw - 48px));max-height:calc(100dvh - 100px);overflow:auto;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:0;background:#0e131bf7;border:1px solid #717983;box-shadow:0 0 0 3px #0a0d12,7px 9px #0009;scrollbar-color:#525d6a #10141b}.browser-bar{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;padding:9px 14px;background:#2b3542;border-bottom:1px solid #5f6c7b}.browser-bar h1{margin:0;color:#d0d0c5;font-size:13px;font-weight:700;letter-spacing:2px}.browser-bar button{padding:0;border:0;color:#bbc0c5;background:none}.library{padding:20px;border-right:1px solid var(--line);min-width:0}.section-label{color:var(--steel);font-size:10px;display:flex;justify-content:space-between;margin-bottom:14px}.section-label span{color:var(--dim)}.search{display:flex;gap:10px;align-items:center;padding:0 10px;border:1px solid var(--line);background:#080d14}.search>span{font-size:20px;color:var(--dim)}input{min-width:0;width:100%;color:var(--ink);background:none;border:0;padding:10px 0;outline:0}.import{white-space:nowrap;color:var(--amber);font-size:11px;border-left:1px solid var(--line);padding-left:10px}#world-list{height:min(340px,40vh);overflow:auto;margin-top:10px;scrollbar-color:#4b5663 #10141b;scrollbar-width:thin}.world{display:flex;align-items:center;gap:12px;width:100%;padding:12px 8px;text-align:left;background:#10151c;border:0;border-bottom:1px solid #242d36}.world:hover{background:#202a35}.world.selected{background:#28313a;box-shadow:inset 2px 0 var(--amber)}.world .icon{color:#687784;font-size:13px;min-width:20px}.world strong{display:block;color:#babebc;font-size:12px;font-weight:400}.world small{display:block;color:var(--dim);font-size:9px;margin-top:4px}.world .arrow{margin-left:auto;color:var(--amber)}.library-bottom{display:flex;justify-content:space-between;gap:12px;font-size:9px;color:var(--dim);margin-top:16px}.library-bottom a{white-space:nowrap}.launch{padding:20px;min-width:0}.eyebrow{font-size:9px;color:var(--steel);letter-spacing:2px}h2{font-size:22px;font-weight:400;line-height:1.2;margin:12px 0;color:#d1cec1}#board-title{font-size:11px;color:var(--dim);margin:8px 0}.save-note{font-size:10px;color:#9a927f;border-left:2px solid #65563f;padding-left:10px;margin:20px 0}.launch-controls{display:flex;flex-direction:column;gap:15px}.launch label,.selectors label{color:var(--dim);font-size:10px}select{display:block;margin-top:6px;width:100%;min-width:0;padding:9px 7px;background:#0b1119;color:var(--ink);border:1px solid #3f4955;font-size:11px}.primary{color:#d1c7ad;background:#454135;border-color:#756d5a;font-weight:bold}.primary:hover{background:#57503f;color:#e6dac0}.primary span{float:right}.selectors{display:grid;grid-template-columns:1fr;gap:13px;border-top:1px solid var(--line);padding-top:18px;margin-top:20px}.selectors button{background:#1b222b;font-size:11px}footer{grid-column:1/-1;display:flex;justify-content:space-between;padding:10px 20px;border-top:1px solid var(--line);font-size:9px;color:var(--dim);letter-spacing:1px}#hud{position:fixed;inset:54px 0 0;pointer-events:none;z-index:2}.hud-title{margin:18px 24px;max-width:calc(100% - 390px);text-shadow:1px 2px 3px #000}.hud-title span{display:block;font-size:9px;letter-spacing:2px;color:var(--amber)}.hud-title strong{display:block;font-size:17px;font-weight:400;color:#c7c8bd;margin-top:4px}.crosshair{position:absolute;left:50%;top:45%;font:18px monospace;color:#b9bcbb99}.stats{position:absolute;left:24px;bottom:50px;display:flex;gap:25px;padding:12px 17px;background:#0a0e15df;border:1px solid #46515e;border-left:3px solid #625742}.stats>span{font-size:19px;color:var(--amber);white-space:nowrap}.stats b{font-weight:400;color:#c4c5bb}.stats small{display:block;font-size:8px;letter-spacing:1px;color:var(--dim);margin-top:3px}.controls-hint{position:absolute;bottom:15px;left:24px;font-size:10px;color:#999f9f;background:#090d13d9;padding:4px 8px}.controls-hint i{color:#656d75;margin:0 6px}#capture-hint{color:var(--amber)}.map-box{position:absolute;top:16px;right:max(20px,env(safe-area-inset-right));width:300px;padding:7px;background:#0b1018ed;border:1px solid #505c69}.map-heading{display:flex;justify-content:space-between;align-items:center;width:100%;padding:0 0 7px;border:0;background:none!important;color:var(--steel);font-size:9px;letter-spacing:1px;pointer-events:auto;touch-action:manipulation}.map-stage{position:relative;overflow:hidden}.map-box canvas{width:100%;height:auto;aspect-ratio:480/350;display:block;image-rendering:pixelated}.map-player{position:absolute;width:12px;height:12px;border:1px solid #ffff55;box-shadow:0 0 0 1px #000;border-radius:50%;transform-origin:center;pointer-events:none}.map-player:after{content:'';position:absolute;left:4px;bottom:11px;width:2px;height:6px;background:#ffff55;box-shadow:0 0 0 1px #000}.map-caption{display:flex;justify-content:space-between;margin-top:7px;font-size:9px;color:var(--dim)}#coordinates{color:var(--amber)}#classic-screen{position:fixed;z-index:5;inset:68px 5vw 25px;background:#030609ee;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px}#screen{width:min(95%,960px);max-height:80%;object-fit:contain;image-rendering:pixelated}#classic-screen>div{font-size:11px;color:var(--dim)}dialog{background:#101720;color:var(--ink);border:1px solid #78828c;max-width:560px;padding:26px;max-height:90vh}dialog::backdrop{background:#000c}dialog .close{float:right}dialog p{line-height:1.7}dl{display:grid;grid-template-columns:120px 1fr;gap:14px;font-size:11px}dt{color:var(--amber)}dd{margin:0;color:#939da3}.muted{font-size:10px;color:var(--dim)}#toast{position:fixed;z-index:20;bottom:22px;left:50%;transform:translateX(-50%);background:#222830;color:#c8c6b8;border:1px solid #85785d;padding:13px 20px;max-width:90vw;box-shadow:4px 4px #0009;font-size:12px}#touch-controls{display:none;position:fixed;inset:0;pointer-events:none;z-index:8;user-select:none;-webkit-user-select:none;touch-action:none}body.touch-client.playing{overscroll-behavior:none}body.touch-client.playing #touch-controls{display:block}body.touch-client.playing #view{touch-action:none}.touch-stick{position:absolute;bottom:calc(25px + env(safe-area-inset-bottom));width:120px;height:120px;border:1px solid #85909a88;border-radius:50%;background:#10192388;pointer-events:auto;touch-action:none}.move-stick{left:calc(24px + env(safe-area-inset-left))}.look-stick{right:calc(24px + env(safe-area-inset-right))}.stick-knob{position:absolute;width:44px;height:44px;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid #aeb4b0aa;border-radius:50%;background:#626b7388}.stick-label{position:absolute;top:-23px;left:0;width:100%;text-align:center;font-size:9px;color:#9caaa9;letter-spacing:2px;text-shadow:1px 1px #000}.touch-actions{position:absolute;right:calc(24px + env(safe-area-inset-right));bottom:calc(180px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:15px}.touch-actions button,.touch-dialog button{pointer-events:auto;touch-action:none;background:#242b34bb;border:1px solid #89929a99;color:#c6c6bb;min-width:52px;height:52px;border-radius:50%;font-weight:bold}.touch-actions .touch-fire{width:68px;height:68px;color:#c1aa7c}.touch-actions button.held,.touch-dialog button.held{background:#595647;color:#e1d1aa}.touch-dialog{display:none;position:absolute;bottom:calc(45px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);gap:12px}.touch-dialog button{border-radius:0;min-width:70px}.in-dialog .touch-dialog{display:flex}.in-dialog .touch-actions,.in-dialog .look-stick{display:none}.touch-client .controls-hint{display:none}.touch-client .stats{bottom:250px;padding:9px 12px;gap:17px}.touch-client .stats>span{font-size:16px}.touch-client #classic-screen{inset:65px 5px 175px}.touch-client #classic-screen>div{font-size:0}.touch-client #classic-screen>div:after{content:'LEFT STICK SELECT / ENTER CONFIRM / BACK CLOSE';font-size:9px}.touch-client .hud-title strong{font-size:15px}@media(max-width:950px){.map-box{width:220px}.hud-title{max-width:calc(100% - 280px)}.tag{display:none}.stats{gap:17px}}@media(max-width:700px){header{height:48px;padding:0 12px}.brand{gap:0}.brand>span{display:none}.brand b{font-size:23px}.top-actions{gap:5px}.top-actions button{font-size:10px;padding:6px 8px}kbd{display:none}#hud{top:48px}body:after,#shade{top:48px}#browser{width:calc(100vw - 24px);max-height:calc(100dvh - 78px);grid-template-columns:1fr;top:calc(50% + 12px)}.browser-bar{position:sticky;top:0;z-index:1}.library{padding:15px;border-right:0;border-bottom:1px solid var(--line)}#world-list{height:210px}.launch{padding:15px}.launch-controls{flex-direction:row;align-items:end}.launch-controls label{flex:1;min-width:0}.primary{white-space:nowrap;padding:9px}.primary span{margin-left:8px}.selectors{grid-template-columns:1fr 1fr;gap:10px}.selectors button{grid-column:1/-1}.launch h2{font-size:19px}.save-note{margin:12px 0}.library-bottom{font-size:8px}.map-box{top:12px;right:max(10px,env(safe-area-inset-right));width:170px;padding:6px}.map-heading{font-size:8px;letter-spacing:0}.map-caption{font-size:8px}.map-caption>span:last-child{font-size:0}.map-caption>span:last-child:after{content:'N ↑';font-size:8px}.hud-title{margin:12px;max-width:calc(100% - 205px)}.hud-title strong{overflow-wrap:anywhere;font-size:15px}.hud-title span{font-size:8px;letter-spacing:1px}.stats{left:12px;max-width:calc(100% - 24px);gap:15px}.stats small{font-size:7px;letter-spacing:0}.stats>span{font-size:16px}.controls-hint{font-size:8px;left:10px;max-width:95vw}.touch-client .stats{gap:14px}dialog{padding:20px;margin:12px}dl{grid-template-columns:95px 1fr}footer{font-size:8px;letter-spacing:0;padding:10px 15px}}@media(max-height:550px) and (orientation:landscape){header{height:44px}#hud{top:44px}body:after,#shade{top:44px}#browser{max-height:calc(100dvh - 65px);top:calc(50% + 15px)}.touch-client .stats{top:49px;bottom:auto;left:15px;gap:14px;padding:6px}.touch-client .stats small{display:none}.touch-client .stats>span{font-size:14px}.touch-stick{width:100px;height:100px;bottom:18px}.touch-actions{bottom:130px;right:calc(175px + env(safe-area-inset-right))}.touch-client .hud-title{margin:8px 15px}.touch-client .hud-title span{display:none}.touch-client #classic-screen{inset:50px 110px 65px}.touch-dialog{bottom:12px}.map-box{width:145px;top:9px;right:max(10px,env(safe-area-inset-right));padding:5px}.map-heading{font-size:8px;padding-bottom:5px;letter-spacing:0}.map-caption{font-size:8px;margin-top:5px}.hud-title{max-width:calc(100% - 190px)}}

/* Gameplay owns gestures; paused panels retain normal document interaction. */
html{height:100%;overflow:hidden;overscroll-behavior:none}
body{min-height:100%;overscroll-behavior:none}
body.playing{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:none}
body.playing #view,body.playing #hud,body.playing #classic-screen{touch-action:none;-webkit-user-drag:none}
#browser,#help{overscroll-behavior:contain;touch-action:pan-y;user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}
#world-list{overscroll-behavior:contain;touch-action:pan-y}
input,textarea,[contenteditable="true"]{user-select:text;-webkit-user-select:text}

#graphics{width:min(420px,calc(100vw - 28px));padding:22px;user-select:text;touch-action:pan-y;overscroll-behavior:contain}#graphics::backdrop{background:#0005}.graphics-heading{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:20px}.graphics-heading h2{font-size:15px;letter-spacing:2px;margin:0}.graphics-heading button{padding:2px 6px}.effect-setting{display:flex;align-items:center;justify-content:space-between;gap:20px;cursor:pointer}.effect-setting strong{font-size:13px;color:var(--ink)}.effect-setting small{display:block;color:var(--dim);font-size:10px;margin-top:5px}#graphics input[type=checkbox]{width:20px;height:20px;flex-shrink:0;accent-color:var(--amber);padding:0}#graphics .muted{margin:22px 0}#graphics-done{width:100%}@media(max-width:370px){header{padding:0 8px}.top-actions{gap:4px}.top-actions button{padding:6px;font-size:9px}.brand b{font-size:21px}}
/* Original ZZT interface: CP437, EGA blue, yellow labels and DOS keycaps. */
@font-face{font-family:ZZ3T437;src:url('./cp437.woff') format('woff');font-style:normal;font-weight:400;font-display:swap}
:root{--ink:#fff;--dim:#aaa;--line:#fff;--panel:#0000aa;--amber:#ffff55;--steel:#fff;--dark:#000;--ui-font:ZZ3T437,monospace}
body,button,input,select,textarea{font-family:var(--ui-font);font-size:14px;line-height:1;font-synthesis:none;font-kerning:none;letter-spacing:0}
body:after{display:none}header{background:#0000aa;border-bottom:2px solid #aaa;box-shadow:none;height:48px;padding:0 16px}.brand{gap:16px}.brand b{font-family:var(--ui-font);font-size:28px;font-weight:400;color:#000;background:#aaa;letter-spacing:0;padding:0 8px}.logo-three{color:#000}.brand>span{color:#fff;letter-spacing:0}
button{background:#aaa;color:#000;border:0;padding:7px 12px;box-shadow:3px 3px #000}button:hover{background:#00aaaa;color:#000}button:active{box-shadow:1px 1px #000}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid #ffff55;outline-offset:3px}
body :is(.tag,.brand>span,.top-actions button,kbd,.eyebrow,.section-label,.search input,.import,.world strong,.world small,.world .icon,.world .arrow,.library-bottom,.launch label,.selectors label,.selectors button,.launch select,.save-note,#board-title,footer,.controls-hint,.hud-title span,.map-heading,.map-caption,.muted,dialog p,dialog dt,dialog dd,dialog a,.effect-setting strong,.effect-setting small,.stick-label,#classic-screen>div){font-family:var(--ui-font);font-size:14px;line-height:1.2;letter-spacing:0;font-weight:400}
.tag{color:#aaa;margin-right:8px}kbd{background:#00aaaa;color:#000;padding:0 3px;margin-left:6px}.top-actions{gap:10px}.top-actions button{padding:6px 8px}.brand>span{font-size:14px}.tag{font-size:14px}
#boot{background:#0000aa}#boot strong{font-family:var(--ui-font);font-size:28px;font-weight:400;letter-spacing:0;background:#aaa;color:#000;padding:0 16px}#boot-status{font-size:14px;color:#ffff55}#shade{background:#0008;top:48px}
#browser,dialog{background:#0000aa;color:#ffff55;border:3px double #fff;box-shadow:8px 8px #000;border-radius:0;scrollbar-color:#aaa #0000aa}.browser-bar{background:#0000aa;border-bottom:3px double #fff;padding:12px 16px}.browser-bar h1{font-family:var(--ui-font);font-size:14px;line-height:1;font-weight:400;letter-spacing:0;color:#ffff55}.browser-bar button{background:#aaa;color:#000;padding:3px 6px;box-shadow:none}
.library{border-right:1px solid #aaa}.section-label{color:#ffff55}.section-label span{color:#fff}.search{background:#000;border:1px solid #aaa;padding:4px 8px}.search>span{font-size:14px;color:#ff55ff}.search input{color:#fff;padding:7px 0}.import{color:#ffff55;border-color:#aaa}.world{background:#0000aa;border:0;box-shadow:none;gap:12px;padding:10px 8px}.world:hover{background:#0000aa;color:#fff}.world.selected{background:#0000aa;box-shadow:none}.world.selected .icon{color:#ff5555}.world.selected .icon:before{content:'»';margin-right:4px}.world .icon{color:#aaa;min-width:24px}.world strong{color:#fff}.world small{color:#aaa;line-height:1.2;margin-top:5px}.world .arrow{color:#ff55ff}.library-bottom{color:#aaa;line-height:1.3;flex-wrap:wrap}.library-bottom a{color:#fff}.launch .eyebrow{color:#ffff55}.launch h2,dialog h2{font-family:var(--ui-font);font-size:28px;font-weight:400;line-height:1;color:#fff;letter-spacing:0}#board-title{color:#aaa}.save-note{color:#aaa;border-left:0;padding-left:0;line-height:1.3}.launch label,.selectors label{color:#ffff55}.launch select,select{color:#fff;background:#0000aa;border:1px solid #aaa;font-size:14px;line-height:1;padding:8px}.primary{background:#aaa;color:#000;font-weight:400;border:0}.primary:hover{background:#00aaaa;color:#000}.selectors{border-top:1px solid #aaa}.selectors button{background:#aaa;color:#000}footer{border-top:1px solid #aaa;color:#aaa;line-height:1.2;flex-wrap:wrap;gap:8px}a{color:#fff}a:hover{color:#ff55ff}#world-list{scrollbar-color:#aaa #0000aa}
#hud{top:48px}.hud-title{max-width:calc(100% - 305px);margin:14px 16px;text-shadow:none}.hud-title span{color:#ffff55;background:#0000aa;display:table;padding:3px 8px}.hud-title strong{font-family:var(--ui-font);font-size:14px;font-weight:400;color:#fff;background:#0000aa;display:table;padding:3px 8px;margin:0}.controls-hint{background:#0000aa;color:#fff;padding:6px 8px;bottom:12px;left:16px}.controls-hint i{color:#aaa}.controls-hint #capture-hint{color:#ffff55}
#classic-sidebar{position:absolute;top:12px;right:max(12px,env(safe-area-inset-right));width:240px;background:#0000aa;padding:8px;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.sidebar-heading{text-align:center;color:#fff;font-family:var(--ui-font);font-size:14px;line-height:14px}.sidebar-heading span{display:block}.sidebar-heading strong{display:block;background:#aaa;color:#000;font-weight:400;margin:0 16px}
#classic-sidebar .map-box{position:static;width:100%;padding:0;border:0;background:#0000aa}.map-heading{background:#0000aa!important;color:#fff!important;box-shadow:none;padding:3px 0 6px}.map-caption{margin-top:5px;color:#aaa}#coordinates{color:#fff}.classic-stats{width:100%;background:#0000aa}.classic-stats canvas{display:block;width:100%;height:auto;aspect-ratio:160/112;image-rendering:pixelated}
#classic-screen{background:#000e}#classic-screen>div{color:#ffff55}dialog .close{background:#aaa;color:#000}dialog p{color:#ffff55;line-height:1.5}dialog dt{color:#fff}dialog dd{color:#ffff55;line-height:1.3}dialog .muted{color:#aaa;font-size:14px;line-height:1.3}dialog::backdrop{background:#0009}#graphics::backdrop{background:#0005}.graphics-heading{border-color:#fff}.graphics-heading h2{font-family:var(--ui-font);font-size:14px;color:#ffff55;font-weight:400;letter-spacing:0}.effect-setting strong{color:#fff}.effect-setting small{color:#aaa;line-height:1.3}#graphics input[type=checkbox]{accent-color:#aaa}#toast{background:#0000aa;border:3px double #fff;color:#ffff55;font-family:var(--ui-font);font-size:14px;line-height:1.3;box-shadow:6px 6px #000}
.touch-stick{background:#0000aacc;border:2px solid #fff;border-radius:50%}.stick-knob{background:#aaa;border:2px solid #000;border-radius:50%}.stick-label{color:#fff;text-shadow:none;background:#0000aa}.touch-actions button,.touch-dialog button{font-family:var(--ui-font);font-size:14px;font-weight:400;background:#aaa;border:0;color:#000;border-radius:0;box-shadow:4px 4px #000}.touch-actions .touch-fire{color:#000}.touch-actions button.held,.touch-dialog button.held{background:#00aaaa;color:#000;box-shadow:1px 1px #000}
@media(max-width:950px){.brand>span,.tag{display:none}#classic-sidebar{width:208px}.hud-title{max-width:calc(100% - 260px)}}
@media(max-width:700px){header{height:48px;padding:0 10px}.brand b{font-size:28px;padding:0 4px}.top-actions{gap:6px}.top-actions button{padding:6px}.top-actions kbd{display:none}#graphics-btn{font-size:0}#graphics-btn:after{content:'FX';font-size:14px}#browser{width:calc(100vw - 20px)}.browser-bar{padding:10px}.library{border-right:0;border-bottom:1px solid #aaa;padding:12px}.launch{padding:12px}.launch-controls{flex-direction:column;align-items:stretch}.selectors{grid-template-columns:1fr}.selectors button{grid-column:auto}#world-list{height:224px}.library-bottom{font-size:14px}.launch h2{font-size:28px}.hud-title{margin:10px;max-width:calc(100% - 185px)}.hud-title strong{font-size:14px}.hud-title span{font-size:14px}#classic-sidebar{width:160px;top:10px;right:max(8px,env(safe-area-inset-right));padding:0;gap:4px}.sidebar-heading strong{margin:0 8px}#classic-sidebar .map-box{padding:0 4px}.map-heading,.map-caption{font-size:14px;line-height:1}.map-caption>span:last-child{font-size:0}.map-caption>span:last-child:after{content:'↑';font-size:14px}.controls-hint{font-size:14px;max-width:95vw;bottom:10px}.touch-client #classic-screen>div:after{font-family:var(--ui-font);font-size:14px}.touch-client .hud-title strong{font-size:14px}footer{font-size:14px;line-height:1.2}.graphics-heading h2{font-size:14px}}
@media(max-height:550px) and (orientation:landscape){header{height:44px}#hud{top:44px}#shade{top:44px}#classic-sidebar{display:grid;grid-template-columns:120px 160px;gap:4px;width:292px;top:6px;right:8px;padding:4px}.sidebar-heading{grid-column:1/-1}.sidebar-heading span{display:none}.sidebar-heading strong{margin:0}.map-heading{font-size:14px;line-height:1;padding:0 0 3px}.map-caption{font-size:14px;line-height:1;margin-top:3px}.map-caption>span:last-child{display:none}.classic-stats{align-self:start}.hud-title{max-width:calc(100% - 330px)}.touch-actions{bottom:130px;right:calc(175px + env(safe-area-inset-right))}.touch-client #classic-screen>div:after{font-size:14px}}

/* Preserve the original 60 x 25 CP437 title art in the world directory. */
.world-preview{margin:16px 0;background:#000;border:1px solid #aaa;scroll-margin-top:48px}
#world-preview{display:block;width:100%;height:auto;aspect-ratio:480/350;image-rendering:pixelated}
#preview-caption{padding:7px 8px;background:#0000aa;color:#aaa;font-size:14px;line-height:1.2;overflow-wrap:anywhere}

.directory-options{display:flex;gap:12px;margin-top:12px}.directory-options label{flex:1;min-width:0;color:#ffff55}.browse-pages{display:flex;align-items:center;gap:10px;margin-top:14px;flex-wrap:wrap}.browse-pages span{flex:1;color:#fff;text-align:center}.browse-pages button{padding:6px 8px}.browse-pages button:disabled{cursor:default}

#save-status{color:#aaa;font-size:14px;line-height:1.3}#world-link{display:block;margin:12px 0;color:#55ffff}.world small{overflow-wrap:anywhere}.world>span:nth-child(2){min-width:0}

#game-over{position:fixed;z-index:11;left:50%;top:50%;transform:translate(-50%,-50%);width:min(400px,calc(100vw - 24px));padding:24px;background:#0000aa;border:3px double #fff;color:#ffff55;box-shadow:8px 8px #000;pointer-events:auto;line-height:1.4;text-align:center}#game-over h2{color:#fff;font-family:var(--ui-font)}#game-over button{margin:8px}#restart-world{margin-top:12px}
