:root {
  --bg: #f4f1ea;
  --panel: #ffffff;
  --ink: #24211b;
  --muted: #6b665a;
  --accent: #c81e0f;
  --accent-soft: #f3d9d5;
  --ok: #1c7a3b;
  --warn: #b8720a;
  --border: #ddd6c6;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

header {
  padding: 14px 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

header h1 { font-size: 18px; margin: 0; }
header .tag { color: var(--muted); font-size: 13px; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.hidden { display: none !important; }

#screen-picker select, #screen-picker button {
  font-size: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
#screen-picker select {
  flex: 1;
  min-width: 0; /* sonst sprengt lange Optionstexte die Flex-Zeile auf schmalen Screens */
  max-width: 100%;
  text-overflow: ellipsis;
}
#screen-picker > div { flex-wrap: wrap; }
#screen-picker button {
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
}
#screen-picker button:disabled { opacity: .5; cursor: default; }

.progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 6px 0 4px;
}
.progress-bar > div {
  height: 100%;
  background: var(--accent);
  transition: width .3s;
}

#callout-img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fafaf7;
}

.checklist { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #faf8f2;
  border: 1px solid var(--border);
  font-size: 14px;
}
.checklist li.missing { border-color: var(--warn); background: #fbeed9; }
.checklist .swatch {
  width: 22px; height: 22px; border-radius: 5px; flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.25);
}
.checklist .count { margin-left: auto; font-weight: 600; color: var(--muted); }

.pile-wrap { position: relative; }
#pile-img { width: 100%; display: block; border-radius: 10px; border: 1px solid var(--border); }
#pile-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }
button.primary, button.secondary {
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid var(--border);
}
button.primary { background: var(--accent); color: white; border: none; flex: 1; }
button.primary:disabled { opacity: .45; cursor: default; }
button.secondary { background: white; color: var(--ink); }

.warn-box {
  background: #fbeed9;
  border: 1px solid var(--warn);
  color: #6d4707;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-top: 10px;
}
.ok-box {
  background: #e4f3e7;
  border: 1px solid var(--ok);
  color: #14532b;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px 12px 40px;
}
