:root {
  --bg: #eae8e1;
  --panel: #f5f3ed;
  --surround: #d8d7d1;
  --ink: #252a2d;
  --muted: #626762;
  --border: #cfcec7;
  --accent: #d95839;
  --hover: #e8e5dc;
  --field: #ebe8e0;
  --selected: #eee6db;
  --range: #cfcec7;
  --shadow: #252a2d12;
  --mono: "Courier New", monospace;
  --sans: Arial, Helvetica, sans-serif;
  --topbar-height: 56px;
  --rail-width: 64px;
  --inspector-width: 352px;
  --nav-height: 0px;
  --sheet-peek: 76px;
  font-family: var(--sans);
  font-synthesis: none;
  color-scheme: light;
  color: var(--ink);
  background: var(--bg);
}
:root[data-theme="dark"] {
  --bg: #24292b;
  --panel: #292f31;
  --surround: #1c2224;
  --ink: #f0eee6;
  --muted: #b3b9b3;
  --border: #495252;
  --accent: #ee8162;
  --hover: #353d3f;
  --field: #202628;
  --selected: #3d3631;
  --range: #525b5a;
  --shadow: #00000024;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  overscroll-behavior: none;
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  transition:
    background 0.14s,
    border-color 0.14s;
}
button:hover {
  background: var(--hover);
  border-color: var(--muted);
}
button:disabled {
  cursor: default;
  opacity: 0.38;
}
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
#canvas-stage:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input,
select,
textarea {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--field);
  padding: 10px;
  font-size: 13px;
}
select {
  width: 100%;
  min-height: 40px;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
input[type="color"] {
  width: 56px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
input[type="color"]::-webkit-color-swatch {
  border: 1px solid #252a2d22;
  border-radius: 2px;
}
input[type="color"]::-moz-color-swatch {
  border: 1px solid #252a2d22;
  border-radius: 2px;
}
.icon {
  display: block;
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 8px;
  border-color: transparent;
}
.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #201d19;
  font-weight: 600;
}
.accent:hover {
  background: #ed7957;
  border-color: #ed7957;
}
.full {
  width: 100%;
}
.quiet-button {
  justify-content: space-between;
  margin-top: 8px;
}
.quiet-button .icon {
  width: 14px;
  height: 14px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 12px;
  padding: 12px;
  z-index: 100;
  color: var(--panel);
  background: var(--ink);
}
.skip-link:focus {
  top: 10px;
}
.small-label,
.eyebrow {
  font: 9px/1.4 var(--mono);
  letter-spacing: 1.2px;
  color: var(--muted);
}
kbd {
  font: 10px var(--mono);
}

/* The toolbar keeps the work name and the actions within a single quiet line. */
.topbar {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--topbar-height);
  padding: 0 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.identity {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.8px;
}
.identity small {
  align-self: flex-start;
  margin-top: 2px;
  font: 8px var(--mono);
  letter-spacing: 0;
  color: var(--muted);
}
.brand-symbol {
  width: 18px;
  height: 18px;
  display: grid;
  grid-template: 1fr 1fr / 1fr 1fr;
  gap: 3px;
}
.brand-symbol i {
  background: var(--ink);
}
.brand-symbol i:nth-child(2) {
  background: var(--accent);
  border-radius: 50%;
}
.brand-symbol i:nth-child(3) {
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}
.project-title {
  min-width: 0;
  width: 240px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 22px;
  border-left: 1px solid var(--border);
}
.project-title input {
  width: 100%;
  min-width: 0;
  padding: 8px 4px;
  font-size: 13px;
  background: transparent;
  border-color: transparent;
}
.project-title input:hover {
  border-color: var(--border);
}
.local-indicator {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #72937e;
  flex: none;
}
.project-menu {
  position: relative;
  flex: none;
}
.project-menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 36px;
  border-radius: 3px;
  list-style: none;
  cursor: pointer;
}
.project-menu > summary::-webkit-details-marker {
  display: none;
}
.project-menu[open] > summary,
.project-menu > summary:hover {
  background: var(--hover);
}
.project-menu-content {
  position: absolute;
  top: calc(100% + 11px);
  left: -12px;
  z-index: 50;
  width: 280px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 8px 28px var(--shadow);
}
.project-menu-content > button {
  width: 100%;
  justify-content: flex-start;
  margin: 12px 0 18px;
}
.menu-utilities {
  display: flex;
  gap: 6px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.menu-utilities button {
  padding: 6px 8px;
  font-size: 11px;
}
.history-tools {
  display: flex;
  gap: 2px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.seed-tools {
  margin-left: auto;
}
.regenerate {
  padding: 9px 12px;
}
.regenerate kbd {
  margin-left: 10px;
  color: var(--muted);
}
.file-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}
.save-button {
  border-color: transparent;
}
.file-tools .accent {
  min-width: 94px;
}

/* A large, uninterrupted drawing surface. */
.workspace {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr) var(--inspector-width);
  height: calc(100dvh - var(--topbar-height));
}
.tool-rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px 5px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  z-index: 20;
}
.tool-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tool-tabs button {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  height: 57px;
  padding: 8px 2px;
  border-color: transparent;
  border-radius: 3px;
  font-size: 9px;
  color: var(--muted);
}
.tool-tabs button .icon {
  width: 20px;
  height: 20px;
}
.tool-tabs button.active {
  color: var(--ink);
  background: var(--hover);
}
.tool-tabs button.active:before {
  content: "";
  position: absolute;
  left: -5px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: var(--accent);
}
.rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-top: auto;
}
.rail-edition {
  margin-top: 8px;
  font: 6px/1.7 var(--mono);
  letter-spacing: 0.5px;
  color: var(--muted);
  text-align: center;
}
.canvas-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  position: relative;
  background: var(--surround);
  overflow: hidden;
}
.canvas-header {
  height: 42px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
}
.canvas-header > div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.workspace-slash {
  color: var(--muted);
  font-size: 11px;
  opacity: 0.6;
}
#active-system {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.canvas-header .workspace-actions {
  gap: 7px;
  flex: none;
}
.seed-readout {
  margin-right: 12px;
  color: var(--muted);
  font: 9px var(--mono);
  letter-spacing: 0.5px;
}
.canvas-mode-button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 10px;
  border-color: transparent;
}
.canvas-mode-button .icon {
  width: 14px;
  height: 14px;
}
.canvas-header .icon-button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 5px;
}
.canvas-stage {
  --canvas-padding: 18;
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  isolation: isolate;
}
.canvas-stage:active {
  cursor: grabbing;
}
.artboard {
  position: relative;
  flex: none;
  width: 500px;
  height: 500px;
  transform-origin: center;
  line-height: 0;
  box-shadow: 0 2px 8px #0000000b;
  color-scheme: only light;
  forced-color-adjust: none;
}
.artboard > svg {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.checkerboard {
  background-color: #eee;
  background-image: conic-gradient(
    #ccc 25%,
    transparent 0 50%,
    #ccc 0 75%,
    transparent 0
  );
  background-size: 16px 16px;
}
.artboard.show-guides:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  outline: 1px solid #df624380;
  background:
    linear-gradient(
      to right,
      transparent calc(33.33% - 0.5px),
      #df624380 33.33%,
      transparent calc(33.33% + 0.5px),
      transparent calc(66.66% - 0.5px),
      #df624380 66.66%,
      transparent calc(66.66% + 0.5px)
    ),
    linear-gradient(
      to bottom,
      transparent calc(33.33% - 0.5px),
      #df624380 33.33%,
      transparent calc(33.33% + 0.5px),
      transparent calc(66.66% - 0.5px),
      #df624380 66.66%,
      transparent calc(66.66% + 0.5px)
    );
}
.view-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding: 0 20px;
  flex: none;
}
.view-tools-left,
.view-tools-right {
  display: flex;
  align-items: center;
  gap: 5px;
}
.view-tools button {
  min-height: 30px;
  font-size: 10px;
  padding: 5px 7px;
  border-color: transparent;
}
.view-tools .icon {
  width: 14px;
  height: 14px;
}
.view-tools .icon-button {
  width: 30px;
  min-width: 30px;
  height: 30px;
}
.view-tools output {
  width: 42px;
  text-align: center;
  font: 10px var(--mono);
}
.view-divider {
  width: 1px;
  height: 13px;
  background: var(--border);
  margin: 0 5px;
}
.view-tools-right > span {
  font: 9px var(--mono);
  color: var(--muted);
  margin-right: 12px;
}
.canvas-status {
  height: 22px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 20px;
  color: var(--muted);
  font: 7px var(--mono);
  letter-spacing: 0.7px;
  flex: none;
}
.status-dot {
  width: 4px;
  height: 4px;
  background: #72937e;
  border-radius: 50%;
}
.status-spacer {
  flex: 1;
}
.status-slash {
  opacity: 0.5;
  margin: 0 3px;
}
.render-warning {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 16px;
  right: 16px;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.5;
  background: var(--panel);
  border: 1px solid var(--accent);
}

