/* ============================================================
   Druckbogen-Designer · CI Der Transfershop (powered by Brumley Tex)
   Rot #CE301F · dunkel #A32517 · Schwarz · Weiss
   ============================================================ */
/* --- Schriften wie im Shop: SNES-Italic (Headlines) + Inter (Fliesstext) --- */
@font-face {
  font-family: 'SNES-Italic';
  src: url('../fonts/SNES-Italic.ttf.woff') format('woff');
  font-weight: normal; font-style: normal; font-display: swap;
  /* Die Schrift enthaelt Ä Ö Ü ä ö ü ß nur als LEERE Zeichen - sie wuerden
     unsichtbar bleiben. Diese Codepunkte sind hier ausgenommen, dadurch
     zeichnet der Browser sie automatisch mit der naechsten Schrift (Inter). */
  unicode-range: U+0000-00C3, U+00C5-00D5, U+00D7-00DB, U+00DD-00DE,
                 U+00E0-00E3, U+00E5-00F5, U+00F7-00FB, U+00FD-10FFFF;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-v13-latin-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-v13-latin-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-v13-latin-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --brand: #CE301F;
  --brand-dark: #A32517;
  --brand-light: #FDEDEB;
  --ink: #2d2e33;
  --meta: #b4b5ba;
  --head: 'SNES-Italic', 'Segoe UI', Arial, sans-serif;
  --muted: #6b7280;
  --line: #e6e8ec;
  --bg: #f3f5f7;
  --ok: #2e9e44;
  --warn: #e08a00;
  --bad: #d13030;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 6px 20px rgba(0,0,0,.05);
  font-family: 'Inter', "Segoe UI", Roboto, Arial, sans-serif;
}

/* Die Shop-Headline-Schrift NUR fuer grosse Ueberschriften und den
   Markenschriftzug. Sie ist eine Display-Schrift: kursiv, stark gesperrt,
   und ihr fehlen Ä Ö Ü als echte Zeichen (siehe @font-face oben). Klein
   gesetzt wird sie unleserlich, und Woerter mit Umlaut werden aus zwei
   Schriften zusammengesetzt. Kennzahlen, Labels und Bedienelemente laufen
   deshalb in Inter — die Shop-Anmutung tragen dort VERSAL und Sperrung. */
h1, h2, h3, .howto h2 {
  font-family: var(--head);
  font-weight: 400;
}
/* Beschriftungen im Shop-Stil: VERSAL und leicht gesperrt — aber in Inter,
   damit sie lesbar bleiben und Umlaute nicht aus zwei Schriften entstehen. */
.field label, .job-field label, .set-row label, .set-group h4, .tier-table th {
  font-family: 'Inter', "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--ink);
}
.sheet-meta { color: var(--meta); }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button { font-family: inherit; cursor: pointer; }
.muted { color: var(--muted); font-weight: 400; }

/* ---------- Top-Bar ---------- */
.topbar { background: #000; color: #fff; font-size: 13px; }
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 7px 16px;
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}
.topbar .sep { opacity: .35; }
/* Markenschriftzug: VERSAL und gesperrt wie im Shop, aber in Inter.
   In der Display-Schrift war er bei 13 px auf Schwarz kaum zu entziffern. */
