/* PosterForge v1 modular stylesheet. Cascade order is intentional. */
.setup-design-toolbox { margin-top: 12px; }
.studio-shell[data-studio-mode="setup"] .setup-design-toolbox {
  padding-top: 12px;
  border-top: 1px solid rgba(124,92,255,.32);
}
.poster-elements-drawer { border-color: rgba(124,92,255,.48); background: rgba(124,92,255,.055); }
.poster-elements-intro { display: grid; gap: 4px; margin: 0; padding: 10px; border-bottom: 1px solid var(--border); background: rgba(124,92,255,.06); }
.poster-elements-intro strong { color: #f4f1ff; font-size: .78rem; }
.poster-elements-intro span { color: #b8c0d1; font-size: .7rem; line-height: 1.4; }
.poster-elements-drawer .compact-add-grid { padding-bottom: 6px; }
.poster-elements-drawer .tool-button { display: flex; align-items: center; min-height: 52px; margin: 0; line-height: 1.25; }
.poster-element-help-grid { display: grid; gap: 5px; padding: 0 9px 9px; }
.poster-element-help-grid span { display: block; padding: 6px 7px; border-radius: 7px; background: rgba(255,255,255,.025); color: #aeb7c8; font-size: .66rem; line-height: 1.35; }
.poster-element-help-grid strong { color: #e8ecf5; }
.layer-drawer-help { padding-bottom: 3px !important; }
.studio-shell[data-studio-mode="setup"] #studioDesignInspector { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

.asset-choice-rule-help {
  display: grid;
  gap: 3px;
  line-height: 1.45;
}
.asset-choice-rule-help strong { color: #e7ecf4; }
.asset-choice-detected-summary {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(0,231,255,.22);
  border-radius: 9px;
  background: rgba(0,231,255,.035);
}
.asset-choice-detected-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  margin-bottom: 7px;
}
.asset-choice-detected-heading strong,
.asset-choice-detected-empty strong { color: #e8fbff; font-size: .72rem; }
.asset-choice-detected-heading > span,
.asset-choice-detected-empty span { color: #91a4af; font-size: .64rem; line-height: 1.4; }
.asset-choice-detected-empty { display: grid; gap: 3px; min-width: 0; }
.asset-choice-detected-chips { display: grid; gap: 5px; min-width: 0; }
.asset-choice-detected-chip {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid #313b4b;
  border-radius: 7px;
  background: #10161f;
}
.asset-choice-detected-chip > span {
  min-width: 0;
  color: #dce4ef;
  font-size: .69rem;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.asset-choice-detected-chip small {
  white-space: nowrap;
  color: #96a2b5;
  font-size: .58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.asset-choice-detected-chip.mapped { border-color: rgba(52,211,153,.34); background: rgba(52,211,153,.045); }
.asset-choice-detected-chip.mapped small { color: #8de4bf; }
.asset-choice-detected-chip.unmapped { border-color: rgba(255,184,77,.26); }
.asset-choice-detected-chip.unmapped small { color: #d8ad68; }
.asset-choice-rule-list { display: grid; gap: 10px; min-width: 0; }
.asset-choice-mapping-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(124,92,255,.44);
  border-radius: 10px;
  background: #10161f;
}
.asset-choice-mapping-card.incomplete { border-color: rgba(255,184,77,.34); }
.asset-choice-mapping-card-header {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  gap: 7px 9px;
  align-items: center;
  min-width: 0;
  padding: 9px;
  border-bottom: 1px solid #2c3442;
  background: rgba(124,92,255,.055);
}
.asset-choice-mapping-card-header img {
  grid-row: 1 / span 2;
  width: 48px;
  height: 42px;
  object-fit: contain;
  border-radius: 6px;
  background: #080b10;
}
.asset-choice-mapping-card-header > div { display: grid; gap: 2px; min-width: 0; }
.asset-choice-mapping-card-header strong {
  min-width: 0;
  color: #eef2f8;
  font-size: .74rem;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.asset-choice-mapping-card-header > div span { color: #8f9bad; font-size: .61rem; }
.asset-choice-card-status {
  justify-self: start;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid rgba(52,211,153,.3);
  border-radius: 999px;
  color: #9ae7c5;
  background: rgba(52,211,153,.05);
  font-size: .56rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
}
.asset-choice-mapping-card.incomplete .asset-choice-card-status {
  border-color: rgba(255,184,77,.32);
  color: #e2b974;
  background: rgba(255,184,77,.045);
}
.asset-choice-mapping-card-body { display: grid; gap: 7px; min-width: 0; padding: 9px; }
.asset-choice-mapping-card-body > .field-label {
  color: #cfd7e3;
  font-size: .65rem;
  font-weight: 800;
  line-height: 1.35;
}
.asset-choice-trigger-list { display: grid; gap: 7px; min-width: 0; }
.asset-choice-trigger-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 7px;
  align-items: start;
  min-width: 0;
}
.asset-choice-trigger-input { display: grid; gap: 3px; min-width: 0; }
.asset-choice-trigger-input input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.asset-choice-trigger-input small {
  min-width: 0;
  color: #8f9bad;
  font-size: .59rem;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.asset-choice-trigger-row.detected small { color: #82dcb6; }
.asset-choice-trigger-row.duplicate small { color: #ff9fa8; }
.asset-choice-trigger-row.incomplete small { color: #d4ab6b; }
.asset-choice-trigger-row .icon-button { width: 34px; min-width: 34px; height: 34px; padding: 0; }
.asset-choice-add-value-button {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px dashed #465064;
  border-radius: 7px;
  background: rgba(255,255,255,.018);
  color: #aeb8c8;
  font-size: .65rem;
  font-weight: 800;
}
.asset-choice-add-value-button:not(:disabled):hover { border-color: #00d9ed; color: #fff; }
.asset-choice-add-value-button:disabled { opacity: .42; cursor: not-allowed; }
.asset-choice-properties .shared-artwork-notice { display: grid; gap: 4px; min-width: 0; }
.asset-choice-properties .shared-artwork-notice strong,
.asset-choice-properties .shared-artwork-notice span { display: block; min-width: 0; }
.asset-choice-option > span:not(.asset-choice-order-buttons) {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.25;
}

.studio-template-file-actions { display:grid; gap:10px; padding:14px; border:1px solid var(--border); border-radius:14px; background:rgba(255,255,255,.025); }
.studio-template-file-buttons { align-items:stretch; }
.studio-template-file-buttons > button { flex:1 1 150px; }
.static-image-source-section { display:grid; gap:10px; }
.static-asset-or { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.static-asset-or::before, .static-asset-or::after { content:""; flex:1; height:1px; background:var(--border); }
.static-builder-upload { width:100%; box-sizing:border-box; }


.studio-shell { --studio-left: 210px; --studio-right: 300px; }
.studio-header { min-height: 66px; padding: 8px 12px; }
.studio-step-help { max-width: 360px; font-size: .66rem; opacity: .78; }
.studio-body { grid-template-columns: var(--studio-left) minmax(560px,1fr) var(--studio-right); }
.component-panel,.properties-panel { padding: 9px; }
.component-panel { display: flex; flex-direction: column; gap: 8px; }
.component-panel > * { margin: 0 !important; }
.component-panel > .divider { display: none; }
.compact-setup-overview { padding: 9px !important; }
.studio-sidebar-heading,.studio-setup-mini-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.studio-sidebar-heading h4,.studio-setup-mini-heading h4 { margin: 0; font-size: .88rem; }
.studio-sidebar-heading .eyebrow,.studio-setup-mini-heading .eyebrow { margin-bottom:2px; }
.setup-progress-strip { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; margin-top:7px; }
.setup-progress-step { display:grid; justify-items:center; gap:3px; min-width:0; padding:5px 2px; border:1px solid var(--border); border-radius:7px; background:#0e131b; }
.setup-progress-step span { width:16px; height:16px; display:grid; place-items:center; border-radius:50%; border:1px solid #455064; color:#7f8b9d; font-size:.58rem; font-weight:900; }
.setup-progress-step small { max-width:100%; color:#7f8b9d; font-size:.53rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.setup-progress-step.complete { border-color:rgba(78,211,154,.28); background:rgba(78,211,154,.045); }
.setup-progress-step.complete span { border-color:rgba(78,211,154,.5); color:var(--success); background:rgba(78,211,154,.08); }
.setup-progress-step.complete small { color:#a3d8bf; }
.compact-studio-drawer { margin:0 !important; border-radius:9px; }
.compact-studio-drawer > summary { min-height:35px; padding:7px 9px; }
.drawer-summary-hint { color:#7f8a9c; font-size:.57rem; font-weight:750; }
.studio-drawer-body { display:grid; gap:7px; padding:8px; }
.studio-drawer-body label { margin:0; }
.studio-drawer-body .button-row { margin:0; }
.compact-context-note { padding:7px 8px; margin:0; }
.compact-context-note span { font-size:.63rem; }
.poster-elements-drawer .compact-add-grid { padding:7px; }
.poster-elements-drawer .tool-button { min-height:38px; padding:6px 7px; font-size:.67rem; }
.sidebar-inline-help { margin:0 !important; padding:0 8px 8px !important; color:#818da0; font-size:.61rem; line-height:1.35; }
.poster-element-help-grid,.poster-elements-intro { display:none !important; }
.layers-drawer .component-list { max-height:calc(100vh - 390px); min-height:72px; }
.studio-source-panel,.template-asset-library,.studio-template-file-actions { padding:0 !important; background:#11161e; }
.studio-source-panel button,.template-asset-upload-form button { width:auto; margin-top:0; }
.template-asset-upload-form { gap:6px; }
.template-asset-library-list { max-height:180px; overflow:auto; }
.studio-template-file-buttons { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.studio-template-file-buttons button { width:100%; }
.studio-setup-mini { margin:0 0 8px; padding:8px; border:1px solid rgba(124,92,255,.28); border-radius:9px; background:rgba(124,92,255,.04); }
.setup-mini-summary { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:6px 0 7px; }
.setup-mini-summary strong { color:#e9e5ff; font-size:.7rem; }
.setup-mini-summary span { color:#8f9aad; font-size:.61rem; text-align:right; }
.compact-continue-button { min-height:31px; padding:6px 8px; font-size:.68rem; }
#studioSetupInspector + #studioDesignInspector { border-top:1px solid var(--border); padding-top:8px; }
.inspector-selection-header { min-height:40px; padding-bottom:7px; margin-bottom:7px; }
.inspector-selection-header h4 { font-size:.9rem; }
.compact-inspector-card > p.tiny.muted { font-size:.61rem; line-height:1.35; }

.asset-choice-simple-intro { display:grid; gap:3px; padding:8px 9px; border:1px solid rgba(124,92,255,.3); border-radius:9px; background:rgba(124,92,255,.045); }
.asset-choice-simple-intro strong { color:#eeeaff; font-size:.76rem; }
.asset-choice-simple-intro span { color:#9da8ba; font-size:.64rem; line-height:1.35; }
.asset-choice-compact-section { margin:8px 0 0; border:1px solid var(--border); border-radius:9px; background:#10161f; overflow:hidden; }
.asset-choice-compact-section > summary { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:34px; padding:7px 9px; list-style:none; cursor:pointer; color:#dce3ed; font-size:.7rem; font-weight:850; }
.asset-choice-compact-section > summary::-webkit-details-marker { display:none; }
.asset-choice-compact-section > summary > span:first-child { display:flex; align-items:center; gap:7px; }
.asset-choice-compact-section > summary b,.asset-choice-step-heading > span { width:20px; height:20px; display:grid; place-items:center; border-radius:50%; background:rgba(124,92,255,.18); border:1px solid rgba(124,92,255,.55); color:#dcd4ff; font-size:.64rem; }
.asset-choice-allowed-list { display:grid; gap:4px; padding:7px; max-height:180px; overflow:auto; border-top:1px solid var(--border); }
.compact-choice-option { display:grid !important; grid-template-columns:18px 34px minmax(0,1fr); gap:7px; align-items:center; min-height:42px; padding:5px 6px !important; margin:0 !important; border:1px solid #293240; border-radius:7px; background:#0d131b; }
.compact-choice-option img { width:34px !important; height:30px !important; object-fit:contain; border-radius:5px; background:#070a0e; }
.compact-choice-option span { min-width:0; color:#dce3ec; font-size:.67rem; overflow-wrap:anywhere; }
.asset-choice-mapping-simple { display:grid; gap:7px; margin-top:8px; padding:8px; border:1px solid rgba(0,231,255,.22); border-radius:9px; background:rgba(0,231,255,.025); }
.asset-choice-position-simple { display:grid; gap:7px; margin-top:8px; padding:8px; border:1px solid rgba(124,92,255,.3); border-radius:9px; background:rgba(124,92,255,.035); }
.asset-choice-position-simple .compact-field { margin:0; }
.asset-choice-step-heading { display:grid; grid-template-columns:22px minmax(0,1fr); gap:7px; align-items:start; }
.asset-choice-step-heading div { display:grid; gap:2px; }
.asset-choice-step-heading strong { color:#e9fbff; font-size:.72rem; }
.asset-choice-step-heading small { color:#8ea0ab; font-size:.61rem; line-height:1.35; }
.compact-detected-values { min-height:0; padding:6px 7px; border:0; border-radius:6px; background:#0c1219; color:#8f9dac; font-size:.59rem; line-height:1.35; overflow-wrap:anywhere; }
.compact-detected-values strong { color:#b9c6d4; }
.simple-asset-choice-rules { display:grid; gap:8px; min-width:0; }
.simple-asset-rule-row {
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  gap:8px 10px;
  align-items:center;
  padding:10px;
  border:1px solid #2b3442;
  border-radius:10px;
  background:#0e141c;
  min-width:0;
}
.simple-asset-rule-row.mapped { border-color:rgba(52,211,153,.35); background:rgba(52,211,153,.04); }
.simple-asset-rule-row img {
  width:44px;
  height:40px;
  object-fit:contain;
  border-radius:6px;
  background:#070a0e;
}
.simple-asset-rule-name { min-width:0; display:grid; gap:3px; }
.simple-asset-rule-name strong {
  min-width:0;
  color:#e6ebf2;
  font-size:.82rem;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.simple-asset-rule-name span { color:#9aa8bc; font-size:.72rem; line-height:1.3; }
.simple-asset-rule-value {
  grid-column:1 / -1;
  display:grid;
  gap:5px;
  min-width:0;
  margin:0;
}
.simple-asset-rule-value > span {
  color:#c5d0de;
  font-size:.78rem;
  font-weight:700;
}
.simple-asset-rule-row input,
.simple-asset-rule-value input {
  min-width:0;
  width:100%;
  min-height:38px;
  padding:8px 10px;
  font-size:.86rem;
  box-sizing:border-box;
  border-radius:8px;
}
.simple-asset-rule-note {
  grid-column:1 / -1;
  color:#9fb8aa;
  font-size:.7rem;
}
.asset-choice-allowed-list.text-choice-option-list {
  display:grid;
  gap:12px;
  min-width:0;
  max-height:none;
  overflow:visible;
  padding:0;
  border-top:none;
}
.text-choice-option-row {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:8px;
  padding:12px;
  border:1px solid rgba(52,211,153,.35);
  border-radius:12px;
  background:rgba(52,211,153,.04);
  min-width:0;
}
.text-choice-option-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  color:#c5d0de;
  font-size:.72rem;
  font-weight:700;
}
.text-choice-option-field {
  display:grid;
  gap:5px;
  margin:0;
  min-width:0;
}
.text-choice-option-field > span {
  color:#c5d0de;
  font-size:.72rem;
  font-weight:700;
}
.text-choice-option-row textarea,
.text-choice-option-field textarea {
  width:100%;
  min-width:0;
  min-height:88px;
  resize:vertical;
  box-sizing:border-box;
  padding:10px 12px;
  border-radius:8px;
  font-size:.9rem;
  line-height:1.4;
  overflow-wrap:anywhere;
}
.text-choice-option-remove {
  margin-top:0;
  white-space:nowrap;
  flex:0 0 auto;
}
.text-choice-rule-list {
  display:grid;
  gap:8px;
  min-width:0;
}
.text-choice-rule-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(118px,1.15fr);
  gap:8px;
  align-items:center;
  padding:10px;
  border:1px solid #2b3442;
  border-radius:10px;
  background:#0e141c;
  min-width:0;
}
.text-choice-rule-row.mapped {
  border-color:rgba(52,211,153,.35);
  background:rgba(52,211,153,.04);
}
.text-choice-rule-value {
  min-width:0;
  color:#e6ebf2;
  font-size:.82rem;
  line-height:1.3;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.text-choice-rule-row select {
  min-width:0;
  width:100%;
  box-sizing:border-box;
}
.asset-choice-advanced-settings .asset-choice-advanced-body { display:grid; gap:7px; padding:8px; border-top:1px solid var(--border); }
.asset-choice-advanced-settings label { margin:0; }
#assetChoiceBindingWrap { display:none !important; }

@media (max-width: 1250px) {
  .studio-shell { --studio-left: 188px; --studio-right: 280px; }
  .studio-step-help { display:none; }
}
/* Keep the studio header focused on name, mode and primary actions. */
#templateStudioDialog .studio-step-help { display:none !important; }

#templateStudioDialog .studio-shell{--studio-left:186px;--studio-right:286px}
#templateStudioDialog .studio-header{min-height:58px;padding:7px 11px;grid-template-columns:minmax(190px,1fr) auto minmax(190px,1fr);gap:9px}
#templateStudioDialog .studio-title-block{gap:2px}
#templateStudioDialog .studio-breadcrumb-row{display:flex;align-items:center;gap:7px;min-width:0}
#templateStudioDialog .studio-breadcrumb-row .eyebrow{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#templateStudioDialog .studio-build-badge{flex:0 0 auto;padding:2px 6px;border:1px solid rgba(124,92,255,.45);border-radius:999px;color:#cfc5ff;background:rgba(124,92,255,.08);font-size:.52rem;font-weight:900;letter-spacing:.04em}
#templateStudioDialog .title-input{min-height:27px;padding:3px 6px;font-size:.82rem}
#templateStudioDialog .save-status{font-size:.56rem;line-height:1.2}
#templateStudioDialog .studio-step-help{display:none!important}
#templateStudioDialog .studio-mode-tabs{padding:3px;gap:2px}
#templateStudioDialog .studio-mode-tabs button{min-height:31px;padding:5px 12px;font-size:.69rem}
#templateStudioDialog .studio-primary-actions{gap:5px}
#templateStudioDialog .studio-primary-actions button:not(.icon-button){min-height:31px;padding:5px 9px;font-size:.67rem}
#templateStudioDialog .studio-body{grid-template-columns:var(--studio-left) minmax(620px,1fr) var(--studio-right)}
#templateStudioDialog .component-panel,#templateStudioDialog .properties-panel{padding:7px}
#templateStudioDialog .component-panel{gap:6px;background:#0c1016}
#templateStudioDialog .properties-panel{background:#0c1016}
#templateStudioDialog #studioSetupInspector{display:none!important}
#templateStudioDialog #studioSetupInspector + #studioDesignInspector{border-top:0!important;padding-top:0!important}
#templateStudioDialog .compact-setup-overview{padding:6px!important;border-radius:8px}
#templateStudioDialog .studio-sidebar-heading h4{font-size:.74rem}
#templateStudioDialog .setup-progress-strip{gap:2px;margin-top:4px}
#templateStudioDialog .setup-progress-step{padding:3px 1px;gap:2px;border-radius:6px}
#templateStudioDialog .setup-progress-step span{width:13px;height:13px;font-size:.48rem}
#templateStudioDialog .setup-progress-step small{font-size:.45rem}
#templateStudioDialog .compact-studio-drawer>summary{min-height:31px;padding:5px 7px;font-size:.65rem}
#templateStudioDialog .poster-elements-drawer .compact-add-grid{padding:5px;gap:4px}
#templateStudioDialog .poster-elements-drawer .tool-button{min-height:34px;padding:5px;font-size:.61rem;line-height:1.15}
#templateStudioDialog .layers-drawer .component-list{min-height:96px;max-height:calc(100vh - 300px)}
#templateStudioDialog .studio-drawer-body{padding:6px;gap:5px}
#templateStudioDialog .studio-drawer-body .shared-artwork-notice,#templateStudioDialog .studio-drawer-body>p.tiny.muted,#templateStudioDialog #studioSheetSourceHelp{display:none!important}
#templateStudioDialog .binding-summary p{display:none!important}
#templateStudioDialog .canvas-toolbar{min-height:42px;padding:5px 8px;gap:5px}
#templateStudioDialog .canvas-toolbar button,#templateStudioDialog .canvas-toolbar summary{min-height:30px;padding:5px 8px}
#templateStudioDialog .canvas-scroller{padding:16px}
#templateStudioDialog .inspector-selection-header{min-height:34px;margin-bottom:5px;padding-bottom:5px}
#templateStudioDialog .inspector-selection-header .eyebrow{font-size:.5rem}
#templateStudioDialog .inspector-selection-header h4{font-size:.78rem;margin:1px 0}
#templateStudioDialog .selection-type-badge{font-size:.49rem;padding:2px 5px}
#templateStudioDialog .inspector-card{padding:7px;border-radius:8px}
#templateStudioDialog .inspector-card>p.tiny.muted{display:none}
#templateStudioDialog .properties-panel label{margin-bottom:6px;font-size:.62rem}
#templateStudioDialog .properties-panel input,#templateStudioDialog .properties-panel select{min-height:31px;padding:5px 7px;font-size:.66rem}
#templateStudioDialog .component-inspector-tabs{gap:3px;margin-bottom:6px}
#templateStudioDialog .component-inspector-tabs button{min-height:29px;padding:4px 7px;font-size:.61rem}
#templateStudioDialog #templateLayerPositionNotice{display:none}
#templateStudioDialog .shape-preset-grid[hidden]{display:none!important}
@media(max-width:1280px){#templateStudioDialog .studio-shell{--studio-left:170px;--studio-right:265px}#templateStudioDialog .studio-body{grid-template-columns:var(--studio-left) minmax(520px,1fr) var(--studio-right)}}


#templateStudioDialog .studio-build-badge{background:rgba(0,231,255,.12);border-color:rgba(0,231,255,.45);color:#91f7ff}

#templateStudioDialog .studio-build-badge{font-size:.64rem!important;font-weight:1000!important;padding:4px 8px!important;background:#00e7ff!important;color:#031016!important;border-color:#00e7ff!important;box-shadow:0 0 0 2px rgba(0,231,255,.2)!important}

/* Keep Setup / Preview / Generate shell geometry identical so the canvas does not jump. */
.studio-shell[data-studio-mode="preview"] .component-panel { display: flex !important; }
.studio-shell[data-studio-mode="preview"] .studio-body { grid-template-columns: var(--studio-left) minmax(520px,1fr) var(--studio-right); }
.studio-shell[data-studio-mode="preview"] .canvas-scroller { background: radial-gradient(circle at 50% 25%, rgba(0,231,255,.07), transparent 45%); }
.studio-shell[data-studio-mode="preview"] #arrangeMenu,
.studio-shell[data-studio-mode="preview"] #undoStudio,
.studio-shell[data-studio-mode="preview"] #redoStudio { display: none !important; }
.studio-shell[data-studio-mode="preview"] #studioCanvas { cursor: default; }
.studio-shell[data-studio-mode="preview"] .properties-panel { border-left-color: rgba(0,231,255,.22); }
.studio-preview-inspector { display: grid; gap: 10px; }
.studio-preview-inspector h4,
.studio-preview-inspector p { margin-top: 0; }
.preview-action-row { display: grid; grid-template-columns: 1fr; gap: 7px; }
@media (max-width: 900px) {
  .studio-shell[data-studio-mode="preview"] .studio-body { grid-template-columns: 1fr; }
}

.studio-shell[data-studio-mode="preview"] .canvas-toolbar > details { display:none !important; }


#templateStudioDialog.studio-shell[data-studio-mode="preview"] .component-panel { display:flex !important; }
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .studio-body {
  grid-template-columns: var(--studio-left) minmax(0, 1fr) var(--studio-right) !important;
}
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .canvas-area { min-width:0; }
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .canvas-scroller {
  padding: 12px !important;
}
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .properties-panel {
  min-width:0;
  width:auto;
  padding:8px !important;
  overflow:auto;
}
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .studio-preview-inspector { gap:6px; }
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .studio-preview-inspector > .eyebrow { margin:0; }
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .studio-preview-inspector > h4 { margin:0 0 2px; font-size:.78rem; }
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .studio-preview-inspector > p.tiny.muted { display:none; }
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .setup-status-card,
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .shared-artwork-notice { padding:7px; border-radius:7px; }
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .setup-status-card strong,
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .shared-artwork-notice strong { font-size:.68rem; }
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .setup-status-card span,
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .shared-artwork-notice span { font-size:.56rem; line-height:1.3; }
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .setup-status-card.error,
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .studio-preview-error {
  padding: 10px 11px;
}
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .setup-status-card.error strong,
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .studio-preview-error strong {
  font-size: .86rem;
}
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .setup-status-card.error span,
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .studio-preview-error span,
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .studio-preview-error li {
  font-size: .78rem;
  line-height: 1.4;
}
#templateStudioDialog .studio-preview-error {
  margin: 0;
}
#templateStudioDialog .studio-preview-error ul {
  margin: 8px 0 0;
  padding-left: 1.15em;
}
#templateStudioDialog .studio-preview-error li { margin: 0 0 4px; }
#templateStudioDialog .studio-api-error-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  z-index: 25;
}
#templateStudioDialog .studio-api-error-banner[hidden] {
  display: none !important;
}
#templateStudioDialog .studio-api-error-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
#templateStudioDialog .studio-api-error-copy strong {
  font-size: .92rem;
}
#templateStudioDialog .studio-api-error-copy span,
#templateStudioDialog .studio-api-error-copy li {
  font-size: .86rem;
  line-height: 1.4;
}
#templateStudioDialog .studio-api-error-copy ul {
  margin: 6px 0 0;
  padding-left: 1.15em;
}
#templateStudioDialog .studio-api-error-dismiss {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 12px;
}
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .preview-action-row { gap:5px; }
#templateStudioDialog.studio-shell[data-studio-mode="preview"] .preview-action-row button { min-height:30px; padding:5px 7px; font-size:.62rem; }
@media (max-width:1000px) {
  #templateStudioDialog.studio-shell[data-studio-mode="preview"] .studio-body {
    grid-template-columns: var(--studio-left) minmax(0, 1fr) var(--studio-right) !important;
  }
}
@media (max-width:760px) {
  #templateStudioDialog.studio-shell[data-studio-mode="preview"] .studio-body { grid-template-columns:1fr !important; }
  #templateStudioDialog.studio-shell[data-studio-mode="preview"] .properties-panel { max-height:190px; border-left:0; border-top:1px solid var(--border); }
}

/* Mapping editor return path when opened from Template Setup. */
.sheet-return-to-template { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:0 0 14px; padding:10px 12px; border:1px solid rgba(0,231,255,.28); border-radius:10px; background:rgba(0,231,255,.045); }
.sheet-return-to-template[hidden] { display:none !important; }
.sheet-return-to-template > div { min-width:0; display:grid; gap:2px; }
.sheet-return-to-template strong { color:#dffcff; font-size:.76rem; }
.sheet-return-to-template span { color:#91a5b2; font-size:.64rem; line-height:1.35; }
