:root {
  --bg: #0f1115;
  --panel: #161a22;
  --text: #e6e6e6;
  --muted: #8a8f98;
  --primary: #4da3ff;
  --accent: #7cf1a5;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid #222836;
}
.brand { font-weight: 700; letter-spacing: 0.5px; }
.controls { display: flex; gap: 8px; align-items: center; }
input { background: #0e1219; color: var(--text); border: 1px solid #2a3142; padding: 6px 8px; border-radius: 6px; }
button { background: var(--primary); color: #071220; border: 0; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
button:hover { filter: brightness(1.1); }
.status { color: var(--muted); margin-left: 6px; }

.layout { display: grid; grid-template-columns: 1fr 460px; height: calc(100vh - 56px); }
.scene { position: relative; }
#scene { width: 100%; height: 100%; display: block; background: radial-gradient(1200px 600px at 50% 100%, #101521, #0f1115); }

.sidebar { background: var(--panel); border-left: 1px solid #222836; overflow: auto; }
.panel { padding: 12px 14px; border-bottom: 1px solid #222836; }
.panel h2 { margin: 8px 0 10px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.segments { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.segments li { background: #0e1219; padding: 10px; border-radius: 8px; border: 1px solid #2a3142; cursor: pointer; display: block; }
.segments li:hover { border-color: var(--primary); }
.segments li input.overlay-toggle { margin: 0; width: 16px; height: 16px; cursor: pointer; }
.segments li .swatch { width: 12px; height: 12px; border-radius: 50%; border: 1px solid #000; box-shadow: 0 0 0 2px rgba(0,0,0,.2) inset; }
.segments li .title { font-weight: 700; }
.segments li .subtitle { color: var(--muted); font-size: 12px; margin-top: 2px; text-align: right; }
.segments li .time { font-variant-numeric: tabular-nums; text-align: right; }
.segments li .filepath { color: var(--muted); font-size: 11px; margin-top: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.9; }
.cand { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 10px 10px; border-left: 6px solid #2a3142; border-radius: 8px; }
.cand .medal { font-size: 14px; }
.cand .cbcol { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--muted); }
.cand .cbcol label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.cand .cbcol input { margin: 0; width: 14px; height: 14px; }
.cand .right { display: grid; grid-template-rows: auto auto; align-items: center; row-gap: 6px; }
.cand .right .row1 { display: flex; align-items: center; gap: 8px; }
.cand .right .title { font-weight: 700; }
.cand .right .time { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.footer { padding: 8px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid #222836; background: var(--panel); }


