/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f5f5f0;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666666;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --border: #e5e5e5;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* === Screens === */
.screen {
  display: none;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 120px;
}

.screen.active {
  display: block;
}

/* === Header === */
.app-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0 16px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.app-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

.back-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  padding: 8px;
  cursor: pointer;
  color: var(--primary);
  border-radius: var(--radius-sm);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Start Screen: Type Cards === */
#screen-start .app-header {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 0 24px;
}

#screen-start .app-header h1 {
  font-size: 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}

.type-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 200px;
  justify-content: center;
  -webkit-user-select: none;
  user-select: none;
}

.type-card:active {
  transform: scale(0.97);
  border-color: var(--primary);
  background: #f0f4ff;
}

.type-icon {
  width: 56px;
  height: 56px;
  color: var(--primary);
}

.type-icon svg {
  width: 100%;
  height: 100%;
}

.type-label {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.type-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* === Aufnahme Screen === */
.aufnahme-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.aufnahme-col-left,
.aufnahme-col-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aufnahme-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 0;
  box-shadow: var(--shadow);
}

.aufnahme-section h2 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.optional {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* === Voice Recorder === */
.recorder-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
}

.record-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--danger);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  -webkit-user-select: none;
  user-select: none;
}

.record-btn:active {
  transform: scale(0.95);
}

.record-btn.recording {
  border-color: var(--danger);
  background: var(--danger-light);
  animation: pulse 1.5s infinite;
}

.record-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--danger);
  transition: all 0.2s ease;
}

.record-btn.recording .record-icon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 0 0 16px rgba(220, 38, 38, 0); }
}

.record-info-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.record-status {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.record-timer {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--danger);
}

#waveform {
  width: 100%;
  max-width: 150px;
  height: 36px;
}

.recordings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.recording-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--success-light);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.recording-item .rec-icon {
  color: var(--success);
  flex-shrink: 0;
}

.recording-item .rec-info {
  flex: 1;
}

.recording-item .rec-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 1.1rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recording-item.uploading {
  background: #eff6ff;
}
.recording-item.uploading .rec-icon {
  color: var(--primary);
  animation: pulse-opacity 1.2s infinite;
}
.recording-item.error {
  background: var(--danger-light);
}
.recording-item.error .rec-icon {
  color: var(--danger);
}
@keyframes pulse-opacity {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.foto-thumb.uploading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.foto-thumb.error {
  outline: 2px solid var(--danger);
}

/* === Audio upload row (file picker) === */
.audio-upload-row {
  display: flex;
  justify-content: center;
  margin-top: 4px;
  margin-bottom: 8px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-user-select: none;
  user-select: none;
}

.btn-secondary:active {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f4ff;
}

/* === Analyze status === */
.analyze-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 14px;
  background: #eff6ff;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--primary);
}

.analyze-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #c7d2fe;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* === Foto Upload (Dropzone, kompakt) === */
.foto-dropzone {
  margin-bottom: 10px;
}

.foto-dropzone-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fafbfd 0%, #f1f5f9 100%);
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.18s ease;
  min-height: 64px;
  -webkit-user-select: none;
  user-select: none;
}

.foto-dropzone-label:hover,
.foto-dropzone-label:active {
  border-color: var(--primary);
  color: var(--primary);
  background: linear-gradient(180deg, #f0f4ff 0%, #e0e7ff 100%);
}

.foto-dropzone-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow);
  color: var(--primary);
  flex-shrink: 0;
}

.foto-dropzone-icon svg {
  width: 20px;
  height: 20px;
}

.foto-dropzone-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.foto-dropzone-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.foto-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.foto-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.foto-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.foto-thumb .foto-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Schadenmeldung Dropzone === */
.schadenmeldung-dropzone {
  margin-bottom: 12px;
}

