:root {
  color-scheme: dark;
  --ud-bg-abyss: #000000;
  --ud-bg-obsidian: #0A0909;
  --ud-surface-card: #120E0E;
  --ud-surface-card-alpha: rgba(18, 14, 14, 0.90);
  --ud-bg-crimson-deep: #170303;
  --ud-bg-moss: #2C3329;

  --ud-tx-primary: #E2D9C8;
  --ud-tx-neutral: #D9D7D7;
  --ud-tx-muted: #A8A49E;

  --ud-ac-gold: #C7C473;
  --ud-ac-crimson: #8A0707;

  --ud-line-subtle: rgba(255, 255, 255, 0.08);
  --ud-line-default: rgba(255, 255, 255, 0.12);
  --ud-line-strong: rgba(255, 255, 255, 0.18);
  --ud-line-gold: rgba(199, 196, 115, 0.35);

  --ud-font-display: 'Cormorant Garamond', Georgia, serif;
  --ud-font-editorial: 'Cinzel', Georgia, serif;
  --ud-font-body: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --ud-font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

/* --- TEMAS DE INTERFACE DA PLATAFORMA (ATELIÊ PALETTES: CROMO & OSSO CLARO) --- */
html[data-ui-theme="chrome"] {
  color-scheme: dark;
  --ud-bg-abyss: #050506;
  --ud-bg-obsidian: #0D0D0F;
  --ud-surface-card: #151518;
  --ud-surface-card-alpha: rgba(21, 21, 24, 0.92);
  --ud-bg-crimson-deep: #1F1F23;
  --ud-bg-moss: #35353B;

  --ud-tx-primary: #F2F2F6;
  --ud-tx-neutral: #D4D4DC;
  --ud-tx-muted: #8E8E98;

  --ud-ac-gold: #E6E6EC;
  --ud-ac-crimson: #9A2232;

  --ud-line-subtle: rgba(230, 230, 236, 0.08);
  --ud-line-default: rgba(230, 230, 236, 0.14);
  --ud-line-strong: rgba(230, 230, 236, 0.24);
  --ud-line-gold: rgba(230, 230, 236, 0.42);
}

html[data-ui-theme="bone-light"] {
  color-scheme: light;
  --ud-bg-abyss: #DEDAD0;
  --ud-bg-obsidian: #D3CEC3;
  --ud-surface-card: #E9E6DF;
  --ud-surface-card-alpha: rgba(233, 230, 223, 0.94);
  --ud-bg-crimson-deep: #F4F2EC;
  --ud-bg-moss: #A9A496;

  --ud-tx-primary: #1B1A17;
  --ud-tx-neutral: #2E2C27;
  --ud-tx-muted: #5F5B51;

  --ud-ac-gold: #1B1A17;
  --ud-ac-crimson: #9E2424;

  --ud-line-subtle: rgba(27, 26, 23, 0.10);
  --ud-line-default: rgba(27, 26, 23, 0.18);
  --ud-line-strong: rgba(27, 26, 23, 0.30);
  --ud-line-gold: rgba(27, 26, 23, 0.45);
}

html[data-ui-theme="bone-light"] select,
html[data-ui-theme="bone-light"] input[type="text"],
html[data-ui-theme="bone-light"] input[type="number"],
html[data-ui-theme="bone-light"] textarea,
html[data-ui-theme="bone-light"] .color-row {
  background: #E9E6DF;
  color-scheme: light;
}
html[data-ui-theme="bone-light"] select option,
html[data-ui-theme="bone-light"] select optgroup {
  background-color: #E9E6DF;
  color: #1B1A17;
}
html[data-ui-theme="bone-light"] .btn-primary,
html[data-ui-theme="bone-light"] .badge-tier.pro,
html[data-ui-theme="bone-light"] .gate-badge--pro,
html[data-ui-theme="bone-light"] .pro-pass-emblem,
html[data-ui-theme="bone-light"] .gate-coupon-btn.copied {
  color: #F4F2EC;
}
html[data-ui-theme="bone-light"] .btn-ghost:hover,
html[data-ui-theme="bone-light"] .mini-pill:hover,
html[data-ui-theme="bone-light"] .icon-btn-top:hover:not(:disabled),
html[data-ui-theme="bone-light"] .icon-btn:hover:not(:disabled),
html[data-ui-theme="bone-light"] .toggle-btn:hover,
html[data-ui-theme="bone-light"] .theme-chip:hover {
  background: rgba(27, 26, 23, 0.07);
}
html[data-ui-theme="bone-light"] .mini-pill.active,
html[data-ui-theme="bone-light"] .btn-ghost.active,
html[data-ui-theme="bone-light"] .toggle-btn.on,
html[data-ui-theme="bone-light"] .icon-btn.vis-on,
html[data-ui-theme="bone-light"] .wizard-step-pill.active {
  background: rgba(27, 26, 23, 0.11);
}
html[data-ui-theme="bone-light"] .lang-pills,
html[data-ui-theme="bone-light"] .sidebar-jump,
html[data-ui-theme="bone-light"] .quick-presets,
html[data-ui-theme="bone-light"] .wizard-steps,
html[data-ui-theme="bone-light"] .wizard-pack-bar,
html[data-ui-theme="bone-light"] .ui-theme-switcher {
  background: rgba(27, 26, 23, 0.05);
}
html[data-ui-theme="bone-light"] .preset-card,
html[data-ui-theme="bone-light"] .theme-showcase-card,
html[data-ui-theme="bone-light"] .gate-option {
  background: #E9E6DF;
}
html[data-ui-theme="bone-light"] .gate-option.gate-option--free-subtle {
  background: transparent;
  border-color: var(--ud-line-default);
}
html[data-ui-theme="bone-light"] .pro-spotlight-card {
  background: radial-gradient(110% 85% at 50% 0%, rgba(27, 26, 23, 0.08) 0%, #F4F2EC 62%);
  box-shadow: 0 14px 36px rgba(27, 26, 23, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
html[data-ui-theme="bone-light"] .btn-pro-shimmer {
  box-shadow: 0 8px 20px rgba(27, 26, 23, 0.18);
}
html[data-ui-theme="bone-light"] .pro-pass-key-pill {
  background: #F4F2EC;
}
html[data-ui-theme="bone-light"] .preset-card:hover,
html[data-ui-theme="bone-light"] .theme-showcase-card:hover {
  background: #F4F2EC;
}
html[data-ui-theme="bone-light"] .preset-thumb-stage,
html[data-ui-theme="bone-light"] .theme-preview-wrap {
  background: rgba(27, 26, 23, 0.07);
}
html[data-ui-theme="bone-light"] .theme-chip,
html[data-ui-theme="bone-light"] .spec-row {
  background: rgba(27, 26, 23, 0.04);
}
html[data-ui-theme="bone-light"] .stage {
  background: radial-gradient(circle at 50% 45%, rgba(27, 26, 23, 0.05) 0%, #DEDAD0 76%);
}
html[data-ui-theme="bone-light"] .canvas-frame {
  box-shadow: 0 20px 52px rgba(27, 26, 23, 0.20), 0 0 0 1px rgba(27, 26, 23, 0.16);
}
html[data-ui-theme="bone-light"] .zoom-controls {
  background: rgba(233, 230, 223, 0.92);
}
html[data-ui-theme="bone-light"] .brand-logo-mark {
  filter: invert(0.88);
}
html[data-ui-theme="bone-light"] .modal-backdrop {
  background: rgba(27, 26, 23, 0.45);
}

.ui-theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}
.ui-theme-dot {
  width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--ud-line-strong);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.ui-theme-dot[data-ui-theme-pick="obsidian"] {
  background: linear-gradient(135deg, #0A0909 55%, #C7C473 55%);
}
.ui-theme-dot[data-ui-theme-pick="chrome"] {
  background: linear-gradient(135deg, #0D0D0F 55%, #E6E6EC 55%);
}
.ui-theme-dot[data-ui-theme-pick="bone-light"] {
  background: linear-gradient(135deg, #DEDAD0 55%, #1B1A17 55%);
}
.ui-theme-dot:hover {
  transform: scale(1.12);
}
.ui-theme-dot.active {
  border-color: var(--ud-ac-gold);
  box-shadow: 0 0 0 2px var(--ud-line-gold);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ud-bg-abyss);
  color: var(--ud-tx-neutral);
  font-family: var(--ud-font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ud-ac-gold);
  text-decoration: none;
  transition: opacity 0.16s ease;
}
a:hover { opacity: 0.8; text-decoration: underline; }

/* --- DOBRA 1: ESTÚDIO (100vh menos barra chevron discreta) --- */
.app-shell {
  display: grid;
  grid-template-columns: 400px 1fr;
  height: calc(100vh - 38px);
  overflow: hidden;
  background: var(--ud-bg-abyss);
}

.sidebar {
  background: var(--ud-bg-obsidian);
  border-right: 1px solid var(--ud-line-default);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.sidebar-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--ud-line-subtle);
  background: var(--ud-bg-obsidian);
  flex-shrink: 0;
}

.brand-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-identity > div {
  min-width: 0;
}

.brand-logo-mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 0.9;
  flex-shrink: 0;
}

.brand-kicker {
  font-family: var(--ud-font-editorial);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ud-ac-gold);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-title {
  margin: 2px 0 0;
  font-family: var(--ud-font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ud-tx-primary);
  letter-spacing: -0.015em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-utility-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}
.sidebar-utility-row .btn-ghost {
  flex: 1;
  width: auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ud-tx-muted);
  font-size: 11.5px;
}
.sidebar-utility-row .btn-ghost:hover {
  color: var(--ud-tx-primary);
}

.lang-pills {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.mini-pill {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ud-tx-muted);
  font-family: var(--ud-font-mono);
  font-size: 10.5px;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.mini-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ud-tx-primary);
}
.mini-pill.active {
  background: rgba(199, 196, 115, 0.12);
  color: var(--ud-ac-gold);
  border-color: transparent;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sidebar-scroll::-webkit-scrollbar { width: 5px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 3px; }

.panel-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex-shrink: 0;
  overflow: hidden;
}
.panel-section.panel-hidden {
  display: none;
}
.panel-section[data-panel-group="texts"] + .panel-section[data-panel-group="texts"] {
  border-top: 1px solid var(--ud-line-subtle);
  padding-top: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.section-label {
  font-family: var(--ud-font-editorial);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ud-ac-gold);
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

label.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11.5px;
  color: var(--ud-tx-muted);
  margin-bottom: 4px;
}

label.field-label > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mono-val {
  font-family: var(--ud-font-mono);
  font-size: 11px;
  color: var(--ud-tx-primary);
  flex-shrink: 0;
  white-space: nowrap;
}

select, input[type="text"], input[type="number"], textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--ud-line-subtle);
  color: var(--ud-tx-primary);
  font-family: var(--ud-font-body);
  font-size: 12.5px;
  padding: 7px 9px;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.16s ease, background 0.16s ease;
}
select {
  color-scheme: dark;
  cursor: pointer;
}
select option,
select optgroup {
  background-color: var(--ud-bg-obsidian);
  color: var(--ud-tx-primary);
}
select optgroup {
  color: var(--ud-ac-gold);
  font-weight: 600;
}
select:hover, input[type="text"]:hover, input[type="number"]:hover, textarea:hover {
  border-color: var(--ud-line-default);
}
select:focus, input[type="text"]:focus, input[type="number"]:focus, textarea:focus {
  border-color: var(--ud-line-gold);
  background: rgba(255, 255, 255, 0.055);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--ud-ac-gold);
  cursor: pointer;
  height: 4px;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--ud-line-subtle);
  border-radius: 6px;
  padding: 4px 8px;
  transition: border-color 0.15s ease;
}
.color-row:hover { border-color: var(--ud-line-default); }
.color-row input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--ud-line-strong);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.color-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-row input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }
.color-row span {
  font-family: var(--ud-font-mono);
  font-size: 11px;
  color: var(--ud-tx-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.grid-2 > *, .grid-3 > * { min-width: 0; }

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ud-tx-neutral);
  font-family: var(--ud-font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ud-tx-primary);
  border-color: transparent;
}
.btn-ghost.active {
  background: rgba(199, 196, 115, 0.11);
  color: var(--ud-ac-gold);
  border-color: rgba(199, 196, 115, 0.24);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.theme-chip {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 6px 7px;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--ud-tx-neutral);
  font-family: var(--ud-font-body);
  font-size: 11.5px;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.theme-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ud-tx-primary);
}
.theme-chip.active {
  border-color: var(--ud-line-gold);
  background: rgba(199, 196, 115, 0.10);
  color: var(--ud-tx-primary);
}
.theme-dots { display: inline-flex; align-items: center; flex-shrink: 0; }
.theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  margin-left: -3px;
}
.theme-dot:first-child { margin-left: 0; }
.theme-name {
  min-width: 0;
  flex: 1;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.theme-chip .badge-tier {
  font-size: 8.5px;
  padding: 1px 4px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.dropzone {
  border: 1px dashed var(--ud-line-default);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 13px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
  font-size: 12px;
  color: var(--ud-tx-muted);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--ud-ac-gold);
  background: rgba(199, 196, 115, 0.06);
  color: var(--ud-tx-primary);
}

.field-block { display: flex; flex-direction: column; gap: 3px; }
.toggle-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ud-tx-muted);
  font-family: var(--ud-font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ud-tx-primary);
}
.toggle-btn.on {
  border-color: transparent;
  color: var(--ud-ac-gold);
  background: rgba(199, 196, 115, 0.12);
}