/* Inspector: progressive detail, readable values, and material previews. */
.inspector {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--panel);
  border-left: 1px solid var(--border);
}
.inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  padding: 0 22px;
  flex: none;
  border-bottom: 1px solid var(--border);
}
.inspector-header h1 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.45px;
  margin: 4px 0 0;
}
.inspector-tag {
  font: 7px var(--mono);
  letter-spacing: 1.1px;
  color: var(--muted);
}
.selected-layer-label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0 22px;
  height: 36px;
  flex: none;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}
.selected-layer-label > span:nth-child(2) {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selected-layer-label button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 5px;
  border-color: transparent;
}
.selected-layer-label .icon {
  width: 14px;
  height: 14px;
}
.tiny-dot {
  width: 5px;
  height: 5px;
  background: var(--accent);
}
.inspector-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 20px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  overscroll-behavior: contain;
}
.inspector-footer {
  height: 30px;
  flex: none;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  font: 6px var(--mono);
  letter-spacing: 0.6px;
  color: var(--muted);
}
.mobile-utilities,
.sheet-grip,
.sheet-actions {
  display: none;
}
.section-tools,
.section-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 25px;
  margin-bottom: 12px;
  color: var(--muted);
  font: 9px var(--mono);
  letter-spacing: 0.7px;
}
.text-button {
  font: 10px var(--sans);
  color: var(--ink);
  min-height: 28px;
  padding: 4px 0 4px 8px;
  border-color: transparent;
}
.text-button .icon {
  width: 13px;
  height: 13px;
}
.lock-button {
  min-height: 30px;
  padding: 5px 7px;
  border-color: transparent;
  font: 10px var(--sans);
  color: var(--muted);
}
.lock-button .icon {
  width: 12px;
  height: 12px;
}
.lock-button.locked {
  color: var(--accent);
  background: var(--selected);
}
.engine-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
}
.engine-option {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  position: relative;
  min-width: 0;
  min-height: 67px;
  padding: 6px;
  text-align: left;
  overflow: hidden;
  border-color: var(--border);
  background: transparent;
}
.engine-thumb {
  display: block;
  width: 43px;
  height: 51px;
  overflow: hidden;
  color-scheme: only light;
  background: #f1eee5;
}
.engine-thumb > svg {
  display: block;
  width: 100%;
  height: 100%;
}
.engine-copy {
  min-width: 0;
  display: block;
}
.engine-name {
  display: block;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.15px;
}
.engine-number {
  display: none;
}
.engine-caption {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.35;
}
.engine-option.selected {
  border-color: var(--accent);
  background: var(--selected);
  color: var(--ink);
}
.engine-selected {
  display: none;
  position: absolute;
  right: 4px;
  top: 4px;
  width: 12px;
  height: 12px;
  padding: 1px;
  color: var(--panel);
  background: var(--accent);
  border-radius: 50%;
}
.engine-selected .icon {
  width: 10px;
  height: 10px;
  stroke-width: 2;
}
.engine-option.selected .engine-selected {
  display: block;
}
.engine-context {
  margin: 17px 0 14px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}
