:root {
  --bg: #f4efe5;
  --bg-accent: radial-gradient(circle at top left, rgba(226, 118, 63, 0.35), transparent 28%),
    radial-gradient(circle at bottom right, rgba(28, 95, 88, 0.2), transparent 32%),
    linear-gradient(160deg, #f7f2e8 0%, #efe5d2 100%);
  --panel: rgba(255, 251, 245, 0.86);
  --text: #182320;
  --muted: #51615b;
  --line: rgba(24, 35, 32, 0.12);
  --brand: #cc5a28;
  --brand-dark: #8d3918;
  --success: #2f6d5f;
  --warning: #9d6d10;
  --error: #a03232;
  --shadow: 0 20px 60px rgba(57, 44, 29, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: var(--bg-accent);
}

a {
  color: inherit;
}

.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.page-shell.compact {
  width: min(960px, calc(100% - 32px));
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.hero.small {
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.95;
  max-width: 10ch;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--brand-dark);
}

.hero-copy {
  max-width: 55ch;
  color: var(--muted);
  margin: 0;
}

.status-link,
.download-all,
.result-link,
.primary-button {
  transition: transform 140ms ease, background-color 140ms ease;
}

.status-link,
.download-all,
.result-link {
  text-decoration: none;
}

.status-link {
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.content-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.dropzone {
  border: 2px dashed rgba(24, 35, 32, 0.18);
  border-radius: 22px;
  padding: 34px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.34));
  cursor: pointer;
  outline: none;
}

.dropzone.dragover,
.dropzone:focus-visible {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.dropzone-title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
}

.dropzone-subtitle {
  margin: 0;
  color: var(--muted);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 16px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.selected-files {
  min-height: 72px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
}

.selected-files.empty,
.results-grid.empty-state {
  color: var(--muted);
  justify-content: center;
  align-items: center;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(204, 90, 40, 0.08);
}

.primary-button {
  width: 100%;
  margin-top: 18px;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-radius: 18px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.primary-button:hover,
.status-link:hover,
.download-all:hover,
.result-link:hover {
  transform: translateY(-1px);
}

.progress-card {
  margin-top: 18px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(24, 35, 32, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--success), var(--brand));
}

.message {
  min-height: 24px;
  margin-top: 16px;
  font-size: 0.95rem;
}

.message[data-kind="success"] {
  color: var(--success);
}

.message[data-kind="warning"] {
  color: var(--warning);
}

.message[data-kind="error"] {
  color: var(--error);
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.results-grid {
  min-height: 420px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.result-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.preview-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eee7da;
}

.result-meta {
  padding: 16px;
}

.result-meta h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  word-break: break-word;
}

.result-meta p {
  margin: 0 0 12px;
  color: var(--muted);
}

.result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-link,
.download-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(24, 35, 32, 0.07);
}

.hidden {
  display: none !important;
}

.status-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.status-item {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.status-key {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.status-value {
  font-size: 1.05rem;
}

@media (max-width: 960px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
  }

  .hero h1 {
    max-width: 14ch;
  }
}