.spec-list { display: flex; flex-direction: column; gap: 6px; }
.spec-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 5px;
  align-items: center;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--ud-line-subtle);
  padding: 4px 6px;
  border-radius: 6px;
}
.spec-row.identity-row {
  grid-template-columns: auto 1fr auto auto auto;
}
.block-tag {
  font-family: var(--ud-font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--ud-ac-gold);
  background: rgba(199, 196, 115, 0.08);
  border: none;
  border-radius: 4px;
  padding: 2px 6px;
  min-width: 58px;
  text-align: center;
  user-select: none;
}
.spec-row.hidden-item { opacity: 0.45; }
.spec-row input { border: none; background: transparent; padding: 3px 4px; font-size: 12px; min-width: 0; }
.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ud-tx-muted);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  padding: 0;
  transition: background 0.14s ease, color 0.14s ease;
}
.icon-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ud-tx-primary);
}
.icon-btn:disabled { opacity: 0.25; cursor: not-allowed; }
.icon-btn.vis-on {
  color: var(--ud-ac-gold);
  background: rgba(199, 196, 115, 0.12);
}

/* --- STAGE PRINCIPAL --- */
.stage {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: radial-gradient(circle at 50% 45%, rgba(138, 7, 7, 0.08) 0%, rgba(23, 3, 3, 0.10) 38%, rgba(0, 0, 0, 1) 76%);
  overflow: hidden;
  min-width: 0;
}

