/* SHIO Bondrucker (/bondrucker/). Setzt tokens.css, fonts.css und ui.css voraus.
   Laptop 1366x768 bis 1920x1080 (vier Drucker nebeneinander) und halbe Breite im iframe von /pult/
   (680 bis 1179 px: zwei mal zwei). Dunkler Raum, dezente Druckerkoepfe, weisses Thermopapier (80 mm).
   Die Grundschrift waechst mit der Breite (14 px bis 18 px), die Schrift auf dem Papier mit der Papierbreite. */

html {
  font-size: clamp(14px, calc(7.4px + .58vw), 18px);
  background: var(--schwarz);
  height: 100%;
  overflow: hidden;
}
body { height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--schwarz); }

/* Papier und Tinte auf :root: der Druckbereich fuer window.print liegt ausserhalb von .bd */
:root {
  --papier: #fbf9f3;
  --papier-2: #f3f0e7;
  --tinte: #17140f;
  --tinte-2: #4d483f;
  --tinte-linie: rgba(23, 20, 15, .38);
  --mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

.bd {
  --rand: 1.25rem;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background:
    radial-gradient(70rem 26rem at 50% -6rem, rgba(201, 168, 106, .075), transparent 70%),
    var(--schwarz);
}

/* ---------- Kopfleiste ---------- */
.bd-kopf {
  position: relative; z-index: 5; flex: none;
  display: grid; align-items: center; column-gap: 1.1rem; row-gap: .5rem;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto auto;
  grid-template-areas: "marke filter stand uhr knoepfe absender";
  padding: .6rem var(--rand);
  background: linear-gradient(180deg, #0d1014, #090a0d);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 18px 40px -30px rgba(0, 0, 0, .9);
}
.bd-kopf::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--ui-gold-linie); opacity: .55;
}

.bd-marke { grid-area: marke; display: flex; align-items: center; gap: .75rem; min-width: 0; }
.bd-marke__zeichen { width: 2.5rem; height: 2.5rem; flex: none; }
.bd-marke__text { display: grid; gap: .12rem; min-width: 0; }
.bd-marke__name { font-size: .6rem; font-weight: 600; letter-spacing: var(--sperrung-logo); color: var(--gold); line-height: 1; }
.bd-marke__titel { display: flex; align-items: center; gap: .5rem; font-size: 1.35rem; font-weight: 500; color: var(--weiss); line-height: 1.08; letter-spacing: .01em; white-space: nowrap; }
.bd-beispiel { font-size: .52rem; letter-spacing: .14em; }

