/* Laser-Studio (Editor) */
@font-face { font-family: "LS Poppins"; src: url("/assets/fonts/laser/Poppins-Regular.ttf"); font-display: swap; }
@font-face { font-family: "LS Poppins Bold"; src: url("/assets/fonts/laser/Poppins-Bold.ttf"); font-display: swap; }
@font-face { font-family: "LS Playfair"; src: url("/assets/fonts/laser/PlayfairDisplay-VF.ttf"); font-display: swap; }
@font-face { font-family: "LS Cinzel"; src: url("/assets/fonts/laser/Cinzel-VF.ttf"); font-display: swap; }
@font-face { font-family: "LS Great Vibes"; src: url("/assets/fonts/laser/GreatVibes-Regular.ttf"); font-display: swap; }
@font-face { font-family: "LS Pacifico"; src: url("/assets/fonts/laser/Pacifico-Regular.ttf"); font-display: swap; }
@font-face { font-family: "LS Caveat"; src: url("/assets/fonts/laser/Caveat-VF.ttf"); font-display: swap; }
@font-face { font-family: "LS Bebas"; src: url("/assets/fonts/laser/BebasNeue-Regular.ttf"); font-display: swap; }
@font-face { font-family: "LS Stencil"; src: url("/assets/fonts/laser/AllertaStencil-Regular.ttf"); font-display: swap; }
@font-face { font-family: "LS Space Mono"; src: url("/assets/fonts/laser/SpaceMono-Bold.ttf"); font-display: swap; }

.page-studio .hdr { position: relative; }
.ls { --c-bg: #0f0d0b; --c-ui: #1b1813; --c-ui-2: #25211b; --c-ui-3: #312c24; --c-tx: #ece6db; --c-mu: #9d9486; --c-ln: rgba(236, 230, 219, .1);
  display: grid; grid-template-columns: 56px minmax(0, 1fr) 300px; grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-areas: "top top top" "rail stage panel" "rail sheet panel" "status status status";
  height: calc(100svh - 71px); background: var(--c-bg); color: var(--c-tx); font-size: 14px; user-select: none; -webkit-user-select: none; }
