* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; background: #07070b; color: #d8d8e4;
  font-family: "Avenir Next", Futura, system-ui, sans-serif; }
#graph { position: fixed; inset: 0; }

#brand { position: fixed; top: 18px; left: 22px; display: flex; gap: 10px; align-items: center;
  pointer-events: none; z-index: 5; }
#brand .logo { color: #f59e0b; font-size: 22px; }
#brand h1 { font-size: 15px; letter-spacing: 3px; font-weight: 600; color: #eee; }
#brand h1 span { color: #f59e0b; }
#brand h1 small { color: #777; font-weight: 400; letter-spacing: 4px; font-size: 10px; margin-left: 8px; }
#brand p { font-size: 10px; color: #666; letter-spacing: 1px; margin-top: 2px; }
#clock { color: #b8b8cc; font-variant-numeric: tabular-nums; margin-right: 8px; }

#menu-toggle { position: fixed; top: 20px; right: 20px; z-index: 12;
  background: rgba(16,16,24,.92); border: 1px solid #f59e0b55; color: #eee;
  letter-spacing: 2px; font-size: 11px; padding: 8px 14px; border-radius: 8px; }

aside { position: fixed; background: rgba(16,16,24,.92); border: 1px solid #26263a;
  border-radius: 12px; padding: 14px; z-index: 10; backdrop-filter: blur(8px); }
#menu { top: 58px; right: 20px; width: min(250px, calc(100vw - 40px)); max-height: calc(100vh - 78px); overflow-y: auto; }

#inspector { top: 20px; left: 20px; width: min(380px, calc(100vw - 40px));
  max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
#insp-scroll { overflow-y: auto; min-height: 0; margin-top: 4px; }

.hidden { display: none !important; }

#search { width: 100%; background: #0c0c14; color: #ddd; border: 1px solid #2c2c44;
  border-radius: 8px; padding: 8px 10px; font-size: 12px; outline: none; }
#search:focus { border-color: #f59e0b; }
#results { max-height: 220px; overflow-y: auto; margin-top: 4px; }
#results .hit { padding: 5px 8px; font-size: 11px; border-radius: 6px; cursor: pointer;
  display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
#results .hit:hover { background: #1c1c2e; }
#results .hit small { color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#results .note { padding: 5px 8px; font-size: 10px; color: #887; }

.group { margin-top: 12px; }
.group > label { font-size: 9px; letter-spacing: 2px; color: #888; text-transform: uppercase;
  display: flex; justify-content: space-between; }
.group output { color: #f59e0b; }
.seg { display: flex; gap: 4px; margin-top: 5px; }
.seg button { flex: 1; padding: 6px 4px; }
button { background: #14141f; color: #bbb; border: 1px solid #2c2c44; border-radius: 7px;
  padding: 6px 8px; font-size: 11px; cursor: pointer; }
button:hover { border-color: #555; color: #fff; }
button.on { background: #ececf4; color: #111; border-color: #ececf4; }
button.accent { width: 100%; margin-top: 12px; color: #f59e0b; border-color: #7a5210; }
.row { display: flex; gap: 6px; margin-top: 10px; }
.row button { flex: 1; }

input[type="range"] { width: 100%; margin-top: 6px; accent-color: #f59e0b; height: 3px; }

#legend { margin-top: 14px; font-size: 10px; }
#legend .li { display: flex; align-items: center; gap: 7px; padding: 2px 0; color: #999; }
#legend .dot { width: 8px; height: 8px; border-radius: 50%; }

.insp-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.insp-head h2 { font-size: 14px; color: #fff; word-break: break-all; }
#insp-close { border: none; background: none; font-size: 18px; color: #888; }
#insp-badges { margin-top: 8px; display: flex; gap: 5px; flex-wrap: wrap; }
.badge { font-size: 9px; letter-spacing: 1px; padding: 2px 8px; border-radius: 10px;
  border: 1px solid; text-transform: uppercase; }
#insp-meta { margin-top: 8px; font-size: 10px; color: #888; word-break: break-all; line-height: 1.5; }
#insp-connections { margin-top: 10px; font-size: 11px; max-height: 180px; overflow-y: auto; }
#insp-connections .hit { padding: 3px 6px; cursor: pointer; border-radius: 5px; color: #9db; }
#insp-connections .hit:hover { background: #1c1c2e; }
#insp-connections h3, #insp-content h3 { font-size: 9px; letter-spacing: 2px; color: #777;
  text-transform: uppercase; margin-bottom: 5px; position: sticky; top: 0; background: rgba(16,16,24,.95); }
#insp-content { margin-top: 12px; }
#insp-content pre { background: #0b0b12; border: 1px solid #22223a; border-radius: 8px;
  padding: 10px; font-size: 11px; line-height: 1.55; color: #c6c6da; white-space: pre-wrap;
  word-break: break-word; font-family: "SF Mono", ui-monospace, monospace; }
#insp-content img { max-width: 100%; border-radius: 8px; border: 1px solid #22223a; }

#dream-panel { position: fixed; bottom: 20px; right: 20px; width: min(340px, calc(100vw - 40px)); max-height: 50vh;
  overflow-y: auto; z-index: 11; }

@media (max-width: 560px) {
  #brand h1 small { display: none; }
  #inspector { top: auto; bottom: 20px; max-height: 70vh; }
}
#dream-panel h3 { font-size: 10px; letter-spacing: 2px; color: #a78bfa; text-transform: uppercase; }
#dream-panel .f { font-size: 10px; padding: 4px 0; border-bottom: 1px solid #1c1c2c; color: #aaa; }
#dream-panel .f b { color: #e0c060; font-weight: 600; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #2c2c44; border-radius: 3px; }
