:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #edf2f1;
  color: #172321;
  --ink: #172321;
  --muted: #6c7b77;
  --line: #dbe5e1;
  --accent: #087f71;
  --accent-dark: #07564e;
  --panel: #ffffff;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: linear-gradient(140deg, #f6f9f8 0%, #eaf1ef 100%); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 56px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 36px; color: #f4fffc; background: #0d2925; border-radius: 4px; box-shadow: 0 24px 60px rgba(13, 41, 37, .18); }
.eyebrow { margin: 0 0 8px; color: #5fc7b5; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(30px, 5vw, 54px); letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 20px; letter-spacing: -.02em; }
.hero-copy { max-width: 640px; margin-bottom: 0; color: #bad4ce; line-height: 1.7; }
.state { padding: 10px 13px; border: 1px solid rgba(255,255,255,.22); border-radius: 3px; font-size: 12px; white-space: nowrap; }
.state-ok { color: #a6f2df; border-color: rgba(166,242,223,.45); background: rgba(57,184,156,.16); }
.state-warn { color: #ffe1a8; border-color: rgba(255,225,168,.45); background: rgba(221,157,55,.16); }
.state-idle { color: #c6d4d0; }
.panel { padding: 25px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 10px 32px rgba(22, 45, 40, .06); }
.auth-panel { margin-top: 16px; }
.layout-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); gap: 16px; margin-top: 16px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.muted, .hint { color: var(--muted); font-size: 12px; line-height: 1.6; }
.hint { margin: 11px 0 0; }
code { padding: 2px 5px; background: #f0f5f3; border-radius: 3px; color: var(--accent-dark); }
.auth-row, .action-row { display: flex; gap: 10px; align-items: center; }
.auth-row { margin-top: 18px; }
input, select { width: 100%; min-height: 42px; padding: 0 12px; color: var(--ink); background: #fbfdfc; border: 1px solid var(--line); border-radius: 3px; outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(8,127,113,.12); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
label { display: grid; gap: 7px; color: #52625e; font-size: 12px; font-weight: 700; }
.dropzone { min-height: 164px; align-items: center; justify-content: center; margin-top: 18px; padding: 24px; text-align: center; border: 1px dashed #a8c6bf; background: #f8fcfb; color: var(--accent-dark); }
.dropzone input { display: none; }
.dropzone span { color: var(--muted); font-weight: 500; }
.preview-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 15px; }
.preview-grid figure { margin: 0; overflow: hidden; background: #edf4f1; border: 1px solid var(--line); }
.preview-grid img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.preview-grid figcaption { overflow: hidden; padding: 5px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.action-row { justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid #edf2f0; }
.button { min-height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: 3px; font-weight: 800; font-size: 12px; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button.primary { color: #fff; background: var(--accent); }
.button.primary:hover:not(:disabled) { background: var(--accent-dark); }
.button.quiet { color: var(--accent-dark); background: #f0f7f4; border-color: #d1e6df; }
.full { width: 100%; margin-top: 15px; }
.asset-list { display: grid; gap: 8px; max-height: 390px; margin-top: 18px; overflow: auto; }
.asset-list.empty { display: block; padding: 32px 10px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }
.asset { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; background: #f7faf9; border: 1px solid #e5eeea; }
.asset img { width: 46px; height: 60px; object-fit: cover; background: #e8efed; }
.asset strong, .asset small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset strong { font-size: 12px; }
.asset small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.manifest-output { max-height: 380px; margin: 15px 0 0; padding: 12px; overflow: auto; color: #d9eee8; background: #112622; border-radius: 3px; font-size: 11px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.notice { min-height: 22px; margin-top: 14px; color: var(--accent-dark); font-size: 13px; white-space: pre-wrap; }
.notice.error { color: #a53f31; }
.hidden { display: none !important; }
@media (max-width: 820px) {
  .hero { align-items: flex-start; flex-direction: column; padding: 26px; }
  .layout-grid { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .shell { width: min(100% - 20px, 1180px); padding-top: 10px; }
  .panel { padding: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .auth-row { align-items: stretch; flex-direction: column; }
  .preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
