@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-cyrillic.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-latin.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-cyrillic.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
:root {
  color-scheme: light;
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  --canvas: #f1f4f9;
  --ink: #192b47;
  --muted: #53647d;
  --accent: #304fa5;
  --accent-hover: #263e83;
  --on-accent: #fff;
  --focus: #546cce;
  --error-ink: #67271d;
  --line: #d6deeb;
  --field-line: #8798b1;
  --surface: #fcfdff;
  --subtle: #eaf0f8;
  --accent-subtle: #e3eafb;
  --sidebar: #f7f9fd;
  --sidebar-active: #e4ebfa;
  --hero: #192d4a;
  --hero-action: #ffdab7;
  --hero-action-hover: #ffe7d0;
  --radius: .85rem;
}
:root[data-studio-theme="dark"] {
  color-scheme: dark;
  --canvas: #151e2e;
  --ink: #f0f4ff;
  --muted: #b6c2d9;
  --accent: #b8c9ff;
  --accent-hover: #d0daff;
  --on-accent: #192a4b;
  --focus: #bdcfff;
  --error-ink: #ffc0b3;
  --line: #384962;
  --field-line: #617492;
  --surface: #1f2b40;
  --subtle: #24334c;
  --accent-subtle: #2b3c61;
  --sidebar: #192438;
  --sidebar-active: #2a3d61;
}
* { box-sizing: border-box; }
body { display: grid; grid-template-columns: 216px minmax(0, 1fr); margin: 0; min-height: 100vh; line-height: 1.45; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.icon-definitions { position: absolute; }
.icon { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.skip-link { position: absolute; top: .6rem; left: .6rem; z-index: 2; transform: translateY(-180%); padding: .65rem 1rem; background: var(--surface); }
.skip-link:focus { transform: none; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2rem; align-self: start; height: 100dvh; min-height: 355px; padding: 1.8rem 1.05rem 1.05rem; border-right: 1px solid var(--line); background: var(--sidebar); color: var(--ink); }
.sidebar a { color: inherit; text-decoration: none; }
.brand { display: flex; align-items: center; gap: .65rem; padding: 0 .25rem; font-size: 1.02rem; line-height: 1.16; font-weight: 740; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: .7rem; background: var(--hero); color: var(--hero-action); }
.brand-mark .icon { width: 1.35rem; height: 1.35rem; }
.main-nav { display: grid; gap: .32rem; }
.main-nav a { position: relative; display: flex; align-items: center; gap: .65rem; min-height: 2.65rem; padding: .56rem .7rem; border-radius: .6rem; font-size: .96rem; color: var(--muted); font-weight: 570; }
.main-nav a:hover, .main-nav [aria-current] { background: var(--sidebar-active); }
.main-nav [aria-current] { color: var(--accent); font-weight: 690; }
.main-nav [aria-current]::before { position: absolute; inset: .62rem auto .62rem -.35rem; width: 3px; border-radius: 3px; background: var(--accent); content: ""; }
.account { display: flex; align-items: center; gap: .48rem; margin-top: auto; padding: .75rem .55rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.account a:hover, .account button:hover { color: var(--accent); text-decoration: underline; }
.account-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account form { margin-left: auto; }
.text-button, .text-button:hover { background: transparent; border: 0; color: inherit; padding: .3rem; }
.mode, .hint, .tag, small, time { color: var(--muted); font-size: .86rem; }
main { min-width: 0; width: min(100%, 1450px); margin: 0 auto; padding: clamp(1rem, 2.4vw, 2.25rem) clamp(1rem, 2.5vw, 2.5rem) 3.5rem; }
h1 { margin: 0 0 .65rem; font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 690; line-height: 1.02; letter-spacing: -.045em; }
h2 { margin: 0 0 .75rem; font-size: 1.3rem; font-weight: 670; letter-spacing: -.018em; }
.eyebrow { margin: 0 0 .5rem; font-size: .87rem; font-weight: 630; color: var(--muted); }
.intro { max-width: 60ch; color: var(--muted); line-height: 1.6; margin-bottom: 1.8rem; }
.panel, .photo, .group, .stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel, .group { padding: clamp(1rem, 3vw, 1.6rem); }
.group > p { color: var(--muted); line-height: 1.5; font-size: .92rem; }
button, input { font: inherit; }
button { border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); padding: .55rem .9rem; border-radius: .6rem; cursor: pointer; font-weight: 650; }
button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
button.secondary:hover { background: var(--accent-subtle); }
.hint { line-height: 1.65; }
.hint code { white-space: nowrap; }
.back { display: inline-block; margin-bottom: 1.4rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 1.5rem 0; }
.stats div { padding: .9rem; }
.stats dt { color: var(--muted); font-size: .85rem; }
.stats dd { margin: .2rem 0 0; font-size: 1.5rem; font-weight: 750; }
.group { margin-top: 1rem; }
.group h2 { display: flex; align-items: baseline; gap: .65rem; overflow-wrap: anywhere; }
.group h2 span { border-radius: 1rem; padding: .16rem .55rem; background: var(--accent-subtle); font-size: .83rem; }
.unresolved { border-color: #d9b77c; background: #fff9eb; }
.unresolved h2 span { background: #f7e6c3; }
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); gap: .8rem; }
.photo { min-width: 0; max-width: 350px; overflow: hidden; scroll-margin-top: 1rem; }
.photo:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.preview-link { display: block; background: var(--subtle); }
.preview-link img { display: block; width: 100%; height: 185px; object-fit: contain; }
.photo-info { padding: .85rem; }
.filename { margin: 0 0 .35rem; font-weight: 650; overflow-wrap: anywhere; }
.tag { margin: 0 0 .75rem; }
.pending { color: #80521c; }
.photo label { display: block; margin-bottom: .3rem; font-size: .85rem; font-weight: 650; }
.article-field { display: flex; gap: .4rem; margin-bottom: .3rem; }
.article-field input { flex: 1; min-width: 0; border: 1px solid var(--field-line); border-radius: .45rem; padding: .45rem; }
.article-field button { font-size: .84rem; padding: .45rem .55rem; }
.notice { border: 1px solid #ba7268; color: #67271d; background: #fff2ef; border-radius: .5rem; padding: .8rem 1rem; overflow-wrap: anywhere; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.generate-link { display: inline-block; margin-top: .75rem; font-weight: 650; }
.generation-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; align-items: start; }
.scenario-tabs { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.scenario-tabs a { border: 1px solid var(--line); padding: .5rem .7rem; border-radius: .45rem; text-decoration: none; }
.scenario-tabs [aria-current] { background: var(--accent-subtle); border-color: var(--field-line); font-weight: 650; }
.prompt-form > label { display: block; font-weight: 650; margin-bottom: .4rem; }
.prompt-form textarea { width: 100%; font: inherit; line-height: 1.55; resize: vertical; border: 1px solid var(--field-line); border-radius: .45rem; padding: .75rem; }
.prompt-form textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.seed-input { width: min(100%, 15rem); border: 1px solid var(--field-line); border-radius: .45rem; padding: .5rem; }
.prompt-form button:disabled { opacity: .55; cursor: default; }
.generation-image { display: block; width: 100%; max-height: 460px; object-fit: contain; background: var(--subtle); border-radius: .45rem; }
.history-heading { margin-top: 1.2rem; }
.history { padding-left: 1.2rem; }
.history li { margin-bottom: .4rem; }
.live-panel { border-top: 1px solid var(--line); margin-top: 1rem; }
.live-panel button { display: block; margin-top: .75rem; }
.comparison { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prompt-snapshot { margin-top: 1rem; }
.prompt-copy { white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-form select { display: block; max-width: 100%; width: 100%; margin-top: .3rem; padding: .45rem; font: inherit; }
.kit-photos { align-items: start; }
.page-header { margin: .45rem 0 1.45rem; }
.studio-header { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: .9rem; }
.studio-header h1 { margin: 0; }
.studio-intro { margin: .55rem 0 0; color: var(--muted); font-size: 1.05rem; }
.studio-hero { position: relative; isolation: isolate; display: grid; align-items: center; overflow: clip; min-height: clamp(18.25rem, 27vw, 22rem); margin-bottom: 1rem; padding: clamp(1.45rem, 3.6vw, 3rem); border-radius: 1.15rem; background: var(--hero); color: #fff8f1; }
.studio-cover { position: absolute; z-index: -2; inset: -6% 0 auto auto; width: auto; height: 112%; mask-image: linear-gradient(90deg, transparent, #000 23%); }
.studio-hero::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #102239c4, #10223949 48%, transparent 72%); content: ""; }
.studio-hero-content { max-width: 30rem; }
.studio-hero h1 { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(3.5rem, 5.7vw, 6rem); font-weight: 600; line-height: .82; letter-spacing: -.05em; }
.studio-hero-content p { margin: 1rem 0 1.25rem; color: #e1e9f7; font-size: clamp(.96rem, 1.55vw, 1.13rem); }
.studio-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.studio-action { display: inline-flex; align-items: center; justify-content: center; gap: .48rem; min-height: 2.6rem; padding: .55rem .85rem; border: 1px solid var(--accent); border-radius: .6rem; background: var(--accent); color: var(--on-accent); font-size: .92rem; font-weight: 680; text-decoration: none; }
.studio-action:hover { background: var(--accent-hover); }
.studio-action:disabled { opacity: .65; cursor: wait; }
.studio-action.secondary, .catalog-download { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.studio-action.secondary:hover, .catalog-download:hover { background: var(--accent-subtle); }
.studio-action .icon { width: 1rem; height: 1rem; }
.studio-hero .studio-action { background: var(--hero-action); color: #212c3f; border-color: transparent; }
.studio-hero .studio-action:hover { background: var(--hero-action-hover); }
.studio-hero .studio-action.secondary { background: #132944a8; color: #f5f7ff; border-color: #a1b3d49c; }
.studio-hero .studio-action.secondary:hover { background: #293f63; }
.studio-hero :is(a, button):focus-visible { outline-color: var(--hero-action); }
.version-pill { display: inline-flex; align-items: center; gap: .36rem; padding: .36rem .65rem; border: 1px solid var(--line); border-radius: 2rem; background: var(--surface); color: var(--ink); font-size: .78rem; font-weight: 650; white-space: nowrap; }
.overview-metrics { margin-bottom: 1.45rem; }
.overview-metrics > .hint { margin: .65rem 0 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .65rem; flex-wrap: wrap; }
.section-heading > span { color: var(--muted); font-size: .84rem; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.metric { display: flex; flex-direction: column; min-width: 0; padding: .72rem clamp(.75rem, 1.6vw, 1.35rem); }
.metric + .metric { border-left: 1px solid var(--line); }
.metric dt { color: var(--muted); font-size: .88rem; font-weight: 610; }
.metric dd { margin: .16rem 0 .15rem; font-size: clamp(1.45rem, 2.4vw, 1.85rem); line-height: 1.05; font-weight: 690; font-variant-numeric: tabular-nums; letter-spacing: -.035em; overflow-wrap: anywhere; }
.metric dd span { font-size: .8rem; letter-spacing: 0; }
.metric small { margin-top: auto; font-size: .78rem; }
.metric-balance { background: var(--accent-subtle); }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: start; gap: 1.15rem; }
.studio-upload, .studio-gallery { min-width: 0; padding: clamp(1rem, 2vw, 1.35rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.studio-gallery { background: transparent; }
.studio-upload { scroll-margin-top: 1rem; }
.studio-section-header { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: .6rem; margin-bottom: .85rem; }
.studio-section-header h2, .batch-section h2 { margin: 0; font-size: 1.42rem; line-height: 1.2; }
.upload-help, .studio-steps { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.studio-steps { display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; margin: .85rem 0 0; padding: .7rem 0 0 1.2rem; border-top: 1px solid var(--line); }
.studio-steps strong { color: var(--ink); }
.upload-help { padding-top: .65rem; }
.upload-help p { margin: .55rem 0 0; }
.upload-help code { overflow-wrap: anywhere; }
.gallery-switch { display: inline-flex; gap: .18rem; padding: .18rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--subtle); }
.gallery-switch button { padding: .29rem .58rem; border: 0; border-radius: .3rem; background: transparent; color: var(--muted); font-size: .79rem; }
.gallery-switch button[aria-pressed="true"], .gallery-switch button:hover { background: var(--surface); color: var(--ink); }
.gallery-switch button[aria-pressed="true"] { box-shadow: 0 1px 2px #2223; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .72rem; }
.gallery-grid figure { min-width: 0; margin: 0; }
.gallery-image { display: block; height: clamp(8rem, 14vw, 12rem); overflow: hidden; border-radius: .5rem; background: var(--subtle); }
.gallery-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-image:hover { box-shadow: 0 0 0 2px var(--accent); }
.gallery-empty { display: grid; min-height: 12rem; align-content: center; justify-items: center; gap: .55rem; padding: .8rem; background: var(--subtle); border-radius: .65rem; color: var(--muted); text-align: center; font-size: .94rem; }
.gallery-empty p { margin: 0; }
.gallery-empty .icon { width: 2rem; height: 2rem; }
.gallery-grid figcaption { margin-top: .4rem; color: var(--muted); font-size: .8rem; }
.gallery-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .45rem; margin-top: .75rem; }
.shoot-panel + .shoot-panel { margin-top: .8rem; }
summary { cursor: pointer; }
.batch-section { margin-top: 1.15rem; }
.batch-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: .65rem; margin-bottom: .65rem; }
.batch-heading .hint { margin: .25rem 0 0; }
.batch-search { display: flex; align-items: center; flex-wrap: wrap; gap: .42rem; max-width: 100%; font-size: .83rem; }
.batch-search input { min-width: 0; max-width: 100%; width: 10.5rem; padding: .56rem .55rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--surface); color: var(--ink); }
.batch-search button { padding: .56rem .65rem; }
.batch-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .86rem; }
.batch-table th, .batch-table td { padding: .7rem .45rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.batch-table th:first-child { padding-left: .12rem; overflow-wrap: anywhere; }
.batch-table thead th { color: var(--muted); font-size: .76rem; font-weight: 650; }
.batch-table tbody tr:last-child > * { border-bottom: 0; }
.batch-article { color: var(--ink); font-weight: 720; text-decoration: none; }
.batch-article:hover { text-decoration: underline; }
.batch-code, .batch-demo { display: block; margin-top: .16rem; color: var(--muted); font-size: .72rem; font-weight: 500; }
.batch-status { display: inline-flex; align-items: center; gap: .32rem; max-width: 100%; padding: .2rem .43rem; border-radius: 1rem; background: var(--subtle); color: var(--muted); font-size: .72rem; font-weight: 700; }
.batch-status::before { content: ""; flex: 0 0 .35rem; height: .35rem; border-radius: 50%; background: currentColor; }
.batch-status.ready { background: #eaf3e9; color: #286246; }
.batch-status.running { background: #eeecfa; color: #4c48a1; }
.batch-status.warning { background: #fbefd7; color: #79500e; }
.batch-status.error { background: #f9e8e5; color: #8e3729; }
.demo-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem 1rem; margin-top: 1.2rem; font-size: .83rem; }
.demo-tools button { font-size: inherit; }
.cost-preview { padding: .85rem 1rem; margin: .9rem 0 1.15rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--subtle); }
.cost-preview h3 { margin: 0 0 .42rem; font-size: .95rem; }
.nano-choice { border-color: var(--field-line); background: var(--accent-subtle); }
.cost-preview p { margin: .35rem 0; }
.cost-preview .hint { margin-top: .62rem; }
.style-picker fieldset { margin: 0 0 .85rem; padding: 0; border: 0; }
.style-picker legend { padding: 0; font-size: 1.2rem; font-weight: 700; }
.style-picker .hint { margin: .25rem 0 .8rem; }
.batch-forecast { margin-bottom: 1rem; }
.batch-budget-rates .cost-preview { margin: .65rem 0; }
.batch-budget-details { margin-top: .75rem; font-size: .88rem; }
.batch-budget-details ul { margin: .5rem 0; padding-left: 1.2rem; color: var(--muted); overflow-wrap: anywhere; }
.source-fields select { display: block; width: 100%; margin-bottom: .5rem; padding: .42rem; border: 1px solid var(--field-line); border-radius: .45rem; font: inherit; color: var(--ink); background: var(--surface); }
.source-fields button { padding: .45rem .55rem; font-size: .84rem; }
.style-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.style-option { display: flex; align-items: start; gap: .55rem; padding: .85rem; border: 1px solid var(--line); border-radius: .55rem; cursor: pointer; }
.style-option:has(:checked) { border-color: var(--field-line); background: var(--accent-subtle); }
.style-option input { flex: 0 0 auto; margin: .3rem 0 0; accent-color: var(--accent); }
.style-option strong { display: block; margin-bottom: .15rem; font-size: 1.15rem; }
.style-option small { display: block; line-height: 1.35; }
.prompt-reset { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--line); font-size: .9rem; }
.library-layout { display: grid; grid-template-columns: minmax(13rem, 1fr) minmax(0, 2.4fr); gap: 1rem; align-items: start; }
.prompt-nav { display: grid; gap: .2rem; padding: .55rem; }
.prompt-nav a { display: flex; justify-content: space-between; gap: .5rem; padding: .62rem .7rem; color: var(--ink); text-decoration: none; border-radius: .5rem; font-size: .94rem; }
.prompt-nav a:hover, .prompt-nav [aria-current] { background: var(--accent-subtle); color: var(--accent); }
.prompt-nav [aria-current] { font-weight: 700; }
.library-content { display: grid; gap: 1rem; min-width: 0; }
.prompt-preview { border-radius: .55rem; background: var(--subtle); padding: 1rem; line-height: 1.65; }
.revision-list { list-style: none; margin: 0; padding: 0; }
.revision-list li { padding: .65rem 0; border-top: 1px solid var(--line); }
.revision-list li span { margin: 0 .4rem; overflow-wrap: anywhere; }
.errorlist { padding-left: 1.4rem; color: #67271d; }
.login-panel { max-width: 28rem; }
.login-panel input:not([type="hidden"]) { display: block; width: 100%; margin-top: .35rem; border: 1px solid var(--field-line); border-radius: .45rem; padding: .6rem; }
.catalog-search { max-width: 43rem; }
.catalog-search label { display: block; margin-bottom: .55rem; font-weight: 650; }
.catalog-search > div { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.catalog-search input { flex: 1 1 13rem; width: 100%; min-width: 0; border: 1px solid var(--field-line); border-radius: .5rem; padding: .65rem .75rem; }
.catalog-results, .catalog-style { margin-top: 1.65rem; }
.catalog-articles, .catalog-frames { display: grid; padding: 0; list-style: none; }
.catalog-articles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: .65rem; margin: 0; }
.catalog-articles a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem .95rem; text-decoration: none; overflow-wrap: anywhere; }
.catalog-articles a:hover { background: var(--accent-subtle); border-color: var(--field-line); }
.catalog-pagination { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-top: 1.2rem; }
.catalog-article-title { overflow-wrap: anywhere; }
.catalog-version + .catalog-version { margin-top: .85rem; }
.catalog-version header { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: .7rem; margin-bottom: .85rem; }
.catalog-version h3 { margin: 0; font-size: 1.04rem; overflow-wrap: anywhere; }
.catalog-version header p { margin: .25rem 0 0; }
.catalog-download { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem .8rem; border-radius: .45rem; font-size: .88rem; font-weight: 650; text-decoration: none; }
.catalog-frames { grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr)); gap: .8rem; margin: 0; }
.catalog-frames li { min-width: 0; max-width: 13rem; }
.catalog-frames a { display: block; border-radius: .45rem; overflow: hidden; background: var(--subtle); }
.catalog-frames img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; }
.catalog-frames p { margin: .35rem 0 0; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.catalog-omissions { margin-bottom: 0; overflow-wrap: anywhere; }
.catalog-omissions strong { display: block; color: var(--ink); }
.team-panel, .invite-copy { margin-top: 1rem; }
.invite-copy label { display: block; margin-bottom: .4rem; font-weight: 650; }
.invite-copy > div { display: flex; flex-wrap: wrap; gap: .55rem; }
.invite-copy input { flex: 1 1 16rem; min-width: 0; padding: .6rem; border: 1px solid var(--field-line); border-radius: .45rem; }

:is(.article-field input, .prompt-form textarea, .prompt-form select, .seed-input, .source-fields select,
  .login-panel input:not([type="hidden"]), .catalog-search input, .invite-copy input) {
  color: var(--ink);
  background: var(--surface);
}
[data-studio-theme="dark"] .unresolved { border-color: #87704b; background: #3c3224; }
[data-studio-theme="dark"] .unresolved h2 span { background: #50432c; }
[data-studio-theme="dark"] .pending { color: #f0cf92; }
[data-studio-theme="dark"] .errorlist { color: var(--error-ink); }
[data-studio-theme="dark"] .notice { border-color: #90665d; color: var(--error-ink); background: #422e29; }
[data-studio-theme="dark"] .batch-status.ready { color: #b6e2bc; background: #314638; }
[data-studio-theme="dark"] .batch-status.running { color: #d2c8fa; background: #3d3655; }
[data-studio-theme="dark"] .batch-status.warning { color: #f0cf92; background: #50432c; }
[data-studio-theme="dark"] .batch-status.error { color: var(--error-ink); background: #4d332e; }
.team-list { margin: 0; padding: 0; list-style: none; }
.team-list li { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem 1rem; padding: .65rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.team-list li > span { color: var(--muted); }

@media (max-width: 950px) {
  body { display: block; }
  .sidebar { position: static; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; min-height: 0; height: auto; padding: .7rem clamp(1.15rem, 3.8vw, 3.75rem); border-right: 0; border-bottom: 1px solid var(--line); }
  .main-nav { display: flex; flex-wrap: wrap; justify-content: center; }
  .main-nav [aria-current]::before { inset: auto .55rem .1rem; width: auto; height: 2px; }
  .account { margin-top: 0; padding: 0; border: 0; }
  .account-name { max-width: 12ch; }
}
@media (min-width: 681px) and (max-width: 1150px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric:nth-child(3n + 1) { border-left: 0; }
  .metric:nth-child(n + 4) { border-top: 1px solid var(--line); }
}
@media (max-width: 680px) {
  .studio-grid, .generation-layout, .library-layout { grid-template-columns: 1fr; }
  .prompt-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prompt-nav a { align-items: start; padding: .5rem; }
  .sidebar { grid-template-columns: minmax(0, 1fr) auto; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; flex-wrap: nowrap; justify-content: start; overflow-x: auto; padding: .2rem .15rem; }
  .main-nav a { flex: 0 0 auto; gap: .4rem; min-height: 2.35rem; padding: .46rem .52rem; }
  .main-nav a:focus-visible { outline-offset: -2px; }
  .brand { padding: 0; }
  .studio-hero { min-height: 17rem; padding: 1.4rem 1.1rem; border-radius: .9rem; }
  .studio-hero h1 { font-size: clamp(3.05rem, 10.5vw, 4.1rem); }
  .studio-cover { inset: 0; width: 100%; height: 100%; mask-image: none; object-fit: cover; object-position: 61% 50%; }
  .studio-hero::before { background: linear-gradient(90deg, #102239e8, #1022399e 48%, #10223918 82%); }
  .studio-hero-content p { max-width: 14rem; }
  .batch-table .batch-date { display: none; }
  .batch-table th, .batch-table td { padding-right: .25rem; padding-left: .25rem; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(odd) { border-left: 0; }
  .metric:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 390px) {
  .main-nav { flex-wrap: wrap; overflow: visible; gap: .2rem; }
  .main-nav a { padding-inline: .36rem; font-size: .88rem; }
  .main-nav .icon { display: none; }
  .studio-hero .studio-action { font-size: .85rem; padding-inline: .55rem; }
  .studio-hero .studio-action .icon { width: .87rem; height: .87rem; }
  .batch-table { font-size: .77rem; }
  .batch-status { font-size: .67rem; }
}