/* Filter: Alle / Sushi / Grill / Kueche / Bar */
.bd-filter {
  grid-area: filter; justify-self: center; display: flex; gap: .25rem; padding: .25rem; max-width: 100%;
  overflow-x: auto; scrollbar-width: none;
  background: rgba(255, 255, 255, .025); border: 1px solid var(--linie); border-radius: 999px;
}
.bd-filter::-webkit-scrollbar { display: none; }
.bd-chip {
  flex: none; display: inline-flex; align-items: center; gap: .5rem;
  min-height: max(40px, 2.55rem); padding: 0 1rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-2); cursor: pointer;
  font-size: .9rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  transition: background-color var(--ui-dauer) var(--ease), color var(--ui-dauer) var(--ease), box-shadow var(--ui-dauer) var(--ease);
}
@media (hover: hover) and (pointer: fine) { .bd-chip:hover { color: var(--weiss); background: rgba(255, 255, 255, .045); } }
.bd-chip[aria-selected="true"] {
  color: var(--weiss);
  background: linear-gradient(180deg, #252a32, #1a1e24);
  box-shadow: inset 0 0 0 1px rgba(201, 168, 106, .55), inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 24px -14px rgba(201, 168, 106, .55);
}
.bd-chip:focus-visible { outline: 2px solid var(--ui-fokus); outline-offset: 2px; border-radius: 999px; }
.bd-chip__zahl {
  min-width: 1.6rem; height: 1.6rem; padding: 0 .4rem; border-radius: 999px; display: none; place-items: center;
  background: rgba(255, 255, 255, .07); color: var(--text); font-size: .78rem; font-weight: 700;
}
.bd-chip__zahl.ist-null { color: var(--text-3); background: rgba(255, 255, 255, .03); }
.bd-chip[aria-selected="true"] .bd-chip__zahl:not(.ist-null) { background: var(--gold-verlauf); color: var(--ui-gold-text); }
.bd-chip.ist-blinkt { animation: chip-blinken 1.5s var(--ease); }
@keyframes chip-blinken {
  0%, 100% { box-shadow: none; }
  20%, 55% { box-shadow: inset 0 0 0 1px rgba(240, 181, 69, .8), 0 0 18px -2px rgba(240, 181, 69, .55); color: var(--weiss); }
}
@media (min-width: 1600px) { .bd-chip__zahl { display: inline-grid; } }

/* Verbindung und Zaehler */
.bd-stand { grid-area: stand; display: grid; justify-items: start; gap: .3rem; }
.bd-verbindung {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 1.75rem; padding: .15rem .75rem .15rem .6rem;
  border: 1px solid var(--linie-stark); border-radius: 999px; background: rgba(255, 255, 255, .03); color: var(--text-2);
  font-size: .64rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1.1; white-space: nowrap;
  cursor: default;
}
.bd-verbindung:not([disabled]) { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .bd-verbindung:not([disabled]):hover { filter: brightness(1.15); } }
.bd-verbindung__punkt { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; flex: none; }
.bd-verbindung[data-status="online"] { border-color: rgba(79, 207, 141, .42); color: #9be8bf; background: rgba(79, 207, 141, .08); }
.bd-verbindung[data-status="online"] .bd-verbindung__punkt { box-shadow: 0 0 0 3px rgba(79, 207, 141, .18); animation: punkt-atmen 2.6s ease-in-out infinite; }
.bd-verbindung[data-status="offline"] { border-color: rgba(238, 90, 82, .55); color: #ffb3ad; background: rgba(238, 90, 82, .12); }
.bd-verbindung[data-status="lokal"] { border-color: rgba(201, 168, 106, .55); color: var(--gold-hell); background: var(--gold-glanz); }
@keyframes punkt-atmen { 50% { box-shadow: 0 0 0 5px rgba(79, 207, 141, 0); } }
.bd-zaehler { font-size: .7rem; color: var(--text-3); white-space: nowrap; line-height: 1.2; }
.bd-zaehler b { font-size: 1rem; font-weight: 600; color: var(--weiss); margin-right: .2em; }

.bd-uhr { grid-area: uhr; display: grid; justify-items: end; gap: .15rem; }
.bd-uhr__zeit { font-size: 1.8rem; font-weight: 300; color: var(--weiss); line-height: 1; letter-spacing: .02em; }
.bd-uhr__datum { font-size: .58rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); line-height: 1; }

.bd-knoepfe { grid-area: knoepfe; display: flex; align-items: center; gap: .45rem; }
.bd-rund { --k-hoehe: max(44px, 2.75rem); }
.bd-rund .icon { width: 1.2rem; height: 1.2rem; }
.bd-rund rect, .bd-rund path { fill: none; stroke: currentColor; }
#knopf-ton[aria-pressed="false"] { color: var(--text-3); }
#knopf-ansicht[aria-pressed="true"] { border-color: rgba(201, 168, 106, .6); color: var(--gold-hell); }

.bd-absender { grid-area: absender; padding-left: 1rem; border-left: 1px solid var(--linie); display: flex; align-items: center; min-height: 2.4rem; }
.bd-absender .rbpay-marke { font-size: .6rem; }

/* ---------- Druckerhalle ---------- */
.bd-halle {
  flex: 1 1 auto; min-height: 0;
  display: grid; gap: 1rem; grid-template-rows: minmax(0, 1fr);
  padding: 1rem var(--rand) 0;
}
.bd-halle[data-ansicht="alle"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bd-halle[data-ansicht="einzeln"], .bd-halle[data-ansicht="spalte"] { grid-template-columns: minmax(0, 36rem); justify-content: center; }

.drucker { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/* Druckerkopf: dunkles Gehaeuse, Bereitschafts-Lampe, Name, offene Bons, Papierschlitz an der Unterkante */
.drucker__kopf { flex: none; position: relative; z-index: 2; }
.drucker__geraet {
  position: relative; padding: .7rem .9rem 1.05rem;
  border-radius: 1.1rem 1.1rem .45rem .45rem;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .018) 0 2px, transparent 2px 5px) top / 100% .35rem no-repeat,
    linear-gradient(180deg, #272c34 0%, #1b1f25 46%, #13161a 100%);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 -12px 18px -14px rgba(0, 0, 0, .9), 0 18px 30px -22px rgba(0, 0, 0, .95);
  transition: border-color 300ms var(--ease);
}
.drucker__geraet.ist-aktiv { border-color: rgba(240, 181, 69, .35); }
.drucker__zeile { display: flex; align-items: center; gap: .6rem; min-height: 2rem; }
.drucker__led {
  flex: none; width: .55rem; height: .55rem; border-radius: 50%;
  background: #3a3f47; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .6);
  transition: background-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.drucker__led[data-led="bereit"] { background: var(--ok); box-shadow: 0 0 0 2px rgba(79, 207, 141, .14), 0 0 10px rgba(79, 207, 141, .5); }
.drucker__led[data-led="druckt"] { background: var(--warn); box-shadow: 0 0 0 2px rgba(240, 181, 69, .2), 0 0 12px rgba(240, 181, 69, .75); animation: led-blinken .36s steps(2, jump-none) infinite; }
.drucker__led[data-led="offline"] { background: var(--alarm); box-shadow: 0 0 10px rgba(238, 90, 82, .5); }
@keyframes led-blinken { 50% { opacity: .35; } }
.drucker__icon { display: inline-grid; place-items: center; color: var(--gold); }
.drucker__icon .icon { width: 1.15rem; height: 1.15rem; }
.drucker__name {
  flex: 1; min-width: 0; font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--weiss); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.drucker__offen {
  flex: none; padding: .18rem .6rem; border-radius: 999px; white-space: nowrap;
  font-size: .7rem; font-weight: 600; line-height: 1.3;
  border: 1px solid rgba(201, 168, 106, .42); background: var(--gold-glanz); color: var(--gold-hell);
}
.drucker__offen.ist-null { border-color: var(--linie); background: transparent; color: var(--text-3); }
.drucker__schlitz {
  position: absolute; left: 50%; bottom: -.2rem; transform: translateX(-50%);
  width: min(calc(100% - 1.2rem), 23rem); height: .4rem; border-radius: 3px;
  background: #030405;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .95), 0 -1px 0 rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .07);
  transition: box-shadow 300ms var(--ease);
}
.drucker__geraet.ist-aktiv .drucker__schlitz { box-shadow: inset 0 2px 3px rgba(0, 0, 0, .95), 0 1px 0 rgba(255, 255, 255, .07), 0 0 16px rgba(240, 181, 69, .28); }

/* Eine Spalte: vier kleine Koepfe ueber einem gemeinsamen Schlitz */
.drucker__minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.drucker__mini {
  display: flex; align-items: center; gap: .45rem; min-width: 0; padding: .4rem .55rem;
  border-radius: .6rem; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .06);
  font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text);
  transition: border-color 300ms var(--ease);
}
.drucker__mini.ist-aktiv { border-color: rgba(240, 181, 69, .5); }
.drucker__mini-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drucker__mini .drucker__offen { padding: .02rem .42rem; font-size: .64rem; letter-spacing: 0; }

/* Papierstrom unter dem Schlitz: neueste Bons oben */
.drucker__strom {
  position: relative; flex: 1 1 auto; min-height: 0;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges; scrollbar-width: thin;
  padding-bottom: 1.6rem;
}
.drucker__strom::before {
  content: ""; position: sticky; top: 0; z-index: 1; display: block; height: .9rem; margin-bottom: -.9rem; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent);
}
.drucker__liste { list-style: none; margin: 0; padding: 0 .35rem; display: flex; flex-direction: column; align-items: center; }
.drucker__leer { display: grid; justify-items: center; gap: .6rem; padding: 2.4rem 1rem; text-align: center; color: var(--text-3); font-size: .85rem; line-height: 1.4; }
.drucker__leer .icon { width: 1.8rem; height: 1.8rem; color: var(--gold); opacity: .5; }

/* ---------- Bon ---------- */
.bon { position: relative; width: min(100%, 21.5rem); flex: none; margin: 0 0 1.15rem; container-type: inline-size; }
.bon.ist-druckt { overflow: hidden; }
.bon__rolle {
  position: relative;
  filter: drop-shadow(0 0 0 rgba(233, 213, 166, 0)) drop-shadow(0 10px 14px rgba(0, 0, 0, .55));
}
.bon.ist-frisch .bon__rolle { animation: bon-frisch 4s var(--ease) both; }
@keyframes bon-frisch {
  0%, 55% { filter: drop-shadow(0 0 .8rem rgba(233, 213, 166, .5)) drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); }
  100% { filter: drop-shadow(0 0 0 rgba(233, 213, 166, 0)) drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); }
}