.topbar {
  padding: 10px 18px;
  border-bottom: 1px solid var(--ud-line-subtle);
  background: var(--ud-bg-obsidian);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.meta-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
}
.badge-mono {
  font-family: var(--ud-font-mono);
  font-size: 11px;
  color: var(--ud-tx-primary);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--ud-line-subtle);
  padding: 4px 9px;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.safe-note {
  font-size: 12px;
  color: var(--ud-tx-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

/* --- UNDO / REDO & HISTÓRICO --- */
.history-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.history-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.icon-btn-top {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ud-tx-neutral);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.14s ease, color 0.14s ease;
}
.icon-btn-top:hover:not(:disabled) {
  color: var(--ud-tx-primary);
  background: rgba(255, 255, 255, 0.06);
}
.icon-btn-top:disabled { opacity: 0.28; cursor: not-allowed; }
.btn-history { height: 30px; padding: 0 9px; font-size: 11.5px; }
.history-badge {
  font-family: var(--ud-font-mono);
  font-size: 10px;
  color: var(--ud-ac-gold);
  background: rgba(199, 196, 115, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}
.history-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 270px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--ud-bg-obsidian);
  border: 1px solid var(--ud-line-gold);
  border-radius: 9px;
  padding: 6px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.85);
  z-index: 80;
}
.history-popover[hidden] { display: none; }
.history-list { display: flex; flex-direction: column; gap: 3px; }
.history-item {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  color: var(--ud-tx-neutral);
  font-family: var(--ud-font-body);
  font-size: 12px;
  text-align: left;
}
.history-item:hover { background: rgba(255, 255, 255, 0.04); }
.history-item.active {
  border-color: var(--ud-line-gold);
  background: rgba(199, 196, 115, 0.10);
  color: var(--ud-tx-primary);
}
.history-item.future { opacity: 0.45; }
.history-item-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item-time { font-family: var(--ud-font-mono); font-size: 10px; color: var(--ud-tx-muted); flex-shrink: 0; }
.history-empty { padding: 12px; text-align: center; font-size: 12px; color: var(--ud-tx-muted); }

.export-select {
  width: auto !important;
  padding: 6px 8px !important;
  font-family: var(--ud-font-mono) !important;
  font-size: 11.5px !important;
}

.btn-primary {
  background: var(--ud-ac-gold);
  color: #0A0909;
  border: 1px solid var(--ud-ac-gold);
  font-family: var(--ud-font-editorial);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.btn-primary:hover { opacity: 0.92; }
.btn-primary:active { transform: scale(0.98); }

.canvas-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  position: relative;
  gap: 10px;
  user-select: none;
  min-height: 0;
}
.canvas-viewport.pan-ready, .canvas-viewport.pan-ready canvas#previewCanvas { cursor: grab !important; }
.canvas-viewport.pan-active, .canvas-viewport.pan-active canvas#previewCanvas { cursor: grabbing !important; }