.ls svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.ls__top { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--c-ui); border-bottom: 1px solid var(--c-ln); flex-wrap: wrap; }
.ls__grp { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.ls > * { min-width: 0; }
.ls__sep { width: 1px; height: 22px; background: var(--c-ln); margin: 0 4px; }
.ls__sel select, .pn input, .pn select, .pn textarea { font: inherit; color: var(--c-tx); background: var(--c-ui-2); border: 1px solid var(--c-ln); border-radius: 6px; height: 34px; padding: 0 10px; }
.ls__sel select { padding-right: 28px; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--c-mu) 50%), linear-gradient(135deg, var(--c-mu) 50%, transparent 50%); background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; max-width: 210px; }
.ls__sel--s select { max-width: 130px; }
.ls__sel--mat select { max-width: min(420px, 30vw); min-width: 200px; text-overflow: ellipsis; }
.ls__sel--mat { display: inline-flex; align-items: center; gap: 8px; }
.ls__swatch { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #d9c4a0 center / 180% auto; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 1px 4px rgba(0, 0, 0, .5); }
@media (max-width: 700px) { .ls__swatch { display: none; } }
.ls__sel select:disabled { opacity: .6; }
.ls__sel option:disabled { color: #7d756a; }
.ls input:focus, .ls select:focus, .ls textarea:focus { outline: none; border-color: var(--glow); box-shadow: 0 0 0 2px rgba(255, 90, 31, .25); }

.ib { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--c-tx, #ece6db); cursor: pointer; }
.ib:hover { background: var(--c-ui-3, #312c24); }
.ib:disabled { opacity: .35; cursor: default; background: transparent; }
.ls__zoom { min-width: 64px; height: 34px; border: 1px solid var(--c-ln); border-radius: 6px; background: var(--c-ui-2); color: var(--c-tx); font: 500 12.5px var(--f-mono); cursor: pointer; }
.tb { height: 34px; padding: 0 13px; border: 1px solid var(--c-ln); border-radius: 6px; background: var(--c-ui-2); color: var(--c-tx); font: 500 13.5px var(--f-text); cursor: pointer; white-space: nowrap; }
.tb:hover { border-color: var(--c-mu); }
.tb--glow { background: var(--glow); border-color: var(--glow); color: #fff; font-weight: 600; }
.tb--glow:hover { border-color: #fff; }
.tb--price { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); border-color: rgba(255, 90, 31, .5); color: var(--c-tx); }
.tb--price .mono { font-size: 10.5px; color: var(--c-mu); letter-spacing: .08em; }
.tb--price b { font-weight: 600; font-size: 13.5px; min-width: 3ch; text-align: right; }
.tb--price.is-off b { color: var(--glow-2); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

.ls__rail { grid-area: rail; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; background: var(--c-ui); border-right: 1px solid var(--c-ln); overflow-y: auto; }
.rail__fill { flex: 1 1 auto; }
.rail__sep { width: 26px; height: 1px; background: var(--c-ln); margin: 6px 0; flex: none; }
.tool { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--c-mu); cursor: pointer; position: relative; }
.tool:hover { color: var(--c-tx); background: var(--c-ui-2); }
.tool.is-on { color: #fff; background: var(--glow); }

.ls__stage { grid-area: stage; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 40%, #1d1a15, #0d0c0a 70%); touch-action: none; }
.ls__stage .canvas-container { position: absolute !important; inset: 0; }
.ls__stage.is-pan, .ls__stage.is-pan .upper-canvas { cursor: grab !important; }
.ls__stage.is-panning .upper-canvas { cursor: grabbing !important; }
.ls__drop { position: absolute; inset: 12px; border: 2px dashed var(--glow); border-radius: 12px; background: rgba(255, 90, 31, .12); display: none; place-items: center; font: 600 18px var(--f-display); color: #fff; pointer-events: none; }
.ls__stage.is-drop .ls__drop { display: grid; }

.ls__side { grid-area: panel; display: flex; flex-direction: column; min-height: 0; background: var(--c-ui); border-left: 1px solid var(--c-ln); }
.ls__panel { flex: 1 1 auto; min-height: 0; background: var(--c-ui); overflow-y: auto; user-select: text; -webkit-user-select: text; }

/* Akkordeon im rechten Menü: immer nur ein Bereich offen */
.ls__panel { flex: 1 1 0; }
.ls__side .pn[data-acc] { padding: 0; }
.ls__side .pn[data-acc] > .pn__h { cursor: pointer; margin: 0; padding: 13px 16px; }
.ls__side .pn[data-acc] > .pn__h:hover { color: var(--c-tx); }
.ls__side .pn__h:focus-visible { outline: 2px solid var(--glow); outline-offset: -2px; }
.ls__side .pn[data-acc] > .pn__h::after { content: ""; flex: none; width: 7px; height: 7px; margin-left: 10px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.ls__side .pn[data-acc].is-open > .pn__h::after { transform: rotate(45deg); }
.ls__side .pn[data-acc] > .pn__h { margin-left: 0; }
.ls__side .pn[data-acc] > .pn__h b { margin-left: auto; }
.pn__b { padding: 0 16px 14px; }
.pn__b[hidden] { display: none; }

/* Kosten – live berechnet */
.cost { flex: none; padding: 12px 16px 12px; border-top: 1px solid rgba(255, 90, 31, .35); background: linear-gradient(180deg, #221a14, #1b1813 70%); box-shadow: 0 -12px 24px -16px rgba(0, 0, 0, .8); max-height: 70%; overflow-y: auto; user-select: text; -webkit-user-select: text; }
html:has(body.page-studio) { overflow: hidden; }
.info__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; margin-top: 10px; }
.dlg--info .prose h3 { margin-top: 18px; }
.cost.is-flash { animation: cost-flash .9s var(--ease); }
@keyframes cost-flash { 0% { box-shadow: inset 0 0 0 2px var(--glow); } 100% { box-shadow: inset 0 0 0 2px transparent; } }
.cost__main { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.cost__tot { display: grid; gap: 2px; min-width: 0; }
.cost__lbl { margin: 0; display: flex; gap: 8px; align-items: center; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--c-mu); }
.cost__per { color: var(--c-mu); font-size: 11.5px; }
.cost__per:empty { display: none; }
.cost__q { display: grid; gap: 4px; justify-items: end; font-size: 11.5px; color: var(--c-mu); }
.cost__q[hidden] { display: none; }
.cost__q--ser b { font: 600 18px var(--f-mono); color: var(--c-tx); line-height: 1; }
.cost__q--ser small { font-size: 11px; }
.step { display: flex; align-items: stretch; height: 32px; border: 1px solid var(--c-ln); border-radius: 6px; overflow: hidden; background: var(--c-ui-2); }
.step button { width: 28px; border: 0; background: transparent; color: var(--c-tx); font: 500 16px var(--f-text); cursor: pointer; }
.step button:hover { background: var(--c-ui-3); }
.cost .step input { width: 48px; height: 100%; border: 0; border-radius: 0; text-align: center; padding: 0 2px; background: transparent; box-shadow: none; }
.cost__bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.cost__dl { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--c-mu); }
.cost .cost__dl select { width: auto; height: 28px; font-size: 12.5px; padding: 0 6px; }
.cost__more[hidden] { display: none; }
.cost__more { max-height: 38svh; overflow-y: auto; margin-top: 4px; }
.cost__ld { margin: 10px 0 0; font-size: 11px; color: var(--c-mu); line-height: 1.45; }
.cost__ld:empty { display: none; }
.cost__lbl b { font: 500 10px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--glow); padding: 2px 6px; border: 1px solid rgba(255, 90, 31, .45); border-radius: 999px; }
.cost__lbl b::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--glow); vertical-align: 1px; animation: cost-pulse 1.6s ease-in-out infinite; }
@keyframes cost-pulse { 50% { opacity: .25; } }
.cost__tg { border: 0; background: none; color: var(--c-mu); font: 500 12px var(--f-text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }
.cost__tg:hover { color: var(--c-tx); }
.cost__opts { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; }
.cost label.f { display: grid; gap: 4px; font-size: 11.5px; color: var(--c-mu); }
.cost input, .cost select { font: 13px var(--f-mono); color: var(--c-tx); background: var(--c-ui-2); border: 1px solid var(--c-ln); border-radius: 6px; height: 32px; padding: 0 8px; width: 100%; }
.cost select { font-family: var(--f-text); }
.cost .chk { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--c-tx); cursor: pointer; margin: 8px 0 2px; }
.cost .chk input { width: 15px; height: 15px; accent-color: var(--glow); }
.cost__tot strong { font: 700 22px var(--f-display); font-stretch: 110%; color: #fff; letter-spacing: -.01em; white-space: nowrap; }
.cost.is-off .cost__tot strong { color: var(--glow-2); font-size: 16px; text-transform: uppercase; letter-spacing: .04em; }
.cost__lines, .ord__lines { display: grid; grid-template-columns: 1fr auto; gap: 6px 0; margin: 10px 0 0; font-size: 12.5px; }
.cost__lines dt { color: var(--c-tx); }
.cost__lines dt small, .ord__lines dt small { display: block; color: var(--c-mu); font-size: 11px; line-height: 1.35; }
.cost__lines dd, .ord__lines dd { margin: 0; padding-left: 10px; font-family: var(--f-mono); font-size: 12px; text-align: right; white-space: nowrap; }
.cost__lines .neg, .ord__lines .neg { color: #7fd19b; }
.cost__lines .tot, .ord__lines .tot { padding-top: 6px; border-top: 1px solid var(--c-ln); font-weight: 700; }
.cost__msg { margin: 8px 0 0; color: var(--c-mu); font-size: 11.5px; line-height: 1.45; }
.cost__msg:empty { display: none; }
.pn { padding: 14px 16px; border-bottom: 1px solid var(--c-ln); }
.pn__h { font: 500 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--c-mu); margin: 0 0 12px; display: flex; justify-content: space-between; align-items: center; }
.pn__h b { color: var(--c-tx); font-weight: 500; letter-spacing: .04em; text-transform: none; font-family: var(--f-text); font-size: 13px; }
.pn__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pn__grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.pn label.f { display: grid; gap: 4px; font-size: 11.5px; color: var(--c-mu); }
.pn label.f input, .pn label.f select { width: 100%; font-family: var(--f-mono); font-size: 13px; }
.pn label.f--t input, .pn label.f--t select { font-family: var(--f-text); }
.pn textarea { width: 100%; height: auto; min-height: 64px; padding: 8px 10px; resize: vertical; font-size: 15px; line-height: 1.4; }
.pn .row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pn .row + .row, .pn .pn__grid + .row, .pn .row + .pn__grid, .pn .pn__grid + .pn__grid { margin-top: 8px; }
.pn input[type=range] { width: 100%; height: 24px; padding: 0; background: transparent; border: 0; accent-color: var(--glow); box-shadow: none; }
.pn .chk { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--c-tx); cursor: pointer; }
.pn .chk input { width: 16px; height: 16px; accent-color: var(--glow); }
.pn p { color: var(--c-mu); font-size: 13px; margin: 0; line-height: 1.5; }

.ops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.op { display: grid; gap: 6px; justify-items: center; padding: 10px 4px 8px; border: 1px solid var(--c-ln); border-radius: 8px; background: var(--c-ui-2); color: var(--c-tx); font: 500 11.5px/1.2 var(--f-text); cursor: pointer; text-align: center; }
.op:hover { border-color: var(--c-mu); }
.op.is-on { border-color: var(--glow); box-shadow: inset 0 0 0 1px var(--glow); background: #2c211a; }
.op i { width: 28px; height: 18px; border-radius: 3px; }
.op--fill i { background: #000; outline: 1px solid #555; }
.op--score i { border: 2px solid #3b6bff; }
.op--cut i { border: 2px solid #ff2a2a; }
.op:disabled { opacity: .4; cursor: default; }

.fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 220px; overflow-y: auto; padding-right: 2px; }
.font { height: 42px; border: 1px solid var(--c-ln); border-radius: 6px; background: var(--c-ui-2); color: var(--c-tx); font-size: 19px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; line-height: 1; }
.font:hover { border-color: var(--c-mu); }
.font.is-on { border-color: var(--glow); box-shadow: inset 0 0 0 1px var(--glow); }

.btns { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.btns .ib { width: 100%; background: var(--c-ui-2); border: 1px solid var(--c-ln); }
.btns .ib:hover { border-color: var(--c-mu); }
.seg { display: flex; border: 1px solid var(--c-ln); border-radius: 6px; overflow: hidden; }
.seg button { flex: 1; height: 32px; border: 0; background: var(--c-ui-2); color: var(--c-mu); font: 500 12.5px var(--f-text); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--c-ln); }
.seg button.is-on { background: var(--c-ui-3); color: #fff; }
.wide { width: 100%; justify-content: center; }
.btn-d { height: 34px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--c-ln); background: var(--c-ui-2); color: var(--c-tx); font: 500 13px var(--f-text); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.btn-d:hover { border-color: var(--c-mu); }
.btn-d--danger:hover { border-color: #ff6a5a; color: #ff8a7a; }

.layers { display: grid; gap: 2px; max-height: 240px; overflow-y: auto; }
.layer { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; border: 0; background: transparent; color: var(--c-tx); text-align: left; }
.layer:hover { background: var(--c-ui-2); }
.layer.is-on { background: var(--c-ui-3); }
.layer i { width: 12px; height: 12px; border-radius: 3px; }
.layer small { color: var(--c-mu); font-family: var(--f-mono); font-size: 11px; }
.layer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; margin: 0; font-size: 13px; }
.stats dt { color: var(--c-mu); }
.stats dd { margin: 0; font-family: var(--f-mono); font-size: 12.5px; text-align: right; }

.ls__status { grid-area: status; display: flex; gap: 18px; align-items: center; padding: 0 14px; height: 30px; background: var(--c-ui); border-top: 1px solid var(--c-ln); color: var(--c-mu); font-size: 12px; overflow: hidden; white-space: nowrap; }
.ls__status [data-status-hint] { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.ls__legend { display: flex; gap: 6px; align-items: center; }
.lg { display: inline-block; width: 14px; height: 3px; margin-left: 8px; }
.lg--fill { background: #000; outline: 1px solid #666; }
.lg--score { background: #3b6bff; }
.lg--cut { background: #ff2a2a; }

/* Dialoge */
.dlg { border: 0; padding: 0; border-radius: 14px; background: #fbf8f2; color: var(--ink); width: min(560px, calc(100vw - 24px)); max-height: calc(100svh - 24px); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .6); }
.dlg--wide { width: min(1080px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(10, 9, 7, .7); backdrop-filter: blur(3px); }
.dlg__in { padding: 22px 26px 26px; }
.dlg__hd { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.dlg__hd h2 { font-size: 24px; font-stretch: 112%; }
.dlg .ib { color: var(--ink); }
.dlg .ib:hover { background: var(--paper-2); }
.dlg .ib svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dlg__p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.dlg__note { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.pv { background: #2a2620; border-radius: 10px; padding: 24px; display: grid; place-items: center; max-height: 64svh; overflow: auto; }
.pv img { max-width: 100%; max-height: 58svh; box-shadow: 0 20px 50px -20px #000; border-radius: 2px; }

.ord { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 26px; margin-top: 14px; }
.ord__pv img { width: 100%; max-height: 52svh; object-fit: contain; background: #2a2620; border-radius: 10px; padding: 14px; }
.ord__stats { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 16px 0 0; font-size: 14px; }
.ord__stats dt { color: var(--muted); }
.ord__stats dd { margin: 0; font-family: var(--f-mono); font-size: 13px; text-align: right; }
.ord__warn { margin-top: 14px; display: grid; gap: 6px; }
.ord__price { margin-top: 16px; padding: 14px 16px; border-radius: 10px; background: var(--paper-2); }
.ord__price:empty { display: none; }
.ord__price-h { display: flex; justify-content: space-between; align-items: baseline; margin: 0; font: 700 16px var(--f-display); font-stretch: 110%; }
.ord__price-h span { font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--glow); }
.ord__lines { font-size: 13.5px; --c-ln: var(--line); }
.ord__lines dt small { color: var(--muted); font-size: 12px; }
.ord__lines dd { font-size: 13px; }
.ord__lines .neg { color: var(--ok); }
.ord__lines .tot { font-size: 15px; border-top-color: var(--line); }
.ord__price-n { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.ord .fld select { width: 100%; }
.ord__warn li { font-size: 13.5px; color: #8a3b12; background: #fde7d9; padding: 8px 10px; border-radius: 6px; }
.ord__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ord__row--2 { grid-template-columns: 1fr 1fr; }
.ord__row--1 { grid-template-columns: 1fr; }
.ord .fld { margin-bottom: 10px; }
.ord .fld input, .ord .fld select, .ord .fld textarea { min-height: 42px; padding: 9px 12px; font-size: 15px; }
.ord .check { margin: 6px 0 16px; font-size: 13.5px; }
.ord__foot { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.ord__done { text-align: center; padding: 30px 10px; }
.ord__done h3 { font-size: 30px; margin: 10px 0 12px; }
.ord__done .mono { font-size: 15px; background: var(--paper-2); padding: 4px 10px; border-radius: 6px; }

.studio-info { background: var(--paper); }

@media (min-width: 821px) { .page-studio .ftr { display: none; } .page-studio { overflow: hidden; } }
@media (max-width: 1100px) { .ls { grid-template-columns: 52px minmax(0, 1fr) 260px; } }
@media (max-width: 820px) {
  html:has(body.page-studio) { overflow: auto; }
  .info__grid { grid-template-columns: 1fr; }
  .ls__rail .rail__fill { flex: 1 1 auto; }
  .ls { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(340px, 1fr) auto auto; grid-template-areas: "top" "rail" "stage" "sheet" "panel"; height: auto; min-height: 0; }
  .ls__stage { height: 62svh; }
  .ls__rail { flex-direction: row; justify-content: flex-start; overflow-x: auto; padding: 6px 8px; border-right: 0; border-bottom: 1px solid var(--c-ln); }
  .rail__sep { width: 1px; height: 26px; margin: 0 4px; }
  .ls__side { border-left: 0; }
  .ls__panel { max-height: none; }
  .cost { max-height: none; }
  .ls__status { display: none; }
  .ls__grp--end { width: 100%; justify-content: flex-start; }
  .tb { padding: 0 10px; }
  .ls__grp--mid { margin-left: auto; }
  .ord { grid-template-columns: 1fr; }
  .ord__row { grid-template-columns: 1fr 1fr; }
}

/* Bestellung: Schritte, Bezahlung, Lager */
.dlg__hd .steps { display: flex; gap: 6px; margin: 0 auto 0 18px; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: var(--paper-2); }
.steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; font: 600 12px var(--f-mono); }
.steps li.is-on { background: var(--ink); color: var(--paper); }
.steps li.is-on span { background: var(--glow); color: #fff; }
.steps li.is-done span { background: var(--ok); color: #fff; }
.ord[hidden] { display: none; }
.ord--pay { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
.ord__lead { color: var(--muted); font-size: 14.5px; margin: 0 0 14px; }
.ord__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ord__acts .btn { min-height: 42px; font-size: 14.5px; }
.ord__acts .btn[hidden] { display: none; }
.ord__side .inq__msg { margin: 10px 0 0; font-size: 14px; }
.ord__side .inq__msg:empty { display: none; }
.ord__lines--sum { margin: 18px 0 0; padding: 12px 14px; background: var(--paper-2); border-radius: 10px; }
.ord__lines--sum:empty { display: none; }
.ord__foot--pay { margin-top: 18px; justify-content: space-between; }
.ord__stock { margin: 10px 0 0; font-size: 12.5px; line-height: 1.4; }
.ord__stock.is-ok { color: var(--ok); }
.ord__stock.is-err { color: var(--err); font-weight: 600; }
.ord__stock small { color: var(--muted); }
.ord .addr .fld { margin-bottom: 10px; }
@media (max-width: 820px) { .dlg__hd { flex-wrap: wrap; } .dlg__hd .steps { order: 3; margin: 6px 0 0; width: 100%; } .ord--pay { grid-template-columns: 1fr; } }

.dlg.dlg--info { width: min(1080px, calc(100vw - 24px)); }

/* Express */
.fld--exp > span { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.exp { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.exp__chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; }
.exp__chk input { width: 18px; height: 18px; accent-color: var(--glow); }
.exp__i { width: 26px; height: 26px; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.exp__i:hover, .exp__i[aria-expanded="true"] { color: var(--glow); }
.exp__i svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.exp__tip { margin: -2px 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--paper-2); font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.exp__tip[hidden] { display: none; }

/* Kennzahlen/Preis vom Server: dezent abblenden, solange eine neue Berechnung läuft */
.pn__h small { font-weight: 400; opacity: .6; text-transform: none; letter-spacing: 0; }
.cost.is-busy [data-cost-big], .cost.is-busy [data-cost-lines], .cost.is-busy [data-cost-per] { opacity: .55; transition: opacity .2s; }

/* E-Mail-Bestätigung im Auftragsformular: Feld und Button gleich hoch, bündig */
.ord .vrf { margin: 2px 0 12px; }
.ord .vrf .fld { margin-bottom: 0; }
.ord .vrf .fld input { height: 46px; min-height: 46px; padding: 0 12px; font-size: 16px; }
.ord .vrf__send { height: 46px; min-height: 46px; padding: 0 18px; font-size: 14.5px; }

/* Preis-Status: grün = für die aktuelle Skizze vom Server berechnet, grau = (noch) nicht */
.cost.is-price-ok .cost__tot strong, .ord__price.is-price-ok .ord__lines .tot dd { color: #7fd19b; }
.tb--price.is-price-ok { color: #7fd19b; border-color: rgba(127, 209, 155, .5); }
.cost.is-price-off .cost__tot strong, .cost.is-price-off .cost__lines, .ord__price.is-price-off .ord__lines, .tb--price.is-price-off { color: #7c7770; opacity: .6; filter: grayscale(1); }
.cost.is-price-off .cost__tot strong { font-size: 22px; text-transform: none; letter-spacing: -.01em; }
.cost.is-price-off.is-off .cost__tot strong { font-size: 16px; }
button[type=submit]:disabled { opacity: .45; cursor: not-allowed; }

/* «LIVE»-Tag nur, wenn der Preis für die aktuelle Skizze wirklich berechnet ist */
.cost:not(.is-price-ok) .cost__lbl b { display: none; }
.cost.is-price-ok .cost__lbl b { color: #7fd19b; border-color: rgba(127, 209, 155, .5); }
.cost.is-price-ok .cost__lbl b::before { background: #7fd19b; }

/* Hinweis «Besser am PC» (Smartphone) */
.dlg--mobile { width: min(480px, calc(100vw - 24px)); }
.dlg__mact { display: flex; justify-content: flex-end; margin-top: 4px; }
.dlg--mobile .dlg__mact .btn { width: 100%; justify-content: center; }

/* Rückfrage «SVG grösser als die Platte» */
.dlg--fit { width: min(520px, calc(100vw - 24px)); border-top: 5px solid #e0662b; }
.dlg--fit .dlg__hd h2 { font-size: 22px; }
.fit__opts { display: grid; gap: 10px; margin: 4px 0 18px; }
.fit__opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line, #d9d2c4); border-radius: 10px; cursor: pointer; }
.fit__opt:has(input:checked) { border-color: #e0662b; background: rgba(224, 102, 43, .07); }
.fit__opt input { margin-top: 4px; accent-color: #e0662b; }
.fit__opt span { display: grid; gap: 2px; }
.fit__opt small { color: var(--muted); font-size: 13px; }
.dlg__mact--2 { gap: 10px; }

/* Ideen & Produkte, Serie, Produkt-Texte, Vorlagen-Modus */
a.tb { display: inline-flex; align-items: center; text-decoration: none; }
.tb--ideas { border-color: rgba(255, 90, 31, .45); }
.tb--ideas:hover { border-color: var(--glow); color: #fff; }
@media (max-width: 1180px) { .tb__sub { display: none; } }
.ls__empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, 86%); padding: 22px 24px; border-radius: 14px; background: rgba(22, 19, 15, .86); border: 1px solid var(--c-ln); text-align: center; color: var(--c-tx); box-shadow: 0 24px 60px -20px #000; pointer-events: none; }
.ls__empty[hidden] { display: none; }
.ls__empty p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--c-mu); }
.ls__empty strong { display: block; margin-bottom: 6px; font: 600 17px var(--f-display); color: #fff; }
.ls__empty a { pointer-events: auto; }
.pn--prod, .pn--edit { border-color: rgba(255, 90, 31, .45); }
.pn--prod .pn__h b, .pn--edit .pn__h b { color: var(--glow-2); text-transform: none; letter-spacing: 0; }
.prod__lead { margin: 0 0 10px; font-size: 12.5px; color: var(--c-mu); }
.prod__lead a { color: var(--glow-2); }
.prod__f { margin-top: 8px; }
.prod__f small { color: var(--c-mu); font-weight: 400; }
.prod__f textarea, .pn--series textarea { width: 100%; resize: vertical; }
.ser__n { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; background: var(--glow); color: #fff; font: 600 11px var(--f-mono); }
.ser__hint { margin: 6px 0 0; font-size: 11.5px; color: var(--c-mu); }
.pn--edit .ser__info { color: var(--c-mu); }
.btn-d:disabled { opacity: .45; cursor: not-allowed; }
.dlg.is-tall .pv img { max-height: none; width: min(100%, 720px); }
.btn-d--glow { background: var(--glow); border-color: var(--glow); color: #fff; justify-content: center; font-weight: 600; }
.pn--series .seg button { height: 30px; }
.prod__name { margin: 0 0 4px; font: 600 15px var(--f-display); color: #fff; }

/* Modus Einzelstück / Serie */
.ls__mode { display: inline-flex; margin-left: 6px; padding: 3px; gap: 2px; border: 1px solid var(--c-ln); border-radius: 8px; background: var(--c-ui-2); }
.ls__mode button { height: 28px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: var(--c-mu); font: 500 13px var(--f-text); cursor: pointer; white-space: nowrap; }
.ls__mode button:hover { color: var(--c-tx); }
.ls__mode button.is-on { background: var(--c-ui-3); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.ls__mode button[data-mode="series"].is-on { background: #1f3a2a; color: #9be3b4; }
.ls__mode-sub { color: inherit; opacity: .65; }
@media (max-width: 1600px) { .ls__mode-sub { display: none; } }
.ls__grp--mid { flex-wrap: nowrap; }
@media (max-width: 1440px) { .ls__top { gap: 6px; } .tb { padding: 0 10px; } }
@media (max-width: 1300px) { .ls__grp--mid .ls__sep { display: none; } .ls__swatch { width: 26px; height: 26px; } }

/* Serie: rechtes Panel */
.pn--series .pn__h b, .pn--ph .pn__h b { color: #7fd19b; }
.ser__lead { margin: 0 0 6px; font-size: 12.5px; }
.ser__lbl { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; font-size: 12.5px; font-weight: 600; color: var(--c-tx); letter-spacing: .02em; }
.ser__st { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--c-mu); color: var(--c-mu); font: 600 11px var(--f-mono); font-style: normal; }
.ser__lbl.is-done .ser__st { border-color: #7fd19b; background: #7fd19b; color: #10251a; }
.ser__phs { display: grid; gap: 6px; }
.ser__ph { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 8px; align-items: center; padding: 8px 10px; border: 1px dashed rgba(255, 90, 31, .7); border-radius: 8px; background: rgba(255, 90, 31, .06); color: var(--c-tx); font: 500 13px var(--f-text); text-align: left; cursor: pointer; }
.ser__ph:hover { background: rgba(255, 90, 31, .13); }
.ser__ph .ser__n { grid-row: span 2; margin: 0; }
.ser__ph small { color: var(--c-mu); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ser__cand { display: grid; gap: 6px; margin-top: 8px; }
.ser__cand .btn-d { justify-content: flex-start; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; }
.ser__info { margin: 12px 0 10px; font-size: 12.5px; color: #7fd19b; min-height: 1em; }
.ser__info.is-err { color: #ff8a7a; }
.pn--ph .btn-d { margin-top: 8px; }
.pn--ph label.f { margin-top: 8px; }
.pn--ph label.f input { font-family: var(--f-text); }
.ph__w { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: end; }
.ph__w .btn-d { margin: 0; height: 34px; font-size: 12px; }

/* Serie: Stück blättern (über der Arbeitsfläche) */
.ser-pg { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(22, 19, 15, .9); border: 1px solid rgba(127, 209, 155, .45); box-shadow: 0 8px 24px -10px #000; }
.ser-pg[hidden] { display: none; }
.ser-pg .ib { width: 30px; height: 30px; border-radius: 50%; }
.ser-pg span { min-width: 150px; max-width: 320px; padding: 0 6px; text-align: center; font-size: 13px; color: var(--c-tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ser-pg span b { color: #9be3b4; font-weight: 600; }

/* Serie: Liste unter der Arbeitsfläche */
.ls__sheet { grid-area: sheet; display: flex; flex-direction: column; min-height: 0; max-height: clamp(130px, 28svh, 300px); background: var(--c-ui); border-top: 1px solid rgba(127, 209, 155, .35); user-select: text; -webkit-user-select: text; }
.ls__sheet[hidden] { display: none; }
.sh__hd { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-bottom: 1px solid var(--c-ln); flex-wrap: wrap; }
.sh__tg { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--c-tx); font: 500 13px var(--f-text); cursor: pointer; }
.sh__tg:hover { background: var(--c-ui-2); }
.sh__tg::before { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); margin-top: -4px; transition: transform .15s; }
.ls__sheet.is-min .sh__tg::before { transform: rotate(-135deg); margin-top: 3px; }
.sh__tg span { color: #7fd19b; font-family: var(--f-mono); font-size: 12px; }
.sh__hint { color: var(--c-mu); font-size: 12px; }
.sh__sp { flex: 1; }
.sh__hd .btn-d { height: 28px; font-size: 12.5px; }
.sh__file { cursor: pointer; }
.ls__sheet.is-min .sh__body, .ls__sheet.is-min .sh__hd > :not(.sh__tg):not(.sh__sp) { display: none; }
.sh__body { overflow: auto; min-height: 0; flex: 1 1 auto; }
.sh__t { border-collapse: collapse; width: 100%; font-size: 13px; }
.sh__t th { position: sticky; top: 0; z-index: 1; background: var(--c-ui); padding: 6px 4px 4px; text-align: left; font-weight: 500; }
.sh__t th:first-child, .sh__t td:first-child { width: 42px; text-align: right; padding-right: 8px; color: var(--c-mu); font: 12px var(--f-mono); }
.sh__t th:last-child, .sh__t td:last-child { width: 34px; }
.sh__t td { padding: 2px 4px; border-top: 1px solid var(--c-ln); }
.sh__t td:first-child { cursor: pointer; }
.sh__t input { width: 100%; height: 30px; padding: 0 8px; font: inherit; color: var(--c-tx); background: transparent; border: 1px solid transparent; border-radius: 5px; }
.sh__t input:hover { border-color: var(--c-ln); }
.sh__t input:focus { background: var(--c-ui-2); }
.sh__th { display: flex; align-items: center; gap: 6px; }
.sh__th .ser__n { margin: 0; flex: none; }
.sh__t th input { font-weight: 600; color: #ffb08a; border: 1px dashed rgba(255, 90, 31, .55); background: rgba(255, 90, 31, .06); }
.sh__t tr.is-on td { background: rgba(127, 209, 155, .08); }
.sh__t tr.is-on td:first-child { color: #9be3b4; box-shadow: inset 3px 0 0 #7fd19b; }
.sh__t tr.sh__new td:first-child { color: #6f675c; }
.sh__t tr.sh__new input::placeholder { color: #6f675c; }
.sh__del { width: 26px; height: 26px; border: 0; border-radius: 5px; background: transparent; color: var(--c-mu); cursor: pointer; font-size: 16px; line-height: 1; }
.sh__del:hover { background: var(--c-ui-3); color: #ff8a7a; }
.sh__empty { padding: 16px 18px; color: var(--c-mu); font-size: 13px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.sh__empty strong { color: var(--c-tx); }
@media (max-width: 820px) { .ls__sheet { max-height: none; } .sh__hint { display: none; } }

/* Bearbeitungsarten mit Symbol */
.op .opi { width: 32px; height: 22px; }
.op__d { margin-top: 8px !important; font-size: 12px !important; }
.op i { display: none; }

/* Werkzeugleiste: Bearbeitung neuer Elemente */
.defop { position: relative; }
.tool--defop { flex-direction: column; gap: 0; height: 46px; display: flex; align-items: center; justify-content: center; }
.tool--defop .opi { width: 26px; height: 18px; }
.tool--defop small { font: 500 9px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c-mu); line-height: 1; margin-top: 2px; }
.defop__fly { position: fixed; z-index: 30; left: 64px; top: 200px; width: 300px; padding: 10px; background: var(--c-ui); border: 1px solid var(--c-ln); border-radius: 10px; box-shadow: 0 20px 50px -14px #000; }
.defop__fly[hidden] { display: none; }
.defop__h { margin: 2px 4px 8px; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--c-mu); }
.defop__o { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; width: 100%; padding: 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--c-tx); text-align: left; cursor: pointer; }
.defop__o:hover { background: var(--c-ui-2); }
.defop__o.is-on { border-color: var(--glow); background: #2c211a; }
.defop__o .opi { width: 32px; height: 22px; }
.defop__o b { display: block; font: 600 13px var(--f-text); }
.defop__o small { display: block; color: var(--c-mu); font-size: 11.5px; line-height: 1.4; }
.defop__n { margin: 8px 4px 2px; font-size: 11.5px; color: var(--c-mu); line-height: 1.4; }
@media (max-height: 820px) { .ls__rail { gap: 2px; padding: 6px 0; } .tool { width: 38px; height: 34px; } .tool--defop { height: 40px; } .rail__sep { margin: 3px 0; } }
@media (max-height: 760px) { .tool { height: 31px; } .tool svg { width: 18px; height: 18px; } .tool--defop { height: 36px; } .rail__sep { margin: 2px 0; } }

/* Geführter Start */
.ls__empty { width: min(640px, 92%); padding: 24px 26px 20px; }
.emp__h { margin: 0 0 16px !important; }
.emp__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.emp__t { pointer-events: auto; display: grid; justify-items: center; gap: 6px; padding: 18px 10px 16px; border: 1px solid var(--c-ln); border-radius: 12px; background: var(--c-ui-2); color: var(--c-tx); cursor: pointer; text-align: center; transition: border-color .15s, transform .15s, background .15s; }
.emp__t:hover { border-color: var(--glow); background: #2c211a; transform: translateY(-2px); }
.emp__t svg { width: 30px; height: 30px; color: var(--glow-2, #ff8a5a); stroke-width: 1.6; }
.emp__t b { font: 600 14.5px var(--f-display); color: #fff; }
.emp__t small { color: var(--c-mu); font-size: 12px; line-height: 1.35; }
.emp__more { margin: 14px 0 0 !important; font-size: 12.5px !important; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: center; }
.emp__more button { pointer-events: auto; border: 0; background: none; padding: 0; color: var(--glow-2, #ff8a5a); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.emp__mat { margin: 8px 0 0 !important; font-size: 11.5px !important; }
.emp__mat b { color: var(--c-tx); font-weight: 500; }
@media (max-width: 820px) { .emp__tiles { grid-template-columns: 1fr; } }

/* Prüfung (Kopfleiste) */
.chk-wrap { position: relative; display: inline-flex; }
.tb--chk { display: inline-flex; align-items: center; gap: 6px; }
.tb--chk [data-check-ic] { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--c-ui-3); font: 700 11px var(--f-text); }
.tb--chk.is-ok [data-check-ic] { background: #2e5a3e; color: #b9f0cb; }
.tb--chk.is-warn { border-color: rgba(255, 170, 60, .6); color: #ffd29a; }
.tb--chk.is-warn [data-check-ic] { background: #ff9f2e; color: #241405; }
.chk__pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(400px, 90vw); max-height: 60svh; overflow-y: auto; padding: 12px; background: var(--c-ui); border: 1px solid var(--c-ln); border-radius: 10px; box-shadow: 0 20px 50px -14px #000; user-select: text; }
.chk__pop[hidden] { display: none; }
.chk__h { margin: 0 0 8px; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--c-mu); }
.chk__l { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.chk__i { display: grid; grid-template-columns: 20px 1fr; gap: 8px; padding: 8px; border-radius: 8px; background: var(--c-ui-2); }
.chk__i > i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--f-text); font-style: normal; background: var(--c-ui-3); color: var(--c-tx); }
.chk__i.is-warn > i { background: #ff9f2e; color: #241405; }
.chk__m { display: block; width: 100%; border: 0; padding: 0; background: none; color: var(--c-tx); font: 13px/1.45 var(--f-text); text-align: left; cursor: pointer; }
.chk__m:disabled { cursor: default; }
.chk__m:not(:disabled):hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.chk__fix { margin-top: 6px; height: 28px; font-size: 12.5px; }
.chk__ok { margin: 4px 0; color: #9be3b4; font-size: 13px; }

/* Vorlagen-Dialog */
.pk__bar { display: grid; gap: 10px; margin-bottom: 14px; }
.pk__bar input { width: 100%; min-height: 42px; padding: 9px 12px; font-size: 15px; border: 1px solid var(--line, #d9d2c4); border-radius: 8px; background: #fff; }
.pk__cats { display: flex; gap: 6px; flex-wrap: wrap; }
.pk__cat { border: 1px solid var(--line, #d9d2c4); background: #fff; border-radius: 999px; padding: 5px 12px; font: 500 13px var(--f-text); cursor: pointer; color: var(--ink); }
.pk__cat.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pk__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; max-height: 56svh; overflow-y: auto; padding: 2px; }
.pk__c { display: grid; gap: 4px; align-content: start; padding: 0 0 12px; border: 1px solid var(--line, #d9d2c4); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; overflow: hidden; transition: border-color .15s, transform .15s; }
.pk__c:hover { border-color: var(--glow); transform: translateY(-2px); }
.pk__c img, .pk__noimg { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper-2); }
.pk__c b { padding: 6px 12px 0; font: 600 14px var(--f-display); color: var(--ink); }
.pk__c small { padding: 0 12px; color: var(--muted); font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pk__msg { color: var(--muted); padding: 20px 4px; }

/* Zuschnitt-Dialog */
.dlg--cut { width: min(560px, calc(100vw - 24px)); }
.cut__shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.cut__sh { display: grid; justify-items: center; gap: 6px; padding: 10px 6px 8px; border: 1.5px solid var(--line, #d9d2c4); border-radius: 10px; cursor: pointer; font-size: 13px; }
.cut__sh input { position: absolute; opacity: 0; pointer-events: none; }
.cut__sh svg { width: 44px; height: 30px; fill: none; stroke: #e0372b; stroke-width: 1.8; }
.cut__sh:has(input:checked) { border-color: var(--glow); background: rgba(255, 90, 31, .07); font-weight: 600; }
.cut__sh:has(input:focus-visible) { outline: 2px solid var(--glow); outline-offset: 2px; }
.cut__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cut__grid[hidden], .cut__grid .fld[hidden] { display: none; }
.dlg--cut .fld input, .dlg--cut .fld select { min-height: 40px; padding: 8px 10px; font-size: 15px; width: 100%; }
.cut__fit { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0 12px; font-size: 13px; color: var(--muted); }
.cut__fit .btn { min-height: 36px; font-size: 13.5px; }
.cut__fit .btn[hidden] { display: none; }
.cut__hole { border: 0; padding: 10px 0 0; margin: 0; border-top: 1px solid var(--line, #e6dfd2); }
.cut__hole .check { margin: 0 0 10px; }
.cut__msg { min-height: 1.2em; margin: 6px 0 10px; font-size: 13px; color: var(--muted); }
.cut__msg.is-err { color: var(--err); }
.dlg__mact .btn[hidden] { display: none; }

/* Auftrag: Fehler am Feld, Bestätigung am Schluss, Übersicht, Abschluss */
.fld.is-err input, .fld.is-err select, .fld.is-err textarea { border-color: var(--err, #c0392b) !important; box-shadow: 0 0 0 3px rgba(192, 57, 43, .12); }
.fld__err { display: block; margin-top: 4px; color: var(--err, #c0392b); font-size: 12.5px; font-weight: 500; }
.check.is-err { color: var(--err, #c0392b); }
.ord .vrf.is-now { border-color: var(--glow); box-shadow: 0 0 0 3px rgba(255, 90, 31, .15); }
.ord__warn li.is-info { color: var(--muted); background: var(--paper-2); }
.ord--sum { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.ord__h { font-size: 18px; margin: 0 0 6px; }
.ord__who { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 16px 0; padding: 14px 16px; border: 1px solid var(--line, #e6dfd2); border-radius: 10px; font-size: 14px; }
.ord__who p { margin: 0; }
.ord__wh { font: 500 11px var(--f-mono) !important; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px !important; }
.ord__msgv { grid-column: 1 / -1; }
.ord--sum .pay__notice { margin: 0 0 4px; }
.ord--done { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.ord--done.is-paid { grid-template-columns: 1fr; }
.ord--done .ord__done { text-align: left; padding: 10px 0; }
.ord--done.is-paid .ord__done { text-align: center; }
.ord--done .ord__done h3 { margin: 6px 0 8px; }
.ord--done .ord__acts { margin: 14px 0 4px; }
.ord--done.is-paid .ord__acts, .ord--done.is-paid .done__next { justify-content: center; }
.done__next { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line, #e6dfd2); }
.done__next .ord__wh { width: 100%; margin: 0 !important; }
.prod__acts { display: grid; gap: 6px; margin-top: 12px; }
.prod__acts .btn-d { justify-content: center; font-size: 12.5px; }
@media (max-width: 820px) { .ord--sum, .ord--done { grid-template-columns: 1fr; } .ord__who { grid-template-columns: 1fr; } .cut__grid { grid-template-columns: 1fr 1fr; } }
.lnk { border: 0; background: none; padding: 0; color: var(--glow-2, #ff8a5a); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Runde 4: Material-Auswahl, Menü «Entwurf», Kontextmenü, Elemente-Liste, Text direkt, Vorschau ---- */
.matp { position: relative; }
.matp__btn { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px 0 5px; border: 1px solid var(--c-ln); border-radius: 999px; background: var(--c-ui-2); color: var(--c-tx); cursor: pointer; max-width: 300px; text-align: left; }
.matp__btn:hover { border-color: var(--c-mu); }
.matp__btn:disabled { opacity: .6; cursor: default; }
.matp__btn .ls__swatch { width: 30px; height: 30px; }
.matp__t { display: grid; min-width: 0; line-height: 1.15; }
.matp__t b { font: 600 13.5px var(--f-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.matp__t small { font: 11px var(--f-mono); color: var(--c-mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; opacity: .7; }
.matp__pop { position: absolute; left: 0; top: calc(100% + 8px); z-index: 40; width: min(440px, 92vw); max-height: min(70svh, 560px); overflow-y: auto; padding: 8px; background: var(--c-ui); border: 1px solid var(--c-ln); border-radius: 12px; box-shadow: 0 24px 60px -16px #000; }
.matp__pop[hidden] { display: none; }
.matp__h { margin: 4px 8px 8px; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--c-mu); }
.matp__h small { display: block; letter-spacing: 0; text-transform: none; font: 12px var(--f-text); margin-top: 2px; }
.matp__o { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 7px 8px; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--c-tx); text-align: left; cursor: pointer; }
.matp__o:hover:not(:disabled) { background: var(--c-ui-2); }
.matp__o.is-on { border-color: var(--glow); background: #2c211a; }
.matp__o:disabled { opacity: .45; cursor: not-allowed; }
.matp__sw { width: 44px; height: 32px; border-radius: 6px; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.matp__ot b { display: block; font: 600 13.5px var(--f-text); }
.matp__ot small { color: var(--c-mu); font: 11.5px var(--f-mono); }
.matp__o em { font-style: normal; font-size: 11.5px; color: #9be3b4; white-space: nowrap; }
.matp__o em.is-low { color: #ffcf8a; }
.matp__o em.is-out { color: var(--c-mu); }
@media (max-width: 1300px) { .matp__btn { max-width: 220px; } }

.menu-wrap { position: relative; display: inline-flex; }
.tb--menu { display: inline-flex; align-items: center; gap: 4px; }
.menu, .ctx { z-index: 45; min-width: 240px; padding: 6px; background: var(--c-ui); border: 1px solid var(--c-ln); border-radius: 10px; box-shadow: 0 24px 60px -16px #000; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); }
.ctx { position: fixed; left: 0; top: 0; min-width: 230px; }
.menu[hidden], .ctx[hidden] { display: none; }
.menu hr, .ctx hr { border: 0; border-top: 1px solid var(--c-ln); margin: 5px 4px; }
.menu button, .ctx button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: var(--c-tx); font: 13.5px var(--f-text); text-align: left; cursor: pointer; }
.menu button { flex-direction: column; align-items: flex-start; gap: 1px; }
.menu button small { color: var(--c-mu); font-size: 11.5px; }
.menu button:hover, .ctx button:hover { background: var(--c-ui-2); }
.ctx button span { flex: 1; }
.ctx button kbd { font: 11px var(--f-mono); color: var(--c-mu); }
.ctx button .opi { width: 24px; height: 16px; flex: none; }
.ctx button.is-on { color: #fff; font-weight: 600; }
.ctx button.is-on::after { content: '✓'; color: var(--glow-2, #ff8a5a); }
.ctx button.is-danger { color: #ff9a8a; }

.layer { grid-template-columns: 14px 1fr auto 24px 24px; gap: 6px; padding: 3px 4px 3px 8px; cursor: grab; }
.layer__n { border: 0; background: none; color: inherit; font: inherit; text-align: left; padding: 4px 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.layer__b { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 5px; background: none; color: var(--c-mu); cursor: pointer; opacity: .35; }
.layer:hover .layer__b, .layer__b.is-act { opacity: 1; }
.layer__b:hover { background: var(--c-ui-3); color: var(--c-tx); }
.layer__b.is-act { color: var(--glow-2, #ff8a5a); }
.layer__b svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.layer.is-hid .layer__n, .layer.is-hid small { opacity: .45; text-decoration: line-through; }
.layer.is-drag { opacity: .4; }
.layer.is-dropa { box-shadow: inset 0 2px 0 var(--glow); }
.layer.is-dropb { box-shadow: inset 0 -2px 0 var(--glow); }

.font { height: 50px; display: grid; align-content: center; gap: 3px; text-align: center; }
.font span { font-size: 18px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.font small { font: 10px var(--f-text); color: var(--c-mu); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arc__l { display: flex; justify-content: space-between; }
.arc__l b { font: 500 12px var(--f-mono); color: var(--c-tx); }
.arc__h { margin-top: 4px !important; font-size: 11.5px !important; }
.al__to { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--c-mu); }
.al__to .seg { flex: 1; }
.btns--2 { grid-template-columns: 1fr 1fr !important; }
.btns--2 .btn-d { justify-content: center; font-size: 12px; gap: 6px; }
.btns--2 .btn-d svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.seg--wrap { flex-wrap: wrap; }
.seg--wrap button { flex: 1 0 30%; }

.ls__ined { position: absolute; z-index: 6; margin: 0; padding: 0 4px; border: 1.5px solid var(--glow); border-radius: 4px; background: rgba(255, 255, 255, .9); color: #16130f; outline: 0; resize: none; overflow: hidden; white-space: pre; box-shadow: 0 0 0 4px rgba(255, 90, 31, .18), 0 8px 24px -8px rgba(0, 0, 0, .6); caret-color: #ff5a1f; }
.ls__ined[hidden] { display: none; }
.ls__pv { position: absolute; z-index: 4; pointer-events: none; box-shadow: 0 30px 60px -20px #000; border-radius: 2px; }
.ls__pv[hidden] { display: none; }
.pv-pill { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 7; display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; background: rgba(22, 19, 15, .92); border: 1px solid var(--c-ln); border-radius: 999px; color: var(--c-tx); font-size: 13px; box-shadow: 0 10px 30px -10px #000; }
.pv-pill[hidden] { display: none; }
.pv-pill .btn-d { border-radius: 999px; height: 30px; }
.tb.is-on { border-color: var(--glow); color: #fff; background: #2c211a; }
@media (max-width: 1340px) { .ls__grp--mid { gap: 2px; } .matp__btn { max-width: 200px; } .ls__mode button { padding-left: 10px; padding-right: 10px; } .ls__grp--end { gap: 6px; } }
@media (max-width: 1340px) { .matp__btn { max-width: 240px; padding-right: 8px; gap: 7px; } .matp__btn .ls__swatch { width: 26px; height: 26px; } .tb--chk.is-ok [data-check-lbl] { display: none; } .tb--chk.is-ok { padding: 0 10px; } }
