@font-face{font-family:Alegreya Sans;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/alegreya-sans-cyrillic-400-normal-CFUoBDld.woff2)format("woff2"),url(/assets/alegreya-sans-cyrillic-400-normal-C2XSGevv.woff)format("woff")}@font-face{font-family:Alegreya Sans;font-style:normal;font-display:swap;font-weight:700;src:url(/assets/alegreya-sans-cyrillic-700-normal-BMO00Gdb.woff2)format("woff2"),url(/assets/alegreya-sans-cyrillic-700-normal-qSextXl4.woff)format("woff")}@font-face{font-family:Alegreya Sans;font-style:normal;font-display:swap;font-weight:800;src:url(/assets/alegreya-sans-cyrillic-800-normal-D2Jsre_s.woff2)format("woff2"),url(/assets/alegreya-sans-cyrillic-800-normal-BCYhB7NR.woff)format("woff")}@font-face{font-family:Alegreya Sans;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/alegreya-sans-latin-400-normal-DtLlO8BS.woff2)format("woff2"),url(/assets/alegreya-sans-latin-400-normal-DmA8jeke.woff)format("woff")}@font-face{font-family:Alegreya Sans;font-style:normal;font-display:swap;font-weight:700;src:url(/assets/alegreya-sans-latin-700-normal-DEbcy2sF.woff2)format("woff2"),url(/assets/alegreya-sans-latin-700-normal-BnzUNlma.woff)format("woff")}@font-face{font-family:Alegreya Sans;font-style:normal;font-display:swap;font-weight:800;src:url(/assets/alegreya-sans-latin-800-normal-CpHsWMQ0.woff2)format("woff2"),url(/assets/alegreya-sans-latin-800-normal-17etSahV.woff)format("woff")}@font-face{font-family:Alegreya;font-style:normal;font-display:swap;font-weight:800;src:url(/assets/alegreya-cyrillic-800-normal-TM6to0H1.woff2)format("woff2"),url(/assets/alegreya-cyrillic-800-normal-BgJWiuWK.woff)format("woff")}@font-face{font-family:Alegreya;font-style:normal;font-display:swap;font-weight:800;src:url(/assets/alegreya-latin-800-normal-BcufLBxY.woff2)format("woff2"),url(/assets/alegreya-latin-800-normal-C-QiqklE.woff)format("woff")}:root{--paper:#ead9b5;--paper-light:#f4e6c4;--paper-deep:#d9c391;--paper-shade:#c9ad75;--ink:#3a2a1a;--ink-soft:#6b543a;--edge:#8b6b45;--accent:#b5651d;--ok:#2f6f33;--bad:#a3271c}html,body{height:100%;color:var(--ink);background:#1a1620;margin:0;font-family:system-ui,sans-serif;overflow:hidden}button{color:var(--ink);font-family:inherit}canvas{width:100vw;height:100vh;image-rendering:pixelated;touch-action:none;display:block;position:fixed;inset:0}#bg{z-index:0;pointer-events:none}#gpu{z-index:1}#view{z-index:2;cursor:crosshair}.debug-toggle{z-index:4;background:var(--paper-deep);border:2px solid var(--edge);cursor:pointer;opacity:.85;border-radius:6px;min-width:64px;min-height:28px;padding:2px 8px;font-size:14px;position:fixed;top:8px;left:8px}.debug{z-index:4;box-sizing:border-box;background:var(--paper);border:2px solid var(--edge);border-radius:8px;width:min(460px,100vw - 100px);max-height:calc(100vh - 160px);padding:10px 12px;font-size:14px;position:fixed;top:8px;left:84px;overflow:auto;box-shadow:0 6px 18px #00000073}.debug header{justify-content:space-between;align-items:center;margin-bottom:6px;display:flex}.debug h3{margin:0;font-size:17px}.debug button{background:var(--paper-deep);border:2px solid var(--edge);cursor:pointer;border-radius:6px;min-height:32px;padding:4px 10px}.debug button.on{background:var(--paper-light);border-color:var(--accent)}.debug button.danger{border-color:var(--bad);background:#e2a393}.debug dl{margin:0 0 8px}.debug dl>div{border-bottom:1px dotted var(--paper-shade);grid-template-columns:124px 1fr;gap:8px;padding:2px 0;display:grid}.debug dt{color:var(--ink-soft)}.debug dd{overflow-wrap:anywhere;margin:0}.debug-damage{align-items:center;gap:8px;margin-bottom:8px;display:flex}.debug-damage input{flex:1}.debug-actions{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.debug-warning{color:var(--bad);font-weight:700}.debug-status{min-height:14px;color:var(--ink-soft);margin:6px 0 0}.gauge{z-index:3;width:64px;display:flex;position:fixed;top:44px;bottom:128px;left:8px}.gauge-track{border:2px solid var(--edge);touch-action:none;cursor:ns-resize;box-sizing:border-box;background:#1a1612;border-radius:6px;flex:0 0 26px;height:100%;position:relative;overflow:hidden}.gauge-seg{background-color:#3a322a;background-repeat:repeat;background-size:64px 64px;position:absolute;left:0;right:0}.gauge-sky{background:linear-gradient(#6f9ed6,#9cc3ea)}.gauge-closed{background:#0c0a08}.gauge-marker{background:#f5d27a;border-radius:2px;height:4px;margin-top:-2px;position:absolute;left:-3px;right:-3px;box-shadow:0 0 4px #f5d27acc}.gauge-readout{background:var(--paper);border:1px solid var(--edge);white-space:nowrap;border-radius:4px;padding:1px 6px;font-size:14px;font-weight:700;position:absolute;left:34px;transform:translateY(-50%)}.screen-rail{z-index:3;flex-direction:column;gap:6px;display:flex;position:fixed;top:50%;right:8px;transform:translateY(-50%)}.screen-rail button{background:var(--paper);border:2px solid var(--edge);cursor:pointer;border-radius:6px;min-width:84px;min-height:44px;padding:6px 10px;font-size:15px;font-weight:700}.ribbon{z-index:3;pointer-events:none;flex-direction:column;align-items:center;display:flex;position:fixed;bottom:0;left:0;right:0}.ribbon>*{pointer-events:auto}.ribbon-card{box-sizing:border-box;background:var(--paper);border:2px solid var(--edge);border-radius:8px;align-self:flex-start;width:min(340px,100vw - 92px);margin:0 0 6px 84px;padding:8px 12px;box-shadow:0 4px 12px #0006}.ribbon-card h3{margin:0 0 2px;font-size:17px}.ribbon-card p{margin:0;font-size:14px;line-height:1.35}.ribbon-card .ribbon-stock{margin-top:4px;font-weight:700}.ribbon-stock span{margin-right:8px}.ribbon-stock span.ok{color:#2f6b2f}.ribbon-stock span.lack{color:#a8452f}.ribbon-priority{flex-wrap:wrap;align-items:center;gap:4px;margin-top:6px;font-size:14px;display:flex}.ribbon-priority span{color:var(--ink-soft);flex-basis:100%}.ribbon-priority button{background:var(--paper-deep);border:2px solid var(--edge);cursor:pointer;border-radius:6px;width:28px;height:28px;padding:0;font-size:15px;font-weight:700}.ribbon-priority button.on{color:#fff;background:var(--accent);border-color:#7a3f0e}.ribbon-items{box-sizing:border-box;align-items:center;gap:6px;max-width:100vw;min-height:52px;padding:0 8px 6px;display:flex;overflow-x:auto}.ribbon-item{background:var(--paper-deep);border:2px solid var(--edge);cursor:pointer;border-radius:8px;flex:none;align-items:center;gap:6px;min-height:48px;padding:4px 12px 4px 6px;font-size:15px;font-weight:700;display:flex;position:relative}.ribbon-item.on{background:var(--paper-light);border-color:var(--accent);box-shadow:0 0 0 2px #b5651d73}.ribbon-item .slot{--slot:44px}.ribbon-key{text-align:center;min-width:16px;color:var(--paper-light);background:var(--ink-soft);border-radius:8px;padding:0 3px;font-size:12px;line-height:16px;display:inline-block}.ribbon-count{text-align:center;color:#fff;background:var(--accent);border-radius:9px;min-width:18px;padding:0 4px;font-size:13px;line-height:18px}.ribbon-empty{background:var(--paper-deep);border:2px dashed var(--edge);border-radius:8px;padding:6px 12px;font-size:14px}.ribbon-tabs{box-sizing:border-box;background:linear-gradient(#a98659,#8b6b45);border-top:2px solid #6d5233;justify-content:center;align-items:flex-end;gap:4px;width:100%;padding:6px 8px 0;display:flex;overflow-x:auto}.ribbon-tab,.ribbon-hand{white-space:nowrap;background:var(--paper);cursor:pointer;border:2px solid #6d5233;border-bottom:none;border-radius:8px 8px 0 0;flex:none;align-items:center;gap:6px;min-height:44px;padding:6px 18px;font-size:18px;font-weight:700;display:flex}.ribbon-hand{background:var(--paper-deep)}.ribbon-hand+.ribbon-tab{margin-left:14px}.ribbon-tab.on,.ribbon-hand.on{background:var(--paper-shade);box-shadow:inset 0 3px 0 var(--accent)}.screen-backdrop{z-index:5;box-sizing:border-box;background:#000000b3;justify-content:center;align-items:center;padding:16px;display:flex;position:fixed;inset:0}.screen-dialog{box-sizing:border-box;background:var(--paper);border:2px solid var(--edge);border-radius:10px;width:min(960px,100%);max-height:100%;padding:12px;overflow:auto}.screen-dialog header{justify-content:space-between;align-items:center;gap:8px;display:flex}.screen-dialog h2{margin:0;font-size:20px}.screen-dialog header button{background:var(--paper-deep);border:2px solid var(--edge);cursor:pointer;border-radius:6px;min-width:44px;min-height:44px;padding:6px 12px}.screen-note{color:var(--ink-soft);font-size:15px}.screen-dialog img{border-radius:6px;width:100%;height:auto;display:block}.priorities-legend{flex-wrap:wrap;gap:6px 14px;margin:8px 0 4px;padding:0;font-size:14px;list-style:none;display:flex}.priorities-legend li{align-items:center;gap:6px;display:flex}.priorities-legend .priority{cursor:default;justify-content:center;align-items:center;width:26px;height:22px;font-size:11px;display:inline-flex}.priorities-note{color:var(--ink-soft);margin:4px 0 8px;font-size:15px}.priorities-scroll{overflow-x:auto}.priorities table{border-collapse:collapse;width:100%}.priorities th,.priorities td{text-align:center;border-bottom:1px solid var(--paper-shade);padding:5px}.priorities-column{white-space:nowrap;background:var(--paper-deep);border:2px solid var(--edge);cursor:pointer;border-radius:6px;padding:4px 6px;font-size:14px;font-weight:700}.priorities tbody th{text-align:left;white-space:nowrap}.priorities tbody th strong,.priorities tbody th span{display:block}.priorities tbody th span{color:var(--ink-soft);font-size:14px;font-weight:400}.priority{letter-spacing:-2px;width:44px;height:36px;color:var(--ink);background:var(--paper-deep);border:2px solid var(--edge);cursor:pointer;border-radius:8px;font-size:17px;font-weight:700}.priority.level-0{color:var(--bad);background:0 0;border-style:dashed}.priority.level-1{color:#7b3b12;background:#c9b9a2}.priority.level-2{color:#8a5a16;background:#d9cbb0}.priorities-foot{color:var(--ink-soft);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-top:8px;font-size:15px;display:flex}.priorities-foot button{background:var(--paper-deep);border:2px solid var(--edge);cursor:pointer;border-radius:6px;min-height:36px;padding:4px 10px}.ledger{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:10px;display:grid}.ledger-card{background:var(--paper-deep);border:2px solid var(--edge);border-radius:8px;padding:10px 12px}.ledger-card h3{margin:0 0 4px;font-size:18px}.ledger-total{color:#7a5a10;margin:0 0 8px;font-size:26px;font-weight:700}.ledger dl{margin:0}.ledger dl>div{border-bottom:1px dotted var(--paper-shade);justify-content:space-between;gap:10px;padding:3px 0;font-size:15px;display:flex}.ledger dd{margin:0;font-weight:700}.ledger-empty,.ledger-note{color:var(--ink-soft);margin:0;font-size:15px}.store-list{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.store-list li{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 10px;font-size:15px;display:grid}.store-list .store-bar{grid-area:2/1/auto/-1}.store-name{flex-direction:column;font-weight:700;display:flex}.store-name small{color:var(--ink-soft);font-weight:400}.store-bar{background:var(--paper-shade);border:1px solid var(--edge);border-radius:5px;height:10px;overflow:hidden}.store-bar span{background:var(--accent);height:100%;display:block}.store-fill{white-space:nowrap;margin:4px 0 8px;font-size:15px;font-weight:700}.store-list .store-fill{margin:0}.store{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:12px;margin-top:10px;display:grid}.store .station-tabs{grid-column:1/-1;margin-bottom:0}.store-card{background:var(--paper-deep);border:2px solid var(--edge);border-radius:8px;padding:10px 12px}.store-card h3{margin:0 0 6px;font-size:18px}.store-card h4{color:var(--ink-soft);margin:8px 0 4px;font-size:15px}.store-card dl{margin:0}.store-card dl>div{border-bottom:1px dotted var(--paper-shade);justify-content:space-between;gap:10px;padding:3px 0;font-size:15px;display:flex}.store-card dl>div.leaving{color:var(--ink-soft);text-decoration:line-through}.store-card dd{margin:0;font-weight:700}.store-note{color:var(--ink-soft);margin:6px 0;font-size:15px}.store-modes,.store-chips{flex-wrap:wrap;gap:6px;display:flex}.store-modes button,.store-chips button{background:var(--paper);border:2px solid var(--edge);cursor:pointer;border-radius:6px;min-height:34px;padding:2px 10px;font-size:15px}.store-modes button{font-weight:700}.store-chips button{opacity:.55}.store-modes button.on,.store-chips button.on{color:#fff;background:var(--accent);opacity:1;border-color:#7a3f0e}.neighbours-summary{margin:8px 0;font-size:16px}.neighbours-note{color:var(--ink-soft);margin:6px 0;font-size:15px}.neighbours-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0;padding:0;list-style:none;display:grid}.neighbour-card{background:var(--paper-deep);border:2px solid var(--edge);border-radius:8px;padding:10px 12px}.neighbour-card h3{margin:0;font-size:18px}.neighbour-heraldry{color:var(--ink-soft);margin:2px 0 8px;font-size:15px;font-style:italic}.neighbour-trust{margin:4px 0 0;font-size:15px;font-weight:700}.contract{border-top:2px solid var(--paper-shade);margin-top:10px;padding-top:8px}.contract h4{margin:0 0 4px;font-size:16px}.contract dl{margin:0}.contract dl>div{border-bottom:1px dotted var(--paper-shade);justify-content:space-between;gap:10px;padding:3px 0;font-size:15px;display:flex}.contract dd{margin:0;font-weight:700}.contract-caravan{margin:8px 0;font-size:15px;font-weight:700}.contract button{background:var(--paper);border:2px solid var(--edge);cursor:pointer;border-radius:6px;min-height:40px;padding:4px 14px;font-weight:700}.contract button.on{color:#fff;background:var(--accent);border-color:#7a3f0e}.hud-alerts{z-index:4;flex-direction:column;align-items:center;gap:4px;max-width:min(520px,100vw - 180px);display:flex;position:fixed;top:8px;left:50%;transform:translate(-50%)}.hud-alert{color:#fff;cursor:pointer;background:#a8452f;border:2px solid #6d2415;border-radius:6px;min-height:34px;padding:4px 12px;font-size:15px;font-weight:700}.dwarves{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;margin:10px 0 0;padding:0;list-style:none;display:grid}.dwarf-card{background:var(--paper-deep);border:2px solid var(--edge);border-radius:8px;gap:10px;padding:10px;display:flex}.dwarf-card .slot{--slot:76px}.dwarf-body h3{margin:0;font-size:18px}.dwarf-body p{margin:2px 0 0;font-size:15px}.dwarf-role{color:var(--ink-soft)}.quests{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:10px;display:grid}.quest{background:var(--paper-deep);border:2px solid var(--edge);border-radius:8px;padding:10px 12px}.quest h3{margin:0 0 2px;font-size:18px}.quest-motto{color:var(--ink-soft);margin:0 0 8px;font-size:15px}.quest ol{margin:0;padding-left:20px;font-size:15px;line-height:1.5}.craft{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:12px;display:grid}.craft h3{margin:0 0 6px;font-size:17px}.craft ul{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.craft-stock li{align-items:center;gap:8px;font-size:15px;display:flex}.craft-stock .slot{--slot:36px}.slot{--slot:40px;box-sizing:border-box;width:var(--slot);height:var(--slot);padding:calc(var(--slot) * .14);flex:none;justify-content:center;align-items:center;display:inline-flex}.slot .item-icon{object-fit:contain;width:100%;height:100%}.item-swatch{box-sizing:border-box;background:var(--paper-shade);border:2px solid var(--edge);border-radius:5px;display:inline-block}.craft-stock li strong{margin-left:auto}.craft-empty{color:var(--ink-soft);font-size:15px}.recipe{background:var(--paper-deep);border:2px solid var(--edge);border-radius:8px;align-items:center;gap:10px;margin-bottom:8px;padding:8px;display:flex}.recipe>.slot{--slot:58px}.recipe-body{flex:1;min-width:0}.recipe h4{margin:0 0 4px;font-size:16px}.recipe-in{flex-wrap:wrap;gap:4px 10px;margin:0;font-size:14px;font-weight:700;display:flex}.recipe-in .ok{color:var(--ok)}.recipe-in .lack{color:var(--bad)}.recipe-have{color:var(--ink-soft);margin:4px 0 0;font-size:14px}.station-tabs{flex-wrap:wrap;gap:6px;margin-bottom:8px;display:flex}.station-tabs button,.queue-buttons button{background:var(--paper);border:2px solid var(--edge);cursor:pointer;border-radius:6px;min-width:34px;min-height:34px;padding:2px 8px;font-weight:700}.station-tabs button.on,.queue-buttons button.on{color:#fff;background:var(--accent);border-color:#7a3f0e}.queue-buttons button:disabled{opacity:.35;cursor:default}.craft ol.queue{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.queue-item{background:var(--paper-deep);border:2px solid var(--edge);border-radius:8px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px;padding:6px 8px;display:flex}.queue-item.paused_missing_resources{border-style:dashed}.queue-item.completed{opacity:.6}.queue-name{font-size:16px;font-weight:700}.queue-name small{color:var(--ink-soft);font-size:14px;font-weight:400;display:block}.queue-buttons{gap:4px;display:flex}.craft-recipes h3{margin-top:10px}.recipe-buttons{flex-direction:column;gap:6px;display:flex}.recipe-buttons button{background:var(--paper);border:2px solid var(--edge);cursor:pointer;border-radius:6px;min-width:52px;min-height:44px}.recipe-buttons button:disabled{opacity:.4;cursor:default}.station-card{margin-bottom:10px}.station-card h3{margin:0 0 2px}.station-speed,.station-room,.station-note{margin:2px 0;font-size:14px}.station-room{font-weight:700}.station-room.ok{color:var(--ok)}.station-room.lack{color:var(--bad)}.station-note{color:var(--ink-soft)}.station-upgrade{border-top:2px dashed var(--paper-shade);align-items:center;gap:10px;margin-top:6px;padding-top:6px;display:flex}.station-upgrade-body{flex:1;min-width:0}.station-upgrade-body strong{margin-bottom:4px;font-size:15px;display:block}.diet-note{margin:0 0 10px;font-size:15px}.diet-scroll{margin-bottom:10px;overflow-x:auto}.diet table{border-collapse:collapse;width:100%}.diet th,.diet td{text-align:center;border-bottom:1px dashed var(--paper-shade);padding:4px 6px;font-size:14px}.diet th small{color:var(--ink-soft);font-weight:400;display:block}.diet tbody th{text-align:left;white-space:nowrap}.diet tr.personal th{color:var(--accent)}.diet-cell{width:34px;height:34px;color:var(--bad);background:var(--paper-deep);border:2px solid var(--edge);cursor:pointer;border-radius:8px;font-size:16px;font-weight:700}.diet-cell.on{color:#fff;background:var(--ok);border-color:#2f5d2a}.diet-reset{background:var(--paper);border:2px solid var(--edge);cursor:pointer;border-radius:6px;min-height:34px;padding:0 8px;font-weight:700}.dwarf-needs{flex-wrap:wrap;gap:4px 16px;margin:4px 0;font-size:14px;display:flex}.need{align-items:center;gap:6px;display:inline-flex}.need-bar{background:#33261a;border:2px solid #20170f;border-radius:6px;width:70px;height:9px;display:inline-block;overflow:hidden}.need-bar span{background:var(--ok);height:100%;display:block}.need.mid .need-bar span{background:#d9a02a}.need.low .need-bar span{background:var(--bad)}.need.low{color:var(--bad);font-weight:700}.network.water h4{color:#2d6fb8}.network.gas h4{color:#3f8a2a}.network.power h4{color:#a8791a}.research{gap:12px;display:grid}.research h3{margin:0 0 6px;font-size:17px}.research-name{margin:0 0 6px;font-size:17px;font-weight:700}.research-actions{gap:6px;margin:6px 0;display:flex}.research-milestone{margin-bottom:8px}.tech{align-items:center;gap:10px;margin-bottom:8px;display:flex}.tech-body{flex:1;min-width:0}.tech h4{margin:0 0 2px;font-size:16px}.tech-text,.tech-unlocks,.tech-progress,.tech-note{margin:2px 0 0;font-size:14px}.tech-unlocks{color:var(--ink-soft)}.tech-progress{font-weight:700}.tech-note{color:var(--bad);font-weight:700}.tech-note.ok{color:var(--ok)}.ribbon-card .ribbon-lock{color:var(--bad);font-weight:700}.station-upgrade>.slot{--slot:44px}.station-card .store-modes{margin-top:8px}.recipe-lock{color:var(--bad);margin:4px 0 0;font-size:14px;font-weight:700}@media (width<=700px){.gauge{bottom:140px}.screen-rail{flex-flow:wrap;justify-content:flex-end;top:8px;left:84px;right:8px;transform:none}.screen-rail button{min-width:0;padding:6px 8px;font-size:14px}.debug{width:calc(100vw - 52px);top:108px;left:44px}.ribbon-card{width:calc(100vw - 84px);margin-left:76px;padding:6px 8px}.ribbon-card h3{font-size:15px}.ribbon-card p:not(.ribbon-stock){display:none}.ribbon-priority{gap:3px;margin-top:4px}.ribbon-priority span{display:none}.ribbon-priority button{width:26px;height:26px}.ribbon-tabs{justify-content:flex-start}.ribbon-tab,.ribbon-hand{padding:6px 10px;font-size:15px}.ribbon-items{justify-content:flex-start;width:100%}.craft,.quests,.store,.neighbours-list{grid-template-columns:minmax(0,1fr)}.ledger{grid-template-columns:1fr}}.hud-pinch{z-index:4;max-width:min(680px,100vw - 32px);color:var(--ink);background:var(--paper-light);border:2px solid var(--accent);border-radius:8px;align-items:center;gap:10px;padding:6px 12px;font-size:15px;font-weight:700;display:flex;position:fixed;bottom:226px;left:50%;transform:translate(-50%)}.hud-pinch button{background:var(--paper);border:2px solid var(--edge);cursor:pointer;border-radius:6px;min-height:36px;padding:2px 10px}.shrine.hidden{opacity:.75}.shrine.awake{border-color:var(--ok)}.scene-backdrop{z-index:30}.scene{box-sizing:border-box;width:min(640px,100vw - 32px);max-height:calc(100vh - 48px);color:var(--ink);background:var(--paper-light);border:3px solid var(--edge);box-shadow:0 0 0 6px var(--paper-deep), 0 18px 48px #0000008c;border-radius:12px;padding:22px 28px 18px;overflow-y:auto}.scene header{text-align:center;border-bottom:2px dotted var(--paper-shade);margin-bottom:12px}.scene h2{margin:0;font-size:26px}.scene-subtitle{color:var(--ink-soft);margin:2px 0 10px;font-size:15px}.scene-line{margin:0 0 12px;font-size:17px;line-height:1.45}.scene-line strong{color:var(--accent);text-transform:uppercase;letter-spacing:.04em;font-size:14px;display:block}.scene-note{background:var(--paper-deep);border:2px solid var(--edge);border-radius:8px;margin:4px 0 12px;padding:8px 10px;font-size:15px}.scene footer{justify-content:flex-end;display:flex}.scene footer button{background:var(--paper);border:2px solid var(--edge);cursor:pointer;border-radius:6px;min-width:120px;min-height:44px;font-weight:700}.overworld{background:var(--paper-light);border:2px solid var(--edge);border-radius:10px;width:100%;max-height:320px;margin:6px 0 12px;display:block}.overworld-mountain{fill:#8f8170;stroke:var(--ink);stroke-width:2px}.overworld-snow{fill:#f4eee2}.overworld-road{stroke:var(--edge);stroke-width:3px;stroke-dasharray:8 6}.overworld-post{fill:var(--paper);stroke:var(--edge);stroke-width:2px;stroke-dasharray:4 3}.overworld-post.built{fill:var(--accent);stroke-dasharray:none}.overworld-crest{stroke:var(--ink);stroke-width:2px}.overworld-caravan{fill:var(--paper-light);stroke:var(--ink);stroke-width:2px}.overworld-caravan.waiting{fill:var(--ok)}.overworld-label{fill:var(--ink);font-size:14px;font-weight:700}.overworld-label.small{font-size:12px}.neighbour-crest{vertical-align:-2px;border:2px solid var(--ink);border-radius:2px 2px 8px 8px;width:14px;height:18px;margin-right:8px;display:inline-block}.market-lot{border-bottom:1px dotted var(--paper-shade);justify-content:space-between;align-items:center;gap:10px;padding:4px 0;font-size:15px;display:flex}.market-lot button{background:var(--paper);border:2px solid var(--edge);cursor:pointer;border-radius:6px;min-height:36px;padding:2px 10px;font-weight:700}.market-lot button:disabled,.contract button:disabled{opacity:.45;cursor:default}.ore-sale,.summit{margin-top:14px}.story-steps{margin:0;padding-left:22px;font-size:15px;line-height:1.5}.story-step.later{color:var(--ink-soft);opacity:.7}.story-step.done{color:var(--ok)}.story-step ul,.story-tasks{margin:2px 0 6px;padding-left:4px;font-size:15px;line-height:1.5;list-style:none}.story-step li.ok,.story-tasks li.ok{color:var(--ok)}.story-actions{flex-wrap:wrap;gap:8px;margin-top:8px;display:flex}.story-actions button{background:var(--paper);border:2px solid var(--edge);cursor:pointer;border-radius:6px;min-height:40px;padding:4px 12px;font-weight:700}.story-actions button:disabled{opacity:.55;cursor:default}.story-tracker{z-index:3;text-align:left;max-width:300px;color:var(--ink);background:var(--paper-light);border:2px solid var(--edge);opacity:.94;cursor:pointer;border-radius:8px;flex-direction:column;gap:2px;padding:8px 10px;font-size:13px;line-height:1.35;display:flex;position:fixed;top:56px;right:8px}.story-tracker strong{font-size:14px}.scene-note{white-space:pre-line}:root{--ui-frame:url(/ui/stone_frame.webp);--ui-sheet:url(/ui/parchment_sheet.webp);--ui-plank:url(/ui/wood_plank.webp);--ui-slot:url(/ui/slot.webp);--frame-px:48px;--frame-reach:calc(var(--frame-px) * .76);--sheet-px:12px;--plank-px:11px;--title-font:"Alegreya", Georgia, serif;--body-font:"Alegreya Sans", system-ui, sans-serif;--cream:#f8ebc8;--page:#f1e2bf;--amber:#e8a63a;--paper:#f1e2bf;--paper-light:#f8eccd;--paper-deep:#e4cf9f;--paper-shade:#c8ab72;--ink:#3b2a1a;--ink-soft:#6a5236;--edge:#7d5d3a;--accent:#b5651d}html,body,button{font-family:var(--body-font)}h2,h3,h4{font-family:var(--title-font);letter-spacing:.01em;font-weight:800}.screen-rail button,.screen-dialog header .screen-close,.debug-toggle,.debug button,.priorities-foot button,.priorities-column,.recipe-buttons button,.queue-buttons button,.contract button,.store-modes button,.store-chips button,.station-tabs button,.ribbon-priority button,.hud-alert{box-sizing:border-box;color:var(--cream);text-shadow:0 1px #0009;border:var(--plank-px) solid transparent;border-image:var(--ui-plank) 40 fill / var(--plank-px) stretch;box-shadow:none;cursor:pointer;background:0 0;border-radius:0;font-weight:700}.screen-rail button:hover,.screen-dialog header .screen-close:hover,.debug button:hover,.priorities-foot button:hover,.priorities-column:hover,.recipe-buttons button:hover,.queue-buttons button:hover,.contract button:hover,.store-modes button:hover,.store-chips button:hover,.station-tabs button:hover,.ribbon-priority button:hover{filter:brightness(1.18)}.debug button.on,.queue-buttons button.on,.contract button.on,.store-modes button.on,.store-chips button.on,.station-tabs button.on,.ribbon-priority button.on{color:#fff3c9;filter:brightness(1.45)saturate(1.3);opacity:1;background:0 0;border-color:#0000}.store-chips button{opacity:1;filter:saturate(.35)brightness(.8)}.queue-buttons button:disabled{filter:saturate(.3)brightness(.75);opacity:.7}.debug button.danger{filter:hue-rotate(-22deg)saturate(1.7);background:0 0}.hud-alert{filter:hue-rotate(-24deg)saturate(1.9)brightness(1.1)}.screen-rail button{min-width:96px;padding:2px 6px;font-size:16px}.debug-toggle{opacity:1;min-width:70px;padding:0 4px}.ribbon-priority{gap:3px}.ribbon-priority button{border-width:7px;border-image-width:7px;width:28px;height:28px;line-height:1}.ribbon-priority button.on,.station-tabs button.on,.store-modes button.on,.contract button.on{outline:2px solid var(--amber);outline-offset:-3px}.debug button,.contract button,.priorities-foot button,.recipe-buttons button{font-size:15px}.book-spread>.neighbours>.neighbours-summary,.book-spread>.neighbours>.neighbours-note{max-width:calc(50% - 28px)}.queue-buttons button,.station-tabs button{min-width:38px;min-height:38px;padding:0 4px}.store-modes button,.store-chips button{padding:0 6px}.priorities-column{border-width:9px;border-image-width:9px;padding:0 4px}.ribbon-card,.debug,.ledger-card,.store-card,.neighbour-card,.dwarf-card,.quest,.recipe,.station-card,.tech,.queue-item,.ribbon-item,.ribbon-empty,.ribbon-tab,.ribbon-hand{box-sizing:border-box;border:var(--sheet-px) solid transparent;border-image:var(--ui-sheet) 26 fill / var(--sheet-px) stretch;box-shadow:none;background:0 0;border-radius:0}.ribbon-card,.debug{filter:drop-shadow(0 4px 8px #00000080)}.ledger-card,.store-card,.neighbour-card,.dwarf-card,.quest,.recipe,.station-card,.tech,.queue-item{filter:drop-shadow(0 1px 1px #3c240c59);padding:4px 6px}.ribbon-item{padding:0 8px 0 2px}.ribbon-item.on{box-shadow:none;filter:brightness(1.06) drop-shadow(0 0 4px var(--amber));background:0 0}.queue-item.paused_missing_resources{filter:saturate(.55)brightness(.96)}.recipe.locked,.tech.locked{filter:saturate(.3)brightness(.93)}.tech.researched{filter:drop-shadow(0 0 3px var(--amber))}.tech.in_progress{outline:2px solid var(--amber);outline-offset:-4px}.ribbon-item.locked{filter:saturate(.25)brightness(.8)}.hud-alert.calm{filter:none}.research-actions button{box-sizing:border-box;min-height:38px;color:var(--cream);text-shadow:0 1px #0009;border:var(--plank-px) solid transparent;border-image:var(--ui-plank) 40 fill / var(--plank-px) stretch;cursor:pointer;background:0 0;padding:0 8px;font-size:15px;font-weight:700}.recipe-buttons button:disabled{filter:saturate(.3)brightness(.75);opacity:.7;cursor:default}.queue-item.completed{filter:saturate(.4)brightness(.92)}.screen-backdrop{padding:calc(var(--frame-reach) + 46px) calc(var(--frame-reach) + 12px) calc(var(--frame-reach) + 12px);background:#140c06cc}.screen-dialog{background:var(--page);filter:drop-shadow(0 10px 22px #0009);border:none;border-radius:0;flex-direction:column;width:min(1040px,100%);max-height:100%;padding:0;display:flex;position:relative;overflow:visible}.screen-dialog:after{inset:calc(-1 * var(--frame-reach));z-index:1;content:"";border:var(--frame-px) solid transparent;border-image:var(--ui-frame) 168 / var(--frame-px) round;pointer-events:none;position:absolute}.screen-dialog header{top:calc(-1 * var(--frame-reach) - 22px);z-index:2;pointer-events:none;height:0;display:block;position:absolute;left:0;right:0}.screen-dialog h2{color:var(--cream);white-space:nowrap;text-shadow:0 2px #0009;border:16px solid #0000;border-image:var(--ui-plank) 40 fill / 16px stretch;pointer-events:auto;margin:0;padding:0 34px 2px;font-size:26px;line-height:1.15;position:absolute;top:0;left:50%;transform:translate(-50%)}.screen-dialog header .screen-close{top:14px;right:calc(-1 * var(--frame-reach) + 2px);pointer-events:auto;width:46px;min-width:46px;height:46px;min-height:46px;padding:0;font-size:18px;line-height:1;position:absolute}.book-pages{background:linear-gradient(90deg,#462c1229 0,#0000 22px calc(100% - 22px),#462c1229 100%);flex:auto;min-height:0;padding:26px 22px 18px;overflow:auto}.book-spread{background:linear-gradient(90deg,#462c1229 0,#0000 22px calc(50% - 30px),#462c123d 50%,#0000 calc(50% + 30px) calc(100% - 22px),#462c1229 100%)}.book-pages>:first-child{margin-top:0}.book-spread>.ledger,.book-spread>.craft,.book-spread>.store,.book-spread>.quests,.book-spread>.research,.book-spread .neighbours-list{grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:56px}.craft-stock ul+h3{margin-top:14px}.page{flex-direction:column;gap:12px;min-width:0;display:flex}.ribbon-tabs{border:0 solid #0000;border-top-width:12px;border-image:var(--ui-plank) 40 fill / 12px 0 0 0 stretch;background:0 0;padding-top:4px}.ribbon-tab,.ribbon-hand{border-bottom-width:0;border-image:var(--ui-sheet) 26 fill / var(--sheet-px) var(--sheet-px) 0 var(--sheet-px) stretch;padding:0 12px}.ribbon-hand{filter:brightness(.93)}.ribbon-tab.on,.ribbon-hand.on{box-shadow:none;filter:brightness(1.08) drop-shadow(0 -3px 0 var(--amber));background:0 0}.slot{background:var(--ui-slot) center / 100% 100% no-repeat}.item-swatch{border:none;border-radius:20%}.store-bar{background:#33261a;border:2px solid #20170f;border-radius:7px;height:12px}.store-bar span{background:linear-gradient(#f3bf55,#d98f24);border-radius:5px}.priority{font-family:var(--body-font);border-radius:8px}.priority.level-0{color:#9c8a6a;background:0 0;border:2px dashed #9c8a6a}.priority.level-1,.priority.level-2{color:#2f2c28;background:linear-gradient(#d4cfc5,#aaa49a);border-color:#6f6a61}.priority.level-3{color:#2e1c08;background:linear-gradient(#dcae72,#bb8342);border-color:#7a4f1e}.priority.level-4{color:#fff6e0;background:linear-gradient(#f08a3c,#d2601a);border-color:#8a3a0c}.priority.level-5{color:#4a2c00;background:radial-gradient(#ffe27a,#e8a63a);border-color:#9a6a10;box-shadow:0 0 0 2px #ffd65a8c}.priorities td.skilled{background:#e8a63a29}@media (width<=760px){:root{--frame-px:28px;--sheet-px:9px}.book-spread>.ledger,.book-spread>.craft,.book-spread>.store,.book-spread>.quests,.book-spread>.research,.book-spread .neighbours-list{grid-template-columns:minmax(0,1fr)}.book-spread>.neighbours>.neighbours-summary,.book-spread>.neighbours>.neighbours-note{max-width:none}.screen-backdrop{padding:calc(var(--frame-reach) + 40px) calc(var(--frame-reach) + 4px) calc(var(--frame-reach) + 4px)}.screen-dialog h2{border-width:12px;border-image-width:12px;padding:0 16px 2px;font-size:20px}.book-pages{padding:18px 12px 12px}.book-spread{background:linear-gradient(90deg,#462c1229 0,#0000 14px calc(100% - 14px),#462c1229 100%)}}