.canvas-stage-inner {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.canvas-frame {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.88), 0 0 0 1px rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  overflow: hidden;
  background: #000000;
  transform-origin: center center;
  will-change: transform;
}

canvas#previewCanvas {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 210px);
  width: auto;
  height: auto;
  cursor: grab;
}
canvas#previewCanvas:active { cursor: grabbing; }

.viewport-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 2px;
  z-index: 5;
  flex-shrink: 0;
}

.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(18, 14, 14, 0.72);
  border: 1px solid var(--ud-line-subtle);
  padding: 3px 4px;
  border-radius: 7px;
}
.zoom-readout {
  font-family: var(--ud-font-mono);
  font-size: 11px;
  color: var(--ud-tx-primary);
  min-width: 46px;
  text-align: center;
}

.stage-footer-hint {
  font-family: var(--ud-font-mono);
  font-size: 11px;
  color: var(--ud-tx-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.85;
  flex-wrap: wrap;
}

/* --- BOTÃO CHEVRON (ACESSO SOB DEMANDA À DOBRA 2) --- */
.seo-drawer-toggle {
  width: 100%;
  height: 38px;
  background: var(--ud-bg-obsidian);
  border: none;
  border-top: 1px solid var(--ud-line-default);
  border-bottom: 1px solid var(--ud-line-subtle);
  color: var(--ud-tx-muted);
  font-family: var(--ud-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}
.seo-drawer-toggle:hover {
  color: var(--ud-ac-gold);
  background: var(--ud-surface-card);
}
.seo-drawer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ud-ac-gold);
  opacity: 0.75;
}
.seo-chevron {
  transition: transform 0.24s ease;
  color: var(--ud-ac-gold);
}
.seo-drawer-toggle.open .seo-chevron {
  transform: rotate(180deg);
}

.seo-drawer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.42s ease, opacity 0.28s ease;
}
.seo-drawer.open {
  max-height: 6000px;
  opacity: 1;
  pointer-events: auto;
}

/* --- BARRA DE AUTORIA --- */
.authorship-bar {
  background: var(--ud-bg-obsidian);
  border-bottom: 1px solid var(--ud-line-subtle);
  padding: 12px 24px;
}
.authorship-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ud-tx-muted);
}
.authorship-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- DOBRA 2: CONTEÚDO SEO / GUIA DE DIMENSÕES / FAQ --- */
.seo-section {
  background: var(--ud-bg-abyss);
  padding: 48px 24px 68px;
}
.seo-container {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.seo-header h2 {
  font-family: var(--ud-font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--ud-tx-primary);
  margin: 0 0 8px;
  letter-spacing: -0.015em;
}
.seo-header p {
  margin: 0;
  color: var(--ud-tx-muted);
  max-width: 720px;
}

.table-wrap {
  background: var(--ud-bg-obsidian);
  border: 1px solid var(--ud-line-default);
  border-radius: 10px;
  overflow-x: auto;
}
.dims-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.dims-table th {
  font-family: var(--ud-font-editorial);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ud-ac-gold);
  padding: 13px 16px;
  border-bottom: 1px solid var(--ud-line-default);
  background: var(--ud-surface-card);
}
.dims-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--ud-line-subtle);
  color: var(--ud-tx-neutral);
  vertical-align: middle;
}
.dims-table tr:last-child td { border-bottom: none; }
.dims-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.mono-cell { font-family: var(--ud-font-mono); font-size: 12px; color: var(--ud-tx-primary); white-space: nowrap; }
.btn-table-use { font-size: 11.5px; padding: 5px 10px; white-space: nowrap; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.step-card {
  background: var(--ud-bg-obsidian);
  border: 1px solid var(--ud-line-subtle);
  border-radius: 10px;
  padding: 20px;
}
.step-card h3 {
  font-family: var(--ud-font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ud-tx-primary);
  margin: 0 0 8px;
}
.step-card p {
  margin: 0;
  color: var(--ud-tx-muted);
  font-size: 13.5px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--ud-bg-obsidian);
  border: 1px solid var(--ud-line-subtle);
  border-radius: 8px;
  padding: 14px 18px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ud-tx-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::after {
  content: "+";
  font-family: var(--ud-font-mono);
  color: var(--ud-ac-gold);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin: 10px 0 0;
  color: var(--ud-tx-muted);
  font-size: 13.5px;
}

/* --- PÁGINAS INSTITUCIONAIS (SOBRE / PRIVACIDADE) --- */
.doc-page {
  min-height: 100vh;
  background: var(--ud-bg-abyss);
  padding: 40px 24px 80px;
}
.doc-shell { max-width: 780px; margin: 0 auto; }
.doc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--ud-line-subtle);
}
.doc-card {
  background: var(--ud-bg-obsidian);
  border: 1px solid var(--ud-line-subtle);
  border-radius: 12px;
  padding: 32px;
}
.doc-card h1 {
  font-family: var(--ud-font-display);
  font-size: 34px;
  color: var(--ud-tx-primary);
  margin: 0 0 12px;
}
.doc-card h2 {
  font-family: var(--ud-font-editorial);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ud-ac-gold);
  margin: 26px 0 8px;
}
.doc-card p, .doc-card li {
  color: var(--ud-tx-neutral);
  font-size: 14.5px;
  line-height: 1.65;
}

