@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0d11;
  --bg-2: #12171e;
  --bg-3: #181e27;
  --bg-4: #242c38;
  --line: rgba(232, 236, 243, 0.1);
  --line-strong: rgba(232, 236, 243, 0.18);
  --text: #edf1f6;
  --muted: #a3adbb;
  --faint: #8b95a6;
  --acid: #e2ff59;
  --acid-ink: #15180c;
  --ember: #ff6a1a;
  --kove: #ff3b30;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --font: "Inter", "Segoe UI", sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sidebar: 232px;
  color-scheme: dark;
}

.app, .app *,
.app *::before, .app *::after,
.login-body, .login-body *,
.login-body *::before, .login-body *::after,
.toasts, .toasts *,
.toasts *::before, .toasts *::after,
dialog.sheet, dialog.sheet *,
dialog.sheet *::before, dialog.sheet *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(226, 255, 89, 0.06), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(255, 106, 26, 0.05), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
}

.app img, .app svg,
.login-body img, .login-body svg,
.toasts img, .toasts svg,
dialog.sheet img, dialog.sheet svg { max-width: 100%; }
.app button, .app input, .app select, .app textarea,
.login-body button, .login-body input, .login-body select, .login-body textarea,
.toasts button, .toasts input, .toasts select, .toasts textarea,
dialog.sheet button, dialog.sheet input, dialog.sheet select, dialog.sheet textarea { font: inherit; color: inherit; }
.app button, .login-body button, .toasts button, dialog.sheet button { cursor: pointer; }
.app a, .login-body a, .toasts a, dialog.sheet a { color: inherit; text-decoration: none; }
.app h1, .app h2, .app h3, .app p,
.login-body h1, .login-body h2, .login-body h3, .login-body p,
.toasts h1, .toasts h2, .toasts h3, .toasts p,
dialog.sheet h1, dialog.sheet h2, dialog.sheet h3, dialog.sheet p { margin: 0; }
.app [hidden], .login-body [hidden], .toasts [hidden], dialog.sheet [hidden] { display: none !important; }

.app ::selection, .login-body ::selection, .toasts ::selection, dialog.sheet ::selection { background: var(--acid); color: var(--acid-ink); }

.app :focus-visible,
.login-body :focus-visible,
.toasts :focus-visible,
dialog.sheet :focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.noscript {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
}

.app {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: auto;
  padding: 18px 14px 16px;
  background: #0e1116;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 6px;
}
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand strong {
  display: block;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 0.85;
  text-transform: uppercase;
}
.brand small {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 26px;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
}
.side-nav a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.side-nav a[aria-current="page"] {
  background: rgba(226, 255, 89, 0.1);
  box-shadow: inset 2px 0 0 var(--acid);
  color: var(--text);
}
.nav-ico { width: 18px; height: 18px; flex: none; }

.side-foot {
  margin-top: auto;
  padding: 16px 8px 4px;
  color: var(--faint);
  font-size: 12.5px;
}
.side-stage {
  margin-bottom: 4px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-close { display: none; }

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  padding: 12px 22px;
  background: rgba(11, 13, 17, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.topbar-title { display: flex; flex-direction: column; min-width: 0; }
.crumb {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.topbar-title strong {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 0.9;
  text-transform: uppercase;
}
.topbar-spacer { flex: 1; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--text);
}
.nav-toggle svg { width: 18px; height: 18px; }
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 25;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px 24px 48px;
}

.kicker {
  margin-bottom: 6px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}
.page-intro h1,
.overview h1,
.composer-head h1,
.detail-head h1 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.88;
  text-transform: uppercase;
}
.page-intro h1 { font-size: clamp(42px, 5vw, 68px); }
.lede, .hint { color: var(--muted); }
.lede { max-width: 46rem; margin-top: 12px; font-size: 16.5px; }
.hint { font-size: 13px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--bg-3);
  color: var(--text);
  font-weight: 600;
}
.btn:hover { border-color: rgba(255, 255, 255, 0.28); }
.btn-primary {
  border-color: transparent;
  background: var(--acid);
  color: var(--acid-ink);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { cursor: progress; filter: saturate(0.7); opacity: 0.75; }
.btn-ghost { background: transparent; }
.btn-danger { color: #ffb4b8; border-color: rgba(255, 93, 108, 0.4); }
.btn-block { width: 100%; }
.text-btn {
  border: 0;
  background: none;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 10, 14, 0.72);
  color: var(--text);
}
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.icon-btn.is-on {
  color: var(--acid-ink);
  background: var(--acid);
  border-color: transparent;
}
.icon-btn.is-on svg { fill: currentColor; stroke: currentColor; }

.panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label,
.choice-legend {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.choice-legend { padding: 0; margin-bottom: 8px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

input[type="text"],
input[type="search"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #0c0f14;
  padding: 10px 12px;
}
textarea {
  resize: vertical;
  min-height: 72px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
}
.composer textarea { min-height: 64px; }
.search input { padding-left: 12px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 12px; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { position: relative; }
.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c0f14;
}
.choice strong { font-size: 13.5px; font-weight: 600; }
.choice small, .choice em { color: var(--faint); font-style: normal; font-size: 11.5px; }
.choice input:checked + span {
  border-color: var(--acid);
  background: rgba(226, 255, 89, 0.08);
}
.choice input:focus-visible + span { outline: 2px solid var(--acid); outline-offset: 2px; }
.choice.is-locked span { cursor: not-allowed; opacity: 0.7; }
.tag {
  align-self: flex-start;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(226, 255, 89, 0.14);
  color: var(--acid);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ratio-row, .count-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ratio span, .count-row span {
  align-items: center;
  min-width: 54px;
  text-align: center;
  padding: 6px;
}
.ratio small { display: none; }
.ratio i {
  display: block;
  width: 20px;
  margin: 0 auto 3px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.color-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.color-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c0f14;
}
.color-field input[type="color"] {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  flex: none;
}
.color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-field input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}
.color-field strong { display: block; font-size: 12.5px; }
.color-field em {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.04em;
}

.switch {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0c0f14;
}
.switch input { position: absolute; opacity: 0; }
.switch-ui {
  width: 38px;
  height: 22px;
  margin-top: 2px;
  border-radius: 99px;
  background: #2a313c;
  position: relative;
  flex: none;
}
.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d5dbe3;
  transition: transform 0.15s ease;
}
.switch input:checked + .switch-ui { background: var(--acid); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); background: var(--acid-ink); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--acid); outline-offset: 2px; }
.switch strong { display: block; font-size: 14px; }
.switch small { color: var(--faint); }

