:root {
  --bg: #110d0c;
  --panel: #1a1412;
  --line: #342823;
  --ink: #f4ece3;
  --muted: #b6a698;
  --gold: #d5ab74;
  --accent: #3d7d6a;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: rgba(17, 13, 12, 0.92);
  border-bottom: 1px solid var(--line);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--gold); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: inline-block; }
.crumbs { display: flex; gap: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.loom-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 20px;
  max-width: 1380px;
  margin: 22px auto;
  padding: 0 20px;
}
.stage-canvas-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #241b17 0%, #110d0c 72%);
  min-height: 540px;
}
#gl-cloth { width: 100%; height: 100%; min-height: 540px; display: block; cursor: grab; touch-action: none; }
#gl-cloth:active { cursor: grabbing; }
.stage-overlay-top {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  pointer-events: none;
  max-width: 540px;
}
.eyebrow {
  margin: 0 0 6px;
  font-family: system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--gold);
}
h1 { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 42px); font-weight: 500; line-height: 1.12; }
.lead { margin: 0; color: var(--muted); font-family: system-ui, sans-serif; font-size: 14px; }
.stage-hud {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
}
.stage-hud span {
  background: rgba(20, 15, 13, 0.86);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--ink);
}
.loom-controls {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: system-ui, sans-serif;
}
.ctrl-group h2 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: #231b18;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 12px;
  cursor: pointer;
}
.chip.is-on { background: var(--gold); color: #16110e; border-color: var(--gold); font-weight: 600; }
.ctrl-group label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 4px;
}
.ctrl-group label strong { color: var(--ink); font-family: ui-monospace, monospace; }
.ctrl-group input[type="range"] { width: 100%; accent-color: var(--gold); }
.swatch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.swatch-btn {
  text-align: left;
  background: #211916;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.swatch-btn.is-on { border-color: var(--gold); background: #2c211b; }
.swatch-btn strong { font-size: 12px; }
.swatch-btn span { font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; }
.swatch-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.studio-band {
  max-width: 1380px;
  margin: 28px auto;
  padding: 24px 20px;
  border-top: 1px solid var(--line);
}
.band-head h2 { margin: 4px 0 8px; font-size: 28px; font-weight: 500; }
.band-head p { margin: 0 0 16px; color: var(--muted); font-family: system-ui, sans-serif; font-size: 14px; }
.designer-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.designer-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  font-family: system-ui, sans-serif;
}
.d-cell { background: #14100e; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.d-cell h3 { margin: 0 0 6px; font-size: 12px; letter-spacing: 0.1em; color: var(--gold); text-transform: uppercase; }
.d-cell p { margin: 0; font-size: 14px; color: var(--ink); }
.foot {
  max-width: 1380px;
  margin: 12px auto 32px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 920px) {
  .loom-stage, .designer-card { grid-template-columns: 1fr; }
}