/* --- MODAL 4K / MONETIZAÇÃO --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  position: relative;
  z-index: 2;
  background: var(--ud-bg-obsidian);
  border: 1px solid var(--ud-line-gold);
  border-radius: 12px;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  width: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-card--wide {
  max-width: 820px;
}
.modal-card--wide.is-pro-unlocked {
  max-width: 480px;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.modal-card h3 {
  margin: 0;
  font-family: var(--ud-font-display);
  font-size: 24px;
  line-height: 1.12;
  color: var(--ud-tx-primary);
}
.modal-sub {
  margin: 4px 0 0;
  color: var(--ud-tx-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.gate-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr);
  gap: 14px;
  align-items: stretch;
}
.modal-card--wide.is-pro-unlocked .gate-options {
  grid-template-columns: 1fr;
}
.gate-col-secondary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gate-col-secondary[hidden] {
  display: none !important;
}
.modal-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-progress-wrap[hidden] { display: none !important; }
.modal-progress-bar {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--ud-line-subtle);
  overflow: hidden;
}
.modal-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--ud-ac-gold);
  transition: width 0.35s ease;
}
.modal-progress-badge {
  font-family: var(--ud-font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ud-ac-gold);
}
.gate-preview-banner {
  background: var(--ud-surface-card);
  border: 1px solid var(--ud-line-default);
  border-radius: 9px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.gate-preview-banner[hidden] { display: none !important; }
.gate-preview-thumb-box {
  width: 104px;
  height: 46px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--ud-bg-abyss);
  border: 1px solid var(--ud-line-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gate-preview-thumb-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.gate-preview-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gate-preview-kicker {
  font-family: var(--ud-font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ud-ac-gold);
}
.gate-preview-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--ud-tx-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gate-option {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--ud-line-subtle);
  border-radius: 10px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.2s ease, transform 0.16s ease;
}
.gate-option--free-subtle {
  background: transparent;
  border-style: dashed;
  border-color: var(--ud-line-subtle);
  padding: 10px 12px;
  gap: 5px;
  margin-top: auto;
}
.gate-free-muted {
  font-size: 12px;
  font-weight: 600;
  color: var(--ud-tx-muted);
}
.btn-link-subtle {
  background: none;
  border: none;
  padding: 2px 0;
  text-align: left;
  font-family: var(--ud-font-body);
  font-size: 11.5px;
  color: var(--ud-tx-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  width: fit-content;
  transition: color 0.15s ease;
}
.btn-link-subtle:hover:not(:disabled) {
  color: var(--ud-tx-primary);
}
.btn-link-subtle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: none;
}
.gate-option--reward {
  border-color: var(--ud-line-default);
}
.gate-option--pro {
  background: rgba(199, 196, 115, 0.05);
  border-color: var(--ud-line-gold);
}
.pro-spotlight-card {
  position: relative;
  padding: 16px 18px;
  gap: 12px;
  justify-content: flex-start;
  background: radial-gradient(110% 85% at 50% 0%, rgba(199, 196, 115, 0.16) 0%, var(--ud-surface-card) 62%);
  border: 1px solid var(--ud-line-gold);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.pro-spotlight-card.is-celebrating {
  animation: proPassGlow 0.9s ease-out;
}
@keyframes proPassGlow {
  0% { transform: scale(0.99); box-shadow: 0 0 0 0 rgba(199, 196, 115, 0.55); }
  55% { transform: scale(1.012); box-shadow: 0 0 0 10px rgba(199, 196, 115, 0); }
  100% { transform: scale(1); box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
}
.gate-option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.gate-badge {
  font-family: var(--ud-font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--ud-tx-muted);
  background: rgba(255, 255, 255, 0.05);
}
.gate-badge--gold {
  color: var(--ud-ac-gold);
  background: rgba(199, 196, 115, 0.14);
}
.gate-badge--pro {
  color: #0A0909;
  background: var(--ud-ac-gold);
  font-weight: 700;
}
.gate-coupon-badge {
  font-family: var(--ud-font-mono);
  font-size: 10.5px;
  color: var(--ud-ac-gold);
  background: rgba(199, 196, 115, 0.10);
  border: 1px dashed var(--ud-line-gold);
  padding: 3px 8px;
  border-radius: 5px;
}
.gate-coupon-btn {
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease, border-color 0.15s ease;
}
.gate-coupon-btn:hover {
  background: rgba(199, 196, 115, 0.18);
  transform: translateY(-1px);
}
.gate-coupon-btn.copied {
  background: var(--ud-ac-gold);
  color: #0A0909;
  border-style: solid;
  font-weight: 700;
}
.pro-purchase-view,
.pro-active-pass {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pro-purchase-view[hidden],
.pro-active-pass[hidden],
.gate-key-details[hidden] {
  display: none !important;
}
.pro-price-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
}
.pro-price-compare {
  font-family: var(--ud-font-mono);
  font-size: 13px;
  color: var(--ud-tx-muted);
  opacity: 0.72;
}
.pro-price-main {
  font-family: var(--ud-font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ud-tx-primary);
}
.pro-price-once {
  font-family: var(--ud-font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ud-ac-gold);
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--ud-line-default);
}
.pro-perks-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pro-perks-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ud-tx-neutral);
  line-height: 1.35;
}
.pro-perks-list svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--ud-ac-gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-pro-shimmer {
  position: relative;
  overflow: hidden;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 24px rgba(199, 196, 115, 0.22);
}
.btn-pro-shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.42) 50%, transparent 80%);
  transform: skewX(-18deg);
  animation: proShimmer 3.2s infinite;
  pointer-events: none;
}
@keyframes proShimmer {
  0%, 58% { left: -120%; }
  100% { left: 160%; }
}
.btn-ghost.pro-pill-active,
.sidebar-utility-row .btn-ghost.pro-pill-active {
  position: relative;
  overflow: hidden;
  color: var(--ud-ac-gold);
  font-weight: 700;
  border: 1px solid var(--ud-line-gold);
  background: linear-gradient(135deg, rgba(199, 196, 115, 0.22), rgba(199, 196, 115, 0.06));
  box-shadow: 0 0 0 1px var(--ud-line-gold), 0 4px 14px rgba(199, 196, 115, 0.16);
}
.btn-ghost.pro-pill-active::after,
.sidebar-utility-row .btn-ghost.pro-pill-active::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
  transform: skewX(-18deg);
  animation: proShimmer 4s infinite;
  pointer-events: none;
}
html[data-ui-theme="chrome"] .btn-ghost.pro-pill-active,
html[data-ui-theme="chrome"] .sidebar-utility-row .btn-ghost.pro-pill-active {
  color: var(--ud-tx-primary);
  background: linear-gradient(135deg, rgba(230, 230, 236, 0.22), rgba(230, 230, 236, 0.06));
  box-shadow: 0 0 0 1px var(--ud-line-gold), 0 4px 14px rgba(230, 230, 236, 0.14);
}
html[data-ui-theme="chrome"] .pro-spotlight-card {
  background: radial-gradient(110% 85% at 50% 0%, rgba(230, 230, 236, 0.12) 0%, var(--ud-surface-card) 62%);
}
html[data-ui-theme="bone-light"] .btn-ghost.pro-pill-active,
html[data-ui-theme="bone-light"] .sidebar-utility-row .btn-ghost.pro-pill-active {
  color: #F4F2EC;
  background: linear-gradient(135deg, #1B1A17 0%, #2E2C27 100%);
  border-color: var(--ud-tx-primary);
  box-shadow: 0 4px 12px rgba(27, 26, 23, 0.18);
}
.pro-trust-line {
  text-align: center;
  font-family: var(--ud-font-mono);
  font-size: 10.5px;
  color: var(--ud-tx-muted);
}
.pro-active-pass {
  margin: auto 0;
  padding: 14px;
  border-radius: 8px;
  background: var(--ud-surface-card);
  border: 1px solid var(--ud-line-gold);
}
.pro-temp-banner {
  background: var(--ud-surface-card);
  border: 1px dashed var(--ud-line-gold);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pro-temp-banner[hidden] { display: none !important; }
.pro-temp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.pro-temp-tag {
  font-family: var(--ud-font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--ud-ac-gold);
  background: rgba(199, 196, 115, 0.14);
}
html[data-ui-theme="bone-light"] .pro-temp-tag {
  background: rgba(27, 26, 23, 0.08);
}
.pro-temp-clock {
  font-family: var(--ud-font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ud-tx-primary);
}
.btn-ghost.pro-pill-temp,
.sidebar-utility-row .btn-ghost.pro-pill-temp {
  color: var(--ud-ac-gold);
  font-weight: 600;
  border: 1px dashed var(--ud-line-gold);
  background: var(--ud-surface-card);
}
.pro-pass-seal {
  display: flex;
  align-items: center;
  gap: 11px;
}
.pro-pass-emblem {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  background: var(--ud-ac-gold);
  color: #0A0909;
  flex-shrink: 0;
}
.pro-pass-status {
  font-family: var(--ud-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ud-ac-gold);
}
.pro-pass-title {
  font-family: var(--ud-font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ud-tx-primary);
}
.pro-pass-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pro-pass-key-pill {
  font-family: var(--ud-font-mono);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--ud-bg-obsidian);
  border: 1px solid var(--ud-line-gold);
  color: var(--ud-tx-primary);
}
.gate-quota {
  color: var(--ud-tx-muted);
  font-size: 10.5px;
}
.gate-option-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ud-tx-primary);
}
.gate-option-desc {
  margin: 0;
  font-size: 12px;
  color: var(--ud-tx-muted);
  line-height: 1.4;
}
.gate-btn-full {
  width: 100%;
  text-align: center;
  justify-content: center;
}
.gate-btn-full:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.gate-progress-track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.gate-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--ud-ac-gold);
  border-radius: 999px;
  transition: width 0.35s ease, opacity 0.2s ease;
}
.gate-progress-fill.paused {
  opacity: 0.45;
}
.gate-key-details {
  background: var(--ud-surface-card);
  border: 1px solid var(--ud-line-default);
  border-radius: 8px;
  padding: 9px 11px;
  margin-top: auto;
}
.gate-key-details[open] {
  border-color: var(--ud-line-gold);
}
.gate-key-details summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ud-tx-primary);
  user-select: none;
  list-style: none;
}
.gate-key-details summary:hover {
  color: var(--ud-ac-gold);
}
.key-vault-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--ud-ac-gold);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gate-key-row {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}
.gate-key-row input {
  flex: 1;
  font-family: var(--ud-font-mono);
  font-size: 12px;
}
.pro-key-reassure {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--ud-tx-muted);
}
@media (max-width: 780px) {
  .gate-options {
    grid-template-columns: 1fr;
  }
  .gate-option--pro {
    order: -1;
  }
}

.status-toast {
  position: fixed;
  right: 22px;
  bottom: 46px;
  background: var(--ud-surface-card);
  border: 1px solid var(--ud-line-gold);
  color: var(--ud-tx-primary);
  padding: 9px 14px;
  max-width: min(380px, calc(100vw - 32px));
  border-radius: 8px;
  font-size: 12.5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 120;
}
.status-toast.show { opacity: 1; transform: translateY(0); }

/* --- RESPONSIVO MOBILE-FIRST: EDITOR MAIOR E FIXO NO TOPO --- */
@media (max-width: 980px) {
  .app-shell {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  main.stage {
    order: -1;
    position: sticky;
    top: 0;
    z-index: 30;
    height: 48vh;
    min-height: 270px;
    max-height: 440px;
    border-bottom: 1px solid var(--ud-line-default);
    background: #050404;
  }

  aside.sidebar {
    order: 1;
    height: auto;
    border-right: none;
    overflow: visible;
  }

  .sidebar-scroll {
    overflow: visible;
    padding: 12px 14px 24px;
  }

  .topbar {
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .safe-note,
  .stage-footer-hint {
    display: none;
  }

  .canvas-viewport {
    padding: 10px 12px;
    gap: 6px;
  }

  canvas#previewCanvas {
    max-height: calc(48vh - 110px);
  }

  .topbar-actions {
    gap: 5px;
    flex-wrap: wrap;
  }

  .btn-history span[data-i18n="historyLabel"] {
    display: none;
  }

  .history-popover {
    right: auto;
    left: 0;
    width: min(270px, 85vw);
  }

  select, input[type="text"], input[type="number"], .btn-ghost, .btn-primary {
    min-height: 36px;
  }
  .spec-row input {
    min-height: 30px;
  }

  .steps-grid { grid-template-columns: 1fr; }
}

/* --- GUIA DE FORMATOS, AVISO WEBP & DESCOBERTA DE MARCA --- */
.btn-xs {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.wm-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.format-help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-format-help {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  font-family: var(--ud-font-mono);
  font-size: 11px;
  font-weight: 600;
}

.format-help-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(330px, 86vw);
  background: var(--ud-bg-obsidian);
  border: 1px solid var(--ud-line-strong);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.78);
  z-index: 65;
  text-align: left;
}
.format-help-popover[hidden] { display: none; }

