:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #242729;
  background: #fafaf9;
  font-synthesis: none;
  --surface: #fff;
  --line: #e5e6e3;
  --muted: #676c6a;
  --ink: #242729;
  --accent: #305647;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.6; }
button, input { font: inherit; }
button, .button, input:not([type="file"]) { min-height: 44px; }
button, .button { min-width: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid transparent; border-radius: 7px; padding: 9px 15px; font-weight: 550; font-size: 13px; cursor: pointer; text-decoration: none; line-height: 1.4; transition: background-color .15s, border-color .15s; }
button:disabled { cursor: wait; opacity: .55; }
input:not([type="file"]) { background: var(--surface); border: 1px solid #d6d9d5; border-radius: 7px; padding: 10px 13px; color: var(--ink); min-width: 0; }
input::placeholder { color: #737975; }
a { color: inherit; }
:focus-visible { outline: 3px solid #47735f; outline-offset: 4px; }
.primary { background: var(--ink); color: #fff; box-shadow: 0 1px 2px #00000012; }
.primary:hover { background: #3c4440; }
.quiet { background: var(--surface); border-color: var(--line); color: #454c48; }
.quiet:hover { background: #f3f5f2; border-color: #c8cec8; }
.danger { color: #a13d38; }
.danger:hover { background: #fff2ef; border-color: #dfb8b2; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -1px; margin-bottom: 0; }
h2 { font-size: 18px; font-weight: 600; letter-spacing: -.35px; margin-bottom: 8px; }
h3 { font-size: 14px; font-weight: 550; }
p { margin-bottom: 12px; }
.muted { color: var(--muted); }
.eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 1.65px; color: #6b746d; margin-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; letter-spacing: -.4px; font-weight: 600; text-decoration: none; min-height: 44px; }
.brand-mark { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; background: var(--ink); color: white; border-radius: 8px; font-size: 24px; line-height: 1; font-family: Georgia, serif; font-style: italic; padding-bottom: 3px; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1200px; margin: auto; padding: 12px 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.account { display: flex; align-items: center; gap: 20px; }
.private-badge { color: #526252; font-size: 11px; padding: 4px 9px; border-radius: 5px; border: 1px solid #e0e7de; background: #f5f8f2; }
.workspace { max-width: 1200px; margin: 0 auto; padding: 42px 36px 24px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading > p { margin: 0 0 2px; font-size: 13px; }
.drop-zone { text-align: center; border: 1px dashed #c7cfc6; border-radius: 12px; padding: 30px 24px 23px; background: var(--surface); transition: border-color .15s, background-color .15s; }
.drop-zone:focus-within { border-color: var(--accent); }
.drop-zone:has(input:focus-visible) .button { outline: 3px solid #47735f; outline-offset: 4px; }
.drop-zone.drag-active { border-color: var(--accent); background: #f1f6ef; }
.upload-symbol { display: flex; margin: 0 auto 12px; width: 38px; height: 38px; align-items: center; justify-content: center; color: #536656; background: #f2f5ef; border: 1px solid #e4e9df; border-radius: 10px; font-size: 24px; }
.drop-zone h2 { font-size: 17px; margin-bottom: 3px; }
.drop-zone > .muted { font-size: 13px; margin-bottom: 17px; }
.format-help { font-size: 11px; line-height: 1.85; color: #696f69; margin: 15px 0 0; }
.privacy-banner { display: flex; gap: 12px; padding: 16px 2px; color: #636a63; font-size: 11px; }
.privacy-banner strong { color: #454f46; font-size: 12px; font-weight: 550; }
.privacy-banner p { margin: 0; }
.privacy-icon { font-size: 18px; padding-top: 2px; color: #788270; }
.upload-queue { background: var(--surface); border: 1px solid var(--line); padding: 16px 20px; border-radius: 9px; margin-top: 8px; }
.upload-queue h3 { margin-bottom: 2px; }
#upload-summary { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
#queue-list { padding: 0; margin: 0; list-style: none; max-height: 280px; overflow: auto; }
.queue-item { display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid #f0f0ed; padding: 9px 0; font-size: 12px; }
.queue-name { min-width: 0; overflow-wrap: anywhere; }
.queue-state { text-align: right; color: #676f68; flex-shrink: 0; max-width: 60%; }
.failed .queue-state { color: #9a3d34; }
.uploaded .queue-state { color: #305e44; }
.library-section { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 24px; }
.library-toolbar { display: flex; gap: 20px; align-items: center; justify-content: space-between; }
.library-toolbar h2 { margin: 0; }
#search-form { display: flex; gap: 8px; }
#search { width: 240px; font-size: 13px; }
.status { color: var(--muted); font-size: 12px; margin: 16px 0; min-height: 19px; }
.image-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.image-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-width: 0; box-shadow: 0 2px 4px #25302103; }
.image-preview { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 4 / 3; background: #f0f1ee; border-bottom: 1px solid var(--line); }
.image-preview a { display: block; width: 100%; height: 100%; min-height: 44px; min-width: 44px; }
.image-preview a:focus-visible { outline-offset: -4px; }
.image-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 13px; }
.image-name { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-size: 12px; margin: 0 0 3px; }
.image-meta { color: var(--muted); font-size: 10px; margin: 0 0 12px; }
.card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.card-actions button { padding: 8px 4px; font-size: 11px; }
.card-actions .danger { grid-column: 1 / -1; background: transparent; border-color: transparent; }
.card-actions .danger:hover { background: #fff2ef; }
.pagination { display: flex; justify-content: center; padding-top: 26px; }
.action-status { font-size: 12px; color: #4a5f4b; overflow-wrap: anywhere; min-height: 20px; margin: 12px 0 0; }
.action-status:empty { display: none; }
.workspace-footer { border-top: 1px solid var(--line); margin-top: 38px; padding-top: 18px; display: flex; justify-content: space-between; color: #727972; font-size: 10px; }
.login-page { min-height: 100svh; display: grid; place-items: center; padding: 36px 22px; }
.login-panel { width: 100%; max-width: 370px; }
.login-panel .brand { margin-bottom: 56px; }
.login-panel h1 { font-size: 36px; line-height: 1.2; margin-bottom: 16px; }
.login-panel > .muted { margin-bottom: 30px; }
.login-panel form label { display: block; font-size: 12px; font-weight: 550; margin-bottom: 8px; }
.login-panel input { width: 100%; }
.login-panel form .primary { display: flex; justify-content: space-between; width: 100%; margin-top: 14px; }
.login-panel .status { color: #9c4038; overflow-wrap: anywhere; }
.privacy-note { color: var(--muted); border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; font-size: 11px; line-height: 1.9; }
@media (max-width: 1080px) {
  .image-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 760px) {
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-inner { padding: 10px 24px; }
  .workspace { padding: 30px 24px 20px; }
  .section-heading > p { display: none; }
  .private-badge { display: none; }
}
@media (max-width: 600px) {
  .topbar-inner { padding: 8px 18px; }
  .brand { font-size: 14px; }
  .workspace { padding: 28px 18px 20px; }
  h1 { font-size: 27px; }
  .section-heading { margin-bottom: 22px; }
  .drop-zone { padding: 25px 14px 20px; }
  .format-help { font-size: 10px; }
  .privacy-banner { padding: 13px 0; font-size: 10px; }
  .privacy-banner strong { font-size: 11px; }
  .library-section { margin-top: 20px; padding-top: 20px; }
  .library-toolbar { align-items: stretch; flex-direction: column; gap: 14px; }
  #search-form { width: 100%; }
  #search { flex: 1; width: 100%; }
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 10px; }
  .image-name { font-size: 11px; }
  .image-meta { font-size: 9px; }
  .card-actions { gap: 4px; }
  .card-actions button { font-size: 10px; }
  .queue-item { flex-direction: column; gap: 2px; }
  .queue-state { max-width: 100%; text-align: left; }
  .workspace-footer { margin-top: 24px; }
  .login-panel .brand { margin-bottom: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
