:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1c1f23;
  --ink-soft: #5b6470;
  --line: #e2e5ea;
  --accent: #b5121b; /* ELK red */
  --accent-ink: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --card: #1f2227;
    --ink: #f1f3f5;
    --ink-soft: #a3acb8;
    --line: #2c3036;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.app__header { text-align: center; padding: 8px 0 4px; }
.app__title { margin: 0; font-size: 1.55rem; font-weight: 700; }
.app__subtitle { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.95rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card__title {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.preview {
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  margin-bottom: 10px;
}
.preview img { display: block; width: 100%; height: auto; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 16px;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone--drag { border-color: var(--accent); background: rgba(181, 18, 27, 0.04); }
.dropzone__icon { font-size: 1.5rem; }
.dropzone__text { font-size: 0.92rem; }

.group + .group { margin-top: 16px; }
.group__label { margin: 0 0 8px; font-weight: 600; font-size: 0.95rem; }

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

.choice {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.choice:hover { border-color: var(--accent); }
.choice[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.primary-btn {
  display: block;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.02rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.05s;
}
.primary-btn:active { transform: scale(0.99); }
.primary-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.link-btn {
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
}

.status { margin: 10px 0 0; text-align: center; color: var(--ink-soft); font-size: 0.9rem; min-height: 1.2em; }
.status--error { color: var(--accent); }

.app__footer { margin-top: 4px; }
.privacy { font-size: 0.78rem; color: var(--ink-soft); text-align: center; margin: 0; }

.is-busy { position: relative; pointer-events: none; }
.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(90deg, transparent, transparent 8px, rgba(255,255,255,0.15) 8px, rgba(255,255,255,0.15) 16px);
  animation: shimmer 0.8s linear infinite;
}
@keyframes shimmer { to { background-position: 16px 0; } }