.format-help-title {
  font-family: var(--ud-font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ud-ac-gold);
  margin-bottom: 8px;
}

.format-help-list {
  margin: 0;
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ud-tx-muted);
}
.format-help-list strong {
  color: var(--ud-tx-primary);
  font-family: var(--ud-font-mono);
  font-size: 11px;
}

.webp-warn-pill {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  appearance: none;
  background: var(--ud-bg-obsidian);
  color: var(--ud-ac-gold);
  border: 1px solid var(--ud-line-gold);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.85);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.webp-warn-pill:hover {
  background: var(--ud-surface-card);
  border-color: var(--ud-ac-gold);
}
.webp-warn-pill[hidden] { display: none; }

/* --- REDUÇÃO DE FRICÇÃO CANVA-INSPIRED & DISCLOSURE --- */
.sidebar-jump {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  margin-top: 8px;
  padding: 3px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}
.sidebar-jump .mini-pill {
  padding: 5px 4px;
  font-family: var(--ud-font-body);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}
.quick-presets .mini-pill {
  font-family: var(--ud-font-body);
  font-size: 11px;
  padding: 5px 6px;
  text-align: center;
}

details.fine-tune {
  border-top: 1px solid var(--ud-line-subtle);
  padding-top: 6px;
}
details.fine-tune > summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--ud-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ud-tx-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0;
  user-select: none;
  transition: color 0.15s ease;
}
details.fine-tune > summary::-webkit-details-marker { display: none; }
details.fine-tune > summary::after {
  content: "▾";
  font-size: 11px;
  opacity: 0.7;
  transition: transform 0.16s ease;
}
details.fine-tune[open] > summary {
  color: var(--ud-ac-gold);
}
details.fine-tune[open] > summary::after {
  transform: rotate(180deg);
}
details.fine-tune > summary:hover {
  color: var(--ud-tx-primary);
}
.fine-tune-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
}

