:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-synthesis: none;
  color: #e3e9e6;
  background: #111719;
  --muted: #9ba9a4;
  --line: #2b373a;
  --accent: #d47d5d;
  --ink: #151e20;
  --green: #91b69b;
  --surface: #1a2427;
  --input: #131d20;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; transition: background .18s, transform .18s; }
button:disabled { opacity: .5; cursor: default; }
button:active:not(:disabled) { transform: translateY(1px); }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, summary:focus-visible { outline: 3px solid #d47d5d88; outline-offset: 3px; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
h1, h2, h3, p { margin: 0; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--input); padding: 10px 12px; min-width: 0; color: #e3e9e6; }
input::placeholder, textarea::placeholder { color: #7d908a; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--green); padding: 0; flex-shrink: 0; }
textarea { resize: vertical; line-height: 1.5; }
.primary, .secondary, .danger { border: 0; border-radius: 8px; padding: 10px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 600; font-size: 14px; min-height: 40px; }
.primary { background: var(--accent); color: #171b19; }
.primary:hover:not(:disabled) { background: #e28d6d; }
.secondary { border: 1px solid #3a4849; background: #222f32; color: #d4dfd9; }
.secondary:hover:not(:disabled) { background: #2b3b3e; }
.danger { background: #a94740; color: #fff; }
.text-button, .danger-link { border: 0; background: none; padding: 5px 0; color: #a7b9b0; font-size: 12px; }
.text-button:hover { text-decoration: underline; }
.danger-link { color: #f09c90; }
.icon-button { border: 1px solid var(--line); background: #233034; color: #d9e3de; border-radius: 8px; width: 34px; height: 34px; display: grid; place-items: center; }
.eyebrow { font-size: 10px; letter-spacing: 1.6px; color: #a0b2a8; font-weight: 700; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-size: 26px; letter-spacing: -1.2px; font-weight: 750; }
.brand-mark { height: 43px; width: 43px; background: var(--accent); color: #131c1b; display: grid; place-items: center; line-height: 1; font-size: 33px; border-radius: 12px; letter-spacing: -4px; padding-right: 4px; }
img.brand-mark { object-fit: cover; padding: 0; flex-shrink: 0; }
.brand-sub { display: block; font-size: 9px; letter-spacing: 1.6px; margin: 2px 0 0 1px; font-weight: 600; color: #acbbb3; }
.app { display: flex; height: 100dvh; overflow: hidden; }
.sidebar { width: 205px; flex-shrink: 0; background: var(--ink); border-right: 1px solid var(--line); padding: 28px 18px 18px; display: flex; flex-direction: column; }
.sidebar .brand { padding-left: 8px; }
.nav-label { font-size: 10px; color: #8fa59a; letter-spacing: 1px; margin: 40px 8px 14px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 11px; border: 0; background: none; color: #b6c7bd; border-radius: 8px; margin-bottom: 7px; font-size: 14px; text-align: left; }
.nav-item.selected { background: #2a3c36; color: #e0efdf; }
.nav-item span { margin-left: auto; color: #bad2b9; font-size: 12px; }
.nav-item .nav-caption { margin-left: 0; color: inherit; font-size: 14px; min-width: 0; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item:hover { background: #253430; }
.sidebar nav { min-height: 0; overflow: auto; }
.sidebar-metrics .nav-item { background: #2a3c36; color: #e0efdf; }
.nav-overview .nav-item { cursor: default; }
.nav-overview .nav-item:hover { background: #2a3c36; }
.nav-divider { height: 1px; background: var(--line); margin: 14px 0; }
.library-tabs { display: flex; flex-direction: column; gap: 4px; padding: 0 0 4px 19px; }
.library-tab { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px; background: none; color: #aabeb0; text-align: left; font-size: 13px; }
.library-tab>span { min-width: 0; }
.library-tab>small { margin-left: auto; font-size: 12px; color: #a7c2a6; }
.library-tab.active { background: #2a4034; color: #cee4c5; font-weight: 600; }
.library-tab:hover { background: #253430; }
.sidebar-bottom { margin-top: auto; }
.connection { font-size: 12px; color: #b4c8ba; display: flex; align-items: center; gap: 8px; padding: 16px 8px; }
.connection i { display: inline-block; width: 6px; height: 6px; background: #a5c69b; border-radius: 50%; }
.logout { border: 0; background: none; color: #b2c4b7; font-size: 13px; padding: 12px 8px; width: 100%; text-align: left; }
.logout span { float: right; }
.api-settings-button { display: flex; gap: 9px; align-items: center; width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #1b292b; color: #d5e0d8; padding: 11px 9px; font-size: 13px; margin: 4px 0 7px; text-align: left; }
.api-settings-button:hover { background: #2a3a36; }
.api-settings-button svg { width: 18px; height: 18px; }
.sidebar-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 12px; padding: 15px 8px 0; font-size: 10px; letter-spacing: 1px; color: #8ca293; }
.main { min-width: 0; flex: 1; height: 100%; padding: 24px 30px 14px; display: flex; flex-direction: column; gap: 18px; overflow: hidden; }
.page-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 16px; }
.page-header h1 { font-size: 38px; font-weight: 600; letter-spacing: -1.6px; margin-top: 5px; }
.heading-dot { color: var(--accent); }
.page-header p { font-size: 14px; color: var(--muted); margin-top: 5px; }
.workspace { display: flex; flex: 1; min-height: 0; }
.library { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.library-top { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 8px; }
.source-path { display:flex;align-items:center;gap:12px;min-width:0; }
.source-path button { display:flex;align-items:center;gap:4px;flex-shrink:0; }
.source-path svg { width:16px;height:16px; }
.source-path strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px; }
.source-group .thumb { background:linear-gradient(140deg,#253a36,#182727); }
.source-badge { position:absolute;bottom:8px;left:8px;display:flex;align-items:center;gap:5px;padding:4px 7px;border-radius:6px;background:#14211ee6;color:#fff; }
.source-badge svg { width:15px;height:15px; }
.source-count { font-size:11px;color:var(--muted);margin-top:3px; }
.library-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.library-actions .icon-button { width: 36px; height: 36px; padding: 0; flex-shrink: 0; }
.library-actions svg { width: 18px; height: 18px; }
#show-upload { position: relative; }
#show-upload[aria-expanded=true] { border-color: var(--green); background: #2a4034; }
#upload-badge { position: absolute; top: -6px; right: -7px; border-radius: 10px; min-width: 16px; padding: 2px 4px; background: #405b48; color: #e1efda; font-size: 9px; line-height: 12px; }
#show-upload.uploading #upload-badge { background: var(--accent); color: var(--ink); }
.library h2 { font-size: 19px; font-weight: 600; letter-spacing: -.4px; }
.library h2>span { font-size: 13px; color: #a3b5a8; margin-left: 4px; font-weight: 400; }
.reveal-option { font-size: 12px; white-space: nowrap; }
.reveal-option[aria-pressed=true] { background: #52332d; border-color: #9a6555; color: #f0c2b0; }
.search { display: flex; align-items: center; width: clamp(190px,25vw,320px); height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 0; }
.search button { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; padding: 0; border: 0; color: inherit; border-radius: 7px; background: none; }
.search svg { width: 17px; color: #9eb1a6; }
.search input { border: 0; background: none; padding: 6px 8px 6px 0; height: 34px; font-size: 14px; }
.search input:focus-visible { outline: none; }
.search:focus-within { outline: 2px solid #d47d5d88; }
.filter-anchor { flex-shrink: 0; }
.filter-anchor>button { padding: 6px 12px; min-height: 32px; }
.filter-panel { position: absolute; top: calc(100% - 1px); left: 0; width: min(252px,100%); height: 336px; overflow: hidden; display: grid; grid-template-rows: 24px 65px minmax(0,1fr); gap: 8px; z-index: 5; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 12px 30px #0006; }
.filter-panel.above { top: auto; bottom: calc(100% - 1px); }
.filter-heading { display: flex; justify-content: space-between; align-items: center; }
.filter-panel fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.filter-panel legend { margin-bottom: 4px; font-weight: 600; line-height: 18px; }
.filter-panel label { display: flex; align-items: center; gap: 7px; padding: 2px 0; cursor: pointer; line-height: 18px; min-width: 0; }
.filter-panel label input { flex-shrink: 0; }
.filter-tag-section { min-height: 0; display: grid; grid-template-rows: 18px 32px minmax(0,1fr); gap: 4px; }
.filter-panel .filter-tag-label { padding: 0; font-weight: 600; }
.filter-tag-label small { font-size: 11px; color: var(--muted); font-weight: 400; }
#filter-tag-search { padding: 5px 7px; height: 32px; margin: 0; }
.filter-tags { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.filter-tags label { height: 23px; }
.filter-tags label>span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-tags small { margin-left: auto; color: var(--muted); }
.filter-tags p { color: var(--muted); margin-top: 5px; line-height: 1.5; }
.duplicate-summary { margin: 0; color: #e6bd8c; font-size: 12px; line-height: 1.5; }
.gallery-browser { position: relative; display: flex; flex: 1; min-height: 0; }
.library-results { min-width: 0; min-height: 0; overflow: auto; flex: 1; padding-right: 5px; display: flex; flex-direction: column; scrollbar-gutter: stable; touch-action: pan-y; }
.gallery { --gallery-columns: 9; --photo-height: 190px; display: flex; flex-direction: column; gap: 24px; flex-shrink: 0; }
.gallery-month { font-size: 23px; font-weight: 550; margin: 4px 0 15px; letter-spacing: -.5px; }
.gallery-date { font-size: 13px; font-weight: 550; color: #bdcfc1; margin-bottom: 10px; }
.day-images { display: flex; flex-direction: column; gap: 14px; }
.photo-row { display: flex; gap: 7px; align-items: flex-start; }
.card { width: clamp(108px,calc(var(--photo-height) * var(--image-ratio,.75)),320px); min-width: 0; position: relative; contain: layout style; }
.scroll-date { position: absolute; right: 16px; z-index: 2; transform: translateY(-50%); pointer-events: none; padding: 4px 6px; border-radius: 4px; background: #172423e8; color: #c3d7be; font-size: 10px; font-variant-numeric: tabular-nums; opacity: .7; }
.scroll-date.scrolling { opacity: 1; }
.card.selected .thumb { outline: 2px solid #d47d5d; outline-offset: -2px; }
.image-select { position: absolute; top: 7px; right: 7px; z-index: 1; width: 21px; height: 21px; display: grid; place-items: center; border-radius: 4px; background: #101a1ce6; cursor: pointer; }
.image-select input { appearance: none; margin: 0; width: 17px; height: 17px; border: 1px solid #a4b6ac; border-radius: 3px; background: #1a2526; display: grid; place-content: center; cursor: pointer; }
.image-select input:checked { background: var(--green); border-color: var(--green); }
.image-select input:checked:after { content: ''; width: 8px; height: 4px; border-left: 2px solid #15251c; border-bottom: 2px solid #15251c; transform: translateY(-1px) rotate(-45deg); }
.bulk-tools { position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; flex-shrink: 0; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.bulk-selection, .bulk-selection>label, .bulk-actions { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.bulk-selection>label { cursor: pointer; }
.bulk-selection input { margin: 0; }
#selection-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.bulk-actions { margin-left: auto; }
.bulk-tools .secondary, .bulk-tools .danger { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.ai-progress { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 10px 12px; border: 1px solid #40543c; border-radius: 8px; background: #1c2d23; flex-shrink: 0; }
.ai-progress-main { min-width: 0; }
.ai-progress strong { font-size: 13px; font-weight: 500; }
.ai-progress-main>progress { width: 100%; height: 6px; display: block; margin: 7px 0; }
.ai-progress-detail { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: #b4c8a9; line-height: 1.5; }
.ai-progress-detail small { font-size: inherit; }
.ai-progress.has-errors { border-color: #916448; }
.ai-progress.has-errors progress { accent-color: #d49b69; }
.ai-progress .ai-controls { display: flex; justify-content: flex-end; gap: 6px; }
.ai-control-panel { max-width: 330px; text-align: right; }
#ai-control-note { display: block; margin-top: 5px; font-size: 11px; color: #b4c8a9; line-height: 1.4; }
.ai-controls small { color: #a8b7ae; font-size: 11px; }
.ai-controls button { min-height: 32px; padding: 5px 10px; }
.ai-controls .danger-text { color: #f0a39b; }
.ai-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #66543e; border-radius: 8px; background: #29271f; color: #dfc9a6; font-size: 12px; flex-shrink: 0; }
.ai-result>span { flex: 1; }
.ai-result .secondary { min-height: 30px; padding: 5px 9px; font-size: 12px; }
.ai-result .text-button { padding: 3px 6px; font-size: 18px; }
.thumb { display: block; position: relative; border: 0; padding: 0; width: 100%; height: var(--photo-height); background: #273438; overflow: hidden; border-radius: 7px; text-align: left; contain: layout paint; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; font-size: 0; color: transparent; transition: transform .3s,filter .25s; }
.thumb:hover img { transform: scale(1.035); }
.gallery.selecting .thumb:hover img { transform: none; }
.gallery.selecting .card { user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.card.r18 .thumb img { filter: blur(14px); transform: scale(1.1); }
.gallery.reveal .card.r18 .thumb img { filter: none; transform: none; }
.rating-label { position: absolute; top: 8px; left: 8px; background: #142920e8; backdrop-filter: blur(4px); font-size: 11px; font-weight: 650; padding: 5px 7px; border-radius: 5px; color: #c4e4ba; }
.rating-label.r18 { color: #f4b3a5; background: #38211feb; }
.rating-label.unknown { color: #edc68c; background: #332b1ee8; }
.copy-mini { position: absolute; bottom: 8px; right: 8px; width: 26px; height: 26px; display: grid; place-items: center; background: #172423ed; border-radius: 6px; color: #c1d6c7; }
.copy-mini svg { width: 15px; height: 15px; }
.card-title { background: none; border: 0; text-align: left; padding: 9px 0 5px; font-size: 14px; line-height: 1.5; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; width: 100%; font-weight: 500; color: #d9e5dc; }
.card-tags { display: flex; gap: 4px; min-height: 22px; align-items: center; overflow: hidden; }
.card-tags span { font-size: 11px; background: #263630; color: #afc6b0; border-radius: 4px; padding: 3px 5px; white-space: nowrap; }
.card-tags .ai-state { background: none; color: #e4b18e; font-size: 11px; margin-left: auto; flex-shrink: 0; }
.empty { text-align: center; border: 1px dashed #34463b; border-radius: 12px; padding: 24px 15px; background: #18221f; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-icon { width: 48px; height: 48px; border: 1px solid #38513b; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px; color: #b1c9a6; background: #26392b; flex-shrink: 0; }
.empty-icon svg { width: 26px; height: 26px; }
.empty h3 { font-size: 23px; font-weight: 500; letter-spacing: -.6px; }
.empty p { font-size: 14px; color: #a4b9a7; line-height: 1.7; margin: 10px 0 20px; max-width: 350px; }
.empty .secondary { font-size: 13px; }
.list-status { font-size: 13px; color: #a3b59e; text-align: center; padding: 12px 0; }
.list-status:empty { display: none; }
.load-more { margin: 16px auto 0; display: flex; font-size: 13px; flex-shrink: 0; }
.upload-panel { position: fixed; right: 24px; top: 68px; z-index: 12; width: min(340px,calc(100% - 20px)); height: min(740px,calc(100dvh - 80px)); background: var(--surface); border: 1px solid #45564d; border-radius: 14px; box-shadow: 0 16px 60px #0009; padding: 16px; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.upload-panel:before { content: ''; position: absolute; right: 11px; top: 0; width: 16px; height: 3px; border-radius: 0 0 4px 4px; background: var(--green); }
.upload-panel>* { flex-shrink: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; }
.panel-heading .eyebrow { font-size: 10px; letter-spacing: 1px; }
.panel-heading h2 { font-size: 21px; font-weight: 550; letter-spacing: -.5px; margin-top: 3px; }
.dropzone { border: 1px dashed #46614a; border-radius: 8px; background: #1c2a23; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 4px 9px; padding: 13px 11px; transition: background .2s; }
.dropzone.dragging { background: #2a4030; border-color: #95b67d; }
.upload-icon { height: 36px; width: 36px; border: 1px solid #3a503c; background: #2a3b2c; border-radius: 9px; display: grid; place-items: center; color: #b8cda3; grid-row: span 2; }
.upload-icon svg { width: 19px; }
.dropzone strong { font-size: 14px; font-weight: 550; }
.dropzone>span { font-size: 11px; color: #9cb49e; grid-column: 2; }
.dropzone .secondary { font-size: 12px; padding: 7px 10px; min-height: 34px; grid-column: 3; grid-row: 1 / 3; }
.dropzone small { font-size: 11px; color: #9db2a0; margin-top: 5px; line-height: 1.5; grid-column: 1 / -1; }
.url-import { border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.url-import summary { font-size: 13px; color: #b7c8b9; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 7px; }
.url-import summary svg { width: 15px; height: 15px; }
.url-import summary span { margin-left: auto; font-size: 17px; }
.url-import textarea { margin: 10px 0 7px; font-size: 13px; }
.url-import .secondary { width: 100%; font-size: 13px; min-height: 34px; padding: 7px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upload-options-toggle { flex: 1; min-width: 0; padding: 2px 0; border: 0; background: none; color: inherit; text-align: left; display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 550; }
.toggle-row svg { width: 16px; height: 16px; color: #adc78e; }
.toggle-row small { display: block; margin-top: 3px; font-size: 11px; color: #99ae9b; font-weight: 400; }
.upload-settings-mark { margin-left: auto; color: #a8bfa6; font-size: 17px; }
.upload-settings-mark:after { content: '+'; }
.upload-options-toggle[aria-expanded=true] .upload-settings-mark:after { content: '−'; }
.toggle-row input { appearance: none; width: 32px; height: 19px; margin: 0; border: 0; background: #47564c; border-radius: 20px; position: relative; cursor: pointer; }
.toggle-row input:checked { background: #809f69; }
.toggle-row input:before { content: ''; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #eef4e9; transition: transform .18s; }
.toggle-row input:checked:before { transform: translateX(13px); }
.field { display: block; font-size: 14px; color: #b9cbbd; margin-top: 14px; }
.field>span { color: #99ad9d; font-size: 12px; margin-left: 3px; }
.field input, .field textarea, .field select { display: block; margin-top: 7px; font-size: 14px; }
.upload-settings { position: fixed; inset: auto; margin: 0; padding: 12px; border: 1px solid #415048; border-radius: 9px; background: var(--surface); color: inherit; box-shadow: 0 12px 32px #0008; overflow: auto; }
.upload-settings:popover-open { display: grid; gap: 10px; }
.upload-settings .field { margin: 0; font-size: 13px; }
.upload-settings .field input { margin-top: 5px; }
.upload-settings input, .upload-settings select { height: 32px; min-height: 32px; padding: 5px 8px; font-size: 13px; }
.upload-inline { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: #b9cbbd; }
.upload-inline select { width: 62%; }
.queue-heading { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; }
.queue-heading h3 { font-size: 14px; font-weight: 550; }
.queue-heading h3 span { font-size: 12px; padding: 2px 5px; border-radius: 4px; background: #2b3b2e; color: #bed0ac; margin-left: 3px; }
.queue-heading .text-button { font-size: 12px; }
.queue-list { min-height: 36px; flex: 1; overflow: auto; }
.queue-empty { text-align: center; font-size: 12px; color: #9fb19c; padding: 10px 0; }
.queue-item { display: grid; grid-template-columns: 34px 1fr 22px; gap: 9px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.queue-item img, .queue-file-icon { width: 34px; height: 38px; object-fit: cover; border-radius: 4px; background: #2b3a30; }
.queue-file-icon { display: grid; place-items: center; color: #b3c3a2; }
.queue-item>div { min-width: 0; }
.queue-item strong { display: block; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-weight: 500; }
.queue-item small { display: block; font-size: 12px; color: #a7bba2; margin-top: 4px; line-height: 1.5; overflow-wrap: anywhere; }
.queue-item.error small { color: #f2a692; }
.queue-item button { background: none; border: 0; padding: 2px; color: #adc09d; font-size: 18px; }
.queue-item progress { height: 3px; width: 100%; margin-top: 5px; }
.queue-progress { font-size: 12px; color: #b0c49f; }
.queue-progress>progress { display: block; width: 100%; height: 5px; margin-top: 7px; border: 0; border-radius: 10px; overflow: hidden; }
progress { accent-color: #9cba7b; }
progress::-webkit-progress-bar { background: #2d3d30; border-radius: 10px; }
progress::-webkit-progress-value { background: #9cba7b; border-radius: 10px; }
.queue-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.queue-actions>.primary { flex: 1; font-size: 14px; min-height: 40px; padding: 9px 12px; }
.queue-actions>.primary svg { width: 16px; height: 16px; }
.queue-actions>.secondary { font-size: 13px; padding: 8px 10px; }
.queue-actions>.text-button { width: 100%; font-size: 13px; }
.page-footer { display: flex; flex-shrink: 0; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; font-size: 10px; letter-spacing: .7px; color: #8fa58e; }
.page-footer>span:last-child { letter-spacing: 0; color: #a3b79b; }
.editor { border: 0; padding: 0; max-width: 980px; width: calc(100% - 24px); max-height: calc(100dvh - 32px); background: transparent; color: inherit; overflow: visible; }
.editor[open] { display: block; }
.editor-surface { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; width: calc(100% - 112px); max-width: 850px; height: var(--editor-height,auto); max-height: calc(100dvh - 32px); margin: 0 auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.editor-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 48px; border-radius: 10px; }
.editor-nav:active:not(:disabled) { transform: translateY(-50%); }
.editor-prev { left: 0; }
.editor-next { right: 0; }
.editor::backdrop, .confirm-dialog::backdrop { background: #060d10cf; backdrop-filter: blur(5px); }
.api-dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; background: var(--surface); color: inherit; width: min(780px,calc(100% - 32px)); height: min(630px,calc(100dvh - 32px)); max-height: calc(100dvh - 32px); overflow: hidden; }
.api-dialog[open] { display: flex; flex-direction: column; }
.api-dialog::backdrop { background: #060d10cf; backdrop-filter: blur(5px); }
.api-dialog-header { display: flex; flex-shrink: 0; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 18px; }
.api-dialog h2 { margin: 6px 0 8px; font-size: 25px; }
.api-dialog-header p, .api-note, .api-empty p { color: var(--muted); line-height: 1.6; font-size: 13px; }
.api-current { flex-shrink: 0; height: 36px; display: flex; align-items: center; overflow: hidden; margin: 0 26px 18px; padding: 8px 12px; background: #22352b; color: #c7dfbf; border: 1px solid #3e5140; border-radius: 8px; font-size: 12px; white-space: nowrap; }
.api-current.test-ok, .api-current.test-failed { height: auto; min-height: 36px; max-height: 74px; overflow: auto; white-space: normal; line-height: 1.45; overflow-wrap: anywhere; }
.api-current.test-ok { background: #223b2b; border-color: #62885d; color: #d2ecc7; }
.api-current.test-failed { background: #3b3024; border-color: #9a7450; color: #f0d1a9; }
.api-layout { display: grid; grid-template-columns: 270px minmax(0,1fr); border-top: 1px solid var(--line); min-height: 0; flex: 1; overflow: hidden; }
.api-providers { display: flex; flex-direction: column; min-height: 0; padding: 18px; background: #151f22; border-right: 1px solid var(--line); }
.api-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.api-dialog h3 { font-size: 15px; }
.api-section-heading>span { font-size: 12px; color: var(--muted); }
.provider-list, .model-list { display: flex; flex-direction: column; gap: 8px; overflow: auto; min-height: 0; }
.provider-list { flex: 1; }
.provider-row { flex-shrink: 0; }
.provider-mobile-controls { display: none; }
.model-list { max-height: 192px; scrollbar-gutter: stable; }
.model-row { height: 42px; min-height: 42px; flex-shrink: 0; }
.provider-row, .model-row { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; min-width: 0; }
.provider-row.viewing, .model-row.active { border-color: #6b8c6a; background: #26392c; }
.provider-choice { flex: 1; min-width: 0; border: 0; background: none; color: inherit; text-align: left; padding: 0; }
.provider-choice>span { display: block; min-width: 0; }
.api-current>strong { font-weight: 600; }
.provider-row>label, .model-row>label { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; cursor: pointer; }
.provider-row label>span { min-width: 0; }
.provider-row strong { display: block; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.provider-row small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-dialog input[type=radio] { width: 16px; height: 16px; accent-color: var(--green); flex-shrink: 0; padding: 0; }
.provider-row button, .model-row button { flex-shrink: 0; padding: 3px 0; }
.api-dialog .compact-icon { width: 28px; height: 28px; min-height: 28px; padding: 5px; flex-shrink: 0; }
.api-dialog .compact-icon svg { width: 16px; height: 16px; }
.model-actions { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.api-test-button.test-ok { color: #a8cf99; }
.api-test-button.test-failed { color: #e1b378; }
.api-test-button.is-testing svg { animation: ai-spin 1s linear infinite; }
.model-test-time { display: inline-flex; align-items: center; align-self: center; height: 20px; padding: 0 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 11px; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.api-content { display: flex; flex-direction: column; padding: 20px 24px; min-width: 0; min-height: 0; overflow: hidden; }
#provider-detail { display: flex; flex: 1; flex-direction: column; min-height: 0; }
#provider-form { overflow: auto; min-height: 0; }
#provider-detail>.api-detail-heading, #provider-detail>.api-section-heading, #model-form { flex-shrink: 0; }
.api-content .field { margin: 14px 0; }
.api-detail-heading { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 18px; }
.api-detail-heading>div:first-child { min-width: 0; }
.api-detail-heading p { margin-top: 6px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
#provider-detail-model { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.api-detail-heading #provider-detail-state { line-height: 1.5; }
.api-detail-heading>div:last-child { display: flex; align-items: flex-start; gap: 4px; white-space: nowrap; }
.model-row label>span { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-row .danger-link { margin-left: 6px; }
.api-form-actions { display: flex; gap: 12px; align-items: center; margin-top: 15px; }
#model-form { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
#model-form-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.model-entry { display: flex; align-items: center; }
.model-entry input { flex: 1; min-width: 0; height: 38px; border-radius: 8px 0 0 8px; font-size: 13px; }
.model-entry #save-model { width: 38px; height: 38px; min-height: 38px; padding: 8px; border-left: 0; border-radius: 0 8px 8px 0; flex-shrink: 0; }
.model-entry #cancel-model { width: 32px; height: 32px; margin-left: 6px; flex-shrink: 0; }
.api-error { margin: 0 26px 18px; font-size: 13px; }
.api-empty { padding: 35px 10px; text-align: center; }
.api-empty svg { width: 30px; height: 30px; color: var(--green); margin-bottom: 12px; }
.api-empty p { margin-top: 10px; }
.editor-close { position: absolute; right: 12px; top: 12px; z-index: 3; }
.editor-image { position: relative; background: #121c1e; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; touch-action: pan-y pinch-zoom; }
.editor-image img, .editor-image video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.editor-image [hidden] { display: none; }
.video-controls { position:absolute; z-index:2; bottom:14px; left:50%; transform:translateX(-50%); display:flex; gap:8px; padding:6px; border-radius:12px; background:#111c1ee6; }
.video-controls .icon-button { font-size:18px; }
.video-card .video-play { z-index:1; text-shadow:0 1px 8px #000; }
.filter-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.filter-kinds fieldset { min-width: 0; }
.video-card .thumb { background: linear-gradient(140deg, #263537, #152122); }
.video-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 32px; color: var(--muted); }
.video-label { position: absolute; bottom: 10px; left: 10px; font-size: 11px; letter-spacing: 1px; }
.editor-ai-status { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); padding: 8px 12px; border-radius: 8px; background: #182927eb; color: #c7dfbb; font-size: 12px; white-space: nowrap; }
.editor.ai-working .editor-ai-status::before { content: ''; display: inline-block; width: 11px; height: 11px; margin-right: 7px; border: 2px solid #78936a; border-top-color: transparent; border-radius: 50%; animation: ai-spin 1s linear infinite; vertical-align: -2px; }
.editor.ai-working #viewer-ai svg, .editor.ai-working #analyze-image svg { animation: ai-spin 1s linear infinite; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.editor form { min-width: 0; min-height: 0; max-height: calc(100dvh - 34px); padding: 28px 24px 22px; overflow: auto; }
.editor-detail-heading { display: flex; align-items: center; justify-content: space-between; min-height: 22px; padding-right: 30px; }
#close-editor-details { display: none; }
.edit-classification { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.edit-classification .field { min-width: 0; }
.edit-classification select { padding-left: 8px; padding-right: 4px; }
.edit-meta { font-size: 12px; color: #a8be9e; margin-top: 13px; overflow-wrap: anywhere; }
.analysis-error { font-size: 13px; color: #f2b297; margin-top: 13px; line-height: 1.6; }
.edit-actions { display: flex; gap: 8px; margin-top: 20px; }
.edit-actions button { font-size: 13px; padding: 10px 12px; flex: 1; }
#analyze-image { white-space: nowrap; gap: 6px; }
#analyze-image svg { width: 16px; height: 16px; }
.edit-bottom { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 10px; }
.danger-icon { color: #f09c90; }
.viewer-toolbar { display: none; }
.viewer-edit-tools { display: flex; align-items: center; gap: 8px; }
.confirm-dialog { color: inherit; border: 1px solid var(--line); border-radius: 12px; padding: 25px; max-width: 360px; background: var(--surface); }
.confirm-dialog h2 { font-size: 22px; }
.confirm-dialog p { font-size: 14px; color: #afc3a8; margin: 12px 0 24px; line-height: 1.7; }
.confirm-dialog>div { display: flex; gap: 10px; justify-content: flex-end; }
.service-keys-dialog { width: min(640px,calc(100% - 32px)); max-width: 640px; max-height: calc(100dvh - 32px); overflow: auto; }
.service-keys-dialog .service-keys-heading { justify-content: space-between; align-items: center; }
#create-service-key { display: flex; gap: 8px; margin-bottom: 14px; }
#create-service-key input { flex: 1; }
#create-service-key button { white-space: nowrap; }
#service-key-created { background: #24382b; padding: 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
#created-service-key { margin: 8px 0; font: 12px monospace; }
.service-keys-dialog .service-key-list { display: flex; flex-direction: column; gap: 9px; }
.service-key-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.service-key-row>div { flex: 1; min-width: 0; }
.service-key-row strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.service-key-row small { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.service-key-row .secondary { min-height: 30px; padding: 4px 8px; font-size: 12px; }
.bulk-edit-dialog { width: calc(100% - 32px); max-width: 420px; }
.bulk-edit-dialog p { margin: 12px 0 18px; }
.bulk-edit-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }
.bulk-edit-dialog #bulk-edit-status { margin-bottom: 0; font-size: 13px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); border: 1px solid #52634e; border-radius: 9px; background: #2b3e2c; color: #e2edda; padding: 13px 20px; font-size: 14px; box-shadow: 0 5px 25px #0004; z-index: 20; max-width: calc(100% - 30px); }
.login { display: grid; grid-template-columns: 1fr 1fr; height: 100dvh; }
.login-art { background: #182925; position: relative; overflow: hidden; min-height: 0; }
.art-frame { position: absolute; width: 45%; height: 52%; border-radius: 15px; left: 26%; top: 22%; border: 1px solid #a9b99d3d; }
.art-one { background: #526d5c; transform: rotate(-17deg) translate(-28px,-15px); }
.art-two { background: #a45c42; transform: rotate(10deg) translate(30px,-7px); }
.art-three { background: #314f47; transform: rotate(-3deg); display: grid; place-items: center; box-shadow: 0 12px 50px #0004; }
.art-three svg { width: 45%; height: 45%; color: #93b59c; stroke-width: .6; }
.art-three:after { content: 'a little collection of everything.'; position: absolute; bottom: 30px; font-size: 11px; letter-spacing: .7px; color: #adc9b0; text-align: center; }
.art-spark { position: absolute; font-size: 70px; color: #b8cda1; top: 12%; right: 18%; }
.login-art>p { position: absolute; bottom: 10%; left: 0; right: 0; text-align: center; font-size: 11px; letter-spacing: 2px; color: #b6cda8; }
.login-main { min-height: 0; padding: 28px 10%; display: flex; flex-direction: column; gap: 20px; overflow: auto; }
.login-form { width: 100%; max-width: 380px; margin: auto; }
.login-form h1 { font-size: clamp(42px,7vh,62px); font-weight: 500; line-height: 1.05; letter-spacing: -2.5px; margin: 16px 0 22px; }
.login-form>p { font-size: 14px; line-height: 1.8; color: #acbfb0; }
.login-form>label { display: block; font-size: 14px; color: #c0d2bb; margin: 24px 0 8px; }
.login-submit { width: 100%; margin-top: 12px; justify-content: space-between; }
.login-form .login-note { font-size: 12px; margin-top: 12px; line-height: 1.7; color: #9db598; }
.login-form .error { color: #f5a290; font-size: 13px; margin-top: 10px; }
.login-form .error:empty { display: none; }
.login-footer { font-size: 10px; letter-spacing: 1px; color: #91aa88; flex-shrink: 0; }
.login-footer>span { float: right; letter-spacing: 0; }
.busy { animation: pulse 1.2s infinite; }
* { scrollbar-width: thin; scrollbar-color: #435c4c transparent; }
@keyframes pulse { 50% { opacity: .45; } }
@media(min-width:1600px) {
  .main { padding: 24px 30px 16px; }
}
@media(max-width:1100px) {
  .sidebar { width: 180px; padding-left: 12px; padding-right: 12px; }
  .main { padding: 20px; gap: 16px; }
  .gallery { --gallery-columns: 6; --photo-height: 170px; }
  .nav-label { font-size: 9px; letter-spacing: .6px; }
}
@media(max-height:850px) {
  .main { padding-top: 18px; padding-bottom: 14px; gap: 12px; }
  .page-header h1 { font-size: 33px; }
  .page-footer { display: none; }
  .upload-panel { gap: 8px; padding: 13px; }
  .panel-heading .eyebrow { display: none; }
  .panel-heading h2 { margin: 0; font-size: 20px; }
  .dropzone { padding: 10px; }
}
@media(max-width:760px) {
  .ai-progress { display: block; }
  .ai-progress .ai-controls { justify-content: flex-start; margin-top: 9px; }
  .ai-control-panel { max-width: none; text-align: left; }
  .app { flex-direction: column; }
  .sidebar { width: 100%; padding: 10px 17px 8px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { font-size: 23px; padding: 0; }
  .sidebar .brand-mark { width: 34px; height: 34px; font-size: 28px; border-radius: 9px; }
  .nav-label, .sidebar .brand-sub, .sidebar-bottom .connection, .sidebar-bottom .sidebar-foot { display: none; }
  .sidebar nav { display: contents; }
  .nav-overview { order: 2; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; width: 100%; }
  .sidebar-metrics { display: contents; }
  .nav-overview .nav-item { display: grid; grid-template-columns: 14px minmax(0,1fr); align-content: center; gap: 5px; font-size: 12px; min-height: 54px; padding: 7px; }
  .nav-overview .nav-item span { display: inline; font-size: 11px; }
  .nav-overview .nav-caption { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-overview .nav-item>span:last-child { grid-column: 2; margin: 0; text-align: right; }
  .nav-overview .nav-item svg { width: 14px; height: 14px; }
  .nav-divider { order: 3; width: 100%; margin: 0; }
  #nav-library { margin: 0; }
  .library-tabs { order: 4; width: 100%; padding: 0; flex-direction: row; gap: 4px; overflow-x: auto; }
  .library-tab { width: auto; flex-shrink: 0; padding: 8px; gap: 5px; font-size: 12px; white-space: nowrap; }
  .library-tab>small { font-size: 11px; }
  .nav-item { width: auto; margin: 0; padding: 9px; font-size: 0; gap: 0; }
  .nav-item span { display: none; }
  .nav-item svg { width: 19px; height: 19px; }
  .sidebar-bottom { display: flex; margin: 0 0 0 auto; align-items: center; }
  .sidebar .logout { font-size: 0; padding: 8px; width: 29px; }
  .sidebar .logout span { font-size: 18px; }
  .api-settings-button { width: 33px; height: 34px; padding: 7px; margin: 0 3px 0 0; }
  .api-settings-button>span { display: none; }
  .api-dialog { width: calc(100% - 16px); height: min(700px,calc(100dvh - 16px)); max-height: calc(100dvh - 16px); }
  .api-dialog-header { padding: 14px 14px 10px; gap: 10px; }
  .api-dialog h2 { font-size: 22px; margin: 4px 0; }
  .api-dialog-header p { font-size: 12px; line-height: 1.5; }
  .api-current { margin: 0 14px 10px; height: 34px; font-size: 11px; padding: 7px 9px; }
  .api-layout { display: flex; flex-direction: column; overflow: hidden; }
  .api-providers { flex-shrink: 0; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .api-providers .api-section-heading { margin-bottom: 8px; }
  .provider-list { display: none; }
  .provider-mobile-controls { display: flex; align-items: center; gap: 10px; }
  .provider-mobile-controls select { flex: 1; min-width: 0; height: 38px; padding: 6px 9px; }
  .provider-mobile-controls label { display: flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: 13px; }
  .api-content { flex: 1; padding: 12px 14px; overflow: hidden; }
  .api-detail-heading { margin-bottom: 12px; padding-bottom: 10px; }
  .api-dialog .model-list { flex: 1; max-height: 192px; }
  .api-dialog #model-form { padding-top: 10px; }
  .api-dialog .model-entry input { font-size: 16px; }
  .api-dialog .api-section-heading { margin-bottom: 8px; }
  .api-error { margin: 0 14px 10px; }
  .main { min-height: 0; height: auto; padding: 14px 12px 12px; gap: 10px; }
  .page-header { gap: 10px; }
  .page-header h1 { font-size: 32px; }
  .page-header p { font-size: 13px; line-height: 1.5; }
  .page-header .primary { font-size: 13px; padding: 9px 11px; min-height: 38px; }
  .page-header .primary svg { display: none; }
  .eyebrow { font-size: 10px; letter-spacing: 1px; }
  .library { gap: 10px; }
  .library-top { position: relative; min-height: 36px; }
  .library-actions { gap: 6px; }
  .search { width: 36px; }
  .search input { display: none; font-size: 16px; }
  .search.expanded { position: absolute; top: 0; right: 84px; width: calc(100% - 84px); z-index: 3; }
  .search.expanded input { display: block; }
  .gallery { --gallery-columns: 3; --photo-height: 128px; gap: 22px; }
  .card { width: 100%; }
  .rating-label { font-size: 10px; padding: 4px 5px; top: 6px; left: 6px; max-width: calc(100% - 34px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .day-images { gap: 13px; }
  .photo-row { gap: 5px; }
  .gallery-month { font-size: 21px; margin-bottom: 12px; }
  .gallery-date { font-size: 12px; }
  .bulk-tools { gap: 6px; }
  .bulk-selection, .bulk-selection>label, .bulk-actions { gap: 5px; }
  .bulk-tools .secondary, .bulk-tools .danger { padding: 6px 8px; }
  .bulk-ai-label { display: none; }
  .upload-panel { padding: 14px; }
  .page-footer { display: none; }
  .empty { padding: 18px 12px; }
  .empty h3 { font-size: 21px; }
  .editor { width: calc(100% - 8px); max-height: calc(100dvh - 28px); }
  .editor-surface { display: flex; flex-direction: column; width: calc(100% - 24px); height: min(740px,calc(100dvh - 28px)); max-height: none; }
  .editor-image { flex: 1; }
  .editor-nav { display: none; }
  .editor-close { right: 8px; top: 8px; }
  .viewer-toolbar { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--surface); flex-shrink: 0; }
  .viewer-toolbar .icon-button { width: 38px; height: 38px; }
  #toggle-editor-details[aria-expanded=true] { border-color: var(--green); background: #2a4034; }
  .editor form { position: absolute; bottom: 56px; left: 0; width: 100%; max-height: calc(100% - 104px); padding: 14px 14px 18px; border-top: 1px solid #45564d; border-radius: 14px 14px 0 0; background: #1a2427fa; box-shadow: 0 -12px 32px #0006; transform: translateY(calc(100% + 56px)); visibility: hidden; opacity: 0; pointer-events: none; transition: transform .18s ease,opacity .18s ease,visibility .18s; }
  .editor.details-open form { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; z-index: 2; }
  .editor-detail-heading { padding-right: 0; }
  #close-editor-details { display: grid; width: 30px; height: 30px; }
  .editor .edit-bottom { display: none; }
  .login { display: block; }
  .login-art { display: none; }
  .login-main { height: 100%; padding: 24px 8%; }
  .login-form { margin: auto; }
  .login-footer>span { display: none; }
  input, textarea, select, .search input, .field input, .field textarea, .field select, .upload-settings input, .upload-settings select { font-size: 16px; }
}
@media(max-width:360px) {
  .select-label { display: none; }
  .bulk-tools { gap: 5px; }
}
@media(max-width:760px) and (max-height:740px) {
  .main { padding-top: 12px; gap: 10px; }
  .page-header p { display: none; }
  .page-header h1 { font-size: 28px; }
  .upload-panel { gap: 7px; padding: 11px; }
  .toggle-row small { display: none; }
  .queue-empty { padding: 7px 0; }
  .empty-icon { width: 38px; height: 38px; margin-bottom: 10px; }
  .empty p { margin: 8px 0 14px; font-size: 13px; }
  .login-main { padding-top: 18px; padding-bottom: 18px; }
  .login-form h1 { font-size: 42px; margin: 12px 0 16px; }
}
@media(max-width:760px) and (max-height:600px) {
  .api-dialog-header p, .api-dialog-header .eyebrow, #provider-detail-state { display: none; }
  .api-dialog-header { padding-top: 10px; padding-bottom: 8px; }
  .api-dialog .api-current { height: 30px; margin-bottom: 8px; }
}
@media(prefers-reduced-motion:reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  /* Keep the small functional loading indicators visible without decorative motion. */
  .editor.ai-working #viewer-ai svg, .editor.ai-working #analyze-image svg, .editor.ai-working .editor-ai-status::before, .api-test-button.is-testing svg { animation: ai-spin 2s linear infinite !important; }
}
