:root {
  --ui-scale: 0.8;
  --bg: #161617;
  --panel: #1e1f22;
  --panel-2: #24262a;
  --line: #34373d;
  --line-soft: #2b2e34;
  --text: #f2f2f3;
  --muted: #a3a7b0;
  --accent-light: #ffb08a;
  --accent: #f93a00;
  --accent-2: #f66800;
  --accent-deep: #a82600;
  --accent-soft: rgba(249, 58, 0, 0.16);
  --accent-shadow: rgba(246, 104, 0, 0.3);
  --danger: #ff6b6b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 13px; overflow-x: hidden; }
body { min-height: 100vh; }
button, input, select { font: inherit; }
.app-shell { padding: 14px; zoom: var(--ui-scale); max-width: 430px; min-width: 0; overflow-x: hidden; }
.panel-toast {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 999;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(36, 38, 42, 0.96);
  border: 1px solid var(--accent-soft);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.32s ease;
}
.panel-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.panel-modal {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: none;
}
.panel-modal.is-visible {
  display: block;
}
.panel-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
}
.panel-modal-dialog {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-modal-body {
  padding: 16px;
}
.panel-modal-title {
  margin: 0 0 10px;
  font-size: 16px;
}
.panel-modal-message {
  margin: 0;
  color: var(--muted);
  white-space: pre-line;
}
.panel-modal-field-wrap {
  margin-top: 14px;
}
.panel-modal-field-wrap.is-hidden {
  display: none;
}
.panel-modal-input {
  padding-top: 10px;
  padding-bottom: 10px;
}
.panel-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px 16px;
}
.panel-modal-actions .primary-btn,
.panel-modal-actions .secondary-btn {
  min-height: 38px;
  border-radius: 12px;
  padding: 0 13px;
  cursor: pointer;
  transition: .18s ease;
  white-space: nowrap;
}
.panel-modal-actions .primary-btn {
  border: 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #06111f;
  font-weight: 800;
}
.panel-modal-actions .secondary-btn {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}
.panel-modal-actions .compact-btn {
  min-height: 34px;
  padding: 0 12px;
}
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.update-btn { min-height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-light); font-weight: 800; cursor: pointer; }
.update-btn:hover { filter: brightness(1.08); }
.update-btn:disabled { opacity: .65; cursor: default; }
.update-btn.is-hidden { display: none; }
h1 { margin: 0; font-size: 22px; line-height: 1.1; }
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.tab { min-width: 0; min-height: 60px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); padding: 16px 10px 12px; border-radius: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.tab.is-active { background: var(--panel-2); color: var(--text); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-soft); }
.tab-icon { width: 18px; height: 18px; object-fit: contain; flex: 0 0 auto; }
.tab-icon-main { width: 22px; height: 22px; }
.tab span { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 500; }

.tab-icon-star {
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}
.workflow-modal-dialog {
  width: min(100%, 760px);
}

.workflow-modal-dialog {
  max-height: calc(100vh - 40px);
}
.workflow-modal-dialog .panel-modal-body {
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding-right: 4px;
}
.workflow-section + .workflow-section {
  margin-top: 12px;
}
.workflow-section-title {
  margin: 0;
}
.workflow-section-body {
  display: none;
  margin-top: 8px;
}
.workflow-section-body.is-open {
  display: block;
}
.workflow-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.workflow-tab {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--muted);
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}
.workflow-tab.is-active {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), rgba(36, 38, 42, 0.45));
  color: var(--text);
}
.workflow-tab-icon {
  width: 42px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.workflow-tab-icon svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
}
.workflow-tab-icon-styles svg {
  width: 24px;
  height: 24px;
}
.workflow-tab-panel {
  display: none;
}
.workflow-tab-panel.is-active {
  display: block;
}
.workflow-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 10px;
  cursor: grab;
}
.workflow-item-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.workflow-item-icon svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
}
.workflow-item-kind {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.workflow-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  padding: 6px 2px;
  min-height: 68px;
  display: flex;
  align-items: center;
}

.workflow-builder {
  display: block;
  margin-top: 14px;
}
.workflow-column {
  min-width: 0;
}

