:root { color-scheme: dark; font-family: system-ui, sans-serif; color: #e1e9e3; background: #101b19; font-size: 13px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid #354640; background: #172723; flex-shrink: 0; }
header a { color: #f5d47b; text-decoration: none; font-size: 23px; letter-spacing: -1px; font-weight: 900; }
header a span { display: block; font-size: 9px; letter-spacing: 2px; color: #b7c9bd; }
.file-actions { display: flex; gap: 8px; flex-wrap: wrap; }
button, input, select { font: inherit; }
button { background: #263b34; color: #e1e9e3; border: 1px solid #40564c; border-radius: 6px; padding: 8px 11px; cursor: pointer; }
button:hover { background: #355247; border-color: #809f8c; }
button:focus-visible, input:focus-visible, select:focus-visible, canvas:focus-visible { outline: 2px solid #f5d47b; outline-offset: 2px; }
button:disabled { opacity: .35; cursor: default; }
button.primary { background: #f5d47b; color: #172723; border-color: #f5d47b; font-weight: 700; }
button.danger { color: #ffb7a8; border-color: #a66d5c; }
main { flex: 1; display: grid; grid-template-columns: 214px minmax(200px, 1fr) 286px; min-height: 0; }
aside { padding: 16px; overflow-y: auto; scrollbar-width: thin; background: #17231f; }
.left-panel { border-right: 1px solid #354640; }
.right-panel { border-left: 1px solid #354640; }
.section-title { color: #93ac9e; font-size: 10px; font-weight: bold; letter-spacing: 1.5px; margin: 8px 0 12px; }
.section-title:not(:first-child) { margin-top: 24px; }
.section-title span { float: right; color: #f5d47b; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tools button { font-size: 11px; text-align: left; min-height: 37px; padding: 7px; }
.tools button.active { background: #f5d47b; color: #172723; border-color: #f5d47b; }
.floor-list { display: grid; gap: 5px; max-height: 230px; overflow-y: auto; }
.floor-list button { text-align: left; overflow-wrap: anywhere; }
.floor-list button small { display: block; color: #a5b7ad; font-size: 10px; margin-top: 3px; }
.floor-list button.active { border-color: #f5d47b; background: #364632; }
label { display: block; color: #bdcec3; font-size: 11px; margin: 13px 0; }
input:not([type='checkbox']), select { display: block; width: 100%; margin-top: 5px; padding: 8px; background: #101b17; border: 1px solid #40564c; border-radius: 5px; color: #f1f1de; min-width: 0; }
input[type='color'] { height: 35px; padding: 3px; }
.check { display: flex; align-items: center; gap: 6px; }
input[type='checkbox'] { accent-color: #f5d47b; }
.hint, .help, .note { color: #92a99b; font-size: 11px; line-height: 1.65; }
.help { margin-top: 24px; border-top: 1px solid #354640; padding-top: 16px; }
.help summary { cursor: pointer; color: #d5dfd7; }
code { overflow-wrap: anywhere; }
#viewport { position: relative; overflow: hidden; background: #101b19; min-height: 0; }
#map { width: 100%; height: 100%; display: block; touch-action: none; }
.view-actions { position: absolute; top: 14px; left: 14px; display: flex; flex-wrap: wrap; gap: 5px; right: 70px; pointer-events: none; }
.view-actions button { background: #20392ee8; pointer-events: auto; font-size: 11px; }
#tool-hint { position: absolute; bottom: 38px; left: 14px; right: 14px; color: #ccdbc8; pointer-events: none; font-size: 11px; text-shadow: 0 1px 3px #000; }
#compass { position: absolute; right: 16px; top: 16px; font-weight: bold; color: #f5d47b; pointer-events: none; text-align: right; }
#compass span { display: block; font-size: 9px; color: #91a99c; margin-top: 4px; }
#coordinates { position: absolute; bottom: 12px; left: 14px; color: #9db8a5; pointer-events: none; font: 11px monospace; }
footer { flex-shrink: 0; display: flex; justify-content: space-between; gap: 16px; padding: 9px 16px; border-top: 1px solid #354640; font-size: 11px; background: #172723; min-height: 34px; }
#message.error { color: #ffb7a8; }
#document-state { color: #f5d47b; white-space: nowrap; }
#inspector h2 { font-size: 17px; margin: 6px 0; overflow-wrap: anywhere; }
#inspector h3 { font-size: 12px; color: #f5d47b; margin: 22px 0 8px; }
.fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fields-row label { margin: 6px 0; }
.nodes { display: grid; gap: 4px; max-height: 300px; overflow-y: auto; }
.node-row { display: grid; grid-template-columns: 1fr 1fr 28px; align-items: end; gap: 6px; }
.node-row label { margin: 3px 0; }
.node-row button { padding: 8px 0; margin-bottom: 0; }
.nodes > button { margin-top: 8px; }
#profile-graph { display: block; width: 100%; height: 140px; margin: 8px 0; background: #101b19; border: 1px solid #40564c; border-radius: 5px; touch-action: none; }
#selection-actions { margin-top: 18px; display: flex; gap: 8px; }
#selection-actions[hidden] { display: none; }
.object-search { margin-top: 20px; }
.object-list { margin-top: 8px; max-height: 210px; overflow-y: auto; display: grid; gap: 4px; }
.object-list button { font-size: 10px; text-align: left; overflow-wrap: anywhere; }
.object-list button.active { border-color: #f5d47b; }
@media (max-width: 1050px) { main { grid-template-columns: 175px minmax(150px, 1fr) 245px; } aside { padding: 11px; } header { padding: 10px; } .file-actions { gap: 4px; } .file-actions button { padding: 7px; font-size: 11px; } }
@media (max-width: 740px) {
  header { align-items: flex-start; } header a { font-size: 18px; }
  .file-actions { justify-content: flex-end; } .file-actions button { font-size: 10px; }
  main { grid-template-columns: 130px minmax(100px, 1fr); grid-template-rows: minmax(190px, 1fr) 230px; }
  .left-panel { grid-row: 1 / 3; }
  .right-panel { grid-column: 2; border-top: 1px solid #354640; }
  .tools { grid-template-columns: 1fr; } .tools button { min-height: 30px; }
  .view-actions { gap: 3px; top: 8px; left: 8px; right: 45px; }
  .view-actions button { padding: 6px; font-size: 10px; }
  #compass { right: 8px; font-size: 11px; } #compass span { display: none; }
  footer { font-size: 10px; padding: 6px 10px; } #document-state { display: none; }
}
