:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #f5f1fa;
  background: #121118;
  --panel: #1a1822;
  --border: #322c3d;
  --muted: #a7a0b6;
  --lavender: #d8bdff;
  --accent: linear-gradient(105deg, #b99bff, #d1a6f3 54%, #efaaca);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 290px; font-size: 1rem; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 4px; }

.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.site-header { border-bottom: 1px solid #272332; background: #15131c; }
.header-content {
  max-width: 1312px;
  margin: auto;
  padding: 0 28px;
  min-height: 66px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.brand { display: inline-flex; align-items: center; justify-self: start; gap: 11px; }
.brand-icon {
  background: var(--accent);
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  color: #251c38;
  border-radius: 12px;
  box-shadow: 0 3px 18px #b28bef2b;
}
.brand-icon .icon { width: 24px; height: 24px; }
.brand strong { display: block; font-size: 1.18rem; letter-spacing: .12em; line-height: 1.14; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font: 650 .66rem/1 ui-sans-serif, sans-serif; letter-spacing: .14em; }
.site-header nav { display: flex; align-items: center; gap: 31px; height: 100%; font-size: .9rem; }
.site-header nav a { display: grid; min-height: 48px; place-items: center; color: var(--muted); transition: color .2s; }
.site-header nav a:first-child { color: #f4ebff; }
.site-header nav a:hover { color: #ead3ff; }
.access-button, .tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: .875rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #211d2a;
  color: #ddd2e9;
  transition: background .2s, color .2s, border-color .2s;
}
.access-controls { justify-self: end; display: flex; align-items: center; gap: 9px; }
.admin-indicator { color: var(--lavender); font-size: .84rem; white-space: nowrap; }
.access-button { min-height: 39px; padding: 0 13px; white-space: nowrap; }
.access-button:hover, .tool-button:hover { background: #32283f; border-color: #63527a; color: #fff; }

.page { position: relative; isolation: isolate; overflow: clip; padding: 0 28px; }
.page::before {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 650px;
  background: radial-gradient(ellipse 650px 375px at 56% 15%, #38264980, transparent 100%);
}
.intro { padding: 34px 0 29px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 11px; color: var(--lavender); font-size: .88rem; letter-spacing: .15em; }
.eyebrow span { display: block; width: 16px; height: 1px; background: #b393cf; }
.intro h1 { margin-top: 14px; font-size: clamp(2.35rem, 5.2vw, 4.5rem); line-height: 1.18; letter-spacing: -.05em; font-weight: 800; }
.intro h1 em { font-style: normal; color: #e0b4fb; background: var(--accent); background-clip: text; -webkit-text-fill-color: transparent; }
.intro p { margin-top: 13px; font-size: 1rem; line-height: 1.65; color: #bcb0cb; }

.studio, .inspiration, .works, .site-footer { max-width: 1232px; margin-inline: auto; }
.studio { scroll-margin-top: 22px; display: grid; grid-template-columns: minmax(320px, 4fr) minmax(0, 6fr); gap: 20px; align-items: stretch; }
.panel { min-width: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 19px; box-shadow: 0 20px 60px #06050c36; }
.panel-header { display: flex; align-items: center; gap: 10px; min-height: 61px; padding: 0 20px; border-bottom: 1px solid #2c2636; }
.panel-header h2, .dialog-header h2 { font-size: 1.02rem; letter-spacing: .035em; line-height: 1.3; }
.panel-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; color: #dfcaff; background: #322744; }
.template-link { margin-left: auto; padding: 6px 8px; border-radius: 7px; color: #d6b7fc; font-size: .84rem; white-space: nowrap; }
.template-link:hover { background: #322744; }
.composer-body { padding: 18px 21px 16px; display: flex; flex-direction: column; flex: 1; }
.mode-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; margin-bottom: 12px; }
.mode-choice { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; }
.mode-choice .icon { color: #c8aff0; }
.mode-choice:disabled { cursor: wait; opacity: .7; }
.image-input-panel { margin-bottom: 11px; padding: 10px; border: 1px dashed #50415e; border-radius: 10px; background: #181420; }
.field-label { display: block; margin-bottom: 10px; color: #e5dfee; font-size: .92rem; font-weight: 650; }
.prompt-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.prompt-heading .field-label { margin: 0; }
.clear-prompt { width: 31px; min-height: 30px; flex: none; color: #cab6df; }
.prompt-box {
  border-radius: 12px;
  border: 1px solid #3a3347;
  background: #14121b;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 13px 9px;
  min-height: 129px;
  transition: border-color .2s, box-shadow .2s;
}
.prompt-box:focus-within { border-color: #a180d9; box-shadow: 0 0 0 3px #a180d91f; }
.prompt-box textarea { display: block; width: 100%; flex: 1; min-height: 96px; padding: 11px 0 4px; color: #f6f0fc; background: transparent; border: 0; resize: vertical; line-height: 1.68; font-size: .96rem; outline: 0; }
.prompt-box textarea::placeholder { color: #9a90aa; }
.prompt-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; padding-top: 5px; color: #b9aec8; font-size: .8rem; }
.prompt-limit-option { display: inline-flex; align-items: center; gap: 6px; min-height: 22px; cursor: pointer; }
.prompt-limit-option input { margin: 0; accent-color: #c1a4ed; }
.prompt-usage { margin-left: auto; white-space: nowrap; font: .77rem/1.2 ui-monospace, monospace; }
.prompt-usage.is-over-limit, .prompt-error { color: #ffbbc7; }
.prompt-error { margin-top: 7px; font-size: .82rem; line-height: 1.4; }
.reference-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 9px; }
.reference-button { flex: none; min-height: 32px; }
.reference-hint { color: var(--muted); font-size: .77rem; }
.reference-list { display: flex; flex-wrap: wrap; list-style: none; gap: 8px; padding: 0; margin: 10px 0 0; }
.reference-list li { position: relative; border: 1px solid var(--border); background: #14121b; border-radius: 8px; }
.reference-list img { width: 54px; height: 49px; object-fit: cover; border-radius: 7px; }
.reference-list button { position: absolute; top: 2px; right: 2px; width: 23px; height: 23px; border: 1px solid #fff2ff48; border-radius: 7px; display: grid; place-items: center; padding: 0; background: #1f1628df; }
.reference-list button .icon { width: 14px; height: 14px; }
.ratio-field { padding: 0; margin: 16px 0 11px; border: 0; min-width: 0; }
.ratios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ratios label { position: relative; cursor: pointer; min-width: 0; }
.ratios input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.ratios label > span { display: flex; align-items: center; justify-content: center; line-height: 1.15; gap: 6px; padding: 0 4px; min-height: 43px; border: 1px solid #393245; border-radius: 9px; color: #c9c0d3; font-size: .89rem; background: #211d2a; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.ratios label:hover > span { border-color: #7f66a8; }
.ratios input:checked + span { border-color: #9274bf; background: #37284c; color: #f2e6ff; }
.ratios input:focus-visible + span { outline: 2px solid var(--lavender); outline-offset: 3px; }
.ratios .icon { color: #c5abeb; width: 1.1em; }
.ratios small { color: #bdb0ce; font-size: .76rem; font-variant-numeric: tabular-nums; }
.settings { margin-bottom: 13px; border-bottom: 1px solid #332d3d; }
.settings summary { display: flex; align-items: center; gap: 7px; min-height: 35px; color: #d7cae5; font-size: .86rem; list-style: none; cursor: pointer; }
.settings summary::-webkit-details-marker { display: none; }
.settings summary > .icon { color: #bea5e5; }
.settings-chevron { margin-left: auto; transition: transform .2s; }
.settings[open] .settings-chevron { transform: rotate(180deg); }
.settings summary span { margin-left: auto; color: #cdb6e9; font-size: .76rem; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 6px 0 13px; }
.settings-grid label { display: block; color: #d6cbe3; font-size: .84rem; line-height: 1.35; }
.settings-grid select, .settings-grid input[type="number"], .model-setting select { width: 100%; min-height: 38px; margin-top: 6px; padding: 0 9px; border: 1px solid #44374f; border-radius: 8px; background: #17131f; color: #efe4f8; }
.settings-grid select, .model-setting select { appearance: none; padding-right: 25px; background: #17131f url("/assets/chevron.svg") right 8px center / 14px no-repeat; }
.model-setting { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 11px; color: #e5dfee; font-size: .92rem; font-weight: 650; }
.model-setting select { margin-top: 0; font-weight: 400; }
.wide-setting { grid-column: 1 / -1; }
.custom-size { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.settings-grid input[type="range"] { width: 100%; accent-color: #c1a4ed; }
.settings-grid .check-setting { display: flex; align-items: center; gap: 6px; }
.check-setting input { accent-color: #c1a4ed; }
.check-setting small { color: var(--muted); }
.mask-setting { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.mask-setting span { flex: 1 1 130px; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.studio:has(.settings[open]) .canvas { align-self: start; }
.generate-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  padding: 8px 14px;
  background: var(--accent);
  border: 1px solid #e0c0ff80;
  border-radius: 11px;
  color: #241831;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: 0 5px 17px #b381ed22;
  transition: filter .2s, box-shadow .2s, transform .2s;
}
.generate-button:hover { filter: brightness(1.09); box-shadow: 0 6px 20px #b381ed45; }
.generate-button:active { transform: translateY(1px); }
.generate-button:disabled { cursor: wait; filter: saturate(.6); }
.composer-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; color: #a79bb6; font-size: .76rem; }
.composer-foot:has(.quota-status[hidden]) { justify-content: center; }
.quota-status { line-height: 1.4; }
.shortcut { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.shortcut-label { margin-right: 3px; }
kbd { padding: 2px 5px; border: 1px solid #3e354b; border-radius: 4px; background: #211d2a; color: #c7bbd3; font: .7rem/1.15 ui-monospace, monospace; }
.form-message { margin-top: 12px; color: #edcaff; text-align: center; line-height: 1.55; font-size: .86rem; }
.form-message.is-error { color: #ffbbc7; }

.canvas-header { justify-content: flex-start; }
.canvas-tools { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.canvas-publish { display: flex; justify-content: flex-end; padding: 0 12px 12px; }
.canvas-publish .tool-button { color: #e8d4ff; border-color: #5c4676; background: #30243f; }
.canvas-publish .tool-button:hover { background: #463259; }
.tool-button { min-height: 35px; padding: 0 10px; }
.icon-button { padding: 0; width: 35px; }
.artwork {
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  flex: 1 0 auto;
  aspect-ratio: 1.76;
  overflow: hidden;
  margin: 12px;
  min-height: 0;
  border: 1px solid #4a3c58;
  border-radius: 12px;
  background-color: #14111b;
}
.artwork img { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; object-position: 62% 50%; }
.artwork.is-generated img { object-fit: contain; object-position: center; }
.artwork::after { content: ""; position: absolute; inset: 45% 0 0; pointer-events: none; background: linear-gradient(transparent, #130b23a6 75%, #110c20d4); }
.artwork.is-generated::after { inset: 76% 0 0; background: linear-gradient(transparent, #0c0816ad); }
.art-caption { z-index: 1; position: absolute; display: grid; gap: 8px; left: 23px; bottom: 19px; line-height: 1; max-width: calc(100% - 46px); }
.art-badge { justify-self: start; padding: 6px 8px; border-radius: 6px; font-size: .76rem; color: #fff6ff; background: #19112390; border: 1px solid #fff2ff55; backdrop-filter: blur(8px); }
.art-caption strong { color: white; font-size: clamp(1.37rem, 2.55vw, 2.2rem); letter-spacing: .045em; text-shadow: 0 1px 14px #160f23; }
.artwork.is-generated .art-caption strong { display: none; }
.canvas-loading { z-index: 2; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; background: #181123e6; backdrop-filter: blur(10px); text-align: center; padding: 12px; }
.canvas-loading strong { color: #f3e2ff; font-size: 1.15rem; }
.canvas-loading > span:last-child { color: #c7b9d5; font-size: .88rem; }
.loading-orbit { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #c8a4ff40; border-top-color: #e2b5fb; animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.inspiration { padding: 41px 0 32px; scroll-margin-top: 16px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 17px; }
.section-heading { display: flex; gap: 12px; align-items: center; }
.section-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #d9bdfd; background: #292036; border: 1px solid #443354; border-radius: 11px; }
.section-heading h2 { font-size: 1.18rem; letter-spacing: .06em; }
.section-heading p { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.gallery-switch { display: flex; gap: 2px; }
.gallery-switch, .mode-picker { padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: #1a1623; }
.switch-button, .mode-choice { padding: 0 11px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #bfafcd; font-size: .84rem; white-space: nowrap; }
.switch-button { min-height: 30px; }
.mode-choice { min-height: 36px; font-weight: 650; }
.switch-button:hover, .mode-choice:hover { color: white; }
.switch-button[aria-pressed="true"], .mode-choice[aria-pressed="true"] { color: #f3e4ff; border-color: #614770; background: #362744; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.template-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.template-gallery .gallery-card { aspect-ratio: 1.7; }
.gallery-card { position: relative; isolation: isolate; text-align: left; padding: 0; min-width: 0; background: #211a2d; border: 1px solid #43384d; border-radius: 12px; overflow: hidden; aspect-ratio: 1.78; transition: border-color .25s, transform .25s; }
.gallery-card:hover { border-color: #b997de; transform: translateY(-3px); }
.gallery-card.is-selected { border-color: #c7a2fb; box-shadow: 0 0 0 2px #c7a2fb4a; }
.gallery-card::after { content: ""; position: absolute; inset: 28% 0 0; background: linear-gradient(transparent, #110b19dd); }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-card:hover img { transform: scale(1.045); }
.gallery-name, .gallery-style { position: absolute; z-index: 1; bottom: 13px; text-shadow: 0 1px 8px #09050f; }
.gallery-name { left: 12px; font-size: .91rem; font-weight: 700; color: white; }
.gallery-style { right: 12px; font-size: .76rem; color: #eee1fc; }
.works { padding: 8px 0 33px; scroll-margin-top: 16px; }
.works-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 17px; }
.show-hidden-works[aria-pressed="true"] { background: #38294b; border-color: #8a6aa6; color: #efdaff; }
.gallery-notice { margin-bottom: 12px; color: #e1cafa; font-size: .87rem; line-height: 1.5; }
.gallery-notice.is-error { color: #ffbbc7; }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 15px; }
.work-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: var(--panel); scroll-margin-top: 16px; }
.work-card:target { border-color: #bd96ec; }
.work-preview { display: block; width: 100%; padding: 0; border: none; aspect-ratio: 1.6; overflow: hidden; background: #131019; cursor: zoom-in; }
.work-preview:focus-visible { outline-offset: -4px; }
.work-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.work-preview:hover img { transform: scale(1.04); }
.work-badges { position: absolute; top: 8px; left: 8px; display: flex; flex-wrap: wrap; gap: 4px; max-width: calc(100% - 52px); pointer-events: none; }
.work-badges span { padding: 3px 6px; border: 1px solid #b989e755; border-radius: 6px; font-size: .74rem; line-height: 1.2; white-space: nowrap; }
.work-pin-badge { color: #f3dcff; background: #2d1939ed; }
.work-hidden-badge { color: #f6e0e6; background: #34262eed; }
.work-body { padding: 12px; }
.work-prompt { min-width: 0; font-size: .9rem; color: #e9e1f3; }
.work-prompt summary { display: flex; align-items: center; justify-content: space-between; gap: 6px; cursor: pointer; list-style: none; }
.work-prompt summary::-webkit-details-marker { display: none; }
.work-prompt .icon { color: #ceb7e8; }
.work-prompt[open] .icon { transform: rotate(180deg); }
.prompt-excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.work-prompt-label { display: none; color: var(--muted); }
.work-prompt[open] .prompt-excerpt { display: none; }
.work-prompt[open] .work-prompt-label { display: inline; }
.work-prompt p { margin-top: 8px; }
.work-prompt p, .publish-prompt { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.work-actions { display: flex; gap: 7px; margin-top: 10px; }
.work-reuse { color: #e1cafa; }
.work-admin { position: absolute; z-index: 1; top: 8px; right: 8px; }
.work-admin summary { list-style: none; cursor: pointer; background: #211a2aee; }
.work-admin summary::-webkit-details-marker { display: none; }
.work-admin-options { position: absolute; top: calc(100% + 4px); right: 0; min-width: 110px; padding: 4px; border: 1px solid #5a4768; border-radius: 9px; background: #241e2e; box-shadow: 0 6px 16px #09070db0; }
.work-admin-options button { display: block; width: 100%; padding: 6px 8px; min-height: 29px; border: 0; border-radius: 5px; text-align: left; background: transparent; font-size: .85rem; white-space: nowrap; }
.work-admin-options button:hover { background: #392b47; }
.work-admin-options button:focus-visible { outline-offset: -2px; }
.work-admin-options button:disabled { cursor: wait; opacity: .6; }
.work-admin-options .work-delete { color: #ffbec9; }
.gallery-status { padding: 18px; text-align: center; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); font-size: .9rem; }
.gallery-more { display: flex; margin: 13px auto 0; }
.work-grid:not(:empty) + .gallery-status { margin-top: 15px; }
.site-footer { padding: 20px 0 28px; display: flex; justify-content: space-between; border-top: 1px solid #292633; color: #a59ab2; font-size: .78rem; letter-spacing: .04em; }
.footer-separator { margin: 0 3px; color: #b78cce; }

dialog { color: #f5f1fa; background: #1e1a29; border: 1px solid #554464; border-radius: 16px; box-shadow: 0 15px 65px #08060dcc; }
dialog::backdrop { background: #090711ca; backdrop-filter: blur(5px); }
.password-dialog, .publish-dialog, .delete-dialog { width: min(430px, calc(100% - 32px)); padding: 22px; }
.dialog-header { display: flex; align-items: center; gap: 10px; }
.dialog-header button { margin-left: auto; }
.password-dialog p { color: #c8bcd6; margin: 17px 0 20px; line-height: 1.6; }
.password-dialog .password-error { margin: -9px 0 15px; color: #ffbbc7; font-size: .9rem; }
.password-dialog input { display: block; min-height: 45px; width: 100%; margin-bottom: 17px; border: 1px solid #51445e; border-radius: 8px; padding: 8px 11px; color: #f6edff; background: #15111e; }
.publish-notice { margin: 16px 0 12px; line-height: 1.6; color: #e3d6ee; }
.publish-prompt { overflow: auto; max-height: 9rem; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #16131e; color: var(--muted); font-size: .86rem; }
.publish-error { margin-top: 10px; color: #ffbbc7; font-size: .87rem; }
.publish-confirm { display: flex; align-items: stretch; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.publish-confirm .generate-button { width: auto; }
.confirm-delete-work { min-height: 42px; color: #ffe2e7; border-color: #995160; background: #632d3e; font-weight: 650; }
.confirm-delete-work:hover { border-color: #ba6879; background: #79394e; }
.image-dialog { max-width: calc(100% - 28px); max-height: calc(100% - 28px); overflow: hidden; padding: 7px; }
.image-dialog img { max-height: min(84dvh, 1000px); width: auto; object-fit: contain; border-radius: 10px; }
.image-dialog button { position: absolute; right: 15px; top: 15px; z-index: 1; background: #1d1729e8; }

@media (min-width: 761px) and (max-height: 800px) {
  .intro { padding: 21px 0 19px; }
  .intro h1 { margin-top: 9px; font-size: clamp(2.35rem, 4.6vw, 4.2rem); }
  .intro p { margin-top: 10px; }
  .panel-header { min-height: 58px; }
  .prompt-box { min-height: 112px; }
  .prompt-box textarea { min-height: 78px; }
  .ratio-field { margin-top: 14px; }
}

@media (max-width: 1040px) {
  .studio { grid-template-columns: minmax(310px, 4.4fr) minmax(0, 5.6fr); gap: 16px; }
  .artwork { flex: 1; }
  .artwork img { object-position: 69% 50%; }
  .composer-body { padding-inline: 17px; }
}

@media (max-width: 760px) {
  .page, .header-content { padding-inline: 19px; }
  .header-content { min-height: 65px; }
  .site-header nav { gap: 15px; }
  .intro { padding: 40px 0 27px; }
  .intro h1 { margin-top: 13px; }
  .intro p { margin-top: 13px; }
  .studio { grid-template-columns: minmax(0, 1fr); }
  .artwork { aspect-ratio: 1.6; }
  .artwork img { object-position: center; }
  .panel-header { min-height: 57px; padding-inline: 15px; }
  .art-caption { left: 16px; bottom: 15px; }
  .composer-foot { justify-content: center; text-align: center; }
  .composer-foot:has(.quota-status[hidden]), .shortcut { display: none; }
  .inspiration { padding-top: 30px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .template-gallery .gallery-card { aspect-ratio: 1.27; }
}

@media (max-width: 515px) {
  .header-content { grid-template-columns: 1fr auto; padding-top: 10px; row-gap: 7px; }
  .site-header nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; min-height: 38px; height: auto; border-top: 1px solid #272232; }
  .site-header nav a { min-height: 38px; }
  .admin-indicator { display: none; }
  .page, .header-content { padding-inline: 14px; }
  .intro h1 { font-size: clamp(1.85rem, 8.1vw, 2.7rem); }
  .intro p { font-size: .94rem; }
  .canvas-tools .tool-button { min-height: 36px; padding-inline: 6px; font-size: .79rem; max-width: 88px; }
  .section-header { gap: 8px; }
  .section-heading { gap: 8px; }
  .section-icon { flex: 0 0 33px; width: 33px; height: 33px; }
  .section-heading p { font-size: .8rem; }
  .switch-button { padding-inline: 7px; }
  .gallery-name { bottom: 22px; }
  .gallery-style { left: 12px; right: auto; bottom: 8px; font-size: .67rem; }
  .work-body { padding: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
