/* Mehl's Bestell-App — Stahlregal, Papierzettel, Dunkelgrün & Gold.
   Bewusst nur ein dunkles Erscheinungsbild (Bar-Atmosphäre); alle Farben als Tokens. */
:root {
  color-scheme: dark;
  --page: #050806;
  --wall: #0a0d0b;
  --steel-hi: #4a4f50;
  --steel: #2a2e2f;
  --steel-lo: #111314;
  --rust: rgba(120, 62, 28, .55);
  --green: #1f4a35;
  --green-wall: #123224;
  --gold: #c9a24a;
  --gold-hi: #e8c978;
  --paper: #efe5cc;
  --paper-rim: #fbf6e8;
  --ink: #1f2420;
  --ink-soft: #5d6158;
  --muted: #a7b0a8;
  --red-pen: #b3261e;
  --danger: #8f1d17;
  --marker-low: rgba(245, 140, 60, .55);
  --stamp-ok: #2f7d4f;
  --tape: rgba(226, 214, 176, .8);
  --wa: #25d366;
  --f-brand: "Rye", Georgia, serif;
  --f-title: "Permanent Marker", "Marker Felt", cursive;
  --f-type: "Special Elite", "Courier New", monospace;
  --f-body: "Barlow", -apple-system, "Segoe UI", sans-serif;
  --f-hand: "Caveat", "Bradley Hand", cursive;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .38 0 0 0 0 .3 0 0 0 0 .18 0 0 0 .13 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --metal-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55 .04' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .4 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  --peg: radial-gradient(circle at 50% 50%, rgba(0,0,0,.75) 0 2.2px, transparent 2.8px) 0 0 / 22px 22px, linear-gradient(180deg, var(--green-wall), #0c2419);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; background: var(--page); color: var(--paper); }
body { font: 16px/1.35 var(--f-body); overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
[hidden] { display: none !important; }

#app { height: 100%; height: 100dvh; display: flex; flex-direction: column; max-width: 720px; margin: 0 auto; background: var(--wall); position: relative; overflow: hidden; }
.view { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

.paper { background-color: var(--paper);
  background-image: var(--grain),
    radial-gradient(ellipse 60px 22px at 82% 70%, rgba(150,110,50,.10), transparent 70%),
    radial-gradient(ellipse 40px 30px at 12% 20%, rgba(150,110,50,.07), transparent 70%),
    linear-gradient(178deg, rgba(255,255,255,.35), transparent 45%, rgba(120,95,50,.10));
  color: var(--ink); }
.tape { position: absolute; width: 52px; height: 17px; background: var(--tape); box-shadow: 0 1px 2px rgba(0,0,0,.2);
  clip-path: polygon(3% 0, 97% 6%, 100% 50%, 96% 100%, 4% 94%, 0 50%); pointer-events: none; }
.pin { position: absolute; top: -6px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 35%, #f3d98f, var(--gold) 55%, #7a5d1c); box-shadow: 0 3px 4px rgba(0,0,0,.5); }

/* ---------- Kopfzeilen ---------- */
.head { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  background: #000; border-bottom: 1px solid rgba(201,162,74,.35); }
.back { border: 0; background: none; color: var(--gold-hi); font-weight: 600; padding: 6px 4px; white-space: nowrap; font-size: 16px; }
.head img { width: 38px; height: 38px; border-radius: 8px; }
.head .t { flex: 1; min-width: 0; }
.head .t b { font-family: var(--f-brand); font-weight: 400; font-size: 20px; display: block; line-height: 1.1; color: var(--gold-hi); }
.head .t small { color: var(--muted); font-size: 13px; font-family: var(--f-type); }
.head .act { border: 1px solid var(--gold); background: none; color: var(--gold-hi); border-radius: 99px; padding: 6px 12px; font-weight: 600; font-size: 14px; white-space: nowrap; }

/* ---------- Hauptmenü ---------- */
.pegboard { padding: 18px 16px calc(28px + env(safe-area-inset-bottom)); background: var(--peg); }
.hello { font-family: var(--f-hand); font-size: 27px; color: var(--gold-hi); margin: 0 4px 14px; line-height: 1; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
.tile { position: relative; border: 0; text-align: left; padding: 18px 14px 14px; min-height: 118px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 6px 12px rgba(0,0,0,.45); border-radius: 2px; transition: transform .2s var(--ease); }
.tile:active { transform: scale(.97) !important; }
.tile.wide { grid-column: span 2; min-height: 128px; flex-direction: row; align-items: center; gap: 14px; }
.tile svg { width: 34px; height: 34px; stroke: var(--green); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tile.wide svg { width: 48px; height: 48px; }
.tile b { font-family: var(--f-type); font-weight: 400; font-size: 17px; }
.tile.wide b { font-size: 22px; }
.tile .h { font-family: var(--f-hand); font-size: 20px; color: var(--red-pen); line-height: 1.05; }
.tile.label { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1b1404; }
.tile.label svg { stroke: #1b1404; }
.tile.label .h { color: #4a3a12; font-family: var(--f-body); font-size: 14px; }
.tile .tape { top: -8px; left: 14px; transform: rotate(-6deg); }
.tile .tape.r { left: auto; right: 14px; transform: rotate(5deg); }

/* ---------- Bestellliste ---------- */
.lhead { position: relative; z-index: 6; display: flex; align-items: center; gap: 6px;
  padding: calc(8px + env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 8px max(6px, env(safe-area-inset-left));
  background: var(--metal-grain), radial-gradient(ellipse 120px 40px at 85% 20%, var(--rust), transparent 70%), linear-gradient(180deg, #1c1f20, #0f1112);
  border-bottom: 3px solid #050606; box-shadow: 0 4px 10px rgba(0,0,0,.6); }
.lhead .back { font-size: 28px; line-height: 1; padding: 2px 8px; }
.ltitle { flex: 1; min-width: 0; margin: 0; font-family: var(--f-title); font-weight: 400; font-size: 25px; line-height: 1; color: var(--paper); text-shadow: 0 2px 0 rgba(0,0,0,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ltitle small { display: block; font-family: var(--f-hand); font-size: 16px; color: var(--muted); text-shadow: none; margin-top: 1px; }
.iconbtn { position: relative; height: 40px; min-width: 40px; padding: 0 9px; flex: none; border-radius: 10px; border: 1px solid #343a3a; background: rgba(0,0,0,.55);
  display: inline-flex; align-items: center; justify-content: center; color: var(--paper); }
.iconbtn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn:disabled { opacity: .35; }
.iconbtn.on { background: var(--gold); color: #120d03; border-color: var(--gold); }
.dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red-pen); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.search { width: 100%; border: 0; border-bottom: 1px solid #222; background: #0c0e0e; padding: 10px 14px; font-size: 16px; position: relative; z-index: 5; }
.search::placeholder { color: #7d8580; }

.panel { position: absolute; left: 0; right: 0; z-index: 7; max-height: 75%; overflow-y: auto; padding: 14px 14px 24px; color: var(--ink);
  box-shadow: 0 14px 30px rgba(0,0,0,.65); clip-path: polygon(0 0, 100% 0, 100% 98%, 85% 99.6%, 62% 98.4%, 40% 100%, 18% 98.6%, 0 99.7%); }
.panel h4 { margin: 0 0 6px; font-family: var(--f-type); font-weight: 400; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); display: flex; justify-content: space-between; align-items: baseline; }
.panel h4 button { border: 0; background: none; color: var(--green); font-family: var(--f-body); font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 0; }
.seg { display: flex; border-radius: 10px; padding: 3px; background: rgba(31,36,32,.12); margin-bottom: 14px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 0; border-radius: 8px; font-size: 14.5px; color: var(--ink-soft); }
.seg button.on { background: var(--green); color: var(--gold-hi); font-weight: 600; }
.checks { display: flex; flex-direction: column; border-top: 1px dashed rgba(31,36,32,.3); }
.checks label { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px dashed rgba(31,36,32,.3); font-size: 16px; }
.checks input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }
.checks label small { margin-left: auto; color: var(--ink-soft); font-size: 13px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-soft); margin: 12px 0 0; align-items: center; }
.legend .mk { display: inline-block; width: 22px; height: 9px; background: var(--marker-low); transform: skew(-12deg); margin-right: 4px; border-radius: 2px; }
.legend .ok { color: var(--stamp-ok); font-weight: 700; margin-right: 3px; }
.btn-green { width: 100%; margin-top: 12px; border: 0; border-radius: 10px; padding: 12px; font-weight: 700; background: var(--green); color: var(--gold-hi); }

.cols { display: grid; grid-template-columns: 1fr 122px 62px; gap: 6px; padding: 5px 36px 4px 40px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: #070808; border-bottom: 1px solid #1e2222; }
.cols span:nth-child(2) { text-align: center; color: var(--paper); }
.cols span:nth-child(3) { text-align: center; color: var(--gold-hi); }

/* Stahlregal */
.rack { position: relative; padding: 0 24px calc(84px + env(safe-area-inset-bottom)); min-height: 100%;
  background: radial-gradient(ellipse at 50% 0, rgba(40,60,50,.25), transparent 60%), linear-gradient(180deg, #0c0f0e, #060707); }
.rack::before, .rack::after { content: ""; position: absolute; top: 0; bottom: 0; width: 16px; z-index: 1; pointer-events: none;
  background:
    repeating-linear-gradient(180deg, transparent 0 11px, #030404 11px 19px) 50% 0 / 6px 100% no-repeat,
    radial-gradient(ellipse 10px 30px at 40% 30%, var(--rust), transparent 70%) 0 0 / 16px 140px,
    var(--metal-grain),
    linear-gradient(90deg, var(--steel-lo), var(--steel-hi) 30%, var(--steel) 62%, var(--steel-lo));
  box-shadow: 2px 0 6px rgba(0,0,0,.6); }
.rack::before { left: 4px; }
.rack::after { right: 4px; }
.beam { position: relative; z-index: 2; height: 11px; margin: 0 -20px;
  background:
    radial-gradient(circle at 10px 6px, #6c7172 0 1.6px, transparent 2.2px),
    radial-gradient(circle at calc(100% - 10px) 6px, #6c7172 0 1.6px, transparent 2.2px),
    radial-gradient(ellipse 50px 6px at var(--rx, 30%) 70%, var(--rust), transparent 70%),
    var(--metal-grain),
    linear-gradient(180deg, #5a5f60 0, #3a3e3f 2px, #26292a 4px, #17191a 8px, #0b0c0c);
  box-shadow: 0 4px 6px rgba(0,0,0,.7); }
.plate { position: relative; z-index: 3; margin: -2px auto 2px; width: fit-content; max-width: 100%; padding: 3px 16px; border-radius: 2px; font-family: var(--f-type); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #1b1404;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 3px 5px rgba(0,0,0,.6); }
.plate::before, .plate::after { content: ""; position: absolute; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #6e5419; }
.plate::before { left: 6px; } .plate::after { right: 6px; }

.slot { position: relative; }
.slot.gone { animation: collapse .26s var(--ease) forwards; overflow: hidden; }
@keyframes collapse { to { height: 0; opacity: 0; } }
.swipe-bg { position: absolute; z-index: 0; left: 0; right: 0; top: 16px; bottom: 7px; border-radius: 4px; display: none; align-items: center; justify-content: flex-end; padding-right: 16px;
  background: var(--danger); color: #fff; font-weight: 700; font-size: 14px; }
.slot.swiping .swipe-bg { display: flex; }
.slot.arm .swipe-bg { background: var(--red-pen); }
.note-wrap { position: relative; z-index: 1; margin: 5px 0 7px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.6));
  transform: translateX(var(--dx, 0px)) rotate(var(--tilt, 0deg)); transition: transform .25s var(--ease); touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.note-wrap.dragging { transition: none; }
.note-wrap.flash { animation: flash 1.2s ease; }
@keyframes flash { 30% { filter: drop-shadow(0 0 12px var(--gold-hi)); } }
.rim { position: absolute; inset: 0; background: var(--paper-rim); }
.note { position: relative; display: grid; grid-template-columns: 1fr 122px 62px; gap: 6px; align-items: center; min-height: 58px; padding: 8px 10px 8px 14px; }
.hook { position: absolute; z-index: 3; top: -14px; width: 12px; height: 22px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, #3c4041, #8b9091 45%, #4a4e4f); box-shadow: 0 2px 3px rgba(0,0,0,.6); }
.hook::after { content: ""; position: absolute; left: 3px; top: 4px; width: 6px; height: 4px; border-radius: 2px; background: #121414; }
.note-wrap .tape { z-index: 3; top: -9px; }
.n-name { min-width: 0; line-height: 1.15; }
.n-name b { font-weight: 700; font-size: 15.5px; overflow-wrap: break-word; hyphens: manual; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.n-name small { display: block; font-family: var(--f-type); font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.n-name small em { font-style: normal; color: var(--ink); }
.note.low .n-name b { background: linear-gradient(100deg, transparent 1%, var(--marker-low) 3%, var(--marker-low) 97%, transparent 99%) 0 62% / 100% 60% no-repeat; }
.ok-mark { display: none; color: var(--stamp-ok); font-weight: 700; margin-left: 4px; }
.note.ok .ok-mark { display: inline; }
.step { display: flex; align-items: center; justify-content: center; border: 1.5px solid rgba(31,36,32,.35); border-radius: 10px; background: rgba(255,255,255,.45); height: 42px; overflow: hidden; }
.step button { width: 38px; height: 100%; border: 0; background: none; color: var(--ink); font-size: 22px; font-weight: 600; line-height: 1; touch-action: manipulation; }
.step button[data-d="1"] { background: var(--green); color: var(--paper); }
.step button:active { filter: brightness(1.25); }
.step input { width: 44px; height: 100%; text-align: center; border: 0; border-inline: 1px solid rgba(31,36,32,.2); background: none; color: var(--ink); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; border-radius: 0; }
.step input::placeholder { color: rgba(31,36,32,.4); font-weight: 400; font-size: 14px; }
.order { position: relative; }
.order input { width: 100%; height: 42px; border: 1.5px dashed rgba(179,38,30,.55); border-radius: 6px; background: rgba(255,255,255,.3);
  text-align: center; font-family: var(--f-hand); font-size: 28px; font-weight: 700; color: var(--red-pen); padding: 0 12px 0 0; }
.order input:focus { border-style: solid; border-color: var(--red-pen); background: #fff; outline: none; }
.order input.zero { color: rgba(31,36,32,.35); }
.order input.unknown { color: rgba(31,36,32,.3); font-size: 22px; }
.order input.changed { border-style: solid; border-color: var(--red-pen); }
.order .pen { position: absolute; right: 5px; top: 4px; font-size: 11px; color: var(--red-pen); opacity: .75; pointer-events: none; }
.order .tag { position: absolute; left: 0; right: 0; bottom: -12px; text-align: center; font-size: 9.5px; font-weight: 700; color: var(--red-pen); letter-spacing: .04em; text-transform: uppercase; }
.more { text-align: center; font-family: var(--f-hand); font-size: 20px; color: var(--muted); padding: 16px 12px 0; position: relative; z-index: 2; }
.skipnote { position: relative; z-index: 2; margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.skipnote button { border: 0; background: none; color: var(--gold-hi); font-weight: 600; padding: 0 0 0 4px; }

.bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 18px max(12px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.9) 55%); pointer-events: none; }
.bar > * { pointer-events: auto; }
.prog { font-family: var(--f-hand); font-size: 21px; color: var(--paper); text-shadow: 0 1px 3px #000; }
.cta { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 99px; padding: 10px 10px 10px 16px; font-weight: 700; font-size: 15px; color: #120d03;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: 0 4px 12px rgba(0,0,0,.6); }
.cta .cnt { min-width: 24px; padding: 2px 7px; border-radius: 99px; background: #120d03; color: var(--gold-hi); font-size: 13px; text-align: center; }
.cta.full { width: 100%; justify-content: center; padding: 13px; font-size: 16px; border-radius: 12px; }

/* ---------- Bogen von unten (Rückfragen, Bearbeiten) ---------- */
.sheet-scrim { position: absolute; inset: 0; z-index: 40; display: flex; align-items: flex-end; background: rgba(0,0,0,.6); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-height: 88%; overflow-y: auto; padding: 24px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0,0,0,.6);
  clip-path: polygon(0 10px, 12% 3px, 30% 9px, 52% 0, 70% 8px, 88% 2px, 100% 9px, 100% 100%, 0 100%); animation: rise .3s var(--ease); }
@keyframes rise { from { transform: translateY(40px); } }
.sheet h3 { margin: 0 0 6px; font-family: var(--f-type); font-weight: 400; font-size: 20px; }
.sheet p { margin: 0 0 12px; font-size: 15px; color: var(--ink-soft); }
.sheet ul.lst { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px dashed rgba(31,36,32,.3); }
.sheet ul.lst li { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px dashed rgba(31,36,32,.3); font-size: 15.5px; }
.sheet ul.lst li span { flex: 1; min-width: 0; }
.pill-btn { border: 1.5px solid var(--green); background: none; color: var(--green); border-radius: 99px; padding: 5px 13px; font-size: 14px; font-weight: 600; flex: none; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.actions.one { grid-template-columns: 1fr; }
.actions button { border: 0; border-radius: 10px; padding: 13px 8px; font-weight: 700; font-size: 15px; }
.b-sec { background: rgba(31,36,32,.12); color: var(--ink); }
.b-pri { background: var(--green); color: var(--gold-hi); }
.b-gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #120d03; }
.b-danger { background: var(--danger); color: #fff; }
.b-link { background: none !important; color: var(--danger) !important; font-weight: 600 !important; }

/* Formulare auf Papier */
.form label, .card label { display: block; font-family: var(--f-type); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin: 12px 0 4px; }
.in { width: 100%; background: rgba(255,255,255,.6); border: 1.5px solid rgba(31,36,32,.3); border-radius: 6px; padding: 10px 11px; font-size: 16px; color: var(--ink); }
textarea.in { min-height: 160px; font-family: var(--f-body); }
select.in { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(-45deg, transparent 50%, var(--ink) 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 > div { min-width: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags button { border: 1.5px solid rgba(31,36,32,.3); background: rgba(255,255,255,.45); border-radius: 99px; padding: 6px 12px; font-size: 14.5px; color: var(--ink); }
.tags button.on { background: var(--green); border-color: var(--green); color: var(--gold-hi); font-weight: 600; }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding-top: 10px; border-top: 1px dashed rgba(31,36,32,.3); }
.toggle small { display: block; color: var(--ink-soft); font-size: 13px; }
.sw { position: relative; width: 50px; height: 30px; flex: none; }
.sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sw span { position: absolute; inset: 0; border-radius: 99px; background: rgba(31,36,32,.25); transition: background .2s; pointer-events: none; }
.sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.sw input:checked + span { background: var(--green); }
.sw input:checked + span::after { transform: translateX(20px); background: var(--gold-hi); }

/* Karteikarte */
.card-wrap { padding: 22px 14px calc(30px + env(safe-area-inset-bottom)); min-height: 100%; background: var(--peg); }
.card { position: relative; padding: 20px 16px 18px; box-shadow: 0 8px 18px rgba(0,0,0,.5); border-radius: 2px;
  background-image: var(--grain), repeating-linear-gradient(180deg, transparent 0 31px, rgba(60,110,160,.16) 31px 32px); }
.card .tape { top: -9px; left: 50%; margin-left: -26px; transform: rotate(-2deg); }
.card h3 { margin: 0 0 4px; font-family: var(--f-type); font-weight: 400; font-size: 20px; border-bottom: 2px solid rgba(179,38,30,.45); padding-bottom: 6px; overflow-wrap: anywhere; }
.card .actions { margin-top: 18px; }

/* Verwaltungslisten (Artikel, Warengruppen, Lieferanten) */
.mlist { display: flex; flex-direction: column; gap: 10px; }
.mrow { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 2px; box-shadow: 0 4px 8px rgba(0,0,0,.45); touch-action: pan-y; }
.mrow.brass { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1b1404; }
.mrow .grow { flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 2px 0; color: inherit; }
.mrow b { display: block; font-weight: 700; font-size: 15.5px; overflow-wrap: anywhere; }
.mrow small { display: block; color: var(--ink-soft); font-size: 13px; }
.mrow.brass small { color: #4a3a12; }
.mrow .off { display: inline-block; font-family: var(--f-type); font-size: 11px; color: var(--red-pen); border: 1px solid var(--red-pen); padding: 0 5px; margin-left: 6px; transform: rotate(-3deg); }
.handle { flex: none; width: 36px; height: 40px; border: 0; background: none; display: grid; place-items: center; color: var(--ink-soft); touch-action: none; cursor: grab; }
.handle svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }
.mrow.lifting { z-index: 10; box-shadow: 0 14px 24px rgba(0,0,0,.6); transition: none; }
.mrow.shift { transition: transform .2s var(--ease); }
.sec { font-family: var(--f-hand); font-size: 25px; color: var(--gold-hi); margin: 4px 2px 0; }
.sec-hint { color: var(--muted); font-size: 14px; margin: -2px 2px 4px; }
.add-btn { border: 2px dashed var(--gold); background: rgba(0,0,0,.3); color: var(--gold-hi); border-radius: 10px; padding: 12px; font-weight: 600; width: 100%; }
.toolrow { display: flex; gap: 8px; margin-bottom: 14px; }
.toolrow > * { flex: 1; }
.search-dark { width: 100%; border: 1px solid #2c4a3a; background: rgba(0,0,0,.45); border-radius: 10px; padding: 10px 12px; font-size: 16px; color: var(--paper); margin-bottom: 14px; }
.search-dark::placeholder { color: #8aa094; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 15px; }
.empty b { display: block; font-family: var(--f-hand); font-size: 26px; color: var(--gold-hi); font-weight: 600; margin-bottom: 4px; }

/* Saisons */
.season { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border-radius: 3px; box-shadow: 0 5px 10px rgba(0,0,0,.45); }
.season input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--green); flex: none; }
.season b { font-family: var(--f-type); font-weight: 400; font-size: 16.5px; display: block; }
.season small { color: var(--ink-soft); font-size: 13px; }
.season .grow { flex: 1; min-width: 0; }
.x-btn { border: 0; background: none; color: var(--red-pen); font-size: 24px; line-height: 1; padding: 4px 8px; }
.addrow { display: flex; gap: 8px; }
.addrow input { flex: 1; min-width: 0; border: 2px dashed var(--gold); background: rgba(0,0,0,.35); border-radius: 10px; padding: 10px 12px; color: var(--paper); font-size: 16px; }
.addrow input::placeholder { color: #8aa094; }
.addrow button { border: 0; border-radius: 10px; padding: 0 18px; background: var(--gold); color: #120d03; font-weight: 700; font-size: 20px; }

/* ---------- Senden ---------- */
.pad { padding: 20px 0 calc(100px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 26px; position: relative; z-index: 2; }
.hint-box { font-size: 14px; color: var(--muted); padding: 0 2px; }
.slip { position: relative; z-index: 0; color: var(--ink); padding: 18px 14px 14px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.55)); }
.slip .paper-body { position: absolute; inset: 0; z-index: -1; }
.slip header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.slip header b { font-family: var(--f-type); font-weight: 400; font-size: 18px; }
.slip header small { color: var(--ink-soft); font-size: 13px; text-align: right; }
.slip ul { list-style: none; margin: 8px 0 12px; padding: 8px 0 0; border-top: 1px dashed rgba(31,36,32,.35); font-size: 15px; }
.slip li { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 3px 0; align-items: baseline; }
.slip li .q { font-family: var(--f-hand); font-size: 22px; font-weight: 700; color: var(--red-pen); line-height: 1; white-space: nowrap; }
.slip li small { color: var(--ink-soft); font-family: var(--f-type); font-size: 12px; }
.slip .hook { top: -12px; left: 24px; }
.slip .tape { top: -8px; left: 40%; transform: rotate(3deg); }
.stamp { position: absolute; right: 14px; bottom: 74px; transform: rotate(-12deg); border: 2.5px solid var(--stamp-ok); color: var(--stamp-ok); font-family: var(--f-type); font-size: 14px; padding: 2px 8px; border-radius: 4px; opacity: .85; letter-spacing: .08em; pointer-events: none; background: rgba(239,229,204,.6); }
.note-in { width: 100%; margin: 0 0 10px; border: 1.5px dashed rgba(31,36,32,.3); border-radius: 6px; background: rgba(255,255,255,.4); padding: 7px 9px; font-family: var(--f-hand); font-size: 20px; color: var(--ink); }
.note-in::placeholder { color: rgba(31,36,32,.4); }
.wa { width: 100%; border: 0; border-radius: 10px; padding: 12px; font-weight: 700; background: var(--wa); color: #06270f; font-size: 15.5px; }
.wa.done { background: none; border: 1.5px solid rgba(31,36,32,.3); color: var(--ink-soft); font-weight: 600; }
.txt-link { display: block; width: 100%; margin-top: 8px; border: 0; background: none; color: var(--green); font-weight: 600; font-size: 14px; text-align: center; padding: 4px; }

/* Verlauf */
.hrow { position: relative; display: block; width: 100%; text-align: left; border: 0; padding: 12px 14px; border-radius: 2px; box-shadow: 0 4px 8px rgba(0,0,0,.45); }
.hrow b { font-family: var(--f-type); font-weight: 400; font-size: 16px; display: block; }
.hrow small { color: var(--ink-soft); font-size: 13.5px; }
.hrow .h { position: absolute; right: 14px; top: 12px; font-family: var(--f-hand); font-size: 20px; color: var(--red-pen); }

/* PIN */
.pinbox { max-width: 340px; margin: 0 auto; padding: 14vh 20px 20px; text-align: center; }
.pinbox img { width: 120px; height: 120px; border-radius: 26px; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.pinbox h1 { font-family: var(--f-brand); font-weight: 400; color: var(--gold-hi); font-size: 28px; margin: 18px 0 2px; }
.pinbox p { color: var(--muted); margin: 0 0 18px; }
.pinbox input { width: 100%; text-align: center; font-size: 28px; letter-spacing: .35em; padding: 12px; border-radius: 12px; border: 2px dashed var(--gold); background: rgba(0,0,0,.4); color: var(--paper); }
.pinbox button { width: 100%; margin-top: 12px; }
.pinbox .err { color: #ff8a80; min-height: 1.4em; margin-top: 10px; }

.toast { position: absolute; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: rgba(0,0,0,.92); color: var(--paper);
  border: 1px solid rgba(201,162,74,.5); padding: 10px 16px; border-radius: 12px; font-size: 15px; max-width: 90%; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.show { opacity: 1; }
.offline { background: var(--red-pen); color: #fff; text-align: center; font-size: 13px; padding: 4px; }

@media (prefers-reduced-motion: reduce) {
  .tile, .note-wrap, .mrow.shift { transition: none; }
  .slot.gone, .sheet, .sheet-scrim, .note-wrap.flash { animation: none; }
}