.canvas-viewport.drag-active {
  outline: 1px dashed var(--ud-ac-gold);
  outline-offset: -8px;
  background: rgba(199, 196, 115, 0.04);
}
.stage-drop-hint {
  position: absolute;
  inset: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 9, 9, 0.84);
  border: 1px dashed var(--ud-ac-gold);
  border-radius: 10px;
  color: var(--ud-ac-gold);
  font-family: var(--ud-font-editorial);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 40;
}
.stage-drop-hint[hidden] { display: none; }

@keyframes pulseFocusRing {
  0% { box-shadow: 0 0 0 2px var(--ud-ac-gold); background: rgba(199, 196, 115, 0.12); }
  100% { box-shadow: 0 0 0 0 transparent; background: #080707; }
}
.spec-row.pulse-focus {
  animation: pulseFocusRing 1.1s ease-out;
}

/* --- SLOTS DE ANÚNCIO NÃO-INTRUSIVOS (ADSENSE SAFE >= 20px · CLS-SAFE) --- */
.ad-slot {
  background: var(--ud-surface-card);
  border: 1px solid var(--ud-line-subtle);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  overflow: hidden;
}
.ad-slot[hidden] { display: none !important; }
.ad-slot-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ad-slot-badge {
  font-family: var(--ud-font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ud-tx-muted);
  opacity: 0.78;
}
.ad-slot-placeholder {
  font-family: var(--ud-font-mono);
  font-size: 10.5px;
  color: var(--ud-tx-muted);
  opacity: 0.7;
  padding: 6px 4px;
}
.ad-fallback-house {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  text-align: center;
}
.ad-fallback-house--tall {
  gap: 10px;
  padding: 18px 8px;
}
.ad-slot:not(.is-house-fallback) .ad-fallback-house {
  display: none;
}
.ad-fallback-house strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--ud-tx-primary);
  line-height: 1.3;
}
.ad-fallback-house span {
  font-size: 11px;
  color: var(--ud-tx-muted);
  line-height: 1.35;
}
.ad-fallback-link {
  font-family: var(--ud-font-mono);
  font-size: 10.5px;
  color: var(--ud-ac-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-banner {
  position: fixed;
  left: 16px;
  bottom: 48px;
  width: min(420px, calc(100vw - 32px));
  background: var(--ud-surface-card);
  border: 1px solid var(--ud-line-default);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 95;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.cookie-banner[hidden] { display: none !important; }
.cookie-text {
  margin: 0;
  font-size: 11.5px;
  color: var(--ud-tx-muted);
  line-height: 1.45;
}
.cookie-text a {
  color: var(--ud-ac-gold);
  margin-left: 4px;
  text-decoration: underline;
}
.cookie-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.ad-slot-sidebar {
  min-height: 100px;
  margin-top: 24px;
  flex-shrink: 0;
}
.ad-slot-wizard {
  width: 100%;
  max-width: 760px;
  min-height: 92px;
  margin: 28px auto 0;
}
.ad-slot-seo {
  width: 100%;
  min-height: 92px;
  margin: 24px 0;
}
.ad-slot-rewarded {
  width: 100%;
  min-height: 250px;
  margin: 20px 0;
}
.ad-slot-ultrawide {
  display: none;
}
@media (min-width: 1680px) {
  .app-shell.has-ultrawide-ad {
    grid-template-columns: 400px 1fr 200px;
  }
  .app-shell.has-ultrawide-ad .ad-slot-ultrawide {
    display: flex;
    width: 164px;
    min-height: 600px;
    margin: 20px 16px 20px 20px;
    align-self: center;
  }
}
.ad-post-export {
  position: fixed;
  right: 20px;
  bottom: 86px;
  width: min(320px, calc(100vw - 32px));
  background: var(--ud-surface-card);
  border: 1px solid var(--ud-line-gold);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  z-index: 85;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}
.ad-post-export[hidden] { display: none !important; }
.house-ad-badge {
  font-family: var(--ud-font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ud-ac-gold);
}
.house-ad-title {
  font-family: var(--ud-font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--ud-tx-primary);
  line-height: 1.25;
}
.house-ad-desc {
  margin: 0;
  font-family: var(--ud-font-body);
  font-size: 11.5px;
  color: var(--ud-tx-muted);
  line-height: 1.4;
}
.house-ad-cta {
  margin-top: 4px;
  width: 100%;
  justify-content: center;
}
.btn-ad-close {
  background: transparent;
  border: 1px solid var(--ud-line-subtle);
  color: var(--ud-tx-muted);
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.btn-ad-close:hover {
  color: var(--ud-tx-primary);
  border-color: var(--ud-line-strong);
}

@media (max-width: 980px) {
  .format-help-popover {
    right: -40px;
  }
  .webp-warn-pill {
    font-size: 10.5px;
    padding: 4px 7px;
  }
  .ad-post-export {
    right: 16px;
    bottom: 74px;
  }
}

/* --- ASSISTENTE EM 3 ETAPAS & VITRINE VISUAL --- */
.app-shell[hidden],
.wizard-shell[hidden] {
  display: none !important;
}

.wizard-shell {
  min-height: calc(100vh - 38px);
  background: var(--ud-bg-abyss);
  color: var(--ud-tx-neutral);
  display: flex;
  flex-direction: column;
}

.wizard-topbar {
  background: var(--ud-bg-obsidian);
  border-bottom: 1px solid var(--ud-line-subtle);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.wizard-steps {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  flex-wrap: wrap;
}

.wizard-step-pill {
  font-family: var(--ud-font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--ud-tx-muted);
  background: transparent;
}
.wizard-step-pill.active {
  border-color: transparent;
  color: var(--ud-ac-gold);
  background: rgba(199, 196, 115, 0.12);
}
.wizard-step-pill.done {
  border-color: transparent;
  color: var(--ud-tx-primary);
}

.wizard-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wizard-main {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 24px 24px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.wizard-resume-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(199, 196, 115, 0.08);
  border: 1px solid var(--ud-line-gold);
  font-size: 12.5px;
  color: var(--ud-tx-primary);
  flex-wrap: wrap;
}
.wizard-resume-bar[hidden] { display: none !important; }

.wizard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.wizard-hero h2 {
  margin: 0;
  font-family: var(--ud-font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  color: var(--ud-tx-primary);
  line-height: 1.1;
}
.wizard-hero p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--ud-tx-muted);
}

.wizard-pack-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  align-self: flex-start;
}
.wizard-pack-bar .mini-pill {
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--ud-font-body);
}

.wizard-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.preset-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--ud-line-subtle);
  border-radius: 10px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  color: var(--ud-tx-neutral);
  transition: border-color 0.16s ease, transform 0.14s ease, background 0.16s ease;
}
.preset-card:hover {
  border-color: var(--ud-line-strong);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}
