body.creation-page {
  --studio-nav: 207px;
  --studio-top: 44px;
  --studio-panel: 317px;
  --studio-border: #303032;
  --studio-panel-bg: #141415;
  --studio-ink: #fafafa;
  --studio-muted: #adadb2;
  --studio-accent: #ff70c7;
  --studio-gradient: linear-gradient(175deg, #f65bb0, #d52a85 35%, #bd1176);
  min-height: 100vh;
  margin: 0;
  background: #0d0d0e;
  color: var(--studio-ink);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}
.creation-page *, .creation-page *::before, .creation-page *::after { box-sizing: border-box; }
.creation-page [hidden] { display: none !important; }
.creation-form.editing-source .preset-slot:has(.preset-tile[data-field="character"]) { display: none; }
.creation-page .studio-symbols { position: absolute; inset: 0 auto auto 0; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.creation-page svg:not(.studio-symbols) { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.creation-page :is(button, a) { touch-action: manipulation; }
.creation-page :is(button, a, summary, select, textarea, input):focus-visible { outline: 2px solid #ff93d4; outline-offset: 2px; }
.creation-page .app-topbar {
  inset: 0 0 auto var(--studio-nav);
  height: var(--studio-top);
  padding-inline: 22px;
  justify-content: flex-end;
  gap: 12px;
  background: #0d0d0ef5;
  border: 0;
  box-shadow: none;
}
.creation-page .app-topbar .topbar-start { display: none; }
#creationMembership { display: inline-grid; place-items: center; min-height: 44px; flex: none; }
.membership-pill { display: inline-flex; align-items: center; gap: 5px; height: 32px; border-radius: 999px; padding: 0 14px; background: linear-gradient(165deg,#e83c98,#cc157e); color: white; font-size: 13px; font-weight: 750; }
.creation-page .membership-pill svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.creation-page .app-topbar .account-bar { margin: 0; }
.app-topbar .studio-header-control { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; }
.creation-brand { display: flex; align-items: center; min-height: 44px; min-width: 0; }
.creation-workspace {
  display: grid;
  grid-template-columns: var(--studio-panel) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin-left: var(--studio-nav);
  padding: calc(var(--studio-top) + 6px) 18px 16px 16px;
}
.creation-form {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--studio-border);
  border-radius: 30px;
  background: var(--studio-panel-bg);
  overflow: visible;
}
.form-modes { flex: none; padding: 16px 16px 0; }
.form-scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #454548 transparent; flex: 1 1 auto; min-height: 0; padding: 0 16px 8px; }
.panel-title { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 40px; padding: 6px 12px; margin: 0; border-radius: 22px; background: #242426; color: #fafafa; font-size: 14px; font-weight: 690; letter-spacing: .01em; }
.panel-title svg { color: #ff9dd7; }
.image-tabs { display: flex; gap: 5px; margin: 10px 0 10px; }
.image-tabs button, .feed-tabs button { min-height: 34px; padding: 6px 11px; border-radius: 18px; color: var(--studio-muted); font-size: 13px; }
.image-tabs button:is([aria-pressed=true], [aria-selected=true], .is-active), .feed-tabs button:is([aria-pressed=true], [aria-selected=true], .is-active) { color: white; font-weight: 650; background: #323234; }
.image-tabs button:hover, .feed-tabs button:hover { color: white; }
.preset-section h2, .prompt-field label, .generation-options label, .custom-label { display: block; margin: 0 0 7px; font-size: 13px; line-height: 1.35; font-weight: 670; color: #ededee; }
.preset-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.preset-slot { position: relative; min-width: 0; }
.preset-remove { position: absolute; top: 4px; inset-inline-end: 4px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 50%; background: #171318c9; color: white; font-size: 17px; }
.preset-remove:hover { background: #171318; }
.preset-remove svg { width: 14px; height: 14px; }
.preset-tile {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 96px;
  aspect-ratio: 4 / 5;
  padding: 12px 8px 9px;
  border: 1px solid #343436;
  border-radius: 9px;
  background: #2d2d30;
  color: #fafafa;
  overflow: hidden;
}
.preset-tile:hover { border-color: #77737a; background: #333336; }
.preset-tile[data-field=character]:not(.has-choice) { border: 1px dashed #986282; background: #2c202a; }
.preset-tile[data-field=character].has-choice { border-color: #ff86ce; }
.preset-tile[data-field=character]:not(.has-choice) .preset-icon { background: #473041; color: #ffc4e9; }
.preset-tile:focus-visible { outline-offset: -3px; }
.preset-art { position: absolute; z-index: -1; inset: 0; pointer-events: none; }
.preset-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 27%; }
.preset-tile:has(img:not([hidden]))::after, .preset-tile.has-choice::after, .preset-tile.is-selected::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, #090809df 0%, #0908096e 35%, transparent 70%); pointer-events: none; }
.creation-page svg.preset-icon { padding: 10px; position: absolute; top: 35%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #222224; color: #b6b4bb; }
.preset-tile.has-art .preset-icon { opacity: 0; }
.preset-label, .preset-hint { position: relative; max-width: 100%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.preset-label { font-weight: 710; font-size: 15px; }
.preset-hint { margin-top: 2px; font-size: 11px; color: #c5c4c9; }
.preset-tile.has-choice .preset-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.preset-tile.has-choice .preset-hint { font-size: 14px; line-height: 1.25; font-weight: 700; color: white; }
.creation-age {
  margin-block-start: 12px;
  padding: 8px 11px 2px;
  border: 1px solid var(--studio-border);
  border-radius: 10px;
  background: #232325;
}
.creation-age-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; }
.creation-age-heading label { font-weight: 670; color: var(--studio-ink); }
.creation-age-heading output { margin-inline-start: auto; color: var(--studio-accent); font-variant-numeric: tabular-nums; font-weight: 670; }
.creation-age-heading button { padding: 2px 0; color: #c6afc2; font-size: 11px; text-decoration: underline; text-underline-offset: 2px; }
.creation-age-track { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.creation-age-track span { color: #bcb7bf; font-size: 11px; font-variant-numeric: tabular-nums; }
.creation-age-track input[type="range"] {
  --age-progress-color: var(--studio-accent);
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--studio-accent);
  cursor: pointer;
  touch-action: pan-y;
}
.creation-age[data-inherited] input { --age-progress-color: #65485c; }
.creation-age-track input::-webkit-slider-runnable-track { height: 5px; border-radius: 5px; background: linear-gradient(to right, var(--age-progress-color) var(--age-progress, 0%), #4a454e var(--age-progress, 0%)); }
.creation-age-track input::-moz-range-track { height: 5px; border-radius: 5px; background: linear-gradient(to right, var(--age-progress-color) var(--age-progress, 0%), #4a454e var(--age-progress, 0%)); }
.creation-age-track input::-webkit-slider-thumb { appearance: none; width: 17px; height: 17px; margin-top: -6px; border: 2px solid #ffd5f0; border-radius: 50%; background: currentColor; }
.creation-age-track input::-moz-range-thumb { box-sizing: border-box; width: 17px; height: 17px; border: 2px solid #ffd5f0; border-radius: 50%; background: currentColor; }
.creation-age-track input:focus-visible { outline: 2px solid var(--studio-accent); outline-offset: 2px; border-radius: 6px; }
.creation-age-track input:disabled { opacity: .55; cursor: default; }
.prompt-field { position: relative; margin-top: 20px; }
.prompt-field textarea, .generation-options textarea, .generation-options select, .creator-dialog :is(input[type=search],input[type=text],textarea) {
  display: block; width: 100%; min-width: 0; border: 1px solid #3c3c40; border-radius: 9px; padding: 10px 11px; font: inherit; font-size: 13px; line-height: 1.45; color: white; background: #232325;
}
.prompt-field textarea { resize: vertical; min-height: 60px; padding-bottom: 20px; }
.prompt-field small { position: absolute; bottom: 5px; right: 11px; color: #aaa7b0; font-size: 10px; pointer-events: none; }
.form-foot { flex: 0 0 auto; padding: 12px 16px 16px; border-radius: 0 0 30px 30px; background: var(--studio-panel-bg); }
.generation-tools, .dialog-head, .section-head, .source-strip, .dialog-actions, .result-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.generation-tools { position: relative; margin-bottom: 9px; }
.single-image, .generation-tools summary, .quiet-pill, .creation-outline, .solid-control, .edit-current, .result-actions a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; border-radius: 999px; padding: 7px 13px; background: #343436; color: white; font-size: 13px; font-weight: 580; }
.generation-tools summary { list-style: none; cursor: pointer; }
.generation-tools summary::-webkit-details-marker { display: none; }
.generation-tools summary .chevron { width: 13px; height: 13px; transition: transform .17s; }
.generation-tools details[open] .chevron { transform: rotate(180deg); }
.generation-options { position: absolute; z-index: 3; right: 0; bottom: calc(100% + 7px); width: 100%; max-height: min(52vh, 295px); overflow-y: auto; padding: 13px; background: #262629; border-radius: 14px; border: 1px solid #454548; box-shadow: 0 8px 28px #0007; }
.generation-options select { margin-bottom: 12px; }
.generation-options textarea { resize: vertical; min-height: 54px; }
.creation-submit { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 48px; border-radius: 999px; background: var(--studio-gradient); color: white; font-size: 15px; font-weight: 740; }
.creation-submit:disabled { background: #6e3a59; color: #edcddd; opacity: 1; }
.creation-submit:enabled:hover { box-shadow: 0 0 0 1px #ff9cd2; }
.creation-note { color: var(--studio-muted); font-size: 13px; line-height: 1.5; margin: 7px 0 0; }
.generator-feed { position: relative; min-width: 0; width: 100%; margin-inline: auto; container: studio-feed / inline-size; }
.examples, .creation-results { width: min(100%, 718px); margin-inline: auto; }
.creation-guide {
  width: min(100%, 718px);
  margin-inline: auto;
  padding: 0 3px 12px;
  scroll-margin-top: calc(var(--studio-top) + 10px);
}
.guide-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.guide-head h1 { margin: 0; font-size: clamp(20px, 2vw, 27px); line-height: 1.25; color: var(--studio-ink); overflow-wrap: anywhere; }
.guide-back { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--studio-border); border-radius: 999px; background: #202023; color: var(--studio-ink); font-size: 24px; line-height: 1; }
.guide-back:hover { background: #303033; }
.guide-choices { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.guide-choices :is(.builder-role, .builder-option) { width: 100%; }
.creation-guide :is(#guideMore, #guideBrowse) { min-height: 44px; margin: 8px 8px 0 0; }
.creation-ready { display: grid; justify-items: center; align-content: start; gap: clamp(12px, 4vh, 32px); width: min(100%, 854px); margin-inline: auto; }
.creation-ready h1 { margin: 0; color: var(--studio-ink); font-size: clamp(21px, 1.7vw, 24px); font-weight: 760; line-height: 1.25; text-align: center; }
.ready-cards { display: flex; align-items: center; justify-content: center; gap: clamp(6px, 1.7%, 15px); width: 100%; padding: 16px 25px; }
.ready-card {
  --tilt: 0deg;
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 0 1 min(180px, 33vh);
  min-width: 0;
  aspect-ratio: 2 / 3;
  padding: 4px;
  overflow: hidden;
  border: 1px solid #404043;
  border-radius: 13px;
  background: #252527;
  color: white;
  text-align: start;
  box-shadow: 0 6px 14px #0005;
  transform: rotate(var(--tilt));
}
.ready-card:nth-child(2 of :not([hidden])):nth-last-child(3 of :not([hidden])) { --tilt: -2.5deg; }
.ready-card:nth-child(3 of :not([hidden])):nth-last-child(2 of :not([hidden])) { --tilt: 2.5deg; }
.ready-card:nth-child(1 of :not([hidden])):has(~ .ready-card:not([hidden])) { --tilt: -7deg; }
.ready-card:not([hidden]) ~ .ready-card:nth-last-child(1 of :not([hidden])) { --tilt: 7deg; }
.ready-card:hover, .ready-card:focus-visible { border-color: #e49bc5; z-index: 1; }
.ready-card img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center 28%; border-radius: 8px 8px 3px 3px; }
.ready-card:has(img:not([hidden])) .preset-icon { display: none; }
.ready-label { display: block; align-self: end; min-width: 0; grid-row: 2; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 3px 4px 2px; font-size: 13px; font-weight: 670; line-height: 1.3; }
.creation-ready .ready-action { width: min(100%, 384px); }
.action-cost { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.feed-tabs { display: flex; align-items: center; justify-content: center; gap: 4px; }
.feed-tabs button { min-height: 26px; padding: 4px 11px; font-size: 12px; }
.examples h1 { margin: 6px 0 8px; text-align: center; font-size: clamp(22px, 2vw, 28px); line-height: 1.25; letter-spacing: -.045em; }
.gallery-filters { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 23px; }
.filter-control { position: relative; display: inline-flex; align-items: center; max-width: 49%; }
.filter-control select { appearance: none; max-width: 100%; min-height: 36px; border: 0; border-radius: 999px; padding: 7px 31px 7px 15px; background: #343436; color: white; font-size: 13px; cursor: pointer; }
.filter-control svg { pointer-events: none; position: absolute; right: 11px; width: 12px !important; }
.example-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.example-card, .builder-role, .builder-option {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 4 / 5;
  border: 1px solid #2b2b2e;
  border-radius: 9px;
  background: #232326;
  padding: 0;
  text-align: left;
  color: white;
}
.example-card img, .builder-role-photo, .builder-role img, .builder-option-art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 24%; }
.example-card::after, .builder-role::after, .builder-option::after { content: ""; position: absolute; inset: 30% 0 0; background: linear-gradient(transparent 25%, #060607c9); pointer-events: none; }
.example-card > span, .builder-role-name, .builder-option-label { position: absolute; z-index: 1; bottom: 9px; left: 9px; right: 7px; color: white; text-shadow: 0 1px 5px #0009; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.example-card > span { font-size: clamp(15px, 1.35vw, 19px); }
.example-card:hover, .builder-role:hover, .builder-option:hover { border-color: #a17c94; }
.example-card:focus-visible, .builder-role:focus-visible, .builder-option:focus-visible { outline-offset: -3px; }
.builder-role-photo { display: grid; place-items: center; }
.builder-role-initial { color: #e8bcd7; font-size: 22px; }
.builder-option-art { background: var(--option-image) center 30% / cover no-repeat; }
.builder-option:is([data-group="pose"], [data-group="outfit"])[data-option^="preset-"] { aspect-ratio: 3 / 4; }
.builder-option[data-option^="preset-"] .builder-option-art { background-position: center; background-size: contain; }
.builder-option[data-option^="preset-"] .builder-option-label { white-space: normal; overflow-wrap: anywhere; }
.creation-page :is(.preset-art, .ready-card) img[src^="/studio-media/presets-20261202/"] { object-fit: contain; object-position: center; }
.preset-gender-choice { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.preset-gender-choice :is(p, .creation-note) { flex: 0 0 100%; margin: 0; }
.preset-gender-choice button { min-height: 44px; }
.builder-role-name, .builder-option-label { font-size: 13px; }
.builder-option.is-selected, .builder-role.is-selected, .builder-option[aria-pressed=true], .builder-role[aria-pressed=true] { border-color: #ff8cd0; outline: 2px solid #ff8cd0; outline-offset: -2px; }
.builder-option[aria-pressed=true]::before, .builder-role[aria-pressed=true]::before { content: "✓"; position: absolute; z-index: 2; right: 6px; top: 6px; width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: #311326; background: #ff94d1; font-size: 13px; font-weight: 800; }
.creator-dialog { width: min(570px, calc(100vw - 30px)); max-height: min(82dvh, 760px); overflow: hidden; margin: auto; padding: 18px; border: 1px solid #424244; border-radius: 22px; color: #fafafa; background: #19191b; }
.creator-dialog[open] { display: flex; flex-direction: column; }
#creationRoleDialog[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(0, 1fr);
  height: 100dvh;
}
.creator-dialog::backdrop { background: #000a; }
.dialog-head { flex: 0 0 auto; margin-bottom: 12px; }
.dialog-head h2, .section-head h2, .creation-output h2 { margin: 0; font-size: 20px; line-height: 1.25; }
.round-control { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; background: #333336; }
.dialog-toolbar { display: flex; align-items: stretch; gap: 8px; }
.dialog-toolbar input { flex: 1; min-width: 0; }
.dialog-toolbar .quiet-pill { flex: none; }
.role-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; }
.role-scroll, .preset-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 2px; overscroll-behavior: contain; scrollbar-width: thin; }
.role-grid, .preset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.preset-grid { margin-bottom: 14px; }
#creationRoleMore { display: flex; margin: 14px auto 2px; }
.dialog-actions { flex: none; margin-top: 13px; }
.solid-control, .edit-current { padding-inline: 20px; color: #22111b; background: #ff92d0; }
.source-strip { margin: 10px 0; padding: 7px 9px; border-radius: 10px; background: #2d242b; }
.source-strip img { width: 40px; height: 50px; object-fit: contain; border-radius: 7px; }
.source-strip strong { font-size: 12px; margin-right: auto; }
.source-strip button, .quiet-link { color: var(--studio-accent); font-size: 13px; }
.creation-results { margin-top: 16px; }
.creation-output:has(#creationCanvas[data-mode=empty]) { display: none; }
.creation-output h2 { margin: 0 0 11px; }
.creation-canvas { position: relative; isolation: isolate; display: grid; place-items: center; overflow: hidden; border: 1px solid #323236; border-radius: 13px; background: #1f1f22; min-height: 210px; height: min(61vh, 560px); }
.studio-reference, .studio-reference img, .free-preview, #creationImage { position: absolute; inset: 0; width: 100%; height: 100%; }
.studio-reference img, #creationImage { object-fit: contain; background: #131315; }
.free-preview { background: var(--option-image) center / cover no-repeat; }
.reference-caption { position: absolute; left: 0; bottom: 0; right: 0; padding: 50px 18px 16px; background: linear-gradient(transparent, #09090bcc); display: grid; gap: 3px; }
.reference-caption strong { font-size: 19px; }
.creation-placeholder { position: relative; z-index: 1; display: grid; gap: 9px; justify-items: center; padding: 16px; text-align: center; }
.creation-placeholder p { margin: 0; }
.creation-canvas:is([data-mode=empty],[data-mode=ready]) .creation-placeholder, .creation-canvas:not([data-mode=empty]) .reference-caption { display: none; }
.creation-canvas:not([data-mode=empty]) .studio-reference { opacity: .12; }
.creation-canvas[data-mode=ready] .studio-reference { visibility: hidden; }
.creation-canvas[data-mode=busy] .loader { width: 26px; height: 26px; border: 2px solid #765365; border-top-color: #ff9dd7; border-radius: 50%; animation: creator-spin .8s linear infinite; }
@keyframes creator-spin { to { transform: rotate(360deg); } }
.result-actions { justify-content: flex-start; margin-top: 10px; }
.works { scroll-margin-top: 72px; margin-top: 25px; border-top: 1px solid #303033; padding: 16px 0; }
.history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 9px; margin-top: 12px; }
.history-grid button { aspect-ratio: 4/5; border: 1px solid #38383c; border-radius: 9px; overflow: hidden; padding: 0; background: #1f1f21; }
.history-grid img { display: block; width: 100%; height: 100%; object-fit: contain; }
.history-grid button[aria-pressed=true] { border-color: var(--studio-accent); }
@media (min-width:1001px), (min-width:761px) and (min-height:541px), (min-width:761px) and (pointer:fine), (min-width:761px) and (pointer:none) {
  .preset-section h2 { position: sticky; top: 0; z-index: 1; margin: 0; padding-bottom: 7px; background: var(--studio-panel-bg); }
  .creation-workspace { height: 100vh; height: 100dvh; grid-template-rows: minmax(0,1fr); align-items: stretch; }
  .generator-feed { min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; }
  .generator-feed[data-ready="true"] .feed-tabs { display: none; }
  .generator-feed[data-ready="true"] .creation-ready { min-height: 100%; padding-bottom: 32px; }
  @container studio-feed (max-width: 430px) {
    .guide-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ready-cards:has(> :nth-child(3 of :not([hidden]))) { display: grid; grid-template-columns: repeat(2, minmax(0, 104px)); gap: 10px 12px; padding: 8px 14px; }
    .ready-cards:has(> :nth-child(3 of :not([hidden]))) .ready-card { width: 100%; transform: none; }
    .creation-ready .ready-action { width: min(calc(100% - 16px),384px); }
  }
}
@media (min-width:761px) and (max-width:1230px) {
  body.creation-page { --studio-nav: 170px; --studio-panel: 284px; }
  .creation-workspace { gap: 19px; padding-right: 14px; }
}
@media (min-width:761px) and (max-width:1000px) {
  body.creation-page { --studio-panel: 252px; }
  .creation-workspace { gap: 12px; padding-left: 10px; }
  .example-grid { gap: 6px; }
}
@media (max-width:760px), (max-width:1000px) and (max-height:540px) and (pointer:coarse) {
  :is(#creationRoleDialog, #presetDialog) {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: min(88dvh, 740px);
    margin: 0;
    padding: 16px max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
  }
  :is(#creationRoleDialog, #presetDialog) .round-control { min-width: 44px; min-height: 44px; }
  body.creation-page {
    --studio-nav: 0px;
    --studio-top: var(--mobile-site-header-height);
  }
  .creation-page .app-topbar {
    inset: 0 0 auto;
    height: var(--studio-top);
    padding: env(safe-area-inset-top) max(7px, env(safe-area-inset-right)) 0 env(safe-area-inset-left);
    gap: 8px;
    border-bottom: 1px solid var(--mobile-site-header-border);
    background: var(--mobile-site-header-background);
  }
  .creation-page .app-topbar .topbar-start { display: flex; flex: none; gap: 0; margin-inline-end: auto; }
  .app-topbar .studio-header-control { flex: none; }
  .app-topbar #creationMenuToggle { padding-inline-start: 4px; color: #ebc2de; }
  .app-topbar .creation-brand .site-wordmark { transform: translateY(var(--mobile-brand-offset)); }
  .creation-page .app-topbar > .account-bar { display: none; }
}
@media (max-width:360px) {
  .creation-page .membership-pill { padding-inline: 10px; }
}
@media (max-width:760px), (max-width:1000px) and (max-height:540px) and (pointer:coarse) {
  .creation-page .app-topbar { position: sticky; }
  .creation-workspace { display: grid; grid-template-columns: minmax(0, 545px); justify-content: center; gap: 18px; margin-left: 0; padding: 10px max(12px, env(safe-area-inset-right)) calc(var(--mobile-bottom-nav-height) + 16px) max(12px, env(safe-area-inset-left)); }
  .creation-form, #creationOutputTitle, #creationGuide { scroll-margin-top: calc(var(--studio-top) + 10px); }
  .examples h1 { font-size: 24px; margin: 10px 0; }
  .guide-choices { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .creation-ready { gap: 8px; padding: 6px 3px 18px; scroll-margin-top: calc(var(--studio-top) + 10px); }
  .creation-ready h1 { font-size: 22px; }
  .ready-cards { gap: 5px; padding: 8px; }
  .ready-card { flex-basis: min(90px, 24%); border-radius: 9px; padding: 3px; }
  .ready-label { font-size: 11px; padding-inline: 2px; }
  .creation-ready .ready-action { min-height: 44px; }
  .gallery-filters { margin-bottom: 14px; }
  .example-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .example-card > span { font-size: 13px; bottom: 8px; left: 8px; }
  .creation-page .studio-bottom-nav { display: grid; position: fixed; z-index: 70; inset: auto 0 0; }
  .creation-form { position: static; height: auto; width: 100%; border-radius: 22px; }
  .form-modes { padding: 14px 14px 0; }
  .form-scroll { overflow: visible; padding: 0 14px 4px; }
  .panel-title { display: none; }
  .form-foot { padding: 9px 14px 14px; border-radius: 0 0 22px 22px; }
  .preset-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .editing-source .preset-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .preset-tile { width: 100%; aspect-ratio: 3 / 4; min-height: 85px; align-items: flex-start; text-align: start; padding: 7px; }
  .preset-tile[aria-current=step] { border-color: #ff96ce; box-shadow: inset 0 0 0 1px #ff96ce; }
  .preset-label { font-size: 13px; line-height: 1.2; }
  .preset-remove { width: 26px; height: 26px; top: 3px; inset-inline-end: 3px; }
  .preset-hint { font-size: 11px; line-height: 1.2; }
  .preset-tile.has-choice .preset-hint { font-size: 12px; }
  .preset-tile[data-field=character]:not(.has-choice) { align-items: center; justify-content: center; padding-inline: 3px; text-align: center; }
  .preset-tile[data-field=character]:not(.has-choice) .preset-icon { position: static; transform: none; flex: none; margin-bottom: 3px; }
  .preset-tile[data-field=character]:not(.has-choice) .preset-label { white-space: normal; overflow-wrap: anywhere; }
  .preset-tile:not(.has-choice) .preset-art[data-option] {
    background: linear-gradient(0deg, #171217eb, #21171e22 75%), var(--option-image) center 28% / cover;
  }
  .preset-tile:not(.has-choice) .preset-art[data-option^="preset-"] { background-size: cover, contain; background-position: center; background-repeat: no-repeat; }
  .preset-tile:not(.has-choice):has(.preset-art[data-option]) .preset-icon { opacity: 0; }
  .creation-page svg.preset-icon { width: 33px; height: 33px; padding: 8px; }
  .image-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 3px; border: 1px solid #343436; border-radius: 24px; background: #1b1b1d; margin: 0 0 12px; }
  .image-tabs button { min-width: 0; min-height: 38px; overflow-wrap: anywhere; }
  .image-tabs button[aria-pressed=true] { background: #f7f4f6; color: #20191d; }
  .prompt-block { position: relative; margin-top: 10px; }
  .prompt-field { margin-top: 0; }
  .prompt-field label { display: flex; align-items: center; width: 54%; min-height: 32px; margin-bottom: 3px; }
  .prompt-field textarea { height: 64px; padding-block: 7px 16px; }
  .prompt-field textarea, .generation-options :is(textarea,select), .creator-dialog :is(input[type=search],input[type=text],textarea) { font-size: 16px; }
  .role-grid, .preset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .creator-dialog { width: calc(100vw - 18px); max-height: min(86dvh, 730px); padding: 14px; border-radius: 18px; }
  .role-filters select { min-height: 44px; font-size: 16px; }
  .creation-results { margin-top: 12px; }
  .history-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .creation-canvas { min-height: 195px; height: min(54vh, 460px); }
}
@media (max-width:760px) and (pointer:coarse), (max-width:1000px) and (max-height:540px) and (pointer:coarse) {
  /* The shared six-pixel scrollbar shifts WebKit's visual viewport on touch. */
  body.creation-page::-webkit-scrollbar { width: 0; height: 0; }
}
@media (max-width:360px) {
  .creation-workspace { padding-inline: 11px; }
}
@media (min-width:761px) and (max-height:650px) and (pointer:fine), (min-width:761px) and (min-height:541px) and (max-height:650px), (min-width:1001px) and (max-height:650px) {
  .form-foot:has(#creationSettings[open]) { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .generation-tools:has(#creationSettings[open]) { display: grid; grid-template-columns: auto 1fr; align-items: start; }
  .generation-tools:has(#creationSettings[open]) .quantity-picker { grid-area: 1 / 1; z-index: 1; }
  #creationSettings[open] { grid-area: 1 / 1 / 2 / -1; }
  #creationSettings[open] summary { display: flex; width: max-content; margin-inline-start: auto; }
  .generation-options { position: static; max-height: none; margin-top: 8px; overflow: visible; box-shadow: none; }
  .creation-form:has(#creationSettings[open]) .form-scroll { flex-basis: 0; padding-block: 0; }
}
@media (max-height:450px) {
  :is(#creationRoleDialog, #presetDialog) { max-height: calc(100dvh - 12px); padding-block: 8px; }
  :is(#creationRoleDialog, #presetDialog) .dialog-head { margin-bottom: 6px; }
  .role-filters { margin-block: 6px; }
}
@media (prefers-reduced-motion:reduce) { .creation-canvas[data-mode=busy] .loader { animation: none; } }

.creation-page [data-option="anime"] { --option-image: url("/studio-media/anime.webp"); }
.creation-page [data-option="cafe"] { --option-image: url("/studio-media/cafe.webp"); }
.creation-page [data-option="city"] { --option-image: url("/studio-media/city.webp"); }
.creation-page [data-option="coast"] { --option-image: url("/studio-media/coast.webp"); }
.creation-page [data-option="coffee"] { --option-image: url("/studio-media/coffee.webp"); }
.creation-page [data-option="collar"] { --option-image: url("/studio-media/collar.webp"); }
.creation-page [data-option="daylight"] { --option-image: url("/studio-media/daylight.webp"); }
.creation-page [data-option="denim"] { --option-image: url("/studio-media/denim.webp"); }
.creation-page [data-option="dress"] { --option-image: url("/studio-media/dress.webp"); }
.creation-page [data-option="film"] { --option-image: url("/studio-media/film.webp"); }
.creation-page [data-option="front"] { --option-image: url("/studio-media/front.webp"); }
.creation-page [data-option="glance"] { --option-image: url("/studio-media/glance.webp"); }
.creation-page [data-option="knit"] { --option-image: url("/studio-media/knit.webp"); }
.creation-page [data-option="lean"] { --option-image: url("/studio-media/lean.webp"); }
.creation-page [data-option="library"] { --option-image: url("/studio-media/library.webp"); }
.creation-page [data-option="mono"] { --option-image: url("/studio-media/mono.webp"); }
.creation-page [data-option="profile"] { --option-image: url("/studio-media/profile.webp"); }
.creation-page [data-option="reading"] { --option-image: url("/studio-media/reading.webp"); }
.creation-page [data-option="seated"] { --option-image: url("/studio-media/seated.webp"); }
.creation-page [data-option="shirt"] { --option-image: url("/studio-media/shirt.webp"); }

.preset-dialog-fields, .preset-dialog-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 3px 0 10px; }
.preset-dialog-fields button, .preset-dialog-modes button { min-height: 32px; padding: 6px 12px; border: 1px solid #3b3b3e; border-radius: 16px; color: #c1bfc7; font-size: 13px; }
.preset-dialog-fields button:is([aria-pressed=true],[aria-selected=true],.is-selected), .preset-dialog-modes button:is([aria-pressed=true],[aria-selected=true],.is-selected) { border-color: #ac7694; background: #47333e; color: #ffe3f3; }

.quantity-picker { display:inline-flex; align-items:center; gap:7px; min-height:38px; padding:0 9px 0 12px; border:1px solid #454548; border-radius:999px; color:#eeebef; font-size:13px; }
.quantity-picker select { min-width:3.5em; min-height:36px; border:0; background:transparent; color:inherit; font:inherit; cursor:pointer; }
.quantity-picker option { background:#262629; color:white; }
.creation-quote { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:4px 12px; margin:10px 2px; color:#c5c0c7; font-size:12px; font-variant-numeric:tabular-nums; }
.creation-quote strong { font-size:16px; color:#fff0fa; }
#creationFunds { color:#f7b5dc; margin:0 2px 7px; }
.prompt-hints { margin:12px 0 4px; }
.prompt-hints summary { width: max-content; cursor: pointer; font-weight: 600; font-size: 13px; }
.hint-groups,.hint-options { display:inline-flex; flex-wrap:wrap; align-items:center; gap:5px; }
.hint-groups button { min-height:30px; border-bottom:2px solid transparent; padding:3px 6px; color:#b4b0b7; font-size:12px; }
.hint-groups button[aria-pressed=true] { border-color:#f186c7; color:#ffe1f3; }
.hint-options { display:flex; margin-top:5px; }
.hint-options button { min-height:32px; padding:5px 11px; border:1px solid #464349; border-radius:999px; background:#262529; color:#e8e3e9; font-size:12px; text-align:start; }
.hint-options button:enabled:hover { border-color:#b4779d; background:#393039; }
.hint-options button:disabled { color:#9b959d; opacity:.75; }
.quantity-picker:focus-within,.hint-options button:focus-visible,.batch-items button:focus-visible { outline:2px solid #f39cd1; outline-offset:2px; }
.batch-results { margin:0 0 14px; }
.batch-results p { margin:0 0 8px; color:#d6cfd7; font-size:13px; }
.batch-items { display:grid; grid-template-columns:repeat(auto-fill,minmax(106px,1fr)); gap:6px; max-height:min(36vh,300px); overflow-y:auto; padding:3px; }
.batch-items button { display:flex; align-items:center; justify-content:space-between; min-width:0; min-height:44px; gap:4px; padding:4px 6px; border:1px solid #454148; border-radius:9px; background:#222125; color:#e8e0e8; text-align:start; font-size:12px; }
.batch-items button[aria-pressed=true] { border-color:#d68db9; background:#3b2e37; }
.batch-items button:disabled { color:#beb6bf; }
.batch-items img { flex:none; width:32px; height:36px; object-fit:contain; }
#batchMore { margin-top:6px; }
#outputDimensions { color:#beb9c1; font-variant-numeric:tabular-nums; white-space:nowrap; }
.result-actions { flex-wrap:wrap; }
@media (max-width:760px), (max-width:1000px) and (max-height:540px) and (pointer:coarse) {
  .prompt-hints { margin: 0; }
  .prompt-hints summary { position: absolute; top: -6px; inset-inline-end: 0; display: flex; align-items: center; gap: 5px; min-height: 44px; max-width: 46%; padding: 0 5px; list-style: none; color: #e9c2da; font-size: 12px; }
  .prompt-hints summary::-webkit-details-marker { display: none; }
  .prompt-hints summary::after { content: "⌄"; }
  .prompt-hints[open] summary::after { transform: rotate(180deg); }
  .prompt-hints[open] { padding-top: 4px; }
  .generation-tools { flex-wrap: wrap; }
  .quantity-picker { gap: 4px; padding-inline: 7px; }
  .quantity-picker > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .quantity-picker select { min-width: 0; width: 2.6em; min-height: 40px; font-size: 16px; }
  #creationSettings { min-width: 0; margin-inline-start: auto; }
  #creationSettings summary { display: flex; width: fit-content; max-width: 100%; min-height: 42px; margin-inline-start: auto; gap: 4px; padding-inline: 9px; overflow-wrap: anywhere; }
  .generation-tools:has(#creationSettings[open]) { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; }
  .generation-tools:has(#creationSettings[open]) .quantity-picker { grid-area: 1 / 1; z-index: 1; }
  #creationSettings[open] { grid-area: 1 / 1 / 2 / -1; width: 100%; }
  #creationSettings[open] summary { max-width: calc(100% - 82px); }
  .generation-options { position: static; width: 100%; max-height: none; margin-top: 8px; box-shadow: none; }
  .hint-options button { min-height:36px; }
  .batch-items { grid-template-columns:repeat(auto-fill,minmax(94px,1fr)); }
}
@media (max-width:300px) {
  .ready-cards:has(> :nth-child(3 of :not([hidden]))) { display: grid; grid-template-columns: repeat(2,minmax(0,78px)); gap: 8px; }
  .ready-cards:has(> :nth-child(3 of :not([hidden]))) .ready-card { width: 100%; transform: none; }
  .generation-tools { gap: 5px; }
  .quantity-picker { gap: 1px; padding-inline: 4px; }
  .quantity-picker svg { width: 14px; }
  .quantity-picker select { width: 2.1em; }
  #creationSettings summary { padding-inline: 6px; }
  #creationSettings summary svg.chevron { display: none; }
  .preset-tiles, .editing-source .preset-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preset-tile { aspect-ratio: auto; min-height: 72px; }
  .image-tabs button { padding-inline: 4px; }
  .prompt-field label { width: auto; min-height: 0; overflow-wrap: anywhere; }
  .prompt-hints summary { position: static; margin-inline-start: auto; min-height: 36px; max-width: 100%; overflow-wrap: anywhere; }
  .gallery-filters { flex-wrap: wrap; }
  .filter-control { min-width: 0; max-width: 100%; }
  .examples h1 { font-size: 20px; overflow-wrap: anywhere; }
  .role-grid, .preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .generation-tools:has(#creationSettings[open]) { display: flex; }
  #creationSettings[open] summary { max-width: 100%; }
  .hint-options button { max-width: 100%; overflow-wrap: anywhere; }
  .membership-pill { gap: 3px; padding-inline: 7px; font-size: 12px; }
  .creation-page .membership-pill svg { width: 11px; }
}
@media (max-width:235px) {
  .membership-pill { padding-inline: 5px; font-size: 11.5px; }
  .creation-page .membership-pill svg { display: none; }
}
