/* Navy, champagne and brass; screen only, leaving print geometry untouched. */
@media screen {
  :root {
    --paper: #eee8dd;
    --lime: #d9bb7b;
    color-scheme: light;
    --page: #eee8dd;
    --panel: #fbf6ed;
    --panel-raised: #f2e6d2;
    --text: #202d46;
    --ink: #202d46;
    --muted: #6d6d79;
    --line: #d7cdbd;
    --blue: #263b62;
    --blue-hover: #192a49;
    --blue-dark: #192a49;
    --pale-blue: #ebdfc8;
    --green: #263b62;
    --danger: #a63737;
    --red: #a63737;
    --shadow: 0 4px 18px rgb(31 64 49 / 5%);
  }
  body, .app-shell { color: var(--ink); background: var(--page); }
  body { font-family: 'DM Sans', 'Segoe UI', sans-serif; }
  .brand img, .brand-mark-image .shared-logo, .brand > img { width: 36px; height: 36px; object-fit: contain; border-radius: 9px; }
  .brand-mark, .brand-mark-image { width: 36px; height: 36px; flex-basis: 36px; }
  .bar, .topbar { color: #202d46; }
  h1 em { color: #8a642a; }
  .primary, .job .primary { background: #263b62; color: #fff; }
  .primary:hover, .job .primary:hover { background: #192a49; }
  .tool, .hero-card, dialog, .quote-card, .bw-settings, .drop,
  .notice:not(:empty), .empty, #product-form { background: #f5ecdc; border-color: #d7c5a5; color: #202d46; }
  .tool .symbol, .customer-number, .category-heading,
  .job-category:has(.job) .category-heading { background: #e7d5b4; color: #263b62; }
  .feature-strip { background: #202f4c; }
  .feature-strip p { color: #e1d8c7; }
  .feature-strip .eyebrow { color: #dfc48d !important; }
  .feature-strip .button { background: #dfc48d; color: #202d46; }
  .floating-tag { background: #263b62; color: #fff; }
  input, select, button, .button { background: #fbf6ed; color: #202d46; border-color: #cebea3; }
  .primary, .button.button-primary, .primary-button { background: #263b62; color: #fff; }
  .customer-choice[aria-pressed=true] { background: #263b62; border-color: #263b62; color: #fff; }
  .customer-choice[aria-pressed=true] .customer-number { background: #dfc48d; }
  .job-price { color: #263b62 !important; }
  dialog::backdrop { background: #131e34bb; }
  .rotation-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; flex-shrink: 0; }
  .rotation-toolbar button { padding: 7px 10px; min-height: 34px; border: 1px solid #cebea3; border-radius: 8px; background: #eee0c6; color: #202d46; font-size: 12px; }
  .rotation-toolbar [role=status] { font-size: 11px; color: #6d6d79; }
  .crop-controls, body:not(.dashboard-page) .crop-controls,
  .crop-empty, .photo-entry, .photo-item, .crop-actions,
  .sheet-toolbar { background-color: #f0e5d2; color: #202d46; border-color: #cebea3; }
  .crop-card > .rotation-toolbar { grid-column: 1 / -1; }
  .customer-upload-box { border: 1px solid #d7c5a5; border-radius: 12px; padding: 14px; margin: 14px 0; background: #f5ecdc; }
  .customer-upload-box h3 { font-size: 18px; letter-spacing: -.3px; margin: 0 0 6px; }
  .customer-upload-box p { font-size: 12px; margin: 0 0 10px; }
  .customer-upload-box label:last-child { margin-bottom: 0; }
  .customer-upload-box .drop { padding: 12px; }
  .customer-file-item { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid #d7cdbd; }
  .customer-file-item img { width: 42px; height: 56px; object-fit: contain; background: #e3ddd1; border-radius: 5px; }
  .customer-file-details { flex: 1; min-width: 100px; }
  .customer-file-details strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
  .customer-file-details small { display: block; font-size: 11px; color: #6d6d79; }
  .customer-file-item .actions { width: 100%; gap: 6px; }
  .customer-file-item button { padding: 5px 10px; font-size: 12px; }
  #customer-files-status { font-size: 12px; }
  #customer-passport-crop { width: min(420px, calc(100vw - 20px)); padding: 16px; }
  #customer-passport-crop h2 { font-size: 21px; letter-spacing: -.5px; margin: 0; }
  #customer-passport-crop p { font-size: 12px; line-height: 1.4; }
  #customer-passport-crop canvas { display: block; max-width: 100%; width: auto; height: min(46dvh, 400px); aspect-ratio: 3 / 4; margin: 10px auto; touch-action: none; cursor: move; border: 1px solid #bba780; }
  #customer-passport-crop label { margin: 10px 0; font-size: 12px; }
  #customer-passport-crop input[type=range] { padding: 0; accent-color: #263b62; }
  #customer-passport-crop .actions button { padding: 8px 10px; font-size: 12px; }
  .topbar { background: #fbf6ed; border-color: var(--line); box-shadow: none; }
  .brand, .brand-copy strong, .card-heading h2, .panel-heading h2,
  .pdf-file-name, .file-name, .file-details strong, .stats strong { color: var(--ink); }
  .brand-mark, .brand-mark-image { background: transparent; box-shadow: none; }
  .brand small, .brand-copy small, .back-link, .field, .pdf-field,
  .intro-copy, .pdf-intro p, .hint, .stats, .file-count, .pdf-count,
  .pdf-file-size, .pdf-preview-status, .pdf-mode-note, .pdf-status,
  .pdf-privacy, .validation-message, .export-hint, .file-details small { color: var(--muted); }
  .eyebrow, .pdf-intro .eyebrow, .drop-icon, .pdf-drop-icon { color: var(--blue); }
  .card, .panel, .pdf-panel, .preview-card { background: #fbf6ed; border-color: var(--line); box-shadow: var(--shadow); border-radius: 12px; }
  .menu-toggle, .app-menu { background: #fbf6ed; border-color: var(--line); color: var(--ink); }
  .menu-toggle span { background: var(--ink); }
  .menu-link { color: var(--ink); border-color: var(--line); }
  .menu-link:hover, .menu-link[aria-current='page'] { background: #eee1cb; color: var(--ink); }
  .upload-zone, .dropzone, .pdf-dropzone { background: #f3eada; border-color: #bba780; color: var(--ink); border-radius: 10px; }
  .upload-zone:hover, .dropzone:hover, .pdf-dropzone:hover { background: #ece0ca; border-color: var(--blue); }
  .upload-zone > span:last-child, .dropzone span:last-child, .pdf-dropzone span { color: var(--muted); }
  .photo-meta, .file-card, .pdf-file { background: #faf2e5; border-color: var(--line); }
  .field > input, .field > select, .field input, .field select,
  .input-with-unit, .number-control, .input-with-unit input,
  .target-row input, .target-row select, .pdf-field select { color: var(--ink); background: #fbf6ed; border-color: #cabda7; }
  button { accent-color: var(--blue); }
  .primary-button { background: var(--blue); color: #fbf6ed; border-color: var(--blue); }
  .primary-button:hover:not(:disabled) { background: var(--blue-hover); }
  .secondary-button, .quiet-button, .icon-button, .lock-button,
  .alignment-button, .mobile-add-photos, .pdf-orientation button,
  .pdf-file-actions button, .pdf-clear-button, .download-button {
    background: #eee1cb; color: var(--ink); border-color: #cdbd9f;
  }
  .secondary-button:hover:not(:disabled), .quiet-button:hover:not(:disabled),
  .icon-button:hover:not(:disabled) { background: #e5d3b0; border-color: #bba780; }
  .pdf-orientation button[aria-pressed='true'], .lock-button[aria-pressed='true'],
  .mobile-studio-nav button[aria-pressed='true'] { color: #fbf6ed; background: var(--blue); border-color: var(--blue); }
  .mobile-studio-nav { background: #fbf6ed; border-color: var(--line); }
  .mobile-studio-nav button { color: var(--muted); border-radius: 8px; }
  .privacy-pill { color: var(--blue); background: #f0e2c6; border-color: #d2bd91; }
  .preview-stage { background-color: #e3ddd1; border-color: var(--line); }
  .remove-button, .pdf-file-actions .pdf-remove { color: #a63737; background: #fff1ef; border-color: #ebcdca; }
  .pdf-status.is-error { color: #a63737; }
  .pdf-status.is-success { color: #263b62; }
  .pdf-progress { accent-color: var(--blue); }
  .setting-label, .quality-output, .format-hint, .privacy-note,
  .offline-note, .progress-line, .global-status, .file-status,
  .empty-preview small, .alignment-tools, .placement-tools,
  .border-setting, .print-note { color: var(--muted); }
  body:not(.dashboard-page) .menu-toggle,
  body:not(.dashboard-page) .app-menu,
  body:not(.dashboard-page) .mobile-studio-nav { background: #fbf6ed; color: var(--ink); border-color: var(--line); }
  body:not(.dashboard-page) .menu-toggle span { background: var(--ink); }
  body:not(.dashboard-page) .mobile-studio-nav button { color: var(--muted); }
  body:not(.dashboard-page) .mobile-studio-nav button[aria-pressed='true'] { background: var(--blue); color: #fbf6ed; }
  body:not(.dashboard-page) .mobile-add-photos { background: #ebdfc8; color: var(--ink); border-color: #cabda7; }
  .summary-grid > div { background: #f3eada; color: var(--ink); border-color: var(--line); }
  .summary-grid strong, .summary-grid span, .empty-preview,
  .empty-preview p, .empty-preview strong { color: var(--muted); }
  .button.button-primary { background: var(--blue); border-color: var(--blue); color: #fbf6ed; }
  .button.button-secondary { background: #eee0c6; border-color: #cdbb98; color: var(--ink); }
  .button:disabled, .primary-button:disabled { opacity: .45; }
  body[data-mobile-view='settings'] .settings-panel,
  body[data-mobile-view='settings'] .settings-card { background: #fbf6edf5; border-color: #bca67e; }
}

@media screen and (max-width: 720px) {
  .topbar { padding-inline: 10px; }
  .brand { gap: 7px; font-size: 12px; }
  .brand small, .brand-copy small { font-size: 10px; }
  .brand-mark, .brand-mark-image { width: 40px; flex-basis: 40px; }
  .brand > img { width: 40px; height: 32px; }
  .header-actions { gap: 8px; }
  .back-link { font-size: 11px; }
  .pdf-page, body:has(.files-panel) > main { width: calc(100% - 20px); padding: 16px 0 24px; }
  .intro, .pdf-intro { margin-bottom: 12px; gap: 10px; }
  .intro { flex-wrap: wrap; }
  .intro h1, .pdf-intro h1 { font-size: 25px; margin-bottom: 6px; }
  .intro-copy, .pdf-intro p { font-size: 12px; line-height: 1.5; }
  .privacy-pill { padding: 5px 9px; }
  .layout, .pdf-workspace { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .layout > .settings-panel { order: initial; }
  .files-panel, .pdf-panel { padding: 12px; }
  .dropzone, .pdf-dropzone { min-height: 108px; padding: 12px; gap: 5px; }
  .panel-heading, .pdf-panel-heading { margin-bottom: 10px; }
  .field input, .field select, .target-row input, .target-row select,
  .pdf-field select { font-size: 16px; min-height: 36px; }
  .settings-grid, .pdf-options { gap: 9px; }
  .file-card { padding: 9px; gap: 9px; }
  .pdf-actions { margin-top: 12px; gap: 7px; }
  .wrap { padding-inline: 12px; }
  .bar { padding: 12px; gap: 8px; }
  .bar .brand { font-size: 13px; }
  .home-grid { gap: 20px; padding-block: 24px; }
  .home-grid h1 { font-size: clamp(32px, 9vw, 44px); }
  .tool { padding: 16px; }
  .section-heading { margin-bottom: 14px; }
  dialog { max-width: calc(100vw - 20px); padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}