.live-plate {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 12px 14px 12px 20px;
  border-radius: 12px;
  background: #1c140f;
  color: #f6f1e6;
}
.live-plate::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: var(--plate-accent, var(--ember));
}
.live-top, .zones {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.live-num {
  font-family: var(--display);
  font-size: 68px;
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.02em;
}
.live-rider {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.zones { margin-top: 8px; }
.zone {
  padding: 4px 8px;
  border: 1px dashed currentColor;
  border-radius: 6px;
  opacity: 0.75;
}
.live-plate:not(.has-sponsors) .zones { display: none; }

.prompt-bar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
#prompt-state { color: var(--faint); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; }

details.negative {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0c0f14;
  padding: 8px 10px 10px;
}
details.negative summary {
  cursor: pointer;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
details.negative textarea { margin-top: 8px; }

.studio {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  flex: 1;
}
body[data-page="generate"] .content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 16px;
}
.composer, .stage { min-height: 0; }
.stage { overflow: auto; }
.composer {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.composer-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.composer-scroll.stack { gap: 5px; }
body[data-page="generate"] .composer .field { gap: 3px; }
body[data-page="generate"] .composer-scroll.stack { gap: 3px; }
body[data-page="generate"] .choice-legend { margin-bottom: 3px; }
body[data-page="generate"] .composer textarea { min-height: 52px; }
body[data-page="generate"] #prompt { height: 28px; min-height: 0; }
.panel-kicker {
  margin: 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
body[data-page="generate"] details.negative { padding: 5px 10px; }
.composer-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: none;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  background: #0b0d11;
}
.foot-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.foot-options .choice-legend { margin-bottom: 4px; }
.foot-options .ratio-row,
.foot-options .count-row { flex-wrap: nowrap; }
.foot-options .choice span { padding: 3px 4px; min-width: 0; }
.foot-options .ratio i { width: 16px; margin-bottom: 1px; }
.foot-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.foot-meta .model-note { margin: 0; }
.chip-set { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; }
.chip-radio span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}
.chip-radio input:checked + span {
  background: var(--acid);
  border-color: transparent;
  color: var(--acid-ink);
  font-weight: 600;
}
.chip-radio input:focus-visible + span { outline: 2px solid var(--acid); outline-offset: 2px; }
.model-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.model-pick .choice span { padding: 5px 8px; }
.model-pick .choice strong { font-size: 12.5px; }
.model-pick .choice small { font-size: 10.5px; }
.stage .live-plate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
  margin-bottom: 12px;
  padding: 8px 16px 8px 20px;
}
.stage .live-num { font-size: 56px; }
.stage .zones { margin-top: 4px; justify-content: flex-start; gap: 6px; }
.model-note { margin: 8px 0 0; color: var(--faint); font-size: 12.5px; }

.stage {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background-color: #10141a;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
}
.results-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}
.results-head h2 {
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: 0.03em;
  line-height: 0.9;
  text-transform: uppercase;
}
.run-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 12px;
}
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(226, 255, 89, 0.25);
  border-top-color: var(--acid);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.progress {
  height: 3px;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 99px;
  background: #2a313c;
}
.progress span {
  display: block;
  width: 35%;
  height: 100%;
  background: var(--acid);
  animation: load 1.1s ease-in-out infinite;
}

.kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.kit-card { position: relative; display: flex; flex-direction: column; gap: 8px; }
.kit-art {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #08090c;
  line-height: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.kit-art svg { display: block; width: 100%; height: auto; }
.kit-card:hover .kit-art { box-shadow: var(--shadow), inset 0 0 0 1px rgba(226, 255, 89, 0.4); }
.stretch { position: absolute; inset: 0; z-index: 1; border-radius: 12px; }
.kit-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}
.kit-kicker {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kit-card h3, .recipe-card h3 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.95;
  text-transform: uppercase;
}
.kit-card h3 a:hover { color: var(--acid); }
.kit-actions { display: flex; gap: 6px; position: relative; z-index: 2; }
.kit-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--acid);
  color: var(--acid-ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skel {
  border-radius: 12px;
  background: linear-gradient(100deg, #1a2029 20%, #2a3340 40%, #1a2029 60%);
  background-size: 200% 100%;
  animation: shimmer 1.1s linear infinite;
}
.skel-line { height: 14px; width: 70%; margin-top: 8px; border-radius: 7px; }

.toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.toolbar-row, .chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar-row select { width: auto; min-width: 140px; }
.chip {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
}
.chip[aria-pressed="true"] {
  background: var(--acid);
  border-color: transparent;
  color: var(--acid-ink);
}
.result-count { margin: 8px 0 14px; color: var(--faint); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.section-label {
  margin: 8px 0 10px;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.empty {
  padding: 28px 8px 10px;
  color: var(--muted);
}
.empty h2 {
  margin-bottom: 6px;
  font-family: var(--display);
  font-size: 36px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 14px;
}
.detail-head h1 { font-size: clamp(40px, 5vw, 60px); }
.head-actions { display: flex; gap: 8px; align-items: center; }
.detail-top, .detail-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 14px;
  align-items: start;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.detail-lower { margin-bottom: 8px; }
.preview-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #08090c;
  line-height: 0;
}
.preview-frame svg { display: block; width: 100%; height: auto; }
.detail-side { display: flex; flex-direction: column; gap: 12px; }
.action-stack { display: flex; flex-direction: column; gap: 8px; }
.prompt-block pre {
  max-height: 180px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 10px;
  background: #0c0f14;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.prompt-block header, .bike-head, .edit-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.prompt-block h2, .bike-head h2, .subhead {
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin: 0;
}
.meta dt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.meta dd { margin: 2px 0 0; }
.edit-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.edit-panel[hidden] { display: none; }

.bike-panel { margin-top: 0; }
.bike-head { margin-bottom: 10px; }
.bike-stage {
  overflow: hidden;
  border-radius: 12px;
  background: #0e1116;
  line-height: 0;
}
.bike-stage svg { display: block; width: 100%; height: auto; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.legend li {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0c0f14;
}
.seg button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
}
.seg button[aria-pressed="true"] { background: var(--acid); color: var(--acid-ink); }

.vars, .related { margin-top: 22px; }
.vars .section-label, .related .section-label { margin-top: 0; }

.recipe-tools { margin-bottom: 14px; }
.recipe-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: 16px;
  align-items: start;
}
.recipe-list { display: flex; flex-direction: column; gap: 10px; }
.recipe-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
  color: inherit;
  text-align: left;
}
.recipe-card[aria-pressed="true"] { border-color: var(--acid); }
.recipe-art { height: 108px; overflow: hidden; background: #08090c; line-height: 0; }
.recipe-art svg { width: 100%; height: auto; }
.recipe-body { padding: 10px 12px; min-width: 0; }
.recipe-body p { color: var(--muted); font-size: 13px; }
.recipe-card h3 {
  font-size: 28px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editor {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 92px);
  overflow: auto;
}
.editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.error { color: #ffb4b8; font-size: 13px; min-height: 1em; }

.overview h1 { max-width: 18ch; font-size: clamp(44px, 5vw, 68px); }
.plan-grid, .route-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}
.plan, .route {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
}
.plan { padding: 16px 16px 18px; }
.plan h2, .route h2 {
  font-family: var(--display);
  font-size: 34px;
  letter-spacing: 0.03em;
  line-height: 0.9;
  text-transform: uppercase;
}
.plan p, .route-body p { margin-top: 8px; color: var(--muted); }
.route { display: flex; flex-direction: column; min-height: 100%; }
.route:hover { border-color: rgba(226, 255, 89, 0.55); }
.route-art { height: 150px; overflow: hidden; background: #08090c; line-height: 0; }
.route-art svg { width: 100%; height: auto; }
.route-body { padding: 12px 14px 16px; }
.bench {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.fineprint { margin-top: 22px; color: var(--faint); font-size: 13px; max-width: 46rem; }

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
}
.toast {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #1b212b;
  box-shadow: var(--shadow);
}
.toast p { font-size: 13.5px; }
.toast button {
  border: 0;
  background: none;
  color: var(--acid);
  font-weight: 600;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes load { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1100px) {
  .studio { grid-template-columns: 1fr; height: auto; }
  .onboard-steps { grid-template-columns: 1fr; }
  body[data-page="generate"] .content { overflow: auto; display: block; }
  .composer { display: block; overflow: visible; height: auto; }
  .composer-scroll { overflow: visible; height: auto; }
  .stage { overflow: visible; }
  .detail-top, .detail-lower, .recipe-layout, .plan-grid, .route-grid { grid-template-columns: 1fr; }
  .editor { position: static; max-height: none; }
  .bench { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  body { overflow: auto; }
  .app { display: block; height: auto; }
  .main { height: auto; }
  .sidebar {
    position: fixed;
    z-index: 30;
    width: min(300px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.18s ease;
  }
  .app.is-nav-open .sidebar { transform: none; }
  .app.is-nav-open .nav-backdrop { display: block; }
  .nav-toggle { display: inline-flex; }
  .nav-close {
    display: inline-flex;
    align-self: flex-end;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    padding: 6px 10px;
  }
  .content { overflow: visible; }
}

@media (max-width: 640px) {
  .content { padding: 16px 14px 40px; }
  .topbar { padding: 10px 12px; }
  .pill { display: none; }
  .page-intro, .detail-head, .results-head { align-items: stretch; flex-direction: column; }
  .row-2, .choice-grid, .color-row, .bench { grid-template-columns: 1fr; }
  .recipe-card { grid-template-columns: 1fr; }
  .ten-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recipe-art { height: 140px; }
  .icon-btn { width: 44px; height: 44px; }
  .meta { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .app, .app *, .app *::before, .app *::after,
  .login-body, .login-body *, .login-body *::before, .login-body *::after,
  .toasts, .toasts *, .toasts *::before, .toasts *::after,
  dialog.sheet, dialog.sheet *, dialog.sheet *::before, dialog.sheet *::after {
    animation: none !important;
    transition: none !important;
  }
}

.logo-field { margin: 0; }
.logo-field legend.prompt-bar { width: 100%; margin-bottom: 4px; padding: 0; }
.logo-choices { display: flex; gap: 6px; overflow-x: auto; }
.logo-choice { position: relative; flex: none; }
.logo-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.logo-choice span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 2px 8px 2px 2px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}
.logo-choice input:checked + span { border-color: transparent; background: var(--acid); color: var(--acid-ink); }
.logo-choice input:focus-visible + span { outline: 2px solid var(--acid); outline-offset: 2px; }
.logo-mini { display: block; width: 54px; height: 22px; overflow: hidden; border-radius: 4px; line-height: 0; }
.logo-mini svg { display: block; width: 100%; height: 100%; }
.logo-choice strong { font-size: 12px; font-weight: 600; white-space: nowrap; }
.live-logos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.live-logos svg { display: block; width: 78px; height: 30px; border-radius: 4px; }
.stage-lock { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.stage-lock .hint { margin: 0; }
.lock-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--acid);
  color: var(--acid-ink);
  font-size: 12.5px;
  font-weight: 600;
}
.lock-inline { padding: 1px 7px; font-size: 11px; letter-spacing: 0; text-transform: none; }
.field > .hint { margin: 2px 0 0; font-size: 11.5px; }
.opt-tag {
  margin-left: 6px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.prompt-tools { display: flex; align-items: center; gap: 8px; }
.mic-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 2px 8px 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.mic-btn svg { width: 14px; height: 14px; }
.mic-btn:hover { color: var(--text); border-color: var(--muted); }
.mic-btn:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
.mic-btn.is-listening {
  border-color: var(--ember);
  color: var(--ember);
  animation: mic-pulse 0.8s ease-in-out infinite;
}
@keyframes mic-pulse {
  50% { box-shadow: 0 0 0 4px rgba(255, 106, 26, 0.28); }
}
.direction-line {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.35;
}
.stage-logos { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.stage-logo, .meta-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 8px 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}
.meta dd { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.licence-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}
.licence-free { background: #14302a; color: #b6f2c8; }
.licence-customer { background: #2a2614; color: #e2ff59; }
.estimate-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #3a2a14;
  color: #ffc48a;
  font-size: 11px;
  font-weight: 600;
}
.format-note {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #142018;
  color: #d7ffe4;
  font-size: 13px;
}
.scale-step { display: flex; flex-direction: column; gap: 8px; }
.measure-stage {
  position: relative;
  height: 168px;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(226, 255, 89, 0.08), transparent 40%),
    #10141a;
  touch-action: none;
  cursor: crosshair;
}
.measure-stage img,
.measure-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.measure-fallback {
  display: grid;
  place-items: center;
  color: var(--faint);
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.measure-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ref-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.scale-preview {
  min-height: 72px;
  overflow: hidden;
  border-radius: 10px;
  background: #08090c;
  line-height: 0;
}
.scale-preview svg { display: block; max-width: 100%; height: auto; }
.download-row { display: flex; flex-wrap: wrap; gap: 8px; }
.logo-choice .licence-badge { flex: none; }
.logo-marks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.use-mark {
  color: #b6f2c8;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.source-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.source-tab {
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.source-tab[aria-selected="true"] {
  background: var(--acid);
  border-color: transparent;
  color: var(--acid-ink);
  font-weight: 600;
}
.source-tab:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
.licence-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(182, 242, 200, 0.35);
  border-radius: 12px;
  background: #101814;
  color: var(--muted);
  font-size: 13px;
}
.confirm-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--text);
  font-size: 13px;
}
.confirm-row input { margin-top: 3px; flex: none; }
.onboard { margin-top: 22px; }
.onboard-steps {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 12px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.onboard-steps li {
  display: flex;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
}
.onboard-steps .is-current { border-color: rgba(226, 255, 89, 0.7); }
.step-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: #1b212b;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 13px;
}
.onboard-steps h3 {
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}
.onboard-steps p { margin-top: 6px; color: var(--muted); font-size: 13.5px; }
.onboard-steps .btn { margin-top: 10px; }
.mask-preview {
  height: 148px;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 10px;
  background: #08090c;
  line-height: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.mask-preview svg { display: block; width: 100%; height: auto; }
.stage.is-real .mask-preview {
  height: auto;
  overflow: visible;
}
.sheet-svg #dielines path {
  vector-effect: non-scaling-stroke;
  stroke-width: 1.4px;
}
.gen-step { display: flex; flex-direction: column; gap: 8px; }
.gen-step-title {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.03em;
  line-height: 0.9;
  text-transform: uppercase;
}
.gen-advanced { margin-top: 8px; }
.gen-advanced summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.logo-tray { display: flex; gap: 6px; overflow-x: auto; }
.logo-place {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 92px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
  line-height: 1.2;
}
.logo-place img { width: 100%; height: 36px; object-fit: contain; background: #eceae4; }
.sheet-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.sheet-pages { display: flex; gap: 6px; }
.stage.is-real .stage-lock,
.stage.is-real .stage-logos,
.stage.is-real .direction-line,
.stage.is-real .results-head,
.stage.is-real #results,
.stage.is-real #run-status,
.stage.is-real #progress,
.stage.is-real #inspire-line { display: none !important; }
body[data-page="generate"] .gen-model-field,
body[data-page="generate"] .foot-meta,
body[data-page="generate"] #save-row { display: none; }
.sheet-svg .panel-hit { fill: #000; fill-opacity: 0; stroke: none; cursor: pointer; }
.sheet-svg .logo-handle { fill: #111; stroke: #fff; stroke-width: 2; cursor: nwse-resize; }
.sheet-svg .placed-logo { cursor: move; }
.ten-up {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.flat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.flat-art {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #08090c;
  line-height: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.flat-art svg { display: block; width: 100%; height: auto; }
.flat-card:hover .flat-art { box-shadow: inset 0 0 0 1px rgba(226, 255, 89, 0.45); }
.flat-cap {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
body[data-page="generate"] .chip-radio span { min-height: 26px; padding: 2px 8px; font-size: 12px; }

.preview-stack { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.layer-list { display: flex; flex-direction: column; gap: 6px; }
.layer-row {
  display: grid;
  grid-template-columns: auto 84px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0e131a;
}
.layer-thumb { height: 42px; overflow: hidden; border-radius: 6px; background: #08090c; line-height: 0; }
.layer-thumb svg { display: block; width: 100%; height: auto; }
.layer-row strong { display: block; font-size: 13.5px; }
.layer-row small { color: var(--faint); font-size: 12px; }

.assets-page .page-intro { margin-bottom: 6px; }
.assets-page .page-intro h1 { font-size: clamp(36px, 4vw, 52px); }
.assets-page .lede { margin-top: 4px; }
.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 16px;
  padding: 0;
  list-style: none;
}
.pipeline li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.pipeline strong {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}
.pipeline span { color: var(--muted); font-size: 12.5px; }
.asset-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.asset-library { display: flex; flex-direction: column; gap: 8px; }
.asset-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-end; }
.asset-head h2 {
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: 0.03em;
  line-height: 0.9;
  text-transform: uppercase;
}
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-form { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #0c0f14; }
.upload-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.logo-list, .template-list { display: flex; flex-direction: column; gap: 8px; }
.asset-card, .template-card {
  display: grid;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0e131a;
}
.asset-card { position: relative; grid-template-columns: 150px minmax(0, 1fr); }
.logo-x {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: #17191e;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.template-card { grid-template-columns: minmax(0, 1.15fr) minmax(150px, 0.85fr); }
.asset-preview {
  border-radius: 8px;
  background-color: #f3f0e8;
  background-image:
    linear-gradient(45deg, #cfcabf 25%, transparent 25%),
    linear-gradient(-45deg, #cfcabf 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #cfcabf 75%),
    linear-gradient(-45deg, transparent 75%, #cfcabf 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}
.asset-preview svg, .die-art svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.logo-note {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff4cc;
  color: #1c1406;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.asset-body h3 {
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}
.variant-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.variant {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: stretch;
  width: 78px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
}
.variant i { display: block; height: 28px; overflow: hidden; border-radius: 4px; line-height: 0; }
.variant i svg { display: block; width: 100%; height: 100%; }
.variant span { color: var(--faint); font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em; text-transform: uppercase; }
.variant[aria-pressed="true"] { border-color: var(--acid); }
.variant[aria-pressed="true"] span { color: var(--text); }
.part-list { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; }
.part-list li {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .asset-layout, .pipeline { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .pipeline, .asset-layout, .asset-card, .template-card { grid-template-columns: 1fr; }
}

.canva-page .page-intro { margin-bottom: 8px; }
.canva-page .page-intro h1 { font-size: clamp(36px, 4vw, 52px); }
.canva-page .lede { margin-top: 6px; margin-bottom: 14px; }

.connect-panel {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  max-width: 760px;
}
.connect-mark {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 18px;
  background: #12160c;
}
.connect-mark svg { width: 52px; height: 52px; }
.connect-copy h2 {
  font-family: var(--display);
  font-size: 34px;
  letter-spacing: 0.03em;
  line-height: 0.9;
  text-transform: uppercase;
}
.connect-copy p { margin-top: 8px; color: var(--muted); }
.connect-copy .kicker { margin-bottom: 4px; }
#connect-canva { margin-top: 14px; }
#connect-canva svg { width: 16px; height: 16px; }
#connect-wait { margin-top: 8px; }

.canva-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(226, 255, 89, 0.35);
  border-radius: 12px;
  background: rgba(226, 255, 89, 0.06);
}
.canva-who { font-size: 15px; }
.canva-who strong { font-weight: 600; }
#disconnect {
  color: var(--acid);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#disconnect:hover { color: var(--text); }

.canva-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
  gap: 16px;
  align-items: start;
}
.canva-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.canva-head h2,
.canva-flow h2 {
  font-family: var(--display);
  letter-spacing: 0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}
.canva-head h2 { margin: 0; font-size: 32px; }
.canva-head .search { width: min(260px, 46%); }
.canva-flow h2 { font-size: 28px; }
.canva-flow { display: flex; flex-direction: column; gap: 10px; }
.canva-note { margin: 0; }

.flow-steps {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.flow-steps li {
  flex: 1;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}
.flow-steps li.is-current {
  border-color: transparent;
  background: var(--acid);
  color: var(--acid-ink);
}
.flow-steps li.is-done {
  border-color: rgba(226, 255, 89, 0.45);
  color: var(--text);
}
.flow-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.flow-actions .btn { flex: 1; }

.canva-window {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #0c0f14;
}
.canva-window-bar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: #161b22;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
}
.canva-window .canva-art { height: 92px; border-radius: 0; }

.canva-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.canva-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0e131a;
}
.canva-card.is-on { border-color: var(--acid); box-shadow: inset 0 0 0 1px var(--acid); }
.canva-art {
  position: relative;
  height: 108px;
  overflow: hidden;
  background: #08090c;
  line-height: 0;
}
.canva-art svg { display: block; width: 100%; height: auto; }
.canva-badge {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--acid);
  color: var(--acid-ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.canva-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 12px;
}
.canva-card h3 {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}
.btn-sm { min-height: 34px; padding: 0 10px; border-radius: 9px; font-size: 13px; }
.canva-card .use-kit { width: 100%; }
.backup-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.backup-row .seg { flex: none; }
.backup-row .seg button { padding: 5px 9px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }
.backup-row > .btn { flex: 1; min-width: 9.5rem; }
.bike-empty {
  margin: 0;
  padding: 36px 16px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .canva-layout { grid-template-columns: 1fr; }
  .canva-head .search { width: min(320px, 100%); }
  .onboard-steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .connect-panel { grid-template-columns: 1fr; }
  .connect-mark { width: 64px; height: 64px; }
  .connect-mark svg { width: 38px; height: 38px; }
  .canva-grid { grid-template-columns: 1fr; }
  .canva-head { flex-direction: column; align-items: stretch; }
  .canva-head .search { width: 100%; }
  .flow-actions { flex-direction: column; }
  .canva-status { align-items: flex-start; flex-direction: column; }
}

:root {
  --bg: #f4f5f7;
  --bg-2: #ffffff;
  --bg-3: #eef0f3;
  --bg-4: #e4e7ec;
  --line: rgba(23, 25, 30, 0.1);
  --line-strong: rgba(23, 25, 30, 0.16);
  --text: #17191e;
  --muted: #3c4450;
  --faint: #5c6572;
  --acid: #d6ef3a;
  --acid-ink: #1a1e08;
  --ember: #c44b0a;
  --kove: #b4231c;
  --shadow: 0 16px 34px rgba(23, 25, 30, 0.08);
  --link: #3d4c0e;
  --sidebar: 252px;
  color-scheme: light;
}

body {
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(214, 239, 58, 0.28), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(255, 106, 26, 0.08), transparent 50%),
    var(--bg);
  color: var(--text);
}

.sidebar { background: #ffffff; }
.topbar { background: rgba(244, 245, 247, 0.94); }
.side-nav a { color: #3c4450; }
.side-nav a:hover { background: rgba(23, 25, 30, 0.05); color: var(--text); }
.side-nav a[aria-current="page"] {
  background: #f3f8d4;
  box-shadow: inset 3px 0 0 var(--link);
  color: #17191e;
}
.side-nav a span { line-height: 1.25; }
.side-stage, .kicker, .text-btn, .run-status, .kit-card h3 a:hover, .toast button { color: var(--link); }
.tag { background: #e7f0b0; color: #2a3308; }
.btn:hover { border-color: rgba(23, 25, 30, 0.28); }
.btn-danger, .error { color: #9a1c24; }
.icon-btn { background: #ffffff; }
input[type="text"],
input[type="search"],
input[type="number"],
select,
textarea,
.choice span,
.color-field,
details.negative,
.upload-form,
.prompt-block pre,
.seg,
.composer-foot {
  background: #ffffff;
  color: var(--text);
}
.composer-foot { background: #f4f5f7; }
.choice input:checked + span { border-color: var(--link); background: #f4f8d8; }
.stage {
  background-color: #ffffff;
  background-image:
    linear-gradient(rgba(23, 25, 30, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 30, 0.05) 1px, transparent 1px);
}
.progress, .switch-ui { background: #d5dae1; }
.toast { background: #ffffff; color: var(--text); }
.asset-card, .template-card, .layer-row { background: #ffffff; }
.step-num { background: #eef2d4; color: #1a1e08; }
.skel { background: linear-gradient(100deg, #e6e9ee 20%, #f4f6f8 40%, #e6e9ee 60%); }
.licence-free { background: #d9f5e3; color: #0e3d28; }
.licence-customer, .licence-mine { background: #e7f0b0; color: #2a3308; }
.licence-other { background: #ffe4d2; color: #6a2e08; }
.estimate-badge { background: #ffe8cc; color: #6a3a08; }
.format-note { background: #e5f6ea; color: #143024; }
.licence-note { background: #f3faf5; color: #243028; border-color: #b7dec4; }
.use-mark { color: #0e3d28; }
.app :focus-visible,
.login-body :focus-visible,
.toasts :focus-visible,
dialog.sheet :focus-visible { outline: 2px solid #1a1e08; outline-offset: 2px; }
body[data-page="generate"] #prompt { height: 76px; min-height: 76px; }
.prompt-bar, .prompt-tools { flex-wrap: wrap; }
.logo-group { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.logo-choices { max-width: 100%; }
.saved-prompt select { width: auto; max-width: 168px; min-height: 28px; padding: 2px 8px; font-size: 12px; }
.inspire-preview { display: block; max-height: 92px; width: auto; max-width: 100%; margin-top: 6px; border-radius: 8px; object-fit: cover; }

.library-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr); gap: 14px; align-items: start; margin: 14px 0 22px; }
.library-top h2, .seller-head h1 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 0.92;
  text-transform: uppercase;
}
.library-top h2 { font-size: 32px; }
.saved-kits { margin-top: 22px; }
.share-step, .share-form, dialog.sheet form { display: flex; flex-direction: column; gap: 8px; }
.share-opt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: flex-start;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
}
.share-opt:has(input:checked) { border-color: var(--link); background: #f7fbe4; }
.share-opt strong { display: block; font-size: 14px; }
.share-opt small { display: block; color: var(--muted); font-size: 12.5px; }
.credit-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: #f7f8fa;
}
.seller-credit { display: flex; gap: 8px; align-items: center; min-width: 0; color: inherit; }
.seller-credit strong { display: block; font-size: 14px; }
.seller-logo { width: 36px; height: 36px; flex: none; }
.seller-logo svg, .seller-logo-lg svg { display: block; width: 100%; height: 100%; }
.seller-logo-lg { width: 64px; height: 64px; }
.free-by, .contributor-badge, .price-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.free-by { background: #d9f5e3; color: #0e3d28; font-style: normal; }
.contributor-badge { background: #d6ef3a; color: #1a1e08; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; }
.price-tag { background: #eef0f3; color: #243028; }
.price-tag.is-free { background: #d9f5e3; color: #0e3d28; }
.price-tag.is-paid { background: #ffe4d2; color: #6a2e08; }
.market-card.is-free-share, .template-card.is-free-share, .seller-head.is-contributor {
  background: #f7fbe8;
  box-shadow: inset 4px 0 0 var(--link);
}
.source-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; padding: 0; list-style: none; }
.source-list a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.source-list a:hover { border-color: var(--link); }
.source-list strong { display: block; font-size: 15px; }
.source-list small { display: block; color: var(--muted); font-size: 13px; }
.source-list a span:first-child { min-width: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.filters select, .filters input[type="search"] { width: auto; min-width: 0; }
.filters .search { flex: 1; min-width: 180px; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.market-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.market-card h3, .market-body h3 {
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}
.market-card h3 a:hover { color: var(--link); }
.die-art { display: block; overflow: hidden; border-radius: 10px; background: #08090c; line-height: 0; }
.market-detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr); gap: 16px; align-items: start; }
.detail-art { border-radius: 16px; }
.price-line { font-family: var(--display); font-size: 36px; letter-spacing: 0.03em; line-height: 0.9; text-transform: uppercase; }
.fee-note { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #f7fbe8; color: #24300c; }
.sales-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sales-table th, .sales-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sales-table th { color: var(--faint); font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.seller-head { display: flex; gap: 14px; align-items: center; margin: 12px 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.seller-head h1 { font-size: clamp(36px, 5vw, 56px); }
dialog.sheet {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 108px);
  overflow: auto;
  border: 0;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  color: #17191e;
  box-shadow: var(--shadow);
}
dialog.sheet[open] {
  display: block;
  position: fixed;
  z-index: 40;
  top: 84px;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
}
dialog.sheet::backdrop { background: rgba(23, 25, 30, 0.46); }
body:has(dialog.sheet[open])::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(23, 25, 30, 0.46);
}
dialog.sheet h2 {
  font-family: var(--display);
  font-size: 36px;
  letter-spacing: 0.03em;
  line-height: 0.9;
  text-transform: uppercase;
}

@media (max-width: 960px) {
  .library-top, .market-detail { grid-template-columns: 1fr; }
  body[data-page="generate"] .content { overflow: visible; }
  .studio { display: block; width: 100%; min-width: 0; }
  .composer, .stage, .composer-scroll, .logo-field, .logo-group, .field, .row-2 {
    min-width: 0;
    max-width: 100%;
  }
  .logo-choices { max-width: 100%; }
}
@media (max-width: 640px) {
  .filters .search { min-width: 0; width: 100%; }
  .sales-table { display: block; overflow-x: auto; }
  .seller-head { align-items: flex-start; }
}

.cat-browse { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 16px; min-width: 0; }
.cat-axes { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-find { max-width: 320px; }
.gen-cats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.gen-cat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
}
.gen-cat strong { font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.gen-cat small { color: var(--muted); font-size: 12px; }
.gen-cat[aria-pressed="true"] {
  border-color: #3d4c0e;
  background: #f3f8d4;
  box-shadow: inset 0 0 0 1px #3d4c0e;
}
.cat-browse.is-prominent { gap: 18px; }
.brand-hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.brand-hero h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.9;
  text-transform: none;
}
.is-prominent .cat-find { max-width: none; }
.is-prominent .cat-find input {
  min-height: 68px;
  padding: 16px 18px;
  border-radius: 14px;
  font-family: var(--font);
  font-size: 22px;
}
.is-prominent .chip { min-height: 40px; padding: 8px 14px; font-size: 15px; }
@media (max-width: 800px) {
  .gen-cats { grid-template-columns: 1fr 1fr; }
}
.cat-groups { display: flex; flex-direction: column; gap: 12px; }
.cat-group h3 {
  margin: 0 0 6px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cat-hits { display: flex; flex-direction: column; gap: 6px; }
.featured-title {
  margin: 8px 0 10px;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.02em;
  line-height: 0.95;
  text-transform: none;
}
.featured-row {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.featured-row .market-card { flex: 0 0 260px; max-width: 280px; }
.die-art img { display: block; width: 100%; height: 168px; object-fit: cover; background: #14181f; }
.model-line { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fit-note {
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff4e5;
  color: #6a2e08;
  font-size: 13px;
}
.source-badge, .sample-badge, .official-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.source-badge { background: #e7f0ff; color: #16325c; }
.sample-badge { background: #eeeae4; color: #3d3428; }
.official-badge { background: #d6ef3a; color: #1a1e08; }
.get-pair { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.market-card h3, .market-body h3 { overflow-wrap: anywhere; }
.filters input[type="number"] { width: 96px; }
@media (max-width: 960px) {
  .cat-browse, .featured-row, .market-grid, .cat-panel { min-width: 0; max-width: 100%; }
  .featured-row .market-card { flex-basis: 220px; }
}
.hawkos-english {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ffe14a;
  color: #1a1400;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}
.hawkos-english:hover { filter: brightness(0.96); color: #1a1400; }
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: #f4f5f7;
}
.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 12px;
  padding: 28px;
  background: #fff;
  border: 1px solid #e4e6ea;
  border-radius: 16px;
}
.login-card form { display: grid; gap: 12px; }
.topbar { flex-wrap: wrap; }

body:has(#hkb-root) { overflow: visible; }
body:has(#hkb-root.hkb-root--row) .app,
body:has(#hkb-root.hkb-root--row) .sidebar,
body:has(#hkb-root.hkb-root--row) .main { height: calc(100vh - 72px); }
body:has(#hkb):not(:has(#hkt)) .app,
body:has(#hkb):not(:has(#hkt)) .sidebar,
body:has(#hkb):not(:has(#hkt)) .main { height: calc(100vh - 40px); }
@media (max-width: 960px) {
  body:has(#hkb-root.hkb-root--row) .sidebar {
    top: 72px;
    height: calc(100vh - 72px);
  }
  body:has(#hkb):not(:has(#hkt)) .sidebar {
    top: 40px;
    height: calc(100vh - 40px);
  }
}
