:root {
  /* GLS-Markenfarben: Navy wie gls-pakete.de (rgb(6,26,177)), Gelb wie der Logo-Punkt (rgb(255,209,0)) */
  --green-900: #050b4d;
  --green-700: #071785;
  --green-600: #061ab1;
  --green-500: #2540d6;
  --green-100: #eaf4e2;
  --amber-500: #ffd100;
  --ink: #14163a;
  --muted: #5b6178;
  --line: #dde1ea;
  --bg: #f2f4f7;
  --card-bg: #ffffff;
  --danger: #b3413a;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(6, 26, 113, 0.08), 0 4px 16px rgba(6, 26, 113, 0.07);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body { padding-bottom: env(safe-area-inset-bottom); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 8px; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; }
p { line-height: 1.5; margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 0.95rem; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top));
  background: var(--green-700);
  color: white;
  box-shadow: var(--shadow);
}
.topbar-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }
.gls-logo { flex-shrink: 0; display: block; }
.app-name { padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, 0.3); font-weight: 600; }
.group-badge {
  display: flex; align-items: baseline; gap: 6px;
  background: rgba(255,255,255,0.14);
  padding: 6px 12px; border-radius: 999px; font-size: 0.85rem;
}
.group-badge strong { font-size: 0.95rem; letter-spacing: 0.03em; }

main#app { max-width: 640px; margin: 0 auto; padding: 16px; padding-bottom: 90px; }

.screen { display: none; animation: fade 0.15s ease-out; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.intro-card { text-align: left; }
.center-card { text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 600;
  padding: 13px 18px; border-radius: 12px; border: none;
  cursor: pointer; min-height: 48px;
  transition: transform 0.05s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-primary { background: var(--green-600); color: white; }
.btn-secondary { background: var(--green-100); color: var(--green-800, var(--green-700)); }
.btn-ghost { background: transparent; color: var(--green-700); border: 1px solid var(--line); }
.btn-danger-text { background: none; border: none; color: var(--danger); font-size: 0.85rem; padding: 4px 6px; cursor: pointer; }
.btn-small { min-height: 38px; padding: 8px 14px; font-size: 0.9rem; }

.row-form { display: flex; gap: 8px; }
.row-form input { flex: 1; }

input[type="text"], input[type="number"], textarea {
  width: 100%;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  color: var(--ink);
}
textarea { resize: vertical; min-height: 76px; }
input:focus, textarea:focus { outline: 2px solid var(--green-500); outline-offset: 1px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.field .hint { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

.error-text { color: var(--danger); font-size: 0.9rem; margin-top: 8px; }

.code-display {
  font-size: 2.1rem; font-weight: 800; letter-spacing: 0.05em;
  color: var(--green-700); background: var(--green-100);
  border-radius: 12px; padding: 16px; margin: 16px 0; word-break: break-all;
}
.qr-holder { display: flex; justify-content: center; margin: 12px 0 18px; min-height: 130px; }
.qr-holder img, .qr-holder canvas { border-radius: 8px; }

.step-dots {
  display: flex; gap: 6px; justify-content: center; padding: 4px 0 14px;
  flex-wrap: wrap;
}
.step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  background: white; border: 1px solid var(--line); color: var(--muted);
  cursor: pointer;
}
.step-dot.active { background: var(--green-600); color: white; border-color: var(--green-600); }
.step-dot.done { background: var(--green-100); color: var(--green-700); border-color: var(--green-500); }

.step-header { margin-bottom: 6px; }
.step-eyebrow { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; color: var(--green-600); font-weight: 700; }

.chip-list { list-style: none; padding: 0; margin: 6px 0 0; }
.chip-list li {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  background: var(--green-100); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
  font-size: 0.95rem;
}
.chip-list li span.item-text { flex: 1; }
.empty-hint { color: var(--muted); font-size: 0.9rem; font-style: italic; padding: 6px 2px; }

.starter-cards { display: grid; gap: 10px; margin: 10px 0; }
.starter-card {
  background: var(--green-100); border-left: 4px solid var(--amber-500);
  padding: 12px 14px; border-radius: 8px; font-style: italic; color: var(--green-900);
}

.checklist { list-style: none; margin: 10px 0; padding: 0; }
.checklist li { display: flex; gap: 10px; margin-bottom: 8px; font-size: 0.95rem; }
.checklist li::before { content: "•"; color: var(--green-600); font-weight: 900; }

.photo-input-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.photo-thumb { position: relative; width: 74px; height: 74px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb .remove-photo {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: white; border: none; font-size: 12px; line-height: 1; cursor: pointer;
}
.add-photo-btn {
  width: 74px; height: 74px; border-radius: 10px; border: 2px dashed var(--line);
  background: #fafcfa; color: var(--muted); font-size: 1.6rem; cursor: pointer;
}

.geo-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.geo-status { font-size: 0.88rem; color: var(--muted); }
.geo-status.ok { color: var(--green-600); font-weight: 600; }

.location-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.location-card .loc-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.location-card .loc-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.location-card h3 { font-size: 1rem; margin-bottom: 4px; }
.location-card .loc-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.location-card .loc-field-label { font-weight: 600; font-size: 0.85rem; margin-top: 6px; }
.location-card a.map-link { font-size: 0.85rem; }

.step-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; gap: 8px; padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 60%, rgba(246,248,245,0));
  z-index: 15;
}
.step-nav .btn { flex: 1; }
.step-nav #btn-overview { flex: 0.7; }

.overview-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.overview-section { margin-bottom: 10px; }
.overview-section h2 { margin-bottom: 8px; }

.reflection-question { margin-bottom: 16px; }
.reflection-question .q-label { font-weight: 700; margin-bottom: 6px; display: block; }
.thanks-box { text-align: center; padding: 20px 0; }
.thanks-box .big-check { font-size: 2.4rem; margin-bottom: 8px; }

.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: white; padding: 10px 18px; border-radius: 999px;
  font-size: 0.9rem; z-index: 50; box-shadow: var(--shadow);
}

/* Workshop-Menü (Verteiler-Seite) */
.part-card {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; cursor: pointer; text-align: left;
  font-family: inherit; box-shadow: var(--shadow);
}
.part-card:active { transform: scale(0.99); }
.part-icon { font-size: 1.8rem; flex-shrink: 0; line-height: 1; }
.part-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.part-title { font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.part-check { color: var(--green-600); }
.part-desc { font-size: 0.88rem; color: var(--muted); }
.part-arrow { font-size: 1.2rem; color: var(--green-600); flex-shrink: 0; }

.presentation-card { padding: 0; overflow: hidden; }
.presentation-frame { width: 100%; height: 70vh; min-height: 380px; border: none; display: block; }

.audio-card-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.audio-title { font-weight: 700; }
.audio-heard-toggle { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--muted); cursor: pointer; }
.audio-card audio { width: 100%; }

code { background: var(--green-100); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; }

@media (min-width: 700px) {
  main#app { padding-top: 24px; }
}

/* Texte aus dem Admin-Backend */
.card .muted p:last-child, #text-body p:last-child, .info-box p:last-child { margin-bottom: 0; }
.checklist li span { flex: 1; }
.topbar-title .app-name:empty { display: none; }
