:root {
  color-scheme: light;
  --bg: #f3eee3;
  --surface: #fffdf7;
  --surface-soft: #e5efe9;
  --text: #17323a;
  --muted: #6b7878;
  --border: #d7d5c9;
  --primary: #2f9a82;
  --primary-strong: #247966;
  --primary-text: #f9fffc;
  --secondary: #dfeae5;
  --header: #174f59;
  --header-text: #f8fbfa;
  --header-muted: #d5e4e1;
  --danger: #d46c56;
  --danger-soft: #f8e3dc;
  --camera: #10282e;
  --shadow: 0 12px 30px rgba(34, 58, 58, 0.12);
}

html,
body,
.app-shell,
.screen,
.fast-defects-screen {
  background: var(--bg);
  color: var(--text);
}

.app-header {
  background: var(--header);
  color: var(--header-text);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(16, 52, 58, 0.12);
}

.app-header .eyebrow,
.app-header .text-button,
.app-header h1,
.app-header h2 {
  color: var(--header-text);
}

.app-header .header-center p {
  color: var(--header-muted);
}

.compact-header .text-button {
  min-width: 72px;
  padding-inline: 10px;
  border-radius: 11px;
  background: rgba(223, 234, 229, 0.9);
  color: var(--text);
}

.form-panel,
.report-actions {
  background: transparent;
}

input,
select,
textarea {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 154, 130, 0.14);
}

input::placeholder,
textarea::placeholder {
  color: #92978f;
}

.primary-button {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-text);
}

.primary-button:active {
  background: var(--primary-strong);
}

.secondary-button,
.choice-button {
  border-color: #c9d7d1;
  background: var(--secondary);
  color: var(--text);
}

.secondary-button:active,
.choice-button:active {
  border-color: var(--primary);
  background: #d4e8e0;
}

#finish-inspection {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-text);
}

#finish-inspection:active {
  background: var(--primary-strong);
}

.danger-button {
  border-color: #e7b6aa;
  background: var(--danger-soft);
  color: var(--danger);
}

.eyebrow,
.choice-button.other,
.sheet-back {
  color: var(--primary);
}

.camera-panel {
  background: var(--bg);
}

.camera-preview {
  border-radius: 20px;
  background: var(--camera);
  box-shadow: 0 12px 28px rgba(23, 50, 58, 0.17);
}

.camera-placeholder {
  color: #dce8e5;
}

.camera-mark {
  border-color: #dce8e5;
}

.camera-gallery-button {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(16, 40, 46, 0.2);
}

.camera-zoom-indicator {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(16, 40, 46, 0.34);
}

.camera-system-button,
.camera-status,
.photo-counter,
.quick-hint,
.quick-empty,
.quick-context-note,
.quick-choice span,
.quick-section h3,
.quick-results h3,
.selection-summary p,
.report-copy p,
.vehicle-data dt,
.action-status,
.pdf-language-note,
.fast-defects-empty {
  color: var(--muted);
}

.sheet-backdrop {
  align-items: stretch;
  background: var(--bg);
}

.bottom-sheet {
  width: min(100%, 720px);
  height: 100dvh;
  max-height: none;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
}

.sheet-handle {
  display: none;
}

.sheet-title {
  color: var(--text);
  font-size: 1.25rem;
}

.quick-search input {
  background-color: var(--surface);
}

.quick-catalog {
  border-top-color: var(--border);
}

.selection-summary,
.report-document {
  border: 1px solid rgba(209, 209, 197, 0.8);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.report-heading {
  border-bottom-color: var(--border);
}

.report-item {
  border-bottom-color: var(--border);
}

.report-photo,
.pending-photo img {
  background: var(--surface-soft);
}

.delete-item,
.form-error {
  color: var(--danger);
}

.toast {
  background: var(--header);
  color: var(--header-text);
}

.fast-defects-header {
  background: var(--header);
}

.fast-defects-content {
  background: var(--bg);
}

@media (min-width: 721px) {
  .app-shell,
  .fast-defects-screen,
  .bottom-sheet {
    border-inline: 1px solid var(--border);
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #111111;
    --muted: #555555;
    --border: #d6d6d6;
  }
}