.workflow-order-wrap {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.workflow-section-fixed .workflow-section-title {
  margin-bottom: 8px;
}
.workflow-section-body-fixed {
  display: block;
  margin-top: 0;
}
.workflow-list {
  min-height: 0;
  max-height: 268px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.workflow-list-available {
  max-height: none;
  overflow: visible;
}
#workflowAvailablePins,
#workflowAvailableMeasures {
  display: grid;
  --workflow-card-min: calc((100% - 24px) / 4);
  grid-template-columns: repeat(auto-fit, minmax(var(--workflow-card-min), 1fr));
  align-items: stretch;
}
#workflowAvailableStyles {
  display: flex;
  flex-direction: column;
}
.workflow-list-selected {
  min-height: 248px;
  max-height: 476px;
}
.workflow-dropzone.is-over {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-soft);
}
.workflow-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 10px;
  cursor: grab;
}
.workflow-item.is-dragging {
  opacity: 0.5;
}
.workflow-item-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.workflow-item-badge {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 auto;
}
.workflow-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workflow-item-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.workflow-item-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.workflow-item-btn:hover { color: var(--text); }
.workflow-item-effect-card {
  min-height: 58px;
  justify-content: center;
  padding: 7px;
}
.workflow-item-effect-card .workflow-item-left {
  justify-content: center;
}
.workflow-item-effect-card .workflow-item-icon {
  width: 100%;
  max-width: 48px;
  height: 26px;
}
.workflow-item-effect-card .workflow-item-name,
.workflow-item-effect-card .workflow-item-kind {
  display: none;
}
.workflow-item-style-card {
  min-height: 42px;
  padding: 8px 10px;
}
.workflow-item-style-card .workflow-item-left {
  width: 100%;
}
.workflow-item-style-card .workflow-item-icon,
.workflow-item-style-card .workflow-item-kind {
  display: none;
}
.workflow-item-style-card .workflow-item-name {
  max-width: 100%;
  font-weight: 650;
}
.workflow-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  padding: 6px 2px;
  min-height: 68px;
  display: flex;
  align-items: center;
}
.workflow-card-meta {
  font-size: 11px;
  color: var(--muted);
}
.tab-icon-glyph { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid currentColor; font-size: 11px; font-weight: 700; }
.panel { display: none; }
.panel.is-active { display: block; }
.sortable-stack { display: flex; flex-direction: column; gap: 0; }
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 16px; }
.rig-block { position: relative; }
.rig-block.is-dragging { opacity: 0.72; }
.rig-block.drag-over-top::before,
.rig-block.drag-over-bottom::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
  z-index: 4;
}
.rig-block.drag-over-top::before { top: -9px; }
.rig-block.drag-over-bottom::after { bottom: -9px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.drag-handle {
  width: 14px;
  height: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: none;
}
.drag-handle:hover { color: var(--text); }
.drag-handle:active { cursor: grabbing; }
.drag-dots {
  width: 8px;
  height: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
}
.drag-dots i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
}
.card-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.card-title-inline { margin: 0; }
.card-toggle {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.card-toggle-arrow {
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  transition: transform 0.22s ease;
}
.card-toggle-arrow-left { order: 0; }
.card-toggle.is-open .card-toggle-arrow { transform: rotate(180deg); }
.settings-panel { display: none; margin-top: 12px; }
.settings-panel.is-open { display: block; }
.js-group-toggle.is-open .card-toggle-arrow { transform: rotate(180deg); }
.settings-sub-card { margin-top: 0; padding-top: 0; border-top: 0; }
.card-copy { margin: 0 0 12px; color: var(--muted); line-height: 1.45; }
.preview-media { display: block; width: 100%; max-height: 180px; object-fit: contain; border-radius: 12px; margin: 4px 0 14px; background: transparent; border: 0; }
.sub-card { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.sub-title { font-weight: 600; margin-bottom: 8px; }
.choice-grid { display: grid; gap: 8px; min-width: 0; align-items: stretch; }
.choice-grid.one { grid-template-columns: 1fr; }
.choice-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-grid.three {
  --choice-card-min: calc((100% - 24px) / 4);
  grid-template-columns: repeat(auto-fit, minmax(var(--choice-card-min), 1fr));
}
.choice-grid.five { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.compact-choice-grid { gap: 6px; }
.choice-grid.checks label, .inline-checks label, .checkbox-inline { display: flex; align-items: center; gap: 8px; color: var(--text); }
.choice-pill { display: block; }
.choice-pill input { display: none; }
.choice-pill span { display: block; padding: 12px 10px; text-align: center; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.choice-pill input:checked + span { border-color: var(--accent); color: var(--text); background: linear-gradient(180deg, var(--accent-soft), rgba(36, 38, 42, 0.45)); }
.choice-pill-compact span { padding: 8px 10px; font-size: 12px; }
.choice-action { width: 100%; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: inherit; }
.choice-action > span { display: block; height: 100%; padding: 8px 10px; text-align: center; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); container-type: inline-size; }
.choice-action:hover > span { filter: brightness(1.05); border-color: var(--accent); color: var(--text); }
.choice-action:active > span { transform: translateY(1px); }
.choice-action:disabled { cursor: default; }
.has-overlay { position: relative; }
.choice-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  z-index: 2;
  pointer-events: none;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0,0,0,0.55);
}
.coming-soon-card .choice-action > span {
  background: #17181b;
  border-color: #17181b;
}
.coming-soon-card .choice-icon,
.coming-soon-card strong {
  opacity: 0.42;
}
.choice-card > span { min-height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.choice-card-small > span { min-height: 88px; gap: 4px; padding-top: 8px; padding-bottom: 8px; }
.choice-card strong { max-width: 100%; font-size: 13px; font-weight: 600; line-height: 1.15; text-wrap: balance; overflow-wrap: normal; word-break: normal; hyphens: none; }
.choice-icon {
  width: 100%;
  max-width: 68px;
  height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.choice-icon svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
}
.choice-icon-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.2);
  color: var(--muted);
  font-size: 26px;
}
.choice-icon-small { width: 100%; max-width: 68px; height: 68px; }
.inline-icon { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.inline-icon svg { display: block; width: 100%; height: auto; max-height: 100%; }
.inline-checks { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.action-grid { display: grid; gap: 10px; }
.action-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.action-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.action-grid-compact { gap: 8px; }
.tight-top { margin-top: 10px; }
.field-block { margin-bottom: 14px; }
.field-block.compact { margin-bottom: 10px; }
.measure-null-controls { display: none; margin: 4px 0 10px; }
.measure-null-controls.is-visible { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.field-label { display: block; margin-bottom: 8px; color: var(--muted); }
.field-label.with-icon, .checkbox-inline.with-icon { display: inline-flex; align-items: center; gap: 8px; }
.stepper-row { display: grid; grid-template-columns: 36px 1fr 36px; gap: 8px; }
.primary-btn, .secondary-btn, .ghost-btn, .icon-btn, .select-field, .input-field { border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
.primary-btn, .secondary-btn, .ghost-btn, .icon-btn { cursor: pointer; padding: 12px 14px; }
.primary-btn { background: linear-gradient(180deg, var(--accent), var(--accent-2)); border-color: transparent; color: #06111f; font-weight: 700; }
.danger-primary-btn { background: linear-gradient(180deg, var(--accent), var(--accent-2)); border-color: transparent; color: #06111f; font-weight: 700; }
.secondary-btn:hover, .ghost-btn:hover, .icon-btn:hover, .tab:hover { filter: brightness(1.05); }
.ghost-btn { padding: 8px 10px; }
.icon-btn { padding: 0; font-size: 18px; }
.full { width: 100%; }
.select-field, .input-field { width: 100%; padding: 12px 10px; outline: none; }
.compact-btn { padding: 10px 12px; }
.compact-field { padding-top: 10px; padding-bottom: 10px; }
.input-field { text-align: left; }
.input-field.is-attention {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft), 0 0 18px var(--accent-shadow);
}
.preset-card { position: relative; }
.smart-card-wrap { position: relative; }
.preset-action > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  min-height: 88px;
}
.preset-gear-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(36, 38, 42, 0.9);
  color: var(--muted);
  cursor: pointer;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.preset-gear-btn:hover { color: var(--text); border-color: var(--accent); }
.preset-preview { margin: 0; max-height: 148px; }
.texture-preview {
  display: block;
  width: 100%;
  height: 92px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background-color: rgba(255,255,255,0.02);
}
.texture-preview-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.34) 1px, transparent 1px);
  background-size: 18px 18px;
}
.texture-preview-dots {
  background-image: radial-gradient(circle, rgba(255,255,255,0.62) 1.5px, transparent 2px);
  background-size: 14px 14px;
}
.preset-settings {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}
.preset-settings.is-open { display: block; }
.smart-card-wrap .preset-gear-btn { top: 8px; right: 8px; }
.preset-setting-row + .preset-setting-row { margin-top: 10px; }
.style-preset-grid {
  --choice-card-min: calc((100% - 24px) / 4);
  grid-template-columns: repeat(auto-fit, minmax(var(--choice-card-min), 1fr));
  align-items: stretch;
  container-type: inline-size;
}
.style-add-card,
.style-preset-card {
  position: relative;
}
.style-add-card {
  justify-self: start;
  width: 100%;
  max-width: calc((100cqw - 16px) / 3);
  min-width: 0;
}
.style-add-card .choice-action {
  height: auto;
}
.style-add-card span,
.style-preset-card span {
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.style-add-plus {
  display: inline-block;
  width: auto;
  height: auto;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  font-style: normal;
  font-weight: 500;
}
.style-add-card .choice-action > span {
  aspect-ratio: 1 / 1;
  min-height: 0;
  height: auto;
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), rgba(36, 38, 42, 0.45));
  color: var(--text);
}
.style-add-card .choice-action:hover > span {
  border-color: var(--accent-light);
  filter: brightness(1.08);
}
.style-add-card .style-add-plus {
  color: var(--accent-light);
}
.style-preset-card strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.style-meta {
  font-size: 11px;
  color: var(--muted);
}
.style-trash-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(36, 38, 42, 0.9);
  color: var(--danger);
  cursor: pointer;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.style-trash-btn:hover {
  filter: brightness(1.08);
  border-color: rgba(255,107,107,0.4);
}
.workflow-edit-btn {
  right: 44px;
  color: var(--muted);
}
.workflow-edit-btn:hover {
  border-color: var(--line);
  color: var(--text);
}
.customize-size-row {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 8px;
  align-items: center;
}
.stepper-btn {
  min-height: 42px;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
}
.customize-scale-value {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
}
.theme-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.card-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.theme-preset,
.card-mode-preset {
  min-height: 64px;
  padding: 8px 6px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.18s ease;
}
.theme-preset span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 25%, var(--swatch-light), var(--swatch), var(--swatch-strong), var(--swatch-deep));
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.28), inset 0 1px 2px rgba(255, 255, 255, 0.35);
}
.theme-preset:hover,
.theme-preset.is-active,
.card-mode-preset:hover,
.card-mode-preset.is-active {
  color: var(--text);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-soft);
}
.card-mode-preset {
  min-height: 44px;
  font-size: 11px;
}
.card-mode-icon .choice-card strong,
.card-mode-icon .style-preset-card strong,
.card-mode-icon .style-meta,
.card-mode-icon .workflow-card-meta {
  display: none !important;
}
.card-mode-text .choice-icon,
.card-mode-text .choice-icon-small,
.card-mode-text .choice-icon-glyph,
.card-mode-text .preview-media,
.card-mode-text .texture-preview,
.card-mode-text .style-add-plus {
  display: none !important;
}
.theme-preset[data-theme="what"] {
  --swatch-light: #ffb08a;
  --swatch: #f93a00;
  --swatch-strong: #f66800;
  --swatch-deep: #a82600;
}
.theme-preset[data-theme="blue"] {
  --swatch-light: #bfe3ff;
  --swatch: #62b0ff;
  --swatch-strong: #318dff;
  --swatch-deep: #1a5fc7;
}
.theme-preset[data-theme="mint"] {
  --swatch-light: #c7ffe7;
  --swatch: #5ee6ae;
  --swatch-strong: #23c986;
  --swatch-deep: #0f7f59;
}
.theme-preset[data-theme="amber"] {
  --swatch-light: #fff0b8;
  --swatch: #ffd166;
  --swatch-strong: #f5a524;
  --swatch-deep: #b76a08;
}
.theme-preset[data-theme="rose"] {
  --swatch-light: #ffd1dc;
  --swatch: #ff8fab;
  --swatch-strong: #f45d83;
  --swatch-deep: #b91c50;
}
.theme-preset[data-theme="violet"] {
  --swatch-light: #ddd2ff;
  --swatch: #b59cff;
  --swatch-strong: #8b5cf6;
  --swatch-deep: #5536b8;
}
.info-banner {
  display: block;
  width: 100%;
  border-radius: 12px;
}
.is-disabled { opacity: 0.55; }
.is-hidden { display: none !important; }
