/* Bestellung und Lieferschein: Bestätigung, Statusverlauf, Abrechnung, Beleg, Mailvorschau, Widerruf, Druck */

/* ---------- Seitenkopf ---------- */

body[data-page="bestellung"] main > .section {
  background: linear-gradient(180deg, #f5ecdb 0, var(--c-sand) 26rem);
  padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(3rem, 6vw, 5rem);
}
body[data-page="bestellung"] .breadcrumb { margin-bottom: .5rem; }
body[data-page="bestellung"] .page-title-sm {
  display: flex; flex-direction: column; gap: 1rem;
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  font-size: clamp(2.375rem, 2.2vw + 1.5rem, 3.375rem); font-weight: 500; line-height: 1.04;
}
body[data-page="bestellung"] .page-title-sm::after {
  content: ''; width: 2.25rem; height: 1px; background: var(--c-brass-line);
}

/* ---------- Kästen ---------- */

body[data-page="bestellung"] .order-root { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
body[data-page="bestellung"] .order-root > .panel {
  position: relative; min-width: 0; margin: 0;
  padding: clamp(1.25rem, 3.2vw, 2.75rem);
  background: var(--c-paper); border: 1px solid var(--c-line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
body[data-page="bestellung"] .order-root .panel__head {
  align-items: baseline; gap: .35rem 1.5rem;
  margin-bottom: clamp(1.25rem, 2.6vw, 1.75rem); padding-bottom: .9rem;
  border-bottom: 1px solid var(--c-line);
}
body[data-page="bestellung"] .order-root .panel__head:has(> .btn) { align-items: center; padding-bottom: .75rem; }
body[data-page="bestellung"] .order-root .panel h2 {
  font-family: var(--font-serif); font-weight: 600; letter-spacing: -.005em;
  font-size: clamp(1.75rem, .9vw + 1.4rem, 2.125rem); line-height: 1.1;
  color: var(--c-heading); font-variant-numeric: lining-nums;
}
body[data-page="bestellung"] .order-root .panel__head > .muted { font-size: .875rem; }
body[data-page="bestellung"] .order-root > .panel > p:not(.legal-note) { max-width: 42em; }

body[data-page="bestellung"] .order-root .notice { border-left-width: 2px; padding: .95rem 1.15rem; }
body[data-page="bestellung"] .order-root .notice--plain { background: var(--c-bg); border: 1px solid var(--c-line); border-left: 2px solid var(--c-brass-line); }
body[data-page="bestellung"] .order-root .notice--plain svg { color: var(--c-brass); }

/* ---------- Bestätigung ---------- */

body[data-page="bestellung"] .panel[aria-labelledby="confirm-title"]::before {
  content: ''; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; background: var(--c-brand-dark);
}
body[data-page="bestellung"] .panel[aria-labelledby="confirm-title"] > .notice { margin-bottom: clamp(1.5rem, 3vw, 2rem) !important; }
body[data-page="bestellung"] .order-root .confirm { gap: clamp(1rem, 2.4vw, 1.75rem); align-items: flex-start; }
body[data-page="bestellung"] .order-root .confirm__icon {
  width: 3.5rem; height: 3.5rem; margin: .2rem .3rem 0 .3rem;
  background: var(--c-brand-dark);
  box-shadow: 0 0 0 4px var(--c-paper), 0 0 0 5px var(--c-brass-line);
}
body[data-page="bestellung"] .order-root .confirm__icon svg { width: 1.75rem; height: 1.75rem; }
body[data-page="bestellung"] .order-root .panel .confirm h2 {
  margin-bottom: .55rem !important; max-width: 20em; text-wrap: balance;
  font-size: clamp(1.875rem, 1.5vw + 1.35rem, 2.625rem); font-weight: 500; line-height: 1.08;
}
body[data-page="bestellung"] .order-root .confirm p { max-width: 52em; color: var(--c-ink-soft); }
body[data-page="bestellung"] .order-root .confirm p strong { color: var(--c-ink); }

body[data-page="bestellung"] .order-root .order-facts {
  gap: 1.25rem 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0; padding-top: clamp(1.25rem, 2.6vw, 1.75rem);
  border-top: 1px solid var(--c-line);
}
body[data-page="bestellung"] .order-root .order-facts div {
  padding: .1rem 1.25rem .2rem; background: none; border-radius: 0; border-left: 1px solid var(--c-brass-line);
}
body[data-page="bestellung"] .order-root .order-facts dt { font-size: .875rem; color: var(--c-ink-soft); }
body[data-page="bestellung"] .order-root .order-facts dd {
  margin: .3rem 0 0; font-family: var(--font-serif); font-size: 1.375rem; font-weight: 600; line-height: 1.22;
  color: var(--c-ink); font-variant-numeric: lining-nums;
}
body[data-page="bestellung"] .panel[aria-labelledby="confirm-title"] > .btn-row {
  margin-top: clamp(1.5rem, 3vw, 2rem) !important; padding-top: clamp(1.25rem, 2.6vw, 1.5rem);
  border-top: 1px solid var(--c-line); gap: .75rem 1.25rem;
}
body[data-page="bestellung"] .panel[aria-labelledby="confirm-title"] > .btn-row > .small { color: var(--c-ink-soft); }
body[data-page="bestellung"] .panel[aria-labelledby="confirm-title"] > .btn-row > .small .countdown { color: var(--c-ink); }
body[data-page="bestellung"] .panel[aria-labelledby="confirm-title"] > .btn-row > p .icon { color: var(--c-brass); }

/* ---------- Statusverlauf ---------- */

body[data-page="bestellung"] .order-root .demo-controls {
  gap: .6rem 1rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem) !important; padding: .7rem .75rem .7rem 1rem;
  background: var(--c-bg); border: 1px dashed var(--c-line-strong); border-radius: var(--radius);
}
body[data-page="bestellung"] .order-root .demo-controls__label { font-size: .875rem; font-weight: 600; color: var(--c-ink-soft); }
body[data-page="bestellung"] .order-root .seg { gap: 3px; padding: 3px; border-color: var(--c-line); border-radius: var(--field-radius); background: #fff; }
body[data-page="bestellung"] .order-root .seg button {
  padding: 0 1.1rem; border-radius: 1px; font-size: .9375rem; color: var(--c-ink);
  transition: background-color .2s ease, color .2s ease;
}
body[data-page="bestellung"] .order-root .seg button:hover { background: var(--c-brand-tint); color: var(--c-brand-deep); }
body[data-page="bestellung"] .order-root .seg button[aria-pressed="true"] { background: var(--c-brand-dark); color: #fff; }
body[data-page="bestellung"] .order-root .seg button:focus-visible { outline-offset: 1px; position: relative; z-index: 1; }

body[data-page="bestellung"] .order-root .timeline__step { grid-template-columns: 2.75rem minmax(0, 1fr); column-gap: 1rem; align-content: start; padding-bottom: 1.75rem; }
body[data-page="bestellung"] .order-root .timeline__step:last-child { padding-bottom: 0; }
body[data-page="bestellung"] .order-root .timeline__step::before {
  left: calc(1.375rem - .5px); top: 2.75rem; width: 1px; background: var(--c-brass-line);
}
body[data-page="bestellung"] .order-root .timeline__step.is-done:not(.is-current)::before {
  left: calc(1.375rem - 1px); width: 2px; background: var(--c-brand-dark);
}
body[data-page="bestellung"] .order-root .timeline__dot {
  width: 2.75rem; height: 2.75rem;
  background: var(--c-paper); border: 1px solid var(--c-brass-line); color: var(--c-brass);
  font-family: var(--font-serif); font-size: 1.375rem; font-weight: 600; line-height: 1; font-variant-numeric: lining-nums;
}
body[data-page="bestellung"] .order-root .timeline__step.is-done .timeline__dot { background: var(--c-brand-dark); border-color: var(--c-brand-dark); color: #fff; }
body[data-page="bestellung"] .order-root .timeline__step.is-current .timeline__dot {
  box-shadow: 0 0 0 4px var(--c-paper), 0 0 0 5px var(--c-brass-line);
}
body[data-page="bestellung"] .order-root .timeline__label {
  font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; line-height: 1.15; color: var(--c-ink);
}
body[data-page="bestellung"] .order-root .timeline__step.is-current .timeline__label { color: var(--c-heading); }
body[data-page="bestellung"] .order-root .timeline__time { margin-top: .2rem; font-size: .875rem; }
body[data-page="bestellung"] .order-root .timeline__action { margin-top: .85rem; }
body[data-page="bestellung"] .order-root .timeline__action .btn { padding-inline: 1rem; }
@media (min-width: 820px) {
  body[data-page="bestellung"] .order-root .timeline__step { grid-template-columns: 1fr; padding: 0 1.25rem 0 0; }
  body[data-page="bestellung"] .order-root .timeline__step::before {
    left: 2.75rem; right: 0; top: calc(1.375rem - .5px); width: auto; height: 1px;
  }
  body[data-page="bestellung"] .order-root .timeline__step.is-done:not(.is-current)::before {
    left: 2.75rem; top: calc(1.375rem - 1px); width: auto; height: 2px;
  }
  body[data-page="bestellung"] .order-root .timeline__dot { margin-bottom: 1rem; }
}

/* ---------- Abrechnung ---------- */

body[data-page="bestellung"] .panel[aria-labelledby="bill-title"] > .notice { margin-bottom: clamp(1.25rem, 2.6vw, 1.75rem) !important; align-items: center; }
body[data-page="bestellung"] .panel[aria-labelledby="bill-title"] > .notice svg { align-self: flex-start; margin-top: .15rem; }
body[data-page="bestellung"] .panel[aria-labelledby="bill-title"] > .notice p {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; flex: 1;
}
body[data-page="bestellung"] .panel[aria-labelledby="bill-title"] > .notice p .btn { margin-top: 0 !important; background: var(--c-paper); }
body[data-page="bestellung"] .panel[aria-labelledby="bill-title"] > .notice p .btn:hover { background: var(--c-brand-dark); }

body[data-page="bestellung"] .order-root .table-wrap {
  border: 0; border-radius: 0; border-top: 1px solid var(--c-ink); border-bottom: 1px solid var(--c-line);
}
body[data-page="bestellung"] .order-root .table-wrap:focus-visible { outline-offset: -3px; border-radius: 0; }
body[data-page="bestellung"] .order-root .table { font-size: .9375rem; }
body[data-page="bestellung"] .order-root .table th,
body[data-page="bestellung"] .order-root .table td { padding: .8rem 1rem; }
body[data-page="bestellung"] .order-root .table th:first-child,
body[data-page="bestellung"] .order-root .table td:first-child { padding-left: .25rem; }
body[data-page="bestellung"] .order-root .table th:last-child,
body[data-page="bestellung"] .order-root .table td:last-child { padding-right: .25rem; }
body[data-page="bestellung"] .order-root .table thead th {
  padding-block: .75rem; background: none; color: var(--c-ink-soft);
  font-size: .875rem; font-weight: 600; border-bottom: 1px solid var(--c-line-strong);
}
body[data-page="bestellung"] .order-root .table tbody th { font-weight: 600; }
body[data-page="bestellung"] .order-root .table small { font-size: .875rem; margin-top: .15rem; font-variant-numeric: normal; }
body[data-page="bestellung"] .order-root .table tbody tr { transition: background-color .2s ease; }
body[data-page="bestellung"] .order-root .table tbody tr:hover { background: rgba(243, 237, 224, .55); }
body[data-page="bestellung"] .order-root .table .is-changed,
body[data-page="bestellung"] .order-root .table .is-changed:hover { background: var(--c-warn-tint); }
body[data-page="bestellung"] .order-root .table .is-changed > :first-child { box-shadow: inset 2px 0 0 var(--c-warn-line); }
body[data-page="bestellung"] .order-root .table tfoot th,
body[data-page="bestellung"] .order-root .table tfoot td { padding-block: .7rem; border-top: 1px solid var(--c-line); font-weight: 600; }
body[data-page="bestellung"] .order-root .table tfoot tr:first-child > * { border-top: 1px solid var(--c-ink); }
body[data-page="bestellung"] .order-root .table tfoot tr:last-child > * {
  padding-block: .9rem; border-top: 3px double var(--c-brass-line); font-size: 1.0625rem; font-weight: 700;
}

/* Summen rechts unter der Tabelle, Punktführer wie in der Preistafel */
body[data-page="bestellung"] .order-root .summary {
  gap: .6rem; max-width: 26rem !important; margin: 1.75rem 0 0 auto !important;
}
body[data-page="bestellung"] .order-root .summary__row { align-items: baseline; }
/* Tabellenziffern in Inter verbreitern auch den Bindestrich („SEPA-Lastschrift“) */
body[data-page="bestellung"] .order-root .summary__row dd { font-variant-numeric: normal; }
body[data-page="bestellung"] .order-root .summary__row dt { display: flex; flex: 1; align-items: baseline; gap: .6rem; }
body[data-page="bestellung"] .order-root .summary__row dt::after {
  content: ''; flex: 1; min-width: 1rem; border-bottom: 1px dotted var(--c-line-strong); transform: translateY(-.25em);
}
body[data-page="bestellung"] .order-root .summary__row--total { margin-top: .35rem; padding-top: .9rem; border-top: 1px solid var(--c-ink); font-size: 1.0625rem; }
body[data-page="bestellung"] .order-root .summary__row--total dd {
  font-family: var(--font-serif); font-size: 1.875rem; font-weight: 600; line-height: 1;
  color: var(--c-heading); font-variant-numeric: lining-nums tabular-nums;
}
body[data-page="bestellung"] .order-root .summary + .legal-note { max-width: 26rem; margin: .9rem 0 0 auto !important; }

/* ---------- Lieferschein als Beleg ---------- */

body[data-page="bestellung"] .order-root .doc {
  position: relative; background: #fff; border: 1px solid var(--c-line); border-radius: 0;
  padding: clamp(1.25rem, 4vw, 3rem);
  box-shadow: 0 1px 2px rgba(31, 35, 27, .04), 0 22px 44px -30px rgba(31, 35, 27, .4);
}
body[data-page="bestellung"] .order-root .doc__head {
  align-items: flex-start; gap: 1.5rem 2.5rem;
  margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 3px double var(--c-brass-line);
}
body[data-page="bestellung"] .order-root .doc__logo { width: 172px; }
body[data-page="bestellung"] .order-root .doc__head svg { width: 100%; }
body[data-page="bestellung"] .order-root .doc__meta { gap: .3rem 1.5rem; font-size: .9375rem; }
body[data-page="bestellung"] .order-root .doc__meta dd { color: var(--c-ink); }
body[data-page="bestellung"] .order-root .doc .table td:first-child { color: var(--c-brass); font-variant-numeric: tabular-nums; }
body[data-page="bestellung"] .order-root .doc > .legal-note { margin-top: 1.25rem !important; }

/* ---------- Widerruf ---------- */

body[data-page="bestellung"] .panel[aria-labelledby="widerruf"] > .notice { margin-bottom: 1.25rem !important; }
body[data-page="bestellung"] .panel[aria-labelledby="widerruf"] > p { margin-bottom: 1.25rem; }
/* Breit: Erklärung links, Knopf rechts auf einer Linie */
@media (min-width: 720px) {
  body[data-page="bestellung"] .panel[aria-labelledby="widerruf"] {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 2.5rem; align-items: center;
  }
  body[data-page="bestellung"] .panel[aria-labelledby="widerruf"] > :not(p):not(.btn) { grid-column: 1 / -1; }
  body[data-page="bestellung"] .panel[aria-labelledby="widerruf"] > p { margin-bottom: 0; }
}
body[data-page="bestellung"] .order-root #widerruf:focus { outline: none; }
body[data-page="bestellung"] .order-root #widerruf:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
body[data-page="bestellung"] .order-root #wd-done:focus { outline: none; }

/* ---------- Dialoge der Seite ---------- */

body[data-page="bestellung"] .order-root .dialog__body > * + * { margin-top: 1.25rem; }
body[data-page="bestellung"] .order-root .dialog__body > .legal-note { margin-top: 1rem; }
body[data-page="bestellung"] .order-root .dialog__body .field input { width: 100%; }
body[data-page="bestellung"] .order-root .dialog__body .field__error:empty { display: none; }
body[data-page="bestellung"] .order-root .wd-items { margin-top: 1rem; padding: .25rem 1rem .5rem; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-bg); }
body[data-page="bestellung"] .order-root .wd-items legend { float: left; width: 100%; padding-top: .75rem; margin-bottom: .25rem; }
body[data-page="bestellung"] .order-root .wd-items legend + * { clear: both; }
body[data-page="bestellung"] .order-root .wd-items .check { min-height: 2.75rem; align-items: center; padding-block: .35rem; }
body[data-page="bestellung"] .order-root .wd-items .check + .check { border-top: 1px solid var(--c-line); }
body[data-page="bestellung"] .order-root .wd-items .check input { margin-top: 0; }
body[data-page="bestellung"] .order-root .choice-list legend { margin-bottom: .6rem; }

/* Mailvorschau */
body[data-page="bestellung"] .order-root .mail { border-color: var(--c-line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
body[data-page="bestellung"] .order-root .mail__head { padding: .85rem 1.25rem; gap: .25rem 1rem; background: var(--c-bg); border-bottom: 1px solid var(--c-line); }
body[data-page="bestellung"] .order-root .mail__brand { padding: .9rem 1.25rem; }
body[data-page="bestellung"] .order-root .mail__body { padding: 1.5rem 1.25rem 1.5rem; }
body[data-page="bestellung"] .order-root .mail__body h3 { color: var(--c-heading); font-weight: 500; font-size: 1.75rem; line-height: 1.12; margin-bottom: .75rem; }
body[data-page="bestellung"] .order-root .mail__body table { margin: 1rem 0 1.25rem; border-top: 1px solid var(--c-ink); }
body[data-page="bestellung"] .order-root .mail__body td,
body[data-page="bestellung"] .order-root .mail__body th { padding: .55rem 0; }
body[data-page="bestellung"] .order-root .mail__body tr:last-child > * { border-top: 3px double var(--c-brass-line); border-bottom: 0; padding-top: .7rem; }
body[data-page="bestellung"] .order-root .mail__body small { color: var(--c-ink-soft); font-size: .875rem; }
body[data-page="bestellung"] .order-root .mail .photo-placeholder { margin-top: 1rem; border: 1px solid var(--c-line); }

/* Lieferfenster */
body[data-page="bestellung"] .order-root .slot { border-radius: var(--radius); transition: border-color .2s ease, background-color .2s ease; }
body[data-page="bestellung"] .order-root .slot__free { font-size: .875rem; }
body[data-page="bestellung"] .order-root .slots-day__title { font-family: var(--font-serif); font-size: 1.375rem; font-weight: 600; color: var(--c-heading); }

/* ---------- Schmal ---------- */

@media (max-width: 819.98px) {
  body[data-page="bestellung"] .order-root .doc .table td:first-child { color: var(--c-ink-soft); }
  /* Spalten nicht zusammenquetschen: Mengen und Beträge einzeilig, Text mit Mindestbreite */
  body[data-page="bestellung"] .order-root .table th,
  body[data-page="bestellung"] .order-root .table td { white-space: nowrap; }
  body[data-page="bestellung"] .panel[aria-labelledby="bill-title"] .table tbody th { white-space: normal; min-width: 8.5rem; }
  body[data-page="bestellung"] .panel[aria-labelledby="bill-title"] .table tbody td:nth-child(4) { white-space: normal; min-width: 14.5rem; }
  body[data-page="bestellung"] .order-root .table--compact tbody td:nth-child(2) { white-space: normal; min-width: 9rem; }
  body[data-page="bestellung"] .order-root .table--compact tbody td:nth-child(6) { white-space: normal; min-width: 13.5rem; }
  /* Hinweis, dass die Tabelle seitlich weitergeht: Schatten an der Kante, die noch Inhalt hat */
  body[data-page="bestellung"] .order-root .table-wrap {
    background:
      linear-gradient(90deg, var(--c-paper) 35%, rgba(255, 254, 251, 0)) left / 2.5rem 100% no-repeat local,
      linear-gradient(270deg, var(--c-paper) 35%, rgba(255, 254, 251, 0)) right / 2.5rem 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(31, 35, 27, .2), rgba(31, 35, 27, 0)) left / 1rem 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(31, 35, 27, .2), rgba(31, 35, 27, 0)) right / 1rem 100% no-repeat scroll;
  }
  body[data-page="bestellung"] .order-root .doc .table-wrap {
    background:
      linear-gradient(90deg, #fff 35%, rgba(255, 255, 255, 0)) left / 2.5rem 100% no-repeat local,
      linear-gradient(270deg, #fff 35%, rgba(255, 255, 255, 0)) right / 2.5rem 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(31, 35, 27, .2), rgba(31, 35, 27, 0)) left / 1rem 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(31, 35, 27, .2), rgba(31, 35, 27, 0)) right / 1rem 100% no-repeat scroll;
  }
}
@media (max-width: 600px) {
  /* Kästen randlos: mehr Breite für Tabellen und Beleg */
  body[data-page="bestellung"] .order-root > .panel {
    margin-inline: calc(-1 * var(--gutter)); padding: 1.5rem var(--gutter) 1.75rem;
    border-inline: 0; border-radius: 0;
  }
  body[data-page="bestellung"] .panel[aria-labelledby="confirm-title"]::before { left: 0; right: 0; }
  body[data-page="bestellung"] .order-root .panel__head:has(> .btn) { flex-wrap: nowrap; }
  body[data-page="bestellung"] .order-root .confirm { flex-direction: column; gap: 1.1rem; }
  body[data-page="bestellung"] .order-root .confirm__icon { width: 3rem; height: 3rem; margin: .3rem 0 0 .3rem; }
  body[data-page="bestellung"] .order-root .confirm__icon svg { width: 1.5rem; height: 1.5rem; }
  body[data-page="bestellung"] .order-root .order-facts div { padding-inline: 1rem .25rem; }
  body[data-page="bestellung"] .order-root .order-facts dd { font-size: 1.3125rem; }
  body[data-page="bestellung"] .order-root .demo-controls { padding: .75rem; }
  body[data-page="bestellung"] .order-root .demo-controls .seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  body[data-page="bestellung"] .order-root .seg button { padding-inline: .5rem; }
  /* Tabellen bis an den Rand: die Wischfläche ist so breit wie der Bildschirm */
  body[data-page="bestellung"] .panel[aria-labelledby="bill-title"] .table-wrap { margin-inline: calc(-1 * var(--gutter)); }
  body[data-page="bestellung"] .panel[aria-labelledby="bill-title"] .table :is(th, td):first-child { padding-left: var(--gutter); }
  body[data-page="bestellung"] .panel[aria-labelledby="bill-title"] .table :is(th, td):last-child { padding-right: var(--gutter); }
  body[data-page="bestellung"] .order-root .doc .table-wrap { margin-inline: -1rem; }
  body[data-page="bestellung"] .order-root .doc .table :is(th, td):first-child { padding-left: 1rem; }
  body[data-page="bestellung"] .order-root .doc .table :is(th, td):last-child { padding-right: 1rem; }
  body[data-page="bestellung"] .order-root .summary { max-width: none !important; margin-left: 0 !important; }
  body[data-page="bestellung"] .order-root .summary__row dt { white-space: nowrap; }
  body[data-page="bestellung"] .order-root .summary__row--total dd { font-size: 1.375rem; white-space: nowrap; }
  body[data-page="bestellung"] .order-root .summary + .legal-note { max-width: none; margin-left: 0 !important; }
  body[data-page="bestellung"] .order-root .dialog__foot .btn { flex: 1 1 100%; }
  /* Unter 360 px passt die Summenzeile mit Betrag nicht einzeilig in die Breite */
  @media (max-width: 359.98px) {
    body[data-page="bestellung"] .order-root .summary__row dt { white-space: normal; }
  }
  body[data-page="bestellung"] .order-root .doc { padding: 1.1rem 1rem 1.25rem; }
  body[data-page="bestellung"] .order-root .doc__logo { width: 148px; }
  body[data-page="bestellung"] .order-root .doc__meta { font-size: .875rem; column-gap: 1rem; }
  body[data-page="bestellung"] .order-root .mail__head { padding-inline: 1rem; }
  body[data-page="bestellung"] .order-root .mail__body { padding: 1.25rem 1rem; }
  body[data-page="bestellung"] .order-root .mail__body h3 { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="bestellung"] .order-root .table tbody tr,
  body[data-page="bestellung"] .order-root .seg button { transition: none; }
}

/* ---------- Druck: Bestellung, dann der Lieferschein auf eigenem Blatt.
   Kommt der Druck vom Knopf im Lieferschein (er hat dabei den Fokus), nur der Lieferschein. ---------- */

@media print {
  body[data-page="bestellung"] main > .section { background: #fff; padding: 0; }
  body[data-page="bestellung"] .breadcrumb,
  body[data-page="bestellung"] .page-title-sm::after,
  body[data-page="bestellung"] .order-root .btn,
  body[data-page="bestellung"] .order-root .timeline__action,
  body[data-page="bestellung"] .order-root > .panel[aria-labelledby="widerruf"],
  body[data-page="bestellung"] .order-root > .panel > .notice--plain { display: none !important; }
  body[data-page="bestellung"] .page-title-sm { font-size: 22pt; margin-bottom: 10pt; }
  body[data-page="bestellung"] .order-root { display: block; }
  body[data-page="bestellung"] .order-root > .panel {
    margin: 0 0 16pt; padding: 0; border: 0; box-shadow: none; background: #fff;
  }
  body[data-page="bestellung"] .order-root > .panel::before { display: none; }
  body[data-page="bestellung"] .order-root .panel__head { margin-bottom: 8pt; padding-bottom: 4pt; }
  body[data-page="bestellung"] .order-root .panel h2 { font-size: 15pt; }
  body[data-page="bestellung"] .order-root .panel .confirm h2 { font-size: 17pt; }
  body[data-page="bestellung"] .order-root .confirm__icon { width: 2.25rem; height: 2.25rem; box-shadow: none; }
  body[data-page="bestellung"] .order-root .confirm__icon svg { width: 1.2rem; height: 1.2rem; }
  body[data-page="bestellung"] .order-root .order-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 10pt; padding-top: 8pt; }
  body[data-page="bestellung"] .order-root .order-facts div { padding-inline: 8pt 4pt; }
  body[data-page="bestellung"] .order-root .order-facts dd { font-size: 12pt; }
  body[data-page="bestellung"] .panel[aria-labelledby="confirm-title"] > .btn-row { margin-top: 8pt !important; padding-top: 6pt; }
  body[data-page="bestellung"] .order-root .notice { padding: 6pt 8pt; }
  body[data-page="bestellung"] .panel[aria-labelledby="bill-title"] > .notice { margin-bottom: 8pt !important; }
  body[data-page="bestellung"] .order-root .table-wrap { overflow: visible; background: none; margin-inline: 0; }
  body[data-page="bestellung"] .order-root .table { font-size: 9pt; }
  body[data-page="bestellung"] .order-root .table th,
  body[data-page="bestellung"] .order-root .table td { padding: 3pt 5pt; white-space: normal; min-width: 0; }
  body[data-page="bestellung"] .order-root .table tr { break-inside: avoid; }
  body[data-page="bestellung"] .order-root .table .r { white-space: nowrap; }
  /* Summenzeilen nur einmal am Ende, nicht auf jeder Seite wiederholt */
  body[data-page="bestellung"] .order-root .table tfoot { display: table-row-group; }
  body[data-page="bestellung"] .order-root .timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body[data-page="bestellung"] .order-root .timeline__step { grid-template-columns: 1fr; padding: 0 8pt 0 0; }
  body[data-page="bestellung"] .order-root .timeline__step::before { left: 2.75rem; right: 0; top: calc(1.375rem - .5px); bottom: auto; width: auto; height: 1px; }
  body[data-page="bestellung"] .order-root .timeline__dot { grid-row: auto; margin-bottom: 4pt; }
  body[data-page="bestellung"] .order-root .timeline__label { align-self: auto; font-size: 13pt; }
  body[data-page="bestellung"] .order-root .timeline__time { font-size: 8.5pt; }
  body[data-page="bestellung"] .order-root .summary { max-width: 20rem !important; margin-top: 10pt !important; }
  body[data-page="bestellung"] .order-root .summary__row--total dd { font-size: 15pt; }
  body[data-page="bestellung"] .order-root > .panel[aria-labelledby="ls-title"] { break-before: page; }
  body[data-page="bestellung"] .order-root .doc { border: 0; box-shadow: none; padding: 0; }

  body[data-page="bestellung"]:has([data-print]:focus) .page-title-sm,
  body[data-page="bestellung"]:has([data-print]:focus) .order-root > .panel:not([aria-labelledby="ls-title"]),
  body[data-page="bestellung"]:has([data-print]:focus) .order-root > .panel[aria-labelledby="ls-title"] > .panel__head { display: none !important; }
  body[data-page="bestellung"]:has([data-print]:focus) .order-root > .panel[aria-labelledby="ls-title"] { break-before: auto; }
}
