:root{color-scheme:dark;--bg:#10171b;--panel:#192227;--edge:#35434a;--ink:#eae7de;--muted:#a7b3b7;--gold:#e2bd78;--green:#84c7ab;--red:#f0a397;font:15px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:var(--bg);color:var(--ink)}button,input,select{font:inherit}button{cursor:pointer;border:1px solid var(--edge);background:#243138;color:var(--ink);padding:.55rem .85rem;border-radius:6px}button:hover:not(:disabled){border-color:var(--gold);background:#304149}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--gold);outline-offset:3px}.primary{background:var(--gold);color:#1f2523;border-color:var(--gold);font-weight:650}.primary:hover:not(:disabled){background:#f0d29c;color:#10171b}.danger{border-color:#885f58;color:#f1b3a8}input,select{width:100%;color:var(--ink);background:#111a1f;border:1px solid var(--edge);border-radius:5px;padding:.65rem .7rem;min-width:0}label{display:grid;gap:6px;font-size:.9rem;color:#cad1cf;margin-bottom:16px}h1,h2,h3,p{margin:0}h1{font:500 clamp(2rem,4.5vw,3.7rem)/1.12 Georgia,serif}h2{font:500 1.5rem/1.3 Georgia,serif}h3{font-size:.8rem;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);margin:16px 0 8px}p{white-space:pre-line}.subtle{color:var(--muted);font-size:.86rem}.eyebrow{font-size:.7rem;letter-spacing:.17em;color:var(--gold);font-weight:650}.topbar{height:70px;padding:0 max(24px,calc((100vw - 1380px)/2));border-bottom:1px solid var(--edge);display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{font:600 1.15rem Georgia,serif;letter-spacing:.12em;color:var(--gold);text-decoration:none}.brand span{font:400 .75rem system-ui;letter-spacing:.02em;color:var(--muted);margin-left:12px}#connection{font-size:.8rem;color:var(--muted)}.welcome{max-width:1080px;margin:clamp(32px,9vh,120px) auto;padding:24px;display:grid;grid-template-columns:1fr 380px;gap:100px;align-items:center}.intro .eyebrow{margin-bottom:24px}.intro>p:not(.eyebrow){max-width:440px;margin-top:24px;color:var(--muted)}.intro-rule{height:1px;background:var(--edge);width:70px;margin-top:28px}.login-card{background:var(--panel);border:1px solid var(--edge);border-top:3px solid var(--gold);border-radius:10px;padding:28px}.login-card>p{margin:8px 0 24px}.login-card .primary{width:100%}.text-button{border:0;background:transparent;color:var(--gold);font-size:.85rem;width:100%;margin-top:14px}.error{color:var(--red);font-size:.85rem;margin:8px 0}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}details{margin:16px 0}summary{cursor:pointer;color:var(--gold)}.stat-grid{margin:12px 0}.stat-row{display:flex;align-items:center;gap:8px;margin:8px 0}.stat-row>span:first-child{flex:1}.stat-row button{padding:1px 10px}.stat-row output{width:2em;text-align:center}.quiet{background:transparent;font-size:.8rem}#game{max-width:1380px;margin:auto;padding:20px 24px}.playerbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:18px;border-bottom:1px solid var(--edge);flex-wrap:wrap}.playerbar strong{color:var(--gold)}#player-level{font-size:.8rem;color:var(--muted);margin-left:10px}#vitals{display:flex;gap:18px;font-size:.85rem}.actions{display:flex;gap:6px;flex-wrap:wrap}.actions button{font-size:.8rem}.game-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(300px,1fr);gap:28px;margin-top:20px}.room-heading h1{font-size:1.9rem;margin:6px 0 16px}.scene{height:clamp(210px,29vw,370px);position:relative;overflow:hidden;background:#141d22;border:1px solid var(--edge);border-radius:8px}.scene>img{width:100%;height:100%;object-fit:cover;image-rendering:pixelated}.sprites{display:flex;align-items:flex-end;justify-content:center;gap:12px;position:absolute;bottom:14px;left:12px;right:12px}.entity{max-width:110px;padding:6px;background:#10171bca;border:1px solid #586660;border-radius:6px;display:grid;gap:5px;justify-items:center;font-size:.72rem;text-align:center;line-height:1.2}.entity img{max-width:75px;height:72px;object-fit:contain;image-rendering:pixelated}.entity.hostile{border-color:#a56b5f}.entity.selected{outline:2px solid var(--gold)}.entity small{color:var(--muted)}.room-description{font-size:.9rem;color:#bfc9c9;margin:16px 0;max-height:150px;overflow:auto}.passages{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}.passages button{color:var(--gold);text-align:left}.combatbar{margin:16px 0;display:flex;gap:6px;align-items:center;flex-wrap:wrap}.combatbar button{font-size:.8rem}#travel-status{font-size:.8rem;color:var(--green)}.ground{display:flex;gap:6px;flex-wrap:wrap}.ground button{font-size:.8rem}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.map-column{display:flex;flex-direction:column;min-height:530px}.map-tools{display:flex;gap:5px;flex-wrap:wrap;margin:10px 0}.map-tools button{font-size:.8rem}.map-tools select{width:auto;font-size:.8rem}.map-frame{position:relative;min-height:280px;height:100%;max-height:530px;flex:1;border:1px solid var(--edge);border-radius:6px;overflow:hidden;background:#101a1c}canvas{display:block;width:100%;height:100%;touch-action:none}.map-destination{display:flex;gap:16px;align-items:center;justify-content:space-between;margin-top:12px}.map-destination strong{font-size:.9rem;color:var(--gold)}.search-results{display:grid;gap:4px;margin-top:6px;max-height:160px;overflow:auto}.search-results:empty{margin:0}.search-results button{text-align:left;font-size:.8rem}.journal-log{border-top:1px solid var(--edge);margin-top:24px;padding-top:12px}#log{height:140px;overflow:auto;font-size:.82rem;color:#b1c4bd;padding:8px 0}#log p{margin:4px 0}#log .warning{color:var(--red)}#chat-form{display:flex;gap:8px}dialog{width:min(750px,calc(100vw - 28px));max-height:88vh;padding:22px;background:var(--panel);color:var(--ink);border:1px solid #687369;border-radius:10px}dialog::backdrop{background:#071013c9}.panel-top{display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid var(--edge);padding-bottom:14px;margin-bottom:16px;position:sticky;top:-22px;background:var(--panel);z-index:2}.panel-top h2{color:var(--gold)}.card{padding:14px;background:#111b1f;border:1px solid var(--edge);border-radius:6px;margin:12px 0}.card p{font-size:.9rem;margin:8px 0}.card h3{color:var(--gold);text-transform:none;letter-spacing:0;font-size:1rem;margin:0}.card .actions{margin-top:10px}.item-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--edge)}.item-row>div:first-of-type{flex:1}.item-row img{width:38px;height:38px;object-fit:contain;image-rendering:pixelated}.item-row small{color:var(--muted)}.tabs{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}.tabs button.active{border-color:var(--gold);color:var(--gold)}.progress{color:var(--green)}.warning{color:var(--red)}.stat-table{display:grid;gap:10px;margin:14px 0}.stat-table>div{display:flex;gap:8px;align-items:center}.stat-table span{flex:1}#notice{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);background:#293e3c;color:#fff;padding:12px 18px;border:1px solid #6c9e90;border-radius:8px;max-width:90vw;font-size:.9rem;z-index:10}meter{width:75px;height:9px}@media(max-width:850px){.welcome{gap:35px;grid-template-columns:1fr 350px}.game-grid{gap:18px;grid-template-columns:1fr}.map-column{min-height:430px}.map-frame{height:320px;flex:auto}.intro h1{font-size:2.6rem}}@media(max-width:600px){.topbar{height:60px;padding:0 16px}.brand span{display:none}.welcome{display:block;margin:12px auto;padding:16px;max-width:420px}.intro{margin-bottom:24px}.intro h1{font-size:2.2rem}.intro>p:not(.eyebrow){margin-top:14px}.intro .eyebrow{margin-bottom:14px}.intro-rule,.intro>.subtle{display:none}.login-card{padding:22px}#game{padding:16px}.playerbar{gap:10px}.playerbar .actions{width:100%}.room-heading h1{font-size:1.6rem}.entity img{height:55px;max-width:55px}.entity{max-width:85px}.scene{height:250px}#vitals{gap:12px}.map-destination{align-items:flex-start}.item-row{flex-wrap:wrap}.item-row .actions{width:100%}}

.player-identity{display:flex;align-items:center;gap:12px}.player-portrait{width:48px;height:64px;object-fit:contain;image-rendering:pixelated;background:#111b1f;border:1px solid var(--edge);border-radius:6px;padding:3px}.sprite-group{display:contents}.sprites{justify-content:flex-start;overflow-x:auto;padding:3px;gap:10px}.sprites>.sprite-group>.entity{flex-shrink:0;min-width:64px}.avatar{border-color:#709b8b}.own-avatar{border-color:var(--green)}

.avatar-picture{position:relative;display:block;width:90px;height:90px;flex-shrink:0}.avatar-picture img{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:contain;image-rendering:pixelated}.player-portrait{display:block;width:72px;height:72px;padding:0}.player-portrait .avatar-picture{width:100%;height:100%}.entity .avatar-picture{width:78px;height:78px}.entity .avatar-picture img{height:100%;max-width:none}.creation-preview{display:flex;justify-content:center;margin-bottom:12px}.creation-preview .avatar-picture,.equipment-preview .avatar-picture{width:140px;height:140px}.equipment-preview{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border-bottom:1px solid var(--edge);margin-bottom:12px}.chest-card{padding:12px;border:1px solid #756440;border-radius:6px;background:#171c1b;min-width:180px}.chest-card strong{color:var(--gold)}.chest-card p{margin:4px 0 10px}.map-frame{background:#101417}#world-map{cursor:grab}

.item-stats{color:#ddca9d;font-size:.8rem!important}.comparison{color:var(--green);font-size:.8rem!important}
/* Room-first play surface: one place, a short occupant list, and direct exits. */
.topbar{height:54px}.topbar .brand{font-size:1rem}.playerbar{flex-wrap:nowrap;padding-bottom:12px;gap:14px}.player-portrait{width:54px;height:54px;border:0;background:transparent}.player-identity{gap:8px}#player-level{display:block;margin:1px 0 0;font-size:.75rem}#game{max-width:1180px;padding:16px 24px}.game-grid{grid-template-columns:minmax(0,1.55fr) minmax(270px,1fr);gap:32px;margin-top:18px}.room-heading h1{font-size:1.75rem;margin:4px 0 12px}.scene{height:195px;max-height:24vh;border-radius:7px}.scene>img{object-fit:cover}.room-avatar{position:absolute;bottom:6px;left:16px;pointer-events:none}.room-avatar .avatar-picture{width:92px;height:92px;filter:drop-shadow(0 3px 2px #0008)}.room-description{font-size:.86rem;line-height:1.55;max-height:none;overflow:visible;margin:12px 0 8px}.room-column>#read-room{margin:0 0 8px;padding:0;width:auto}.section-title h2{font:600 .85rem system-ui}.people-section{margin-top:16px}.people-section .section-title{margin-bottom:8px}.occupant-list{display:grid;grid-template-columns:1fr 1fr;gap:6px}.occupant{width:100%;display:flex;align-items:center;text-align:left;gap:9px;padding:6px 10px;background:#172126;border:1px solid #2c393f;border-radius:6px;min-height:45px}.occupant img{width:28px;height:32px;object-fit:contain;image-rendering:pixelated}.occupant>span:nth-child(2){min-width:0;flex:1}.occupant strong{display:block;font-size:.8rem;font-weight:500}.occupant small{display:block;color:var(--muted);font-size:.7rem}.occupant-quantity{font-size:.76rem;color:var(--muted)}.occupant.selected{border-color:var(--gold)}.occupant-list>details{grid-column:1/-1;margin:4px 0}.occupant-list>details summary{font-size:.78rem}.combatbar{margin:12px 0 0;min-height:36px}.combatbar>button{font-size:.78rem;padding:.4rem .7rem}.quiet-options{margin:0}.quiet-options>summary{font-size:.76rem;color:var(--muted)}.quiet-options>div{margin-top:6px}.map-column{min-height:0;display:block;align-self:start;padding:18px;border:1px solid var(--edge);border-radius:8px;background:#141d21}.map-column .section-title{margin-bottom:6px}.exit-instructions{font-size:.78rem;margin-bottom:16px}.current-room-tile{padding:14px;border:1px solid #6f9687;background:#1d2e2a;border-radius:6px;margin-bottom:12px;display:grid;gap:4px}.current-room-tile>span{font-size:.68rem}.current-room-tile>strong{font-size:.88rem;color:#a9ddc5}.nearby-rooms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.exit-tile{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:5px;min-height:74px;padding:10px;background:#20282a;border:1px solid #65583a;border-radius:5px;text-align:left}.exit-tile small{color:#b5aa8b;font-size:.66rem}.exit-tile strong{font-size:.76rem;font-weight:500;line-height:1.35;color:#e8d6aa;overflow-wrap:anywhere}#travel-status{margin-top:12px;min-height:1em;font-size:.75rem}.more-menu{position:relative;margin:0}.more-menu>summary{list-style:none;color:var(--muted);font-size:.8rem;padding:.55rem .6rem;cursor:pointer}.more-menu>div{position:absolute;right:0;top:100%;z-index:4;display:grid;gap:4px;padding:8px;min-width:160px;background:var(--panel);border:1px solid var(--edge);border-radius:7px;box-shadow:0 10px 24px #0006}.more-menu button{text-align:left}.room-objects{font-size:.8rem;margin:12px 0}.room-objects>summary{color:var(--muted)}.room-objects>div{margin-top:10px}.journal-log{margin-top:18px;padding-top:10px}.journal-log>details{margin:0 0 8px}.journal-log>details>summary{color:var(--muted);font-size:.76rem}#chat-form input,#chat-form button{font-size:.8rem;padding:.45rem .7rem}#log{height:110px}.place-result{display:block;width:100%;text-align:left;margin:6px 0;font-size:.86rem}#place-search{margin:16px 0}#panel-body>img{height:100px;max-width:140px;object-fit:contain;image-rendering:pixelated}#panel-body>p+.primary{margin-top:16px}.chest-card{min-width:0;width:100%}.chest-card p{font-size:.8rem}.brand span{font-size:.7rem}
@media(max-width:850px){.game-grid{grid-template-columns:minmax(0,1fr) 280px;gap:18px}.map-column{min-height:0}.playerbar{flex-wrap:wrap}.playerbar>.actions{width:auto}.scene{height:175px}.occupant-list{grid-template-columns:1fr}}
@media(max-width:650px){#game{padding:12px 16px}.game-grid{display:flex;flex-direction:column;gap:18px}.room-column,.map-column{width:100%}.map-column{padding:14px}.nearby-rooms{grid-template-columns:repeat(3,minmax(0,1fr))}.exit-tile{min-height:64px;padding:8px}.occupant-list{grid-template-columns:1fr 1fr}.scene{height:155px;max-height:22vh}.playerbar{gap:10px}.playerbar>.actions{width:100%}#vitals{margin-left:auto;font-size:.75rem;gap:10px}.room-heading h1{font-size:1.5rem}.journal-log{margin-top:16px}}
/* Compact square map: every visible destination is a single exit. */
.square-map-frame{overflow:auto;background:#10171a;border:1px solid var(--edge);border-radius:6px;padding:14px;max-height:340px}.square-map{display:grid;grid-template-columns:repeat(var(--map-columns,3),44px);grid-template-rows:repeat(var(--map-columns,3),44px);grid-auto-rows:44px;gap:6px;width:max-content;margin:auto}.room-square{display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:0;border-radius:3px;background:#89774d;border:2px solid #b09a64;color:#161e21;font-weight:700}.room-square:hover:not(:disabled){background:#c1a362;border-color:#f4d99a}.room-square.current-square{background:#5f5943;border-color:#e2bd78;box-shadow:0 0 0 2px #e2bd7833}.you-marker{width:12px;height:12px;border-radius:50%;background:#72c5e9;border:2px solid #eefaff;box-shadow:0 0 0 3px #39799977}.room-square.locked-square{background:#34342f;border-style:dashed}.square-map-caption{font-size:.73rem;min-height:2.8em;margin:9px 0}.room-name-exits{margin:10px 0 0}.room-name-exits>summary{font-size:.78rem}.room-name-exits>.nearby-rooms{margin-top:10px}.scene{height:auto;max-height:none;aspect-ratio:3/1}.scene>img{display:block;width:100%;height:100%;object-fit:contain;object-position:center}.scene.scene-loading{visibility:hidden}
@media(max-width:650px){.scene{height:auto;max-height:none}.square-map-frame{max-height:280px}}
