:root {
  --bg: #0e1013; --panel: #16191e; --line: #262b33; --text: #d8dde5;
  --dim: #8a93a0; --accent: #6cb6ff; --on: #24303f;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  display: grid; grid-template-columns: 250px 1fr 270px;
  background: var(--bg); color: var(--text);
  font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}
aside { background: var(--panel); padding: 12px; overflow-y: auto; }
#left { border-right: 1px solid var(--line); }
#right { border-left: 1px solid var(--line); }
h1 { font-size: 15px; margin: 0 0 6px; }
#tourLink { display: block; margin-bottom: 14px; color: var(--accent); text-decoration: none; font-size: 12px; }
#tourLink:hover { text-decoration: underline; }
h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin: 0 0 8px; }
h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin: 16px 0 6px; }
section { margin-bottom: 20px; }
main { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; min-height: 0; }
#bar { display: flex; align-items: center; gap: 14px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
#title { margin-left: auto; color: var(--dim); }
#stage { position: relative; min-height: 0; background: #000; }
#gl { width: 100%; height: 100%; display: block; outline: none; }
#readout { padding: 6px 12px; border-top: 1px solid var(--line); color: var(--dim); font-variant-numeric: tabular-nums; min-height: 30px; }
#readout b { color: var(--text); font-weight: 600; }

button {
  background: #1e232a; color: var(--text); border: 1px solid var(--line);
  border-radius: 5px; padding: 5px 9px; font: inherit; cursor: pointer;
}
button:hover { border-color: #3a424d; }
button.on { background: var(--on); border-color: var(--accent); color: #fff; }
.seg { display: flex; }
.seg button { border-radius: 0; margin-left: -1px; flex: 1; }
.seg button:first-child { border-radius: 5px 0 0 5px; margin-left: 0; }
.seg button:last-child { border-radius: 0 5px 5px 0; }
#views button { flex: none; }
.row { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
label { color: var(--dim); display: inline-flex; align-items: center; gap: 6px; }
input[type=range] { width: 90px; accent-color: var(--accent); }
.hint { color: var(--dim); font-size: 12px; margin: 0 0 8px; }

.item {
  display: block; width: 100%; text-align: left; margin-bottom: 4px;
  background: transparent; border-color: transparent; padding: 6px 8px;
}
.item:hover { background: #1b2027; }
.item.on { background: var(--on); border-color: var(--accent); }
.item small { display: block; color: var(--dim); }

ul { list-style: none; margin: 0 0 8px; padding: 0; }
li { display: flex; align-items: center; gap: 6px; padding: 3px 4px; border: 1px solid transparent; border-radius: 5px; }
li.on { background: var(--on); border-color: var(--accent); }
li input[type=text] {
  flex: 1; min-width: 0; background: transparent; border: 1px solid transparent;
  color: var(--text); font: inherit; padding: 3px 4px; border-radius: 4px;
}
li input[type=text]:focus { border-color: var(--line); background: #0e1013; outline: none; }
li input[type=color] { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
li .x { padding: 1px 6px; color: var(--dim); background: transparent; border-color: transparent; }
li .go { padding: 1px 6px; }
#segFilter {
  width: 100%; margin-bottom: 6px; background: #0e1013; color: var(--text);
  border: 1px solid var(--line); border-radius: 5px; padding: 5px 8px; font: inherit;
}
#structures { max-height: 38vh; overflow-y: auto; }
#structures li { cursor: pointer; padding: 3px 6px; }
#structures li:hover { background: #1b2027; }
#structures .sw { width: 10px; height: 10px; border-radius: 2px; flex: none; }
#structures .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#structures .ml { color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
#structures .up { color: #7ee787; } #structures .down { color: #ffa198; }
#saveState { float: right; text-transform: none; letter-spacing: 0; }

#looks .item { border-color: var(--line); margin-bottom: 6px; }
#looks .item b { font-weight: 600; color: var(--accent); }