.schadenmeldung-label {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fffdf5 0%, #fef7e0 100%);
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 56px;
  -webkit-user-select: none;
  user-select: none;
}
.schadenmeldung-label:hover,
.schadenmeldung-label:active,
.schadenmeldung-dropzone.dragover .schadenmeldung-label {
  border-color: var(--warning);
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
}
.schadenmeldung-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow);
  color: var(--warning);
  flex-shrink: 0;
}
.schadenmeldung-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.schadenmeldung-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
}
.schadenmeldung-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  margin-bottom: 12px;
  background: #eff6ff;
  color: var(--primary);
}
.schadenmeldung-status.ok {
  background: var(--success-light);
  color: #14532d;
}
.schadenmeldung-status.warn {
  background: var(--warning-light);
  color: #92400e;
}
.schadenmeldung-status.error {
  background: var(--danger-light);
  color: #991b1b;
}

/* Drag-Over-State für Foto-Dropzone */
.foto-dropzone.dragover .foto-dropzone-label {
  border-color: var(--primary);
  background: linear-gradient(180deg, #f0f4ff 0%, #e0e7ff 100%);
  color: var(--primary);
}

/* === Form Fields === */
.form-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text-muted);
}

.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}

.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
}

/* === Checkliste === */
.checkliste {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9rem;
}

.check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.check-item.done .check-icon {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.check-item.missing .check-icon {
  border-color: var(--warning);
}

.check-item.missing .check-label {
  color: var(--text-muted);
}

.check-item {
  display: block;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.check-row .check-label {
  flex: 1;
}

.check-add-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.check-add-btn:hover,
.check-add-btn:active {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f4ff;
}

.check-input-box {
  padding: 8px 0 12px 32px;
}
.check-input-box input,
.check-input-box textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  -webkit-appearance: none;
  appearance: none;
  resize: vertical;
}
.check-input-box input:focus,
.check-input-box textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.check-input-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 6px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.btn-text:active { background: var(--bg); }

.btn-primary-sm {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary-sm:active {
  background: var(--primary-dark);
  transform: scale(0.97);
}

/* Fehlend-Hint auf Ergebnis-Screen */
.fehlend-hint {
  padding: 10px 12px;
  background: white;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #92400e;
  margin-bottom: 10px;
}

/* Aktions-Leiste gestapelt (zwei Buttons untereinander) */
.action-bar-stack {
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  padding: 12px 16px;
}
.action-bar-stack > * {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.btn-secondary-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  background: white;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 52px;
  transition: all 0.15s ease;
}
.btn-secondary-lg:active {
  transform: scale(0.97);
  background: #f0f4ff;
}

/* === Zusammenfassung (innerhalb Sprachaufnahme-Section) === */
.zusammenfassung-box {
  margin-top: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f0f4ff 0%, #e0e7ff 100%);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

.zusammenfassung-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.zusammenfassung-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
}

/* === Auto-fill Highlight === */
.field input.auto-filled {
  background: #fef3c7;
  border-color: var(--warning);
  animation: autofill-flash 2.5s ease-out;
}

@keyframes autofill-flash {
  0% { background: #fde68a; border-color: var(--warning); }
  100% { background: var(--bg); border-color: var(--border); }
}

/* === Collapsible Sections (Anleitung / Feedback) === */
.anleitung-section,
.feedback-section {
  margin-top: 16px;
}

.section-collapse {
  margin: 0;
}
.section-summary {
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  -webkit-user-select: none;
}
.section-summary::-webkit-details-marker { display: none; }
.section-summary::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid var(--text-muted);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.18s ease;
  flex-shrink: 0;
}
.section-collapse[open] > .section-summary::before {
  transform: rotate(90deg);
}
.section-collapse[open] > :not(summary) {
  margin-top: 12px;
}

/* === Anleitung === */
.anleitung-list {
  padding-left: 20px;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
}
.anleitung-list li {
  margin-bottom: 6px;
}
.anleitung-list li:last-child { margin-bottom: 0; }

/* === Feedback === */
.feedback-section {
  background: linear-gradient(180deg, #fafbfd 0%, #f1f5f9 100%);
}
.feedback-recorder {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.record-btn-sm {
  width: 40px;
  height: 40px;
  border-width: 2.5px;
}
.record-btn-sm .record-icon {
  width: 14px;
  height: 14px;
}
.record-btn-sm.recording .record-icon {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.feedback-record-status {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.feedback-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  resize: vertical;
  min-height: 110px;
  -webkit-appearance: none;
  appearance: none;
}
.feedback-textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.feedback-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.btn-feedback-send {
  padding: 10px 20px;
  min-height: 40px;
  font-size: 0.9rem;
  width: auto;
  max-width: none;
}

/* === Feedback Success === */
.feedback-success {
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  text-align: center;
  background: var(--success-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--success);
}
.feedback-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feedback-success-title {
  font-size: 1rem;
  font-weight: 600;
  color: #14532d;
}
.feedback-success-text {
  font-size: 0.9rem;
  color: #166534;
  max-width: 340px;
  line-height: 1.5;
}
.feedback-success-close {
  margin-top: 4px;
  color: var(--success) !important;
  font-weight: 500;
}

/* === Action Bar === */
.action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: white;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
  z-index: 200;
  display: flex;
  justify-content: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 16px 32px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  min-height: 56px;
  -webkit-user-select: none;
  user-select: none;
}

.btn-primary:active {
  transform: scale(0.97);
  background: var(--primary-dark);
}

.btn-primary:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-large {
  width: 100%;
  max-width: 400px;
}

/* === Loading Screen === */
.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80dvh;
  gap: 24px;
  text-align: center;
  padding: 20px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  width: 100%;
  max-width: 300px;
}

.loading-steps .step {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--bg);
  transition: all 0.3s ease;
}

.loading-steps .step.active {
  color: var(--primary);
  background: #eff6ff;
  font-weight: 500;
}

.loading-steps .step.done {
  color: var(--success);
  background: var(--success-light);
}

.loading-steps .step.done::before {
  content: '\2713 ';
}

/* === Ergebnis Screen === */
.fehlend-box {
  background: var(--warning-light);
  border: 1.5px solid var(--warning);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.fehlend-box h3 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: #92400e;
}

.fehlend-box .field {
  margin-bottom: 10px;
}

.fehlend-box .field label {
  color: #92400e;
}

.fehlend-box .field input {
  border-color: var(--warning);
  background: white;
}

/* === Protokoll Preview === */
.protokoll-preview {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.protokoll-preview h2 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--text);
}

.protokoll-preview h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--text);
}

