:root {
  --orange: #ff9800;
  --bg: #121212;
  --card: #1e1e1e;
  --bar: #1a1a1a;
  --line: #2e2e2e;
  --text: #e8e8e8;
  --muted: #a0a0a0;
  --faint: #6f6f6f;
  --grid: #2a2a2a;
  --side: 300px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 13px/1.4 Roboto, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; color: var(--text); background: var(--bg); }
button, input { font: inherit; color: inherit; }

.bar { position: sticky; top: 0; z-index: 5; height: 64px; display: flex; align-items: center; gap: 24px;
  padding: 0 16px; background: var(--bar); color: var(--text); border-bottom: 1px solid var(--line); }
.brand { font-size: 20px; font-weight: 500; letter-spacing: .2px; color: var(--orange); border: 0; background: none; padding: 0; cursor: pointer; }
.tabs { display: flex; height: 100%; }
.tab { height: 100%; padding: 0 16px; border: 0; background: none; color: var(--muted); text-transform: uppercase;
  font-weight: 500; letter-spacing: .6px; cursor: pointer; border-bottom: 2px solid transparent; }
.tab.active { color: var(--text); border-bottom-color: var(--orange); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.icon:hover { background: #2a2a2a; color: var(--text); }

.layout { display: flex; min-height: calc(100% - 64px); }
.side { width: var(--side); flex: none; background: var(--card); border-right: 1px solid var(--line); padding: 16px;
  position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; }
.side section + section { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.label { color: var(--muted); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .4px; margin: 12px 0 6px; }
.check { display: flex; align-items: center; gap: 8px; margin: 4px 0; cursor: pointer; }
.check input { accent-color: var(--orange); }
.smooth { display: flex; align-items: center; gap: 10px; }
.smooth input[type=range] { flex: 1; accent-color: var(--orange); }
.smooth input[type=number] { width: 64px; color-scheme: dark; padding: 2px 4px; border: 0; border-bottom: 1px solid var(--faint); background: none; }
.radios { display: flex; gap: 14px; }
.radios input { accent-color: var(--orange); }
.filter { width: 100%; padding: 6px 2px; border: 0; border-bottom: 1px solid var(--faint); background: none; outline: none; }
.filter:focus { border-bottom: 2px solid var(--orange); }
.run { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; cursor: pointer; word-break: break-all; }
.run input { margin-top: 2px; }
.swatch { flex: none; width: 12px; height: 12px; border-radius: 2px; margin-top: 3px; }
.run .status { color: var(--orange); font-size: 11px; margin-left: 4px; }
.all { margin-top: 10px; color: var(--muted); }

main { flex: 1; min-width: 0; padding: 0 16px 32px; }
.tagbar { position: sticky; top: 64px; z-index: 3; background: var(--bg); padding: 12px 0 8px; }
.tagbar .filter { background: var(--card); padding: 8px 10px; border: 1px solid var(--line); border-radius: 2px; }
.hidden { display: none !important; }
.group { background: var(--card); border: 1px solid var(--line); border-radius: 2px; margin: 12px 0; }
.group > .ghead { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; user-select: none; font-size: 14px; font-weight: 500; }
.ghead .count { color: var(--faint); font-weight: 400; font-size: 12px; }
.ghead .caret { margin-left: auto; color: var(--faint); transition: transform .15s; }
.group.closed .caret { transform: rotate(-90deg); }
.group.closed .cards { display: none; }
.cards { display: flex; flex-wrap: wrap; gap: 16px; padding: 0 16px 16px; }
.card { width: 400px; max-width: 100%; border: 1px solid var(--line); border-radius: 2px; padding: 10px 12px 6px; background: var(--card); }
.card.wide { width: 100%; }
.ctitle { font-size: 13px; font-weight: 500; margin-bottom: 4px; word-break: break-all; }
.csub { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis text { fill: var(--muted); font-size: 10px; font-family: "Roboto Mono", monospace; }
.chart .axis line, .chart .gridline { stroke: var(--grid); }
.chart .domain { stroke: #4a4a4a; }
.tools { display: flex; gap: 4px; margin-top: 2px; }
.tools button { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 2px 6px; border-radius: 2px; font-size: 12px; }
.tools button:hover, .tools button.on { color: var(--orange); background: #2a2218; }
.empty { color: var(--muted); padding: 32px 4px; }

.tip { position: fixed; z-index: 10; pointer-events: none; background: rgba(30,30,30,.97); border: 1px solid #3a3a3a;
  box-shadow: 0 2px 8px rgba(0,0,0,.5); border-radius: 2px; padding: 6px 8px; font-size: 12px; }
.tip table { border-collapse: collapse; }
.tip th { color: var(--muted); font-weight: 500; text-align: left; padding: 0 8px 2px 0; }
.tip td { padding: 1px 8px 1px 0; font-family: "Roboto Mono", monospace; white-space: nowrap; }
.tip td.name { font-family: inherit; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

.vcard { width: 560px; }
.vcard video { display: block; width: 100%; background: #000; aspect-ratio: 1680 / 540; }
.vstep { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; }
.vstep input { flex: 1; accent-color: var(--orange); }
.vstep .n { font-family: "Roboto Mono", monospace; font-size: 12px; color: var(--muted); min-width: 70px; text-align: right; }
.ok { color: #81c784; } .bad { color: #e57373; }

@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--line); }
  .bar { gap: 8px; } .brand { font-size: 17px; } .tab { padding: 0 10px; }
  .tagbar { top: 64px; }
  .card, .vcard { width: 100%; }
}

.vlabel { font-weight: 500; }
.vcard video { cursor: default; }

.chead { display: flex; align-items: flex-start; gap: 8px; }
.chead .ctitle { flex: 1; }
.fs { flex: none; border: 0; background: none; color: var(--faint); cursor: pointer; padding: 2px; margin: -2px -4px 0 0; border-radius: 2px; line-height: 0; }
.fs:hover { color: var(--orange); background: #2a2218; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; height: 40px; border: 1px solid #3a3a3a; border-radius: 3px; background: var(--card); color: var(--muted);
  font-weight: 500; letter-spacing: .4px; cursor: pointer; }
.seg button.on { border-color: var(--orange); color: var(--text); background: #2a2218; }
.seg button:hover { color: var(--text); }
main { padding-top: 4px; }

.gallery-heading { padding: 12px 0 24px; }
.gallery-heading > span { color: #d6a6ed; font-size: 11px; letter-spacing: 3px; }
.gallery-heading h1 { font-size: 36px; font-weight: 500; margin: 6px 0; color: #f6defb; }
.gallery-heading p { color: var(--muted); margin: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 20px; }
.gallery-card { overflow: hidden; background: #1c1721; border: 1px solid #3a2845; border-radius: 12px; }
.gallery-card > a { display: block; overflow: hidden; background: #100d14; }
.gallery-card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 20%; transition: transform .25s ease; }
.gallery-card > a:hover img { transform: scale(1.025); }
.gallery-caption { padding: 14px 16px 16px; }
.gallery-caption h2 { margin: 0 0 4px; font-size: 16px; font-weight: 500; }
.gallery-caption p { margin: 0 0 10px; color: #b4a5bc; font-size: 12px; }
.gallery-caption a { color: #d6a6ed; font-size: 11px; text-decoration: none; }
.gallery-caption a:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .gallery-card img { transition: none; } }
