/* Layout: Kopf links Text, rechts Schaufenster mit drei 3D-Blöcken auf einer Redstone-Leitung.
   Darunter klebende Leiste (Suche, Kategorien), dann je Kategorie ein Raster aus Inventar-Slots.
   Bewusst nur ein dunkles Thema: Minecraft bei Nacht. */
:root {
  --night: #16121a;
  --stone: #211b25;
  --slot: #2b2330;
  --slot-hi: #3f3446;
  --slot-lo: #0d0a10;
  --ink: #f1e9e2;
  --muted: #a5978f;
  --line: #3a3040;
  --redstone: #ff3b2c;
  --redstone-dim: #8f1d16;
  --diamond: #63e7ef;
  --gold: #f2b33a;
  --font-display: 'Pixelify Sans', 'Courier New', ui-monospace, monospace;
  --font-body: 'Red Hat Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
.spr { display: block; aspect-ratio: 1; max-width: 100%; background-repeat: no-repeat; background-size: 1600% 1600%; image-rendering: pixelated; }
.spr.missing { display: grid; place-items: center; color: var(--muted); font-family: var(--font-display); font-size: 28px; }
.spr.gem { image-rendering: auto; display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -0.28em; flex: none; }
.spr.cat-ico { width: 48px; height: 48px; flex: none; }
body {
  margin: 0;
  background-color: var(--night);
  background-image:
    radial-gradient(900px 420px at 85% -80px, rgba(255, 59, 44, .13), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  padding-block: 0 48px;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--night); }
body.is-editing { padding-block-end: 132px; }
:focus-visible { outline: 2px solid var(--diamond); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- Kopf ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: center; padding-block: 48px 32px; }
.hero-text { min-width: 0; }
.server { font-family: var(--font-display); font-size: 18px; color: var(--redstone); margin: 0 0 12px; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(44px, 8vw, 84px); line-height: .95; margin: 0; letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 4px 0 var(--slot-lo); }
.lede { margin: 20px 0 0; font-size: 18px; color: var(--muted); max-width: 34ch; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 24px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--muted); }
.facts b { color: var(--ink); font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; font-size: 20px; margin-right: 6px; }