.protokoll-preview .kopf-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.protokoll-preview .kopf-table td {
  padding: 6px 10px;
  border: 1px solid var(--border);
}

.protokoll-preview .kopf-table td:first-child {
  font-weight: 600;
  width: 40%;
  background: var(--bg);
}

.protokoll-preview .section-text {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.protokoll-preview .massnahmen-list {
  list-style: disc;
  padding-left: 20px;
  font-size: 0.9rem;
  line-height: 1.8;
}

.protokoll-preview .foto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.protokoll-preview .foto-item {
  text-align: center;
}

.protokoll-preview .foto-item img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.protokoll-preview .foto-item .foto-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.protokoll-preview .haftung {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
}

.typ-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

/* === Error state === */
.error-box {
  background: var(--danger-light);
  border: 1.5px solid var(--danger);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  color: #991b1b;
  text-align: center;
}

.error-box button {
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
}

/* === Responsive === */
@media (max-width: 400px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .type-card {
    min-height: 120px;
    flex-direction: row;
    padding: 20px;
    text-align: left;
  }

  .type-icon {
    width: 40px;
    height: 40px;
  }

  .protokoll-preview .foto-grid {
    grid-template-columns: 1fr;
  }
}

/* iPad/Desktop landscape — Zweispaltiges Aufnahme-Layout */
@media (min-width: 768px) {
  #screen-aufnahme {
    max-width: 1000px;
  }

  .aufnahme-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
  }

  .aufnahme-col-right .checkliste-section {
    position: sticky;
    top: 70px;
  }

  .btn-large {
    max-width: 480px;
  }
}