.engine-context > .small-label {
  font-size: 8px;
}
.engine-context p,
.panel-intro p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 7px 0 0;
}
.panel-intro {
  margin: 0 0 22px;
}
.inspector-group {
  border-top: 1px solid var(--border);
  margin: 0;
}
.inspector-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  min-height: 49px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 500;
}
.inspector-group > summary::-webkit-details-marker {
  display: none;
}
.inspector-group > summary > .icon {
  width: 12px;
  height: 12px;
  color: var(--muted);
  transform: rotate(90deg);
  transition: transform 0.14s;
}
.inspector-group[open] > summary > .icon {
  transform: rotate(-90deg);
}
.group-body {
  padding-bottom: 18px;
}
.group-description,
.panel-description {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 0 0 16px;
}
.control {
  position: relative;
  margin: 0 0 19px;
}
.control:last-child {
  margin-bottom: 0;
}
.control-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
  min-height: 32px;
}
.control-title {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.control-title > label {
  font-size: 12px;
  line-height: 1.35;
}
.parameter-help {
  min-height: 22px;
  height: 22px;
  min-width: 20px;
  width: 20px;
  padding: 0;
  border-color: transparent;
  color: var(--muted);
  font: 10px var(--mono);
}
.parameter-help[aria-expanded="true"] {
  color: var(--accent);
}
.control-hint {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding: 9px 11px;
  border-left: 2px solid var(--accent);
  background: var(--field);
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.parameter-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: none;
}
.parameter-actions button {
  min-height: 27px;
  width: 25px;
  height: 27px;
  padding: 5px;
  border-color: transparent;
  color: var(--muted);
}
.parameter-actions .icon {
  width: 12px;
  height: 12px;
}
.parameter-actions .locked {
  color: var(--accent);
  background: var(--selected);
}
input.numeric {
  width: 57px;
  height: 30px;
  padding: 5px;
  border: 1px solid transparent;
  font: 11px var(--mono);
  text-align: right;
  background: var(--field);
}
input.numeric:hover,
input.numeric:focus {
  border-color: var(--border);
}
input[type="range"] {
  display: block;
  width: 100%;
  height: 22px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  appearance: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--ink) 0 var(--value),
    var(--range) var(--value) 100%
  );
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--panel);
}
input[type="range"]::-moz-range-track {
  height: 3px;
  background: var(--range);
}
input[type="range"]::-moz-range-progress {
  height: 3px;
  background: var(--ink);
}
input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--panel);
}
.select-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 1fr);
  align-items: center;
  gap: 8px;
}
.select-control select {
  font-size: 12px;
  padding: 8px;
  min-height: 36px;
}
.toggle-control {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  font-size: 12px;
  cursor: pointer;
}
.toggle-control input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.switch {
  position: relative;
  flex: none;
  width: 32px;
  height: 19px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--field);
}
.switch:after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.14s;
}
.toggle-control input:checked + .switch {
  background: var(--ink);
  border-color: var(--ink);
}
.toggle-control input:checked + .switch:after {
  transform: translateX(13px);
  background: var(--panel);
}
.toggle-control input:focus-visible + .switch {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.button-pair {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.button-pair > button {
  flex: 1;
  min-width: 0;
}
.button-pair .icon {
  width: 14px;
  height: 14px;
}
.variation-tools {
  padding: 3px 0 20px;
}
.micro-note {
  font-size: 10px;
  line-height: 1.65;
  color: var(--muted);
  margin: 9px 0 14px;
}
.stacked-label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.5;
}
.stacked-label input,
.stacked-label select {
  width: 100%;
}
.layer-stack {
  border-top: 1px solid var(--border);
}
.layer-row {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  min-height: 66px;
  padding: 5px;
}
.layer-row.selected {
  background: var(--selected);
  box-shadow: inset 2px 0 var(--accent);
}
.layer-row > button {
  min-width: 28px;
  width: 28px;
  min-height: 32px;
  padding: 6px;
  border-color: transparent;
  font: 11px var(--mono);
}
.layer-row .layer-select {
  display: flex;
  justify-content: flex-start;
  flex: 1;
  min-width: 0;
  width: auto;
  padding: 4px;
  text-align: left;
  gap: 9px;
  font: 12px var(--sans);
}
.layer-thumb {
  position: relative;
  display: flex;
  flex: none;
  width: 28px;
  height: 35px;
  overflow: hidden;
}
.layer-thumb i {
  flex: 1;
}
.layer-thumb > span {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 2px 3px;
  font: 7px var(--mono);
  color: var(--ink);
  background: var(--panel);
}
.layer-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.layer-name small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.layer-opacity {
  font: 9px var(--mono);
  color: var(--muted);
  flex: none;
  width: 28px;
  text-align: right;
}
.layer-row .icon {
  width: 15px;
  height: 15px;
}
.layer-row > button[aria-pressed="true"]:not(.layer-select) {
  color: var(--accent);
}
.layer-muted .layer-select {
  opacity: 0.5;
}
.add-layer {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin: 10px 0 24px;
}
.add-layer > span {
  color: var(--muted);
  font: 10px var(--mono);
}
.palette-target {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.palette-target > p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.palette-target > p small {
  display: block;
  margin: 3px 0 0 12px;
  font-size: 10px;
  color: var(--muted);
}
.target-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  background: var(--accent);
}
.color-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 14px;
}
.color-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
}
.ink-swatch {
  display: block;
  width: 56px;
  height: 54px;
}
.ink-label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}
.ink-label > span {
  font: 8px var(--mono);
  letter-spacing: 0.7px;
  color: var(--muted);
}
.ink-label input {
  width: 100%;
  padding: 5px 2px;
  border-color: transparent;
  background: transparent;
  font: 12px var(--mono);
}
.ink-label input:focus {
  border-color: var(--border);
  background: var(--field);
}
.color-actions {
  display: flex;
  gap: 0;
}
.color-actions button {
  padding: 4px;
  width: 27px;
  height: 32px;
  min-height: 32px;
  border-color: transparent;
  color: var(--muted);
}
.background-row {
  grid-template-columns: 56px minmax(0, 1fr);
  margin-bottom: 14px;
}
.curated-palettes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 8px;
}
.curated-palettes button {
  display: block;
  padding: 0;
  min-width: 0;
  border-color: transparent;
  text-align: left;
}
.curated-palettes button > span {
  display: flex;
  height: 25px;
  overflow: hidden;
  border: 1px solid #252a2d22;
}
.curated-palettes i {
  flex: 1;
}
.curated-palettes small {
  display: block;
  margin: 6px 0 3px;
  font-size: 9px;
  color: var(--muted);
}
.format-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 18px;
}
.format-options button {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 3px;
  min-width: 0;
  font-size: 9px;
}
.format-options strong {
  font-size: 14px;
  font-weight: 400;
}
.format-options button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--selected);
}
.dimension-pair {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 15px;
}
.dimension-pair label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 7px;
  font-size: 12px;
}
.dimension-pair input {
  width: 100%;
  font: 12px var(--mono);
}
.dimension-pair > span {
  padding-bottom: 12px;
  color: var(--muted);
}
.collection-intro {
  margin-bottom: 24px;
}
.collection-intro h2,
.export-intro h2 {
  font:
    27px/1.1 Georgia,
    serif;
  letter-spacing: -0.9px;
  margin: 12px 0;
}
.collection-intro p,
.export-intro p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  margin: 0;
}
.preset-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px 12px;
  margin-bottom: 30px;
}
.preset-gallery > button {
  display: block;
  min-width: 0;
  padding: 0;
  text-align: left;
  border-color: transparent;
  border-radius: 0;
  overflow: hidden;
}
.preset-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background: #f1eee5;
  color-scheme: only light;
  overflow: hidden;
}
.preset-image svg {
  display: block;
  width: 100%;
  height: 100%;
}
.preset-caption {
  display: block;
  padding: 10px 0 0;
}
.preset-caption strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.preset-caption small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}
.preset-load {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 11px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 9px;
}
.preset-load .icon {
  width: 12px;
  height: 12px;
}
.preset-gallery button:hover .preset-load,
.preset-gallery button:focus-visible .preset-load {
  color: var(--accent);
}
.saved-project {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}
.saved-project > button:first-child {
  display: block;
  flex: 1;
  min-width: 0;
  text-align: left;
  border-color: transparent;
  padding: 8px 0;
}
.saved-project strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 400;
}
.saved-project small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font: 9px var(--mono);
}
.saved-project > button:not(:first-child) {
  width: 30px;
  min-width: 30px;
  padding: 7px;
  border-color: transparent;
}
.saved-project .icon {
  width: 14px;
  height: 14px;
}
.export-intro {
  margin-bottom: 28px;
}
.export-intro h2 {
  margin: 14px 0;
  font-size: 30px;
  line-height: 1.08;
}