.topbar-brand {
  font-weight: 800; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: 1.1px; color: #fff;
}
.topbar-tag { margin-left: auto; color: #cdd6db; }
/* Warenkorb-Anzeige: Nach dem Zuruecksetzen des Designers waere sonst nicht
   mehr zu sehen, dass ueberhaupt etwas im Warenkorb liegt. */
.korb-anzeige {
  background: var(--brand); color: #fff; border: none; border-radius: 20px;
  padding: 4px 13px; font-size: 12.5px; font-weight: 800; margin-left: 12px;
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px;
}
.korb-anzeige:hover { background: var(--brand-dark); }
.korb-anzeige[hidden] { display: none; }
.topbar strong { color: #fff; }

/* ---------- Header ---------- */
.site-header {
  max-width: 1240px; margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { height: 46px; }
.powered { font-size: 12px; color: var(--muted); letter-spacing: .3px; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.tool-tag {
  font-size: 12px; font-weight: 700; color: var(--brand-dark);
  border: 2px solid var(--brand); border-radius: 50px; padding: 4px 12px;
  letter-spacing: .3px;
}

/* ---------- Nav (wie im Shop: schwarz, Rot nur als Akzent) ---------- */
.mainnav-wrap { background: #000; }
.mainnav {
  display: flex; gap: 4px; max-width: 1240px; margin: 0 auto; padding: 0 16px;
  flex-wrap: wrap;
}
.mainnav span, .mainnav a {
  color: #fff; text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 14px 16px; display: inline-block; letter-spacing: .2px;
}
.mainnav .active { color: var(--brand); }

/* ---------- Layout ---------- */
.designer {
  max-width: 1240px; margin: 22px auto; padding: 0 16px;
  display: grid; grid-template-columns: 1fr 480px; gap: 22px; align-items: start;
}
.col { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
@media (max-width: 1000px) {
  .designer { grid-template-columns: 1fr; }
  .col-right { position: static; }
}

/* ---------- Dropzone ---------- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; border: 2px dashed var(--brand); border-radius: var(--radius);
  padding: 26px; text-align: center; cursor: pointer; transition: .15s;
  background: #fdf7f6;
}
.dropzone:hover, .dropzone.drag { background: var(--brand-light); border-color: var(--brand-dark); }
.dropzone .plus { font-size: 30px; color: var(--brand-dark); line-height: 1; }
.dropzone-text { font-weight: 700; font-size: 16px; }
.dropzone-hint { font-size: 12px; color: var(--muted); }

/* ---------- Notice / Howto ---------- */
.notice {
  margin-top: 14px; font-size: 13px; line-height: 1.5; color: #4a5568;
  background: var(--brand-light); border: 1px solid #f3cdc7; border-radius: 8px; padding: 12px 14px;
}
.notice strong { color: var(--ink); }
.howto {
  margin-top: 14px; background: #f6f7f8; border-radius: 8px; padding: 18px;
}
.howto h2 { margin: 0 0 6px; font-size: 18px; }
.howto ol { margin: 0; padding-left: 20px; color: #555; font-size: 14px; line-height: 1.6; }
.howto.hidden { display: none; }

/* ---------- File cards ---------- */
.file-list { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.file-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start;
}
.thumb {
  width: 64px; height: 64px; border-radius: 8px; border: 1px solid var(--line);
  background-image:
    linear-gradient(45deg, #eee 25%, transparent 25%),
    linear-gradient(-45deg, #eee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eee 75%),
    linear-gradient(-45deg, transparent 75%, #eee 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  object-fit: contain;
}
.file-main { min-width: 0; }
.file-res { font-size: 12px; margin-bottom: 8px; }
.file-res .dpi { font-weight: 700; }
.file-res .dpi.ok { color: var(--ok); }
.file-res .dpi.warn { display: inline-block; color: #fff; background: var(--warn); padding: 1px 9px; border-radius: 20px; }
.file-res .dpi.bad { display: inline-block; color: #fff; background: var(--bad); padding: 1px 9px; border-radius: 20px; }
.res-size { margin-top: 5px; font-size: 11.5px; line-height: 1.4; display: flex; flex-direction: column; gap: 2px; }
.res-size .rs-ok { color: var(--ok); }
.res-size .rs-ok strong { color: var(--ok); }
.res-size .rs-limit { color: #8a5a00; }
.res-size .rs-limit strong { color: #8a5a00; }
.res-warn { margin-top: 5px; font-size: 11.5px; font-weight: 700; color: var(--bad); line-height: 1.35; }
.res-warn.warn { color: var(--warn); font-weight: 600; }
/* Karte mit zu geringer Aufloesung deutlich hervorheben */
.file-card.bad-res { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); background: #fef6f6; }
.file-name { font-size: 12px; color: var(--muted); word-break: break-all; }
.file-warn {
  margin-top: 6px; font-size: 11.5px; font-weight: 600; color: #8a5a00;
  background: #fff8e6; border: 1px solid #f0d9a0; border-radius: 6px; padding: 6px 9px; line-height: 1.35;
}

.field-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 3px; }
.field label { font-size: 12.5px; color: var(--ink); }
.field .with-unit { display: flex; align-items: center; }
.field input {
  width: 78px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 14px; font-family: inherit;
}
.field .unit { font-size: 12px; color: var(--muted); margin-left: 5px; }

.qty { display: flex; align-items: center; }
.qty button {
  width: 28px; height: 30px; border: 1px solid var(--line); background: #fff;
  font-size: 16px; line-height: 1;
}
.qty button:first-child { border-radius: 6px 0 0 6px; }
.qty button:last-child { border-radius: 0 6px 6px 0; }
.qty input {
  width: 54px; height: 30px; text-align: center; border: 1px solid var(--line);
  border-left: none; border-right: none; font-size: 14px; font-family: inherit;
}

.file-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.btn-remove {
  background: #fdeaea; color: var(--bad); border: 1px solid #f3c2c2;
  border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600;
}
.btn-cut {
  background: var(--brand-light); color: var(--brand-dark); border: 1px solid #f3cdc7;
  border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.btn-cut:disabled { opacity: .5; cursor: default; }
.btn-colors {
  background: #f4f5f7; color: var(--ink); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.btn-colors:hover { background: var(--brand-light); border-color: #f3cdc7; }

/* ---------- Farbtausch-Panel ---------- */
.color-panel {
  margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: #fafbfc;
}
.color-title {
  font-family: 'Inter', "Segoe UI", Roboto, Arial, sans-serif; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px; color: var(--ink); margin-bottom: 8px;
}
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0;
}
.swatch:hover { box-shadow: 0 0 0 2px var(--brand); }
.swatch.changed { box-shadow: 0 0 0 2px var(--brand); }
.color-panel .set-mini { margin-top: 8px; }

/* ---------- Grosse Motiv-Vorschau ---------- */
.big-preview {
  position: relative; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px;
  background-image:
    linear-gradient(45deg, #e9e9e9 25%, transparent 25%),
    linear-gradient(-45deg, #e9e9e9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e9e9e9 75%),
    linear-gradient(-45deg, transparent 75%, #e9e9e9 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  overflow: hidden;
}
.big-canvas { display: block; width: 100%; height: auto; }
.btn-done {
  display: block; width: 100%; margin-top: 10px; padding: 10px;
  background: var(--brand); color: #fff; border: none; border-radius: 6px;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-done:hover { background: var(--brand-dark); }

/* ---------- Eigener Farbwähler ---------- */
.cp-back {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
}
.cp-box {
  background: #fff; border-radius: 10px; padding: 16px; width: 272px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.cp-title {
  font-family: 'Inter', "Segoe UI", Roboto, Arial, sans-serif; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px; color: var(--ink); margin-bottom: 10px;
}
.cp-field { display: block; border-radius: 6px; cursor: crosshair; width: 240px; height: 150px; }
.cp-hue {
  width: 240px; margin: 10px 0 6px; height: 14px; -webkit-appearance: none; appearance: none;
  border-radius: 7px; outline: none;
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}
.cp-hue::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 2px solid #666; cursor: pointer;
}
.cp-hue::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #666; cursor: pointer;
}
.cp-row { display: flex; align-items: flex-end; gap: 10px; margin-top: 6px; }
.cp-preview {
  width: 40px; height: 40px; border-radius: 6px; border: 1px solid var(--line); flex: 0 0 auto;
}
.cp-hexlabel {
  flex: 1; font-family: 'Inter', "Segoe UI", Roboto, Arial, sans-serif; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px; color: var(--muted);
  display: flex; flex-direction: column; gap: 3px;
}
.cp-hex {
  font-family: Consolas, monospace; font-size: 14px; padding: 7px 8px; letter-spacing: .5px;
  border: 1px solid var(--line); border-radius: 6px; text-transform: uppercase; width: 100%;
}
.cp-hex.bad { border-color: var(--bad); background: #fdeaea; }
.cp-actions { display: flex; gap: 8px; margin-top: 14px; }
.cp-actions button {
  flex: 1; padding: 9px; border-radius: 6px; font-size: 13px; font-weight: 600; border: 1px solid var(--line);
}
.cp-cancel { background: #fff; color: var(--muted); }
.cp-ok { background: var(--brand); color: #fff; border-color: var(--brand); }
.cp-ok:hover { background: var(--brand-dark); }
.cut-flag { font-size: 10px; color: var(--ok); text-align: center; }
.cut-after { display: flex; flex-direction: column; gap: 4px; }
.cut-alt {
  background: none; border: none; padding: 0; font-size: 10.5px; line-height: 1.3;
  color: var(--brand-dark); text-decoration: underline; cursor: pointer; text-align: center;
}
.cut-alt:hover { color: var(--brand); }

/* ---------- Preview head ---------- */
.preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.switch-row { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #ccc; border-radius: 24px; transition: .2s; }
.slider::before {
  content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(18px); }

.margin-ctrl { text-align: right; }
.margin-label { font-size: 12px; color: #555; margin-bottom: 2px; }
.margin-label .muted { cursor: help; }
.margin-sub { font-size: 11.5px; margin-bottom: 4px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.stepper button { width: 30px; height: 30px; border: none; background: #f3f3f3; font-size: 16px; }
.stepper span { padding: 0 12px; font-size: 13px; min-width: 64px; text-align: center; }

/* ---------- Sheet meta + preview ---------- */
.sheet-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 16px 0 6px; font-size: 13px; color: #555;
}
.sheet-meta b { color: var(--ink); }

.preview-wrap { position: relative; }
.ruler {
  position: relative; height: 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.ruler span { font-size: 12px; color: var(--muted); background: #fff; padding: 0 6px; }
.ruler::before, .ruler::after {
  content: ""; position: absolute; bottom: 0; width: 1px; height: 8px; background: var(--line);
}
.ruler::before { left: 0; }
.ruler::after { right: 0; }

.canvas-scroll {
  max-height: 560px; overflow-y: auto; border: 1px solid var(--line); border-top: none;
  background:
    linear-gradient(45deg, #e9e9e9 25%, transparent 25%),
    linear-gradient(-45deg, #e9e9e9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e9e9e9 75%),
    linear-gradient(-45deg, transparent 75%, #e9e9e9 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}
#sheet { display: block; width: 100%; height: auto; }

.waste-badge {
  position: absolute; top: 26px; right: 8px; background: rgba(0,0,0,.72); color: #fff;
  font-size: 12px; padding: 4px 9px; border-radius: 20px;
}

.disclaimer {
  margin-top: 12px; font-size: 11.5px; line-height: 1.45; color: #6b6f76;
  background: #f7f8f9; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px;
}
.disclaimer strong { color: var(--ink); }
/* Prüf-/Verantwortungshinweis (nur Shop-Ansicht) */
.disclaimer-note {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); color: #6b6f76;
}

/* ---------- Aktionsleiste unten ---------- */
.actionbar { max-width: 1240px; margin: 0 auto 26px; padding: 0 16px; }
.actionbar-inner {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: center;
}
@media (max-width: 1000px) { .actionbar-inner { grid-template-columns: 1fr; } }

.export-box { text-align: right; }
/* (Materialwert-Zeile am 09.09.2026 entfallen — es gilt der Produktpreis.) */
.btn-export {
  margin-top: 12px; width: 100%; background: var(--brand); color: #fff; border: none;
  border-radius: 8px; padding: 14px; font-size: 15px; font-weight: 700; transition: .15s;
}
.btn-export:hover:not(:disabled) { background: var(--brand-dark); }
.btn-export:disabled { background: #9fc4d2; cursor: default; }
.btn-folder {
  margin-top: 8px; width: 100%; background: #fff; color: var(--brand-dark);
  border: 1px solid var(--brand); border-radius: 8px; padding: 9px; font-size: 13px; font-weight: 600;
}
.btn-folder:hover { background: var(--brand-light); }
.last-export {
  margin-top: 10px; font-size: 12px; color: var(--ok); text-align: right; word-break: break-all;
}

/* ---------- Einstellungen-Panel ---------- */
.settings-col { min-width: 0; }
#settingsPanel { border: 1px solid var(--line); border-radius: 8px; }
#settingsPanel > summary {
  cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 14px;
  color: var(--brand-dark); list-style: none; user-select: none;
}
#settingsPanel > summary::-webkit-details-marker { display: none; }
#settingsPanel > summary::before { content: "\25B8"; margin-right: 8px; display: inline-block; transition: .15s; }
#settingsPanel[open] > summary::before { transform: rotate(90deg); }
.settings-body {
  padding: 4px 14px 14px; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; border-top: 1px solid var(--line);
}
@media (max-width: 760px) { .settings-body { grid-template-columns: 1fr; } }
.set-group h4 { margin: 12px 0 8px; font-size: 13px; color: var(--ink); }
.set-row { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.set-row.sub { margin-left: 24px; }
.set-row label { font-size: 12px; color: var(--muted); }
.set-row input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; }
.set-hint { font-size: 10px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.set-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.set-mini { background: var(--brand-light); color: var(--brand-dark); border: 1px solid #f3cdc7; border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 600; }
.set-reset { grid-column: 1 / -1; justify-self: start; background: #fff; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; font-size: 12px; }

/* ---------- Export-Box: Job-Feld ---------- */
.job-field { display: flex; flex-direction: column; gap: 3px; text-align: left; margin-bottom: 12px; }
.job-field label { font-size: 12px; color: var(--muted); }
.job-field input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 14px; }

/* ---------- Shop-Modus (Meterware, Einbettung im Shop) ---------- */
body.shop-mode .btn-folder,
body.shop-mode #settingsPanel { display: none; }
body.shop-mode .actionbar-inner { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }

.shop-summary { margin-top: 12px; }
.shop-meters {
  font-size: 17px; padding: 10px 12px; border-radius: 8px;
  background: var(--brand-light); border: 1px solid #f3cdc7; color: var(--brand-dark);
}
.shop-meters strong { font-size: 21px; }
.shop-hint {
  margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: #6b5b1f;
  background: #fff8e6; border: 1px solid #f0d9a0; border-radius: 8px; padding: 9px 11px;
}
.shop-warn {
  margin-top: 8px; font-size: 12.5px; font-weight: 600; line-height: 1.45; color: var(--bad);
  background: #fdeaea; border: 1px solid #f3c2c2; border-radius: 8px; padding: 9px 11px;
}
/* Angebrochener weiterer Meter – muss ins Auge springen */
.shop-alert {
  margin-top: 8px; font-size: 13px; line-height: 1.5; color: #8a4b00;
  background: #fff4e0; border: 2px solid #f0b660; border-radius: 8px; padding: 11px 13px;
}
.shop-alert strong { color: #7a3d00; }

/* Auch im internen Modus sichtbar (Zusammenfassung + Meterzahl) */
.shop-summary { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #aab2bd; text-align: center; padding: 24px 16px; }
.logo-footer { height: 38px; opacity: .95; }
.site-footer p { margin: 10px 0 0; font-size: 12px; }
.site-footer .version { font-size: 11px; opacity: .6; margin-top: 4px; }

/* ---------- Overlay ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,.86); z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.overlay[hidden] { display: none; }
.spinner {
  width: 46px; height: 46px; border: 5px solid #e0e0e0; border-top-color: var(--brand);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#overlayText { font-weight: 600; color: #444; }
/* Warteanzeige: Der Anwender muss sehen, dass etwas laeuft — gerade beim
   Bogenaufbau, der je nach Motivzahl deutlich dauern kann. */
.overlay-card {
  background: #fff; border-radius: 12px; padding: 26px 30px;
  box-shadow: 0 12px 40px rgba(0,0,0,.14); text-align: center;
  min-width: 300px; max-width: 420px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.overlay-balken {
  width: 100%; height: 7px; background: #ececee; border-radius: 4px; overflow: hidden;
}
.overlay-balken span {
  display: block; height: 100%; width: 0;
  background: var(--brand); border-radius: 4px;
  transition: width .25s linear;
}
.overlay-zeit { font-size: 12.5px; color: var(--muted); min-height: 1.2em; }
.overlay-note { font-size: 12px; color: #8a5a00; background: #fff8e6;
  border: 1px solid #f0d9a0; border-radius: 7px; padding: 7px 11px; line-height: 1.45; }
.overlay-note:empty { display: none; }

/* (Die Dateiformat-Auswahl ist am 31.08.2026 entfallen — PNG fuer Kunden wie
   fuer die Produktion. Regeln dazu hier geloescht, damit niemand sie fuer
   lebendig haelt.) */

/* ---------- Aufgehobene Boegen ---------- */
/* Die Bogen-Leiste: immer da, direkt unter der Navigation. Dort sucht man
   "aufheben" und "wiederfinden" -- nicht unten neben dem Bestellknopf. */
.bogen-leiste {
  max-width: 1240px; margin: 16px auto 0; padding: 0 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.btn-meine, .btn-aufheben {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px; font: inherit; font-size: 15px;
  font-weight: 700; cursor: pointer; min-height: 44px;
}
.btn-aufheben {
  background: #fff; color: var(--brand-dark);
  border: 2px solid var(--brand);
}
/* Das Namensfeld sitzt rechts vor "Bogen aufheben" und schiebt beides an den
   rechten Rand; Zaehler und Stand bleiben links. */
.bogen-leiste .job-field { margin: 0 0 0 auto; flex: 1 1 220px; max-width: 340px; }
.bogen-leiste .job-field input { min-height: 44px; font-size: 15px; }
.bogen-leiste .job-field input.fehlt {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light);
}
.btn-aufheben:hover:not(:disabled) { background: var(--brand-light); }
.btn-aufheben:disabled { opacity: .45; cursor: default; }
.btn-meine { background: var(--ink); color: #fff; border: 2px solid var(--ink); }
.btn-meine:hover { background: #000; border-color: #000; }
.btn-meine[hidden] { display: none; }
.btn-meine span {
  background: var(--brand); border-radius: 12px; padding: 1px 8px; font-size: 13px;
}
/* Der Stand des automatischen Sicherns: bewusst leise. */
.entwurf-stand { font-size: 13px; color: var(--muted); }
.entwurf-stand::before { content: "\2713\00a0"; color: var(--ok); }
.entwurf-stand.warn { color: var(--warn); }
.entwurf-stand.warn::before { content: "\26A0\00a0"; }
.entwurf-stand[hidden] { display: none; }

/* Das Feld mit den Boegen: Hausfarbe, gross, mit Bildern. Es fragt etwas, das
   vor der ersten Handlung beantwortet sein will -- also darf es nicht zu
   uebersehen sein. */
.entwurf-leiste {
  width: calc(100% - 32px); max-width: 1208px; margin: 16px auto 0;
  padding: 18px 20px 16px; background: var(--brand); color: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.entwurf-leiste[hidden] { display: none; }
.entwurf-kopf { display: flex; align-items: flex-start; gap: 12px; }
.entwurf-kopf > div { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.entwurf-kopf strong { font-size: 21px; line-height: 1.25; }
.entwurf-kopf span { font-size: 14.5px; opacity: .93; }
.entwurf-zu {
  flex: none; background: rgba(255,255,255,.18); color: #fff; border: none;
  border-radius: 50%; width: 36px; height: 36px; font-size: 24px; line-height: 1;
  cursor: pointer;
}
.entwurf-zu:hover { background: rgba(255,255,255,.32); }
.entwurf-karten { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.entwurf-karte {
  flex: 1 1 320px; max-width: 480px; background: #fff; color: var(--ink);
  border-radius: 8px; padding: 10px 12px; display: flex; align-items: center; gap: 12px;
}
.entwurf-karte img, .entwurf-karte-leer {
  width: 120px; height: 60px; flex: none; object-fit: contain;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
.entwurf-karte-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.entwurf-karte-text strong { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entwurf-karte-text span { font-size: 12.5px; color: var(--muted); }
.entwurf-karte-text em { font-size: 12px; color: var(--brand-dark); font-style: normal; font-weight: 600; }
.entwurf-karte button {
  flex: none; padding: 9px 14px; border-radius: 6px; border: 1px solid var(--brand);
  background: var(--brand); color: #fff; font: inherit; font-size: 14px;
  font-weight: 700; cursor: pointer; min-height: 40px;
}
.entwurf-karte button:hover { background: var(--brand-dark); }
.entwurf-fuss { margin-top: 12px; }
.entwurf-fuss .schlicht {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.65);
  border-radius: 6px; padding: 7px 14px; font: inherit; font-size: 13.5px; cursor: pointer;
}
.entwurf-fuss .schlicht:hover { background: rgba(255,255,255,.15); }

/* Nach "Bogen aufheben": Link, Kopieren, Mail -- direkt unter der Leiste,
   also dort, wo eben geklickt wurde. */
.aufheben-box {
  width: calc(100% - 32px); max-width: 1208px; margin: 12px auto 0;
  padding: 14px 16px; text-align: left; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; box-shadow: var(--shadow);
}
.aufheben-box[hidden] { display: none; }
.aufheben-box strong { display: block; font-size: 15px; margin-bottom: 4px; }
.aufheben-box p { margin: 0 0 12px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.aufheben-link { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; margin-bottom: 10px; }
.aufheben-link code {
  flex: 1 1 200px; padding: 9px 11px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; font-size: 12.5px; word-break: break-all; color: var(--ink);
}
.aufheben-link button, .aufheben-mail button {
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.aufheben-link button:hover, .aufheben-mail button:hover { background: #f7f8fa; }
.aufheben-mail { display: flex; gap: 8px; flex-wrap: wrap; }
.aufheben-mail input {
  flex: 1 1 180px; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 6px; font: inherit; font-size: 13px;
}
.aufheben-hinweis { margin: 10px 0 0 !important; font-size: 12px !important; }
.aufheben-meldung { margin-top: 10px; font-size: 13px; }
.aufheben-meldung.ok { color: var(--ok); }
.aufheben-meldung.warn { color: var(--warn); }

/* ---------- Rückfrage in der Seite (statt confirm) ---------- */
/* Steht im Fluss der Seite, nicht schwebend: Im Shop ist der Rahmen so hoch
   wie sein Inhalt — ein „fixed" zentriertes Fenster läge dort womöglich weit
   außerhalb des Sichtbaren. Die Seite scrollt stattdessen zum Kasten. */
.frage-kasten {
  width: calc(100% - 32px); max-width: 1208px; margin: 14px auto 0;
  padding: 16px 18px; background: #fff; border: 2px solid var(--brand);
  border-radius: var(--radius); box-shadow: var(--shadow);
  scroll-margin: 24px;
}
.frage-kasten[hidden] { display: none; }
.frage-kasten strong { display: block; font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.frage-kasten p { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--ink); }
.frage-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; }
.frage-knoepfe button {
  padding: 10px 18px; border-radius: 8px; font: inherit; font-size: 14.5px;
  font-weight: 700; cursor: pointer; min-height: 44px;
}
.frage-ja { background: var(--brand); color: #fff; border: 2px solid var(--brand); }
.frage-ja:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.frage-nein { background: #fff; color: var(--ink); border: 2px solid var(--line); }
.frage-nein:hover { border-color: #c9cdd3; background: var(--bg); }
/* Verwirft „ja" etwas, ist die sichere Antwort optisch die erste Wahl. */
.frage-kasten.gefahr .frage-ja { background: #fff; color: var(--brand-dark); }
.frage-kasten.gefahr .frage-ja:hover { background: var(--brand-light); }
.frage-kasten.gefahr .frage-nein { background: var(--ink); color: #fff; border-color: var(--ink); }
.frage-kasten.gefahr .frage-nein:hover { background: #000; border-color: #000; }
.frage-knoepfe button:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; }
/* Im Einstellungsbereich unten (nur intern) schmaler, passend zum Aufklapper. */
.settings-body .frage-kasten { width: auto; margin: 12px 0 0; }

/* ---------- Meldung in der Seite (statt alert) ---------- */
/* Gleiches Prinzip wie die Rückfrage: im Fluss der Seite, nicht schwebend.
   Er steht dort, wo die Meldung hingehört (unter dem Hochladefeld, in der
   Motivkarte, am Bestellknopf) — sonst oben unter der Bogen-Leiste. */
.meldung-kasten {
  width: calc(100% - 32px); max-width: 1208px; margin: 14px auto 0;
  padding: 14px 16px; background: #fff; text-align: left; color: var(--ink);
  border: 2px solid var(--bad); border-left-width: 6px;
  border-radius: var(--radius); box-shadow: var(--shadow);
  scroll-margin: 24px;
}
.meldung-kasten[hidden] { display: none; }
.meldung-kasten.hinweis { border-color: var(--warn); }
.meldung-kasten strong { display: block; font-size: 15px; margin-bottom: 4px; }
.meldung-kasten p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.55; }
.meldung-kasten ul { margin: 0 0 10px; padding-left: 18px; font-size: 13.5px; line-height: 1.55; }
.meldung-kasten li { margin-bottom: 3px; overflow-wrap: anywhere; }
.meldung-ok {
  padding: 8px 22px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; min-height: 44px;
  background: var(--ink); color: #fff; border: 2px solid var(--ink);
}
.meldung-ok:hover { background: #000; border-color: #000; }
.meldung-ok:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; }
/* Hinter einem Element in einer Spalte (Hochladefeld, Bestellknopf): so breit
   wie die Spalte. */
.meldung-kasten.angeheftet { width: auto; max-width: none; margin: 12px 0 0; }
/* In der Motivkarte: über die ganze Breite (die Karte ist ein Raster). */
.file-card > .meldung-kasten {
  grid-column: 1 / -1; width: auto; max-width: none; margin: 2px 0 0; box-shadow: none;
}

/* ---------- Produktauswahl ---------- */
.produkt-wahl { margin-bottom: 14px; }
.produkt-wahl label {
  display: block; margin-bottom: 4px;
  font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px; color: var(--ink);
}
.produkt-wahl select {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 15px;
  border: 2px solid var(--brand); border-radius: 8px; background: #fff;
  color: var(--ink); font-weight: 600;
}
.produkt-info {
  margin-top: 5px; font-size: 12.5px; color: var(--muted); line-height: 1.6;
}
.produkt-info strong { color: var(--ink); }
.produkt-mehr {
  border: 1px solid var(--line); background: #fff; color: var(--brand-dark);
  border-radius: 20px; padding: 3px 11px; font-size: 12px; font-weight: 700;
  margin-left: 4px; white-space: nowrap;
}
.produkt-mehr:hover { background: var(--brand-light); border-color: #f3cdc7; }

/* ---------- Info-Fenster zum Produkt ---------- */
.info-overlay { background: rgba(20,20,24,.55); padding: 20px; overflow-y: auto; }
.info-card {
  background: #fff; border-radius: 12px; padding: 22px 24px;
  max-width: 460px; width: 100%; max-height: 86vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3); text-align: left;
}
.info-card h2 { margin: 0 0 4px; font-size: 20px; color: var(--brand); }
.info-card h3 {
  margin: 18px 0 8px; font-size: 13px; text-transform: uppercase;
  letter-spacing: .7px; font-family: 'Inter', sans-serif; font-weight: 700;
}
.info-meta { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.info-meta strong { color: var(--ink); }
.info-liste { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.65; color: #444; }
.info-liste li { margin-bottom: 4px; }
.info-preise { width: 100%; border-collapse: collapse; font-size: 13px; }
.info-preise th {
  text-align: left; padding: 5px 6px; border-bottom: 2px solid var(--line);
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
}
.info-preise td { padding: 5px 6px; border-bottom: 1px solid #f1f2f4; }
.info-preise td:nth-child(2) { font-weight: 700; }
.info-preise tr.aktiv td { background: var(--brand-light); color: var(--brand-dark); }
.info-preise tr.aktiv td:first-child::after { content: ' 90 Ihre Menge'; font-size: 10.5px; font-weight: 400; }
.info-fuss { margin: 12px 0 16px; font-size: 11.5px; color: var(--muted); line-height: 1.55; }

/* ---------- Auflage: denselben Bogen mehrfach bestellen ---------- */
.auflage-box {
  margin-top: 8px; padding: 11px 12px; border-radius: 8px;
  background: #fff; border: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.auflage-frage { font-size: 13.5px; font-weight: 600; }
.auflage-stepper { display: flex; align-items: center; margin-left: auto; }
.auflage-stepper button {
  width: 34px; height: 36px; border: 1px solid var(--line); background: #fff;
  font-size: 18px; line-height: 1; color: var(--ink);
}
.auflage-stepper button:first-child { border-radius: 7px 0 0 7px; }
.auflage-stepper button:last-child { border-radius: 0 7px 7px 0; }
.auflage-stepper button:hover { background: var(--brand-light); }
.auflage-stepper input {
  width: 62px; height: 36px; text-align: center; font: inherit; font-size: 15px;
  font-weight: 700; border: 1px solid var(--line); border-left: none; border-right: none;
}
.auflage-summe { flex-basis: 100%; font-size: 12.5px; line-height: 1.5; }
/* Mehrere verschiedene Bogen: nur Erklaerung, keine Bedienung. */
.auflage-box.mehrere { background: #f6f7f8; }
.auflage-box.mehrere .auflage-frage { font-weight: 600; }
.auflage-summe strong { font-size: 15px; color: var(--brand-dark); }

/* ---------- Preisanzeige unter der Meterzahl ---------- */
.shop-preis {
  margin-top: 8px; padding: 10px 12px; border-radius: 8px;
  background: #f6f7f8; border: 1px solid var(--line);
}
.preis-summe { font-size: 20px; font-weight: 800; color: var(--ink); }
.preis-note { margin-top: 3px; font-size: 11.5px; color: var(--muted); }

/* ---------- Legende zum Transparenzraster ---------- */
.checker-legend {
  display: flex; align-items: center; gap: 7px;
  margin-top: 8px; font-size: 12px; color: var(--muted);
}
.checker-swatch {
  width: 16px; height: 16px; border: 1px solid var(--line); border-radius: 3px;
  background-image:
    linear-gradient(45deg, #e4e5e9 25%, transparent 25%),
    linear-gradient(-45deg, #e4e5e9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e4e5e9 75%),
    linear-gradient(-45deg, transparent 75%, #e4e5e9 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
  background-color: #fff;
  flex: none;
}

/* ============================================================
   Handy und kleine Tablets
   Ein erheblicher Teil der Kunden bestellt vom Telefon. Zwei Dinge
   entscheiden dort ueber die Bedienbarkeit:
   1. Tippziele unter etwa 44 px trifft man mit dem Daumen nicht sicher.
   2. Eingabefelder mit weniger als 16 px Schrift laesst iOS die Seite
      beim Antippen automatisch heranzoomen — die Ansicht springt und
      der Kunde muss von Hand zurueckzoomen.
   ============================================================ */
@media (max-width: 640px) {
  /* Motivkarte: Bild und Angaben nebeneinander, Schaltflaechen darunter */
  .file-card { grid-template-columns: 56px 1fr; gap: 10px; padding: 11px; }
  .thumb, .thumb-wrap { width: 56px; height: 56px; }
  .file-actions {
    grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 8px;
  }
  .file-actions button { flex: 1 1 42%; min-height: 44px; font-size: 13px; }

  /* Zahlenfelder: gross genug zum Treffen, 16 px gegen den iOS-Zoom */
  .field input, .qty input, .job-field input,
  .set-row input, .tier-table input {
    font-size: 16px; min-height: 44px;
  }
  .field input { width: 88px; }
  .qty input { width: 60px; height: 44px; }
  .qty button { width: 44px; height: 44px; font-size: 19px; }
  .stepper button { width: 44px; height: 44px; }
  .field-row { gap: 12px; }

  /* Kleinstschrift anheben — 10 px sind auf dem Handy nicht mehr lesbar */
  .field label, .field .unit, .file-name, .margin-sub { font-size: 12px; }
  .disclaimer-note, .res-warn { font-size: 12.5px; }

  /* Grosse Aktionen bekommen volle Breite */
  .btn-export, .btn-folder, .btn-done { width: 100%; min-height: 48px; }
  .actionbar-inner { padding: 14px; }

  /* Farbwaehler muss auf schmale Bildschirme passen */
  .color-popup { width: min(272px, calc(100vw - 32px)); }
  .cp-field, .cp-strip { width: 100%; }

  /* Kopf- und Fusszeile schlanker */
  .topbar-inner { padding: 6px 12px; font-size: 12px; }
  .designer { margin-top: 14px; gap: 16px; padding: 0 12px; }
}


/* ============================================================
   Warenkorb und Testkasse (nur Testbetrieb, siehe js/shop.js)
   ============================================================ */
.info-card.breit { max-width: 620px; }
.test-hinweis {
  margin: 0 0 16px; padding: 10px 13px; font-size: 12.5px; line-height: 1.5;
  background: #fff4e0; border: 2px solid #f0b660; border-radius: 8px; color: #8a4b00;
}
.korb-tabelle { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.korb-tabelle th {
  text-align: left; padding: 7px 6px; border-bottom: 2px solid var(--line);
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
}
.korb-tabelle td { padding: 9px 6px; border-bottom: 1px solid #f1f2f4; vertical-align: top; }
.korb-tabelle tfoot th { border-bottom: none; border-top: 2px solid var(--line);
  font-size: 13.5px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.korb-tabelle a { color: var(--brand); font-weight: 600; }
.korb-tabelle.schmal { margin-top: 14px; }
.korb-tabelle.schmal td:last-child { text-align: right; font-weight: 600; }
.korb-tabelle tr.gesamt td { border-top: 2px solid var(--line); font-size: 16px; }
.korb-weg {
  border: none; background: none; color: var(--bad); font-size: 20px;
  line-height: 1; padding: 0 4px; cursor: pointer;
}
.korb-knoepfe { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.korb-knoepfe button { flex: 1 1 auto; min-height: 44px; }
.btn-zweit {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 11px 16px; font-weight: 700; font-size: 14px;
}
.btn-zweit:hover { background: #f6f7f8; }

.kasse-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kasse-feld { display: flex; flex-direction: column; gap: 3px; }
.kasse-feld span {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--ink);
}
.kasse-feld input {
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px;
  font: inherit; font-size: 14px;
}
.kasse-status { margin-top: 12px; font-size: 13px; line-height: 1.5; min-height: 1.2em; }
.kasse-status.laeuft { color: var(--muted); }
.kasse-status.gut {
  color: #1c6b2c; background: #eefaf0; border: 1px solid #b9e3c2;
  border-radius: 8px; padding: 11px 13px;
}
.kasse-status.fehler {
  color: var(--bad); background: #fdeaea; border: 1px solid #f3c2c2;
  border-radius: 8px; padding: 11px 13px;
}
@media (max-width: 640px) {
  .kasse-raster { grid-template-columns: 1fr; }
}
