:root {
  color-scheme: dark;
  --bg: #08090b;
  --surface: #151619;
  --surface-2: #1b1c20;
  --surface-3: #24252a;
  --line: #292a2f;
  --text: #f3f3f5;
  --muted: #9a9ca6;
  --blue: #4285f4;
  --danger: #ff6c73;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-size: 14px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }
.topbar { height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid #1b1c1f; }
.brand { font-size: 23px; font-weight: 700; letter-spacing: -0.6px; }
.top-actions { display: flex; gap: 20px; align-items: center; }
.icon-button { width: 28px; height: 34px; background: transparent; color: #b7b8c0; font-size: 25px; line-height: 1; }
.icon-button:hover, .favorite-filter:hover { color: #fff; }
.workspace { min-height: calc(100vh - 74px); padding: 36px 42px 300px; }
.toolbar { display: grid; grid-template-columns: 64px 138px minmax(200px, 1fr); gap: 12px; align-items: center; }
.favorite-filter { width: 64px; height: 64px; border-radius: 17px; border: 1px solid var(--line); background: var(--surface); color: #bfc0c8; font-size: 32px; }
.favorite-filter.active { color: #ffd66e; background: #27231b; }
.select-wrap select, .search-box, .control-field select, .control-field input { height: 64px; border: 1px solid var(--line); background: var(--surface); border-radius: 17px; }
.select-wrap select { width: 100%; padding: 0 18px; appearance: auto; }
.search-box { display: flex; align-items: center; gap: 16px; padding: 0 20px; color: #8e909a; }
.search-box span { font-size: 30px; transform: rotate(-20deg); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; }
.search-box input::placeholder { color: #8e909a; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; margin-top: 24px; }
.art-card { min-width: 0; display: grid; grid-template-columns: 40% 60%; height: 250px; border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: #111216; }
.art-preview { min-width: 0; position: relative; background: #1b1c20; display: flex; align-items: center; justify-content: center; }
.art-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-preview .status { position: absolute; inset: 12px auto auto 12px; background: rgba(7,8,10,.78); border-radius: 7px; padding: 5px 9px; font-size: 13px; }
.art-preview .status.error { color: var(--danger); font-weight: 600; }
.art-preview .status.loading { color: #8fb7ff; }
.art-meta { display: flex; flex-direction: column; min-width: 0; padding: 20px 17px 15px; }
.art-prompt { max-height: 84px; overflow: hidden; margin: 0 0 16px; font-size: 15px; line-height: 1.55; color: #e6e6e9; }
.tag-row { display: flex; gap: 8px; min-width: 0; overflow: hidden; }
.tag { flex: 0 0 auto; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 9px; border-radius: 5px; background: #222328; color: #bdbec7; font-size: 13px; }
.tag.green { color: #46d7a1; background: #102b24; }
.card-actions { margin-top: auto; display: flex; align-items: center; justify-content: flex-end; gap: 18px; color: #a9abb5; }
.card-actions button { padding: 0; background: transparent; color: inherit; font-size: 23px; }
.card-actions button:hover { color: #fff; }
.empty-state { max-width: 430px; margin: 160px auto 0; text-align: center; color: var(--muted); }
.empty-icon { font-size: 46px; color: #777b87; }
.empty-state h2 { margin: 14px 0 7px; color: #eeeef0; font-size: 19px; }
.empty-state p { margin: 0 0 22px; }
.composer { position: fixed; z-index: 3; right: max(32px, calc((100vw - 1600px) / 2)); bottom: 24px; left: max(32px, calc((100vw - 1600px) / 2)); padding: 13px 20px 15px; border: 1px solid #2d2e33; border-radius: 24px; background: rgba(25,26,29,.97); box-shadow: 0 18px 50px rgba(0,0,0,.42); }
.prompt-shell { position: relative; }
.prompt-shell textarea { display: block; width: 100%; height: 72px; min-height: 72px; resize: none; overflow: auto; padding: 7px 0; border: 0; outline: 0; background: transparent; font-size: 14px; line-height: 1.45; }
.prompt-shell textarea::placeholder { color: #e7e7e9; opacity: .95; }
.expand-prompt { position: absolute; right: 0; background: transparent; color: #aaaab4; font-size: 20px; }
.expand-prompt { right: 1px; bottom: 6px; font-size: 18px; }
.control-row { display: flex; gap: 12px; align-items: end; }
.control-field { flex: 1 1 130px; min-width: 0; }
.control-field span { display: block; margin-bottom: 5px; color: #aaaab3; font-size: 11px; }
.control-field select, .control-field input, .picker-trigger { width: 100%; height: 42px; padding: 0 12px; border-radius: 13px; outline: 0; }
.control-field select { appearance: auto; }
.control-field input { background: var(--surface); }
.model-control select:disabled { opacity: .78; color: #d1d1d6; cursor: default; }
.number-field { max-width: 130px; }
.size-control { position: relative; }
.picker-trigger { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.picker-chevron { color: #a8a9b1; font-size: 17px; }
.size-menu { position: absolute; z-index: 7; bottom: calc(100% + 10px); left: 0; width: min(430px, 70vw); padding: 12px; border: 1px solid #35363d; border-radius: 16px; background: #1b1c20; box-shadow: 0 20px 50px rgba(0,0,0,.55); }
.size-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.size-grid button, .custom-size-option { min-height: 40px; border: 1px solid #303138; border-radius: 9px; background: #191a1e; color: #d6d6db; font-size: 13px; }
.size-grid button:hover, .size-grid button.selected { border-color: var(--blue); background: #1d2a43; color: #8bb5ff; }
.custom-size-option { width: 100%; margin-top: 10px; color: #bfc0c8; }
.custom-size-row { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.custom-size-row input { min-width: 0; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #111216; }
.custom-size-row button { height: 34px; padding: 0 11px; border-radius: 8px; background: var(--blue); color: #fff; font-size: 12px; }
.attach-button, .generate-button { width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.attach-button { position: relative; background: #2b2c31; color: #f2f2f4; font-size: 29px; }
.attach-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.generate-button { background: var(--blue); color: white; font-size: 34px; transition: transform .15s, background .15s; }
.generate-button:hover { background: #5c99fb; transform: translateY(-1px); }
.generate-button:disabled { opacity: .5; cursor: wait; transform: none; }
.attachment-preview { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.attachment-preview img { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; }
.attachment-preview button { color: var(--muted); background: transparent; font-size: 20px; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 105px; transform: translate(-50%, 12px); padding: 11px 16px; border: 1px solid #3a3b42; border-radius: 10px; background: #26272c; color: #f4f4f5; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.dialog { width: min(520px, calc(100vw - 32px)); border: 1px solid #36373d; border-radius: 18px; padding: 25px; background: #191a1e; color: var(--text); box-shadow: 0 24px 80px rgba(0,0,0,.6); }
.dialog::backdrop { background: rgba(0,0,0,.68); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog h2 { margin: 0; font-size: 22px; }
.close-button { background: transparent; color: #aaaab3; font-size: 26px; }
.dialog-copy, .help-content { color: var(--muted); line-height: 1.6; }
.form-field { display: block; margin-top: 17px; }
.form-field span { display: block; margin-bottom: 7px; color: #c3c4cb; font-size: 14px; }
.form-field input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #101115; }
.key-application-link { display: inline-block; margin-top: 16px; color: #80abff; font-size: 13px; text-decoration: none; }
.key-application-link:hover { text-decoration: underline; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.primary-button, .secondary-button { min-height: 42px; padding: 0 18px; border-radius: 11px; }
.primary-button { background: var(--blue); color: white; }
.secondary-button { background: #2b2c31; color: #eee; }
.prompt-dialog { width: min(1250px, calc(100vw - 48px)); height: min(720px, calc(100vh - 80px)); max-width: none; max-height: none; padding: 0; overflow: hidden; border: 1px solid #36373d; border-radius: 22px; background: #1a1b1f; color: var(--text); box-shadow: 0 24px 80px rgba(0,0,0,.65); }
.prompt-dialog::backdrop { background: rgba(0,0,0,.68); }
.expanded-prompt-shell { position: relative; width: 100%; height: 100%; }
.expanded-prompt-shell textarea { width: 100%; height: 100%; resize: none; padding: 25px 58px 28px 25px; border: 0; outline: 0; background: transparent; color: #ededf0; font-size: 17px; line-height: 1.6; }
.expanded-prompt-shell textarea::placeholder { color: #dedee2; }
.expanded-close, .expanded-collapse { position: absolute; z-index: 1; background: transparent; color: #aeb0ba; font-size: 26px; }
.expanded-close { top: 15px; right: 18px; }
.expanded-collapse { right: 19px; bottom: 17px; font-size: 20px; }
@media (max-width: 900px) { .topbar { padding: 0 20px; } .workspace { padding: 24px 20px 300px; } .composer { right: 16px; left: 16px; bottom: 16px; } .control-row { flex-wrap: wrap; } .control-field { flex-basis: calc(33.333% - 10px); } .attach-button, .generate-button { width: 50px; height: 50px; } }
@media (max-width: 560px) { .topbar { height: 62px; } .brand { font-size: 23px; } .top-actions { gap: 6px; } .icon-button { font-size: 21px; } .toolbar { grid-template-columns: 54px 105px minmax(0, 1fr); gap: 7px; } .favorite-filter { width: 54px; height: 54px; } .select-wrap select, .search-box { height: 54px; border-radius: 14px; } .search-box { padding: 0 10px; gap: 5px; } .search-box input { font-size: 14px; } .gallery { grid-template-columns: 1fr; gap: 14px; } .art-card { height: 214px; } .art-prompt { font-size: 15px; } .composer { padding: 10px 13px 12px; border-radius: 20px; } .prompt-shell textarea { height: 58px; min-height: 58px; font-size: 13px; } .control-field { flex-basis: calc(50% - 6px); } .control-field select, .control-field input, .picker-trigger { height: 38px; } .number-field { max-width: none; } .attach-button, .generate-button { align-self: end; width: 48px; height: 48px; } .size-menu { width: min(360px, calc(100vw - 32px)); } .size-grid { grid-template-columns: repeat(5, 1fr); } .prompt-dialog { width: calc(100vw - 24px); height: calc(100vh - 32px); border-radius: 16px; } .expanded-prompt-shell textarea { padding: 20px 45px 20px 18px; font-size: 15px; } }