.preset-card.active {
  border-color: var(--ud-ac-gold);
  background: rgba(199, 196, 115, 0.08);
}

.preset-thumb-stage {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  border-radius: 6px;
  padding: 8px;
}
.preset-thumb-box {
  border: 1px dashed rgba(199, 196, 115, 0.55);
  background: rgba(199, 196, 115, 0.08);
  border-radius: 3px;
}

.preset-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ud-tx-primary);
  line-height: 1.25;
}
.preset-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--ud-font-mono);
  font-size: 10.5px;
  color: var(--ud-tx-muted);
}

.wizard-step2-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.wizard-step2-left,
.wizard-step2-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wizard-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.theme-showcase-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--ud-line-subtle);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  color: var(--ud-tx-neutral);
  transition: border-color 0.16s ease, transform 0.14s ease, background 0.16s ease;
}
.theme-showcase-card:hover {
  border-color: var(--ud-line-strong);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}
.theme-showcase-card.active {
  border-color: var(--ud-ac-gold);
  background: rgba(199, 196, 115, 0.08);
}

.theme-preview-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.55);
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
}
.theme-preview-canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
}

.theme-showcase-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.theme-showcase-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ud-tx-primary);
}

.badge-tier {
  font-family: var(--ud-font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}
.badge-tier.pro {
  color: #0A0909;
  background: var(--ud-ac-gold);
}
.badge-tier.free {
  color: var(--ud-tx-muted);
  background: rgba(255, 255, 255, 0.04);
  border: none;
}

.sub-panel-divider {
  border-top: 1px solid var(--ud-line-subtle);
  padding-top: 10px;
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seo-packs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.seo-pack-link {
  background: var(--ud-surface-card);
  border: 1px solid var(--ud-line-default);
  color: var(--ud-tx-primary);
  border-radius: 6px;
  padding: 6px 11px;
  font-size: 12px;
}
.seo-pack-link:hover {
  border-color: var(--ud-ac-gold);
  color: var(--ud-ac-gold);
  text-decoration: none;
}

.pro-status-line {
  font-family: var(--ud-font-mono);
  font-size: 11px;
  color: var(--ud-tx-muted);
  line-height: 1.4;
}

.local-qa-bar {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--ud-line-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.local-qa-bar[hidden] { display: none !important; }
.local-qa-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--ud-tx-muted);
}
.local-qa-tag {
  font-family: var(--ud-font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--ud-surface-card);
  border: 1px solid var(--ud-line-gold);
  color: var(--ud-ac-gold);
}
.local-qa-hint code {
  font-family: var(--ud-font-mono);
  font-size: 11px;
  color: var(--ud-tx-primary);
}
.local-qa-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .wizard-topbar { padding: 10px 14px; }
  .wizard-main { padding: 16px 14px 28px; }
  .wizard-preset-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
  .wizard-theme-grid { grid-template-columns: 1fr; }
}
