
:root {
  color-scheme: light;
  --paper: #f3f3ed;
  --paper-deep: #e9eadf;
  --surface: #fffefa;
  --surface-muted: #f8f8f2;
  --ink: #1b211a;
  --ink-soft: #384038;
  --muted: #7d8378;
  --muted-dark: #656c60;
  --line: #e5e7dc;
  --line-strong: #d7dbcc;
  --accent: #c5ef72;
  --accent-dark: #9ac93e;
  --accent-pale: #eff8df;
  --rust: #bd7058;
  --blue: #a3c5dc;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "DM Sans", "Avenir Next", Avenir, sans-serif;
  --sidebar-width: 236px;
  --shadow-card: 0 8px 28px rgba(36, 44, 30, 0.035), 0 1px 2px rgba(36, 44, 30, 0.045);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(154, 201, 62, .48); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { min-height: 100vh; height: 100vh; position: sticky; top: 0; z-index: 30; display: flex; flex-direction: column; padding: 27px 17px 16px; background: #eff0e7; border-right: 1px solid #e4e6db; }
.brand { display: flex; align-items: center; gap: 10px; margin: 0 0 46px 4px; text-decoration: none; color: var(--ink); width: fit-content; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--accent); background: #1c251c; }
.brand-mark svg { width: 24px; height: 24px; }
.brand-name { font-size: 17px; line-height: 1; letter-spacing: -.85px; font-weight: 700; }
.brand-name span { font-weight: 500; color: #68705f; }
.sidebar-caption { margin: 0 0 9px 11px; color: #929789; font-size: 9px; line-height: 1.3; letter-spacing: 1.5px; font-weight: 700; }
.nav-stack { display: grid; gap: 4px; }
.nav-item { min-height: 42px; width: 100%; display: flex; align-items: center; gap: 11px; padding: 0 11px; color: #667061; background: transparent; border: 0; border-radius: 10px; text-align: left; cursor: pointer; font-size: 12px; font-weight: 600; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-item:hover { background: rgba(255,255,255,.64); color: var(--ink); }
.nav-item:active { transform: scale(.985); }
.nav-item.is-active { background: #fffefa; color: var(--ink); box-shadow: 0 2px 10px rgba(42,50,32,.05); }
.nav-icon { width: 17px; height: 17px; color: #81897d; flex: 0 0 auto; }
.nav-item.is-active .nav-icon { color: #4f6d31; }
.nav-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.nav-key { margin-left: auto; color: #adb2a7; font-size: 9px; letter-spacing: .8px; }
.nav-count { margin-left: auto; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 7px; background: rgba(255,255,255,.7); color: #77806e; font-size: 10px; }
.sidebar-divider { height: 1px; background: #e0e3d8; margin: 23px 8px 22px; }
.compact-nav { margin-bottom: 0; }
.sidebar-spacer { flex: 1; min-height: 28px; }
.local-card { position: relative; padding: 14px 13px 13px; border: 1px solid #dfe4d3; border-radius: 12px; background: rgba(255,255,255,.44); }
.local-card-head { display: flex; align-items: center; gap: 7px; color: #69735e; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.local-indicator { width: 6px; height: 6px; border-radius: 50%; background: #9bc84d; box-shadow: 0 0 0 3px rgba(197,239,114,.3); }
.local-card p { color: #858b7e; font-size: 10px; line-height: 1.55; margin: 8px 0 10px; }
.local-card button { padding: 0; background: none; border: 0; color: #526349; font-size: 10px; font-weight: 700; cursor: pointer; }
.local-card button span { padding-left: 2px; }
.sidebar-footer { display: flex; align-items: center; justify-content: space-between; margin: 14px 2px 0; color: #9aa093; font-size: 8px; letter-spacing: 1.1px; font-weight: 700; }
.version-pill { padding: 3px 6px; border: 1px solid #e0e3d9; border-radius: 5px; font-size: 8px; letter-spacing: .2px; }

.main-shell { min-width: 0; }
.topbar { height: 66px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4vw, 58px); border-bottom: 1px solid rgba(222,225,214,.78); background: rgba(247,247,241,.91); backdrop-filter: blur(14px); }
.crumbs, .topbar-actions { display: flex; align-items: center; }
.crumbs { gap: 10px; color: #384036; font-size: 9px; letter-spacing: 1.35px; font-weight: 700; }
.crumb-muted, .crumb-slash { color: #9da397; }
.topbar-actions { gap: 15px; }
.shortcut-button { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; border: 0; color: #72796e; background: transparent; font-size: 10px; cursor: pointer; }
.shortcut-icon { width: 16px; height: 16px; display: grid; place-items: center; border: 1px solid #dce0d4; border-radius: 5px; color: #687163; font-size: 10px; }
.shortcut-button kbd { padding: 2px 5px; margin-left: 2px; color: #82897e; background: #f0f1e9; border: 1px solid #e1e4db; border-radius: 4px; font: 9px var(--sans); }
.topbar-divider { height: 20px; width: 1px; background: #e1e4da; }
.status-chip { display: flex; align-items: center; gap: 6px; color: #737a6c; font-size: 10px; }
.status-chip span { width: 6px; height: 6px; background: #87b63e; border-radius: 50%; box-shadow: 0 0 0 3px rgba(197,239,114,.25); }
.avatar { width: 29px; height: 29px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #34432a; background: var(--accent); font-family: var(--serif); font-size: 15px; font-style: italic; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.mobile-menu { display: none; width: 32px; height: 32px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fffefa; cursor: pointer; }
.mobile-menu svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.mobile-scrim { display: none; }

.page-wrap { width: min(100%, 1570px); margin: 0 auto; padding: 42px clamp(24px, 4vw, 58px) 34px; }
.hero-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 0 0 31px; }
.eyebrow, .section-kicker { display: flex; align-items: center; gap: 8px; margin: 0; color: #8a9184; font-size: 8px; font-weight: 700; letter-spacing: 1.55px; }
.eyebrow { margin-bottom: 17px; }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; background: #a8ca66; border-radius: 50%; }
.eyebrow-sep { color: #c1c5ba; }
.hero-intro h1 { margin: 0; color: #20271e; font-family: var(--serif); font-size: clamp(42px, 4.4vw, 59px); font-weight: 400; letter-spacing: -.95px; line-height: .96; }
.hero-intro h1 em, .section-heading h2 em, .gallery-empty h3 em { color: #71845b; font-weight: 400; }
.hero-subtitle { margin: 15px 0 0; color: #7d8378; font-size: 12px; line-height: 1.65; }
.hero-note { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 10px 12px; border: 1px solid #e2e5d9; border-radius: 9px; color: #8a9184; background: rgba(255,255,255,.36); font-size: 8px; line-height: 1.55; letter-spacing: 1.1px; }
.hero-note strong { color: #58634d; font-size: 8px; }
.hero-spark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: #617c40; background: #e9f2d8; font-size: 16px; }

.studio-layout { display: grid; grid-template-columns: minmax(0, 1fr) 306px; align-items: start; gap: clamp(20px, 2.5vw, 34px); }
.primary-column { min-width: 0; }
.prompt-card { padding: 18px 19px 15px; background: var(--surface); border: 1px solid #e8e9e1; border-radius: 16px; box-shadow: var(--shadow-card); transition: border-color .2s ease, box-shadow .2s ease; }
.prompt-card:focus-within { border-color: #c7d6ac; box-shadow: 0 0 0 3px rgba(197,239,114,.14), var(--shadow-card); }
.prompt-card.has-error { border-color: #c8846d; box-shadow: 0 0 0 3px rgba(189,112,88,.12); }
.prompt-card-top, .prompt-tools-row, .prompt-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.prompt-label { display: flex; align-items: center; gap: 7px; color: #727a6d; font-size: 8px; letter-spacing: 1.2px; font-weight: 700; }
.prompt-label-mark { color: #88a958; font-size: 13px; }
.prompt-guidance { color: #afb4aa; font-size: 10px; }
#promptInput { display: block; width: 100%; min-height: 88px; resize: vertical; margin: 13px 0 5px; padding: 0; color: #293126; background: transparent; border: 0; outline: none; box-shadow: none; font-family: var(--serif); font-size: 22px; line-height: 1.35; letter-spacing: -.2px; }
#promptInput::placeholder { color: #a4aa9d; opacity: .9; }
#promptInput:focus-visible { outline: none; }
.negative-area { padding: 12px 12px 10px; margin: 8px 0 12px; border: 1px solid #e7e9df; border-radius: 10px; background: #fafbf6; }
.negative-area label { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: #6d7668; font-size: 9px; font-weight: 700; }
.negative-area label span { color: #a0a699; font-size: 8px; font-weight: 500; }
.negative-area textarea { display: block; width: 100%; resize: vertical; min-height: 40px; padding: 4px 0; color: var(--ink-soft); background: transparent; border: 0; outline: none; font-size: 11px; line-height: 1.5; }
.negative-area textarea:focus-visible { outline: none; }
.negative-area textarea::placeholder { color: #a5ab9f; }
.prompt-tools-row { min-height: 29px; }
.prompt-tools-left { display: flex; align-items: center; gap: 13px; }
.text-tool { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; border: 0; background: transparent; color: #777f73; font-size: 9px; cursor: pointer; transition: color .15s; }
.text-tool:hover { color: #34452c; }
.text-tool svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.clear-tool { color: #a0a69a; }
.char-counter { color: #a3a99e; font-size: 9px; white-space: nowrap; }
.prompt-divider { height: 1px; margin: 11px 0 13px; background: #eef0e9; }
.prompt-hints { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.hint-label { margin-right: 1px; color: #a6ad9f; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.hint-chip { padding: 5px 8px; color: #697466; background: #f4f6ef; border: 1px solid #e9ece2; border-radius: 7px; font-size: 9px; cursor: pointer; transition: background .16s, border .16s, color .16s; }
.hint-chip:hover { color: #3d512d; border-color: #d8e4c2; background: #f0f6e6; }
.generate-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.generate-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 126px; min-height: 40px; padding: 0 13px; border: 0; border-radius: 9px; color: #22321a; background: var(--accent); box-shadow: 0 3px 10px rgba(139,180,60,.12); font-size: 10px; font-weight: 700; cursor: pointer; transition: transform .18s, background .18s, box-shadow .18s; }
.generate-button:hover { transform: translateY(-1px); background: #bce85e; box-shadow: 0 5px 14px rgba(139,180,60,.2); }
.generate-button:active { transform: translateY(0); }
.generate-button:disabled { opacity: .6; cursor: wait; transform: none; }
.generate-icon { font-size: 13px; }
.generate-arrow { font-size: 13px; margin-left: 5px; }
.cancel-button { padding: 7px 9px; color: #8b6256; background: #fbf0eb; border: 1px solid #f0ded6; border-radius: 8px; font-size: 9px; font-weight: 700; cursor: pointer; }

.inspiration-section, .style-section, .gallery-section { margin-top: 36px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 15px; }
.section-kicker { margin-bottom: 7px; font-size: 8px; }
.section-heading h2 { margin: 0; color: #293126; font-family: var(--serif); font-size: 25px; font-weight: 400; letter-spacing: -.28px; line-height: 1.05; }
.section-heading h2 em { color: #788967; }
.section-aside { margin: 0 0 3px; color: #a0a699; font-size: 8px; font-weight: 700; letter-spacing: 1.05px; white-space: nowrap; }
.inspiration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.inspiration-card { display: block; min-width: 0; padding: 0; text-align: left; background: transparent; border: 0; cursor: pointer; }
.inspiration-image { position: relative; display: block; height: clamp(108px, 12vw, 157px); overflow: hidden; border-radius: 11px; background: #e9e8dd; }
.inspiration-image::after { position: absolute; inset: 35% 0 0; content: ""; background: linear-gradient(180deg, transparent, rgba(16,22,17,.45)); opacity: .8; pointer-events: none; }
.inspiration-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.2,.7,.2,1), filter .3s; }
.inspiration-card:hover .inspiration-image img { transform: scale(1.04); filter: saturate(1.06); }
.image-index { position: absolute; z-index: 1; bottom: 10px; left: 10px; color: rgba(255,255,255,.85); font-size: 8px; letter-spacing: 1px; font-weight: 700; }
.image-use { position: absolute; z-index: 2; top: 8px; right: 8px; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid rgba(255,255,255,.38); border-radius: 8px; color: white; background: rgba(30,35,29,.28); opacity: 0; transform: translateY(3px); transition: opacity .18s, transform .18s; }
.inspiration-card:hover .image-use, .inspiration-card:focus-visible .image-use { opacity: 1; transform: translateY(0); }
.inspiration-caption { display: flex; justify-content: space-between; align-items: center; gap: 5px; padding: 9px 2px 0; }
.inspiration-caption strong { display: block; overflow: hidden; color: #414a3c; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.inspiration-caption small { display: block; overflow: hidden; margin-top: 3px; color: #a0a69a; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.caption-arrow { flex: 0 0 auto; color: #939b8c; font-size: 12px; transition: transform .18s, color .18s; }
.inspiration-card:hover .caption-arrow { color: #526d37; transform: translate(2px,-2px); }

.style-heading-row { margin-bottom: 14px; }
.reset-style { padding: 4px 0; border: 0; color: #818a7b; background: transparent; font-size: 9px; cursor: pointer; }
.reset-style span { padding-left: 4px; font-size: 12px; }
.reset-style:hover { color: #536c3b; }
.style-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.style-option { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 57px; padding: 8px 25px 8px 8px; text-align: left; border: 1px solid #e6e8df; border-radius: 10px; background: rgba(255,255,255,.54); cursor: pointer; transition: border .17s, background .17s, transform .17s; }
.style-option:hover { border-color: #d2dec2; background: #fffefa; transform: translateY(-1px); }
.style-option.is-selected { border-color: #b8d68c; background: #fcfff6; box-shadow: inset 0 0 0 1px rgba(174,210,124,.2); }
.style-swatch { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 38px; overflow: hidden; border-radius: 7px; font-family: var(--serif); font-size: 18px; }
.swatch-neutral { color: #69745d; background: linear-gradient(145deg,#eaece3,#f8f7ef); }
.swatch-editorial { color: #ad775c; background: radial-gradient(circle at 35% 36%,#f9dcc5 0 13%,transparent 14%),linear-gradient(130deg,#efe0d4,#d7ded0); }
.swatch-cinematic { color: #e6c38a; background: linear-gradient(140deg,#283039,#59675c 52%,#ab7654); }
.swatch-surreal { color: #f3d179; background: linear-gradient(140deg,#717ca1,#c07d70 56%,#ecc47c); }
.swatch-analog { color: #fff0d2; background: radial-gradient(circle at 66% 27%,#e7c092 0 12%,transparent 13%),linear-gradient(135deg,#b26d4d,#dfc58c 55%,#72806b); }
.swatch-3d { color: #d1def0; background: radial-gradient(circle at 40% 43%,#bde2e6 0 18%,transparent 20%),linear-gradient(135deg,#4b5872,#bac4ce 52%,#c89474); }
.style-copy { display: block; min-width: 0; }
.style-copy strong { display: block; overflow: hidden; color: #4d5649; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.style-copy small { display: block; overflow: hidden; margin-top: 3px; color: #9aa193; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.style-check { position: absolute; top: 6px; right: 7px; color: #86aa51; font-size: 10px; opacity: 0; }
.style-option.is-selected .style-check { opacity: 1; }

.gallery-section { padding-bottom: 5px; scroll-margin-top: 92px; }
.gallery-heading { margin-bottom: 17px; }
.gallery-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 7px; vertical-align: 5px; border: 1px solid #e1e5d7; border-radius: 7px; color: #758167; font: 600 9px var(--sans); }
.gallery-tabs { display: flex; align-items: center; gap: 3px; padding: 3px; background: #eceee6; border-radius: 8px; }
.gallery-tab { padding: 6px 10px; border: 0; border-radius: 6px; color: #899184; background: transparent; font-size: 9px; cursor: pointer; }
.gallery-tab.is-active { color: #49543f; background: #fffefa; box-shadow: 0 1px 4px rgba(33,42,28,.08); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.art-card { overflow: hidden; border: 1px solid #e4e7dc; border-radius: 12px; background: var(--surface); box-shadow: 0 2px 8px rgba(38,45,34,.025); animation: card-enter .34s both; }
@keyframes card-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.art-frame { position: relative; overflow: hidden; display: grid; place-items: center; min-height: 185px; max-height: 380px; background: #ebece4; cursor: zoom-in; }
.art-frame img { display: block; width: 100%; height: 100%; max-height: 380px; object-fit: cover; transition: transform .35s ease; }
.art-frame:hover img { transform: scale(1.025); }
.art-hover-tools { position: absolute; top: 9px; right: 9px; display: flex; gap: 5px; opacity: 0; transform: translateY(3px); transition: opacity .18s, transform .18s; }
.art-card:hover .art-hover-tools, .art-card:focus-within .art-hover-tools { opacity: 1; transform: translateY(0); }
.art-mini-action { width: 29px; height: 29px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.7); border-radius: 8px; color: #374131; background: rgba(255,255,249,.9); box-shadow: 0 2px 7px rgba(0,0,0,.08); cursor: pointer; }
.art-mini-action:hover { background: var(--accent); }
.art-mini-action.is-favorite { color: #b7654f; }
.art-mini-action svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.art-card-meta { padding: 11px 12px 12px; }
.art-title { overflow: hidden; margin: 0; color: #364032; font-family: var(--serif); font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.art-prompt { display: -webkit-box; overflow: hidden; margin: 5px 0 10px; color: #82897c; font-size: 9px; line-height: 1.5; line-clamp: 2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.art-meta-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #a0a69a; font-size: 8px; }
.art-model-tag { overflow: hidden; max-width: 62%; padding: 4px 6px; border: 1px solid #e7eadd; border-radius: 5px; color: #748064; background: #f7f9f2; text-overflow: ellipsis; white-space: nowrap; }
.art-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; padding-top: 9px; margin-top: 9px; border-top: 1px solid #f0f1ea; }
.art-action { padding: 2px 0; border: 0; color: #8b9385; background: transparent; font-size: 8px; cursor: pointer; }
.art-action:hover { color: #4c6533; }
.art-action.danger:hover { color: #b75f49; }
.gallery-empty { display: flex; flex-direction: column; align-items: center; padding: 30px 20px 36px; border: 1px dashed #dce1d2; border-radius: 13px; background: rgba(255,255,255,.26); text-align: center; }
.empty-mark { width: 53px; height: 53px; display: grid; place-items: center; margin-bottom: 12px; color: #7b9161; background: #eaf1de; border-radius: 17px; }
.empty-mark svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.empty-mark svg rect { fill: rgba(255,255,255,.55); }
.empty-mark svg path { fill: #c1d9a2; stroke: none; }
.empty-mark svg circle { fill: #a4c773; stroke: none; }
.empty-eyebrow { margin: 0 0 8px; color: #9da895; font-size: 8px; font-weight: 700; letter-spacing: 1.4px; }
.gallery-empty h3 { margin: 0; color: #384334; font-family: var(--serif); font-size: 25px; line-height: 1.02; font-weight: 400; }
.empty-copy { max-width: 300px; margin: 10px 0 14px; color: #90978a; font-size: 10px; line-height: 1.55; }
.empty-cta { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid #dbe4cb; border-radius: 8px; color: #5c704a; background: #f7faef; font-size: 9px; font-weight: 700; cursor: pointer; }
.empty-cta:hover { background: #eff7e3; }
.gallery-empty.filtered-empty { padding: 27px 20px; }
.gallery-empty.filtered-empty .empty-mark { width: 43px; height: 43px; margin-bottom: 8px; }
.gallery-empty.filtered-empty .empty-mark svg { width: 32px; }
.gallery-empty.filtered-empty h3 { font-size: 22px; }
.skeleton-card { overflow: hidden; border: 1px solid #e5e7dd; border-radius: 12px; background: #fffefa; }
.skeleton-image { aspect-ratio: 1/1; background: linear-gradient(105deg,#eceee5 25%,#f7f8f2 40%,#eceee5 65%); background-size: 220% 100%; animation: shimmer 1.5s infinite linear; }
.skeleton-line { height: 8px; width: 65%; margin: 12px; border-radius: 5px; background: #eeefe8; }
.skeleton-line.short { width: 41%; margin-top: 0; margin-bottom: 13px; }
@keyframes shimmer { to { background-position-x: -220%; } }
.page-footer { display: flex; justify-content: space-between; gap: 10px; padding-top: 17px; margin-top: 28px; border-top: 1px solid #e3e5db; color: #a3aa9f; font-size: 7px; letter-spacing: 1.15px; font-weight: 700; }
.page-footer button { padding: 0; border: 0; color: inherit; background: transparent; font: inherit; letter-spacing: inherit; cursor: pointer; }
.page-footer button:hover { color: #5f704e; }
.footer-dot { margin: 0 4px; color: #bdc2b7; }

.settings-panel { position: sticky; top: 82px; padding: 19px 17px 15px; border: 1px solid #e4e7dc; border-radius: 14px; background: rgba(255,255,250,.77); box-shadow: 0 5px 18px rgba(34,42,30,.025); }
.settings-header { display: flex; justify-content: space-between; align-items: center; padding: 0 1px 14px; margin-bottom: 12px; border-bottom: 1px solid #ecede6; }
.settings-header .section-kicker { margin-bottom: 5px; }
.settings-header h2 { margin: 0; color: #384335; font-family: var(--serif); font-size: 21px; font-weight: 400; }
.settings-icon { width: 33px; height: 33px; display: grid; place-items: center; border: 1px solid #e6eade; border-radius: 9px; color: #71835e; background: #f5f8ed; }
.settings-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.setting-group { padding: 0 1px 15px; margin-bottom: 13px; border-bottom: 1px solid #eff0e9; }
.setting-label-row, .slider-label-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; color: #8e9689; font-size: 8px; letter-spacing: 1.05px; font-weight: 700; }
.setting-label-row label, .slider-label-row label { color: #838b7c; cursor: default; }
.setting-live { display: inline-flex; align-items: center; gap: 5px; color: #93a184; font-size: 7px; }
.setting-live span { width: 5px; height: 5px; background: #8dbb4c; border-radius: 50%; }
.model-select { display: block; width: 100%; min-height: 37px; padding: 0 30px 0 10px; border: 1px solid #e3e6da; border-radius: 8px; color: #4a5346; background: #fcfcf8; font-size: 10px; font-weight: 600; cursor: pointer; }
.model-description { min-height: 26px; margin: 7px 1px 0; color: #9aa194; font-size: 8px; line-height: 1.45; }
.mini-label { color: #a3aa9d; font-size: 7px; letter-spacing: .65px; }
.ratio-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; margin-bottom: 9px; }
.ratio-option { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 49px; padding: 4px 2px; border: 1px solid #e8eae2; border-radius: 7px; color: #899183; background: #fbfcf8; font-size: 8px; cursor: pointer; transition: background .15s, border .15s, color .15s; }
.ratio-option:hover { border-color: #d5e1c3; color: #506b35; }
.ratio-option.is-selected { border-color: #c4d8a4; color: #516b38; background: #f2f8e9; }
.ratio-icon { display: block; width: 16px; height: 16px; border: 1.4px solid currentColor; border-radius: 2px; }
.ratio-landscape { width: 18px; height: 14px; }
.ratio-wide { width: 21px; height: 12px; }
.ratio-portrait { width: 12px; height: 17px; }
.ratio-tall { width: 10px; height: 19px; }
.dimension-row { display: grid; grid-template-columns: 1fr 12px 1fr; align-items: end; gap: 4px; }
.dimension-row label { display: block; min-width: 0; color: #a0a79b; font-size: 7px; letter-spacing: .8px; }
.dimension-input-wrap { display: flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 7px; margin-top: 5px; border: 1px solid #e6e8df; border-radius: 7px; background: #fcfcf8; }
.dimension-input-wrap input { width: 100%; min-width: 0; padding: 0; color: #56604f; border: 0; outline: none; background: transparent; font-size: 10px; font-weight: 600; }
.dimension-input-wrap span { color: #b3b9ad; font-size: 8px; }
.dimension-x { padding-bottom: 10px; color: #a9afa4; text-align: center; font-size: 10px; }
.output-group { padding-bottom: 14px; }
.stepper { display: flex; align-items: center; gap: 9px; min-height: 32px; }
.stepper button { width: 30px; height: 30px; padding: 0; border: 1px solid #e4e7dc; border-radius: 8px; color: #627355; background: #fcfdf9; font-size: 17px; line-height: 1; cursor: pointer; }
.stepper button:hover { border-color: #c7d9a9; background: #f1f7e7; }
.stepper #countValue { min-width: 17px; color: #384534; text-align: center; font-family: var(--serif); font-size: 19px; }
.stepper-label { color: #9ba295; font-size: 9px; }
.optional-tag { margin-left: 4px; color: #b0b6aa; font-size: 7px; letter-spacing: .45px; }
.dice-button { width: 22px; height: 22px; padding: 0; border: 1px solid #e4e8dc; border-radius: 6px; color: #77836a; background: #f7f9f2; font-size: 15px; cursor: pointer; }
.dice-button:hover { border-color: #c9dbad; color: #4c6834; }
.seed-input { display: block; width: 100%; height: 32px; padding: 0 9px; border: 1px solid #e6e8df; border-radius: 7px; color: #59624f; background: #fcfcf8; font-size: 9px; }
.seed-input::placeholder { color: #b0b6aa; }
.setting-help { margin: 6px 1px 0; color: #a1a89d; font-size: 8px; line-height: 1.4; }
.slider-group { padding-bottom: 14px; }
.slider-label-row { margin-bottom: 8px; }
.slider-value { min-width: 25px; padding: 3px 5px; border-radius: 5px; color: #647750; background: #edf4e3; text-align: center; font-size: 9px; letter-spacing: 0; }
.range-input { display: block; width: 100%; height: 14px; margin: 0; accent-color: #93bd50; cursor: pointer; }
.range-input:disabled { opacity: .48; cursor: not-allowed; }
.slider-ends { display: flex; justify-content: space-between; color: #b0b6ab; font-size: 7px; letter-spacing: .55px; }
.slider-group .setting-help { margin-top: 5px; }
.settings-footnote { display: flex; align-items: center; gap: 9px; padding: 10px 9px; border: 1px solid #e9edde; border-radius: 9px; color: #899182; background: #f8faF2; font-size: 8px; line-height: 1.45; }
.settings-footnote strong { color: #667555; font-weight: 700; }
.footnote-orb { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 auto; border-radius: 9px; color: #728c50; background: #edf4e0; font-size: 14px; }

.toast-region { position: fixed; z-index: 100; right: 21px; bottom: 20px; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; max-width: min(380px, calc(100vw - 36px)); padding: 11px 14px; border: 1px solid #dfe4d6; border-radius: 10px; color: #45523c; background: #fffefa; box-shadow: 0 8px 24px rgba(28,36,25,.12); font-size: 10px; line-height: 1.45; animation: toast-in .25s ease-out both; pointer-events: auto; }
.toast.error { border-color: #ead5cc; color: #8b5441; }
.toast.success::before { content: "✓"; display: grid; place-items: center; width: 17px; height: 17px; flex: 0 0 auto; border-radius: 50%; color: #47642f; background: #e7f3d7; font-size: 10px; }
.toast.error::before { content: "!"; display: grid; place-items: center; width: 17px; height: 17px; flex: 0 0 auto; border-radius: 50%; color: #96553d; background: #f8e6dd; font-size: 10px; font-weight: 700; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.modal-backdrop { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(20,25,19,.66); backdrop-filter: blur(10px); animation: backdrop-in .2s ease both; }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox-dialog { width: min(1110px, 100%); max-height: min(850px, calc(100vh - 48px)); overflow: hidden; border: 1px solid rgba(255,255,255,.2); border-radius: 17px; background: #f8f8f2; box-shadow: 0 22px 80px rgba(0,0,0,.28); }
.lightbox-toolbar { height: 48px; display: flex; justify-content: space-between; align-items: center; padding: 0 14px 0 18px; color: #7f8778; font-size: 9px; letter-spacing: 1px; }
.lightbox-toolbar > div { display: flex; gap: 6px; }
.lightbox-icon-button { width: 29px; height: 29px; display: grid; place-items: center; padding: 0; border: 1px solid #e2e6d9; border-radius: 8px; color: #65715b; background: #fffefa; font-size: 14px; cursor: pointer; }
.lightbox-icon-button:hover { border-color: #cbdab4; background: #f2f7e9; }
.close-button { color: #7b8176; font-size: 19px; }
.lightbox-content { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 0; max-height: calc(min(850px, 100vh - 48px) - 48px); overflow: auto; border-top: 1px solid #e9ebe2; }
.lightbox-image-wrap { display: grid; place-items: center; min-height: 300px; max-height: 740px; padding: 14px; background: #eaebe3; }
.lightbox-image-wrap img { display: block; max-width: 100%; max-height: 700px; width: auto; height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 8px 28px rgba(31,35,28,.12); }
.lightbox-details { align-self: stretch; padding: 20px 18px; background: #fbfbf6; }
.lightbox-details .section-kicker { margin: 2px 0 8px; }
.lightbox-details h2 { margin: 0; color: #303a2c; font-family: var(--serif); font-size: 25px; font-weight: 400; line-height: 1.1; }
.lightbox-prompt { max-height: 135px; overflow: auto; margin: 11px 0; color: #7d8578; font-size: 10px; line-height: 1.55; }
.lightbox-meta { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 0; border-top: 1px solid #eff0e8; border-bottom: 1px solid #eff0e8; }
.meta-pill { padding: 5px 7px; border: 1px solid #e7eadf; border-radius: 6px; color: #7e8872; background: #f6f8f0; font-size: 8px; }
.lightbox-actions { display: grid; gap: 6px; padding-top: 12px; }
.action-button { display: flex; justify-content: space-between; align-items: center; min-height: 33px; padding: 0 9px; border: 1px solid #e7e9e1; border-radius: 7px; color: #67715f; background: #fffefa; text-align: left; font-size: 9px; cursor: pointer; }
.action-button:hover { border-color: #cbd9b6; color: #4f6639; background: #f7faef; }
.action-button span { color: #98a08f; font-size: 12px; }
.action-button.primary-action { border-color: #c5df9d; color: #4e6534; background: #f1f8e5; font-weight: 700; }
.action-button.danger-action { color: #a36d5b; }
.action-button.danger-action:hover { border-color: #e9cfc4; color: #a2513a; background: #fff7f3; }
.info-dialog { position: relative; width: min(420px, 100%); padding: 30px; border: 1px solid rgba(255,255,255,.55); border-radius: 17px; background: #fbfbf6; box-shadow: 0 22px 80px rgba(0,0,0,.28); }
.info-close { position: absolute; top: 14px; right: 14px; }
.info-dialog h2 { margin: 12px 0 10px; color: #30392b; font-family: var(--serif); font-size: 31px; font-weight: 400; line-height: 1; }
.info-body { color: #7d8578; font-size: 11px; line-height: 1.7; }
.info-body p { margin: 9px 0; }
.info-body ul { padding-left: 16px; }
.info-body li { margin: 5px 0; }
.info-done { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 9px 12px; border: 0; border-radius: 8px; color: #39462e; background: var(--accent); font-size: 10px; font-weight: 700; cursor: pointer; }

@media (min-width: 1600px) {
  .page-wrap { padding-left: 66px; padding-right: 66px; }
  .studio-layout { grid-template-columns: minmax(0, 1fr) 326px; }
  .settings-panel { padding: 21px 19px 17px; }
}
@media (max-width: 1250px) {
  :root { --sidebar-width: 215px; }
  .studio-layout { grid-template-columns: minmax(0, 1fr) 286px; gap: 20px; }
  .page-wrap { padding-left: 30px; padding-right: 30px; }
  .topbar { padding-left: 30px; padding-right: 30px; }
  .settings-panel { padding-left: 14px; padding-right: 14px; }
  .prompt-card { padding-left: 15px; padding-right: 15px; }
  .hint-chip { font-size: 8px; padding-left: 6px; padding-right: 6px; }
}
@media (max-width: 1060px) {
  .studio-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-panel { position: static; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; gap: 0 18px; }
  .settings-header { grid-column: 1 / -1; }
  .setting-group { margin-bottom: 0; padding-top: 12px; }
  .settings-footnote { align-self: center; margin: 8px 0; }
  .hero-intro { margin-bottom: 26px; }
  .inspiration-image { height: clamp(130px, 19vw, 190px); }
}
@media (max-width: 760px) {
  :root { --sidebar-width: 245px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); height: 100dvh; min-height: 100dvh; box-shadow: 16px 0 40px rgba(24,30,22,.1); transform: translateX(-110%); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
  body.menu-open .sidebar { transform: translateX(0); }
  .mobile-scrim:not([hidden]) { display: block; position: fixed; z-index: 25; inset: 0; background: rgba(28,34,26,.34); backdrop-filter: blur(2px); }
  .mobile-menu { display: grid; }
  .topbar { height: 58px; padding-left: 18px; padding-right: 18px; }
  .crumbs { gap: 8px; }
  .shortcut-button > span:not(.shortcut-icon), .shortcut-button kbd, .topbar-divider, .status-chip { display: none; }
  .topbar-actions { gap: 11px; }
  .page-wrap { padding: 30px 20px 24px; }
  .hero-intro { align-items: flex-start; margin-bottom: 24px; }
  .hero-intro h1 { font-size: clamp(40px, 9vw, 52px); }
  .hero-note { display: none; }
  .hero-subtitle { margin-top: 12px; }
  .inspiration-image { height: 150px; }
  .section-heading h2 { font-size: 23px; }
  .settings-panel { padding: 16px 14px; }
}
@media (max-width: 520px) {
  .topbar { padding-left: 13px; padding-right: 13px; }
  .crumbs { font-size: 8px; letter-spacing: 1px; }
  .page-wrap { padding: 27px 14px 20px; }
  .hero-intro { margin-bottom: 22px; }
  .hero-intro h1 { font-size: 43px; }
  .eyebrow { gap: 6px; font-size: 7px; letter-spacing: 1.1px; }
  .desktop-break { display: none; }
  .hero-subtitle { max-width: 290px; font-size: 11px; }
  .prompt-card { padding: 14px 13px 12px; border-radius: 13px; }
  .prompt-guidance { font-size: 8px; }
  #promptInput { min-height: 100px; font-size: 21px; }
  .prompt-tools-left { gap: 9px; }
  .text-tool { gap: 4px; font-size: 8px; }
  .text-tool svg { width: 13px; height: 13px; }
  .prompt-card-bottom { align-items: stretch; flex-direction: column; }
  .prompt-hints { row-gap: 5px; }
  .generate-actions { justify-content: flex-end; }
  .generate-button { min-height: 42px; flex: 1; }
  .cancel-button { min-height: 38px; }
  .inspiration-section, .style-section, .gallery-section { margin-top: 30px; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 22px; }
  .section-aside { max-width: 112px; font-size: 7px; line-height: 1.45; text-align: right; white-space: normal; }
  .inspiration-grid { gap: 7px; }
  .inspiration-image { height: 111px; border-radius: 8px; }
  .image-index { bottom: 7px; left: 6px; font-size: 7px; letter-spacing: .55px; }
  .inspiration-caption { align-items: flex-start; padding: 7px 1px 0; }
  .inspiration-caption strong { font-size: 8px; }
  .inspiration-caption small { font-size: 7px; }
  .caption-arrow { display: none; }
  .style-grid { gap: 7px; }
  .style-option { min-height: 54px; gap: 7px; padding: 7px 20px 7px 7px; }
  .style-swatch { width: 30px; height: 35px; }
  .style-copy strong { font-size: 8px; }
  .style-copy small { font-size: 7px; }
  .reset-style { font-size: 8px; }
  .gallery-heading { align-items: flex-end; }
  .gallery-tabs { flex: 0 0 auto; }
  .gallery-tab { padding: 6px 8px; font-size: 8px; }
  .gallery-grid { grid-template-columns: minmax(0,1fr); gap: 11px; }
  .art-frame { min-height: 220px; max-height: 410px; }
  .art-frame img { max-height: 410px; }
  .art-hover-tools { opacity: 1; transform: none; }
  .gallery-empty { padding: 25px 13px 28px; }
  .gallery-empty h3 { font-size: 23px; }
  .settings-panel { grid-template-columns: minmax(0,1fr); padding: 15px 13px; }
  .settings-header { grid-column: auto; }
  .setting-group { padding-top: 11px; }
  .settings-footnote { margin: 7px 0 2px; }
  .page-footer { flex-direction: column; align-items: flex-start; gap: 8px; font-size: 7px; }
  .modal-backdrop { padding: 10px; }
  .lightbox-dialog { max-height: calc(100dvh - 20px); border-radius: 12px; }
  .lightbox-content { grid-template-columns: minmax(0,1fr); max-height: calc(100dvh - 68px); }
  .lightbox-image-wrap { min-height: 220px; max-height: 54dvh; padding: 10px; }
  .lightbox-image-wrap img { max-height: 50dvh; }
  .lightbox-details { padding: 16px; }
  .lightbox-details h2 { font-size: 23px; }
  .lightbox-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .action-button { font-size: 8px; }
  .info-dialog { padding: 25px 21px; }
  .toast-region { right: 10px; bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.recent-prompts-panel { padding: 11px 12px 12px; margin: 8px 0 11px; border: 1px solid #e6e9df; border-radius: 10px; background: #fbfcf7; }
.recent-prompts-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; color: #939b8c; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.recent-prompts-head button { padding: 3px; border: 0; color: #879080; background: transparent; font-size: 8px; cursor: pointer; }
.recent-prompts-list { display: grid; gap: 5px; max-height: 220px; overflow-y: auto; }
.recent-prompt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 8px; border: 1px solid #eef0e8; border-radius: 7px; background: #fffefa; text-align: left; cursor: pointer; }
.recent-prompt:hover { border-color: #d5e1c5; background: #f5faed; }
.recent-prompt > span { display: -webkit-box; overflow: hidden; color: #687262; font-size: 9px; line-height: 1.4; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.recent-prompt small { flex: 0 0 auto; color: #9aa392; font-size: 8px; }
.recent-empty { margin: 5px 0 2px; color: #a1a99b; font-size: 9px; }
.generation-status { display: flex; align-items: center; gap: 9px; min-height: 37px; padding: 8px 11px; margin-top: 9px; border: 1px solid #dfe9d0; border-radius: 9px; color: #647653; background: #f4f8eb; font-size: 9px; }
.button-spinner { width: 13px; height: 13px; display: inline-block; flex: 0 0 auto; border: 2px solid rgba(69,99,43,.2); border-top-color: #789b4d; border-radius: 50%; animation: spin .75s linear infinite; }
.generate-button .button-spinner { border-color: rgba(56,77,34,.24); border-top-color: #435e2e; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-banner { display: flex; align-items: center; gap: 9px; padding: 10px 11px; margin-top: 9px; border: 1px solid #ecd8ce; border-radius: 9px; color: #8b5946; background: #fff8f3; font-size: 9px; line-height: 1.5; }
.error-banner > span:nth-child(2) { flex: 1; }
.error-mark { width: 17px; height: 17px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #985c45; background: #f7e5dc; font-size: 10px; font-weight: 700; }
.error-banner button { flex: 0 0 auto; padding: 6px 8px; border: 1px solid #efd8cc; border-radius: 6px; color: #8b5c49; background: #fffefa; font-size: 8px; font-weight: 700; cursor: pointer; }
.error-banner button:hover { background: #fff0e7; }
.lightbox-context { padding-top: 8px; margin-top: 9px; border-top: 1px solid #eff0e8; }
.prompt-context-label { display: block; margin: 0 0 5px; color: #a0a79b; font-size: 7px; font-weight: 700; letter-spacing: 1px; }
.lightbox-context p { max-height: 105px; overflow: auto; margin: 0; color: #747e6d; font-size: 9px; line-height: 1.5; }
.negative-area.is-disabled { background: #f5f6f1; }
.negative-area textarea:disabled { color: #afb5aa; cursor: not-allowed; }
.lightbox-icon-button:disabled { opacity: .42; cursor: not-allowed; }
@media (max-width: 520px) {
  .recent-prompts-panel { padding: 10px; }
  .error-banner { align-items: flex-start; }
  .error-banner button { align-self: center; }
}

.turnstile-row { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 7px 10px; margin-top: 10px; border: 1px solid #e8ebe1; border-radius: 9px; background: #fbfcf7; }
.turnstile-row[data-state="locked"] { border-color: #e8e2d1; background: #fbfaf4; }
.turnstile-row[data-state="error"] { border-color: #ecd8ce; background: #fff8f3; }
.turnstile-widget { min-width: 0; min-height: 0; }
.turnstile-status { color: #8e9788; font-size: 8px; line-height: 1.45; }
.turnstile-row[data-state="locked"] .turnstile-status { color: #8b7760; }
.turnstile-row[data-state="error"] .turnstile-status { color: #8b5946; }
.turnstile-row[data-state="verified"] .turnstile-status { color: #5c7442; }
@media (max-width: 520px) {
  .turnstile-row { align-items: flex-start; flex-direction: column; gap: 5px; padding: 8px; }
  .turnstile-status { font-size: 8px; }
}
