@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;600;700;800;900&display=swap");

:root { font-family: "Noto Sans JP", sans-serif; color: #171715; background: #f2f0ea; font-synthesis: none; text-rendering: optimizeLegibility; --ink: #171715; --paper: #f7f5ef; --white: #fffefa; --muted: #76746e; --line: #d7d4cb; --orange: #ff5a1f; --orange-dark: #d9410c; --lime: #c8ef3d; --blue: #4278ff; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
body::before { position: fixed; inset: 0; z-index: 100; pointer-events: none; content: ""; opacity: .038; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='4' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.studio-shell { min-height: 100vh; overflow: hidden; }
.topbar { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto; align-items: center; height: 76px; border-bottom: 1px solid var(--ink); background: rgb(247 245 239 / 92%); padding: 0 max(24px, calc((100vw - 1480px) / 2)); backdrop-filter: blur(16px); }
.logo { display: inline-flex; align-items: center; gap: 12px; width: max-content; }
.logo-image { display: block; width: 54px; height: 54px; flex: 0 0 auto; border-radius: 12px; object-fit: cover; }
.logo-mark { display: grid; width: 39px; height: 39px; place-items: center; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--orange); color: white; box-shadow: 3px 3px 0 var(--ink); }
.logo > span:last-child { display: grid; }
.logo strong { font-size: 16px; font-weight: 900; line-height: 1.1; letter-spacing: -.03em; }
.logo small { margin-top: 4px; font: 500 7px/1 "DM Mono", monospace; letter-spacing: .22em; }
.topnav { display: flex; align-items: center; gap: 34px; font: 500 11px/1 "DM Mono", monospace; letter-spacing: .08em; }
.topnav a, .topnav button { display: flex; align-items: center; gap: 5px; border: 0; background: none; padding: 8px 0; cursor: pointer; }
.topnav a:hover, .topnav button:hover { color: var(--orange); }
.topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.status-pill { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); padding: 8px 12px; color: #53514d; font: 500 9px/1 "DM Mono", monospace; cursor: pointer; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #aaa69d; box-shadow: 0 0 0 3px rgb(170 166 157 / 16%); }
.status-dot.online { background: #64b518; box-shadow: 0 0 0 3px rgb(100 181 24 / 16%); }
.mobile-menu { display: none; border: 0; background: transparent; cursor: pointer; }
main { width: min(1480px, 100%); margin: 0 auto; }
.hero { display: grid; grid-template-columns: 1fr auto; align-items: end; min-height: 295px; padding: 62px clamp(24px, 4vw, 72px) 50px; border-bottom: 1px solid var(--ink); background: var(--paper); }
.kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 19px; color: var(--orange); font: 500 10px/1 "DM Mono", monospace; letter-spacing: .17em; }
.kicker span { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid var(--orange); border-radius: 50%; }
.hero h1 { margin: 0; font-size: clamp(48px, 6vw, 88px); font-weight: 900; line-height: .97; letter-spacing: -.075em; }
.hero h1 em { position: relative; color: var(--orange); font-style: normal; }
.hero h1 em::after { position: absolute; left: 4px; right: -4px; bottom: 1px; z-index: -1; height: 13px; content: ""; background: var(--lime); transform: rotate(-1deg); }
.hero-copy { margin: 26px 0 0; color: #605e58; font-size: 12px; line-height: 1.9; }
.hero-note { position: relative; display: grid; min-width: 235px; border: 1px solid var(--ink); background: var(--white); padding: 20px 22px; box-shadow: 7px 7px 0 var(--ink); transform: rotate(1.2deg); }
.hero-note::before { position: absolute; top: -12px; left: 34%; width: 67px; height: 22px; content: ""; background: rgb(200 239 61 / 78%); transform: rotate(-4deg); }
.hero-note span, .hero-note small { font: 500 8px/1 "DM Mono", monospace; letter-spacing: .14em; }
.hero-note strong { margin: 9px 0 18px; font-size: 21px; line-height: 1.04; letter-spacing: -.05em; }
.hero-note small { color: var(--orange); }
.api-bar { display: grid; grid-template-columns: auto minmax(240px, 1fr) auto; gap: 10px; align-items: center; margin: 24px clamp(24px, 4vw, 72px) 0; border: 1px solid var(--line); background: #ece9e1; padding: 10px; }
.api-label { display: flex; align-items: center; gap: 10px; min-width: 158px; padding: 0 8px; }
.api-label > div { display: grid; gap: 2px; }
.api-label strong { font-size: 11px; }
.api-label small { color: var(--muted); font-size: 8px; }
.api-auto { display: flex; align-items: center; gap: 9px; min-width: 0; border-left: 1px solid #cbc7bc; padding: 2px 14px; color: #4e7720; }
.api-auto > span { display: grid; gap: 2px; }
.api-auto strong { font-size: 10px; }
.api-auto small { color: var(--muted); font-size: 8px; }
.api-bar input { min-width: 0; border: 1px solid #cbc7bc; background: var(--white); padding: 10px 12px; outline: 0; font: 400 11px/1.4 "DM Mono", monospace; }
.api-bar input:focus { border-color: var(--orange); box-shadow: 0 0 0 2px rgb(255 90 31 / 10%); }
.api-bar > button { height: 38px; border: 1px solid var(--ink); background: var(--ink); color: white; padding: 0 17px; font-size: 10px; font-weight: 700; cursor: pointer; }
.api-bar .icon-control { display: grid; width: 42px; place-items: center; background: var(--white); color: var(--ink); padding: 0; }
.workspace { display: grid; grid-template-columns: minmax(300px, .88fr) minmax(340px, 1fr) minmax(300px, .88fr); gap: 0; margin: 24px clamp(24px, 4vw, 72px) 72px; border: 1px solid var(--ink); background: var(--white); box-shadow: 10px 10px 0 #dfdbd1; }
.canvas-panel, .settings-panel, .result-panel { min-width: 0; padding: 28px; }
.settings-panel, .result-panel { border-left: 1px solid var(--ink); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-heading > div { display: grid; gap: 5px; }
.section-heading span { color: var(--orange); font: 500 8px/1 "DM Mono", monospace; letter-spacing: .16em; }
.section-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.04em; }
.section-heading > small { color: var(--muted); font: 400 8px/1 "DM Mono", monospace; }
.dropzone { position: relative; display: grid; width: 100%; min-height: 340px; overflow: hidden; place-items: center; border: 1px dashed #9e9a90; background: #f2f0ea; cursor: pointer; transition: .18s ease; }
.dropzone:hover { border-color: var(--orange); background: #f8eee7; }
.dropzone.has-image { border-style: solid; background: white; }
.image-stage { position: relative; width: 100%; overflow: hidden; background: white; }
.image-stage .dropzone { height: 100%; min-height: 0; }
.image-stage.painting .dropzone { pointer-events: none; }
.image-stage .dropzone > img { max-height: none; }
.brush-canvas { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.brush-canvas.erasing { cursor: cell; }
.dropzone > img { display: block; width: 100%; height: 100%; max-height: 520px; object-fit: contain; }
.dropzone-empty { display: grid; justify-items: center; text-align: center; }
.dropzone-empty > span, .result-frame > div > span { display: grid; width: 56px; height: 56px; margin-bottom: 16px; place-items: center; border: 1px solid var(--ink); border-radius: 50%; background: var(--lime); box-shadow: 4px 4px 0 var(--ink); }
.dropzone-empty strong { font-size: 13px; }
.dropzone-empty small { margin-top: 6px; color: var(--muted); font-size: 10px; }
.replace-badge { position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 5px; border: 1px solid var(--ink); background: rgb(255 254 250 / 94%); padding: 7px 9px; font-size: 9px; font-weight: 700; }
.size-section { margin-top: 27px; }
.field-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.field-title > span { color: var(--muted); font: 500 8px/1 "DM Mono", monospace; letter-spacing: .14em; }
.field-title > strong { font: 500 10px/1 "DM Mono", monospace; }
.size-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.size-card { position: relative; display: grid; min-width: 0; height: 104px; justify-items: center; align-content: center; gap: 7px; border: 1px solid var(--line); background: var(--paper); padding: 8px 4px; cursor: pointer; }
.size-card:hover { border-color: #8f8b82; }
.size-card.active { border-color: var(--ink); background: var(--lime); box-shadow: 2px 2px 0 var(--ink); }
.ratio-shape { display: block; width: auto; height: 26px; max-width: 38px; border: 1px solid var(--ink); background: var(--white); }
.size-card > span:nth-child(2) { display: grid; min-width: 0; }
.size-card strong { font-size: 9px; white-space: nowrap; }
.size-card small { color: var(--muted); font: 400 6px/1.5 "DM Mono", monospace; white-space: nowrap; }
.size-card em { position: absolute; top: 4px; right: 5px; color: #8a867c; font: 400 6px/1 "DM Mono", monospace; font-style: normal; }
.auto-size-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--ink); background: var(--lime); box-shadow: 2px 2px 0 var(--ink); padding: 13px 14px; }
.auto-size-card .ratio-shape { height: 40px; }
.auto-size-card > span:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.auto-size-card strong { font-size: 11px; }
.auto-size-card small { color: #5f6157; font: 400 8px/1.4 "DM Mono", monospace; }
.auto-size-card em { border: 1px solid var(--ink); background: var(--white); padding: 5px 7px; font: 600 7px/1 "DM Mono", monospace; font-style: normal; white-space: nowrap; }
@media (max-width: 420px) { .auto-size-card { grid-template-columns: auto 1fr; } .auto-size-card em { grid-column: 1 / -1; justify-self: stretch; text-align: center; } .auto-size-card strong { font-size: 13px; } .auto-size-card small { font-size: 10px; } }
.field-help { display: flex; align-items: flex-start; gap: 6px; margin: 12px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.field-help svg { flex: 0 0 auto; margin-top: 1px; }
.text-field { display: grid; gap: 8px; margin-bottom: 17px; }
.text-field > span { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; }
.text-field > span small { color: var(--muted); font-size: 8px; font-weight: 400; }
.text-field textarea { width: 100%; resize: vertical; border: 1px solid #c9c5ba; background: #fbfaf5; padding: 12px; outline: 0; font: 400 11px/1.8 "DM Mono", monospace; }
.text-field textarea:focus { border-color: var(--orange); box-shadow: 3px 3px 0 rgb(255 90 31 / 18%); }
.text-field.negative textarea { color: #69665f; font-size: 9px; }
.prompt-field { margin-bottom: 17px; }
.prompt-tag-editor { display: grid; gap: 9px; border: 1px solid #c9c5ba; background: #fbfaf5; padding: 10px; }
.prompt-tag-editor:focus-within { border-color: var(--orange); box-shadow: 3px 3px 0 rgb(255 90 31 / 18%); }
.prompt-tag-editor.compact { border-color: #aeb9d1; background: var(--white); box-shadow: none; }
.prompt-tag-list { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; min-height: 38px; max-height: 240px; overflow-y: auto; }
.prompt-chip { --chip-bg: #eeece6; --chip-border: #8d887d; --chip-text: #3f3c36; display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--chip-border); border-radius: 7px; background: var(--chip-bg); color: var(--chip-text); font: 500 9px/1.2 "DM Mono", monospace; }
.prompt-chip > small { align-self: stretch; display: inline-flex; align-items: center; border-right: 1px solid var(--chip-border); background: rgb(255 255 255 / 42%); padding: 5px 5px; color: inherit; font: 700 6px/1 "Noto Sans JP", sans-serif; white-space: nowrap; }
.prompt-chip > strong { max-width: 240px; overflow: hidden; padding: 5px 3px 5px 6px; font: inherit; text-overflow: ellipsis; white-space: nowrap; }
.prompt-chip > button { align-self: stretch; display: grid; place-items: center; border: 0; background: transparent; padding: 3px 5px; color: inherit; cursor: pointer; }
.prompt-chip > button:hover { background: rgb(20 20 20 / 12%); }
.prompt-chip.fixed { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 65%); }
.prompt-chip > em { align-self: stretch; display: grid; place-items: center; border-left: 1px solid var(--chip-border); padding: 3px 6px; font-size: 6px; font-style: normal; font-weight: 800; letter-spacing: .08em; }
.prompt-chip.character, .prompt-tag-legend .character { --chip-bg: #eadcff; --chip-border: #7953b6; --chip-text: #42236f; }
.prompt-chip.body, .prompt-tag-legend .body { --chip-bg: #ffe0e9; --chip-border: #c14f72; --chip-text: #76243d; }
.prompt-chip.clothing, .prompt-tag-legend .clothing { --chip-bg: #dce9ff; --chip-border: #4774bd; --chip-text: #24477d; }
.prompt-chip.accessory, .prompt-tag-legend .accessory { --chip-bg: #fff0bd; --chip-border: #b37b13; --chip-text: #6c4700; }
.prompt-chip.pose, .prompt-tag-legend .pose { --chip-bg: #d9f2df; --chip-border: #3d9160; --chip-text: #1f603a; }
.prompt-chip.expression, .prompt-tag-legend .expression { --chip-bg: #ffe3cb; --chip-border: #c66a28; --chip-text: #783b12; }
.prompt-chip.setting, .prompt-tag-legend .setting { --chip-bg: #d9f3f2; --chip-border: #398f8b; --chip-text: #1d5f5c; }
.prompt-chip.style, .prompt-tag-legend .style { --chip-bg: #e4e1ff; --chip-border: #6860ba; --chip-text: #3c3679; }
.prompt-chip.other, .prompt-tag-legend .other { --chip-bg: #eeece6; --chip-border: #8d887d; --chip-text: #3f3c36; }
.prompt-tag-legend { display: flex; flex-wrap: wrap; gap: 4px 7px; border-top: 1px solid #ddd8cc; padding-top: 7px; }
.prompt-tag-legend span { display: inline-flex; align-items: center; gap: 4px; color: #68645c; font-size: 6px; }
.prompt-tag-legend span::before { width: 8px; height: 8px; border: 1px solid var(--chip-border); border-radius: 2px; background: var(--chip-bg); content: ""; }
.prompt-tags-empty { display: grid; place-items: center; width: 100%; min-height: 36px; color: var(--muted); font-size: 8px; }
@media (max-width: 420px) {
  .prompt-field > span { align-items: flex-start; gap: 8px; font-size: 13px; }
  .prompt-field > span small { max-width: 58%; font-size: 10px; line-height: 1.4; text-align: right; }
  .prompt-tag-editor { gap: 12px; padding: 12px; }
  .prompt-tag-list { gap: 9px; min-height: 52px; max-height: 360px; }
  .prompt-chip { border-radius: 9px; font-size: 12px; line-height: 1.35; }
  .prompt-chip > small { padding: 8px 7px; font-size: 9px; }
  .prompt-chip > strong { max-width: 205px; padding: 8px 5px 8px 8px; }
  .prompt-chip > button { min-width: 36px; padding: 6px 8px; }
  .prompt-chip > button svg { width: 16px; height: 16px; stroke-width: 2.5; }
  .prompt-chip > em { min-width: 36px; padding: 6px 8px; font-size: 9px; }
  .prompt-tag-legend { gap: 7px 11px; padding-top: 10px; }
  .prompt-tag-legend span { gap: 5px; font-size: 9px; }
  .prompt-tag-legend span::before { width: 11px; height: 11px; }
  .prompt-tags-empty { min-height: 48px; font-size: 11px; }
}
.quick-settings { display: grid; gap: 17px; border-block: 1px solid var(--line); padding: 18px 0; }
.clip-skip-badge { display: flex; align-items: center; gap: 9px; border: 1px solid #b8cf67; background: #f1f8d8; padding: 9px 11px; color: #4e701c; }
.clip-skip-badge > span { display: grid; gap: 2px; }
.clip-skip-badge strong { font-size: 9px; }
.clip-skip-badge small { color: #74834f; font-size: 7px; }
.lora-stack { display: grid; gap: 9px; margin-top: 18px; border: 1px solid var(--ink); background: #f1eee6; padding: 13px; }
.lora-stack-heading > div { display: flex; justify-content: space-between; align-items: center; }
.lora-stack-heading span { color: var(--orange); font: 500 8px/1 "DM Mono", monospace; letter-spacing: .13em; }
.lora-stack-heading strong { font-size: 9px; }
.empty-lora { margin: 4px 0; color: var(--muted); font-size: 9px; text-align: center; }
.active-lora { border: 1px solid var(--line); background: var(--white); padding: 10px; }
.active-lora > header { display: grid; grid-template-columns: 21px minmax(0, 1fr) 25px; align-items: center; gap: 7px; margin-bottom: 10px; }
.active-lora > header > span { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; background: var(--ink); color: white; font: 500 7px/1 "DM Mono", monospace; }
.active-lora > header strong { overflow: hidden; font: 500 8px/1.3 "DM Mono", monospace; text-overflow: ellipsis; white-space: nowrap; }
.active-lora > header button { display: grid; width: 25px; height: 25px; place-items: center; border: 0; background: transparent; color: #9c6654; cursor: pointer; }
.active-lora > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.active-lora .range-field { gap: 6px; }
.active-lora .range-field strong { font-size: 8px; }
.lora-picker { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.lora-picker select, .civitai-add input { min-width: 0; border: 1px solid #c5c1b7; background: var(--white); padding: 8px; outline: 0; font-size: 8px; }
.lora-picker button, .civitai-add button { display: flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--ink); background: var(--white); padding: 7px 9px; font-size: 8px; font-weight: 700; cursor: pointer; }
.civitai-add { display: grid; grid-template-columns: 1fr auto; gap: 6px; border-top: 1px solid #d4d0c6; padding-top: 9px; }
.civitai-add button { background: var(--ink); color: white; }
.civitai-modal > div { grid-template-columns: 1fr; }
.range-field { display: grid; gap: 9px; }
.range-field > span { display: flex; justify-content: space-between; align-items: center; }
.range-field strong { font-size: 10px; }
.range-field output { min-width: 45px; border: 1px solid var(--ink); background: var(--white); padding: 4px 6px; text-align: center; font: 500 9px/1 "DM Mono", monospace; }
.range-field input { width: 100%; height: 4px; appearance: none; border: 0; background: linear-gradient(to right, var(--orange) var(--range-progress), #d9d6cd var(--range-progress)); cursor: pointer; }
.range-field input::-webkit-slider-thumb { width: 16px; height: 16px; appearance: none; border: 1px solid var(--ink); border-radius: 50%; background: var(--white); box-shadow: 2px 2px 0 var(--ink); }
.range-field input::-moz-range-thumb { width: 15px; height: 15px; border: 1px solid var(--ink); border-radius: 50%; background: var(--white); box-shadow: 2px 2px 0 var(--ink); }
.advanced-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 14px 2px; font-size: 10px; font-weight: 700; cursor: pointer; }
.advanced-toggle span { display: flex; align-items: center; gap: 7px; }
.advanced-toggle svg { transition: transform .18s ease; }
.advanced-toggle svg.rotated { transform: rotate(180deg); }
.advanced-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 0; }
.number-field { display: grid; gap: 5px; }
.number-field span { color: #69665f; font-size: 8px; font-weight: 700; }
.number-field input { width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--paper); padding: 8px; outline: 0; font: 500 10px/1 "DM Mono", monospace; }
.number-field input:focus { border-color: var(--orange); }
.message { display: flex; align-items: flex-start; gap: 8px; margin-top: 15px; border-left: 3px solid var(--blue); background: #edf2ff; padding: 10px; color: #344d8f; font-size: 9px; line-height: 1.55; }
.message.error { border-left-color: var(--orange); background: #fff0e9; color: #8b3518; }
.message svg { flex: 0 0 auto; }
.generate-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 64px; margin-top: 18px; border: 1px solid var(--ink); background: var(--orange); color: white; padding: 11px 18px; box-shadow: 5px 5px 0 var(--ink); cursor: pointer; transition: .16s ease; }
.generate-button:hover:not(:disabled) { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); background: var(--orange-dark); }
.generate-button:disabled { opacity: .7; cursor: wait; }
.generate-button > span { display: grid; text-align: left; font-size: 13px; font-weight: 800; }
.generate-button small { margin-top: 4px; font: 400 7px/1 "DM Mono", monospace; letter-spacing: .08em; opacity: .78; }
.result-panel { background: #ebe8df; }
.result-frame { position: relative; display: grid; width: min(100%, 410px); max-height: 620px; overflow: hidden; place-items: center; border: 1px solid var(--ink); background: var(--white); box-shadow: 6px 6px 0 var(--ink); }
.result-frame::before { position: absolute; inset: 0; content: ""; background: radial-gradient(#b8b4aa 0.7px, transparent .7px); background-size: 8px 8px; opacity: .25; }
.result-frame.has-result::before { display: none; }
.result-frame > div:not(.generating-overlay) { position: relative; z-index: 1; display: grid; justify-items: center; padding: 26px; text-align: center; }
.result-frame > div > span { width: 62px; height: 62px; background: var(--white); }
.result-frame strong { font-size: 11px; }
.result-frame small { margin-top: 7px; color: var(--muted); font-size: 8px; }
.result-frame > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.generating-overlay { position: absolute !important; inset: 0; z-index: 5 !important; display: grid !important; align-content: center; place-items: center; background: rgb(23 23 21 / 86%); color: white; }
.generating-overlay strong { margin-top: 13px; color: var(--lime); font: 500 12px/1 "DM Mono", monospace; letter-spacing: .16em; }
.generating-overlay small { color: #c7c4bc; }
.result-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; border-block: 1px solid #c5c1b8; padding: 10px 0; color: var(--muted); font: 400 8px/1 "DM Mono", monospace; }
.result-meta strong { color: var(--ink); }
.download-button { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; border: 1px solid var(--ink); background: var(--white); padding: 12px; font-size: 10px; font-weight: 700; cursor: pointer; }
.download-button:hover:not(.disabled) { background: var(--lime); }
.download-button.disabled { pointer-events: none; opacity: .38; }
footer { display: grid; grid-template-columns: 1fr auto; align-items: center; border-top: 1px solid var(--ink); background: var(--ink); color: white; padding: 24px max(24px, calc((100vw - 1340px) / 2)); }
footer > span { font: 500 9px/1 "DM Mono", monospace; letter-spacing: .13em; }
footer small { color: #a8a69f; font-size: 8px; }
footer button { justify-self: end; display: flex; align-items: center; gap: 6px; border: 1px solid #595851; background: transparent; color: white; padding: 8px 11px; font-size: 9px; cursor: pointer; }
footer button:hover { border-color: var(--lime); color: var(--lime); }
.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgb(23 23 21 / 72%); padding: 20px; backdrop-filter: blur(5px); }
.model-modal { width: min(680px, 100%); max-height: 90vh; overflow-y: auto; border: 1px solid var(--ink); background: var(--paper); padding: 28px; box-shadow: 10px 10px 0 var(--orange); }
.model-modal > header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--ink); padding-bottom: 17px; }
.model-modal > header span { color: var(--orange); font: 500 8px/1 "DM Mono", monospace; letter-spacing: .15em; }
.model-modal h2 { margin: 5px 0 0; font-size: 23px; }
.model-modal > header button { border: 0; background: transparent; cursor: pointer; }
.model-modal > p { color: #605e58; font-size: 10px; line-height: 1.8; }
.check-button { display: flex; align-items: center; gap: 7px; border: 1px solid var(--ink); background: var(--white); padding: 8px 10px; font-size: 9px; font-weight: 700; cursor: pointer; }
.model-list { display: grid; gap: 8px; margin-top: 16px; }
.model-list article { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--white); padding: 11px; }
.model-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #eeeae2; color: #8b877f; }
.model-icon.ok { background: #e7f7c8; color: #4c7919; }
.model-icon svg { width: 15px; }
.model-list article > div { display: grid; min-width: 0; gap: 3px; }
.model-list strong { font-size: 10px; }
.model-list small { overflow: hidden; color: var(--muted); font: 400 7px/1.4 "DM Mono", monospace; text-overflow: ellipsis; }
.model-list em { color: var(--muted); font: 400 8px/1 "DM Mono", monospace; font-style: normal; }
.model-download { margin-top: 23px; border-top: 1px solid var(--ink); padding-top: 19px; }
.model-download h3 { margin: 0 0 10px; font-size: 12px; }
.model-download > div { display: grid; grid-template-columns: 145px 1fr; gap: 7px; }
.model-download select, .model-download input { min-width: 0; border: 1px solid #bdb9af; background: var(--white); padding: 9px; outline: 0; font-size: 9px; }
.model-download > button { display: flex; justify-content: center; align-items: center; gap: 7px; width: 100%; margin-top: 8px; border: 1px solid var(--ink); background: var(--ink); color: white; padding: 11px; font-size: 9px; font-weight: 700; cursor: pointer; }
.model-download > button:disabled { opacity: .6; cursor: wait; }
.spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1120px) { .workspace { grid-template-columns: 1fr 1fr; } .result-panel { grid-column: 1 / -1; border-top: 1px solid var(--ink); border-left: 0; } .result-panel .result-frame { width: min(440px, 100%); margin: 0 auto; } .result-meta, .result-panel .download-button { width: min(440px, 100%); margin-inline: auto; } .result-panel .download-button { margin-top: 14px; } }
@media (max-width: 760px) {
  .topbar { grid-template-columns: 1fr auto; height: 66px; padding-inline: 17px; }
  .topnav { position: absolute; top: 65px; left: 0; right: 0; display: none; align-items: stretch; gap: 0; border-bottom: 1px solid var(--ink); background: var(--paper); padding: 10px 17px 17px; box-shadow: 0 12px 25px rgb(0 0 0 / 9%); }
  .topnav.open { display: grid; } .topnav a, .topnav button { border-bottom: 1px solid var(--line); padding: 14px 4px; } .mobile-menu { display: grid; place-items: center; } .status-pill { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 44px 20px; } .hero h1 { font-size: clamp(47px, 15vw, 68px); } .hero-note { display: none; } .hero-copy br { display: none; }
  .api-bar { grid-template-columns: 1fr auto; margin: 16px 14px 0; } .api-label { grid-column: 1 / -1; } .api-auto { grid-column: 1; border-left: 0; padding-left: 8px; } .api-bar input { grid-column: 1 / -1; } .api-bar > button:not(.icon-control) { grid-column: 1; }
  .workspace { display: block; margin: 16px 14px 50px; box-shadow: 5px 5px 0 #dfdbd1; } .canvas-panel, .settings-panel, .result-panel { padding: 22px 17px; } .settings-panel, .result-panel { border-top: 1px solid var(--ink); border-left: 0; }
  .dropzone { min-height: 300px; } .size-grid { grid-template-columns: repeat(3, minmax(82px, 1fr)); } .size-card { min-width: 67px; } .result-frame { max-height: none; }
  footer { grid-template-columns: 1fr auto; gap: 13px; padding: 22px 17px; } footer small { display: none; }
}
@media (max-width: 420px) { .logo small { display: none; } .hero h1 { font-size: 49px; } .advanced-grid { grid-template-columns: 1fr; } .model-modal { padding: 20px 15px; } .model-list article { grid-template-columns: 34px 1fr; } .model-list em { grid-column: 2; } .model-download > div { grid-template-columns: 1fr; } }

@media (max-width: 420px) { .active-lora > div { grid-template-columns: 1fr; } .lora-picker, .civitai-add { grid-template-columns: 1fr; } }

/* RunPod lifecycle manager */
.pod-modal { width: min(720px, 100%); }
.pod-login { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 16px; }
.pod-login input, .pod-create select { min-width: 0; border: 1px solid #bdb9af; background: var(--white); padding: 10px; outline: 0; font-size: 10px; }
.pod-login button, .pod-create button, .pod-actions button { display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--ink); background: var(--ink); color: white; padding: 10px 13px; font-size: 9px; font-weight: 700; cursor: pointer; }
.pod-login button:disabled, .pod-create button:disabled, .pod-actions button:disabled { opacity: .45; cursor: not-allowed; }
.pod-message { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; border-left: 3px solid var(--blue); background: #edf2ff; padding: 10px; color: #344d8f; font-size: 9px; line-height: 1.5; }
.pod-list { display: grid; gap: 9px; margin-top: 17px; }
.pod-card { border: 1px solid var(--ink); background: var(--white); padding: 13px; }
.pod-card-main { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.pod-card-main > div { display: grid; gap: 3px; min-width: 0; }
.pod-card-main strong { font-size: 11px; }
.pod-card-main small { overflow: hidden; color: var(--muted); font: 400 8px/1.4 "DM Mono", monospace; text-overflow: ellipsis; white-space: nowrap; }
.pod-card-main em { border: 1px solid var(--line); background: var(--paper); padding: 5px 7px; font: 500 8px/1 "DM Mono", monospace; font-style: normal; }
.pod-state { width: 9px; height: 9px; border-radius: 50%; background: #a8a49a; }
.pod-state.running { background: #64b518; box-shadow: 0 0 0 3px rgb(100 181 24 / 15%); }
.pod-meta { display: flex; flex-wrap: wrap; gap: 16px; margin: 11px 0; border-block: 1px solid var(--line); padding: 8px 0; color: var(--muted); font: 400 8px/1 "DM Mono", monospace; }
.pod-meta strong { color: var(--ink); }
.pod-meta a { margin-left: auto; color: var(--blue); text-decoration: underline; }
.pod-actions { display: flex; justify-content: flex-end; gap: 7px; }
.pod-actions button { background: var(--white); color: var(--ink); padding: 8px 11px; }
.pod-actions button.danger { border-color: #aa3d1d; color: #aa3d1d; }
.pod-empty { margin: 0; border: 1px dashed var(--line); padding: 18px; color: var(--muted); font-size: 9px; text-align: center; }
.pod-create { display: grid; grid-template-columns: 1fr 230px; gap: 9px; margin-top: 20px; border-top: 1px solid var(--ink); padding-top: 18px; }
.pod-create > div { display: grid; grid-row: span 2; gap: 4px; }
.pod-create > div > span { color: var(--orange); font: 500 8px/1 "DM Mono", monospace; letter-spacing: .12em; }
.pod-create > div strong { font-size: 12px; }
.pod-create > div small { color: var(--muted); font-size: 8px; }
.pod-create button { background: var(--orange); }
.pod-warning { grid-column: 2; color: #a34a2d; font-size: 8px; line-height: 1.5; }
.terminate-warning { margin: 17px 0 0 !important; border: 1px solid #e1bcae; background: #fff0e9; padding: 9px; color: #8b3518 !important; font-size: 8px !important; line-height: 1.6 !important; }
@media (max-width: 620px) { .pod-create { grid-template-columns: 1fr; } .pod-create > div { grid-row: auto; } .pod-warning { grid-column: 1; } .pod-meta a { width: 100%; margin-left: 0; } }

.mask-tools { display: grid; gap: 11px; margin-top: 13px; border: 1px solid var(--ink); background: #fff2f8; padding: 12px; }
.mask-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.mask-toggle input { width: 17px; height: 17px; accent-color: var(--orange); }
.mask-toggle > span { display: grid; gap: 3px; }
.mask-toggle strong { font-size: 10px; }
.mask-toggle small { color: var(--muted); font-size: 8px; }
.mask-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border-top: 1px solid #e2b8ca; padding-top: 11px; }
.mask-color { display: grid; gap: 5px; }
.mask-color span { color: #69665f; font-size: 8px; font-weight: 700; }
.mask-color input { width: 100%; height: 36px; border: 1px solid var(--line); background: var(--white); padding: 3px; cursor: pointer; }
.mask-actions { display: grid; grid-template-columns: repeat(3, 1fr); align-self: end; gap: 4px; }
.mask-actions button { border: 1px solid var(--ink); background: var(--white); padding: 8px 3px; font-size: 8px; font-weight: 700; cursor: pointer; }
.mask-actions button.active { background: var(--ink); color: white; }
.mask-tools > p { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: #7c4960; font-size: 8px; line-height: 1.55; }
.mask-tools > p svg { flex: 0 0 auto; margin-top: 1px; }
@media (max-width: 420px) { .mask-settings { grid-template-columns: 1fr; } }

.tagger-tools { display: grid; gap: 10px; margin-top: 13px; border: 1px solid var(--ink); background: #eef3ff; padding: 12px; }
.tagger-tools > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tagger-tools > header > span { display: flex; align-items: center; gap: 8px; }
.tagger-tools > header > span > span { display: grid; gap: 2px; }
.tagger-tools strong { font-size: 10px; }
.tagger-tools small { color: var(--muted); font-size: 8px; }
.tagger-tools > header > button { display: flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--ink); background: var(--ink); color: white; padding: 8px 9px; font-size: 8px; font-weight: 700; cursor: pointer; }
.tagger-tools > header > button:disabled { opacity: .55; cursor: wait; }
.tagger-tools > p { margin: 0; color: #4d5f88; font-size: 8px; line-height: 1.55; }
.sub-reference { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.sub-reference > button:first-child { min-height: 96px; overflow: hidden; border: 1px dashed #8296c1; background: var(--white); padding: 0; cursor: pointer; }
.sub-reference > button:first-child > img { display: block; width: 100%; height: 110px; object-fit: contain; }
.sub-reference > button:first-child > span { display: grid; justify-items: center; gap: 4px; color: #344d8f; }
.sub-reference > button:first-child strong { font-size: 9px; }
.sub-reference > button:first-child small { font-size: 7px; }
.sub-reference > button:last-child { align-self: stretch; display: flex; align-items: center; gap: 4px; border: 1px solid #8296c1; background: var(--white); padding: 8px; color: #344d8f; font-size: 8px; cursor: pointer; }
.tagger-tools textarea { width: 100%; resize: vertical; border: 1px solid #aeb9d1; background: var(--white); padding: 9px; outline: 0; font: 400 9px/1.65 "DM Mono", monospace; }
.tagger-tools textarea:focus { border-color: var(--blue); }
.character-tags { display: grid; gap: 6px; border-block: 1px solid #bdc8de; padding: 8px 0; }
.character-tags > strong { color: #344d8f; font-size: 8px; }
.character-tags > div { display: flex; flex-wrap: wrap; gap: 5px; }
.character-tags span { border: 1px solid #8296c1; border-radius: 999px; background: var(--white); padding: 5px 7px; color: #344d8f; font: 500 8px/1 "DM Mono", monospace; }
.character-tags span small { margin-left: 3px; color: var(--muted); font-size: 7px; }
@media (max-width: 420px) { .tagger-tools > header { align-items: stretch; flex-direction: column; } .tagger-tools > header > button { width: 100%; } }

/* Tonari SaaS interface */
:root {
  --ink: #172033;
  --muted: #667085;
  --line: #e4e7ec;
  --white: #ffffff;
  --blue: #5b5ce2;
  --orange: #6d5dfc;
  --paper: #f7f8fc;
}

html { background: #f7f8fc; }
body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgb(109 93 252 / 8%), transparent 26rem),
    radial-gradient(circle at 92% 10%, rgb(47 128 237 / 7%), transparent 24rem),
    #f7f8fc;
  color: #172033;
  font-family: "Noto Sans JP", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body::before { display: none; }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgb(91 92 226 / 22%);
  outline-offset: 2px;
}

.studio-shell { min-height: 100vh; background: transparent; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  max-width: none;
  height: 72px;
  border-bottom: 1px solid rgb(228 231 236 / 90%);
  background: rgb(255 255 255 / 88%);
  padding: 0 max(24px, calc((100vw - 1440px) / 2));
  box-shadow: 0 1px 2px rgb(16 24 40 / 3%);
  backdrop-filter: blur(18px);
}
.logo { gap: 11px; color: #172033; }
.logo-mark {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(145deg, #7567ff, #4c4dd0);
  color: white;
  box-shadow: 0 7px 18px rgb(91 92 226 / 25%);
}
.logo > span:last-child { gap: 0; }
.logo strong { font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.logo small { color: #98a2b3; font: 700 7px/1.2 "DM Mono", monospace; letter-spacing: .14em; }
.topnav { gap: 5px; }
.topnav a, .topnav button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 9px 12px;
  color: #475467;
  font-size: 12px;
  font-weight: 600;
}
.topnav a:hover, .topnav button:hover { background: #f2f4f7; color: #172033; }
.status-pill {
  gap: 8px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: white;
  padding: 8px 12px;
  color: #475467;
  font: 700 10px/1 "DM Mono", monospace;
  box-shadow: 0 1px 2px rgb(16 24 40 / 4%);
}
.status-dot { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #d0d5dd; box-shadow: none; }
.status-dot.online { background: #12b76a; box-shadow: 0 0 0 4px rgb(18 183 106 / 12%); }
.mobile-menu { border: 1px solid #e4e7ec; border-radius: 9px; background: white; }

main { width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding: 40px 0 72px; }
.hero {
  align-items: center;
  min-height: 0;
  margin-bottom: 24px;
  border: 1px solid #e4e7ec;
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgb(255 255 255 / 98%), rgb(248 249 255 / 95%)),
    white;
  padding: 42px 48px;
  box-shadow: 0 16px 48px rgb(16 24 40 / 6%);
  overflow: hidden;
}
.kicker { margin-bottom: 15px; color: #5b5ce2; font: 700 10px/1 "DM Mono", monospace; letter-spacing: .14em; }
.kicker span { border: 0; border-radius: 999px; background: #eeecff; padding: 6px 9px; color: #5145cd; }
.hero h1 { margin: 0; color: #101828; font-size: clamp(31px, 4vw, 54px); font-weight: 800; line-height: 1.18; letter-spacing: -.055em; }
.hero h1 em { color: #5b5ce2; font-style: normal; }
.hero h1 em::after { display: none; }
.hero-copy { margin: 20px 0 0; color: #667085; font-size: 14px; line-height: 1.85; }
.hero-note {
  min-width: 280px;
  border: 1px solid #dedcff;
  border-radius: 18px;
  background: linear-gradient(145deg, #f7f6ff, #eef4ff);
  padding: 26px;
  color: #363f72;
  box-shadow: none;
}
.hero-note::before { display: none; }
.hero-note span, .hero-note small { color: #7f86a3; font: 700 8px/1.4 "DM Mono", monospace; letter-spacing: .12em; }
.hero-note strong { margin: 12px 0 16px; color: #344054; font-size: 20px; line-height: 1.35; letter-spacing: -.02em; }

.api-bar {
  min-height: 74px;
  margin-bottom: 24px;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  background: white;
  padding: 14px 18px;
  box-shadow: 0 4px 14px rgb(16 24 40 / 4%);
}
.api-label, .api-auto { gap: 12px; }
.api-label strong, .api-auto strong { color: #344054; font-size: 11px; }
.api-label small, .api-auto small { color: #98a2b3; font-size: 9px; }
.api-auto { border-left: 1px solid #e4e7ec; padding-left: 22px; color: #5b5ce2; }
.api-bar > button {
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  background: white;
  padding: 9px 13px;
  color: #344054;
  font-size: 10px;
  font-weight: 700;
}
.api-bar > button:hover { background: #f9fafb; }

.workspace {
  align-items: start;
  grid-template-columns: minmax(420px, 1.15fr) minmax(360px, .85fr);
  gap: 20px;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.canvas-panel { grid-column: 1; grid-row: 1; }
.settings-panel { grid-column: 1; grid-row: 2; }
.result-panel { grid-column: 2; grid-row: 1 / span 2; }
.canvas-panel, .settings-panel, .result-panel {
  border: 1px solid #e4e7ec;
  border-radius: 20px;
  background: white;
  padding: 22px;
  box-shadow: 0 10px 30px rgb(16 24 40 / 5%);
}
.canvas-panel, .settings-panel { display: grid; gap: 20px; }
.result-panel { padding: 22px; }
.section-heading { align-items: center; margin: 0; border: 0; padding: 0 0 2px; }
.section-heading > div { gap: 4px; }
.section-heading span { color: #7f56d9; font: 700 9px/1 "DM Mono", monospace; letter-spacing: .1em; }
.section-heading h2 { color: #101828; font-size: 18px; font-weight: 750; letter-spacing: -.025em; }
.section-heading > small { border: 1px solid #e4e7ec; border-radius: 999px; background: #f9fafb; padding: 6px 8px; color: #98a2b3; font: 700 7px/1 "DM Mono", monospace; }

.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.upload-card { display: grid; align-content: start; gap: 10px; min-width: 0; }
.upload-card > header { display: flex; align-items: center; gap: 9px; }
.upload-card > header > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: #f0efff;
  color: #5b5ce2;
  font: 800 8px/1 "DM Mono", monospace;
}
.upload-card > header > div { display: grid; gap: 2px; min-width: 0; }
.upload-card > header strong { color: #344054; font-size: 11px; }
.upload-card > header small { overflow: hidden; color: #98a2b3; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.image-stage { min-height: 246px; border: 0; border-radius: 14px; background: #f9fafb; overflow: hidden; }
.image-stage .dropzone, .dropzone {
  min-height: 246px;
  border: 1.5px dashed #cfd4dc;
  border-radius: 14px;
  background: #fafbfc;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.dropzone:hover { border-color: #7f76f5; background: #f7f6ff; transform: translateY(-1px); }
.dropzone.has-image { border-style: solid; border-color: #d0d5dd; background: #f2f4f7; }
.image-stage .dropzone > img, .dropzone > img { width: 100%; height: 100%; object-fit: contain; }
.dropzone-empty { gap: 9px; padding: 18px; color: #667085; text-align: center; }
.dropzone-empty > span { width: 44px; height: 44px; border: 0; border-radius: 12px; background: #eeecff; color: #5b5ce2; }
.dropzone-empty strong { color: #344054; font-size: 10px; }
.dropzone-empty small { color: #98a2b3; font-size: 8px; line-height: 1.6; }
.replace-badge { right: 9px; bottom: 9px; border: 1px solid rgb(255 255 255 / 75%); border-radius: 8px; background: rgb(23 32 51 / 82%); padding: 6px 8px; color: white; font-size: 8px; backdrop-filter: blur(8px); }
.remove-reference {
  justify-self: start;
  border: 0;
  background: transparent;
  padding: 0;
  color: #667085;
  font-size: 8px;
  font-weight: 600;
}
.remove-reference:hover { color: #d92d20; }

.tagger-tools {
  gap: 10px;
  margin: 0;
  border: 1px solid #dedcff;
  border-radius: 14px;
  background: #f8f7ff;
  padding: 14px;
}
.tagger-tools > header > span { color: #5145cd; }
.tagger-tools strong { color: #344054; font-size: 10px; }
.tagger-tools small { color: #7f86a3; font-size: 8px; }
.tagger-tools > header > button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: #5b5ce2;
  padding: 9px 14px;
  color: white;
  font-size: 9px;
  box-shadow: 0 5px 13px rgb(91 92 226 / 20%);
}
.tagger-tools > header > button:hover:not(:disabled) { background: #4c4dd0; }
.tagger-tools > p { color: #667085; font-size: 8px; }
.character-tags { border-color: #dedcff; }
.character-tags span { border-color: #c7c3ff; background: white; color: #5145cd; }

.size-section { gap: 9px; margin: 0; border: 0; padding: 0; }
.field-title > span { color: #667085; font-size: 9px; font-weight: 700; letter-spacing: 0; }
.field-title > strong { color: #344054; font: 700 9px/1 "DM Mono", monospace; }
.auto-size-card { min-height: 70px; border: 1px solid #e4e7ec; border-radius: 12px; background: #f9fafb; padding: 12px; }
.auto-size-card .ratio-shape { border: 2px solid #5b5ce2; background: #eeecff; }
.auto-size-card strong { color: #344054; font-size: 10px; }
.auto-size-card small { color: #98a2b3; font-size: 8px; }
.auto-size-card em { border-radius: 999px; background: #eeecff; padding: 5px 7px; color: #5145cd; font-size: 7px; }

.text-field { gap: 8px; }
.text-field > span { color: #344054; font-size: 10px; font-weight: 700; }
.text-field > span small { color: #98a2b3; font-size: 8px; font-weight: 500; }
.text-field textarea { border: 1px solid #d0d5dd; border-radius: 11px; background: white; padding: 12px; color: #344054; font-size: 10px; box-shadow: 0 1px 2px rgb(16 24 40 / 3%); }
.text-field textarea:focus { border-color: #7f76f5; box-shadow: 0 0 0 3px rgb(91 92 226 / 10%); }
.text-field.negative textarea { background: #fcfcfd; }
.prompt-tag-editor { gap: 10px; border: 1px solid #d0d5dd; border-radius: 12px; background: #fcfcfd; padding: 11px; box-shadow: 0 1px 2px rgb(16 24 40 / 3%); }
.prompt-tag-editor:focus-within { border-color: #7f76f5; box-shadow: 0 0 0 3px rgb(91 92 226 / 10%); }
.prompt-tag-list { gap: 6px; min-height: 72px; max-height: 250px; }
.prompt-chip { border-radius: 7px; font-size: 8px; }
.prompt-chip > small { padding: 6px; }
.prompt-chip > strong { max-width: 190px; padding: 6px; }
.prompt-tag-legend { border-color: #eaecf0; }

.strength-settings {
  display: grid;
  gap: 8px;
  border: 1px solid #dedcff;
  border-radius: 14px;
  background: #f8f7ff;
  padding: 14px;
}
.strength-settings > small { color: #7f86a3; font-size: 8px; line-height: 1.5; }
.range-field { display: grid; gap: 9px; min-width: 0; }
.range-field > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.range-field > span strong { color: #344054; font-size: 9px; }
.range-field output {
  min-width: 42px;
  border-radius: 7px;
  background: #eeecff;
  padding: 5px 7px;
  color: #5145cd;
  font: 800 9px/1 "DM Mono", monospace;
  text-align: center;
}
.range-field input[type="range"] {
  width: 100%;
  height: 20px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.range-field input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6252f2 0 var(--range-progress), #e4e7ec var(--range-progress) 100%);
}
.range-field input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  appearance: none;
  border: 3px solid white;
  border-radius: 50%;
  background: #6252f2;
  box-shadow: 0 1px 4px rgb(16 24 40 / 28%);
}
.range-field input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: #e4e7ec; }
.range-field input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: #6252f2; }
.range-field input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border: 3px solid white; border-radius: 50%; background: #6252f2; box-shadow: 0 1px 4px rgb(16 24 40 / 28%); }

.lora-stack { gap: 12px; border: 1px solid #e4e7ec; border-radius: 14px; background: #fcfcfd; padding: 14px; }
.lora-stack-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lora-stack-heading > div { display: grid; gap: 3px; }
.lora-stack-heading span { color: #7f56d9; font: 700 8px/1 "DM Mono", monospace; letter-spacing: .08em; }
.lora-stack-heading strong { color: #344054; font-size: 12px; }
.lora-stack-heading > small { border-radius: 999px; background: #f0efff; padding: 6px 8px; color: #5145cd; font-size: 8px; font-weight: 700; }
.active-lora { border: 1px solid #dedcff; border-radius: 11px; background: white; padding: 11px; box-shadow: 0 2px 8px rgb(16 24 40 / 3%); }
.active-lora > header { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 9px; }
.active-lora > header > span { border: 0; border-radius: 7px; background: #eeecff; color: #5145cd; }
.active-lora > header > div { display: grid; gap: 2px; min-width: 0; }
.active-lora > header strong { color: #344054; font-size: 9px; }
.active-lora > header small { color: #98a2b3; font-size: 7px; }
.active-lora > header button { border-radius: 7px; color: #98a2b3; }
.active-lora > header button:hover { background: #fef3f2; color: #d92d20; }
.lora-strength { width: 150px; }
.lora-strength > span strong { color: #667085; font-size: 7px; }
.lora-strength output { min-width: 38px; padding: 4px 6px; font-size: 8px; }
.lora-picker { display: grid; grid-template-columns: 1fr; gap: 6px; }
.lora-picker > span { color: #667085; font-size: 8px; font-weight: 700; }
.lora-picker select { width: 100%; min-height: 42px; border: 1px solid #d0d5dd; border-radius: 9px; background: white; padding: 0 11px; color: #344054; font-size: 9px; }
.empty-lora { border-radius: 9px; background: #f2f4f7; color: #667085; }

.message { border: 1px solid #b2ddff; border-radius: 11px; background: #eff8ff; padding: 11px 12px; color: #175cd3; font-size: 9px; line-height: 1.6; }
.message.error { border-color: #fecdca; background: #fef3f2; color: #b42318; }
.generate-button {
  min-height: 66px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #6d5dfc, #4f46c9);
  padding: 14px 18px;
  color: white;
  box-shadow: 0 12px 24px rgb(91 92 226 / 24%);
}
.generate-button:hover:not(:disabled) { background: linear-gradient(135deg, #6252f2, #4344bd); transform: translateY(-1px); box-shadow: 0 15px 28px rgb(91 92 226 / 29%); }
.generate-button > span { gap: 3px; font-size: 13px; }
.generate-button small { color: rgb(255 255 255 / 72%); font-size: 7px; }

.result-panel { display: grid; align-content: start; gap: 16px; }
.result-ready { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; background: #ecfdf3; padding: 6px 8px; color: #027a48 !important; font-size: 8px !important; }
.result-frame { min-height: 420px; border: 1px solid #e4e7ec; border-radius: 14px; background: #f9fafb; }
.result-frame::before { display: none; }
.result-frame > div:not(.generating-overlay) { gap: 10px; color: #98a2b3; }
.result-frame > div > span { border: 0; border-radius: 12px; background: #eeecff; color: #5b5ce2; }
.result-frame strong { color: #475467; font-size: 11px; text-align: center; }
.result-frame small { max-width: 210px; color: #98a2b3; font-size: 8px; line-height: 1.6; text-align: center; }
.result-frame > img { object-fit: contain; }
.generating-overlay { background: rgb(23 32 51 / 82%); backdrop-filter: blur(6px); }
.result-meta { border-radius: 10px; background: #f9fafb; color: #667085; }
.download-button { min-height: 45px; border: 1px solid #d0d5dd; border-radius: 10px; background: white; color: #344054; font-size: 10px; box-shadow: 0 1px 2px rgb(16 24 40 / 4%); }
.download-button:hover:not(.disabled) { border-color: #7f76f5; background: #f8f7ff; color: #5145cd; }

footer { width: min(1440px, calc(100% - 48px)); margin: 0 auto; border-top: 1px solid #e4e7ec; padding: 24px 0 36px; color: #667085; }
footer > span { color: #344054; font-size: 13px; font-weight: 800; letter-spacing: -.02em; }
footer small { color: #98a2b3; }
footer button { border: 1px solid #d0d5dd; border-radius: 9px; background: white; color: #475467; }

.modal-backdrop { background: rgb(16 24 40 / 52%); backdrop-filter: blur(5px); }
.model-modal { border: 1px solid #e4e7ec; border-radius: 20px; background: white; box-shadow: 0 28px 80px rgb(16 24 40 / 24%); }
.model-modal > header { border-color: #e4e7ec; }
.model-modal h2 { color: #101828; font-size: 20px; }
.model-modal > header span { color: #7f56d9; }
.model-list article { border: 1px solid #e4e7ec; border-radius: 11px; background: #fcfcfd; }
.check-button { border: 0; border-radius: 9px; background: #5b5ce2; color: white; }

@media (max-width: 1240px) {
  .workspace { grid-template-columns: minmax(420px, 1fr) minmax(340px, .8fr); }
}

@media (max-width: 840px) {
  .topbar { padding-inline: 20px; }
  main { width: min(100% - 28px, 720px); padding-top: 22px; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 30px; }
  .hero-note { min-width: 0; }
  .api-bar { grid-template-columns: 1fr auto; }
  .api-auto { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .canvas-panel, .settings-panel, .result-panel { grid-column: auto; grid-row: auto; }
  .result-frame { min-height: 420px; }
  footer { width: calc(100% - 28px); }
}

@media (max-width: 600px) {
  .topbar { height: 64px; padding-inline: 10px; }
  .logo small { display: none; }
  .topnav { top: 64px; right: 14px; left: 14px; border: 1px solid #e4e7ec; border-radius: 12px; background: white; padding: 8px; box-shadow: 0 16px 32px rgb(16 24 40 / 14%); }
  .topnav a, .topnav button { width: 100%; text-align: left; }
  .status-pill { padding: 7px 9px; font-size: 8px; }
  main { width: calc(100% - 16px); padding: 10px 0 40px; }
  .hero { margin-bottom: 8px; border-radius: 13px; padding: 20px 14px; }
  .hero h1 { font-size: 29px; }
  .hero-copy { font-size: 12px; }
  .api-bar { margin: 0 0 8px; border-radius: 12px; padding: 12px; }
  .api-bar > button { padding: 8px; font-size: 0; }
  .api-bar > button svg { margin: 0; }
  .workspace { display: grid; gap: 10px; margin: 0; border: 0; box-shadow: none; }
  .canvas-panel, .settings-panel, .result-panel { border-radius: 13px; padding: 14px; }
  .upload-grid { grid-template-columns: 1fr; gap: 18px; }
  .image-stage, .image-stage .dropzone, .dropzone { min-height: 250px; }
  .tagger-tools > header { align-items: stretch; flex-direction: column; }
  .tagger-tools > header > button { width: 100%; }
  .active-lora > header { grid-template-columns: auto minmax(0, 1fr) auto; }
  .lora-strength { grid-column: 2 / -1; width: 100%; }
  .prompt-chip > strong { max-width: 210px; }
  .result-frame { min-height: 360px; }
  footer { width: calc(100% - 16px); flex-wrap: wrap; gap: 10px; }
  footer small { order: 3; width: 100%; }
}

/* Tonari dark studio */
:root {
  color-scheme: dark;
  --ink: #f3f4f5;
  --muted: #9ba3aa;
  --line: #2b3137;
  --white: #171b1f;
  --paper: #0c0f12;
  --blue: #cbd2d8;
  --orange: #cbd2d8;
}
html, body { background: #0c0f12; }
body {
  background: #0c0f12;
  color: #e8eaec;
}
button, input, select, textarea { color-scheme: dark; }
button:focus-visible, a:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-visible {
  outline-color: rgb(210 216 221 / 35%);
}
.studio-shell { background: #0c0f12; }
.topbar {
  border-color: #252a2f;
  background: rgb(12 15 18 / 94%);
  box-shadow: none;
}
.logo { color: #f4f5f6; }
.logo-mark {
  border: 1px solid #343b42;
  border-radius: 8px;
  background: #1b2025;
  color: #e7eaed;
  box-shadow: none;
}
.logo strong { color: #f4f5f6; }
.logo small { color: #737d86; }
.topnav a, .topnav button { color: #aab1b7; }
.topnav a:hover, .topnav button:hover { background: #1a1f24; color: #fff; }
.status-pill { border-color: #30363c; background: #15191d; color: #c5cbd0; box-shadow: none; }
.status-dot { background: #59616a; }
.status-dot.online { background: #7ab58b; box-shadow: 0 0 0 3px rgb(122 181 139 / 13%); }
.mobile-menu { display: none !important; }

main { padding-top: 28px; }
.workspace { gap: 14px; }
.canvas-panel, .settings-panel, .result-panel {
  border-color: #292f35;
  border-radius: 10px;
  background: #14181c;
  box-shadow: none;
}
.section-heading span { color: #8d969e; }
.section-heading h2 { color: #f3f4f5; }
.section-heading > small { border-color: #30363c; background: #1b2025; color: #8d969e; }

.upload-card > header > span { border-radius: 6px; background: #242a30; color: #d4d8dc; }
.upload-card > header strong { color: #e5e8ea; }
.upload-card > header small { color: #7f8992; }
.image-stage { border-radius: 8px; background: #101316; }
.image-stage .dropzone, .dropzone {
  border-color: #3a4249;
  border-radius: 8px;
  background: #101316;
}
.dropzone:hover { border-color: #7f8992; background: #171c20; transform: none; }
.dropzone.has-image { border-color: #343b42; background: #0f1215; }
.dropzone-empty { color: #9da5ac; }
.dropzone-empty > span { border-radius: 8px; background: #22282e; color: #d4d8dc; }
.dropzone-empty strong { color: #dfe2e4; }
.dropzone-empty small { color: #7f8992; }
.replace-badge { border-color: #3b434a; border-radius: 5px; background: rgb(10 12 14 / 88%); }
.remove-reference { color: #929aa2; }

.tagger-tools, .strength-settings {
  border-color: #2e353b;
  border-radius: 8px;
  background: #181d21;
}
.tagger-tools > header > span { color: #c6ccd1; }
.tagger-tools strong, .strength-settings .range-field > span strong { color: #e1e4e6; }
.tagger-tools small, .tagger-tools > p, .strength-settings > small { color: #8e979f; }
.tagger-tools > header > button {
  border: 1px solid #d8dde1;
  border-radius: 6px;
  background: #e5e8ea;
  color: #101316;
  box-shadow: none;
}
.tagger-tools > header > button:hover:not(:disabled) { background: #fff; }
.character-tags { border-color: #353c43; }
.character-tags span { border-color: #4a535b; background: #20262b; color: #d9dde0; }

.field-title > span, .text-field > span { color: #d9dde0; }
.field-title > strong, .text-field > span small { color: #8d969e; }
.auto-size-card {
  border-color: #30363c;
  border-radius: 7px;
  background: #181d21;
}
.auto-size-card .ratio-shape { border-color: #b8c0c7; background: #2a3036; }
.auto-size-card strong { color: #e0e3e5; }
.auto-size-card small { color: #848e96; }
.auto-size-card em { background: #242a30; color: #bfc5ca; }

.text-field textarea, .prompt-tag-editor {
  border-color: #343b42;
  border-radius: 7px;
  background: #101316;
  color: #e1e4e6;
  box-shadow: none;
}
.text-field textarea:focus, .prompt-tag-editor:focus-within {
  border-color: #727c85;
  box-shadow: 0 0 0 2px rgb(190 198 205 / 8%);
}
.text-field.negative textarea { background: #111417; color: #b8bec3; }
.prompt-tag-legend { border-color: #30363c; }
.prompt-tag-legend span { color: #9ba3aa; }
.prompt-tags-empty { color: #818a92; }
.prompt-chip { --chip-bg: #24292e; --chip-border: #50585f; --chip-text: #d5d9dc; }
.prompt-chip.character, .prompt-tag-legend .character { --chip-bg: #282431; --chip-border: #5e566d; --chip-text: #d5cedf; }
.prompt-chip.body, .prompt-tag-legend .body { --chip-bg: #302529; --chip-border: #685158; --chip-text: #decfd3; }
.prompt-chip.clothing, .prompt-tag-legend .clothing { --chip-bg: #222a31; --chip-border: #506170; --chip-text: #cad5de; }
.prompt-chip.accessory, .prompt-tag-legend .accessory { --chip-bg: #302c22; --chip-border: #675f49; --chip-text: #ddd6c3; }
.prompt-chip.pose, .prompt-tag-legend .pose { --chip-bg: #222d29; --chip-border: #4b665c; --chip-text: #c8d9d2; }
.prompt-chip.expression, .prompt-tag-legend .expression { --chip-bg: #302820; --chip-border: #695a48; --chip-text: #ded3c5; }
.prompt-chip.setting, .prompt-tag-legend .setting { --chip-bg: #202c2d; --chip-border: #4b6466; --chip-text: #c6d9da; }
.prompt-chip.style, .prompt-tag-legend .style { --chip-bg: #272631; --chip-border: #58576a; --chip-text: #d0cfdd; }
.prompt-chip.other, .prompt-tag-legend .other { --chip-bg: #24292e; --chip-border: #50585f; --chip-text: #d5d9dc; }
.prompt-chip > small { background: rgb(255 255 255 / 4%); }
.prompt-chip.fixed { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 5%); }

.range-field output { background: #242a30; color: #e0e4e7; }
.range-field input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, #cbd2d8 0 var(--range-progress), #353c43 var(--range-progress) 100%);
}
.range-field input[type="range"]::-webkit-slider-thumb { border-color: #14181c; background: #eef0f2; box-shadow: none; }
.range-field input[type="range"]::-moz-range-track { background: #353c43; }
.range-field input[type="range"]::-moz-range-progress { background: #cbd2d8; }
.range-field input[type="range"]::-moz-range-thumb { border-color: #14181c; background: #eef0f2; box-shadow: none; }

.lora-stack { border-color: #2e353b; border-radius: 8px; background: #181d21; }
.lora-stack-heading span { color: #8d969e; }
.lora-stack-heading strong, .active-lora > header strong { color: #e1e4e6; }
.lora-stack-heading > small { background: #242a30; color: #b9c0c6; }
.active-lora { border-color: #343b42; border-radius: 7px; background: #111417; box-shadow: none; }
.active-lora > header > span { border-radius: 5px; background: #252b30; color: #cbd1d6; }
.active-lora > header small, .lora-strength > span strong { color: #828c94; }
.active-lora > header button { color: #89929a; }
.active-lora > header button:hover { background: #302126; color: #e6a6af; }
.lora-picker > span { color: #aab1b7; }
.lora-picker select {
  border-color: #343b42;
  border-radius: 6px;
  background: #101316;
  color: #e0e3e5;
}
.empty-lora { background: #20252a; color: #a0a8af; }

.message { border-color: #3b464f; border-radius: 7px; background: #1b2329; color: #c3d1db; }
.message.error { border-color: #654148; background: #291c20; color: #e4b7bd; }
.generate-button {
  border: 1px solid #e1e5e8;
  border-radius: 7px;
  background: #e8ebed;
  color: #0d1012;
  box-shadow: none;
}
.generate-button:hover:not(:disabled) { background: #fff; transform: none; box-shadow: none; }
.generate-button small { color: #596169; }

.result-frame { border-color: #30363c; border-radius: 8px; background: #101316; }
.result-frame > div > span { border-radius: 8px; background: #22282e; color: #d5dade; }
.result-frame strong { color: #d8dcdf; }
.result-frame small { color: #89929a; }
.result-ready { background: #203027; color: #9cc8a8 !important; }
.result-meta { background: #1b2025; color: #9ba3aa; }
.download-button { border-color: #383f46; border-radius: 6px; background: #191e22; color: #d9dde0; box-shadow: none; }
.download-button:hover:not(.disabled) { border-color: #68727b; background: #20262b; color: #fff; }

footer { border-color: #292f35; color: #8e979f; }
footer > span { color: #e1e4e6; }
footer small { color: #737d86; }
footer button { border-color: #343b42; border-radius: 6px; background: #15191d; color: #b5bcc2; }
.modal-backdrop { background: rgb(0 0 0 / 72%); }
.model-modal { border-color: #343b42; border-radius: 10px; background: #14181c; box-shadow: 0 28px 80px rgb(0 0 0 / 45%); }
.model-modal > header { border-color: #2f363c; }
.model-modal h2, .model-modal > p { color: #e7e9eb; }
.model-modal > header span { color: #929ba3; }
.model-list article, .pod-card, .pod-create { border-color: #30373d; background: #191e22; color: #d8dcdf; }
.model-list article small, .pod-card small, .pod-create small { color: #8e979f; }
.check-button, .pod-login button, .pod-create > button { border-radius: 6px; background: #e5e8ea; color: #101316; }
.pod-login input, .pod-create select { border-color: #343b42; background: #101316; color: #e0e3e5; }
.pod-message { border-color: #654148; background: #291c20; color: #e4b7bd; }

@media (max-width: 760px) {
  .topnav { display: none !important; }
  .topbar { grid-template-columns: 1fr auto; }
  .topbar-actions { justify-self: end; }
}

@media (max-width: 600px) {
  .topbar { height: 62px; border-bottom-color: #252a2f; }
  .logo-mark { width: 36px; height: 36px; }
  .logo strong { font-size: 20px; }
  main { padding-top: 10px; }
  .workspace { gap: 10px; }
  .canvas-panel, .settings-panel, .result-panel { padding: 15px; }
  .section-heading h2 { font-size: 20px; }
  .section-heading span { font-size: 10px; }
  .section-heading > small { font-size: 10px; }
  .upload-card > header strong { font-size: 15px; }
  .upload-card > header small { font-size: 11px; }
  .upload-card > header > span { width: 32px; height: 32px; font-size: 10px; }
  .dropzone-empty strong { font-size: 14px; }
  .dropzone-empty small { font-size: 12px; }
  .replace-badge, .remove-reference { font-size: 11px; }
  .tagger-tools { padding: 14px; }
  .tagger-tools strong { font-size: 14px; }
  .tagger-tools small { font-size: 11px; }
  .tagger-tools > p { font-size: 12px; line-height: 1.65; }
  .tagger-tools > header > button { min-height: 44px; font-size: 13px; }
  .field-title > span { font-size: 13px; }
  .field-title > strong { font-size: 12px; }
  .auto-size-card strong { font-size: 14px; }
  .auto-size-card small { font-size: 11px; }
  .auto-size-card em { font-size: 10px; }
  .text-field > span, .prompt-field > span { font-size: 14px; }
  .text-field > span small, .prompt-field > span small { font-size: 11px; }
  .text-field textarea, .text-field.negative textarea { font-size: 14px; line-height: 1.65; }
  .strength-settings > small { font-size: 11px; }
  .range-field > span strong { font-size: 13px; }
  .range-field output { min-width: 48px; font-size: 12px; }
  .lora-stack-heading span { font-size: 10px; }
  .lora-stack-heading strong { font-size: 16px; }
  .lora-stack-heading > small { font-size: 11px; }
  .active-lora > header strong { font-size: 13px; }
  .active-lora > header small { font-size: 10px; }
  .lora-strength > span strong { font-size: 12px; }
  .lora-picker > span { font-size: 12px; }
  .lora-picker select { min-height: 46px; font-size: 14px; }
  .message { font-size: 13px; }
  .generate-button { min-height: 70px; }
  .generate-button > span { font-size: 16px; }
  .generate-button small { font-size: 10px; }
  .result-frame strong { font-size: 14px; }
  .result-frame small { font-size: 12px; }
  .result-ready { font-size: 11px !important; }
  .result-meta { font-size: 11px; }
  .download-button { min-height: 50px; font-size: 14px; }
  footer > span { font-size: 16px; }
  footer small, footer button { font-size: 11px; }
  .model-modal h2 { font-size: 21px; }
  .model-modal > p, .model-list strong, .pod-card strong, .pod-create strong { font-size: 13px; }
  .model-list small, .pod-card small, .pod-create small { font-size: 11px; }
}

/* Indigo palette inspired by NovelAI's visual tone */
:root {
  --ink: #f3f2ff;
  --muted: #a8acd0;
  --line: #34395f;
  --white: #222641;
  --paper: #191b31;
  --blue: #9773ff;
  --orange: #9773ff;
}
html, body, .studio-shell { background: #191b31; }
body { color: #ecebfa; }
.topbar { border-color: #30355a; background: rgb(20 21 54 / 94%); }
.logo-mark { border-color: #4a507b; background: #292d50; color: #c7b9ff; }
.logo strong { color: #faf9ff; }
.logo small { color: #9298c2; }
.topnav a, .topnav button { color: #b6b9d6; }
.topnav a:hover, .topnav button:hover { background: #252947; color: #fff; }
.status-pill { border-color: #42486f; background: #242844; color: #d1d3e6; }
.status-dot { background: #71779b; }
.status-dot.online { background: #74d69a; box-shadow: 0 0 0 3px rgb(116 214 154 / 14%); }

.canvas-panel, .settings-panel, .result-panel {
  border-color: #363c63;
  background: #222641;
}
.section-heading span { color: #aa91ff; }
.section-heading h2 { color: #f7f6ff; }
.section-heading > small { border-color: #41476f; background: #2a2f50; color: #b1b4d1; }
.upload-card > header > span { background: #34395e; color: #d8d0ff; }
.upload-card > header strong { color: #f0effa; }
.upload-card > header small { color: #a2a6ca; }
.image-stage, .image-stage .dropzone, .dropzone { background: #171a30; }
.image-stage .dropzone, .dropzone { border-color: #454b73; }
.dropzone:hover { border-color: #8f78e8; background: #202440; }
.dropzone.has-image { border-color: #41476d; background: #15182d; }
.dropzone-empty { color: #c0c2db; }
.dropzone-empty > span { background: #303555; color: #c8bbff; }
.dropzone-empty strong { color: #efeff8; }
.dropzone-empty small { color: #9da2c5; }
.replace-badge { border-color: #5a6086; background: rgb(20 22 44 / 88%); }
.remove-reference { color: #adb0cd; }

.tagger-tools, .strength-settings, .lora-stack {
  border-color: #3a4069;
  background: #1c2039;
}
.tagger-tools > header > span { color: #b7a5ff; }
.tagger-tools strong, .strength-settings .range-field > span strong { color: #f0eff9; }
.tagger-tools small, .tagger-tools > p, .strength-settings > small { color: #a9accb; }
.tagger-tools > header > button, .check-button, .pod-login button, .pod-create > button {
  border-color: #9773ff;
  background: #9773ff;
  color: #fff;
}
.tagger-tools > header > button:hover:not(:disabled) { background: #a98cff; }
.character-tags { border-color: #464c76; }
.character-tags span { border-color: #5c638f; background: #292e4d; color: #e2ddf5; }

.field-title > span, .text-field > span { color: #e8e7f4; }
.field-title > strong, .text-field > span small { color: #a7aaca; }
.auto-size-card, .active-lora, .model-list article, .pod-card, .pod-create {
  border-color: #3d436b;
  background: #292d4a;
}
.auto-size-card .ratio-shape { border-color: #a890ff; background: #3a3f65; }
.auto-size-card strong, .active-lora > header strong { color: #efeff8; }
.auto-size-card small, .active-lora > header small { color: #a4a8c7; }
.auto-size-card em, .lora-stack-heading > small { background: #393e63; color: #d0c9ed; }

.text-field textarea, .prompt-tag-editor, .lora-picker select, .pod-login input, .pod-create select {
  border-color: #42486f;
  background: #171a30;
  color: #eeedf8;
}
.text-field textarea:focus, .prompt-tag-editor:focus-within, .lora-picker select:focus {
  border-color: #9773ff;
  box-shadow: 0 0 0 2px rgb(151 115 255 / 15%);
}
.text-field.negative textarea { background: #191c34; color: #c8c9dc; }
.prompt-tag-legend { border-color: #3b4168; }
.prompt-tag-legend span { color: #b1b4d0; }
.prompt-tags-empty { color: #999dbf; }

.range-field output { background: #363b61; color: #e1dcf5; }
.range-field input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, #9773ff 0 var(--range-progress), #444a70 var(--range-progress) 100%);
}
.range-field input[type="range"]::-webkit-slider-thumb { border-color: #222641; background: #f4f1ff; }
.range-field input[type="range"]::-moz-range-track { background: #444a70; }
.range-field input[type="range"]::-moz-range-progress { background: #9773ff; }
.range-field input[type="range"]::-moz-range-thumb { border-color: #222641; background: #f4f1ff; }

.lora-stack-heading span { color: #aa91ff; }
.lora-stack-heading strong { color: #f1f0fa; }
.active-lora > header > span { background: #3a3f64; color: #ddd5ff; }
.active-lora > header button { color: #aeb1cc; }
.active-lora > header button:hover { background: #492b47; color: #ffb8ca; }
.lora-picker > span { color: #c1c3d9; }
.empty-lora { background: #2a2f4d; color: #bdc0d6; }

.message { border-color: #46537c; background: #252d50; color: #cbd6f3; }
.message.error { border-color: #784a62; background: #42233a; color: #ffc2d2; }
.generate-button {
  border-color: #9773ff;
  background: #9773ff;
  color: #fff;
}
.generate-button:hover:not(:disabled) { background: #a98cff; }
.generate-button small { color: #e3dcff; }
.result-frame { border-color: #3e446c; background: #171a30; }
.result-frame > div > span { background: #34395d; color: #d8d0ff; }
.result-frame strong { color: #e9e8f5; }
.result-frame small { color: #a3a7c6; }
.result-ready { background: #254434; color: #9ee4b7 !important; }
.result-meta { background: #2a2f4d; color: #b4b7d1; }
.download-button { border-color: #484e76; background: #292d49; color: #e2e2ef; }
.download-button:hover:not(.disabled) { border-color: #816bd3; background: #34385b; color: #fff; }

footer { border-color: #30365b; color: #aaadc9; }
footer > span { color: #efeff8; }
footer small { color: #9095bc; }
footer button { border-color: #42486f; background: #222641; color: #c8cadc; }
.modal-backdrop { background: rgb(10 11 30 / 76%); }
.model-modal { border-color: #42486f; background: #222641; }
.model-modal > header { border-color: #3a4067; }
.model-modal h2, .model-modal > p { color: #f0eff9; }
.model-modal > header span { color: #ad96ff; }
.model-list article small, .pod-card small, .pod-create small { color: #a6a9c8; }
.pod-message { border-color: #784a62; background: #42233a; color: #ffc2d2; }

/* Readable prompt tags */
.prompt-chip { font-size: 10px; line-height: 1.35; }
.prompt-chip > small { padding: 6px; font-size: 7px; }
.prompt-chip > strong { padding: 6px 5px 6px 7px; }
.prompt-chip > em { font-size: 7px; }
.prompt-tag-legend span { font-size: 8px; }

@media (max-width: 600px) {
  .prompt-tag-editor { gap: 12px; padding: 12px; }
  .prompt-tag-list { gap: 9px; min-height: 52px; max-height: 360px; }
  .prompt-chip { border-radius: 8px; font-size: 13px; line-height: 1.4; }
  .prompt-chip > small { padding: 8px 7px; font-size: 10px; }
  .prompt-chip > strong { max-width: 230px; padding: 8px 6px 8px 9px; }
  .prompt-chip > button { min-width: 38px; padding: 6px 9px; }
  .prompt-chip > button svg { width: 17px; height: 17px; stroke-width: 2.5; }
  .prompt-chip > em { min-width: 38px; padding: 6px 8px; font-size: 10px; }
  .prompt-tag-legend { gap: 8px 12px; padding-top: 10px; }
  .prompt-tag-legend span { gap: 6px; font-size: 10px; }
  .prompt-tag-legend span::before { width: 12px; height: 12px; }
  .prompt-tags-empty { min-height: 48px; font-size: 12px; }
}

/* Visual style library */
.style-picker-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  border: 1px solid #4a5079;
  border-radius: 8px;
  background: #292d4a;
  padding: 11px 13px;
  color: #eae9f5;
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, background .16s ease;
}
.style-picker-button:hover { border-color: #9773ff; background: #323754; }
.style-picker-button > svg { color: #baa8ff; }
.style-picker-button > span { display: grid; gap: 3px; }
.style-picker-button strong { font-size: 12px; }
.style-picker-button small { color: #a9accb; font-size: 9px; }
.style-picker-button em {
  border-radius: 999px;
  background: #3a3f64;
  padding: 6px 8px;
  color: #d4cdf0;
  font: 700 8px/1 "DM Mono", monospace;
  font-style: normal;
}

.style-picker-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(980px, calc(100vw - 32px));
  max-height: min(880px, calc(100vh - 32px));
  overflow: hidden;
  border: 1px solid #464c76;
  border-radius: 14px;
  background: #222641;
  box-shadow: 0 28px 80px rgb(8 9 28 / 52%);
}
.style-picker-modal > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #3a4067;
  padding: 20px 22px;
}
.style-picker-modal > header > div { display: grid; gap: 5px; }
.style-picker-modal > header span { color: #ad96ff; font: 700 9px/1 "DM Mono", monospace; letter-spacing: .12em; }
.style-picker-modal > header h2 { margin: 0; color: #f5f4fc; font-size: 22px; }
.style-picker-modal > header p { margin: 0; color: #aeb1cf; font-size: 11px; }
.style-picker-modal > header > button {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #454b72;
  border-radius: 8px;
  background: #292d4a;
  color: #c8cadc;
  cursor: pointer;
}
.style-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding: 18px 22px 22px;
}
.style-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #41476f;
  border-radius: 10px;
  background: #191d35;
  padding: 7px;
  color: #edecf7;
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.style-card:hover { border-color: #7665b6; background: #222743; transform: translateY(-1px); }
.style-card.selected { border-color: #a78bff; background: #2b2850; box-shadow: inset 0 0 0 1px rgb(167 139 255 / 35%); }
.style-preview {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  place-items: center;
  border-radius: 7px;
  background: #11142a;
}
.style-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.style-preview-empty {
  display: grid;
  height: 100%;
  width: 100%;
  place-content: center;
  place-items: center;
  gap: 8px;
  background: linear-gradient(145deg, #171a35, #23264a);
  color: #8d91bd;
}
.style-preview-empty small {
  font: 700 9px/1 "DM Mono", monospace;
  letter-spacing: .12em;
}
.style-preview em {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: #9773ff;
  padding: 6px 8px;
  color: white;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}
.style-card-copy { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 4px; }
.style-card-copy strong { font: 800 13px/1 "DM Mono", monospace; letter-spacing: .02em; }
.style-card-copy small { color: #a6a9c8; font-size: 9px; }
.style-picker-modal > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  border-top: 1px solid #3a4067;
  padding: 14px 22px;
  color: #c3c5dc;
}
.style-picker-modal > footer span { font-size: 11px; font-weight: 700; }
.style-picker-modal > footer button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: #9773ff;
  padding: 0 18px;
  color: white;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 760px) {
  .style-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .style-picker-button { min-height: 70px; }
  .style-picker-button strong { font-size: 14px; }
  .style-picker-button small { font-size: 11px; }
  .style-picker-modal {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 11px;
  }
  .style-picker-modal > header { padding: 16px; }
  .style-picker-modal > header h2 { font-size: 21px; }
  .style-picker-modal > header p { font-size: 12px; line-height: 1.5; }
  .style-card-grid { grid-auto-rows: max-content; align-content: start; gap: 8px; padding: 12px; }
  .style-card { align-self: start; gap: 7px; padding: 5px; }
  .style-preview { aspect-ratio: 1 / 1; }
  .style-preview img { object-fit: contain; }
  .style-card-copy { display: grid; gap: 4px; }
  .style-card-copy strong { font-size: 13px; }
  .style-card-copy small { font-size: 10px; }
  .style-picker-modal > footer { padding: 12px 14px; }
  .style-picker-modal > footer span, .style-picker-modal > footer button { font-size: 12px; }
}
@media (min-width: 841px) {
  .section-heading span { font-size: 11px; }
  .upload-card > header strong { font-size: 14px; }
  .upload-card > header small { font-size: 11px; }
  .dropzone-empty strong, .result-frame strong { font-size: 13px; }
  .dropzone-empty small, .result-frame small { font-size: 11px; }
  .strength-settings > small { font-size: 11px; }
  .range-field > span strong { font-size: 12px; }
  .lora-stack-heading span { font-size: 10px; }
  .lora-stack-heading strong { font-size: 14px; }
  .lora-stack-heading > small { font-size: 10px; }
  .active-lora > header strong { font-size: 12px; }
  .active-lora > header small, .lora-strength > span strong { font-size: 10px; }
  .style-picker-button strong { font-size: 13px; }
  .style-picker-button small { font-size: 11px; }
  .message { font-size: 12px; }
  .generate-button small { font-size: 10px; }
  .download-button { font-size: 12px; }
  .style-card-grid { grid-auto-rows: max-content; align-content: start; }
  .style-card { align-self: start; }
  .style-preview { aspect-ratio: 3 / 4; }
  .style-preview img { object-fit: contain; }
}

@media (max-width: 600px) { .logo-image { width: 46px; height: 46px; border-radius: 10px; } }
/* Tonari landing page */
.lp-hero { position: relative; display: grid; grid-template-columns: minmax(0, .62fr) minmax(600px, 1.38fr); align-items: center; gap: clamp(22px, 3vw, 40px); overflow: hidden; margin: 18px clamp(18px, 4vw, 56px) 0; border: 1px solid #434a76; border-radius: 24px; background: radial-gradient(circle at 12% 18%, rgb(145 100 255 / 22%), transparent 34%), linear-gradient(135deg, #24213f 0%, #1c2039 52%, #242448 100%); padding: clamp(20px, 2.5vw, 38px); box-shadow: 0 32px 90px rgb(5 7 25 / 30%); }
.lp-hero::after { position: absolute; right: -90px; bottom: -130px; width: 320px; height: 320px; border: 1px solid rgb(190 153 255 / 18%); border-radius: 50%; content: ""; box-shadow: 0 0 90px rgb(151 115 255 / 18%); }
.lp-hero-copy { position: relative; z-index: 2; min-width: 0; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 22px; color: #c8b8ff; font: 700 11px/1.2 "DM Mono", monospace; letter-spacing: .12em; }
.lp-hero h1 { max-width: 650px; margin: 0; color: #fff; font-size: clamp(44px, 5vw, 76px); font-weight: 900; line-height: 1.08; letter-spacing: -.065em; }
.lp-hero h1 em { display: block; background: linear-gradient(90deg, #ff81db, #ae8cff 55%, #72d6ff); background-clip: text; color: transparent; font-style: normal; }
.lp-lead { max-width: 600px; margin: 26px 0 0; color: #c0c3df; font-size: 15px; line-height: 1.9; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.lp-primary, .lp-secondary { display: inline-flex; min-height: 54px; align-items: center; justify-content: center; gap: 24px; border-radius: 10px; padding: 0 24px; font-size: 14px; font-weight: 800; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.lp-primary { background: linear-gradient(135deg, #a16eff, #7658ee); color: #fff; box-shadow: 0 14px 30px rgb(118 88 238 / 27%); }
.lp-primary:hover { transform: translateY(-2px); background: linear-gradient(135deg, #b083ff, #8368f2); }
.lp-secondary { border: 1px solid #555d8b; background: rgb(24 28 52 / 46%); color: #e4e4f3; }
.lp-secondary:hover { border-color: #8b78d7; background: #292d51; }
.lp-points { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.lp-points span { display: inline-flex; align-items: center; gap: 7px; color: #aeb3d4; font-size: 11px; font-weight: 650; }
.lp-points span::before { width: 5px; height: 5px; border-radius: 50%; background: #b496ff; content: ""; }
.lp-visual { position: relative; z-index: 1; overflow: hidden; margin: 0; border: 1px solid #5b568e; border-radius: 20px; background: #171a30; box-shadow: 0 28px 70px rgb(7 8 28 / 48%); transform: rotate(1.2deg); }
.lp-visual img { display: block; width: 100%; height: auto; aspect-ratio: 1535 / 1024; object-fit: cover; }
.lp-visual figcaption { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #444a74; background: #202440; padding: 13px 16px; }
.lp-visual figcaption span { color: #a995f5; font: 700 9px/1 "DM Mono", monospace; letter-spacing: .12em; }
.lp-visual figcaption strong { color: #e9e8f5; font-size: 11px; }
.lp-how { margin: 92px clamp(18px, 4vw, 56px) 0; scroll-margin-top: 90px; }
.lp-section-heading { max-width: 720px; margin: 0 auto 34px; text-align: center; }
.lp-section-heading > span { color: #ac94ff; font: 700 10px/1 "DM Mono", monospace; letter-spacing: .14em; }
.lp-section-heading h2 { margin: 13px 0 0; color: #f7f6ff; font-size: clamp(30px, 4vw, 48px); line-height: 1.2; letter-spacing: -.045em; }
.lp-section-heading p { margin: 16px 0 0; color: #aeb2d0; font-size: 14px; line-height: 1.8; }
.lp-step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lp-step-grid article { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; min-width: 0; border: 1px solid #363c63; border-radius: 14px; background: linear-gradient(145deg, #242843, #20243d); padding: 26px; }
.lp-step-grid article > span { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #5a548c; border-radius: 11px; background: #34305e; color: #c8b8ff; font: 800 11px/1 "DM Mono", monospace; }
.lp-step-grid article > div { display: grid; align-content: start; gap: 8px; }
.lp-step-grid strong { color: #f2f1fa; font-size: 17px; }
.lp-step-grid p { margin: 0; color: #a8acc9; font-size: 12px; line-height: 1.75; }
.lp-cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 24px clamp(18px, 4vw, 56px) 0; border: 1px solid #514a81; border-radius: 16px; background: linear-gradient(110deg, #302950, #262b4c); padding: 30px 34px; }
.lp-cta > div { display: grid; gap: 8px; }
.lp-cta > div > span { color: #aa94f6; font: 700 9px/1 "DM Mono", monospace; letter-spacing: .13em; }
.lp-cta h2 { margin: 0; color: #fff; font-size: 25px; letter-spacing: -.035em; }
.lp-cta > a { display: inline-flex; flex: 0 0 auto; min-height: 50px; align-items: center; gap: 22px; border-radius: 9px; background: #9773ff; padding: 0 22px; color: #fff; font-size: 13px; font-weight: 800; }
.lp-cta + .workspace { margin-top: 32px; scroll-margin-top: 92px; }
@media (max-width: 960px) { .lp-hero { grid-template-columns: 1fr; } .lp-visual { order: -1; transform: none; } .lp-step-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .lp-hero { gap: 26px; margin: 8px; border-radius: 15px; padding: 14px 14px 26px; } .lp-visual { margin: 0; border-radius: 10px; } .lp-visual figcaption { padding: 10px 11px; } .lp-visual figcaption strong { display: none; } .lp-eyebrow { margin-bottom: 15px; font-size: 9px; } .lp-hero h1 { font-size: 37px; line-height: 1.1; } .lp-lead { margin-top: 17px; font-size: 13px; line-height: 1.75; } .lp-actions { display: grid; grid-template-columns: 1fr; margin-top: 22px; } .lp-primary, .lp-secondary { width: 100%; min-height: 52px; } .lp-points { gap: 7px 12px; margin-top: 18px; } .lp-points span { font-size: 10px; } .lp-how { margin: 58px 8px 0; } .lp-section-heading { margin-bottom: 22px; text-align: left; } .lp-section-heading h2 { font-size: 30px; } .lp-section-heading p { font-size: 13px; } .lp-step-grid { gap: 9px; } .lp-step-grid article { gap: 13px; border-radius: 11px; padding: 18px; } .lp-step-grid strong { font-size: 16px; } .lp-step-grid p { font-size: 12px; } .lp-cta { display: grid; margin: 12px 8px 0; border-radius: 12px; padding: 22px 18px; } .lp-cta h2 { font-size: 23px; } .lp-cta > a { justify-content: space-between; } .lp-cta + .workspace { margin-top: 18px; } }
.lp-how-manga { width: min(820px, 100%); overflow: hidden; margin: 0 auto; border: 1px solid #5a548c; border-radius: 20px; background: #fff; padding: 10px; box-shadow: 0 30px 80px rgb(7 8 28 / 38%); }
.lp-how-manga img { display: block; width: 100%; height: auto; border-radius: 12px; }
@media (max-width: 600px) { .lp-how-manga { border-radius: 13px; padding: 5px; } .lp-how-manga img { border-radius: 9px; } }

/* Free signup benefits */ .lp-signup-benefits { display: grid; gap: 8px; margin-top: 18px; border: 1px solid #58558a; border-radius: 12px; background: rgb(24 27 53 / 78%); padding: 9px; box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%); } .lp-signup-speed { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; border-radius: 9px; background: linear-gradient(110deg, #703edd, #9c55d9); padding: 8px 13px; } .lp-signup-speed > span { color: #eee7ff; font: 800 9px/1 monospace; letter-spacing: .11em; } .lp-signup-speed strong { color: #fff; font-size: 13px; white-space: nowrap; } .lp-signup-speed strong em { margin-right: 2px; color: #fff16f; font-size: 28px; font-style: normal; line-height: 1; } .lp-bonus-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .lp-bonus-list > span { display: grid; min-width: 0; align-content: center; gap: 3px; border: 1px solid #484e78; border-radius: 9px; background: #292e50; padding: 9px 11px; } .lp-bonus-list strong { color: #fff; font-size: 17px; line-height: 1.15; white-space: nowrap; } .lp-bonus-list strong small { margin-left: 2px; color: #f2c6ff; font-size: 10px; } .lp-bonus-list em { overflow: hidden; color: #b7bbda; font-size: 9px; font-style: normal; font-weight: 750; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; } @media (max-width: 600px) { .lp-signup-benefits { margin-top: 16px; padding: 8px; } .lp-signup-speed { min-height: 45px; padding: 7px 11px; } .lp-signup-speed strong em { font-size: 25px; } .lp-bonus-list > span { padding: 9px; } .lp-bonus-list strong { font-size: 15px; } }