/* Thermopapier mit gezackter Abrisskante unten */
.papier {
  --zacke: .45rem;
  position: relative; margin: 0;
  padding: 1em 1.1em calc(.95em + var(--zacke));
  background: linear-gradient(180deg, #fffdf8, var(--papier) 30%, var(--papier-2));
  color: var(--tinte);
  font-size: clamp(12px, 4.3cqi, 16.5px); line-height: 1.3;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zacke)) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zacke)) 100%;
  transition: opacity 400ms var(--ease), filter 400ms var(--ease);
}
.papier__haus {
  display: flex; align-items: center; justify-content: center; gap: .55em;
  padding-bottom: .7em; border-bottom: 1.5px dashed var(--tinte-linie);
  font-size: .8em; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; line-height: 1.2; text-align: center;
}
.papier__punkt { letter-spacing: 0; }
.papier__tisch {
  display: flex; align-items: baseline; justify-content: center; gap: .28em; margin-top: .45em;
  font-weight: 700; line-height: 1; text-transform: uppercase;
}
.papier__tisch-wort { font-size: 2.2em; letter-spacing: .03em; }
.papier__tisch-nr { font-size: 3.3em; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.papier__meta {
  display: flex; align-items: center; justify-content: space-between; gap: .6em;
  margin-top: .5em; padding: .45em 0 .65em; border-bottom: 1.5px dashed var(--tinte-linie);
}
.papier__runde {
  /* oben etwas mehr Luft: die Punkte von "GETRÄNKE" duerfen den Rahmen nicht beruehren */
  padding: .3em .6em .2em; border-radius: 3px; background: var(--tinte); color: var(--papier);
  font-size: .9em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.papier__runde--getraenke { background: transparent; color: var(--tinte); box-shadow: inset 0 0 0 2px var(--tinte); }
.papier__zeit { font-family: var(--mono); font-size: 1.05em; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.papier__liste { list-style: none; margin: .75em 0 0; padding: 0; display: grid; gap: .6em; }
.papier__zeile { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .55em; align-items: baseline; }
.papier__menge { min-width: 2.15em; font-size: 1.14em; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.papier__name { font-size: 1.14em; font-weight: 700; line-height: 1.22; overflow-wrap: anywhere; }
.papier__notiz {
  grid-column: 2; display: flex; align-items: flex-start; gap: .4em; margin-top: .35em; padding: .3em .55em .32em .45em;
  border-radius: 3px; background: var(--tinte); color: var(--papier);
  font-size: .92em; font-weight: 700; line-height: 1.25;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.papier__notiz .icon { width: 1.05em; height: 1.05em; margin-top: .1em; --icon-strich: 2.2; }
.papier__zeile.ist-storno .papier__menge, .papier__zeile.ist-storno .papier__name { color: rgba(23, 20, 15, .42); text-decoration: line-through; text-decoration-thickness: 2px; }
.papier__zeile.ist-storno .papier__notiz { opacity: .4; }
.papier__storno {
  display: inline-block; margin-left: .5em; padding: .08em .4em; vertical-align: .12em;
  border: 1.5px solid #b3261e; border-radius: 3px; color: #b3261e;
  font-size: .6em; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 1.2;
}
.papier__fuss {
  display: flex; justify-content: space-between; gap: .6em; flex-wrap: wrap;
  margin-top: .9em; padding-top: .55em; border-top: 1.5px dashed var(--tinte-linie);
  font-family: var(--mono); font-size: .74em; color: var(--tinte-2); line-height: 1.3;
}

/* Haken fuer erledigte Bons: liegt in der rechten oberen Papierecke, bleibt kraeftig, waehrend das Papier verblasst */
.bon__siegel {
  position: absolute; top: .55rem; right: .55rem; z-index: 1;
  width: clamp(28px, 10cqi, 38px); height: clamp(28px, 10cqi, 38px); border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ok); color: #05140c;
  box-shadow: 0 0 0 3px rgba(5, 20, 12, .2), 0 6px 14px -4px rgba(0, 0, 0, .55);
  opacity: 0; transform: scale(.4); pointer-events: none;
  transition: opacity 220ms var(--ease), transform 420ms var(--ease-feder);
}
.bon__siegel .icon { width: 58%; height: 58%; --icon-strich: 3; }
.bon__siegel[data-art="storno"] { background: var(--alarm); color: #2a0806; }
.bon.ist-erledigt .bon__siegel { opacity: 1; transform: none; }
.bon.ist-erledigt .papier { opacity: .5; filter: grayscale(.6); }

/* Beim Start schon vorhanden: grau, ohne Animation */
.bon.ist-alt .papier { background: linear-gradient(180deg, #dedbd3, #d3d0c7); opacity: .78; }
.bon.ist-alt.ist-erledigt .papier { opacity: .42; }

/* Leiste unter dem Papier: Status, Drucken, Fertig */
.bon__leiste { display: flex; align-items: center; gap: .45rem; padding-top: .6rem; transition: opacity 350ms var(--ease) 80ms; }
.bon.ist-druckt .bon__leiste { opacity: 0; transition: none; pointer-events: none; }
.bon__status {
  flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: .45rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .04em; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bon__status::before { content: ""; flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--text-3); }
.bon[data-status="neu"] .bon__status::before { background: var(--gold); }
.bon[data-status="zubereitung"] .bon__status { color: #ffd48a; }
.bon[data-status="zubereitung"] .bon__status::before { background: var(--warn); box-shadow: 0 0 0 3px rgba(240, 181, 69, .16); }
.bon[data-status="fertig"] .bon__status, .bon[data-status="serviert"] .bon__status { color: #a8f0c9; }
.bon[data-status="fertig"] .bon__status::before, .bon[data-status="serviert"] .bon__status::before { background: var(--ok); }
.bon[data-status="storniert"] .bon__status { color: #ffb3ad; }
.bon[data-status="storniert"] .bon__status::before { background: var(--alarm); }
.bon.ist-alt .bon__status { color: var(--text-3); }
.bon__knopf { --k-hoehe: max(40px, 2.55rem); flex: none; font-size: .85rem; }
.bon__knopf .icon { width: 1.1rem; height: 1.1rem; }
.bon__fertig { padding: 0 1.05em 0 .9em; }

/* ---------- Ueberlagerung (Start, gesperrt, keine Verbindung), wie /kueche/ ---------- */
.bd-schicht {
  position: fixed; inset: 0; z-index: 800; display: grid; place-items: center; padding: 20px; overflow-y: auto;
  background: rgba(5, 6, 8, .68); -webkit-backdrop-filter: blur(12px) saturate(.9); backdrop-filter: blur(12px) saturate(.9);
  opacity: 0; transition: opacity 420ms var(--ease);
}
.bd-schicht.ist-offen { opacity: 1; }
.bd-schicht:not(.ist-offen) { pointer-events: none; }
.bd-schicht__karte {
  width: min(33rem, 100%); text-align: center; padding: 2.5rem 2.4rem 2.1rem; position: relative; overflow: hidden;
  border-radius: 30px; border: 1px solid rgba(201, 168, 106, .3);
  background: radial-gradient(120% 70% at 50% 0%, #181c22, #0b0d10 72%);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  transform: translateY(10px) scale(.98); transition: transform 520ms var(--ease);
}
.bd-schicht.ist-offen .bd-schicht__karte { transform: none; }
.bd-schicht__karte::before { content: ""; position: absolute; left: 40px; right: 40px; top: 0; height: 1px; background: var(--ui-gold-linie); }
.bd-schicht__zeichen { width: 5.2rem; height: 5.2rem; margin: 0 auto 1.1rem; }
.bd-schicht__label { display: block; margin-bottom: .65rem; }
.bd-schicht__titel { font-size: 2rem; font-weight: 400; color: var(--weiss); line-height: 1.15; }
.bd-schicht__text { margin: .85rem auto 0; max-width: 32ch; color: var(--text-2); font-size: .98rem; line-height: 1.5; }
.bd-schicht__knoepfe { margin-top: 1.7rem; display: grid; gap: .7rem; justify-items: center; }
.bd-schicht__knoepfe .knopf--riesig { min-width: min(17rem, 100%); }
.bd-schicht__hinweis { margin-top: 1.3rem; display: flex; align-items: center; justify-content: center; gap: .5rem 1.1rem; flex-wrap: wrap; color: var(--text-3); font-size: .76rem; }
.bd-schicht__hinweis span { display: inline-flex; align-items: center; gap: .4rem; }
.bd-schicht__hinweis .icon { width: 1rem; height: 1rem; color: var(--gold); }
.bd-schicht__fuss { margin-top: 1.6rem; display: flex; justify-content: center; }

.bd-noscript { padding: 2rem; color: var(--text); }

/* ---------- Echter Druck eines Bons (window.print): nur dieser Bon, 80-mm-Rolle ---------- */
.bd-druckbereich { position: fixed; left: -200vw; top: 0; width: 72mm; pointer-events: none; }
.papier--druck {
  font-size: 14.5px; padding: 1mm 0 2mm;
  background: #fff; color: #000;
  -webkit-mask: none; mask: none;
}
.papier--druck .papier__fuss { color: #000; }
@media print {
  html.ist-einzeldruck, html.ist-einzeldruck body { height: auto !important; overflow: visible !important; background: #fff !important; }
  html.ist-einzeldruck body > :not(.bd-druckbereich) { display: none !important; }
  html.ist-einzeldruck .bd-druckbereich { position: static; left: auto; width: 72mm; margin: 0 4mm; }
}

/* ---------- Breiten und Hoehen ---------- */
@media (max-width: 1359px) {
  .bd-kopf { column-gap: .9rem; }
  .bd-chip { padding: 0 .85rem; }
}
/* Halbe Laptopbreite (iframe in /pult/): zwei Zeilen Kopf, Drucker zwei mal zwei */
@media (max-width: 1179px) {
  .bd { --rand: .9rem; }
  .bd-kopf {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    grid-template-areas: "marke stand uhr knoepfe" "filter filter filter absender";
    column-gap: .8rem;
  }
  .bd-filter { justify-self: start; }
  .bd-absender { border-left: 0; padding-left: 0; justify-self: end; }
  .bd-halle { gap: .8rem; padding-top: .8rem; }
  .bd-halle[data-ansicht="alle"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .drucker__geraet { padding: .5rem .75rem .8rem; }
  .drucker__zeile { min-height: 1.8rem; }
  .bon { margin-bottom: .95rem; }
}
/* Niedrige Faecher (2 x 2 bei wenig Hoehe, z. B. /pult/ im Laptop-Browser): kompakteres Papier und kleinere
   Knoepfe, damit ein normaler Bon samt "Fertig" in sein Fach passt. Nur Bildschirm: der Druck bleibt unveraendert. */
@media screen and (max-width: 1179px) and (max-height: 860px) {
  .bd-halle { gap: .6rem; }
  .drucker__geraet { padding: .4rem .7rem .7rem; }
  .drucker__zeile { min-height: 1.6rem; }
  .bon { margin-bottom: .8rem; }
  .papier { --zacke: .38rem; padding: .7em .9em calc(.7em + var(--zacke)); font-size: clamp(11.5px, 3.9cqi, 15px); }
  .papier__haus { padding-bottom: .5em; }
  .papier__tisch { margin-top: .3em; }
  .papier__tisch-wort { font-size: 1.9em; }
  .papier__tisch-nr { font-size: 2.8em; }
  .papier__meta { margin-top: .35em; padding: .35em 0 .5em; }
  .papier__liste { margin-top: .55em; gap: .4em; }
  .papier__notiz { margin-top: .25em; }
  .papier__fuss { margin-top: .6em; padding-top: .4em; }
  .bon__leiste { padding-top: .4rem; }
  .bon__knopf { --k-hoehe: 36px; }
}
@media (max-width: 760px) {
  .bd-marke__zeichen { width: 2.1rem; height: 2.1rem; }
  .bd-marke__titel { font-size: 1.15rem; }
  .bd-uhr__datum { display: none; }
  .bd-chip { padding: 0 .75rem; }
}
@media (max-width: 600px) {
  .bd-beispiel { display: none; }
}
/* Die Markenzeile passt bis 480 px neben die Filter (/pult/ auf einem 1280er-Laptop: rund 576 px) */
@media (max-width: 480px) {
  .bd-kopf { grid-template-areas: "marke stand uhr knoepfe" "filter filter filter filter"; }
  .bd-absender { display: none; }
}
@media (max-height: 800px) {
  .bd-kopf { padding-block: .45rem; }
  .bd-uhr__zeit { font-size: 1.6rem; }
  .bd-halle { padding-top: .8rem; }
  .bd-schicht__karte { padding: 1.9rem 2rem 1.6rem; }
  .bd-schicht__zeichen { width: 4rem; height: 4rem; margin-bottom: .8rem; }
  .bd-schicht__titel { font-size: 1.75rem; }
  .bd-schicht__knoepfe { margin-top: 1.3rem; }
  .bd-schicht__fuss { margin-top: 1.2rem; }
}
@media (max-height: 620px) {
  .bd-schicht__zeichen { display: none; }
  .bd-schicht__hinweis { display: none; }
}

/* PIN-Abfrage in niedrigen Fenstern (/pult/ im Laptop-Browser: iframe nur ca. 560 px hoch): kompakter, damit
   alle Ziffern und "Abbrechen" ohne Scrollen im Dialog sichtbar sind. Gleiche Stufen wie /kasse/. */
@media (max-height: 740px) {
  .dialog--pin { padding: 18px 24px 16px; }
  .dialog--pin .dialog__marke { width: 36px; height: 36px; margin-bottom: 8px; }
  .dialog--pin .dialog__marke .icon { width: 18px; height: 18px; }
  .dialog--pin .dialog__text { margin-top: 4px; }
  .dialog--pin .dialog__inhalt { margin-top: 12px; }
  .dialog--pin .pinfeld { gap: 12px; }
  .dialog--pin .pinfeld__tasten { grid-template-columns: repeat(3, 62px); gap: 10px; }
  .dialog--pin .pinfeld__taste { width: 62px; height: 62px; font-size: 1.45rem; }
  .dialog--pin .dialog__knoepfe { margin-top: 12px; }
}
@media (max-height: 600px) {
  .dialog--pin .dialog__marke { display: none; }
  .dialog--pin .pinfeld__tasten { grid-template-columns: repeat(3, 56px); gap: 9px; }
  .dialog--pin .pinfeld__taste { width: 56px; height: 56px; font-size: 1.3rem; }
}

/* Eingebettet (/pult/ mit ?eingebettet=1): weniger Kopf, mehr Papier */
.ist-eingebettet .bd-kopf { padding-block: .4rem; row-gap: .4rem; }
.ist-eingebettet .bd-marke__zeichen { width: 2rem; height: 2rem; }
.ist-eingebettet .bd-marke { gap: .6rem; }
.ist-eingebettet .bd-marke__titel { font-size: 1.12rem; }
.ist-eingebettet .bd-uhr__zeit { font-size: 1.4rem; }
.ist-eingebettet .bd-uhr__datum { display: none; }
.ist-eingebettet .bd-chip { min-height: 40px; }
.ist-eingebettet .bd-rund { --k-hoehe: 40px; }
.ist-eingebettet .bd-halle { padding-top: .7rem; }

/* Sehr niedrig (2 x 2 mit unter 640 px Hoehe, /pult/ im Laptop-Browser mit Taskleiste: ca. 560 px):
   Kopf, Druckerkoepfe und Knoepfe noch knapper, damit unter einem normalen Bon die Knoepfe sichtbar bleiben.
   Steht am Dateiende, damit es auch die Regeln fuer ?eingebettet=1 uebersteuert. */
@media screen and (max-width: 1179px) and (max-height: 640px) {
  .bd-kopf, .ist-eingebettet .bd-kopf { padding-block: .3rem; row-gap: .3rem; }
  .bd-filter { padding: .15rem; }
  .bd-chip, .ist-eingebettet .bd-chip { min-height: 34px; }
  .bd-halle, .ist-eingebettet .bd-halle { gap: .45rem; padding-top: .45rem; }
  .drucker__geraet { padding: .3rem .65rem .55rem; }
  .drucker__zeile { min-height: 1.45rem; }
  .papier__tisch-wort { font-size: 1.7em; }
  .papier__tisch-nr { font-size: 2.5em; }
  .bon__leiste { padding-top: .3rem; }
  .bon__knopf { --k-hoehe: 32px; }
}