/* Modal engine collection and unobtrusive feedback. */
dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  padding: 30px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 12px 60px #0003;
}
dialog::backdrop {
  background: #1c22248c;
}
dialog h2 {
  font-size: 27px;
  font-weight: 400;
  letter-spacing: -0.6px;
  line-height: 1.15;
  margin: 14px 0;
}
dialog p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.dialog-close {
  float: right;
  min-height: 30px;
  width: 30px;
  padding: 0;
  border-color: transparent;
  font-size: 22px;
}
dialog textarea {
  display: block;
  width: 100%;
  resize: vertical;
}
.help-shortcuts {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 20px 0;
  font-size: 12px;
  border-block: 1px solid var(--border);
}
.help-shortcuts kbd {
  color: var(--muted);
}
.engine-browser {
  width: min(1080px, calc(100vw - 48px));
  padding: 28px;
}
.browser-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.browser-heading h2 {
  margin: 10px 0;
  font:
    32px/1.1 Georgia,
    serif;
}
.browser-heading p {
  font-size: 12px;
  margin: 0;
}
.expanded-engine-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.expanded-engine-list .engine-option {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 10px;
  gap: 14px;
}
.expanded-engine-list .engine-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1.5;
}
.expanded-engine-list .engine-copy {
  padding: 0 3px 5px;
}
.expanded-engine-list .engine-name {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 17px;
}
.expanded-engine-list .engine-number {
  display: block;
  font: 9px var(--mono);
  color: var(--muted);
}
.expanded-engine-list .engine-caption {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 6px;
}
.expanded-engine-list .engine-selected {
  width: 20px;
  height: 20px;
  top: 16px;
  right: 16px;
  padding: 4px;
}
.expanded-engine-list .engine-selected .icon {
  width: 12px;
  height: 12px;
}
.notification {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px;
  background: var(--ink);
  color: var(--panel);
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition: opacity 0.15s;
  pointer-events: none;
}
.notification.visible {
  opacity: 1;
  visibility: visible;
}
.inspector-closed .workspace {
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
}
.inspector-closed .inspector {
  display: none;
}
.inspector-closed #toggle-inspector .icon {
  transform: rotate(180deg);
}
.restore-controls {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 45;
  background: var(--panel);
  border-color: var(--border);
  box-shadow: 0 2px 14px var(--shadow);
  font-size: 11px;
}
.restore-controls kbd {
  margin-left: 8px;
  color: var(--muted);
}
.canvas-only .topbar,
.canvas-only .tool-rail,
.canvas-only .inspector,
.canvas-only .canvas-header,
.canvas-only .canvas-status {
  display: none;
}
.canvas-only .workspace {
  display: flex;
  height: 100dvh;
}
.canvas-only .canvas-workspace {
  width: 100%;
  padding-bottom: 0;
}
.canvas-only .canvas-stage {
  --canvas-padding: 24;
  align-items: center;
  padding-top: 0;
}
.canvas-only .view-tools {
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 0 auto 8px;
  padding: 4px 8px;
  height: 40px;
  border-radius: 3px;
  background: var(--panel);
}
.canvas-only .view-tools-right {
  display: none;
}

