:root {
  --paper: #f5f4ef;
  --surface: #fffefb;
  --ink: #282824;
  --muted: #919087;
  --line: #e5e3dc;
  --accent: #7259d9;
  --accent-dark: #5941bf;
  --accent-pale: #f0ecfc;
  --sans: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 13px; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a, label, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { outline: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input:focus, textarea:focus, select:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px #7259d910; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; background: radial-gradient(circle at 22% 18%, #ede8fa 0, transparent 34%), radial-gradient(circle at 82% 78%, #f3e8db 0, transparent 38%), var(--paper); }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid #e2ded4; border-radius: 14px; padding: 38px 38px 30px; box-shadow: 0 24px 70px #5f4b3410; text-align: center; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: 2px; }
.login-brand .brand-mark { grid-template-columns: repeat(2, 8px); grid-template-rows: repeat(2, 8px); gap: 2px; }
.login-emblem { width: 62px; height: 62px; margin: 30px auto 22px; border-radius: 50%; background: #f0ebfa; color: #7a62b8; display: grid; place-items: center; border: 1px solid #e2d9f2; }
.login-emblem svg { width: 24px; height: 24px; }
.login-card h1 { font-size: 21px; font-weight: 600; letter-spacing: -.3px; margin: 0 0 12px; }
.login-card > p:not(.eyebrow) { color: #989184; font-size: 11px; line-height: 1.9; margin: 0 0 27px; }
#login-form { text-align: left; }
#login-form > label { display: block; font-size: 9px; color: #8c8579; margin-bottom: 7px; letter-spacing: .5px; }
.login-field { position: relative; }
.login-field input { width: 100%; border: 1px solid #ded9ce; border-radius: 7px; padding: 12px 96px 12px 12px; background: #fbfaf6; font-size: 12px; letter-spacing: 2px; }
.login-field button { position: absolute; right: 5px; top: 5px; bottom: 5px; display: flex; align-items: center; gap: 5px; border: 0; border-radius: 5px; padding: 0 11px; background: var(--ink); color: #fff; font-size: 10px; }
.login-field button:hover:not(:disabled) { background: #4c4269; }
.login-field button:disabled { background: #8b847b; }
.login-field button svg { width: 12px; height: 12px; }
.login-caption { display: block; margin-top: 30px; color: #b8b1a4; font-size: 7px; letter-spacing: 1.6px; }
.logout-button { border: 1px solid #ddd8cc; background: transparent; border-radius: 4px; padding: 4px 8px; color: #958d80; font-size: 9px; }
.logout-button:hover { border-color: #c3b8d9; color: var(--accent); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 224px; flex-shrink: 0; border-right: 1px solid var(--line); background: #f8f7f3; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 12px; padding: 31px 27px; font-size: 17px; font-weight: 800; letter-spacing: 1.5px; }
.brand > span:last-child > span { display: block; font-size: 8px; letter-spacing: 4.4px; font-weight: 500; margin-top: 4px; color: #77756d; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 10px); grid-template-rows: repeat(2, 10px); gap: 3px; transform: rotate(-8deg); }
.brand-mark i { background: var(--ink); border-radius: 1px; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { border-radius: 50%; }
.navigation { margin-top: 29px; padding: 0 16px; }
.nav-caption { padding: 0 13px; margin: 0 0 12px; font-size: 10px; letter-spacing: 1px; color: #99978e; }
.nav-item { display: flex; align-items: center; gap: 12px; border: 0; border-radius: 7px; width: 100%; padding: 12px 14px; background: transparent; margin-bottom: 5px; text-align: left; font-size: 12px; color: #76746c; transition: .18s; }
.nav-item:hover { background: #eeede7; }
.nav-item.active { background: #eae5f7; color: var(--accent-dark); font-weight: 600; }
.nav-item svg { width: 17px; height: 17px; }
.nav-dot { margin-left: auto; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
.count { margin-left: auto; min-width: 20px; padding: 1px 5px; border-radius: 10px; text-align: center; background: #e9e7df; font-size: 10px; }
.sidebar-note { margin: auto 27px 30px; }
.note-orbit { width: 50px; height: 50px; position: relative; margin-bottom: 25px; border: 1px solid #d8d2e7; border-radius: 50%; transform: rotate(-35deg); }
.note-orbit:before { content: ""; position: absolute; inset: 8px -9px; border: 1px solid #c9c0e0; border-radius: 50%; }
.note-orbit:after { content: ""; position: absolute; width: 13px; height: 13px; border-radius: 50%; background: #8b72cc; top: 0; left: 6px; box-shadow: 0 0 16px #9e88d350; }
.note-orbit span { position: absolute; inset: 18px; background: #d9cfeb; border-radius: 50%; }
.eyebrow { font-size: 9px; font-weight: 600; letter-spacing: 2.2px; color: #97938b; margin: 0 0 13px; }
.sidebar-note > p:not(.eyebrow) { font-size: 13px; line-height: 1.9; margin: 0 0 9px; font-weight: 500; }
.sidebar-note > span { color: #aaa69c; font-size: 10px; }
.sidebar-bottom { padding: 20px 25px; border-top: 1px solid var(--line); }
.connection { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 600; }
.status-dot { width: 5px; height: 5px; background: #77a582; border-radius: 50%; box-shadow: 0 0 0 3px #77a58210; }
.connection > span:last-child { margin-left: auto; font-size: 8px; color: #8e8b81; border: 1px solid #dbd8cf; border-radius: 3px; padding: 2px 4px; }
.sidebar-bottom > p { font-size: 9px; color: #aaa69b; margin: 8px 0 0 12px; }
.main-content { margin-left: 224px; flex: 1; min-width: 0; }
.topbar { height: 73px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 40px; background: #f8f7f2b0; }
.breadcrumb { display: flex; gap: 12px; font-size: 11px; color: #a09c91; }
.breadcrumb strong { color: #57554d; font-weight: 500; }
.topbar-right { display: flex; gap: 25px; align-items: center; }
.private-badge { display: flex; align-items: center; gap: 6px; color: #918d81; font-size: 10px; }
.private-badge svg { width: 12px; height: 12px; }
.docs-link { display: flex; align-items: center; gap: 5px; font-size: 10px; }
.docs-link svg { width: 12px; height: 12px; }
.page-body { max-width: 1450px; margin: auto; padding: 43px 42px 25px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 32px; }
.page-heading h1 { margin: 0 0 13px; font-size: clamp(26px, 2.3vw, 37px); letter-spacing: -1px; font-weight: 600; line-height: 1.4; }
.page-heading h1 em { font-family: Georgia, "Songti SC", "SimSun", serif; color: var(--accent); font-weight: 400; }
.page-heading > div > p:last-child { margin: 0; color: #908d82; font-size: 12px; letter-spacing: .3px; }
.edition { font-size: 8px; color: #aaa69b; letter-spacing: 1.5px; padding-bottom: 4px; }
.edition strong { font-size: 9px; color: #6c6960; margin-left: 5px; }
.workspace { display: grid; grid-template-columns: minmax(390px, .98fr) minmax(330px, 1.1fr); gap: 23px; align-items: stretch; }
.creation-panel, .preview-panel { background: var(--surface); border: 1px solid #e3e1d9; border-radius: 12px; }
.creation-panel { overflow: hidden; }
.mode-tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 25px; gap: 25px; }
.mode-tab { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; background: transparent; border: 0; padding: 20px 7px 17px; color: #98948a; font-size: 12px; flex: 1; white-space: nowrap; }
.mode-tab svg { width: 16px; height: 16px; }
.mode-tab > span { font-size: 9px; opacity: .65; margin-left: 3px; }
.mode-tab.active { color: var(--accent-dark); font-weight: 600; }
.mode-tab.active:after { position: absolute; content: ""; height: 2px; background: var(--accent); bottom: -1px; left: 10px; right: 10px; }
#creation-form { padding: 23px 25px 17px; }
.form-section { margin-bottom: 23px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.section-heading h2 { font-size: 12px; margin: 0; font-weight: 600; display: flex; gap: 9px; align-items: center; }
.section-heading h2 > span:first-child { font-size: 9px; font-weight: 500; color: #a8a49b; font-variant-numeric: tabular-nums; }
.required { font-size: 8px; color: #a08c70; background: #f4eee2; border-radius: 3px; padding: 3px 5px; font-weight: 400; }
.subtle { font-size: 9px; color: #aaa69c; }
.model-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.model-card { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 7px; padding: 12px 10px; cursor: pointer; position: relative; transition: border-color .2s, background .2s; }
.model-card:hover { border-color: #bfb1e6; }
.model-card.selected { border-color: #a28cdb; background: #f5f2fc; box-shadow: 0 0 0 1px #7259d908; }
.model-card input { position: absolute; opacity: 0; pointer-events: none; }
.model-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.model-icon { width: 31px; height: 34px; display: grid; place-items: center; border-radius: 6px; }
.model-icon svg { width: 16px; height: 16px; }
.model-icon.violet { background: #e7def9; color: #8266c4; }
.model-icon.amber { background: #f6ead6; color: #b58a45; }
.model-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.model-copy strong { font-size: 11px; font-weight: 600; white-space: nowrap; }
.model-copy small { color: #a19d92; font-size: 8px; white-space: nowrap; }
.recommended { color: #8d75bf; font-size: 7px; background: #e9e0f7; border-radius: 3px; padding: 2px 4px; margin-left: 5px; font-weight: 400; vertical-align: 1px; }
.radio-mark { width: 12px; height: 12px; border: 1px solid #d7d3c8; border-radius: 50%; margin-left: auto; flex-shrink: 0; }
.selected .radio-mark { border: 3px solid var(--accent); background: white; }
.prompt-field { border: 1px solid var(--line); border-radius: 7px; padding: 0; position: relative; background: #fffefb; }
.prompt-field:focus-within { border-color: #b3a2e0; box-shadow: 0 0 0 3px #7259d908; }
textarea { border: 0; display: block; resize: vertical; min-height: 115px; max-height: 300px; width: 100%; background: transparent; padding: 12px 13px 27px; line-height: 1.8; font-size: 11px; color: var(--ink); border-radius: 7px; }
textarea::placeholder { color: #b0aca1; }
textarea:focus { box-shadow: none !important; }
.prompt-corner { display: flex; align-items: center; gap: 3px; font-size: 8px; color: #b2aea2; position: absolute; bottom: 9px; right: 11px; pointer-events: none; }
.prompt-corner svg { width: 10px; height: 10px; }
.clear-prompt { border: 0; background: #eeece5; color: #8c877a; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; position: absolute; right: 10px; top: 10px; }
.clear-prompt svg { width: 10px; height: 10px; }
.inspiration { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.inspiration > span { font-size: 9px; color: #aaa599; margin-right: 2px; }
.inspiration button { border: 0; border-radius: 4px; padding: 4px 7px; background: #f1efe8; color: #8d887d; font-size: 8px; transition: .15s; }
.inspiration button:hover { background: var(--accent-pale); color: var(--accent); }
.text-button { display: inline-flex; align-items: center; gap: 5px; background: transparent; border: 0; padding: 0; color: #a09a8d; font-size: 9px; }
.text-button:hover { color: var(--accent); }
.text-button svg { width: 12px; height: 12px; }
.setting-label { display: flex; align-items: center; justify-content: space-between; font-size: 10px; margin-bottom: 10px; }
.ratio-options { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.ratio-button { background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 8px 0 7px; color: #8b877d; display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 9px; }
.ratio-button:hover { background: #f4f2ec; }
.ratio-button.selected { border-color: #b5a4dd; background: #f4f0fc; color: var(--accent); }
.ratio-shape { height: 22px; border: 1px solid currentColor; border-radius: 2px; display: grid; place-items: center; opacity: .75; }
.square { width: 21px; }
.landscape { width: 30px; height: 18px; }
.portrait { width: 14px; height: 23px; }
.classic { width: 27px; height: 19px; }
.tall { width: 16px; height: 23px; }
.auto-shape { border: 0; width: 23px; }
.auto-shape svg { width: 20px; height: 20px; }
.custom-size { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.custom-size summary { cursor: pointer; font-size: 9px; color: #898477; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.custom-size summary:before { content: "+"; margin-right: 5px; }
.custom-size[open] summary:before { content: "−"; }
.custom-size summary span { margin-left: auto; color: #b3ada1; font-size: 8px; }
.dimension-fields { display: flex; align-items: end; gap: 8px; margin-top: 12px; }
.dimension-fields label { font-size: 9px; color: #979184; flex: 1; }
.dimension-fields input { width: 100%; margin-top: 5px; border: 1px solid var(--line); border-radius: 5px; background: transparent; padding: 7px 8px; font-size: 11px; }
.dimension-fields > span { padding-bottom: 8px; color: #aaa497; }
.dimension-fields button { padding: 8px 13px; border: 1px solid #d8cfee; background: var(--accent-pale); color: var(--accent); border-radius: 5px; font-size: 10px; }
.advanced-settings { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; gap: 10px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #f0eee7; }
.select-setting { font-size: 9px; color: #8d877b; display: flex; flex-direction: column; gap: 6px; }
.select-setting select { border: 1px solid var(--line); border-radius: 4px; background: #faf9f5; padding: 5px 4px; font-size: 9px; color: #666155; }
.toggle-setting { display: flex; justify-content: space-between; align-items: center; gap: 6px; position: relative; cursor: pointer; }
.toggle-setting > span:first-child { font-size: 9px; color: #7d776b; }
.toggle-setting small { display: block; font-size: 7px; margin-top: 5px; color: #b1aa9e; white-space: nowrap; }
.toggle-setting input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle { width: 26px; height: 15px; background: #dedbd1; border-radius: 10px; flex-shrink: 0; position: relative; transition: .2s; }
.toggle:after { content: ""; position: absolute; width: 11px; height: 11px; border-radius: 50%; background: #fff; left: 2px; top: 2px; box-shadow: 0 1px 2px #0001; transition: .2s; }
.toggle-setting input:checked + .toggle { background: var(--accent); }
.toggle-setting input:checked + .toggle:after { transform: translateX(11px); }
.toggle-setting input:focus-visible + .toggle { outline: 2px solid var(--accent); outline-offset: 3px; }
.optimize-section { border: 1px solid #e7e1f2; background: #faf8fe; border-radius: 8px; padding: 15px 14px 13px; }
.optimize-section .section-heading { margin-bottom: 11px; }
.optimize-section .section-heading h2 { color: #6f5aa9; }
.optimize-field { position: relative; }
.optimize-field textarea { min-height: 68px; max-height: 180px; padding: 10px 11px 42px; border: 1px solid #e3ddf0; border-radius: 6px; background: #fff; font-size: 11px; }
.optimize-button { position: absolute; bottom: 8px; right: 8px; display: flex; align-items: center; gap: 5px; border: 1px solid #d7cbef; background: #f0ebfb; color: #6952a6; border-radius: 5px; padding: 6px 9px; font-size: 9px; font-weight: 500; transition: .18s; }
.optimize-button:hover:not(:disabled) { background: #e7ddf9; border-color: #bfaee2; }
.optimize-button:disabled { opacity: .7; }
.optimize-button svg { width: 12px; height: 12px; }
.optimize-hint { display: flex; align-items: center; gap: 5px; margin: 9px 0 0; color: #a49aae; font-size: 8px; }
.optimize-hint svg { width: 10px; height: 10px; }
.generate-button { display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 7px; width: 100%; background: var(--ink); color: #fff; padding: 13px 18px; font-size: 12px; letter-spacing: 1px; transition: background .2s, transform .2s; position: relative; }
.generate-button:hover:not(:disabled) { background: #4c4269; transform: translateY(-1px); }
.generate-button:active:not(:disabled) { transform: translateY(0); }
.generate-button:disabled { background: #817b72; }
.button-spark { display: flex; }
.button-spark svg { width: 15px; height: 15px; }
.button-arrow { width: 15px; height: 15px; position: absolute; right: 18px; }
.generate-hint { display: flex; align-items: center; justify-content: center; gap: 5px; color: #b2aca0; font-size: 8px; margin: 10px 0 0; }
.generate-hint svg { width: 10px; height: 10px; }
.field-error { font-size: 10px; color: #ba5147; margin: 7px 0 0; min-height: 0; }
.field-error:empty { display: none; }
.reference-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 10px; }
.reference-item { aspect-ratio: 1; position: relative; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #eeeae2; }
.reference-item img { width: 100%; height: 100%; object-fit: cover; }
.reference-item > span { position: absolute; bottom: 3px; left: 3px; background: #29251de0; color: #fff; font-size: 7px; padding: 2px 4px; border-radius: 2px; }
.reference-item button { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border: 0; border-radius: 50%; background: #29251dda; color: white; padding: 4px; }
.reference-item button svg { width: 10px; height: 10px; }
.upload-zone { display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px dashed #d7d1c5; border-radius: 7px; padding: 17px; cursor: pointer; transition: .2s; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: #f7f3fe; }
.upload-zone > svg { width: 22px; height: 22px; color: #a69ab9; }
.upload-zone strong, .upload-zone small { display: block; }
.upload-zone strong { font-size: 10px; font-weight: 500; margin-bottom: 5px; }
.upload-zone small { font-size: 8px; color: #aaa396; }
.preview-panel { display: flex; flex-direction: column; overflow: hidden; min-height: 620px; }
.preview-header { height: 53px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 20px; }
.preview-header > span { display: flex; align-items: center; gap: 7px; font-size: 10px; color: #8b867a; }
.preview-header > span i { width: 5px; height: 5px; background: #9e8bbd; border-radius: 50%; }
.result-actions { display: flex; align-items: center; gap: 5px; }
.result-actions button { display: flex; align-items: center; gap: 4px; padding: 5px 7px; background: transparent; border: 0; border-radius: 4px; font-size: 9px; color: #8d867a; }
.result-actions button:hover { background: #f0ede4; color: var(--accent); }
.result-actions svg { width: 13px; height: 13px; }
.canvas { flex: 1; display: flex; align-items: center; justify-content: center; margin: 18px; min-height: 0; position: relative; border-radius: 7px; overflow: hidden; background-color: #f1f0eb; background-image: linear-gradient(45deg, #eae8e150 25%, transparent 25%), linear-gradient(-45deg, #eae8e150 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eae8e150 75%), linear-gradient(-45deg, transparent 75%, #eae8e150 75%); background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; }
.empty-state, .loading-state { text-align: center; padding: 30px 20px; }
.empty-art { width: 175px; height: 155px; position: relative; margin: 0 auto 24px; }
.art-circle { position: absolute; width: 108px; height: 108px; border-radius: 50%; background: #e5dfd6; top: 22px; left: 33px; }
.art-card { position: absolute; width: 87px; height: 106px; border-radius: 5px; border: 1px solid #d5d0c4; }
.card-back { left: 41px; top: 29px; transform: rotate(-17deg); background: #e0d9e7; }
.card-front { left: 52px; top: 22px; transform: rotate(10deg); background: #faf9f4; box-shadow: 1px 6px 16px #66564210; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #a599b8; gap: 11px; }
.card-front svg { width: 26px; height: 26px; stroke-width: 1.2; }
.card-front span { font-size: 6px; letter-spacing: 1.5px; line-height: 1.6; color: #b3aa9a; }
.spark { color: #9a84c2; position: absolute; font-size: 20px; }
.spark-one { right: 5px; top: 10px; }
.spark-two { left: 18px; bottom: 14px; font-size: 28px; color: #c3b7d4; }
.empty-state h2, .loading-state h2 { font-size: 13px; font-weight: 500; letter-spacing: .5px; margin: 0 0 12px; }
.empty-state > p, .loading-state > p { color: #a29c8e; font-size: 10px; line-height: 1.9; margin: 0; }
.empty-caption { display: block; margin-top: 33px; color: #b5afa2; font-size: 7px; letter-spacing: 1.8px; }
.preview-footer { display: flex; justify-content: space-between; align-items: center; min-height: 41px; border-top: 1px solid var(--line); padding: 0 20px; color: #b0aa9d; font-size: 8px; }
.preview-footer > span:first-child { display: flex; gap: 5px; align-items: center; }
.preview-footer svg { width: 11px; height: 11px; }
#token-usage { color: #aaa193; }
.loading-visual { width: 120px; height: 120px; margin: 0 auto 30px; position: relative; display: grid; place-items: center; }
.loading-visual > span { position: absolute; border: 1px solid #d8cbea; border-radius: 50%; inset: 0; animation: orbit 5s linear infinite; }
.loading-visual > span:before { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #9b7dca; top: 10px; left: 17px; }
.loading-visual > span:nth-child(2) { inset: 10px -8px; transform: rotate(60deg); animation-direction: reverse; animation-duration: 7s; opacity: .7; }
.loading-visual > span:nth-child(3) { inset: 20px; border-style: dashed; animation-duration: 10s; opacity: .6; }
.loading-visual > div { background: #e7ddf4; width: 45px; height: 45px; border-radius: 50%; display: grid; place-items: center; color: #8265b2; }
.loading-visual svg { width: 23px; height: 23px; }
.elapsed { display: block; font-size: 18px; font-weight: 300; color: #95819f; font-variant-numeric: tabular-nums; margin: 17px 0; }
.loading-state small { font-size: 8px; color: #b1aa9c; }
.result-state { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.result-image-button { border: 0; padding: 0; background: transparent; min-height: 0; flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; cursor: zoom-in; overflow: hidden; }
.result-image-button img { display: block; max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }
.result-info { width: 100%; display: flex; justify-content: space-between; font-size: 8px; padding: 10px 8px 0; color: #9c9486; background: #f1f0eb; }
.gallery-section { margin-top: 42px; }
.gallery-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 20px; }
.gallery-heading .eyebrow { margin-bottom: 9px; font-size: 8px; }
.gallery-heading h2 { font-size: 18px; font-weight: 500; margin: 0; letter-spacing: .5px; }
.gallery-heading h2 > span { font-size: 10px; color: #9d9587; background: #eae7de; border-radius: 4px; padding: 2px 5px; vertical-align: 3px; margin-left: 5px; }
.gallery-empty { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; padding: 33px; border: 1px dashed #dedacf; border-radius: 8px; color: #b1aa9d; font-size: 10px; }
.gallery-empty svg { width: 22px; height: 22px; color: #b4aaba; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.artwork-card { border: 1px solid #e2ded4; border-radius: 8px; overflow: hidden; background: #faf8f2; transition: transform .2s, box-shadow .2s; }
.artwork-card:hover { transform: translateY(-3px); box-shadow: 0 7px 22px #6c5a3a0b; }
.artwork-image { display: block; width: 100%; border: 0; padding: 0; aspect-ratio: 1; overflow: hidden; background: #eae6dd; cursor: zoom-in; }
.artwork-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.artwork-image:hover img { transform: scale(1.025); }
.artwork-copy { padding: 12px 13px 10px; }
.artwork-copy p { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 0 8px; line-height: 1.6; }
.artwork-meta { display: flex; justify-content: space-between; color: #a69d8d; font-size: 8px; }
.artwork-card-actions { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #ece8df; padding: 7px 11px; }
.artwork-card-actions > span { font-size: 7px; color: #aaa190; }
.artwork-card-actions > div { display: flex; gap: 3px; }
.artwork-card-actions button { background: transparent; border: 0; display: grid; place-items: center; width: 24px; height: 24px; color: #a29684; border-radius: 4px; }
.artwork-card-actions button:hover { background: #ede7f3; color: var(--accent); }
.artwork-card-actions svg { width: 12px; height: 12px; }
.page-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 42px; border-top: 1px solid #e2ded4; padding-top: 19px; font-size: 8px; color: #b3ab9c; }
.page-footer > span:first-child { font-weight: 600; letter-spacing: 1.5px; font-size: 8px; color: #968c7c; }
.page-footer > span:last-child { font-size: 6px; letter-spacing: 1.5px; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 15px); padding: 12px 21px; max-width: min(90vw, 560px); background: #292622; border: 1px solid #ffffff15; color: #fbfaf4; border-radius: 8px; font-size: 12px; line-height: 1.6; z-index: 100; box-shadow: 0 5px 35px #0002; opacity: 0; pointer-events: none; transition: .2s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #854940; }
.image-dialog { border: 0; padding: 0; border-radius: 10px; background: #f6f3ed; max-width: 90vw; max-height: 90vh; width: fit-content; overflow: visible; box-shadow: 0 20px 90px #0004; }
.image-dialog::backdrop, .confirm-dialog::backdrop { background: #201c2bc9; backdrop-filter: blur(5px); }
.image-dialog > img { max-width: 88vw; max-height: 76vh; object-fit: contain; display: block; border-radius: 10px 10px 0 0; }
.dialog-close { position: absolute; right: -15px; top: -15px; width: 32px; height: 32px; border: 1px solid #ffffff30; background: #f6f3ed; border-radius: 50%; display: grid; place-items: center; }
.dialog-close svg { width: 16px; height: 16px; }
.dialog-caption { padding: 15px 18px; }
.dialog-caption p { margin: 0 0 7px; font-size: 11px; line-height: 1.7; max-width: 75vw; }
.dialog-caption span { font-size: 9px; color: #999080; }
.confirm-dialog { border: 1px solid #eee7dc; border-radius: 12px; padding: 30px; width: 350px; text-align: center; color: var(--ink); background: var(--surface); }
.confirm-icon { width: 45px; height: 45px; background: #f3e7df; color: #ae7060; display: grid; place-items: center; border-radius: 50%; margin: auto; }
.confirm-dialog h2 { font-size: 16px; font-weight: 500; margin: 18px 0 10px; }
.confirm-dialog p { font-size: 11px; color: #a29889; line-height: 1.8; }
.confirm-dialog > div:last-child { display: flex; gap: 10px; margin-top: 22px; }
.confirm-dialog > div:last-child button { flex: 1; border: 1px solid #ded6ca; background: transparent; border-radius: 6px; padding: 10px; font-size: 11px; }
#confirm-delete { background: #a96355; color: white; border-color: #a96355; }
.form-disabled { opacity: .65; }
@keyframes orbit { to { transform: rotate(360deg); } }
@media (min-width: 1550px) {
  .sidebar { width: 248px; }
  .main-content { margin-left: 248px; }
  .page-body { padding: 52px 55px 30px; }
  .topbar { padding: 0 55px; }
  .workspace { grid-template-columns: 1fr 1.18fr; gap: 28px; }
  #creation-form { padding: 27px 30px 20px; }
  .form-section { margin-bottom: 27px; }
  .preview-panel { min-height: 675px; }
}
@media (max-width: 1200px) {
  .sidebar { width: 194px; }
  .main-content { margin-left: 194px; }
  .brand { padding-left: 22px; }
  .page-body { padding: 33px 25px 25px; }
  .topbar { padding: 0 25px; }
  .workspace { grid-template-columns: minmax(330px, 1fr) minmax(270px, .9fr); gap: 16px; }
  #creation-form { padding: 20px; }
  .mode-tabs { padding: 0 15px; gap: 12px; }
  .mode-tab > span { display: none; }
  .model-options { gap: 7px; }
  .model-card { padding: 10px 7px; gap: 6px; }
  .model-icon { width: 26px; height: 30px; }
  .model-copy small { font-size: 7px; }
  .recommended { display: none; }
  .advanced-settings { grid-template-columns: .7fr 1fr 1fr; gap: 8px; }
  .toggle-setting small { font-size: 6px; }
  .preview-panel { min-height: 585px; }
  .preview-footer { font-size: 7px; padding: 0 15px; }
  .edition { display: none; }
  .gallery-grid { gap: 12px; }
}
@media (max-width: 960px) {
  .sidebar { width: 70px; }
  .main-content { margin-left: 70px; }
  .brand { padding: 28px 19px; }
  .brand > span:last-child, .nav-caption, .nav-item > span, .sidebar-note, .sidebar-bottom { display: none; }
  .navigation { padding: 0 12px; margin-top: 30px; }
  .nav-item { justify-content: center; padding: 14px 0; }
  .nav-item svg { width: 19px; height: 19px; }
  .workspace { grid-template-columns: 1fr; }
  .creation-panel { max-width: none; }
  .model-options { gap: 15px; }
  .model-card { padding: 14px; gap: 12px; }
  .model-copy strong { font-size: 13px; }
  .model-copy small { font-size: 10px; }
  .recommended { display: inline; }
  .preview-panel { min-height: 600px; }
  .canvas { min-height: 400px; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topbar { height: 62px; }
}
@media (max-width: 600px) {
  .login-card { padding: 30px 22px 24px; }
  .login-field input { padding-right: 92px; }
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: 65px; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); align-items: center; }
  .brand { padding: 0 18px; }
  .brand > span:last-child { display: block; font-size: 13px; }
  .brand > span:last-child > span { font-size: 6px; letter-spacing: 3px; }
  .brand-mark { grid-template-columns: repeat(2, 8px); grid-template-rows: repeat(2, 8px); gap: 2px; }
  .navigation { margin: 0 12px 0 auto; padding: 0; display: flex; gap: 5px; }
  .nav-item { padding: 10px; margin: 0; }
  .nav-item.active { background: transparent; }
  .nav-item svg { width: 18px; height: 18px; }
  .main-content { margin-left: 0; }
  .topbar { height: 45px; padding: 0 18px; }
  .breadcrumb { font-size: 9px; }
  .private-badge { display: none; }
  .docs-link { font-size: 9px; }
  .page-body { padding: 29px 16px 20px; }
  .page-heading { margin-bottom: 23px; }
  .page-heading h1 { font-size: 28px; margin-bottom: 10px; }
  .page-heading > div > p:last-child { font-size: 10px; }
  .page-heading .eyebrow { font-size: 7px; }
  .workspace { gap: 18px; }
  .creation-panel, .preview-panel { border-radius: 10px; }
  .mode-tabs { gap: 15px; }
  #creation-form { padding: 21px 16px 17px; }
  .section-heading h2 { font-size: 12px; }
  .model-options { gap: 8px; }
  .model-card { padding: 11px 8px; gap: 7px; }
  .model-icon { width: 26px; height: 30px; }
  .model-copy strong { font-size: 10px; }
  .model-copy small { font-size: 7px; }
  .recommended { display: none; }
  .advanced-settings { grid-template-columns: .7fr 1fr 1fr; }
  .toggle-setting > span:first-child { font-size: 8px; }
  .toggle-setting small { font-size: 6px; }
  .ratio-options { gap: 3px; }
  .preview-panel { min-height: 480px; }
  .canvas { min-height: 320px; margin: 12px; }
  .empty-art { transform: scale(.85); margin-bottom: 10px; }
  .empty-state h2 { font-size: 12px; }
  .gallery-section { margin-top: 33px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .artwork-copy { padding: 10px; }
  .artwork-meta { font-size: 7px; }
  .artwork-card-actions > span { display: none; }
  .artwork-card-actions { justify-content: flex-end; }
  .page-footer { margin-top: 30px; }
  .page-footer > span:nth-child(2) { display: none; }
  .dialog-close { right: 5px; top: 5px; z-index: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
