.systems-nav{display:flex;justify-content:center;flex-wrap:wrap;gap:5px;padding:8px 0}.systems-nav[hidden]{display:none}.systems-nav button{font-size:12px;padding:7px 10px}.systems-dialog{width:min(760px,95vw);max-width:760px;padding:18px}.systems-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;position:sticky;top:-18px;background:#261d16;z-index:1;padding:8px 0}.systems-heading h2{margin:0}.systems-status{min-height:1.5em;font-size:13px;color:#f6cf9c}.system-section{border-top:1px solid #6d5135;padding:8px 0 15px}.system-section h3{margin:7px 0;color:#f0d0a0}.system-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0}.system-row>span,.system-row>strong{flex:1;min-width:130px}.system-row input[type=number]{width:82px}.system-row select{max-width:180px}.systems-body button{font-size:13px}.systems-body label{font-size:13px}.systems-body p{margin:9px 0}.quest-entry{border:1px solid #664b2e;padding:12px;margin:10px 0}.quest-entry h4{margin:0 0 10px}.quest-entry>button{margin:3px}.source-dialogue{white-space:pre-wrap;background:#130e0a;border-left:3px solid #ad8b55;padding:12px;max-height:32vh;overflow:auto}.colony-grid{display:grid;grid-template-columns:repeat(var(--colony-columns,8),1fr);gap:3px;margin:12px 0}.colony-grid button{min-width:0;height:46px;padding:2px;font-size:10px;overflow:hidden}.systems-body input{max-width:100%}@media(max-width:700px){.systems-nav{padding:5px 4px;gap:4px}.systems-nav button{font-size:11px;padding:6px}.systems-dialog{padding:12px;max-height:90dvh}.systems-heading{top:-12px}.systems-heading h2{font-size:17px}.system-row{gap:5px}.system-row input[type=number]{width:70px}.systems-body button{min-height:34px}.colony-grid button{height:40px;min-height:40px;font-size:8px}.system-section p{overflow-wrap:anywhere}}
.systems-body textarea{display:block;width:100%;resize:vertical;background:#130e0a;color:#f1dfb7;border:1px solid #8b704c;padding:8px;margin:8px 0;font:14px/1.6 Malgun Gothic,sans-serif}.systems-body input[aria-label$="제목"]{width:100%}.colony-grid button[data-terrain=rock]{background:#4f4d47}.colony-grid button[data-terrain=forest]{background:#354a31}.colony-grid button[data-terrain=lava]{background:#773829}body.chat-expanded #chat-log{top:8%;height:76%;width:94%;background:#100c08ed;padding:12px;font-size:16px}body.chat-expanded #chat-form{width:94%;height:7%;bottom:5%}body.chat-expanded #player-status{display:none}
.system-row .item-icon{width:36px;min-width:36px;max-width:36px;height:36px;flex:0 0 36px;image-rendering:pixelated;background:#160f08;border:1px solid #745637}.system-row .item-icon.empty{display:none}
.appearance-previews{display:flex;justify-content:center;flex-wrap:wrap;gap:.5rem}.appearance-previews figure{margin:0;text-align:center}.appearance-preview{box-sizing:content-box;width:144px;height:208px;image-rendering:pixelated;background:linear-gradient(#181a19,#292721);border:1px solid #80704d}.appearance-colors{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.4rem;margin:.75rem 0}.appearance-color{min-height:48px;font-size:.8rem;overflow-wrap:anywhere}.appearance-color[aria-pressed="true"]{outline:2px solid #ead18c;outline-offset:1px}.appearance-swatch{display:block;width:18px;height:18px;margin:0 auto .3rem;border:1px solid #c3b38e}

/* Native TechWin frame pixels; responsive nine-slice sizing is a new web adaptation. */
dialog.native-window{width:min(790px,calc(100vw - 12px));padding:10px 12px;border:18px solid #795330;border-image:var(--native-window-image) var(--native-border-slice,18 fill) / 18px / 0 stretch;background:#21140f;image-rendering:pixelated;box-shadow:0 18px 70px #000b}
.native-window .systems-heading{top:-10px;background:#24150ff0;border-bottom:1px solid #a47543;padding:6px 0 10px}
.native-window .systems-body{font-size:14px;text-shadow:0 1px 1px #000}
.native-window .system-section{border-color:#9c6d3e}
.native-window button{box-shadow:inset 0 1px #e3bb7760,inset 0 -2px #130b07;border-color:#b18a53;background:linear-gradient(#71472d,#392419);color:#fff0c7}
.native-window button:focus-visible{outline:2px solid #fff0b0;outline-offset:2px}
.native-inventory-layout{display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap}
.native-cabinet{position:relative;width:328px;max-width:100%;aspect-ratio:328/306;flex:0 1 328px}
.native-cabinet-art,.native-inventory-grid{position:absolute;inset:0;width:100%;height:100%}
.native-cabinet-art{pointer-events:none;image-rendering:pixelated}
.native-window .native-inventory-slot{position:absolute;width:21.95122%;height:15.68628%;min-width:0;min-height:0;padding:0;border:0;box-shadow:none;background:transparent;overflow:hidden;touch-action:manipulation}
.native-inventory-slot:disabled{opacity:1}
.native-inventory-slot[aria-pressed="true"]{outline:2px solid #f5db88;outline-offset:-3px;background:#b78c2b25}
.native-inventory-slot:not(:disabled):hover{background:#efc98026}
.native-inventory-slot .item-icon{position:absolute;left:calc(50% - 16px);top:1px;width:32px;height:32px;max-width:32px;image-rendering:pixelated;background:transparent;border:0}
.native-inventory-slot .item-icon.empty{display:none}
.native-item-count{position:absolute;right:4px;top:2px;font:11px/1.1 monospace;color:#fff0bd;text-shadow:1px 1px #000}
.native-item-name{position:absolute;left:3px;right:3px;bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:11px/1.1 Malgun Gothic,sans-serif;color:#fff0bd;text-shadow:1px 1px #000}
.native-item-equipped{position:absolute;left:2px;top:2px;font:10px/1.1 Malgun Gothic,sans-serif;color:#ccffac;text-shadow:1px 1px #000}
.native-item-detail{flex:1 1 210px;min-width:0;background:#140b0894;border:1px solid #9b7044;padding:12px;overflow-wrap:anywhere}
.native-item-detail h4{font-size:16px;margin:0 0 8px;color:#ffe1a7}
.native-item-detail button{margin:4px 6px 4px 0}
.native-dye-pane{position:relative;width:416px;max-width:100%;aspect-ratio:416/226;margin:10px auto;isolation:isolate;background:#21120c}
.native-dye-background{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;image-rendering:pixelated}
.native-dye-preview{position:absolute;image-rendering:pixelated;pointer-events:none;touch-action:auto}
.native-dye-label{position:absolute;display:flex;align-items:center;justify-content:center;font:12px/1 Georgia,serif;color:#fff1d3;text-shadow:1px 1px #000;overflow:hidden}
.native-window .native-dye-hit{position:absolute;min-height:0;min-width:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;line-height:1;font-size:10px;overflow:hidden}
.native-dye-pane[data-art-ready="true"] .native-dye-hit{color:transparent;text-shadow:none}
.native-window .native-dye-hit[aria-pressed="true"]{outline:2px solid #fff6be;outline-offset:1px;background:#fff2}
.native-window .native-dye-hit:not(:disabled):hover{background:#fff3}
.native-window .native-dye-hit:disabled{background:#0008;opacity:1}
.native-dye-mobile-colors,.native-dye-mobile-actions{display:none}
@media(max-width:700px),(max-width:1000px) and (max-height:520px){
  dialog.native-window{padding:6px;border-width:8px;border-image-width:8px}
  .native-window .systems-heading{top:-6px}
  .native-window .native-inventory-slot{min-height:44px}
  .native-item-detail{padding:8px;flex-basis:100%}
  .native-dye-hit{display:none}
  .native-dye-mobile-colors{display:grid}
  .native-dye-mobile-actions{display:flex}
}
