:root {
  --ink: #17162f;
  --muted: #595d74;
  --line: #e2e4ef;
  --canvas: #eff1f7;
  --paper: #ffffff;
  --violet: #6658f5;
  --violet-dark: #5145d8;
  --violet-soft: #eeecff;
  --coral: #ff7257;
  --sun: #ffcc66;
  --success: #1f9d72;
  --shadow: 0 18px 50px rgba(37, 34, 83, .10);
  --radius: 18px;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 9px; color: #fff; background: var(--violet-dark); font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 10px; }
button, select, input[type="checkbox"], label.upload-zone { touch-action: manipulation; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
body { margin: 0; min-width: 320px; max-width: 100%; min-height: 100vh; overflow-x: hidden; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, label.upload-zone { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(102,88,245,.25); outline-offset: 2px; }

.topbar { height: 68px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-family: "Trebuchet MS", sans-serif; font-size: 1.08rem; font-weight: 800; letter-spacing: -.025em; }
.brand b { color: var(--violet); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--violet); display: grid; gap: 3px; padding: 8px; transform: rotate(-3deg); box-shadow: 0 7px 16px rgba(102,88,245,.26); }
.brand-mark span { height: 3px; border-radius: 4px; background: #fff; align-self: center; }
.brand-mark span:last-child { width: 60%; background: var(--sun); }
.top-actions { display: flex; align-items: center; gap: 9px; }
.save-state { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 7px; margin-right: 4px; }
.save-state i, .valid-badge i { width: 7px; height: 7px; background: var(--success); border-radius: 50%; }
.button { border: 0; border-radius: 11px; min-height: 44px; padding: 0 18px; font-weight: 700; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary { background: var(--violet); color: #fff; box-shadow: 0 8px 22px rgba(102,88,245,.22); }
.button.primary:hover { background: var(--violet-dark); }
.button.secondary { background: #fff; border: 1px solid var(--line); }
.button.quiet { background: transparent; color: var(--muted); }
.button.compact { min-height: 39px; padding-inline: 15px; font-size: .85rem; }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; }

.workspace { display: grid; grid-template-columns: 230px minmax(470px, 1fr) minmax(390px, 42%); min-height: calc(100vh - 68px); max-width: 1680px; margin: 0 auto; }
.rail { border-right: 1px solid var(--line); padding: 28px 18px; background: #f7f8fc; display: flex; flex-direction: column; }
.rail-intro { padding: 2px 10px 22px; border-bottom: 1px solid var(--line); }
.rail-intro p { margin: 0 0 4px; color: var(--muted); font-size: .75rem; }
.rail-intro strong { font-family: "Trebuchet MS", sans-serif; font-size: .95rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps { display: grid; gap: 7px; padding-top: 18px; }
.step { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; width: 100%; border: 0; background: transparent; padding: 10px; border-radius: 13px; text-align: left; cursor: pointer; }
.step > span { width: 32px; height: 32px; border: 1px solid #d8d9e5; background: #fff; border-radius: 10px; display: grid; place-items: center; color: var(--muted); font-size: .78rem; font-weight: 800; }
.step i { font-style: normal; display: grid; gap: 2px; }
.step b { font-size: .84rem; }
.step small { color: var(--muted); font-size: .72rem; }
.step.active { background: #fff; box-shadow: 0 9px 30px rgba(37,34,83,.08); }
.step.active > span { background: var(--violet); color: #fff; border-color: var(--violet); }
.step.done > span { background: #dff7ed; color: var(--success); border-color: #c8eddf; }
.quality-card { margin-top: auto; border: 1px solid #dddafc; background: var(--violet-soft); border-radius: 16px; padding: 13px; display: grid; grid-template-columns: 44px 1fr; gap: 11px; align-items: center; }
.quality-ring { width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(var(--violet) 94%, #d8d4ff 0); display: grid; place-items: center; }
.quality-ring:before { content: ""; width: 34px; height: 34px; border-radius: 50%; background: var(--violet-soft); position: absolute; }
.quality-ring span { position: relative; font-size: .65rem; font-weight: 900; color: var(--violet-dark); }
.quality-card strong { display: block; font-size: .75rem; }
.quality-card small { display: block; font-size: .67rem; line-height: 1.35; color: var(--muted); margin-top: 2px; }

.editor { background: var(--paper); display: flex; min-width: 0; flex-direction: column; }
#promptForm { flex: 1; width: 100%; min-width: 0; }
.panel { display: none; max-width: 810px; margin: 0 auto; padding: 42px 42px 32px; animation: panel-in .22s ease-out; }
.panel.active { display: block; }
@keyframes panel-in { from { opacity: .15; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.panel-heading h1 { margin: 4px 0 0; font-family: "Trebuchet MS", sans-serif; font-size: clamp(1.65rem, 2.6vw, 2.25rem); line-height: 1.05; letter-spacing: -.045em; }
.kicker { color: var(--violet-dark); font-size: .76rem; font-weight: 800; }
.progress-label { padding: 6px 9px; border-radius: 8px; background: #f4f4f8; color: var(--muted); font-size: .72rem; white-space: nowrap; }
.lead { max-width: 650px; color: var(--muted); line-height: 1.55; margin: 13px 0 28px; font-size: .93rem; }
.preset-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 25px; }
.preset { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 13px 10px; display: grid; gap: 3px; text-align: left; cursor: pointer; min-width: 0; }
.preset:hover { border-color: #bbb5fb; }
.preset.active { border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); background: #faf9ff; }
.preset-icon { width: 28px; height: 28px; border-radius: 9px; background: var(--violet-soft); color: var(--violet); display: grid; place-items: center; margin-bottom: 3px; font-size: .8rem; }
.preset b { font-size: .76rem; line-height: 1.25; }
.preset small { color: var(--muted); font-size: .66rem; line-height: 1.3; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.template-shelf { margin: 0 0 24px; padding: 15px; border-radius: 16px; background: #1e1d39; color: #fff; overflow: hidden; }
.template-shelf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.template-shelf-head h2 { margin: 3px 0 0; font-family: "Trebuchet MS", sans-serif; font-size: .98rem; }
.template-shelf .kicker { color: #bcb7ff; }
.template-shelf-head > span { color: #b9b7d3; font-size: .68rem; }
.template-scroll { display: grid; grid-template-columns: repeat(5, minmax(145px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.reference-template { min-width: 0; min-height: 105px; border: 1px solid rgba(255,255,255,.10); border-radius: 12px; background: rgba(255,255,255,.055); color: #fff; padding: 10px; display: grid; align-content: start; gap: 4px; text-align: left; cursor: pointer; }
.reference-template:hover { border-color: #a79fff; background: rgba(102,88,245,.18); }
.reference-template.featured { border-color: #8f85ff; background: linear-gradient(145deg, rgba(102,88,245,.4), rgba(255,114,87,.12)); }
.template-number { width: max-content; padding: 3px 6px; border-radius: 6px; background: rgba(255,255,255,.12); color: #c9c5ff; font-size: .61rem; font-weight: 900; }
.reference-template.featured .template-number { background: var(--sun); color: #30255a; }
.reference-template b { margin-top: 5px; font-size: .74rem; }
.reference-template small { color: #aaaac0; font-size: .63rem; line-height: 1.35; }
.format-pack-card { margin: 18px 0; padding: 17px; border: 1px solid #d9d5ff; border-radius: 17px; background: #faf9ff; }
.format-pack-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.format-pack-head h2 { margin: 4px 0 4px; font: 800 1rem/1.2 "Trebuchet MS",sans-serif; text-wrap: balance; }
.format-pack-head p { margin: 0; color: var(--muted); font-size: .72rem; }
.format-pack-head > span { padding: 6px 9px; border-radius: 8px; color: #4c438f; background: #ece9ff; font-size: .64rem; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.format-quick-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 11px; }
.format-quick-actions button { min-height: 34px; padding: 0 10px; border: 1px solid #d9d7e9; border-radius: 9px; color: var(--muted); background: #fff; font-size: .65rem; font-weight: 750; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.format-quick-actions button:hover { border-color: #aaa2f7; color: #443a9d; }
.format-quick-actions button.active { border-color: #9288f8; color: #443a9d; background: var(--violet-soft); }
.format-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.format-options label { min-width: 0; position: relative; cursor: pointer; }
.format-options input { position: absolute; opacity: 0; pointer-events: none; }
.format-options span { min-height: 58px; display: grid; align-content: center; gap: 2px; padding: 9px 11px; border: 1px solid #ddddea; border-radius: 11px; background: #fff; }
.format-options b { font-size: .78rem; font-variant-numeric: tabular-nums; }
.format-options small { color: var(--muted); font-size: .61rem; line-height: 1.3; overflow-wrap: anywhere; }
.format-options input:checked + span { border-color: var(--violet); color: #443a9d; background: var(--violet-soft); box-shadow: inset 0 0 0 1px rgba(102,88,245,.16); }
.format-options input:focus-visible + span { outline: 3px solid rgba(102,88,245,.25); outline-offset: 2px; }
.batch-strip { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #dcd9ff; background: #f7f6ff; border-radius: 13px; padding: 10px 12px; margin: -3px 0 18px; }
.batch-strip > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.batch-icon { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--violet); color: #fff; }
.batch-strip > div > span:last-child { display: grid; gap: 2px; }
.batch-strip b { font-size: .76rem; }
.batch-strip small { color: var(--muted); font-size: .66rem; line-height: 1.35; }
.batch-strip select { min-height: 37px; border: 1px solid #d5d2f8; border-radius: 9px; background: #fff; color: var(--ink); padding: 0 28px 0 10px; font-size: .75rem; font-weight: 700; }
.valid-badge.warning { color: #ffd59b; border-color: rgba(255,204,102,.28); background: rgba(255,204,102,.09); }
.valid-badge.warning i { background: var(--sun); }
.field-grid { display: grid; gap: 16px; margin-bottom: 18px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 7px; min-width: 0; }
.field.full { margin-bottom: 18px; }
.field label { font-size: .78rem; font-weight: 750; }
.field label em { color: #a83a29; font-style: normal; font-weight: 650; font-size: .67rem; margin-left: 6px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 11px; background: #fbfbfd; padding: 11px 12px; color: var(--ink); font-size: .86rem; line-height: 1.4; transition: border-color .15s, box-shadow .15s; }
.field select { min-height: 44px; }
.field textarea { resize: vertical; min-height: 82px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--violet); background: #fff; box-shadow: 0 0 0 3px rgba(102,88,245,.08); outline: 0; }
.field .hint { color: var(--muted); font-size: .7rem; line-height: 1.4; }
.reference-block { display: grid; grid-template-columns: 1fr 210px; gap: 22px; align-items: center; background: #f7f6ff; border: 1px solid #e2dffd; border-radius: 17px; padding: 17px 18px; margin: 25px 0 18px; }
.reference-copy h2 { margin: 4px 0 5px; font-family: "Trebuchet MS", sans-serif; font-size: 1rem; }
.reference-copy p { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.45; max-width: 410px; }
.upload-zone { min-height: 112px; border: 1.5px dashed #aaa2f7; background: #fff; border-radius: 13px; cursor: pointer; display: grid; place-items: center; overflow: hidden; }
.upload-preview { width: 100%; height: 100%; min-height: 110px; display: grid; place-items: center; align-content: center; gap: 3px; position: relative; text-align: center; }
.upload-preview b { color: var(--violet); font-size: 1.3rem; line-height: 1; }
.upload-preview span { font-weight: 750; font-size: .76rem; }
.upload-preview small { color: var(--muted); font-size: .65rem; }
.upload-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upload-preview .image-label { position: absolute; bottom: 6px; left: 6px; right: 6px; border-radius: 8px; background: rgba(23,22,47,.82); color: #fff; padding: 6px 8px; font-size: .65rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; backdrop-filter: blur(5px); }
.compact-reference { grid-template-columns: 1fr 118px; }
.upload-zone.small, .upload-zone.small .upload-preview { min-height: 88px; }
.product-ref { background: #fff9ef; border-color: #f3dfb1; }
.product-ref .upload-zone { border-color: #e0b65e; }
.product-ref .upload-preview b { color: #b87a00; }
.switch-list { display: grid; gap: 9px; margin: 20px 0; }
.switch-list label { border: 1px solid var(--line); border-radius: 13px; padding: 11px 12px; display: flex; align-items: center; gap: 12px; cursor: pointer; background: #fff; }
.switch-list label > span { flex: 1; display: grid; gap: 2px; }
.switch-list b { font-size: .78rem; }
.switch-list small { color: var(--muted); font-size: .68rem; }
.switch-list input { position: absolute; opacity: 0; pointer-events: none; }
.switch-list i { width: 38px; height: 22px; background: #cfd1dd; border-radius: 20px; position: relative; transition: background .15s; }
.switch-list i:after { content: ""; width: 16px; height: 16px; border-radius: 50%; background: #fff; position: absolute; left: 3px; top: 3px; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: transform .15s; }
.switch-list input:checked + i { background: var(--violet); }
.switch-list input:checked + i:after { transform: translateX(16px); }
.editor-footer { position: sticky; bottom: 0; z-index: 10; border-top: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(10px); padding: 13px 34px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-progress { width: 150px; display: grid; gap: 5px; text-align: center; }
.footer-progress span { color: var(--muted); font-size: .67rem; }
.footer-progress > i { height: 4px; border-radius: 4px; overflow: hidden; background: #e7e7ef; }
.footer-progress b { height: 100%; width: 25%; display: block; background: var(--violet); border-radius: inherit; transition: width .25s; }
.mobile-view-switch { display: none; }

.output { min-width: 0; background: #1e1d39; color: #efeffb; border-left: 1px solid #13122a; padding: 24px 24px 20px; display: flex; flex-direction: column; height: calc(100vh - 68px); position: sticky; top: 68px; }
.output .kicker { color: #a9a1ff; }
.output-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 3px 3px 17px; }
.output-head h2 { margin: 4px 0 0; font-family: "Trebuchet MS", sans-serif; font-size: 1.2rem; letter-spacing: -.02em; }
.valid-badge { display: flex; align-items: center; gap: 6px; border: 1px solid rgba(74,214,161,.27); color: #8ee7c6; background: rgba(31,157,114,.10); border-radius: 8px; padding: 6px 8px; font-size: .66rem; font-weight: 700; }
.output-toolbar { min-height: 39px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.035); border-radius: 10px 10px 0 0; display: flex; align-items: center; padding: 4px; }
.tool-button { flex: 0 0 auto; border: 0; background: transparent; color: #8f91ac; border-radius: 7px; padding: 6px 10px; font-size: .69rem; cursor: pointer; }
.tool-button.active { background: rgba(255,255,255,.10); color: #fff; }
.output-toolbar > span { margin-left: auto; padding-right: 8px; color: #b0b1c6; font-size: .62rem; }
.code-wrap { min-height: 0; flex: 1; border: 1px solid rgba(255,255,255,.09); border-top: 0; background: #19182f; overflow: auto; position: relative; }
#jsonOutput, #patchOutput, #videoOutput { margin: 0; padding: 18px; min-height: 100%; color: #e7e5f6; font: 12px/1.62 Consolas, "Courier New", monospace; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
#jsonOutput .key, #patchOutput .key, #videoOutput .key { color: #9fa8ff; }
#jsonOutput .string, #patchOutput .string, #videoOutput .string { color: #f5cf8c; }
#jsonOutput .boolean, #patchOutput .boolean, #videoOutput .boolean { color: #8ee7c6; }
#jsonOutput .number, #patchOutput .number, #videoOutput .number { color: #f29dcd; }
.summary-view { padding: 18px; }
.individual-view, .guide-view { padding: 15px; }
.individual-head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: auto minmax(150px,1fr) auto; gap: 8px; align-items: center; margin: -15px -15px 12px; padding: 11px 15px; border-bottom: 1px solid rgba(255,255,255,.09); background: #19182f; }
.individual-head label { color: #aaaac0; font-size: .66rem; font-weight: 700; }
.individual-head select { min-width: 0; height: 34px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 0 28px 0 9px; color: #eeeefa; background: #292743; font-size: .68rem; }
.individual-head span { color: #aaaac0; font-size: .62rem; font-variant-numeric: tabular-nums; }
.prompt-item { margin-bottom: 9px; border: 1px solid rgba(255,255,255,.09); border-radius: 11px; overflow: hidden; background: rgba(255,255,255,.03); content-visibility: auto; contain-intrinsic-size: 180px; }
.prompt-item-head { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: center; padding: 10px 11px; }
.prompt-item-head div { min-width: 0; }
.prompt-item-head strong { display: block; overflow: hidden; color: #eeeefa; font-size: .71rem; text-overflow: ellipsis; white-space: nowrap; }
.prompt-item-head small { display: block; margin-top: 2px; overflow: hidden; color: #9899b1; font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }
.copy-item { min-height: 34px; padding: 0 10px; border: 1px solid rgba(184,176,255,.32); border-radius: 8px; color: #dcd8ff; background: rgba(102,88,245,.13); font-size: .64rem; font-weight: 800; cursor: pointer; }
.copy-item:hover { background: rgba(102,88,245,.24); }
.prompt-item pre { max-height: 150px; margin: 0; padding: 11px; overflow: auto; border-top: 1px solid rgba(255,255,255,.07); color: #c8c7d9; font: 10px/1.5 Consolas,"Courier New",monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.guide-view h3 { margin: 2px 0 10px; font: 800 .92rem/1.2 "Trebuchet MS",sans-serif; }
.guide-view h3:not(:first-child) { margin-top: 22px; }
.guide-view ol { margin: 0; padding-left: 22px; color: #c9c8d9; font-size: .73rem; line-height: 1.55; }
.guide-view li + li { margin-top: 7px; }
.guide-view dl { margin: 0; display: grid; grid-template-columns: 72px 1fr; gap: 8px 10px; font-size: .72rem; }
.guide-view dt { color: #b9b2ff; font-weight: 800; }
.guide-view dd { margin: 0; color: #c9c8d9; line-height: 1.4; }
.guide-view p { margin: 0; color: #c9c8d9; font-size: .72rem; line-height: 1.55; }
.guide-view code { padding: 2px 5px; border: 1px solid #4a4767; border-radius: 5px; color: #d9d4ff; background: #29263e; font-size: .68rem; }
.guide-alert { display: grid; gap: 4px; margin-bottom: 19px; padding: 12px; border: 1px solid #535078; border-radius: 11px; background: #292740; }
.guide-alert strong { color: #c5beff; font-size: .76rem; }
.guide-alert span { color: #dfddec; font-size: .7rem; line-height: 1.45; }
.guide-checks { margin: 0; padding: 0; display: grid; gap: 7px; list-style: none; }
.guide-checks li { margin: 0 !important; padding: 8px 9px; border: 1px solid #3d3a58; border-radius: 8px; color: #cbc9da; background: #232136; font-size: .7rem; line-height: 1.4; }
.guide-checks b { color: #bdb6ff; }
.summary-card { border-bottom: 1px solid rgba(255,255,255,.08); padding: 0 0 16px; margin-bottom: 16px; }
.summary-card:last-child { border: 0; }
.summary-card span { color: #8f91ac; font-size: .68rem; }
.summary-card h3 { font-family: "Trebuchet MS", sans-serif; font-size: .95rem; margin: 4px 0 7px; }
.summary-card p { color: #c5c5d8; font-size: .76rem; line-height: 1.5; margin: 0; }
.output-actions { padding-top: 13px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 9px; }
.output-actions[hidden] { display: none; }
.output .button.secondary { background: transparent; color: #ddddec; border-color: rgba(255,255,255,.15); }
.privacy-note { color: #adaec2; font-size: .61rem; line-height: 1.4; text-align: center; margin: 10px 18px 0; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 15px); background: var(--ink); color: #fff; border-radius: 11px; padding: 11px 15px; font-size: .78rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }


.brief-composer { display: grid; grid-template-columns: minmax(190px,.72fr) minmax(0,1.55fr); margin: 0 0 22px; overflow: hidden; border: 1px solid #d8d4ff; border-radius: 19px; background: #fff; box-shadow: 0 14px 38px rgba(54,46,134,.09); }
.brief-intro { min-width: 0; padding: 22px; color: #fff; background: #252243; display: flex; flex-direction: column; align-items: flex-start; }
.brief-badge { display: inline-flex; padding: 5px 8px; border-radius: 7px; color: #312d64; background: #ffd989; font-size: .62rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.brief-intro h2 { max-width: 260px; margin: 14px 0 8px; font: 800 1.24rem/1.12 "Trebuchet MS",sans-serif; letter-spacing: -.02em; }
.brief-intro p { margin: 0; color: #cfccdf; font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
.brief-intro > small { margin-top: auto; padding-top: 18px; color: #aaa5c5; font-size: .66rem; line-height: 1.4; }
.brief-map { width: 100%; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: brief-map; display: grid; gap: 8px; }
.brief-map li { counter-increment: brief-map; display: flex; align-items: center; gap: 8px; color: #eceaf6; font-size: .7rem; font-weight: 750; }
.brief-map li::before { content: counter(brief-map); width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.19); border-radius: 50%; color: #bdb7ff; font-size: .6rem; }
.brief-fields { padding: 9px 18px; }
.brief-field { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 10px; padding: 15px 0; border-bottom: 1px solid #e8e7f0; }
.brief-field:last-child { border-bottom: 0; }
.brief-number { width: 28px; height: 28px; display: grid; place-items: center; margin-top: 22px; border-radius: 9px; color: #5146bb; background: #efedff; font-size: .72rem; font-weight: 900; }
.brief-field.featured .brief-number { color: #fff; background: var(--violet); }
.brief-field .field textarea { min-height: 74px; background: #fff; }
.brief-field.featured .field textarea { border-color: #aaa2f7; box-shadow: 0 0 0 3px rgba(102,88,245,.055); }
.detail-divider { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 5px 0 14px; padding: 0 2px; }
.detail-divider span { color: #4b4862; font-size: .71rem; font-weight: 850; text-transform: uppercase; letter-spacing: .055em; }
.detail-divider span b { margin-left: 5px; padding: 3px 6px; border-radius: 6px; color: #706a8e; background: #efeff5; font-size: .57rem; letter-spacing: .025em; }
.detail-divider p { margin: 0; color: var(--muted); font-size: .68rem; text-align: right; }
.simple-route { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: -10px 0 18px; padding: 11px 13px; border: 1px solid #dad7fb; border-radius: 12px; background: #f8f7ff; }
.simple-route > div { display: grid; gap: 2px; }
.simple-route b { font-size: .73rem; }
.simple-route span { color: var(--muted); font-size: .67rem; }
.simple-route a { flex: 0 0 auto; padding: 7px 9px; border-radius: 8px; color: #4e43b1; background: #eae7ff; font-size: .65rem; font-weight: 850; text-decoration: none; }
.simple-route a:hover { background: #ddd8ff; }
.language-lock { display: flex; align-items: center; gap: 10px; width: max-content; max-width: 100%; margin: -15px 0 23px; padding: 8px 10px; border: 1px solid #d8ecdf; border-radius: 12px; background: #f4fbf7; }
.language-lock > span { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #173f35; color: #9ff0cf; font-size: .68rem; font-weight: 900; letter-spacing: .06em; }
.language-lock > div { display: grid; gap: 2px; }
.language-lock b { font-size: .73rem; }
.language-lock small { color: #587269; font-size: .67rem; line-height: 1.35; }
.style-picker { margin: 0 0 24px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, #fff, #faf9ff); }
.style-picker-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 11px; }
.style-picker-head h2 { margin: 3px 0 0; font-family: "Trebuchet MS", sans-serif; font-size: .98rem; }
.style-picker-head > small { color: var(--muted); font-size: .67rem; }
.style-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.style-chip { min-width: 0; min-height: 58px; border: 1px solid #e2e2ec; border-radius: 11px; background: #fff; padding: 9px; display: grid; gap: 3px; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.style-chip:hover { transform: translateY(-1px); border-color: #bdb7fb; }
.style-chip.active { border-color: var(--violet); background: #f4f2ff; box-shadow: inset 0 0 0 1px var(--violet); }
.style-chip b { font-size: .71rem; line-height: 1.25; overflow-wrap: anywhere; }
.style-chip span { color: var(--muted); font-size: .62rem; line-height: 1.3; overflow-wrap: anywhere; }
.reference-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: -9px 0 18px; }
.reference-gallery:empty { display: none; }
.reference-card { min-width: 0; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: #fff; box-shadow: 0 7px 20px rgba(37,34,83,.055); }
.reference-thumb { height: 94px; position: relative; background: #eeedf7; overflow: hidden; }
.reference-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.reference-index { position: absolute; top: 7px; left: 7px; min-width: 24px; height: 24px; display: grid; place-items: center; padding: 0 6px; border-radius: 7px; color: #fff; background: rgba(26,24,54,.82); font-size: .62rem; font-weight: 850; backdrop-filter: blur(7px); }
.remove-reference { position: absolute; top: 7px; right: 7px; width: 27px; height: 27px; display: grid; place-items: center; border: 0; border-radius: 8px; color: #fff; background: rgba(26,24,54,.82); cursor: pointer; font-size: .9rem; backdrop-filter: blur(7px); }
.remove-reference:hover { background: #c44848; }
.reference-meta { padding: 9px; display: grid; gap: 6px; }
.reference-meta strong { font-size: .66rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reference-meta select { width: 100%; min-height: 34px; border: 1px solid #dfdfeb; border-radius: 8px; padding: 0 25px 0 8px; background: #fbfbfd; color: var(--ink); font-size: .64rem; }
.reference-cloud { justify-self: start; padding: 4px 6px; border-radius: 6px; color: #7a6170; background: #f5eef2; font-size: .55rem; font-weight: 800; }
.reference-cloud.ready { color: #17684e; background: #e5f7f0; }
.upload-zone.has-files { border-style: solid; border-color: var(--violet); background: linear-gradient(145deg, #fff, #f5f3ff); }
.upload-zone.has-files .upload-preview b { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--violet); font-size: .86rem; }
.detail-ref { background: #f4fbf7; border-color: #cfe9db; }
.detail-ref .upload-zone { border-color: #74b897; }
.detail-ref .upload-preview b { color: #27785b; }
.project-switch { display: flex; align-items: center; gap: 7px; margin-left: auto; margin-right: 10px; }
.project-switch label { color: var(--muted); font-size: .68rem; font-weight: 700; }
.project-switch select { width: 190px; min-height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 30px 0 10px; font-size: .75rem; font-weight: 700; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: grid; place-items: center; cursor: pointer; font-size: 1rem; }
.context-field { padding: 14px; border: 1px solid #dcd9ff; border-radius: 14px; background: #f8f7ff; }
.project-memory-card { margin: 0 0 22px; padding: 17px; border: 1px solid #d9d5ff; border-radius: 17px; background: linear-gradient(145deg,#fff,#f7f6ff); }
.project-memory-card h2 { margin: 4px 0 5px; font: 800 1rem/1.2 "Trebuchet MS",sans-serif; }
.project-memory-card > div:first-child p { margin: 0 0 15px; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.project-memory-card .field:last-child { margin-bottom: 0; }
.memory-heading { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: start; }
.memory-heading > p { grid-column: 1 / -1; }
.continuity-locks { margin: 0 0 14px; overflow: hidden; border: 1px solid #d8d5eb; border-radius: 15px; background: #fff; }
.lock-board-head { display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; align-items: center; padding: 15px 16px 13px; color: #fff; background: #252243; }
.lock-board-head h3 { margin: 3px 0 3px; font: 800 .98rem/1.2 "Trebuchet MS",sans-serif; }
.lock-board-head p { margin: 0; color: #c5c2d8; font-size: .68rem; line-height: 1.4; }
.lock-board-head .kicker { color: #b8b2ff; }
.lock-count { padding: 6px 9px; border: 1px solid rgba(159,240,207,.26); border-radius: 8px; color: #a7efd2; background: rgba(31,157,114,.12); font-size: .63rem; font-weight: 850; white-space: nowrap; }
.lock-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; background: #e7e6ef; }
.lock-card { min-width: 0; position: relative; background: #fff; cursor: pointer; }
.lock-card input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lock-card-body { min-height: 86px; display: grid; grid-template-columns: 29px minmax(0,1fr); grid-template-rows: auto auto; gap: 7px 9px; align-content: center; padding: 12px; background: #fff; transition: background .15s ease, box-shadow .15s ease; }
.lock-code { width: 29px; height: 29px; display: grid; place-items: center; grid-row: 1 / 3; align-self: center; border-radius: 8px; color: #77738b; background: #eeeef3; font-size: .58rem; font-weight: 900; letter-spacing: .03em; }
.lock-copy { min-width: 0; display: grid; gap: 2px; }
.lock-copy b { font-size: .71rem; }
.lock-copy small { overflow: hidden; color: var(--muted); font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }
.lock-state { justify-self: start; }
.lock-state i { font-style: normal; font-size: .57rem; font-weight: 850; }
.lock-on { display: none; color: #17684e; }
.lock-off { color: #777589; }
.lock-card input:checked + .lock-card-body { background: #f2faf6; box-shadow: inset 0 0 0 1px #bfe4d3; }
.lock-card input:checked + .lock-card-body .lock-code { color: #fff; background: #1f8d69; }
.lock-card input:checked + .lock-card-body .lock-on { display: inline; }
.lock-card input:checked + .lock-card-body .lock-off { display: none; }
.lock-card input:focus-visible + .lock-card-body { position: relative; z-index: 1; outline: 3px solid rgba(102,88,245,.28); outline-offset: -3px; }
.lock-help { margin: 0; padding: 10px 13px; border-top: 1px solid #e8e7ef; color: var(--muted); background: #fafafd; font-size: .64rem; line-height: 1.45; }
.lock-help b { color: #393650; }
.memory-advanced { margin: 0 0 14px; border: 1px solid #e0deee; border-radius: 12px; background: #fff; }
.memory-advanced summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 13px; cursor: pointer; }
.memory-advanced summary span { font-size: .71rem; font-weight: 800; }
.memory-advanced summary small { color: var(--muted); font-size: .61rem; text-align: right; }
.memory-advanced[open] summary { border-bottom: 1px solid #e8e7ef; }
.memory-advanced .field { margin: 0; padding: 13px; }
.field-state { float: right; padding: 3px 6px; border-radius: 6px; color: #17684e; background: #e6f6ef; font-size: .57rem; font-weight: 850; }
.field-state.flexible { color: #6c687d; background: #eeeef3; }
.revision-badge { align-self: center; padding: 6px 9px; border: 1px solid #d3cffd; border-radius: 999px; color: #5147a8; background: #f3f1ff; font-size: .62rem; font-weight: 800; white-space: nowrap; }
.memory-actions { display: flex; align-items: center; gap: 11px; margin-top: 11px; }
.memory-actions span { color: var(--muted); font-size: .66rem; line-height: 1.35; }
.button.context-save { min-height: 38px; padding: 0 13px; border: 1px solid #342d79; color: #fff; background: #342d79; font-size: .69rem; }
.revision-timeline { margin-top: 14px; border-top: 1px solid #e2dff6; }
.revision-empty { padding: 12px 2px 0; color: var(--muted); font-size: .68rem; }
.revision-item { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 9px; padding: 12px 2px 0; }
.revision-item::before { content: ""; position: absolute; left: 21px; top: 0; bottom: -12px; width: 1px; background: #ddd9fa; }
.revision-item:last-child::before { bottom: 0; }
.revision-index { z-index: 1; width: 44px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: #4a419c; background: #ece9ff; font-size: .61rem; font-weight: 900; }
.revision-copy strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: .7rem; }
.revision-copy p { margin: 0; color: var(--muted); font-size: .67rem; line-height: 1.4; }

.person-builder { margin: 20px 0 22px; border: 1px solid #dcddea; border-radius: 18px; overflow: hidden; background: #fbfbfd; }
.person-builder-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 19px 17px; color: #fff; background: #232140; }
.person-builder-head h2 { margin: 4px 0 5px; font: 800 1.05rem/1.2 "Trebuchet MS",sans-serif; }
.person-builder-head p { max-width: 560px; margin: 0; color: #c5c4d8; font-size: .74rem; line-height: 1.45; }
.person-builder-head .kicker { color: #aca5ff; }
.adult-badge { flex: 0 0 auto; padding: 6px 9px; border: 1px solid rgba(159,240,207,.28); border-radius: 8px; color: #a8efd3; background: rgba(31,157,114,.12); font-size: .64rem; font-weight: 800; white-space: nowrap; }
.person-builder-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid #e4e4ed; background: #f7f7fb; }
.person-mode-actions { min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.person-mode { min-width: 0; min-height: 52px; display: grid; align-content: center; gap: 2px; padding: 8px 10px; border: 1px solid #dcddea; border-radius: 10px; color: var(--muted); background: #fff; text-align: left; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease; }
.person-mode:hover { border-color: #bdb7f8; color: var(--ink); }
.person-mode b { color: inherit; font-size: .7rem; line-height: 1.25; overflow-wrap: anywhere; }
.person-mode small { color: inherit; font-size: .6rem; line-height: 1.3; overflow-wrap: anywhere; }
.person-mode.active { border-color: #9288f8; color: #453aab; background: var(--violet-soft); box-shadow: 0 0 0 1px rgba(102,88,245,.08); }
.person-builder-status { max-width: 190px; display: grid; gap: 3px; }
.person-builder-status strong { color: var(--ink); font-size: .7rem; }
.person-builder-status span { color: var(--muted); font-size: .61rem; line-height: 1.35; text-wrap: pretty; }
.person-builder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.appearance-group { min-width: 0; margin: 0; padding: 17px 18px 1px; border: 0; border-bottom: 1px solid #e4e4ed; background: #fff; }
.appearance-group:nth-child(odd) { border-right: 1px solid #e4e4ed; }
.appearance-group legend { width: 100%; padding: 0; display: flex; align-items: center; gap: 8px; font: 800 .76rem/1.2 "Segoe UI",Arial,sans-serif; color: var(--ink); }
.appearance-group legend span { width: 8px; height: 8px; border-radius: 3px; background: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }
.face-group legend span { background: var(--coral); box-shadow: 0 0 0 4px #fff0ec; }
.hair-group legend span { background: #b77b2b; box-shadow: 0 0 0 4px #fff4df; }
.body-group legend span { background: var(--success); box-shadow: 0 0 0 4px #e5f7f0; }
.appearance-group .field-grid { margin: 14px 0 16px; gap: 13px; }
.appearance-group .field-grid.two { grid-template-columns: 1fr; }
.appearance-group .field label { font-size: .72rem; }
.appearance-group .field input, .appearance-group .field select { min-height: 42px; padding-block: 9px; font-size: .78rem; background: #fcfcfe; }
.appearance-group .hint { font-size: .63rem; }
.tattoo-ref { margin: 6px 0 12px; padding: 13px; grid-template-columns: minmax(0,1fr) 170px; border-color: #ecd6e5; background: #fff8fc; }
.tattoo-ref h2 { margin: 3px 0 4px; font: 800 .86rem/1.2 "Trebuchet MS",sans-serif; }
.tattoo-ref p { margin: 0; color: var(--muted); font-size: .66rem; line-height: 1.4; }
.tattoo-ref .upload-zone { min-height: 94px; background: #fff; }
.tattoo-gallery { margin-bottom: 10px; }
.tattoo-tip { margin: 0 0 17px; padding: 9px 10px; border-left: 3px solid #ba568f; color: #73546a; background: #fff8fc; font-size: .63rem; line-height: 1.45; }
.tattoo-tip strong { color: #82345f; }
.appearance-notes { margin: 0 !important; padding: 17px 19px 19px; background: #fbfbfd; }
.appearance-notes textarea { background: #fff; }
.media-lane { margin: 22px 0; overflow: hidden; border: 1px solid #dbdae8; border-radius: 18px; background: #fff; }
.media-lane-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid #e7e6ef; background: #f8f8fb; }
.media-lane-head > div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.media-step { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--violet); font-size: .72rem; font-weight: 900; }
.media-lane-head > div > span:last-child { min-width: 0; display: grid; gap: 2px; }
.media-lane-head b { font-size: .78rem; }
.media-lane-head small { color: var(--muted); font-size: .64rem; line-height: 1.35; }
.media-lane-head button { flex: 0 0 auto; min-height: 34px; padding: 0 10px; border: 1px solid #bbb5fb; border-radius: 9px; color: #493eaa; background: #eeecff; font-size: .64rem; font-weight: 850; cursor: pointer; }
.media-lane-head button:hover { color: #fff; background: var(--violet); }
.media-lane .storyboard-card, .media-lane .omni-builder-card { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.video-lane { border-color: #c9c5e2; }
.video-lane .media-lane-head { color: #fff; border-color: rgba(255,255,255,.1); background: #252243; }
.video-lane .media-step { color: #252243; background: #a8efd3; }
.video-lane .media-lane-head small { color: #c8c5da; }
.video-lane .media-lane-head button { border-color: rgba(168,239,211,.3); color: #a8efd3; background: rgba(31,157,114,.12); }
.video-lane .media-lane-head button:hover { color: #173f35; background: #a8efd3; }
.video-enable { margin: 16px 0 14px; }
.omni-builder-card .video-enable label { color: var(--ink); }
.output-head > div { min-width: 0; }
.output-head p { margin: 4px 0 0; color: #a9a7bf; font-size: .64rem; line-height: 1.35; }
.change-proof { display: flex; align-items: center; gap: 7px; min-height: 34px; margin-bottom: 8px; padding: 7px 9px; border: 1px solid rgba(168,239,211,.2); border-radius: 9px; color: #c9c7dc; background: rgba(31,157,114,.08); font-size: .63rem; line-height: 1.35; }
.change-proof b { flex: 0 0 auto; color: #9fe7ca; }
.change-proof span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.change-proof.changed { animation: proof-pulse .35s ease-out; }
@keyframes proof-pulse { from { background: rgba(102,88,245,.32); } to { background: rgba(31,157,114,.08); } }
.tool-button.image-tool { color: #c3bdff; }
.tool-button.video-tool { color: #a8efd3; }
.tool-button.active { color: #fff; }
.identity-pack-card, .storyboard-card { margin: 22px 0; padding: 18px; border: 1px solid #d9d5ff; border-radius: 17px; background: linear-gradient(145deg,#faf9ff,#f0efff); }
.identity-pack-card h2, .storyboard-card h2 { margin: 4px 0 5px; font: 800 1rem/1.2 "Trebuchet MS",sans-serif; }
.identity-pack-card p, .storyboard-card p { margin: 0 0 15px; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.identity-pack-card > small { color: var(--muted); font-size: .67rem; }
.identity-readiness { margin: 4px 0 12px; padding: 9px 11px; border: 1px solid #f0d7a8; border-radius: 10px; color: #78520f; background: #fff8e9; font-size: .68rem; line-height: 1.4; }
.identity-readiness.ready { border-color: #bfe7d5; color: #17684e; background: #edf9f4; }
.angle-preview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; margin: 3px 0 13px; }
.angle-preview span { padding: 7px 6px; border: 1px solid #ddd9fa; border-radius: 8px; color: #554c99; background: #fff; font-size: .61rem; font-weight: 700; text-align: center; }
.environment-lock { padding: 14px; border: 1px solid #cfe9db; border-radius: 14px; background: #f4fbf7; }
.storyboard-card { border-color: #f0d7a8; background: linear-gradient(145deg,#fffdf7,#fff7e8); }
.storyboard-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.storyboard-head > span { padding:6px 9px; border-radius:8px; background:#201f3f; color:#fff; font-size:.65rem; font-weight:800; }
.compact-switch { margin-bottom:0; }
.storyboard-examples { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:2px 0 14px; }
.storyboard-examples span { display:grid; gap:3px; padding:10px; border:1px solid #eadcbf; border-radius:10px; background:rgba(255,255,255,.72); color:var(--muted); font-size:.68rem; line-height:1.35; }
.storyboard-examples b { color:var(--ink); font-size:.7rem; }
.omni-builder-card { margin: 22px 0; padding: 19px; border-radius: 18px; color: #f5f3ff; background: #24213f; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.omni-builder-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.omni-builder-head h2 { margin: 4px 0 5px; font: 800 1.04rem/1.2 "Trebuchet MS",sans-serif; }
.omni-builder-head p { max-width: 590px; margin: 0; color: #c9c6dc; font-size: .74rem; line-height: 1.45; }
.omni-builder-head .kicker { color: #b8b0ff; }
.omni-builder-head > span { padding: 6px 9px; border: 1px solid rgba(163,238,207,.25); border-radius: 8px; color: #a8efd3; background: rgba(31,157,114,.12); font-size: .63rem; font-weight: 800; white-space: nowrap; }
.omni-flow { display: grid; grid-template-columns: 1fr 24px 1fr 24px 1fr; align-items: center; margin: 17px 0 14px; }
.omni-flow span { display: flex; align-items: center; gap: 7px; color: #dedbea; font-size: .68rem; font-weight: 700; }
.omni-flow b { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; color: #2d2855; background: #b8b0ff; font-size: .63rem; }
.omni-flow i { height: 1px; background: rgba(255,255,255,.17); }
.omni-presets { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; margin-bottom: 16px; }
.omni-preset { min-width: 0; display: grid; gap: 3px; padding: 10px 9px; border: 1px solid rgba(255,255,255,.11); border-radius: 10px; color: #eeeafa; background: rgba(255,255,255,.045); text-align: left; cursor: pointer; }
.omni-preset b { font-size: .68rem; }
.omni-preset small { color: #d0cde0; font-size: .59rem; line-height: 1.3; overflow-wrap: anywhere; }
.omni-preset.active { border-color: #b8b0ff; background: rgba(130,115,235,.2); box-shadow: 0 0 0 1px rgba(184,176,255,.18); }
.omni-builder-card .field label { color: #e9e7f4; }
.omni-builder-card .field input, .omni-builder-card .field select, .omni-builder-card .field textarea { border-color: rgba(255,255,255,.14); background: #fff; }
.omni-builder-card .field em { color: #c8c4dc; }
.omni-builder-card .hint { color: #aaa7bf; }
.omni-controls { margin-top: 0; }
.omni-notes { margin-bottom: 0; }
.cloud-dialog { width:min(500px,calc(100% - 28px)); border:0; border-radius:20px; padding:0; box-shadow:0 30px 90px rgba(20,18,50,.3); }
.cloud-dialog::backdrop { background:rgba(20,18,50,.52); backdrop-filter:blur(4px); }
.cloud-card { padding:22px; display:grid; gap:16px; }
.cloud-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.cloud-head h2 { margin:4px 0 0; font:800 1.25rem "Trebuchet MS",sans-serif; }
.cloud-card > p { margin:0; color:var(--muted); font-size:.8rem; }
.cloud-status { padding:10px 12px; border-radius:10px; background:#f4f4f8; color:var(--muted); font-size:.73rem; }
.cloud-status.connected { background:#e8f8f1; color:#177657; }
.cloud-actions { display:flex; justify-content:flex-end; gap:9px; }
.production-map { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); margin: 18px 0 24px; border-block: 1px solid var(--line); }
.production-map span { position: relative; min-width: 0; display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 1px 7px; padding: 12px 8px; }
.production-map span:not(:last-child)::after { content: ""; position: absolute; top: 16px; right: 0; width: 1px; height: 30px; background: var(--line); }
.production-map i { grid-row: 1 / 3; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: var(--ink); font-size: .6rem; font-style: normal; font-weight: 900; }
.production-map b { min-width: 0; font-size: .67rem; line-height: 1.2; }
.production-map small { min-width: 0; color: var(--muted); font-size: .57rem; line-height: 1.25; }

.base-lab { margin: 22px 0 10px; padding: 18px; border-block: 1px solid #cfe9db; background: linear-gradient(90deg,#f4fbf7,rgba(244,251,247,.2)); }
.base-lab-copy h2 { margin: 4px 0 5px; font: 800 1rem/1.2 "Trebuchet MS",sans-serif; }
.base-lab-copy p { margin: 0 0 15px; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.base-lab > small { display: block; margin-top: 10px; color: var(--muted); font-size: .66rem; line-height: 1.4; }
.realism-check { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.realism-check span { padding: 6px 8px; border: 1px solid #bfe7d5; border-radius: 8px; color: #17684e; background: #fff; font-size: .61rem; font-weight: 800; }
.realism-check span::before { content: "✓"; margin-right: 5px; color: var(--success); }

.dialogue-meter { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px 8px; margin-top: 9px; padding: 9px 10px; border: 1px solid #bfe7d5; border-radius: 10px; color: #17684e; background: #edf9f4; font-size: .65rem; line-height: 1.35; }
.dialogue-meter b { font-size: .68rem; }
.dialogue-meter span { color: #3f675b; text-align: right; }
.dialogue-meter i { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 99px; background: #d6e9e1; }
.dialogue-meter em { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--success); transition: width .2s ease; }
.dialogue-meter.warning { border-color: #efc98a; color: #7d530d; background: #fff8e9; }
.dialogue-meter.warning span { color: #7d653a; }
.dialogue-meter.warning em { background: #d28a12; }
.dialogue-meter.danger { border-color: #efb1b8; color: #932d3b; background: #fff1f3; }
.dialogue-meter.danger span { color: #8f5560; }
.dialogue-meter.danger em { background: #d74659; }

.edit-plan { margin: 20px 0; border-block: 1px solid #dad8e8; background: #fbfbfe; }
.edit-plan summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 4px; cursor: pointer; list-style: none; }
.edit-plan summary::-webkit-details-marker { display: none; }
.edit-plan summary span { display: grid; gap: 2px; }
.edit-plan summary b { color: var(--ink); font-size: .78rem; }
.edit-plan summary small { color: var(--muted); font-size: .64rem; }
.edit-plan summary em { color: #625b9c; font-size: .61rem; font-style: normal; font-weight: 800; }
.edit-plan summary::after { content: "+"; color: var(--violet); font-size: 1rem; font-weight: 800; }
.edit-plan[open] summary::after { content: "−"; }
.edit-plan .field-grid { padding: 2px 4px 16px; }

.guide-view details { margin: 0; border-top: 1px solid #3d3a58; }
.guide-view details:last-child { border-bottom: 1px solid #3d3a58; }
.guide-view summary { padding: 12px 2px; color: #eeeefa; cursor: pointer; font-size: .74rem; font-weight: 800; list-style: none; }
.guide-view summary::-webkit-details-marker { display: none; }
.guide-view summary::after { content: "+"; float: right; color: #b9b2ff; }
.guide-view details[open] summary::after { content: "−"; }
.guide-view details > div { display: grid; gap: 8px; padding: 0 2px 14px; }
.guide-view details ol { margin: 0; }
.guide-view details p + p { margin-top: 3px; }
.guide-view details dl { grid-template-columns: 88px 1fr; }
@media (max-width: 1180px) {
  .workspace { grid-template-columns: 190px minmax(430px, 1fr) minmax(340px, 39%); }
  .rail { padding-inline: 12px; }
  .panel { padding-inline: 30px; }
  .quality-card { grid-template-columns: 1fr; }
  .quality-ring { display: none; }
  .field-grid.three { grid-template-columns: 1fr 1fr; }
  .project-switch select { width: 135px; }
  .style-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief-composer { grid-template-columns: 1fr; }
  .brief-intro > small { margin-top: 0; }
  .person-builder-toolbar { grid-template-columns: 1fr; }
  .person-builder-status { max-width: none; grid-template-columns: auto 1fr; align-items: center; column-gap: 9px; }
}

@media (max-width: 1260px) {
  .workspace { display: block; }
  .rail { display: none; }
  .editor { min-height: calc(100vh - 68px); }
  .mobile-view-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 8px; gap: 4px; background: #f5f5fa; border-bottom: 1px solid var(--line); position: sticky; top: 68px; z-index: 20; }
  .mobile-view-switch button { border: 0; background: transparent; padding: 9px; border-radius: 9px; color: var(--muted); font-weight: 700; font-size: .78rem; }
  .mobile-view-switch button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(37,34,83,.08); }
  .output { display: none; position: fixed; inset: 120px 0 0; z-index: 18; height: auto; top: 121px; }
  body.output-mode .output { display: flex; }
  body.output-mode #promptForm, body.output-mode .editor-footer { visibility: hidden; }
  .panel { max-width: 760px; }
}

@media (max-width: 620px) {
  .topbar { width: 100%; max-width: 100%; padding: 0 12px; height: 62px; overflow: hidden; }
  .top-actions .save-state, .top-actions .quiet, .project-switch label { display: none; }
  .project-switch { flex: 1 1 auto; min-width: 0; margin-left: 10px; margin-right: 6px; }
  .project-switch select { width: 100%; min-width: 0; }
  .project-switch .icon-button { display: none; }
  .brand { flex: 0 0 auto; gap: 0; font-size: .94rem; }
  .brand > span:last-child { display: none; }
  .top-actions { flex: 0 0 auto; gap: 0; }
  .brand-mark { width: 31px; height: 31px; }
  .mobile-view-switch { top: 62px; }
  .output { top: 115px; }
  .panel { padding: 29px 18px 26px; }
  .panel-heading h1 { font-size: 1.72rem; }
  .lead { margin-bottom: 22px; }
  .preset-row { width: 100%; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preset { min-width: 0; overflow: hidden; }
  .template-scroll { grid-template-columns: repeat(5, 148px); }
  .batch-strip { align-items: flex-start; }
  .top-actions .compact { padding-inline: 11px; }
  .field-grid.two, .field-grid.three { grid-template-columns: 1fr; gap: 14px; }
  .format-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .format-pack-head { display: grid; }
  .format-pack-head > span { justify-self: start; }
  .angle-preview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .person-builder-grid { grid-template-columns: 1fr; }
  .appearance-group:nth-child(odd) { border-right: 0; }
  .person-builder-head { padding: 16px; }
  .adult-badge { display: none; }
  .person-builder-toolbar { padding: 12px; }
  .person-mode-actions { grid-template-columns: 1fr 1fr; }
  .person-mode:last-child { grid-column: 1 / -1; }
  .person-mode b, .person-mode small { white-space: normal; }
  .person-builder-status { grid-template-columns: 1fr; }
  .storyboard-examples { grid-template-columns:1fr; }
  .media-lane-head { align-items: flex-start; flex-direction: column; }
  .media-lane-head button { width: 100%; }
  .omni-presets { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .omni-flow { grid-template-columns: 1fr; gap: 6px; }
  .omni-flow i { width: 1px; height: 9px; margin-left: 11px; }
  .omni-builder-head > span { display: none; }
  .reference-block, .compact-reference { grid-template-columns: 1fr; }
  .tattoo-ref { grid-template-columns: 1fr; }
  .style-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reference-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .style-picker-head > small { display: none; }
  .language-lock { width: 100%; }
  .brief-composer { margin-inline: -4px; border-radius: 16px; }
  .brief-intro { padding: 18px; }
  .brief-intro h2 { max-width: none; }
  .brief-map { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
  .brief-map li { display: grid; justify-items: center; gap: 4px; font-size: .61rem; }
  .brief-fields { padding: 4px 14px; }
  .brief-field { grid-template-columns: 26px minmax(0,1fr); gap: 8px; }
  .brief-number { width: 25px; height: 25px; }
  .detail-divider { align-items: flex-start; flex-direction: column; gap: 5px; }
  .detail-divider p { text-align: left; }
  .simple-route { align-items: flex-start; flex-direction: column; }
  .upload-zone { min-height: 102px; }
  .editor-footer { padding: 11px 14px; }
  .footer-progress { width: 92px; }
  .button { min-height: 42px; padding-inline: 14px; font-size: .8rem; }
  .memory-heading { grid-template-columns: 1fr; }
  .lock-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lock-card-body { min-height: 82px; padding: 10px; }
  .memory-advanced summary { align-items: flex-start; flex-direction: column; gap: 3px; }
  .memory-advanced summary small { text-align: left; }
  .revision-badge { justify-self: start; margin: 5px 0 8px; }
  .memory-actions { align-items: stretch; flex-direction: column; }
  .memory-actions span { padding-inline: 2px; }
  .output { padding: 17px 14px 15px; }
}

@media (max-width: 620px) {
  .production-map { display: flex; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; }
  .production-map span { flex: 0 0 138px; scroll-snap-align: start; }
  .base-lab { margin-inline: -2px; padding-inline: 14px; }
  .dialogue-meter { grid-template-columns: 1fr; }
  .dialogue-meter span { text-align: left; }
  .edit-plan summary { align-items: flex-start; }
  .edit-plan summary em { display: none; }
  .guide-view details dl { grid-template-columns: 1fr; gap: 3px; }
  .guide-view details dd { margin-bottom: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


.video-list-head { grid-template-columns: 1fr auto; }
.video-list-head strong { color: #eeeefa; font-size: .71rem; }
.output-empty { display: grid; gap: 5px; padding: 18px; border: 1px dashed rgba(255,255,255,.14); border-radius: 11px; color: #aaaac0; background: rgba(255,255,255,.025); font-size: .72rem; }
.output-empty b { color: #eeeefa; }
.cloud-dialog { overscroll-behavior: contain; }
.panel-heading h1, .panel-heading h2, .output-head h2, .media-lane-head b { text-wrap: balance; }
button, a, input, select, textarea { touch-action: manipulation; }
@media (max-width: 620px) {
  .video-list-head { display: grid; grid-template-columns: 1fr auto; }
  .change-proof span { white-space: normal; }
}
/* Painel editorial: editor prioritário, saída legível e controles sem corte. */
.workspace { grid-template-columns: 210px minmax(0, 1fr) minmax(390px, 30%); max-width: 1800px; }
.rail { padding-inline: 15px; }
.rail-intro strong { overflow: visible; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.panel { max-width: 920px; padding-inline: clamp(28px, 3vw, 48px); }
.output { padding: 22px 17px 18px; }
.output-head { padding-bottom: 16px; }
.output-head h2 { font-size: 1.28rem; }
.output-head p { font-size: .76rem; line-height: 1.45; }
.valid-badge { flex: 0 0 auto; font-size: .72rem; }
.output-toolbar { min-height: 0; display: flex; flex-wrap: wrap; gap: 5px; overflow: visible; padding: 7px; border-radius: 12px 12px 0 0; }
.tool-button { flex: 1 1 105px; min-height: 36px; padding: 7px 9px; font-size: .75rem; font-weight: 700; line-height: 1.2; text-align: center; }
.tool-button:hover { color: #fff; background: rgba(255,255,255,.08); }
.output-toolbar > span { flex: 1 0 100%; margin: 0; padding: 3px 4px 1px; color: #b8b8cf; font-size: .7rem; text-align: right; }
#jsonOutput, #patchOutput, #videoOutput { font-size: 12.5px; line-height: 1.58; }
.individual-head { grid-template-columns: 1fr auto; row-gap: 6px; }
.individual-head label { grid-column: 1 / -1; font-size: .77rem; }
.individual-head select { min-height: 39px; font-size: .8rem; }
.individual-head span { font-size: .74rem; }
.prompt-item-head { padding: 12px; }
.prompt-item-head strong, .video-list-head strong { font-size: .84rem; }
.prompt-item-head small { font-size: .72rem; }
.copy-item { min-height: 38px; font-size: .74rem; }
.prompt-item pre { max-height: 210px; padding: 13px; font-size: 11.5px; line-height: 1.55; }
.summary-card span { font-size: .74rem; }
.summary-card h3 { font-size: 1.02rem; }
.summary-card p, .guide-view p, .guide-view ol, .guide-view dl { font-size: .82rem; }
.guide-view summary { font-size: .85rem; }
.step b { font-size: .9rem; }
.step small { font-size: .76rem; }
.preset b { font-size: .82rem; }
.preset small { font-size: .72rem; }
.field label, .appearance-group .field label { font-size: .83rem; }
.appearance-group .field input, .appearance-group .field select { font-size: .85rem; }
.appearance-group .hint { font-size: .72rem; }
.media-lane-head b { font-size: .88rem; }
.media-lane-head small { font-size: .74rem; }
.media-lane-head button { min-height: 38px; font-size: .74rem; }
.person-builder-toolbar { grid-template-columns: 1fr; gap: 11px; }
.person-mode { min-height: 62px; padding: 10px 12px; }
.person-mode b { font-size: .8rem; overflow-wrap: normal; }
.person-mode small { font-size: .69rem; overflow-wrap: normal; }
.person-builder-status { max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; }
.person-builder-status strong { font-size: .76rem; }
.person-builder-status span { font-size: .7rem; }
.appearance-group { padding: 18px 20px 3px; }
.appearance-group legend { font-size: .84rem; }
.reference-fallback { width: 100%; height: 100%; display: grid; place-items: center; padding: 9px; color: #68647c; font-size: .72rem; line-height: 1.3; text-align: center; background: #efedf6; }
.reference-cloud { font-size: .65rem; }
.project-switch select { width: 235px; font-size: .83rem; }
@media (max-width: 1260px) {
  .workspace { display: block; }
  .panel { max-width: 820px; }
  .output { padding-inline: max(18px, calc((100vw - 820px) / 2)); }
}
@media (max-width: 620px) {
  .output { padding: 12px; }
  .tool-button { flex-basis: calc(50% - 5px); }
  .output-head h2 { font-size: 1.12rem; }
  .person-mode { min-height: 58px; }
  .appearance-group { padding-inline: 16px; }
  .prompt-item-head { grid-template-columns: 1fr; }
  .copy-item { justify-self: start; }
}

/* Etapas separadas por mídia: contexto comum, imagens e vídeo. */
.mobile-step-nav { display: none; }
.stage-guide { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; padding: 14px; margin: 3px 0 23px; border: 1px solid #dcd9fb; border-radius: 16px; background: #f8f7ff; }
.stage-guide > div { flex: 1 0 100%; display: grid; gap: 3px; margin-bottom: 2px; }
.stage-guide strong { font-size: .85rem; color: #282353; }
.stage-guide small { font-size: .74rem; line-height: 1.4; color: #696680; }
.stage-guide button { flex: 1 1 130px; min-height: 42px; border: 1px solid #d5d0f7; border-radius: 10px; padding: 8px 10px; background: #fff; color: #493eaa; font-size: .77rem; font-weight: 800; cursor: pointer; }
.stage-guide button:hover, .stage-guide button.active { color: #fff; border-color: var(--violet); background: var(--violet); }
.section-heading { margin: 30px 0 18px; padding-top: 25px; border-top: 1px solid var(--line); }
.section-heading h2 { margin: 5px 0 6px; font-size: 1.18rem; letter-spacing: -.025em; }
.section-heading p { margin: 0; color: var(--muted); font-size: .83rem; line-height: 1.5; }
#videoDialogue { margin: 22px 0 12px; }
.output-toolbar { display: grid; grid-template-columns: minmax(0,1fr); gap: 2px; }
.output-tool-group { display: none; align-items: center; gap: 5px; min-width: 0; padding: 3px; }
.output-tool-group .tool-button { flex: 1 1 82px; min-width: 0; min-height: 34px; padding: 6px 8px; }
.output-toolbar > span { margin: 0; padding: 3px 5px 1px; text-align: right; }
@media (max-width: 1260px) {
  .mobile-step-nav { position: sticky; top: 121px; z-index: 19; display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fff; scrollbar-width: none; }
  .mobile-step-nav::-webkit-scrollbar { display: none; }
  .mobile-step { flex: 1 0 auto; min-height: 36px; border: 1px solid transparent; border-radius: 9px; padding: 6px 10px; color: var(--muted); background: transparent; font-size: .75rem; font-weight: 800; cursor: pointer; }
  .mobile-step.active { border-color: #d8d4ff; color: #4b3ec0; background: #f1efff; }
  .mobile-step.done { color: #277358; }
  body.output-mode .mobile-step-nav { visibility: hidden; }
}
@media (max-width: 620px) {
  .mobile-step-nav { top: 115px; }
  .stage-guide button { flex-basis: calc(50% - 5px); }
}
.project-media-settings { grid-template-columns: minmax(0, 1fr); max-width: 330px; }
.image-workspace-section[hidden] { display: none; }
.image-workspace-section { min-width: 0; animation: panel-in .16s ease-out; }
.image-workspace-section > .base-lab,
.image-workspace-section > .identity-pack-card,
.image-workspace-section > .media-lane,
.image-workspace-section > .format-pack-card { margin-top: 0; }
.image-workspace-section[data-image-section="formats"] > .field { max-width: 360px; margin-bottom: 20px; }
.stage-guide .stage-result-action { flex: 1 1 100%; border-color: #292547; color: #fff; background: #292547; }
.stage-guide .stage-result-action:hover { border-color: #423879; background: #423879; }
/* Fluxo focado: uma tarefa por vez, resultados quando solicitados. */
:root { --canvas: #f4f5f9; --violet: #5b50dc; --violet-dark: #4539b8; --violet-soft: #eeecfc; }
.workspace { max-width: 1480px; }
.rail { background: #fafaff; }
.step.active { background: #eeecfc; box-shadow: none; }
.step.active b { color: #322a93; }
.quality-card { display: none; }
.panel { max-width: 920px; padding-top: 34px; }
.panel-heading h1 { font-family: "Segoe UI Variable", "Segoe UI", sans-serif; font-weight: 760; line-height: 1.12; letter-spacing: -.035em; }
.lead { margin-bottom: 22px; }
.output-close { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.18); border-radius: 9px; background: rgba(255,255,255,.06); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.output-close:hover { background: rgba(255,255,255,.18); }
.output[aria-hidden="true"] { display: none !important; }
.task-nav { display: grid; grid-auto-columns: minmax(0,1fr); grid-auto-flow: column; gap: 3px; width: 100%; margin: 0 0 8px; padding: 4px; border: 1px solid #ddddec; border-radius: 13px; background: #f3f3f8; }
.task-nav button { min-width: 0; min-height: 58px; display: grid; align-content: center; gap: 2px; padding: 8px 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; }
.task-nav button b { font-size: .83rem; line-height: 1.25; overflow-wrap: anywhere; }
.task-nav button small { color: var(--muted); font-size: .68rem; line-height: 1.2; overflow-wrap: anywhere; }
.task-nav button:hover { background: #fff; }
.task-nav button.active { border-color: #d9d6f8; background: #fff; box-shadow: 0 2px 7px rgba(33,32,73,.07); color: #3429a1; }
.task-nav button.active small { color: #625a95; }
.task-section[hidden] { display: none; }
.task-section { min-width: 0; padding-top: 22px; animation: panel-in .16s ease-out; }
.task-section > .field:first-child, .task-section > .field-grid:first-child, .task-section > .reference-block:first-child { margin-top: 0; }
.flow-details { margin: 22px 0 0; border-top: 1px solid var(--line); }
.flow-details summary { padding: 14px 0; color: #4940a2; font-size: .78rem; font-weight: 750; cursor: pointer; }
.flow-details .production-map { margin: 0 0 10px; }
.brief-composer { display: block; box-shadow: none; border-color: #dfe0ed; }
.brief-intro { display: block; padding: 17px 20px; color: var(--ink); background: #f6f5ff; }
.brief-badge, .brief-map, .brief-intro > small { display: none; }
.brief-intro h2 { max-width: none; margin: 0 0 5px; font: 760 1.05rem/1.25 "Segoe UI Variable", "Segoe UI", sans-serif; }
.brief-intro p { max-width: 680px; color: var(--muted); font-size: .79rem; }
.brief-fields { padding: 0 20px; }
.brief-field { padding: 17px 0; }
.brief-field.featured .field textarea { border-color: var(--violet); }
.task-section .language-lock { margin: 22px 0 0; }
.task-section .detail-divider { margin-top: 0; }
.person-builder-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; padding: 10px; }
.appearance-disclosure { min-width: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #fff; }
.appearance-disclosure summary { padding: 15px 17px; color: var(--ink); font-size: .86rem; font-weight: 760; cursor: pointer; list-style-position: inside; }
.appearance-disclosure[open] summary { border-bottom: 1px solid var(--line); background: #f8f7ff; color: #352c9c; }
.appearance-disclosure .appearance-group { width: 100%; border: 0; padding: 16px 18px 2px; }
.appearance-disclosure .appearance-group:nth-child(odd) { border-right: 0; }
.appearance-disclosure legend { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.task-section .tattoo-ref { margin-top: 22px; }
.task-section .tattoo-tip { margin-bottom: 20px; }
.image-stage-guide { background: #f7f6ff; }
.image-stage-guide button:not(.stage-result-action) { flex: 1 1 130px; }
.stage-guide .stage-result-action { margin-top: 4px; }
@media (min-width: 1261px) {
  .workspace { grid-template-columns: 210px minmax(0,1fr); }
  .output { display: none; }
  .workspace.preview-open { grid-template-columns: 210px minmax(0,1fr) minmax(400px,36%); max-width: 1800px; }
  .workspace.preview-open .output { display: flex; }
}
@media (max-width: 1260px) {
  .workspace.preview-open { display: block; }
  .output-close { margin-left: auto; }
}
@media (max-width: 620px) {
  .task-nav { margin-bottom: 2px; }
  .task-nav button { min-height: 46px; padding: 7px 8px; text-align: center; }
  .task-nav button b { font-size: .73rem; }
  .task-nav button small { display: none; }
  .task-section { padding-top: 18px; }
  .brief-intro { padding: 15px; }
  .brief-fields { padding: 0 15px; }
  .appearance-disclosure .appearance-group { padding: 13px 14px 2px; }
  .output-head { flex-wrap: wrap; }
  .output-close { order: -1; }
}
/* Cada etapa possui apenas suas abas de resultado; nenhum conteúdo de outra mídia aparece. */
body:is([data-active-step="1"], [data-active-step="2"], [data-active-step="3"]) .output-tool-group[data-result-stage="project"] { display: flex; }
body[data-active-step="4"] .output-tool-group[data-result-stage="image"] { display: flex; }
body[data-active-step="5"] .output-tool-group[data-result-stage="video"] { display: flex; }
.output-tool-group .tool-button:focus-visible { outline: 2px solid #c8c1ff; outline-offset: 1px; }
.image-workspace-section .media-lane-head { display: none; }
.image-workspace-section .storyboard-card { border-top-left-radius: 15px; border-top-right-radius: 15px; }
@media (max-width: 1400px) {
  .top-actions .save-state, .top-actions > #cloudButton, .top-actions > #resetButton { display: none; }
  .top-actions .more-menu { display: block; }
  .more-menu summary { width: 38px; min-height: 39px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-weight: 900; cursor: pointer; }
  .more-menu[open] summary { border-color: #a9a1f4; color: var(--violet-dark); background: var(--violet-soft); }
  .more-menu > div { position: absolute; z-index: 50; top: 45px; right: 0; width: 210px; display: grid; gap: 3px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 18px 38px rgba(37,34,83,.18); }
  .more-menu > div button { min-height: 42px; border: 0; border-radius: 8px; padding: 8px 10px; background: transparent; text-align: left; font-weight: 700; cursor: pointer; }
  .more-menu > div button:hover { background: var(--violet-soft); }
}
.more-menu { display: none; position: relative; }
.more-menu summary { list-style: none; }
.more-menu summary::-webkit-details-marker { display: none; }
@media (max-width: 620px) {
  .topbar { overflow: visible; }
  .top-actions { gap: 5px; }
  .top-actions .compact { padding-inline: 9px; font-size: .73rem; white-space: nowrap; }
  .more-menu { display: block; }
  .more-menu summary { width: 34px; min-height: 39px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-weight: 900; cursor: pointer; }
  .more-menu[open] summary { border-color: #a9a1f4; color: var(--violet-dark); background: var(--violet-soft); }
  .more-menu > div { position: absolute; z-index: 50; top: 45px; right: 0; width: 210px; display: grid; gap: 3px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 18px 38px rgba(37,34,83,.18); }
  .more-menu > div button { min-height: 42px; border: 0; border-radius: 8px; padding: 8px 10px; background: transparent; text-align: left; font-weight: 700; cursor: pointer; }
  .more-menu > div button:hover { background: var(--violet-soft); }
}

/* Resultados: uma ação por arquivo, prévia sob demanda e orientação do uso correto. */
.output-use-note { margin: 8px 0; padding: 10px 12px; border-left: 3px solid #a8efd3; border-radius: 6px; color: #dbf4e9; background: rgba(31,157,114,.10); font-size: .75rem; line-height: 1.45; }
.output-use-note[hidden] { display: none; }
.prompt-item { content-visibility: auto; contain-intrinsic-size: 96px; }
.prompt-item-head { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
.prompt-item-label { min-width: 0; }
.prompt-item-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.prompt-item-actions button { min-height: 38px; padding: 7px 10px; border-radius: 8px; font-size: .72rem; font-weight: 750; cursor: pointer; }
.prompt-item-actions .download-item { border: 1px solid rgba(255,255,255,.17); color: #e6e6f3; background: rgba(255,255,255,.04); }
.prompt-item-actions .download-item:hover { border-color: #d6d1ff; background: rgba(255,255,255,.11); }
.prompt-preview { border-top: 1px solid rgba(255,255,255,.08); }
.prompt-preview summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; color: #b8b8d2; cursor: pointer; font-size: .7rem; font-weight: 700; list-style: none; }
.prompt-preview summary::-webkit-details-marker { display: none; }
.prompt-preview summary::after { content: "+"; color: #c4bfff; font-size: 1rem; line-height: 1; }
.prompt-preview[open] summary::after { content: "−"; }
.prompt-preview summary:hover { color: #fff; background: rgba(255,255,255,.045); }
.prompt-preview summary:focus-visible { outline: 2px solid #c8c1ff; outline-offset: -2px; }
.prompt-item .prompt-preview pre { max-height: 420px; border-top: 1px solid rgba(255,255,255,.08); }
@media (max-width: 620px) {
  .prompt-item-head { grid-template-columns: minmax(0,1fr); }
  .prompt-item-actions { justify-content: stretch; }
  .prompt-item-actions button { flex: 1; }
}

.change-proof[hidden], .output-requirements[hidden] { display: none; }
.output-requirements { margin: 8px 0; padding: 10px 12px; border: 1px solid rgba(255,196,126,.27); border-radius: 9px; background: rgba(177,101,20,.10); }
.output-requirements > strong { display: block; margin-bottom: 7px; color: #ffd4a8; font-size: .72rem; }
#requirementItems { display: grid; gap: 5px; }
#requirementItems button { width: 100%; min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; border: 1px solid rgba(255,196,126,.15); border-radius: 7px; color: #f6e9dc; background: rgba(255,255,255,.035); font-size: .72rem; text-align: left; cursor: pointer; }
#requirementItems button span { flex: 0 0 auto; color: #ffcf9a; font-weight: 800; }
#requirementItems button:hover { border-color: #ffcf9a; background: rgba(255,196,126,.10); }
#requirementItems button:focus-visible { outline: 2px solid #ffcf9a; outline-offset: 1px; }
/* Exclusão: ação secundária, confirmação legível e responsiva. */
.project-management-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:-3px 0 17px; color:var(--muted); font-size:.72rem; }
.project-delete-link { border:0; padding:7px 0; background:transparent; color:#a83349; font:inherit; font-weight:800; text-decoration:underline; text-underline-offset:3px; cursor:pointer; white-space:nowrap; }
.project-delete-link:hover { color:#7f1d32; }
.more-menu > div .danger-menu-action { color:#a83349; border-top:1px solid var(--line); border-radius:0 0 8px 8px; }
.more-menu > div .danger-menu-action:hover { color:#7f1d32; background:#fff0f2; }
.delete-dialog { max-height:min(90dvh,700px); overflow:auto; overscroll-behavior:contain; }
.delete-project-name { display:block; overflow-wrap:anywhere; padding:13px 15px; border:1px solid #f0c2c9; border-radius:10px; color:#7f1d32; background:#fff4f5; font-size:.89rem; }
.delete-dialog .cloud-card > p { line-height:1.5; }
.delete-project-error { padding:10px 12px; border-radius:10px; color:#8c263b !important; background:#fff0f2; font-weight:700; }
.delete-project-error[hidden] { display:none; }
.button.danger { color:#fff; border:1px solid #aa2942; background:#b6334d; }
.button.danger:hover { border-color:#852239; background:#92263d; }
.button.danger:disabled { opacity:.65; cursor:wait; }
@media (max-width:620px) {
  .project-management-row { align-items:flex-start; flex-direction:column; gap:3px; }
  .delete-dialog .cloud-actions { flex-wrap:wrap; }
  .delete-dialog .cloud-actions .button { flex:1 1 120px; }
}
