:root{color-scheme:dark;--bg:#191b19;--surface:#222521;--raised:#2c302a;--line:#3a3e36;--text:#eeeee7;--muted:#aaaF9f;--subtle:#7d8475;--accent:#d6a66c;--radius:4px}
*{box-sizing:border-box}body{margin:0;font-family:"Segoe UI","Noto Sans",Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14px;height:100dvh;overflow:hidden}button,input,select{font:inherit}button,a,label,input,select{-webkit-tap-highlight-color:transparent}button,select,.file-button{color:var(--text);background:transparent;border:1px solid var(--line);border-radius:var(--radius);padding:8px 12px;cursor:pointer;min-height:36px}button:hover,.file-button:hover{background:var(--raised)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,[role=button]:focus-visible{outline:2px solid var(--accent);outline-offset:3px}input[type=checkbox]{accent-color:var(--accent)}a{color:inherit;text-decoration:none}button:disabled{opacity:.45;cursor:default}[hidden]{display:none!important}.masthead{height:64px;display:flex;align-items:center;padding:0 24px;gap:32px;border-bottom:1px solid var(--line);background:#191b19}.brand{display:flex;align-items:center;gap:12px;font-size:21px;font-weight:600;white-space:nowrap}.brand-mark{border:1px solid var(--accent);color:var(--accent);width:32px;height:36px;display:grid;place-items:center;font-size:15px;font-weight:600}.guide-link{color:var(--muted);font-size:13px}.guide-link:hover{color:var(--text)}.header-actions{margin-left:auto;display:flex;gap:12px;align-items:center}.header-actions select{max-width:180px;background:var(--surface)}#tabs{height:48px;display:flex;gap:8px;align-items:stretch;padding:0 20px;border-bottom:1px solid var(--line);overflow-x:auto;white-space:nowrap}#tabs button{min-width:80px;border:none;border-bottom:2px solid transparent;border-radius:0;padding:0 16px;color:var(--muted);font-weight:600}#tabs button[aria-selected=true]{color:var(--accent);border-bottom-color:var(--accent);background:#242720}.workspace{display:grid;grid-template-columns:328px 1fr;height:calc(100dvh - 112px)}.sidebar{display:flex;flex-direction:column;border-right:1px solid var(--line);min-height:0;background:var(--surface)}.sidebar-heading{padding:24px 20px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.sidebar-heading h1{font-size:19px;font-weight:600;margin:0}.sidebar-heading>span{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}.search-wrap{margin:0 16px 12px;position:relative}.search-icon{position:absolute;left:14px;top:13px;width:12px;height:12px;border:1.5px solid var(--muted);border-radius:50%}.search-icon:after{content:"";position:absolute;right:-4px;bottom:-3px;width:6px;height:1.5px;background:var(--muted);transform:rotate(45deg)}#search{background:#191c19;border:1px solid #454a3f;border-radius:var(--radius);color:var(--text);width:100%;height:40px;padding:8px 36px;font-size:13px}#search::placeholder{color:var(--muted)}#clearSearch{position:absolute;right:2px;top:2px;border:0;padding:4px;min-height:36px;width:32px;font-size:20px}.filter-line{display:flex;align-items:center;justify-content:space-between;padding:0 16px 12px;gap:8px;color:var(--muted);font-size:12px}.toggle{display:flex;align-items:center;gap:6px;cursor:pointer}.toggle input{width:14px;height:14px;margin:0}.filter-line button{font-size:12px;padding:4px 8px;min-height:28px}.results{overflow-y:auto;flex:1;scrollbar-width:thin;scrollbar-color:#5e6556 transparent}.group-row{display:flex;align-items:center;text-align:start;width:100%;gap:12px;border:0;border-top:1px solid #353a30;border-radius:0;padding:12px 20px;min-height:64px}.group-row[aria-pressed=true]{background:#33382e;box-shadow:inset 3px 0 var(--accent)}.group-row img{width:32px;height:32px;object-fit:contain;flex-shrink:0}.group-row .symbol{width:32px;text-align:center;font-size:22px;color:var(--accent);flex-shrink:0}.row-text{display:grid;gap:4px;min-width:0;flex:1}.row-name{font-size:14px;font-weight:600;line-height:1.35}.row-sub{font-size:12px;color:var(--muted);font-weight:400;line-height:1.4}.row-count{font-variant-numeric:tabular-nums;font-size:12px;color:var(--muted);min-width:24px;text-align:end}.recipe-row{min-height:72px}.empty{padding:24px 20px;color:var(--muted);line-height:1.7}.sidebar-footer{display:flex;justify-content:space-between;padding:12px 20px;border-top:1px solid var(--line);font-size:11px;color:var(--subtle)}.atlas{position:relative;min-width:0;min-height:0;overflow:hidden;background:#101410}#map{width:100%;height:100%;display:block;touch-action:none;user-select:none;cursor:grab}#map.dragging{cursor:grabbing}#mapImage{pointer-events:none}#markers>g{cursor:pointer;outline:none}#markers>g:hover .pin-circle,#markers>g:focus .pin-circle{stroke:white;stroke-width:2}.pin-circle{fill:#20251e;stroke:#d2d5c8;stroke-width:1.1}.pin-selected .pin-circle{stroke:var(--accent);fill:#67503a;stroke-width:2.5}.pin-found{opacity:.35}.pin-label{fill:#fff;font:500 12px "Segoe UI",sans-serif;paint-order:stroke;stroke:#101410;stroke-width:3px;stroke-linejoin:round}.pin-count{font:600 12px "Segoe UI",sans-serif;fill:white;text-anchor:middle;dominant-baseline:central}.map-controls{position:absolute;right:20px;top:20px;display:flex;flex-direction:column;gap:4px;z-index:2}.map-controls button{width:40px;height:40px;padding:0;background:#222720ef;border:1px solid #666f5d;font-size:24px;box-shadow:0 2px 6px #0003}.map-controls button:hover{background:#414838}.north{position:absolute;left:24px;top:20px;display:grid;justify-items:center;gap:4px;font-weight:600;font-size:12px;text-shadow:0 1px 4px #000;pointer-events:none}.north i{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:18px solid #f0eee3}.map-footer{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 16px;background:#151a15db;color:#d6d8cf;font-size:11px;pointer-events:none;min-height:34px}#scale{white-space:nowrap;border-top:2px solid var(--text);padding-top:3px;min-width:60px;text-align:center;font-variant-numeric:tabular-nums}.detail{position:absolute;right:72px;bottom:52px;width:344px;background:#222720fa;border:1px solid #66715b;border-radius:6px;box-shadow:0 8px 36px #0006;max-height:calc(100% - 84px);overflow-y:auto}.detail-header{padding:20px 44px 16px 20px;position:relative;border-bottom:1px solid var(--line)}.detail-header .eyebrow{font-size:12px;color:var(--accent);display:block;margin-bottom:8px}.detail h2{margin:0;font-size:21px;line-height:1.3;font-weight:600}.detail-close{position:absolute;right:8px;top:8px;width:32px;height:32px;border:none;font-size:23px;padding:0;min-height:32px}.detail-body{padding:16px 20px 20px}.detail p{color:#c9cfc1;line-height:1.7;margin:0 0 16px;font-size:13px;white-space:pre-line}.detail h3{font-size:12px;color:var(--muted);font-weight:500;margin:20px 0 8px}.detail .item-image{width:80px;height:80px;object-fit:contain;float:right;margin:0 0 12px 12px}.coordinates{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;line-height:1.7;margin:12px 0}.found-toggle{display:flex;gap:8px;align-items:center;padding:12px 0 0;border-top:1px solid var(--line);cursor:pointer}.detail-actions{display:flex;gap:8px;margin:12px 0;flex-wrap:wrap}.detail-actions button{font-size:12px;color:var(--accent);border-color:#696044}.ingredient{display:flex;align-items:center;gap:8px;padding:8px 0;border-top:1px solid var(--line)}.ingredient img{width:32px;height:32px;object-fit:contain}.ingredient .quantity{margin-left:auto;color:var(--accent);font-variant-numeric:tabular-nums}.tech-cost{border:1px solid #696044;color:var(--accent);display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:28px;border-radius:4px;font-variant-numeric:tabular-nums}.map-status{position:absolute;left:20px;bottom:52px;padding:12px 16px;background:var(--surface);max-width:320px;font-size:13px;color:var(--muted)}dialog{background:var(--surface);color:var(--text);border:1px solid #66715b;border-radius:6px;width:420px;max-width:calc(100% - 32px);padding:24px}dialog::backdrop{background:#0008}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.dialog-heading h2{margin:0;font-size:20px}.dialog-actions{display:flex;gap:12px;margin:20px 0}.file-button input{display:none}.error{color:#f0a595;font-size:13px;line-height:1.6}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#ecece0;color:#222720;padding:12px 20px;border-radius:4px;font-size:13px;z-index:10;max-width:calc(100% - 32px);box-shadow:0 2px 8px #0005}.atlas:fullscreen{width:100vw;height:100dvh}.loading{color:var(--muted)}
.layer-panel{border-top:1px solid var(--line);padding:8px 16px;font-size:12px;color:var(--muted)}.layer-panel summary{cursor:pointer;padding:4px 0}.layer-panel #layers{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:12px 0 4px}.group-row img[src*="category-town"],#markers image[href*="category-town"]{filter:brightness(0) invert(.9)}.detail{z-index:3}.results .group-row img{flex-shrink:0}#tabs{scrollbar-width:none}#tabs::-webkit-scrollbar{display:none}.atlas.maximized{position:fixed;inset:0;z-index:50;width:100vw;height:100dvh}
@media(min-width:1500px){.workspace{grid-template-columns:352px 1fr}.sidebar-heading{padding:28px 24px 20px}.group-row{padding-left:24px;padding-right:24px}}
@media(max-width:700px){body{font-size:13px}.masthead{height:56px;padding:0 12px;gap:12px}.brand{font-size:17px;gap:8px}.brand-mark{width:24px;height:28px;font-size:12px}.guide-link{display:none}.header-actions{gap:8px}.header-actions select{max-width:116px;font-size:12px;padding:6px;min-height:32px}.header-actions button{font-size:12px;padding:6px 8px;min-height:32px}#tabs{height:44px;padding:0 8px;gap:0}#tabs button{padding:0 12px;min-width:auto;font-size:13px}.workspace{height:calc(100dvh - 100px);display:flex;flex-direction:column}.sidebar{flex:none;border-right:0;border-bottom:1px solid var(--line);max-height:232px}.sidebar-heading{padding:12px 16px 8px}.sidebar-heading h1{font-size:16px}.search-wrap{margin:0 12px 8px}#search{height:36px;font-size:13px}.search-icon{top:11px}.filter-line{padding:0 12px 8px;font-size:11px}.sidebar-footer{display:none}.results{max-height:96px;min-height:0}.group-row{min-height:48px;padding:8px 16px;gap:10px}.group-row img,.group-row .symbol{width:26px;height:26px;font-size:20px}.row-name{font-size:13px}.row-sub{font-size:11px}.atlas{flex:1;min-height:260px}.map-controls{right:12px;top:12px;gap:4px}.map-controls button{width:36px;height:36px;font-size:22px}.north{left:16px;top:12px}.map-footer{padding:6px 12px;font-size:10px;min-height:30px}.detail{right:8px;left:8px;width:auto;bottom:38px;max-height:calc(100% - 50px)}.detail-header{padding:12px 44px 12px 16px}.detail h2{font-size:18px}.detail-body{padding:12px 16px}.detail p{font-size:12px;margin-bottom:12px}.empty{padding:12px 16px}.pin-label{font-size:11px}#toast{bottom:12px}}
@media(max-width:700px) and (max-height:530px){.sidebar{width:260px;max-height:none;border-right:1px solid var(--line);border-bottom:0}.workspace{flex-direction:row}.results{max-height:none}.atlas{min-height:0}.detail{max-height:calc(100% - 50px);max-width:340px;margin-left:auto}.sidebar-heading{padding-top:8px}#tabs{height:36px}.workspace{height:calc(100dvh - 92px)}}
@media(prefers-reduced-motion:no-preference){button,a{transition:background-color .12s ease,color .12s ease}}
#buildCategory{margin:0 16px 8px;background:var(--surface);max-width:calc(100% - 32px);min-height:32px} #buildCategory option{background:var(--surface)}
