:root { font-family: Arial, sans-serif; color-scheme: light; }
body { margin: 0; background: #f5f7fb; color: #222; }
.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.card { background: #fff; border: 1px solid #e4e7ee; border-radius: 10px; padding: 16px; margin-bottom: 16px; }
h1 { font-size: 28px; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 0 0 12px; }
[hidden] { display: none !important; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 18px; align-items: start; }
.workspace-column { min-width: 0; }
.workspace-edit-column { border-left: 1px solid #e4e7ee; padding-left: 18px; }

.dropzone { border: 2px dashed #98a3b3; padding: 28px 20px; text-align: center; border-radius: 8px; cursor: pointer; }
.dropzone.dragover, .dropzone:focus-visible { border-color: #2563eb; background: #eff6ff; outline: none; }
.preview { margin-top: 12px; max-width: 100%; max-height: 360px; border-radius: 8px; display: block; }
.meta { color: #4b5563; font-size: 14px; }
.notice { margin: 0 0 24px; }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.product { display: grid; gap: 4px; margin: 0; padding: 8px; border: 2px solid #e4e7ee; border-radius: 8px; cursor: pointer; font-weight: 400; }
.product:has(input:checked) { border-color: #111827; background: #f3f4f6; }
.product:has(input:focus-visible) { outline: 2px solid #2563eb; outline-offset: 2px; }
.product input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; }
.product img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; border-radius: 6px; background: #e5e7eb; display: block; }
.product .meta { font-size: 13px; }

.advanced { margin-top: 14px; border-top: 1px solid #e4e7ee; padding-top: 10px; }
.advanced summary { cursor: pointer; font-weight: 600; }
label { display: block; margin: 10px 0 6px; font-weight: 600; }
label.check { font-weight: 400; }
label.check input { width: auto; margin-right: 6px; }
textarea, select, button, input { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #cbd5e1; box-sizing: border-box; font: inherit; }
button { background: #111827; color: #fff; border: none; cursor: pointer; margin-top: 14px; font-weight: 700; }
button:disabled { opacity: .6; cursor: not-allowed; }
button.secondary { width: auto; margin-top: 0; background: #e5e7eb; color: #111827; border: 1px solid #d1d5db; padding: 8px 12px; font-weight: 400; }
progress { width: 100%; margin-top: 12px; }

.error { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; padding: 10px; border-radius: 8px; }
.loading { color: #1d4ed8; margin-bottom: 0; }

.results figure { margin: 0 0 20px; }
.results img { width: 100%; border-radius: 8px; display: block; }
.results figcaption { margin-top: 8px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.download-btn { text-decoration: none; background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; padding: 6px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.results .reports { display: flex; gap: 12px; flex-wrap: wrap; font-size: 14px; }

.page-footer { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin: 8px 0 12px; flex-wrap: wrap; }
.usage-text { margin: 0; color: #374151; font-size: 14px; }
.limit-hint { margin: 0; color: #b91c1c; font-size: 14px; }
.logout-form { margin: 0; }

body.login { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: min(100% - 32px, 380px); padding: 24px; box-sizing: border-box; }

@media (max-width: 900px) {
  .workspace-grid { grid-template-columns: 1fr; gap: 14px; }
  .workspace-edit-column { border-left: 0; border-top: 1px solid #e4e7ee; padding-left: 0; padding-top: 14px; }
}
