:root {
  color-scheme: dark;
  --bg: #141416;
  --surface: #202023;
  --raised: #2b2b2f;
  --border: #37373c;
  --ink: #f4f2ee;
  --muted: #a8a6ad;
  --soft: #ccc9ce;
  --accent: #ffad80;
  --sans: Inter, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body { margin: 0; min-height: 100svh; background: var(--bg); color: var(--ink); font-family: var(--sans); word-break: keep-all; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button, a, select, label { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
button:disabled { cursor: default; opacity: .48; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
button, a, select { touch-action: manipulation; }
button { transition: background .15s, color .15s, border-color .15s; }
h1, h2, p, figure { margin: 0; }
h1, h2 { line-height: 1.24; }
h1 { font-size: clamp(32px, 3.5vw, 46px); letter-spacing: -.065em; font-weight: 730; }
h2 { font-size: 22px; letter-spacing: -.05em; font-weight: 690; }
.sr, .file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#loading, noscript { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 20vh 20px; color: var(--muted); }
.topbar { border-bottom: 1px solid #ffffff10; background: #111113; }
.bar-inner { height: 66px; max-width: 1480px; margin: 0 auto; padding: 0 clamp(24px, 4vw, 64px); display: flex; align-items: center; gap: 44px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-size: 25px; letter-spacing: -.09em; font-weight: 800; white-space: nowrap; }
.aperture {
  position: relative; display: inline-block; flex: 0 0 auto; width: 31px; height: 31px;
  clip-path: polygon(28% 2%, 74% 5%, 99% 39%, 88% 82%, 54% 100%, 15% 87%, 0 49%, 10% 20%);
  background: repeating-conic-gradient(from 16deg, #ffae7d 0 54deg, #191719 55deg 60deg);
}
.aperture::after { content: ""; position: absolute; inset: 26%; background: #171618; clip-path: polygon(27% 0, 77% 7%, 100% 52%, 70% 98%, 18% 88%, 0 42%); }
nav { display: flex; align-items: center; gap: 5px; }
nav a { display: inline-flex; gap: 9px; align-items: center; padding: 9px 14px; border-radius: 9px; font-size: 14px; line-height: 1.3; color: var(--muted); font-weight: 620; }
nav a:hover, .logout:hover { color: var(--ink); background: #252528; }
nav a[aria-current] { background: #2a292c; color: var(--ink); }
nav a[aria-current] .spark-icon { color: var(--accent); }
.spark-icon { font: normal 19px/14px system-ui, sans-serif; }
.clock-icon { display: inline-block; position: relative; width: 15px; height: 15px; border: 1.5px solid currentColor; border-radius: 50%; }
.clock-icon::before { content: ""; position: absolute; top: 2px; left: 5px; width: 3px; height: 5px; border: solid currentColor; border-width: 0 0 1.5px 1.5px; }
.account { margin-left: auto; display: flex; gap: 19px; align-items: center; }
.machine { color: var(--muted); display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 540; white-space: nowrap; }
.machine i { width: 7px; height: 7px; border-radius: 50%; background: #a8c2a0; box-shadow: 0 0 0 3px #a8c2a00f; }
.logout, .round-button { width: 35px; height: 35px; display: inline-grid; place-items: center; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.logout { border: 1px solid var(--border); }
.exit-icon { display: block; font: 16px/.75 var(--sans); padding: 0 0 2px 2px; border: 1.3px solid currentColor; border-right: 0; border-radius: 2px 0 0 2px; }
.main { width: min(1104px, calc(100% - 96px)); padding: clamp(38px, 4.5vw, 64px) 0 72px; margin: 0 auto; }
.section-head { margin-bottom: 23px; }
.composer { background: linear-gradient(112deg, #232326 0%, #1e1e21 68%); padding: 16px 20px 0; border: 1px solid #414045; border-radius: 22px; box-shadow: 0 7px 24px -13px #0008; }
.composer:focus-within { border-color: #68605d; }
.composer-head, .composer-foot, .composer-tools, .monitor-top, .history-head, .gallery-head, .detail-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.type-switch { display: inline-flex; align-items: center; padding: 3px; border-radius: 11px; background: #161618; }
.type-switch button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 33px; padding: 5px 15px; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 640; }
.type-switch button[aria-pressed="true"] { color: var(--ink); background: #39393e; box-shadow: 0 1px 3px #0003; }
.type-switch button:hover:not([aria-pressed="true"]) { color: var(--ink); }
.image-icon, .video-icon { display: inline-block; position: relative; width: 16px; height: 13px; border: 1.4px solid currentColor; border-radius: 3px; flex: 0 0 auto; }
.image-icon { overflow: hidden; }
.image-icon::before { content: ""; position: absolute; width: 9px; height: 9px; left: 4px; top: 6px; transform: rotate(45deg); border: 1.4px solid currentColor; }
.image-icon::after { content: ""; position: absolute; width: 2.5px; height: 2.5px; border-radius: 50%; background: currentColor; top: 2px; left: 2px; }
.video-icon { width: 12px; margin-right: 4px; height: 11px; }
.video-icon::after { content: ""; position: absolute; top: 1px; right: -6px; width: 5px; height: 6px; background: currentColor; clip-path: polygon(0 30%, 100% 0, 100% 100%, 0 70%); }
.select-wrap { display: inline-flex; position: relative; align-items: center; }
.select-wrap::after { content: ""; position: absolute; right: 11px; width: 5px; height: 5px; pointer-events: none; border: solid currentColor; border-width: 0 1.4px 1.4px 0; transform: translateY(-2px) rotate(45deg); opacity: .8; }
select { appearance: none; -webkit-appearance: none; background: transparent; color: inherit; border: 0; border-radius: inherit; padding: 8px 27px 8px 11px; width: 100%; min-width: 0; height: 100%; }
option, optgroup { background: #252528; color: var(--ink); }
.operation-field { color: var(--soft); font-size: 13px; }
.operation-field:hover { color: var(--ink); }
#prompt { display: block; width: 100%; padding: 0 2px; margin: 23px 0 15px; border: 0; background: transparent; resize: vertical; min-height: 66px; max-height: 44vh; font-size: clamp(16px, 1.6vw, 20px); line-height: 1.55; letter-spacing: -.025em; outline-offset: 3px; }
#prompt::placeholder { color: #a4a1a7; }
#prompt:focus-visible { outline: none; }
.composer:has(#prompt:focus-visible) { border-color: #9e7f6f; }
.composer-foot { align-items: flex-end; gap: 10px; padding-bottom: 15px; }
.settings, .video-settings { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.settings { min-width: 0; }
.setting { background: #2a2a2e; border: 1px solid #414145; color: var(--soft); border-radius: 10px; min-height: 38px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.setting:hover { background: #353539; border-color: #5d595a; }
.setting:focus-within, .operation-field:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.setting select:focus-visible, .operation-field select:focus-visible { outline: none; }
#aspect-field { width: 92px; }
#aspect-field.with-reference { width: 116px; }
#aspect-ratio { padding-left: 34px; }
.ratio-icon { width: 16px; height: 16px; position: absolute; left: 18px; top: 50%; transform: translate(-50%, -50%); border: 1.5px solid currentColor; border-radius: 2px; pointer-events: none; }
.ratio-icon.awaiting-reference { border-style: dashed; }
.model-setting { background: #352d2a; border-color: #594338; color: #ffc49f; }
.model-setting:hover { background: #40342f; border-color: #87644e; }
.model-setting > span { pointer-events: none; position: absolute; left: 34px; font-size: 11px; color: #e0aa89; }
.model-setting select { padding-left: 65px; font-size: 13px; font-weight: 650; }
.layers-icon { pointer-events: none; position: absolute; left: 12px; width: 12px; height: 11px; }
.layers-icon::before, .layers-icon::after { content: ""; position: absolute; width: 8px; height: 8px; border: 1.3px solid currentColor; transform: rotate(30deg) skewX(-30deg) scaleY(.86); }
.layers-icon::before { top: -2px; }
.layers-icon::after { top: 2px; border-width: 0 1.3px 1.3px 0; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 15px; min-height: 42px; padding: 9px 16px; border-radius: 12px; background: var(--accent); color: #261b15; font-size: 14px; font-weight: 720; white-space: nowrap; }
.primary:not(:disabled):hover { background: #ffbf9d; }
.arrow { font-family: system-ui, sans-serif; font-weight: 550; font-size: 21px; line-height: .9; }
.composer-tools { padding: 7px 0 8px; border-top: 1px solid #ffffff12; min-height: 38px; }
.text-button, .mode-line { font-size: 12px; color: var(--muted); }
.text-button { background: none; padding: 5px 2px; }
.text-button::before { content: "✧"; padding-right: 5px; font-size: 15px; }
.text-button:hover:not(:disabled) { color: var(--ink); }
.mode-line { margin-left: auto; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 28px; }
.switch { appearance: none; position: relative; width: 30px; height: 18px; margin: 0; border: 1px solid #646168; background: #47454b; border-radius: 20px; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; border-radius: 50%; width: 12px; height: 12px; background: #d9d6db; }
.switch:checked { background: #a67b63; border-color: #b88a70; }
.switch:checked::after { left: 14px; background: #fff1e7; }
.small-note, .error, .notice { font-size: 13px; line-height: 1.55; }
.small-note { color: var(--soft); padding-bottom: 9px; }
.error, .notice { background: #392723; color: #ffbcab; padding: 9px 12px; border-radius: 8px; margin-bottom: 10px; }
.inputs { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.inputs:has(> :not([hidden])) { margin: 19px 0 14px; }
.upload-field, .range-field { flex: 1 1 230px; min-width: 0; }
.references-heading { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 620; }
#reference-count { color: var(--soft); font-weight: 400; font-size: 12px; }
.references-row, #reference-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.references-row { margin: 8px 0 5px; }
#reference-list { display: contents; list-style: none; padding: 0; margin: 0; }
#reference-list li, #reference-add { width: 84px; height: 70px; border-radius: 9px; }
#reference-list li { position: relative; background: #171719; box-shadow: inset 0 0 0 1px var(--border); }
#reference-list img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: contain; }
.reference-number, .remove-reference { position: absolute; color: #fff; background: #19191ddd; }
.reference-number { bottom: 4px; left: 4px; min-width: 18px; text-align: center; line-height: 18px; font-size: 11px; border-radius: 4px; }
.remove-reference { top: 0; right: 0; width: 27px; height: 27px; border-radius: 0 9px 0 8px; font-size: 17px; }
#reference-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1px dashed #70655e; color: var(--soft); background: #282629; font-size: 12px; cursor: pointer; }
#reference-add b { color: var(--accent); font-size: 20px; line-height: 1; font-weight: 400; }
.references-row:has(#reference-files:focus-visible) #reference-add, #references-field.drag-over .references-row { outline: 2px solid var(--accent); outline-offset: 2px; }
#reference-error { margin: 6px 0 0; }
:is(#preview-controls, #detail-controls) > .source-select { width: auto; min-height: 34px; height: auto; appearance: auto; }
.upload-field > label:first-child, .range-field label, .login-body label { font-size: 13px; font-weight: 620; display: block; }
.dropzone { display: flex; align-items: center; gap: 9px; margin: 6px 0 3px; padding: 9px 13px; border-radius: 9px; border: 1px dashed #66636b; background: #28282c; color: var(--soft); font-size: 13px; cursor: pointer; }
.dropzone b { font-weight: 450; color: var(--accent); font-size: 17px; }
.dropzone:has(#file-thumbnail:not([hidden])) b { display: none; }
#file-thumbnail { width: 64px; height: 48px; object-fit: contain; flex: 0 0 auto; border-radius: 4px; background: #161618; }
.dropzone span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.upload-field:focus-within .dropzone { outline: 2px solid var(--accent); }
small { color: var(--muted); font-size: 11px; }
.range-field { display: flex; gap: 8px; }
.range-field label { flex: 1; min-width: 0; }
input[type="number"], input[type="password"] { width: 100%; border: 1px solid #48474d; background: #1a191c; padding: 10px 12px; margin-top: 6px; border-radius: 8px; font-size: 15px; }
.examples, .monitor, .history { margin-top: 37px; }
.gallery-head, .history-head { margin-bottom: 14px; }
.gallery-head > span { font-size: 12px; color: var(--muted); }
.example-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.scene { aspect-ratio: 1.65; background: #282629; text-align: left; isolation: isolate; position: relative; overflow: hidden; padding: 0; border-radius: 14px; border: 1px solid #ffffff12; }
.scene::after, .login-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #0b0a0cbe, transparent 55%); pointer-events: none; }
.scene img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.scene:hover img { transform: scale(1.04); }
.scene:focus-visible { outline-offset: 3px; }
.scene-text, .scene-arrow { position: absolute; z-index: 1; bottom: 15px; color: #fff; text-shadow: 0 1px 6px #0007; }
.scene-text { left: 17px; right: 50px; font-size: clamp(14px,1.4vw,19px); line-height: 1.35; font-weight: 640; letter-spacing: -.045em; }
.scene-arrow { display: grid; place-items: center; right: 13px; bottom: 12px; width: 28px; height: 28px; border: 1px solid #ffffff83; background: #211e2342; border-radius: 50%; font-size: 16px; font-family: system-ui,sans-serif; }
.history-head { justify-content: flex-start; }
.history-filters { display: inline-flex; gap: 3px; padding: 3px; background: #1d1d20; border: 1px solid #353538; border-radius: 18px; margin-left: auto; }
.history-filters button { padding: 4px 13px; border: 0; border-radius: 16px; background: transparent; font-size: 12px; color: var(--muted); }
.history-filters button[aria-pressed="true"] { background: #3b3a3e; color: var(--ink); font-weight: 600; }
.job-list { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; }
.job-card { min-width: 0; padding: 0 0 12px; border: 1px solid var(--border); border-radius: 12px; background: #1e1e21; overflow: hidden; position: relative; }
.job-card:hover, .job-card.is-selected { border-color: #736459; }
.job-open { color: var(--ink); width: 100%; display: block; background: none; text-align: left; padding: 0; }
.job-open:focus-visible { outline-offset: -3px; }
.job-thumb { display: grid; place-items: center; aspect-ratio: 1.95; overflow: hidden; background: #28272b; color: var(--muted); }
.job-thumb img, .job-thumb video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.job-text { display: grid; gap: 4px; min-width: 0; padding: 11px 12px 0; }
.job-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 600; }
.job-meta { color: var(--muted); font-size: 11px; line-height: 1.5; }
.job-state, .source-badge { position: absolute; top: 9px; left: 9px; pointer-events: none; padding: 4px 8px; background: #171619d9; color: #ededee; border-radius: 20px; font-size: 11px; line-height: 1.25; }
.job-state::before, .monitor-status::before { content: ""; width: 5px; height: 5px; display: inline-block; border-radius: 50%; background: var(--muted); margin: 0 5px 1px 0; }
.job-more { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid #ffffff40; border-radius: 50%; background: #171619d9; color: var(--ink); }
.more-icon, .more-icon::before, .more-icon::after { width: 4px; height: 4px; border: 2px solid currentColor; border-radius: 50%; }
.more-icon { position: relative; pointer-events: none; }
.more-icon::before, .more-icon::after { content: ""; position: absolute; top: -2px; box-sizing: border-box; }
.more-icon::before { left: -8px; }
.more-icon::after { left: 4px; }
.job-more:hover { background: #39363b; }
[data-state="succeeded"]::before { background: #a8d4ab; }
[data-state="running"]::before, [data-state="queued"]::before { background: var(--accent); }
[data-state="failed"]::before { background: #ff9983; }
.retry { margin: 7px 10px 0; }
.retry, .tool-button, #preview-controls > *, #detail-controls > * { display: inline-flex; align-items: center; padding: 6px 10px; background: #2c2b30; border: 1px solid #454449; border-radius: 7px; color: var(--soft); font-size: 12px; white-space: nowrap; }
.empty-list { grid-column: 1/-1; padding: 24px; border-radius: 12px; border: 1px dashed #39383d; color: var(--muted); font-size: 13px; }
.all-history { display: inline-block; padding: 12px 0; font-size: 13px; color: var(--soft); }
.history-only .history { margin: 0; }
.history-only .history-head { margin-bottom: 24px; }
.history-only .history-head h2 { font-size: clamp(32px,3.5vw,46px); letter-spacing: -.065em; }
.monitor { background: var(--surface); padding: 16px; border: 1px solid var(--border); border-radius: 16px; }
.monitor-top { justify-content: flex-start; margin-bottom: 12px; }
.monitor-top h2, .detail-top h2 { font-size: 18px; }
.monitor-status { font-size: 12px; color: var(--soft); }
.monitor-actions { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.round-button { font: 23px/1 system-ui,sans-serif; }
.round-button:hover, .tool-button:hover { background: #38363b; color: var(--ink); }
.viewfinder { position: relative; background: #101013; border-radius: 10px; overflow: hidden; }
.preview { display: grid; }
.preview img, .preview video { width: 100%; height: clamp(240px,45vh,510px); object-fit: contain; display: block; }
.preview-empty { min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 13px; }
.focus-ring { height: 22px; width: 22px; border: 2px solid #5d5654; border-top-color: var(--accent); border-radius: 50%; }
.monitor:has([data-state="running"]) .focus-ring { animation: spin 1.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.monitor-foot, .detail-foot { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding-top: 13px; color: var(--soft); font-size: 13px; line-height: 1.6; }
#preview-description, #detail-description { overflow-wrap: anywhere; max-height: 7.5em; overflow: auto; white-space: pre-line; }
#preview-controls, #detail-controls { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
#preview-controls > button, #preview-controls > a, #detail-controls > button, #detail-controls > a { min-height: 34px; }
:is(#preview-controls, #detail-controls, #job-actions-controls) > .delete-job { color: #ffb5a9; }
:is(#preview-controls, #detail-controls, #job-actions-controls) > .regenerate-job { color: #ffc49f; }
:is(#preview-controls, #detail-controls, #job-actions-controls) > :is(button, a):hover:not(:disabled) { background: #38373b; }
.progress-track { overflow: hidden; height: 4px; margin-top: 9px; background: #434147; border-radius: 8px; }
.progress-track i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.progress-track.indeterminate i { width: 30% !important; animation: progress 2s ease-in-out infinite alternate; }
@keyframes progress { to { transform: translateX(230%); } }
#preview-dialog { width: min(1100px,94vw); max-height: 94svh; margin: auto; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--ink); padding: 15px; }
#preview-dialog::backdrop { background: #070709db; }
.action-dialog { width: min(410px,calc(100% - 32px)); max-height: 90svh; padding: 20px; margin: auto; border: 1px solid #49474c; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 80px #0006; }
.action-dialog::backdrop { background: #070709b8; }
.action-dialog h2 { font-size: 20px; line-height: 1.4; }
#job-actions-description, #delete-description { margin: 9px 0 17px; font-size: 14px; line-height: 1.6; color: var(--soft); overflow-wrap: anywhere; white-space: pre-line; }
#job-actions-description, #delete-target { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#delete-target { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
#job-actions-controls { display: grid; grid-template-columns: minmax(0,1fr); gap: 6px; }
#job-actions-controls button { min-height: 41px; text-align: left; justify-content: flex-start; }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; }
.dialog-actions button { min-height: 38px; padding: 7px 15px; font-size: 13px; border-radius: 8px; }
.danger-button { background: #f19c90; color: #2a1412; font-weight: 700; }
.danger-button:hover:not(:disabled) { background: #fab4a9; }
#copy-text { display: block; width: 100%; min-height: 105px; resize: vertical; margin: 10px 0; padding: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 16px; line-height: 1.5; }
#regenerate-dialog { width: min(520px, calc(100% - 32px)); }
#regenerate-context { margin: 8px 0 16px; color: var(--soft); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
#regenerate-prompt-field label { font-size: 13px; font-weight: 620; }
#regenerate-prompt { display: block; width: 100%; min-height: 100px; max-height: 40svh; resize: vertical; margin: 6px 0 16px; padding: 10px 12px; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 16px; line-height: 1.55; }
#save-note { margin: 9px 0 17px; color: var(--soft); font-size: 14px; line-height: 1.6; }
#save-download { min-height: 38px; padding: 7px 15px; font-size: 13px; border-radius: 8px; }
#action-toast { position: fixed; z-index: 10; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); border: 1px solid #625b55; border-radius: 10px; background: #302d2b; padding: 10px 15px; color: var(--ink); font-size: 13px; line-height: 1.5; box-shadow: 0 3px 20px #0005; pointer-events: none; }
#action-toast:empty { display: none; }
dialog #action-toast { position: static; transform: none; max-width: 100%; margin-top: 12px; }
.detail-top { margin-bottom: 8px; }
#detail-media { position: relative; display: grid; place-items: center; background: #0e0d10; border-radius: 8px; }
#detail-media img, #detail-media video { max-height: 72svh; width: 100%; display: block; object-fit: contain; }
#login-page { min-height: 100svh; display: grid; grid-template-columns: minmax(300px, .95fr) 1.05fr; }
.login-panel { display: flex; flex-direction: column; align-items: flex-start; padding: 38px clamp(34px,6vw,110px); }
.login-body { width: min(100%,400px); margin: auto; padding: 56px 0; }
.login-body > p { font-size: 15px; color: var(--muted); margin: 16px 0 36px; line-height: 1.65; }
.login-body .primary { width: 100%; margin-top: 17px; justify-content: space-between; min-height: 47px; }
.login-body .error { margin: 10px 0 0; }
.login-body input { height: 47px; }
.login-art { position: relative; isolation: isolate; min-height: 0; background: #212529; }
.login-art img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.login-art figcaption { position: absolute; z-index: 1; bottom: 7%; left: 8%; right: 6%; }
.login-art figcaption span { display: block; margin-bottom: 9px; color: #f2eae8; font-size: 13px; letter-spacing: .02em; }
.login-art figcaption strong { font-size: clamp(24px,3vw,44px); letter-spacing: -.055em; }
@media (min-width:1550px) { .main { padding-top: 72px; } }
@media (max-width:900px) {
  .main { width: calc(100% - 54px); }
  .bar-inner { gap: 23px; }
  .job-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .example-grid { gap: 11px; }
  .scene { aspect-ratio: 1.35; }
}
@media (max-width:680px) {
  .bar-inner { padding: 0 17px; height: 56px; gap: 16px; }
  .wordmark { font-size: 21px; gap: 6px; }
  .aperture { width: 25px; height: 25px; }
  nav { gap: 1px; }
  nav a { padding: 8px 9px; font-size: 12px; gap: 6px; }
  nav i { display: none !important; }
  .account { gap: 0; }
  .account .machine { display: none; }
  .logout { height: 33px; width: 33px; }
  .main { width: calc(100% - 32px); padding: 31px 0 40px; }
  h1 { font-size: 31px; }
  h2 { font-size: 20px; }
  .section-head { margin-bottom: 17px; }
  .composer { padding: 12px 12px 0; border-radius: 16px; }
  .type-switch button { gap: 6px; min-height: 32px; padding: 4px 11px; font-size: 12px; }
  .operation-field { font-size: 12px; }
  .operation-field select { padding-left: 4px; padding-right: 19px; }
  .operation-field::after { right: 5px; }
  #prompt { margin: 20px 0 12px; min-height: 76px; }
  .composer-foot { align-items: flex-end; }
  .settings { flex: 1; gap: 6px; }
  .generate { flex: 0 0 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 11px; }
  .generate #submit-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .composer-foot:has(#model-field[hidden]) .generate { flex-basis: auto; padding: 0 13px; }
  .composer-foot:has(#model-field[hidden]) #submit-label { position: static; width: auto; height: auto; clip-path: none; }
  .setting { min-height: 37px; }
  .model-setting select { padding-left: 58px; font-size: 12px; }
  .model-setting > span { left: 30px; }
  .model-setting .layers-icon { left: 10px; }
  .composer-tools { min-height: 39px; }
  .text-button, .mode-line { font-size: 11px; }
  .examples, .history, .monitor { margin-top: 27px; }
  .gallery-head, .history-head { margin-bottom: 11px; }
  .gallery-head > span { font-size: 11px; }
  .example-grid { display: flex; overflow-x: auto; padding: 3px 0 6px; scrollbar-width: thin; scrollbar-color: #454248 transparent; scroll-snap-type: x proximity; }
  .scene { width: min(74vw,270px); flex: 0 0 auto; aspect-ratio: 1.7; border-radius: 11px; scroll-snap-align: start; }
  .scene-text { left: 12px; bottom: 12px; font-size: 16px; }
  .scene-arrow { width: 24px; height: 24px; right: 10px; bottom: 9px; font-size: 14px; }
  .job-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .job-text { padding: 9px 8px 0; }
  .job-name { font-size: 13px; }
  .job-meta { font-size: 10px; }
  .monitor { padding: 12px; }
  .monitor-top { gap: 7px; }
  .monitor-top h2 { font-size: 16px; }
  .monitor-foot, .detail-foot { align-items: flex-start; flex-direction: column; gap: 8px; }
  #preview-controls, #detail-controls { max-width: 100%; flex-wrap: wrap; }
  .preview img, .preview video { height: min(34vh,330px); }
  input[type="password"], input[type="number"] { font-size: 16px; }
  #login-page { grid-template-columns: 1fr; grid-template-rows: minmax(145px,32svh) 1fr; }
  .login-art { grid-column: 1; grid-row: 1; }
  .login-art figcaption { left: 20px; bottom: 17px; }
  .login-art figcaption span { margin-bottom: 2px; font-size: 11px; }
  .login-art figcaption strong { font-size: 22px; }
  .login-panel { padding: 21px 24px; }
  .login-body { margin: auto; padding: 30px 0; }
  .login-body > p { margin: 10px 0 20px; }
}
@media (max-width:359px) {
  .bar-inner { padding: 0 11px; gap: 7px; }
  .main { width: calc(100% - 24px); }
  .type-switch button { padding: 4px 8px; }
  .composer-head { gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}
