.app-toolbar { position: sticky; z-index: 20; top: 0; display: grid; height: 56px; grid-template-columns: 48px 1fr 48px; align-items: center; background: rgba(18,18,18,.96); backdrop-filter: blur(14px); }
.app-toolbar h1 { margin: 0; font-size: 17px; text-align: center; }
.back-button, .history-button { display: grid; width: 40px; height: 40px; place-items: center; margin-left: 4px; border: 0; border-radius: 20px; background: transparent; font-size: 30px; }
.history-button { margin: 0 4px 0 auto; font-size: 19px; }
.creator-medium { display: grid; grid-template-columns: 1fr 1fr; height: 44px; margin: 0 16px; border-bottom: 1px solid var(--line); }
.creator-medium button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: #85858d; font-size: 14px; }
.creator-medium button.active { border-color: var(--accent); color: #fff; font-weight: 700; }
.mode-tabs { display: flex; gap: 22px; min-height: 44px; padding: 0 16px; overflow-x: auto; border-bottom: 1px solid #242429; scrollbar-width: none; }
.mode-tabs::-webkit-scrollbar { display: none; }
.mode-tab { flex: 0 0 auto; padding: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #83838b; font-size: 12px; white-space: nowrap; }
.mode-tab.active { border-color: var(--accent); color: #fff; }
.creator-scroll { padding: 16px 16px 100px; }
.selector-row { display: grid; width: 100%; min-height: 54px; grid-template-columns: 28px minmax(68px, auto) 1fr 14px; align-items: center; gap: 8px; padding: 8px 14px; border: 0; border-radius: 8px; background: #202024; text-align: left; }
.model-glyph { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 5px; background: #383840; color: var(--accent); font-size: 10px; font-weight: 800; }
.selector-label { font-size: 14px; }
.selector-value { min-width: 0; text-align: right; }
.selector-value strong, .selector-value small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selector-value strong { font-size: 12px; font-weight: 500; }
.selector-value small { margin-top: 2px; color: #777780; font-size: 8px; }
.chevron { color: #8d8d94; font-size: 20px; }
.api-state { display: flex; align-items: center; gap: 6px; min-height: 22px; padding: 5px 3px 2px; color: #777780; font-size: 9px; }
.api-state > span { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.api-state.live > span { background: var(--green); }

.upload-area { position: relative; height: 130px; margin-top: 14px; overflow: hidden; border-radius: 8px; background: #202024; }
.upload-area[hidden] { display: none; }
.upload-button { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; border: 0; background: transparent; }
.upload-symbol { display: grid; width: 32px; height: 32px; place-items: center; color: var(--muted); font-size: 28px; font-weight: 200; }
.upload-button strong { font-size: 13px; }
.upload-button small { color: #777780; font-size: 10px; }
.upload-preview { display: none; position: absolute; inset: 0; background-position: center; background-size: cover; }
.upload-area.has-image { height: 180px; }
.upload-area.has-image .upload-preview { display: block; }
.upload-area.has-image .upload-button { position: absolute; z-index: 2; top: 8px; right: 8px; width: 32px; height: 32px; padding: 0; border-radius: 16px; background: rgba(0,0,0,.7); }
.upload-area.has-image .upload-button strong, .upload-area.has-image .upload-button small { display: none; }
.upload-count { display: none; position: absolute; z-index: 2; bottom: 8px; left: 8px; padding: 4px 7px; border-radius: 4px; background: rgba(0,0,0,.72); font-size: 9px; }
.upload-area.has-image .upload-count { display: block; }

.prompt-section { margin-top: 20px; }
.prompt-section > label { display: block; margin-bottom: 12px; font-size: 17px; font-weight: 700; }
.prompt-box { min-height: 140px; padding: 16px; border-radius: 8px; background: #202024; }
.prompt-box textarea { display: block; width: 100%; min-height: 80px; resize: none; padding: 0; border: 0; outline: 0; background: transparent; color: #fff; font-size: 14px; line-height: 1.45; }
.prompt-box textarea::placeholder { color: #808080; }
.prompt-meta { display: flex; align-items: center; justify-content: space-between; min-height: 28px; margin-top: 12px; color: #808080; font-size: 12px; }
.inspiration { height: 28px; padding: 0 12px; border: 0; border-radius: 14px; background: #303035; color: #a4a4a5; font-size: 12px; }
.inspiration span { margin-right: 5px; color: var(--accent); }
.clear-prompt { width: 24px; height: 24px; margin-right: 2px; padding: 0; border: 0; background: transparent; color: #808080; font-size: 20px; }

.generation-settings { margin-top: 20px; }
.setting-group { display: grid; min-height: 42px; grid-template-columns: 1fr minmax(0, 190px); align-items: center; gap: 8px; margin-top: 14px; padding: 0 16px; border-radius: 8px; background: #202024; }
.setting-group[hidden] { display: none; }
.setting-label { font-size: 13px; }
.option-group { display: flex; justify-content: flex-end; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.option-group::-webkit-scrollbar { display: none; }
.option-group button { flex: 0 0 auto; min-width: 38px; height: 28px; padding: 0 7px; border: 0; border-radius: 5px; background: #303036; color: #929299; font-size: 11px; }
.option-group button.selected { outline: 1px solid var(--accent); background: rgba(255,107,138,.1); color: #fff; }
.toggle-row { display: flex; min-height: 52px; align-items: center; justify-content: space-between; margin-top: 14px; padding: 0 16px; border-radius: 8px; background: #202024; }
.toggle-row[hidden] { display: none; }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { font-size: 13px; }
.toggle-row small { margin-top: 3px; color: #777780; font-size: 9px; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-control { position: relative; width: 31px; height: 18px; border-radius: 9px; background: #4a4a50; }
.toggle-control::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #ddd; transition: transform .2s; }
.toggle-row input:checked + .toggle-control { background: var(--accent); }
.toggle-row input:checked + .toggle-control::after { transform: translateX(13px); }
.generate-dock { position: fixed; z-index: 30; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; width: min(calc(100% - 32px), 343px); height: 57px; padding: 8px 0; background: var(--bg); transform: translateX(-50%); }
.generate-button { display: flex; width: 100%; height: 41px; align-items: center; justify-content: center; padding: 0 16px; border: 0; border-radius: 8px; background: linear-gradient(90deg, #ff5f84, #ff7b73); color: #fff; }
.generate-button strong { font-size: 16px; }
.generate-button i { width: 1px; height: 16px; margin: 0 9px; background: #fff; }
.generate-button small { margin-left: 4px; font-family: "Roboto Numbers", Arial, sans-serif; font-size: 15px; }
.generate-button:disabled { opacity: .55; }
.credit-coin { display: inline-block; width: 16px; height: 16px; border: 3px solid var(--gold); border-radius: 50%; box-shadow: inset 0 0 0 2px transparent; }

.history-toolbar { grid-template-columns: 48px 1fr auto; }
.credits-pill { display: flex; min-width: 52px; height: 27px; align-items: center; justify-content: center; gap: 4px; margin-right: 16px; padding: 0 10px; border: 0; border-radius: 14px; background: #28282d; font-size: 13px; }
.credits-pill .credit-coin { width: 14px; height: 14px; border-width: 3px; }
.history-search { display: flex; height: 44px; align-items: center; margin: 12px 16px 0; padding: 0 14px; border-radius: 8px; background: #202024; }
.history-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 14px; }
.history-search > span { position: relative; flex: 0 0 auto; color: #777780; transform: scale(.8); }
.history-tabs { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.history-tabs button { min-width: 60px; height: 38px; padding: 0 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #85858d; font-size: 14px; }
.history-tabs button.active { border-color: var(--accent); color: #fff; }
#creation-list { padding: 8px 16px 32px; }
.creation-card { display: grid; width: 100%; grid-template-columns: 88px 1fr; gap: 12px; margin-bottom: 10px; padding: 9px; border: 0; border-radius: 8px; background: #202024; text-align: left; }
.creation-thumb { width: 88px; height: 108px; border-radius: 6px; background: #111; object-fit: cover; }
.creation-copy { min-width: 0; padding-top: 4px; }
.creation-copy strong { display: block; overflow: hidden; margin: 8px 0; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.creation-copy p { margin: 0; color: #85858d; font-size: 10px; line-height: 1.45; }
.status { display: inline-block; padding: 3px 6px; border-radius: 4px; background: rgba(99,214,155,.12); color: var(--green); font-size: 9px; }
.empty-state { padding: 110px 22px 40px; text-align: center; color: #85858d; }
.empty-mark { display: grid; width: 64px; height: 64px; margin: 0 auto 14px; place-items: center; border-radius: 50%; background: #202024; color: var(--accent); font-size: 28px; }
.empty-state h2 { margin: 0 0 7px; color: #fff; font-size: 16px; }
.empty-state p { margin: 0; font-size: 12px; }