@media (min-width: 1800px) {
  :root {
    --inspector-width: 380px;
  }
  .inspector-content {
    padding-inline: 24px;
  }
  .engine-option {
    grid-template-columns: 49px minmax(0, 1fr);
  }
  .engine-thumb {
    width: 49px;
    height: 56px;
  }
  .engine-name {
    font-size: 12px;
  }
  .engine-caption {
    font-size: 10px;
  }
}
@media (max-width: 1150px) and (min-width: 761px) {
  :root {
    --inspector-width: 324px;
    --rail-width: 60px;
  }
  .topbar {
    gap: 9px;
    padding-inline: 12px;
  }
  .identity {
    font-size: 17px;
    gap: 6px;
  }
  .project-title {
    width: 170px;
    padding-left: 12px;
  }
  .regenerate kbd {
    display: none;
  }
  .history-tools {
    padding-left: 6px;
  }
  .file-tools {
    gap: 5px;
  }
  .file-tools .accent {
    min-width: 80px;
  }
  .canvas-header {
    padding-inline: 14px;
  }
  .seed-readout {
    display: none;
  }
  .inspector-content {
    padding-inline: 16px;
  }
  .engine-option {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 7px;
  }
  .engine-thumb {
    width: 38px;
    height: 48px;
  }
}
@media (max-width: 900px) and (min-width: 761px) {
  .identity small {
    display: none;
  }
  .project-title {
    flex: 1;
    width: auto;
    padding-left: 8px;
  }
  .topbar {
    gap: 4px;
  }
  .regenerate {
    font-size: 11px;
    padding: 8px;
  }
  .save-button > span:last-child {
    display: none;
  }
  .file-tools .accent {
    min-width: 65px;
    padding: 8px;
  }
  .canvas-mode-button > span:last-child {
    display: none;
  }
  .canvas-header .eyebrow,
  .workspace-slash {
    display: none;
  }
  .view-tools {
    padding-inline: 10px;
    gap: 6px;
  }
  .view-tools-right > span {
    display: none;
  }
}