.show { position: relative; min-width: 0; aspect-ratio: 16 / 10; max-width: 100%; }
.show .plinth { position: absolute; left: 4%; right: 4%; bottom: 14%; height: 10px; background: var(--redstone-dim); box-shadow: 0 0 0 0 transparent; }
.show .plinth::after { content: ""; position: absolute; inset: 0; background: var(--redstone); transform-origin: left; transform: scaleX(1); box-shadow: 0 0 18px rgba(255, 59, 44, .55); animation: power 1.4s steps(14, end) .3s both; }
.show .spr { position: absolute; filter: drop-shadow(0 16px 14px rgba(0, 0, 0, .5)); }
.show .s1 { left: 2%; bottom: 17%; width: 30%; }
.show .s2 { left: 33%; bottom: 19%; width: 36%; }
.show .s3 { right: 2%; bottom: 17%; width: 30%; }
.show .s4 { left: 18%; bottom: 0; width: 22%; }
.show .s5 { right: 22%; bottom: 1%; width: 16%; }
.show .lit { animation: lampon .2s steps(2, end) 1.6s both; }
@keyframes power { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes lampon { from { filter: brightness(.45) saturate(.4) drop-shadow(0 18px 18px rgba(0,0,0,.45)); } to { filter: brightness(1) drop-shadow(0 0 28px rgba(247, 192, 74, .55)) drop-shadow(0 18px 18px rgba(0,0,0,.45)); } }
@media (prefers-reduced-motion: reduce) { .show .plinth::after, .show .lit { animation: none; } .show .lit { filter: drop-shadow(0 0 28px rgba(247, 192, 74, .55)); } }

/* ---------- Leiste ---------- */
.tools { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 4; background: rgba(22, 18, 26, .94); backdrop-filter: blur(6px); border-block: 1px solid var(--line); }
.tools .wrap { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding-block: 12px; }
.search { position: relative; flex: 1 1 240px; min-width: 0; max-width: 360px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; flex: 10 1 auto; }
.tab { font: inherit; font-size: 15px; font-weight: 600; min-height: 38px; padding: 6px 14px; cursor: pointer; color: var(--muted); background: transparent; border: 2px solid transparent; }
.tab:hover { color: var(--ink); }
.tab[aria-pressed="true"] { color: var(--ink); background: var(--slot); border-color: var(--slot-hi); box-shadow: inset 0 -3px 0 var(--redstone); }

input[type="text"], input[type="search"], select {
  font: inherit; color: var(--ink); background: var(--slot-lo);
  border: 2px solid var(--line); padding: 7px 10px; min-height: 40px; width: 100%; min-width: 0;
}
input:focus, select:focus { border-color: var(--slot-hi); }
input[aria-invalid="true"] { border-color: var(--redstone); }
input::placeholder { color: #7d7069; }
input[type="color"] { width: 44px; height: 40px; padding: 2px; background: var(--slot-lo); border: 2px solid var(--line); cursor: pointer; }

.btn {
  font: inherit; font-weight: 700; font-size: 15px; min-height: 40px; padding: 8px 16px; cursor: pointer;
  color: var(--ink); background: var(--slot); border: 0;
  box-shadow: inset 2px 2px 0 var(--slot-hi), inset -2px -2px 0 var(--slot-lo);
}
.btn:hover:not(:disabled) { background: var(--slot-hi); }
.btn:active:not(:disabled) { box-shadow: inset -2px -2px 0 var(--slot-hi), inset 2px 2px 0 var(--slot-lo); }
.btn.primary { background: var(--redstone-dim); box-shadow: inset 2px 2px 0 #c2392c, inset -2px -2px 0 #4a0d09; }
.btn.primary:hover:not(:disabled) { background: #a8261c; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sq { width: 40px; padding: 0; font-size: 17px; }
.btn.danger { color: #ff8a7e; }
.btn.small { min-height: 34px; font-size: 14px; padding: 6px 12px; }

/* ---------- Kategorien und Slots ---------- */
main { padding-top: 8px; }
.cat { padding-top: 40px; scroll-margin-top: 80px; }
.cat-h { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.cat-h h2 { font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1.1; margin: 0; }
.cat-h .n { color: var(--muted); font-size: 15px; margin-left: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 14px; }
@media (max-width: 420px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.item { position: relative; display: flex; flex-direction: column; background: var(--stone); padding: 10px 10px 14px; box-shadow: inset 2px 2px 0 var(--slot-hi), inset -2px -2px 0 var(--slot-lo); }
.item .art { position: relative; aspect-ratio: 1; background: var(--slot); box-shadow: inset 3px 3px 0 var(--slot-lo), inset -3px -3px 0 var(--slot-hi); display: grid; place-items: center; overflow: hidden; }
.item .art .spr { width: 82%; transition: transform .18s ease-out; }
.item .art img { width: 92%; height: 92%; object-fit: contain; transition: transform .18s ease-out; }
.item .art img.photo { image-rendering: auto; width: 78%; height: 78%; }
.item:hover .art .spr, .item:hover .art img { transform: translateY(-4px) scale(1.04); }
@media (prefers-reduced-motion: reduce) { .item .art .spr, .item .art img { transition: none; } .item:hover .art .spr, .item:hover .art img { transform: none; } }
.stack { position: absolute; right: 8px; bottom: 6px; font-family: var(--font-body); font-weight: 800; font-variant-numeric: tabular-nums lining-nums; font-size: 20px; line-height: 1; color: #fff; text-shadow: 2px 2px 0 #3a3a3a; pointer-events: none; }
.item h3 { font-size: 16px; font-weight: 700; line-height: 1.25; margin: 12px 2px 0; overflow-wrap: break-word; hyphens: auto; }
.item .note { font-size: 13px; color: var(--muted); margin: 4px 2px 0; }
.deal { margin: 10px 2px 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-variant-numeric: tabular-nums; }
.deal .q { font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; font-size: 18px; line-height: 1.1; }
.deal .p { display: inline-flex; align-items: center; gap: 5px; color: var(--diamond); font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.unit { margin: 6px 2px 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.item.out .art .spr, .item.out .art img { filter: grayscale(1) brightness(.55); }
.item.out .deal { opacity: .5; }
.sold { position: absolute; top: 16px; left: 16px; z-index: 1; font-size: 12px; font-weight: 700; padding: 2px 8px; background: var(--gold); color: #2a1a00; }
.empty, .none { color: var(--muted); padding: 16px 0; }

.foot { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; color: var(--muted); font-size: 14px; }
.foot p { margin: 0; max-width: 70ch; }

/* ---------- Bearbeiten ---------- */
.panel { background: var(--stone); padding: 16px; margin-block: 24px 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); box-shadow: inset 2px 2px 0 var(--slot-hi), inset -2px -2px 0 var(--slot-lo); }
.panel h2 { grid-column: 1 / -1; margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 22px; }
.fld { display: grid; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.cat-edit { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.cat-edit .cat-ico { align-self: center; }
.cat-edit .fld { flex: 1 1 200px; }
.cat-edit .fld.sel { flex: 0 1 200px; }
.egrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.ecard { background: var(--stone); padding: 12px; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; box-shadow: inset 2px 2px 0 var(--slot-hi), inset -2px -2px 0 var(--slot-lo); }
.ecard .art { width: 96px; height: 96px; background: var(--slot); box-shadow: inset 3px 3px 0 var(--slot-lo), inset -3px -3px 0 var(--slot-hi); display: grid; place-items: center; }
.ecard .art .spr { width: 84%; }
.ecard .art img { width: 88%; height: 88%; object-fit: contain; }
.ecard .art img.photo { image-rendering: auto; }
.ecard .side { display: grid; gap: 8px; align-content: start; }
.ecard .f { display: grid; gap: 8px; min-width: 0; grid-column: 1 / -1; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.row3 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row3 .spacer { flex: 1; }
.price-in { display: flex; align-items: center; gap: 6px; color: var(--diamond); }
.chk { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; color: var(--ink); }
.chk input { width: 18px; height: 18px; accent-color: var(--redstone); }
.upload { display: inline-flex; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload span { display: inline-flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; }
.upload input:focus-visible + span { outline: 2px solid var(--diamond); outline-offset: 2px; }
.add { font: inherit; font-weight: 700; color: var(--redstone); background: transparent; border: 2px dashed var(--line); min-height: 120px; cursor: pointer; }
.add:hover { border-color: var(--redstone-dim); background: rgba(255, 59, 44, .05); }
.add-cat { margin-top: 40px; width: 100%; min-height: 64px; }
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  background: var(--stone); border-top: 2px solid var(--slot-hi);
  padding-top: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.bar .wrap { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.bar .msg { flex: 1 1 260px; font-size: 14px; color: var(--muted); margin: 0; }
.bar .msg.err { color: #ff8a7e; }
.bar .acts { display: flex; gap: 8px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-block: 28px 16px; gap: 8px; }
  .show { max-width: 520px; width: 100%; }
}

.icon-name { font-weight: 700; font-size: 14px; overflow-wrap: break-word; }
.pick { justify-self: start; }

/* Item-Auswahl */
.pk { width: min(720px, calc(100vw - 32px)); max-height: min(80vh, 760px); padding: 0; border: 0; color: var(--ink); background: var(--stone); box-shadow: inset 2px 2px 0 var(--slot-hi), inset -2px -2px 0 var(--slot-lo), 0 24px 60px rgba(0,0,0,.6); }
.pk[open] { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 10px; padding: 16px; }
.pk::backdrop { background: rgba(8, 5, 10, .72); }
.pk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pk-head h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 24px; }
.pk-count { margin: 0; font-size: 13px; color: var(--muted); }
.pk-grid { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding: 2px; min-height: 0; }
.pk-item { font: inherit; font-size: 12px; line-height: 1.25; color: var(--ink); background: var(--slot); border: 0; padding: 8px 6px; cursor: pointer; display: grid; justify-items: center; gap: 6px; text-align: center; box-shadow: inset 2px 2px 0 var(--slot-lo), inset -2px -2px 0 var(--slot-hi); }
.pk-item:hover, .pk-item:focus-visible { background: var(--slot-hi); }
.pk-item .pk-spr { width: 56px; }
.pk-item span:last-child { overflow-wrap: anywhere; }

/* ================= Bestellservice ================= */
.boot { padding-block: 64px; }
.boot h1 { font-size: 48px; }
.how { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: s; }
.how li { counter-increment: s; display: flex; gap: 10px; align-items: baseline; color: var(--muted); }
.how li::before { content: counter(s); font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; color: var(--ink); background: var(--slot); box-shadow: inset 2px 2px 0 var(--slot-hi), inset -2px -2px 0 var(--slot-lo); width: 28px; height: 28px; display: inline-grid; place-items: center; flex: none; }
.how b { color: var(--ink); }
.hero-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Kaufen */
.item .buy { margin-top: auto; width: 100%; }
.item .deal { margin-bottom: 12px; }
.item.in-cart { box-shadow: inset 2px 2px 0 var(--slot-hi), inset -2px -2px 0 var(--slot-lo), 0 0 0 2px var(--redstone-dim); }
.buy-off { margin: auto 2px 0; font-size: 13px; color: var(--muted); }
.stepper { margin-top: auto; display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 4px; }
.stepper .cnt { text-align: center; font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; font-size: 16px; }
.stepper.small { grid-template-columns: 34px 32px 34px; }
.stepper.small .btn.sq { width: 34px; min-height: 34px; }
.cartbar { display: none; }
.cartbar.on { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--stone); border-top: 2px solid var(--redstone-dim); padding-top: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -12px 30px rgba(0, 0, 0, .45); }
.cartbar .wrap { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.cartbar .sum { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
body.has-cart { padding-block-end: 110px; }
.p { display: inline-flex; align-items: center; gap: 5px; color: var(--diamond); font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }

/* Dialoge */
.dlg { width: min(560px, calc(100vw - 24px)); max-height: min(88vh, 900px); padding: 0; border: 0; color: var(--ink); background: var(--stone); box-shadow: inset 2px 2px 0 var(--slot-hi), inset -2px -2px 0 var(--slot-lo), 0 24px 60px rgba(0, 0, 0, .6); }
.dlg.wide { width: min(640px, calc(100vw - 24px)); }
.dlg.pk { width: min(760px, calc(100vw - 24px)); }
.dlg[open] { display: flex; flex-direction: column; }
.dlg::backdrop { background: rgba(8, 5, 10, .72); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
.dlg.plain-title .dlg-head h2 { font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; font-size: 21px; }
.dlg-body { padding: 16px; overflow-y: auto; display: grid; gap: 12px; min-height: 0; }
.dlg-body > p { margin: 0; }
.dlg.pk .dlg-body { grid-template-rows: auto auto minmax(0, 1fr); }
.checkout { display: grid; gap: 12px; }
.checkout h3, .status-out h3 { margin: 6px 0 0; font-size: 15px; font-weight: 700; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.line { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; background: var(--slot); padding: 6px 10px 6px 6px; }
.lines.compact .line, .status-out .line { grid-template-columns: 36px minmax(0, 1fr) auto; }
.line-ico { width: 40px; }
.lines.compact .line-ico { width: 36px; }
.line-t { display: grid; min-width: 0; }
.line-t b { font-size: 15px; overflow-wrap: break-word; }
.line-t span { font-size: 13px; color: var(--muted); }
.total { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 17px; font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.form-err { color: #ff8a7e; margin: 0; min-height: 0; }
.form-err:empty { display: none; }
.btn.wide { width: 100%; min-height: 48px; font-size: 16px; }
.codewrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--slot); padding: 12px; }
.codewrap > span { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.code { font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; font-size: 28px; letter-spacing: .15em; color: var(--ink); user-select: all; overflow-wrap: anywhere; }
.lookup { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.lookup .fld { flex: 1 1 200px; }
.linkbtn { font: inherit; color: var(--diamond); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.status-out { display: grid; gap: 12px; }
.track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.track li { font-size: 13px; text-align: center; padding: 8px 4px; background: var(--slot); color: var(--muted); }
.track li.done { color: var(--ink); box-shadow: inset 0 -3px 0 var(--redstone-dim); }
.track li.now { color: var(--ink); font-weight: 700; box-shadow: inset 0 -3px 0 var(--redstone); background: var(--slot-hi); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; background: var(--slot-hi); color: var(--ink); }
.pill.off { background: #4a2a28; color: #ffb3aa; }
.pill.st-offen { background: var(--redstone-dim); }
.pill.st-in_arbeit { background: #6b4a12; }
.pill.st-unterwegs { background: #1d4d63; }
.pill.st-erledigt { background: #1f4d2b; }
.pill.st-storniert { background: #3a3040; color: var(--muted); }

/* Admin */
.adminpage .adm-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; padding-block: 32px 16px; }
.adminpage h1 { font-size: clamp(36px, 6vw, 56px); }
.adm-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.kpis { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.kpis li { background: var(--stone); padding: 12px 16px; color: var(--muted); display: grid; gap: 2px; box-shadow: inset 2px 2px 0 var(--slot-hi), inset -2px -2px 0 var(--slot-lo); }
.kpis b { font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; font-size: 26px; color: var(--ink); }
.kpis b .p { font-size: 26px; }
.kpis b .gem { width: 26px; height: 26px; }
.adm-tabs { margin-bottom: 18px; }
.orders { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 14px; align-items: start; }
.order { background: var(--stone); padding: 14px; display: grid; gap: 10px; box-shadow: inset 2px 2px 0 var(--slot-hi), inset -2px -2px 0 var(--slot-lo); border-left: 4px solid var(--line); }
.order.st-offen { border-left-color: var(--redstone); }
.order.st-in_arbeit { border-left-color: var(--gold); }
.order.st-unterwegs { border-left-color: var(--diamond); }
.order.st-erledigt, .order.st-storniert { opacity: .8; }
.order p { margin: 0; }
.o-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.o-head h2 { margin: 0; font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; font-size: 20px; flex: 1 1 auto; overflow-wrap: anywhere; }
.o-loc { overflow-wrap: anywhere; }
.o-note { color: var(--muted); font-style: italic; overflow-wrap: anywhere; }
.o-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.o-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.login { padding-block: 64px; max-width: 520px; display: grid; gap: 14px; }
.login p { margin: 0; }

@media (max-width: 760px) {
  .tools .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex-basis: 100%; }
  .tools .tabs::-webkit-scrollbar { display: none; }
  .tools .tab { flex: none; }
  .search { max-width: none; }
}

/* Live-Hinweise */
.bar .msgs { flex: 1 1 260px; display: grid; gap: 4px; min-width: 0; }
.bar .msgs .msg { flex: none; }
.bar .msg.warn { color: var(--diamond); font-weight: 500; }
.notice { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom, 0px)); z-index: 9; width: min(92vw, 520px); background: var(--stone); color: var(--ink); border: 2px solid var(--redstone-dim); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); padding: 12px 16px; font-size: 15px; line-height: 1.4; }
@media (max-width: 420px) {
  .deal .q { font-size: 16px; }
  .stack { font-size: 17px; right: 6px; }
  .o-head h2 { font-size: 18px; }
  .kpis b, .kpis b .p { font-size: 22px; }
  .kpis b .gem { width: 22px; height: 22px; }
  .code { font-size: 24px; }
  .dlg.plain-title .dlg-head h2 { font-size: 19px; }
}

/* Kopfleiste */
.topbar { background: var(--stone); border-bottom: 2px solid var(--slot-lo); position: relative; z-index: 5; }
.tb { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding-block: 8px; }
.tb-brand { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.tb-brand:hover { color: var(--redstone); }
.tb-right { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.tb-av { width: 32px; height: 32px; flex: none; display: inline-grid; place-items: center; background: var(--slot); box-shadow: inset 2px 2px 0 var(--slot-hi), inset -2px -2px 0 var(--slot-lo); overflow: hidden; }
.tb-av img { width: 32px; height: 32px; display: block; image-rendering: pixelated; }
.tb-ini { font-family: var(--font-body); font-weight: 700; font-size: 13px; color: var(--ink); }
.tb-name { font-weight: 700; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-badge { background: var(--redstone-dim); color: #fff; }
.tb-admin { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.tb-link { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; color: var(--muted); text-decoration: none; font-weight: 500; background: var(--slot); box-shadow: inset 2px 2px 0 var(--slot-hi), inset -2px -2px 0 var(--slot-lo); }
.tb-link:hover { color: var(--ink); }
.tb-link[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--redstone); }
.tb-n { font-family: var(--font-body); font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums lining-nums; background: var(--redstone); color: #fff; padding: 2px 6px; }
.user .o-head h2 { font-size: 20px; }
@media (max-width: 560px) {
  .tb-brand { font-size: 17px; }
  .tb-right { flex: 1 1 100%; }
  .tb-name { max-width: 10ch; }
  .tb-right .btn.small { padding-inline: 10px; }
}

/* Statistik */
.o-hist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums lining-nums; }
.st { position: relative; display: grid; gap: 22px; min-width: 0; }
.st-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.st-range { flex: 0 1 auto; }
.st-side { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.st-live { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.st-live .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.st-live .dot.on { background: #3fb950; animation: stpulse 2s ease-in-out infinite; }
@keyframes stpulse { 50% { box-shadow: 0 0 0 5px rgba(63, 185, 80, .25); } }
@media (prefers-reduced-motion: reduce) { .st-live .dot.on { animation: none; } }
.st-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.st-tile, .st-mini-tile { background: var(--stone); padding: 14px 16px; display: grid; gap: 4px; align-content: start; min-width: 0; box-shadow: inset 2px 2px 0 var(--slot-hi), inset -2px -2px 0 var(--slot-lo); }
.st-tile.main { box-shadow: inset 0 -4px 0 var(--redstone), inset 2px 2px 0 var(--slot-hi); }
.st-label { font-size: 13px; color: var(--muted); }
.st-value { font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; font-size: 26px; color: var(--ink); line-height: 1.1; overflow-wrap: anywhere; }
.st-value .p { font-size: inherit; }
.st-value .gem { width: 24px; height: 24px; }
.st-sub { font-size: 13px; color: var(--muted); }
.st-delta { font-weight: 700; }
.st-delta.up { color: #5fd375; }
.st-delta.down { color: #ff8a7e; }
.st-delta.flat { color: var(--muted); font-weight: 500; }
.st-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.st-mini-tile { padding: 10px 14px; }
.st-mini-tile .st-value { font-size: 18px; }
.st-mini-tile .st-value .gem { width: 18px; height: 18px; }
.st-sec { min-width: 0; background: var(--stone); padding: 16px; box-shadow: inset 2px 2px 0 var(--slot-hi), inset -2px -2px 0 var(--slot-lo); }
.st-sec h3 { margin: 0 0 10px; font-size: 17px; }
.st-sec > .muted { margin: 0 0 10px; }
.st-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.st-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.st-key .sw { display: inline-block; width: 14px; height: 10px; }
.st-key .sw.bar { background: var(--diamond); }
.st-key .sw.line { background: var(--gold); height: 3px; }
.st-chart { min-width: 0; overflow: hidden; }
.st-chart svg, .st-heat svg { display: block; max-width: none; }
.st-chart svg { width: 100%; height: auto; }
.st svg text { font-family: var(--font-body); font-variant-numeric: tabular-nums lining-nums; }
.st svg .ax { fill: var(--muted); font-size: 12px; }
.st svg .lbl { fill: var(--ink); font-size: 13px; }
.st svg .lbl.val { font-weight: 700; }
.st svg .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.st svg .bar { fill: var(--diamond); }
.st svg .track { fill: var(--slot); }
.st svg .line { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.st svg .dot { fill: var(--stone); stroke: var(--gold); stroke-width: 2; }
.st svg .area { fill: rgba(242, 179, 58, .22); }
.st svg .hit { fill: transparent; cursor: crosshair; }
.st svg .hit:hover { fill: rgba(255, 255, 255, .08); }
.st-heat { overflow-x: auto; max-width: 100%; padding-bottom: 6px; }
.st-heat svg .cell { fill: var(--redstone); cursor: crosshair; }
.st-heat svg .cell.zero { fill: var(--slot); fill-opacity: 1; }
.st-heat svg .cellnum { fill: #fff; font-size: 10px; font-weight: 700; }
.st-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.st-legend .lg { width: 22px; height: 14px; background: var(--redstone); display: inline-block; }
.st-legend .lg.zero { background: var(--slot); }
.st-tip { position: absolute; z-index: 8; transform: translate(-50%, -100%); pointer-events: none; background: #0d0a10; color: var(--ink); border: 1px solid var(--slot-hi); padding: 8px 10px; display: grid; gap: 2px; font-size: 13px; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); }
.st-tip[hidden] { display: none; }
.st-tip-h { font-weight: 700; }
.st-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.st-rows li { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 0; border-bottom: 1px solid var(--line); }
.st-rows .rk { flex: none; width: 22px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums lining-nums; text-align: right; }
.st-rows .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.st-rows .ct { flex: none; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums lining-nums; }
.st-rows .line-ico { flex: none; }
.st-facts { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.st-facts b { color: var(--ink); }
.st-mini { flex: 0 1 auto; margin-bottom: 8px; }
.tb-av.sm { width: 24px; height: 24px; flex: none; }
.tb-av.sm img { width: 24px; height: 24px; }
@media (max-width: 820px) {
  .st-two { grid-template-columns: minmax(0, 1fr); }
  .st-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .st-value { font-size: 22px; }
  .st-sec { padding: 12px; }
  .st-rows li { flex-wrap: wrap; row-gap: 2px; }
  .st-rows .nm { flex-basis: 40%; }
}

/* Koordinaten und Ingame-Mod */
.coords { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; min-width: 0; }
.coords legend { padding: 0; font-weight: 700; margin-bottom: 6px; }
.coord-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.modbox { display: grid; gap: 18px; max-width: 720px; }
.mod-steps { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 4px; color: var(--muted); }
.mod-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mod-row .nm { flex: 1 1 260px; min-width: 0; }
