:root{--paper: #fbfaf4;--paper-2: #f2efe2;--ink: #2f5fa8;--ink-dark: #1e3f75;--grid: #c9daf0;--grid-strong: #a9c3e6;--red: #c8372d;--pencil: #7d8796;--gob: #23402c;--text: #1f2a3a;--muted: #5b6575;--ally: #2f7d4a;--hand: "Architects Daughter", cursive;--type: "Courier Prime", ui-monospace, monospace;--title: "Metamorphous", serif}*{box-sizing:border-box}html,body{margin:0;height:100%}body{background:var(--paper-2);color:var(--text);font:15px/1.45 var(--type)}[hidden]{display:none!important}#app{display:flex;flex-direction:column;height:100vh}header{display:flex;align-items:center;gap:24px;padding:10px 20px;border-bottom:3px double var(--ink);background:var(--paper)}h1{font:28px var(--title);color:var(--ink-dark);margin:0;letter-spacing:.5px}#stats{display:flex;gap:18px;flex:1}.stat{font-size:16px}.stat i{color:var(--muted);font-size:13px}#speed{display:flex;gap:4px;align-items:center}#speed button{min-width:42px}#speed button.on{background:var(--ink);color:var(--paper)}.toggle{margin-left:12px;font-size:13px;color:var(--muted);display:flex;gap:4px;align-items:center;cursor:pointer}main{flex:1;display:flex;min-height:0}.mapwrap{flex:1;position:relative;padding:14px;min-width:0;display:flex;flex-direction:column}#map{flex:1;width:100%;min-height:0;background:var(--paper);border:2px solid var(--ink);box-shadow:0 2px 0 var(--grid-strong),0 10px 30px #1e3f751f;cursor:pointer}.legend{font:13px var(--hand);color:var(--ink);text-align:right;padding-top:6px}.legend .red{color:var(--red)}#flash{position:absolute;left:50%;top:30px;transform:translate(-50%) rotate(-1deg);background:var(--paper);border:2px solid var(--red);color:var(--red);font:18px var(--hand);padding:6px 14px}aside{width:380px;flex-shrink:0;display:flex;flex-direction:column;gap:10px;padding:14px 16px 14px 0;overflow:hidden}.card{background:var(--paper);border:1.5px solid var(--ink);padding:10px 14px}.card h2{font:19px var(--title);color:var(--ink-dark);margin:0 0 6px}.card h3{font:16px var(--title);color:var(--ink-dark);margin:10px 0 6px}#room{min-height:120px}.rnum{display:inline-block;min-width:26px;text-align:center;border:2px solid var(--ink);color:var(--ink);font:15px var(--hand);margin-right:4px}.note{font-style:italic;color:var(--muted);margin:4px 0 8px}.facts{list-style:none;padding:0;margin:0 0 8px}.facts li{margin:3px 0}.hint{color:var(--muted);font-size:13px;margin:6px 0}.actions,.orders{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.orders{border-top:1px dashed var(--grid-strong);margin-top:8px;padding-top:4px}.orders h3{width:100%}.odds{font:15px var(--hand);color:var(--red)}button{font:14px var(--type);background:var(--paper);color:var(--ink-dark);border:1.5px solid var(--ink);padding:4px 10px;cursor:pointer;box-shadow:2px 2px 0 var(--grid-strong)}button:hover:not(:disabled){background:#eaf1fb}button:active:not(:disabled){transform:translate(1px,1px);box-shadow:1px 1px 0 var(--grid-strong)}button:disabled{opacity:.4;cursor:not-allowed}button.quiet{border-color:var(--grid-strong);box-shadow:none;font-size:12px;padding:2px 8px;color:var(--muted)}.tribecard{flex:1 1 0;min-height:0;overflow-y:auto}.roster{list-style:none;padding:0;margin:8px 0 0}.roster li{display:flex;gap:8px;align-items:baseline;padding:3px 4px;border-bottom:1px dotted var(--grid);cursor:pointer}.roster li.on{background:#eaf1fb}.roster .name{color:var(--gob);font-weight:700;min-width:86px}.job{color:var(--muted);font-size:13px;flex:1}.squad{border:1.5px solid var(--gob);padding:6px 8px;margin-bottom:6px;font-size:14px}.squad.on{background:#eef6ef}.sqbtns{display:flex;gap:6px;margin-top:4px}.formbtn{margin:2px 0}.forming{border:1.5px dashed var(--gob);padding:6px 8px;margin-bottom:6px}.pick{list-style:none;padding:0;margin:4px 0 8px;max-height:220px;overflow-y:auto}.pick li{display:flex;gap:6px;align-items:center;padding:2px 0}.pick button.lead{padding:0 6px;box-shadow:none}.pick button.lead.on{background:var(--gob);color:var(--paper)}.logcard{flex:1 1 0;min-height:0;display:flex;flex-direction:column}#log{list-style:none;margin:0;padding:0;overflow-y:auto;font-size:13px}#log li{padding:3px 0;border-bottom:1px dotted var(--grid)}#log .t{color:var(--pencil);font-size:11px}#log .bad,#log .fight{color:var(--red)}#log .good{color:var(--ally)}#map .num{font:22px var(--hand);fill:var(--ink)}#map .unknown{font:34px var(--hand);fill:var(--pencil);text-anchor:middle;opacity:.8}#map .spikes path{fill:none;stroke:var(--gob);stroke-width:1.8}#map .resident circle{fill:var(--paper);stroke-width:2.5}#map .resident text{font:20px var(--hand);text-anchor:middle}#map .resident.hostile circle{stroke:var(--red)}#map .resident.hostile text{fill:var(--red)}#map .resident.wary circle{stroke:var(--red);stroke-dasharray:4 3}#map .resident.wary text{fill:var(--red)}#map .resident.ally circle{stroke:var(--ally)}#map .resident.ally text{fill:var(--ally)}#map .pennant{font:14px var(--hand);fill:var(--ally)}#map .gob{color:var(--gob)}#map .gob.sel{color:#0b7a3b}#map .gob.sel use{filter:drop-shadow(0 0 3px #7fd39b)}#map .crown{fill:#c79a1b;stroke:var(--gob);stroke-width:.8}#map .ghoul circle{fill:var(--paper);stroke:var(--red);stroke-width:2.5}#map .ghoul text{font:bold 13px var(--type);fill:var(--red);text-anchor:middle}#map .fallen path{stroke:var(--red);stroke-width:2.4;stroke-linecap:round;opacity:.75}#map .sel{fill:none;stroke:var(--pencil);stroke-width:2;stroke-dasharray:3 5}#map .squadring{fill:none;stroke:var(--gob);stroke-width:1.2;stroke-dasharray:2 3}#map .squadring.on{stroke-width:2.2;stroke:#0b7a3b}#map .patrol{stroke:var(--gob);stroke-width:1.5;stroke-dasharray:8 6;opacity:.6}#map .cloud .bang{font:bold 20px var(--hand);fill:var(--red)}#map .cloud .limb{stroke:var(--text);stroke-width:2.2;stroke-linecap:round}.overlay{position:fixed;inset:0;background:#1e3f7540;display:flex;align-items:center;justify-content:center}.sheet{background:var(--paper);background-image:linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px);background-size:20px 20px;border:3px double var(--ink);max-width:560px;padding:26px 32px;box-shadow:0 20px 60px #1e3f754d;transform:rotate(-.4deg)}.sheet h2{font:32px var(--title);color:var(--ink-dark);margin:0 0 12px}.sheet ul{padding-left:20px}.sheet li{margin:6px 0}.sheet button{font-size:17px;padding:8px 18px;margin-top:8px}.small{font-size:12px;color:var(--muted)}a{color:var(--ink)}#small{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px}#small .sheet{transform:none;max-width:100%}#small img{width:100%;border:1.5px solid var(--ink)}#map .door{fill:var(--paper);stroke:var(--ink);stroke-width:2}#map .furniture{stroke:var(--ink);fill:none;stroke-width:1.6}#map .pillar{fill:var(--ink);fill-opacity:.25}#map .rock{fill:#8a8f99;fill-opacity:.35;stroke:#6d7380;stroke-width:.9}#map .web{stroke:var(--ink);stroke-width:.8;opacity:.7}#map .cocoon{fill:var(--paper);stroke-width:1.2}#map .water path{stroke:#3d8bd4;stroke-width:1.4;fill:none}#map .bone line{stroke-width:2}#map .bone circle{fill:var(--ink);stroke:none}#map .shroom path{fill:var(--paper)}#map .shroom .cap{fill:#e9d6c4;stroke-width:1.6}#map .shroom circle{fill:var(--ink);stroke:none}#map .hole{fill:var(--ink);fill-opacity:.8;stroke:none}#map .table{fill:var(--paper)}#map .bed{fill:#efe1b8}#map .straw{stroke:#b08a3a;stroke-width:1}#map .stones{stroke-dasharray:3 2;stroke-width:3}#map .statue{fill:var(--paper);stroke-width:2}#map .statue-star{fill:var(--ink);stroke:none}#map .trap{stroke:var(--red);stroke-width:1.4}#map .gear circle{fill:none}#map .grate{stroke-width:1.4}#map .heap{stroke-width:2.2;stroke-dasharray:1 3;stroke-linecap:round}#map .pit{stroke-width:1.6;fill:none}#map .pitdark{fill:var(--ink);fill-opacity:.55;stroke:none}#map .stair line,#map .stair path{stroke-width:1.8;fill:none}#map .pennant{font:15px var(--hand)}#map .pennant.hostile{fill:var(--red)}#map .pennant.wary{fill:#c07a1a}#map .pennant.ally{fill:var(--ally)}#map .flame{fill:#f08a24}#map .flame-in{fill:#ffd25a}#map .rat ellipse,#map .rat circle{fill:#8a7f78}#map .rat path{stroke:#8a7f78;stroke-width:1}#map .beetle ellipse{fill:#3a3326}#map .beetle path{stroke:#3a3326;stroke-width:.8}#map .mood{fill:none;stroke-width:1.5}#map .mood.hostile{stroke:var(--red)}#map .mood.wary{stroke:#c07a1a;stroke-dasharray:3 2}#map .mood.ally{stroke:var(--ally)}#map .spider ellipse:not(.mood),#map .spider circle:not(.eye){fill:#3b3240}#map .spider .legs path{stroke:#3b3240;stroke-width:1.2;fill:none}#map .spider .eye{fill:#ff5a4a}#map .kobold ellipse:not(.mood),#map .kobold>path:not(.tail):not(.arm){fill:#c9772b;stroke:#5a3412;stroke-width:.8}#map .kobold .tail,#map .kobold .arm{stroke:#a85f20;stroke-width:1.6}#map .kobold .eye{fill:#fff3a0}#map .myconid .stem{fill:#efe6d0;stroke:#6b5a3e;stroke-width:.8}#map .myconid .cap{fill:#b9483a;stroke:#6b2a22;stroke-width:.8}#map .myconid .dot{fill:#f6efe0}#map .myconid .eye{fill:#3a2b1a}#map .gulper .blob{fill:#8fbf6a;fill-opacity:.85;stroke:#3e6b2a;stroke-width:1.5}#map .gulper .eye-big{fill:#fff;stroke:#3e6b2a;stroke-width:1}#map .gulper .pupil{fill:#222}#map .gulper .mouth{fill:none;stroke:#2c4d1e;stroke-width:1.6}#map .ghoul .gbody{fill:#cfd3c9;stroke:#5d625a;stroke-width:1}#map .ghoul .ghead{fill:#dfe2d8;stroke:#5d625a;stroke-width:1}#map .ghoul .geye{fill:var(--red)}#map .ghoul .garm{stroke:#5d625a;stroke-width:1.6;stroke-linecap:round}#map .shadow{fill:#1e3f75;opacity:.15}#map .gob{cursor:pointer}#map .gob .body{fill:#7a5a34;stroke:#2f2414;stroke-width:.9}#map .gob .head,#map .gob .ear{fill:#79a843;stroke:#2c4416;stroke-width:.9;stroke-linejoin:round}#map .gob .eye{fill:#ffe14a}#map .gob .leg,#map .gob .arm{stroke:#2c4416;stroke-width:1.6;stroke-linecap:round;fill:none}#map .gob .haft,#map .gob .club{stroke:#5a3d1c;stroke-width:1.6;stroke-linecap:round}#map .gob .club{stroke-width:3.2}#map .gob .hammer{fill:#6d6d6d}#map .gob .blade,#map .gob .tip{fill:#8c8c8c}#map .gob .flagcloth{fill:#fff;stroke:#888;stroke-width:.6}#map .gob .splash circle{fill:#3d8bd4}#map .gob .halo{fill:none;stroke:#0b7a3b;stroke-width:2}#map .puff{font:bold 8px var(--hand);fill:#5a3d1c}#map .zz{font:bold 9px var(--hand);fill:var(--pencil)}#map .cloud circle{fill:var(--paper);stroke:var(--text);stroke-width:2.2}#event{flex-shrink:0;background:var(--paper);border:2px solid var(--red);box-shadow:4px 4px #c8372d40,0 12px 30px #1e3f7533;padding:10px 14px;transform:rotate(-.6deg);animation:drop .35s ease-out}@keyframes drop{0%{transform:translateY(-14px) rotate(-3deg);opacity:0}to{transform:rotate(-.6deg);opacity:1}}#event h3{font:21px var(--title);color:var(--red);margin:0 0 4px}#event p{margin:0 0 8px}.evopts{display:flex;flex-direction:column;gap:5px}.evopts button{text-align:left}.evopts i{color:var(--muted);font-size:12px}.evtimer{height:4px;background:var(--grid);margin-top:8px}.evtimer span{display:block;height:100%;background:var(--red);transition:width .2s linear}.quick{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin:4px 0}.qlabel{font-size:13px;color:var(--muted)}h2.danger{color:var(--red)!important}.trait{font-weight:400;font-style:italic;color:var(--muted);font-size:12px;margin-left:6px}.roster .name{min-width:150px}#map .bubble path{fill:#fff;stroke:var(--text);stroke-width:1.1}#map .bubble text{font:bold 10px var(--hand);fill:var(--text);text-anchor:middle}#map .evring{fill:none;stroke:var(--red);stroke-width:2;stroke-dasharray:4 3}#map .pack{cursor:pointer}#map .pack .hit{fill:transparent;stroke:none}#map .pack.sel .hit{stroke:var(--red);stroke-width:2;stroke-dasharray:3 3}#map .allyweb .web{stroke:var(--ally);opacity:.8}#map .kobtrap{stroke:var(--red);stroke-width:1.5;fill:none}#map .basket{fill:#c79a5a;stroke:#6b4f2a;stroke-width:.8}