/* The mobile inspector overlays a stable canvas; only its handle owns drags. */
@media (max-width: 760px) {
  :root {
    --topbar-height: calc(60px + env(safe-area-inset-top));
    --nav-height: calc(60px + env(safe-area-inset-bottom));
  }
  .topbar {
    padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0
      max(8px, env(safe-area-inset-left));
    gap: 3px;
  }
  .identity {
    margin-right: 5px;
  }
  .identity .wordmark,
  .identity small {
    display: none;
  }
  .brand-symbol {
    width: 18px;
    height: 18px;
  }
  .project-title {
    flex: 1;
    width: auto;
    padding-left: 0;
    border-left: 0;
    gap: 3px;
  }
  .project-title input {
    font-size: 13px;
    padding: 10px 1px;
  }
  .local-indicator {
    width: 4px;
    height: 4px;
  }
  .project-menu > summary {
    width: 40px;
    height: 44px;
  }
  .project-menu-content {
    position: fixed;
    top: calc(var(--topbar-height) - 2px);
    right: 8px;
    left: auto;
    width: min(300px, calc(100vw - 16px));
  }
  .history-tools {
    position: fixed;
    top: calc(var(--topbar-height) + 4px);
    left: 8px;
    gap: 0;
    padding: 0;
    border: 0;
    z-index: 22;
  }
  .history-tools .icon-button {
    width: 40px;
    min-width: 40px;
    height: 44px;
    min-height: 44px;
  }
  .seed-tools {
    margin: 0;
  }
  .regenerate {
    position: fixed;
    top: calc(var(--topbar-height) + 6px);
    right: 10px;
    z-index: 22;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 11px;
    background: var(--panel);
    border-color: var(--border);
  }
  .regenerate .icon {
    width: 14px;
    height: 14px;
  }
  .regenerate kbd {
    display: none;
  }
  .file-tools {
    gap: 0;
  }
  .file-tools > button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 12px;
  }
  .file-tools > button > span:last-child {
    display: none;
  }
  .workspace,
  .inspector-closed .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    height: calc(100dvh - var(--topbar-height) - var(--nav-height));
  }
  .tool-rail {
    display: block;
    position: fixed;
    z-index: 45;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    padding: 0 max(3px, env(safe-area-inset-right)) env(safe-area-inset-bottom)
      max(3px, env(safe-area-inset-left));
    border-top: 1px solid var(--border);
    border-right: 0;
    background: var(--panel);
  }
  .tool-tabs {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    height: 59px;
    gap: 0;
  }
  .tool-tabs button {
    height: 59px;
    min-width: 0;
    min-height: 44px;
    gap: 5px;
    padding: 8px 0 6px;
    font-size: 9px;
    border-radius: 0;
  }
  .tool-tabs button .icon {
    width: 19px;
    height: 19px;
  }
  .tool-tabs button.active {
    background: transparent;
    color: var(--ink);
  }
  .tool-tabs button.active:before {
    top: 0;
    left: 12px;
    right: 12px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
  .rail-bottom {
    display: none;
  }
  .canvas-workspace {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    padding-bottom: var(--sheet-peek);
  }
  .canvas-header {
    height: 52px;
    padding: 0 122px 0 98px;
    gap: 0;
  }
  .canvas-header .eyebrow,
  .workspace-slash,
  .workspace-actions {
    display: none !important;
  }
  #active-system {
    font-size: 11px;
  }
  .canvas-stage {
    --canvas-padding: 16;
    align-items: flex-start;
    padding-top: 20px;
  }
  .view-tools {
    height: 44px;
    padding: 0 12px;
    gap: 4px;
  }
  .view-tools-left {
    gap: 0;
  }
  .view-tools button {
    min-height: 36px;
  }
  .view-tools .icon-button {
    height: 36px;
    min-width: 32px;
    width: 32px;
  }
  .view-divider {
    margin: 0 4px;
  }
  .view-tools-right > span {
    font-size: 8px;
    margin-right: 0;
  }
  .view-tools output {
    width: 38px;
  }
  .canvas-status {
    display: none;
  }
  .inspector,
  .inspector-closed .inspector {
    display: flex;
    position: fixed;
    z-index: 40;
    bottom: var(--nav-height);
    left: 0;
    right: 0;
    width: 100%;
    height: var(--sheet-height, 76px);
    max-height: calc(100dvh - var(--topbar-height) - var(--nav-height) - 8px);
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -6px 24px var(--shadow);
    overflow: hidden;
    transition: height 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .sheet-dragging {
    transition: none !important;
  }
  .sheet-grip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 100%;
    height: 18px;
    min-height: 18px;
    padding: 5px;
    border: 0;
    border-radius: 0;
    touch-action: none;
    cursor: ns-resize;
  }
  .sheet-grip > span {
    width: 34px;
    height: 3px;
    border-radius: 2px;
    background: var(--border);
  }
  .sheet-grip:hover {
    background: var(--hover);
  }
  .inspector-header {
    height: 58px;
    padding: 0 18px 6px;
  }
  .inspector-header h1 {
    font-size: 17px;
    margin-top: 4px;
  }
  .inspector-tag {
    font-size: 7px;
  }
  .sheet-actions {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .sheet-actions button {
    min-height: 40px;
  }
  #sheet-expand {
    font-size: 11px;
    padding: 8px 10px;
  }
  #sheet-expand .icon {
    width: 14px;
    height: 14px;
  }
  #sheet-collapse {
    width: 40px;
    min-width: 40px;
  }
  .selected-layer-label {
    height: 35px;
    padding-inline: 18px;
  }
  .inspector-content {
    padding: 17px 18px 24px;
    -webkit-overflow-scrolling: touch;
  }
  .inspector[data-sheet="collapsed"] .inspector-header {
    border-bottom: 0;
  }
  .inspector[data-sheet="collapsed"] .inspector-content,
  .inspector[data-sheet="collapsed"] .selected-layer-label,
  .inspector[data-sheet="collapsed"] .inspector-footer,
  .inspector[data-sheet="collapsed"] #sheet-collapse {
    display: none;
  }
  .inspector-footer {
    padding-inline: 18px;
    height: 36px;
  }
  .inspector-group > summary {
    min-height: 52px;
    font-size: 13px;
  }
  .control-title > label,
  .stacked-label,
  .toggle-control {
    font-size: 13px;
  }
  .control {
    margin-bottom: 21px;
  }
  .parameter-actions button {
    width: 30px;
    min-height: 36px;
    height: 36px;
  }
  input.numeric {
    width: 60px;
    height: 36px;
    font-size: 12px;
  }
  .parameter-help {
    width: 24px;
    min-width: 24px;
    height: 32px;
    min-height: 32px;
  }
  input[type="range"] {
    height: 30px;
  }
  input[type="range"]::-webkit-slider-thumb {
    width: 15px;
    height: 15px;
    margin-top: -6px;
  }
  input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
  }
  .select-control select,
  .stacked-label input,
  .stacked-label select {
    min-height: 44px;
    font-size: 14px;
  }
  .toggle-control {
    min-height: 44px;
  }
  .button-pair > button,
  .quiet-button,
  .add-layer {
    min-height: 44px;
  }
  .engine-option {
    min-height: 72px;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
  }
  .engine-thumb {
    width: 46px;
    height: 56px;
  }
  .engine-name {
    font-size: 12px;
  }
  .engine-caption {
    font-size: 10px;
  }
  .color-actions button {
    width: 36px;
    min-height: 44px;
    height: 44px;
  }
  .color-row {
    gap: 8px;
  }
  .ink-label input {
    font-size: 13px;
  }
  .layer-row > button {
    width: 36px;
    min-width: 36px;
    height: 44px;
  }
  .layer-row .layer-select {
    min-width: 0;
    width: auto;
    height: auto;
  }
  .saved-project > button:not(:first-child) {
    width: 40px;
    min-width: 40px;
    min-height: 44px;
  }
  .notification {
    top: calc(var(--topbar-height) + 58px);
    bottom: auto;
    font-size: 11px;
    padding: 10px 14px;
  }
  dialog {
    max-height: calc(100dvh - 32px);
    padding: 22px;
  }
  .engine-browser {
    width: calc(100vw - 16px);
    padding: 18px;
  }
  .browser-heading {
    gap: 10px;
    margin-bottom: 18px;
  }
  .browser-heading h2 {
    font-size: 25px;
  }
  .browser-heading p {
    font-size: 11px;
  }
  .expanded-engine-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .expanded-engine-list .engine-option {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 8px;
  }
  .expanded-engine-list .engine-thumb {
    width: 96px;
    height: 96px;
    aspect-ratio: 1;
  }
  .expanded-engine-list .engine-name {
    font-size: 16px;
  }
  .expanded-engine-list .engine-number {
    display: none;
  }
  .expanded-engine-list .engine-caption {
    font-size: 11px;
  }
  .expanded-engine-list .engine-selected {
    top: 12px;
    left: 80px;
    right: auto;
    width: 18px;
    height: 18px;
    padding: 3px;
  }
  .restore-controls {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    min-height: 40px;
  }
  .canvas-only .workspace {
    display: flex;
    height: 100dvh;
  }
  .canvas-only .canvas-workspace {
    padding-bottom: 0;
  }
  .canvas-only .canvas-stage {
    --canvas-padding: 16;
  }
  .canvas-only .inspector {
    display: none;
  }
  .canvas-only .view-tools {
    margin-bottom: max(12px, env(safe-area-inset-bottom));
  }
}
@media (max-width: 370px) {
  .inspector-content {
    padding-inline: 14px;
  }
  .engine-option {
    grid-template-columns: 39px minmax(0, 1fr);
    gap: 7px;
  }
  .engine-thumb {
    width: 39px;
    height: 51px;
  }
  .engine-name {
    font-size: 11px;
  }
  .engine-caption {
    font-size: 9px;
  }
  .parameter-actions {
    gap: 0;
  }
  .parameter-actions button {
    width: 28px;
  }
  input.numeric {
    width: 54px;
  }
  .control-title > label {
    font-size: 12px;
  }
  .parameter-help {
    width: 21px;
    min-width: 21px;
  }
  .view-tools-right > span {
    display: none;
  }
  .help-shortcuts {
    gap: 10px 5px;
    font-size: 11px;
  }
  .help-shortcuts kbd {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
.engine-section {
  position: relative;
}
.engine-browse {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
}
.engine-picker > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
  width: calc(100% - 78px);
  margin-bottom: 12px;
  padding: 4px 0;
  list-style: none;
  font: 9px var(--mono);
  letter-spacing: 0.6px;
  color: var(--muted);
  cursor: pointer;
}
.engine-picker > summary::-webkit-details-marker {
  display: none;
}
.engine-picker > summary .icon {
  width: 11px;
  height: 11px;
  margin-left: auto;
  transform: rotate(90deg);
}
.engine-picker[open] > summary .icon {
  transform: rotate(-90deg);
}
.engine-picker > summary small {
  color: var(--ink);
  font: 10px var(--sans);
  letter-spacing: 0;
}
.engine-picker[open] > summary small {
  display: none;
}
@media (max-width: 760px) {
  .file-tools .accent {
    min-width: 44px;
  }
  .sheet-grip {
    height: 24px;
    min-height: 24px;
  }
  .inspector-header {
    height: 52px;
    touch-action: none;
    user-select: none;
  }
}
/* Locks and discovery are deliberate creative actions, not incidental links. */
.lock-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin: 0 0 17px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  font: 12px var(--sans);
  color: var(--ink);
  text-align: left;
}
.lock-button > .icon {
  width: 17px;
  height: 17px;
}
.lock-button > span {
  flex: 1;
  min-width: 0;
}
.lock-button strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.lock-button small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.lock-button.locked {
  border-color: var(--accent);
  color: var(--ink);
}
.lock-button .switch {
  margin-left: auto;
}
.lock-button[aria-pressed="true"] .switch {
  background: var(--accent);
  border-color: var(--accent);
}
.lock-button[aria-pressed="true"] .switch:after {
  transform: translateX(13px);
  background: var(--panel);
}
.parameter-actions .parameter-lock {
  border-color: var(--border);
  background: var(--field);
}
.parameter-actions .parameter-lock.locked {
  min-width: 50px;
  width: auto;
  padding: 5px;
  border-color: var(--accent);
  gap: 4px;
}
.parameter-lock > span {
  font-size: 9px;
}
.discover-button {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  background: var(--ink);
  color: var(--panel);
  border-color: var(--ink);
  text-align: left;
  justify-content: flex-start;
  gap: 10px;
}
.discover-button:hover {
  background: var(--ink);
  border-color: var(--accent);
}
.discover-button > span {
  flex: 1;
  font-size: 13px;
}
.discover-button small {
  display: block;
  font-size: 9px;
  opacity: 0.7;
  margin-top: 3px;
}
.discover-button > .icon:last-child {
  width: 14px;
  height: 14px;
}
.palette-scope {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--field);
}
.palette-scope button {
  min-height: 38px;
  border-color: transparent;
  padding: 8px 5px;
  font-size: 12px;
}
.palette-scope button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--panel);
}
.palette-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.palette-tools button {
  font-size: 11px;
  padding: 9px 6px;
}
.palette-import-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
  gap: 8px;
  margin: 18px 0;
}
.import-color {
  display: block;
  min-width: 0;
}
.import-color i {
  display: block;
  height: 64px;
  border: 1px solid #252a2d22;
}
.import-color small {
  display: block;
  font: 10px var(--mono);
  color: var(--muted);
  margin-top: 7px;
}
.palette-dialog #palette-import-scope {
  font-size: 12px;
  color: var(--ink);
}
.palette-import-error {
  min-height: 16px;
  color: var(--accent);
  font-size: 12px;
}
.palette-dialog textarea {
  font: 13px/1.6 var(--mono);
}
.inspector-help {
  border-color: transparent;
  min-height: 28px;
  padding: 3px 0 3px 8px;
  font: 9px var(--sans);
  color: var(--muted);
}
.inspector-help .icon {
  width: 12px;
  height: 12px;
}
@media (max-width: 760px) {
  .palette-scope button,
  .palette-tools button {
    min-height: 44px;
  }
  .lock-button {
    min-height: 56px;
  }
  .parameter-actions .parameter-lock.locked {
    min-width: 52px;
  }
  .inspector-help {
    min-height: 36px;
  }
  .palette-dialog .button-pair button {
    min-height: 44px;
  }
}
