:root {
  --bg: #14110e;
  --panel: #1d1915;
  --panel2: #25201a;
  --line: #3a3229;
  --text: #ece4d6;
  --muted: #9d9282;
  --gold: #d9a845;
  --gold-dim: #8a6a2c;
  --green: #7fb36a;
  --red: #d06a5a;
  --radius: 8px;
  font-size: 15px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 1rem/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
h1, h2, h3 { font-weight: 600; margin: 0 0 .6rem; }
h2 { font-size: 1.05rem; color: var(--gold); letter-spacing: .02em; }

.top {
  display: flex; align-items: center; gap: 1.5rem; padding: .7rem 1.5rem;
  background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--text); font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.coin { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe39a, var(--gold) 55%, var(--gold-dim)); box-shadow: 0 0 0 2px #00000055; }
nav { display: flex; align-items: center; gap: 1rem; flex: 1; }
nav > a { color: var(--muted); padding: .25rem 0; border-bottom: 2px solid transparent; }
nav > a.on, nav > a:hover { color: var(--text); border-color: var(--gold); text-decoration: none; }
nav .sep { flex: 1; }
.menu { position: relative; }
.menu summary { cursor: pointer; color: var(--muted); list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " ▾"; }
.menu-body { position: absolute; right: 0; top: 1.8rem; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem 0; min-width: 210px; box-shadow: 0 10px 30px #0008; }
.menu-body a { display: block; padding: .4rem 1rem; color: var(--text); }
.menu-body a:hover { background: var(--panel); text-decoration: none; }

main { padding: 1.25rem 1.5rem 3rem; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1.1rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem 1rem; }
.stat b { display: block; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.gold b { color: var(--gold); }

.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .8rem; }
input, select, button {
  font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line);
  border-radius: 6px; padding: .45rem .7rem;
}
input:focus, select:focus { outline: 2px solid var(--gold-dim); outline-offset: 0; }
input[type=search] { min-width: 240px; flex: 1; max-width: 360px; }
button { cursor: pointer; background: var(--gold); color: #1b140a; border-color: var(--gold); font-weight: 600; }
button:hover { filter: brightness(1.08); }
button.ghost { background: transparent; color: var(--text); border-color: var(--line); font-weight: 500; }
button.danger { background: transparent; color: var(--red); border-color: #6b3a32; }
.chk { display: inline-flex; gap: .4rem; align-items: center; color: var(--muted); cursor: pointer; }
.chk input { accent-color: var(--gold); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table.grid { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.grid th, .grid td { padding: .45rem .6rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.grid th { position: sticky; top: 0; background: var(--panel2); font-weight: 600; color: var(--muted); font-size: .85rem; cursor: pointer; user-select: none; }
.grid th.sorted { color: var(--gold); }
.grid th.sorted::after { content: attr(data-dir); margin-left: .3rem; }
.grid tbody tr:hover { background: #2a241d; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid .num { text-align: right; }
.grid td.cat { color: var(--muted); font-size: .85rem; white-space: normal; min-width: 140px; max-width: 240px; overflow-wrap: anywhere; }
.grid td.item a { color: var(--text); font-weight: 500; }
.grid td.item a:hover { color: var(--gold); }
.grid.small th, .grid.small td { padding: .3rem .6rem; font-size: .88rem; }
.grid input.shop { width: 100px; text-align: right; padding: .25rem .5rem; }
.grid input.shop::placeholder { color: #5f5649; font-style: italic; }
.grid input.shop.set { border-color: var(--gold-dim); color: var(--gold); }
.grid input.shop.saved { border-color: var(--green); }
.tier { display: inline-block; min-width: 1.6rem; text-align: center; border-radius: 4px; font-size: .8rem; padding: 0 .3rem; background: #2f2a22; }
.t5 { background: #4b3a14; color: #f0c560; } .t4 { background: #3a2d4b; color: #c9a5f0; }
.t3 { background: #1f3550; color: #8fc0f0; } .t2 { background: #23402a; color: #9fd68f; }
.perk { display: inline-block; font-family: ui-monospace, monospace; font-size: .75rem; color: var(--muted); background: #2a251f; border-radius: 4px; padding: 0 .3rem; margin-right: .2rem; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.panel .table-wrap { border: 0; background: transparent; }
.crumbs { color: var(--muted); margin: 0 0 .2rem; font-size: .9rem; }
.item-title { font-size: 1.6rem; margin-bottom: 1rem; word-break: break-all; }
.shop-edit .row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.shop-edit #shopNote { flex: 1; min-width: 200px; }
.suggest { margin-top: .6rem; color: var(--muted); font-size: .9rem; }
.suggest button { padding: .2rem .6rem; font-size: .85rem; }

.chart { width: 100%; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line); }
.chart .gridline { stroke: #2c261f; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .dot { fill: var(--gold); fill-opacity: .8; }
.chart .dot:hover { fill: #fff; }
.chart .shopline { stroke: var(--green); stroke-dasharray: 5 4; stroke-width: 1.5; }
.chart .line { fill: none; stroke: var(--gold); stroke-width: 2; }
.chart .line2 { fill: none; stroke: #8fc0f0; stroke-width: 2; }

.drop { display: flex; align-items: center; justify-content: center; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); padding: 2rem; cursor: pointer; transition: .15s; }
.drop:hover, .drop.over { border-color: var(--gold); background: #221d17; }
.drop input { display: none; }
.log { margin-top: .8rem; }
.log div { padding: .3rem 0; }
.ok { color: var(--green); } .err { color: var(--red); }
.capture { border-top: 1px solid var(--line); padding: .6rem 0; }
.capture:first-of-type { border-top: 0; }
.capture summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.capture .cap-name { font-weight: 600; }
.capture table { margin: .7rem 0; }
.pill { font-size: .8rem; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 0 .55rem; }
.pill.warn { color: var(--red); border-color: #6b3a32; }
.actions { display: flex; gap: .5rem; justify-content: flex-end; }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; width: min(420px, 92vw); }
dialog::backdrop { background: #000a; }
.bulk-form { display: flex; flex-direction: column; gap: .8rem; }
.bulk-form label:not(.chk) { display: flex; flex-direction: column; gap: .3rem; color: var(--muted); font-size: .9rem; }
.empty { text-align: center; padding: 4rem 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }

.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--gold-dim); padding: .55rem 1rem; border-radius: var(--radius); box-shadow: 0 8px 24px #0009; z-index: 50; }

@media (max-width: 700px) {
  main { padding: 1rem .7rem 3rem; }
  .top { padding: .6rem .8rem; gap: .8rem; }
  input[type=search] { min-width: 0; max-width: none; width: 100%; }
}

.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.lang-toggle button { background: transparent; color: var(--muted); border: 0; border-radius: 0; padding: .2rem .55rem; font-size: .8rem; font-weight: 600; }
.lang-toggle button + button { border-left: 1px solid var(--line); }
.lang-toggle button.on { background: var(--gold); color: #1b140a; }
.lang-toggle button:not(.on):hover { color: var(--text); filter: none; }

.grid td.item .iid { display: block; font-size: .75rem; color: var(--muted); font-family: ui-monospace, monospace; }
.item-title { margin-bottom: .1rem; }
.item-id { font-family: ui-monospace, monospace; font-size: .85rem; margin: 0 0 1rem; }
button.perk { font: inherit; font-size: .8rem; font-weight: 500; color: #8fc0f0; background: #1c2a38; border: 1px solid #2c4258;
  border-radius: 4px; padding: .05rem .45rem; margin: .1rem .25rem .1rem 0; cursor: pointer; }
button.perk:hover { filter: brightness(1.2); }
button.perk.gem { color: #c9a5f0; background: #2a2238; border-color: #45385c; }
button.perk.inherent { color: #e6c27a; background: #2e2618; border-color: #54452a; }
button.perk.unknown { color: var(--muted); background: #2a251f; border-color: var(--line); font-family: ui-monospace, monospace; }
button.perk.sel { outline: 2px solid var(--gold); color: #fff; }
.grid td.perks { white-space: normal; min-width: 280px; }
.grid td.effect { white-space: normal; color: var(--muted); font-size: .88rem; min-width: 300px; }
.grid tr.clickable { cursor: pointer; }
.grid tr.sel { background: #2e2719; }
.ptype { font-size: .72rem; color: var(--muted); margin-left: .2rem; }
.filter-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #2e2719;
  border: 1px solid var(--gold-dim); border-radius: var(--radius); padding: .5rem .9rem; margin-bottom: 1rem; }
[hidden] { display: none !important; }
#perkPanel .table-wrap { max-height: 440px; overflow: auto; }

/* ---------- Tooltip-Karte im Spielstil ---------- */
@font-face { font-family: 'Nimbus'; src: url('/static/nw/fonts/NimbusSanL.ttf') format('truetype'); font-weight: 400; }
@font-face { font-family: 'Nimbus'; src: url('/static/nw/fonts/NimbusSanL-Bold.ttf') format('truetype'); font-weight: 700; }
@font-face { font-family: 'Nimbus'; src: url('/static/nw/fonts/NimbusSanL-Italic.ttf') format('truetype'); font-style: italic; }
@font-face { font-family: 'Caslon'; src: url('/static/nw/fonts/CaslonAntique.ttf') format('truetype'); }
@font-face { font-family: 'Caslon'; src: url('/static/nw/fonts/CaslonAntique-Italic.ttf') format('truetype'); font-style: italic; }

.nwc {
  --c0: #dddddd; --c1: #666666; --c2: #2e3236;
  width: 380px; max-width: 100%; font-family: 'Nimbus', system-ui, sans-serif; font-size: 15px; line-height: 1.3;
  color: #ebe3d6; background: #000;
  border: 10px solid transparent; border-image: url('/static/nw/frame-bg.png') 17 / 10px stretch;
  box-shadow: 0 10px 40px #000c;
}
.nwc-uncommon  { --c0: #34ec5b; --c1: #00ab1a; --c2: #19451c; }
.nwc-rare      { --c0: #72ffff; --c1: #31bdeb; --c2: #144f5d; }
.nwc-epic      { --c0: #ff57ff; --c1: #e600de; --c2: #421849; }
.nwc-legendary { --c0: #ffa535; --c1: #f07808; --c2: #55371c; }
.nwc-artifact  { --c0: #ff7c55; --c1: #b42e0a; --c2: #63230e; }
.nwc-head {
  display: flex; gap: .8rem; padding: 7px; position: relative;
  background: var(--head-bg) 50% 50% / cover, var(--c2);
  border: 1px solid transparent; border-image: url('/static/nw/frame-border.png') 2 / 1px stretch;
}
.nwc-icon {
  width: 100px; height: 100px; flex: none; position: relative;
  background: var(--sq-bg) 0 0 / 100% 100% no-repeat;
  border: 1px solid transparent; border-image: var(--sq-border) 2 / 2px stretch;
}
.nwc-icon-img { position: absolute; inset: 1px; width: calc(100% - 2px); height: calc(100% - 2px); object-fit: cover; }
.nwc-tier { position: absolute; top: 1px; left: 5px; font-family: 'Caslon', serif; font-style: italic; font-size: 17px; color: #fff; text-shadow: 0 1px 2px #000; z-index: 2; }
.nwc-title { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 1px 0 2px; }
.nwc-name { font-weight: 700; font-size: 21px; color: var(--c0); line-height: 1.15; overflow-wrap: anywhere; }
.nwc-title > div:last-child { margin-bottom: 0; }
.nwc-rarity { color: var(--c0); font-size: 16px; margin-top: .5rem; }
.nwc-type { color: #ebe3d6; font-size: 16px; }
.nwc-body { padding: 12px 16px 14px; }
.nwc-sec + .nwc-sec { margin-top: 9px; padding-top: 9px; background: url('/static/nw/frame-divider.png') top / auto 1px repeat-x; background-blend-mode: normal; position: relative; }
.nwc-sec + .nwc-sec::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: #ffffff1f; }
.nwc-gs { display: flex; align-items: center; gap: .3rem; margin-bottom: .35rem; }
.nwc-gs img { width: 40px; height: 40px; }
.nwc-gs span { font-family: 'Caslon', serif; font-size: 52px; line-height: .9; color: #fff; }
.nwc-stat { font-size: 16px; color: #cfc7b8; }
.nwc-stat b { color: #fff; }
.nwc-perks { display: flex; flex-direction: column; gap: .45rem; }
.nwc-perk { display: flex; gap: .6rem; color: #3b8fdc; font-size: 16px; }
.nwc-perk b { font-weight: 700; }
.nwc-perk.unknown { color: #8a8a8a; }
.nwc-perk-icon { width: 24px; height: 24px; flex: none; position: relative; margin-top: 1px; }
.nwc-perk-icon img { position: absolute; inset: 0; width: 24px; height: 24px; object-fit: contain; }
.nwc-perk-icon img.sock { transform: scale(1.25); }
.nwc-desc { font-style: italic; color: #d4c194; font-size: 16px; }
.nwc-info { font-size: 16px; color: #cfc7b8; }
.nwc-info b { color: #fff; }
.nwc-float { position: fixed; z-index: 100; pointer-events: none; }

/* Item-Seite mit Karte rechts */
.item-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.2rem; align-items: start; }
.item-layout .card-col { position: sticky; top: 72px; }
.item-layout .main-col { min-width: 0; }
.card-col .muted { margin: .4rem 0 0; text-align: center; }
.grid tbody tr.selected { background: #2e2719; }
.grid tbody tr[data-i] { cursor: pointer; }
.grid td.item .item-cell { display: flex; align-items: center; gap: .55rem; }
.mini-icon { width: 34px; height: 34px; flex: none; position: relative; background: url('/static/nw/itemraritybgsquare0.png') 0 0 / 100% 100%;
  border: 1px solid transparent; border-image: url('/static/nw/itembgsquare0.png') 2 / 1px stretch; }
.mini-icon img { position: absolute; inset: 1px; width: calc(100% - 2px); height: calc(100% - 2px); object-fit: cover; }
@media (max-width: 1000px) {
  .item-layout { grid-template-columns: minmax(0, 1fr); }
  .item-layout .card-col { position: static; order: -1; display: flex; flex-direction: column; align-items: center; }
}

/* Login / Admin */
.admin-badge { font-size: .75rem; font-weight: 700; color: #1b140a; background: var(--gold); border-radius: 4px; padding: .1rem .45rem; }
.small-btn { padding: .2rem .6rem; font-size: .85rem; }
.login-link { color: var(--muted); font-size: .9rem; }
.login-panel { max-width: 420px; margin: 3rem auto; }
.login-form { display: flex; flex-direction: column; gap: .8rem; }
.login-form label { display: flex; flex-direction: column; gap: .3rem; color: var(--muted); font-size: .9rem; }
.shop-ro { color: var(--gold); }
.shop-view { font-size: 1.1rem; }

/* Server */
.gs-filter { display: inline-flex; gap: .3rem; }
.gs-filter input { width: 82px; }
.server-select { padding: .25rem .5rem; font-size: .85rem; max-width: 240px; }
.srv-pill { color: var(--gold); border-color: var(--gold-dim); }
.srv-pick { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; color: var(--muted); }
#serverTable input { width: 100%; padding: .25rem .5rem; }
#serverTable td.actions { justify-content: flex-end; white-space: nowrap; }
#serverCompare tr.selected { background: #2e2719; }

/* Kategorie-Navigation wie im Trading Post */
.cat-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 1rem; align-items: start; }
.catnav { display: flex; align-items: stretch; gap: 0; flex: none; position: sticky; top: 64px; max-height: calc(100vh - 80px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cat-rail { display: flex; flex-direction: column; flex: none; width: 52px; background: #17130f; border-right: 1px solid var(--line); overflow-y: auto; }
.cat-rail button { display: flex; align-items: center; justify-content: center; height: 52px; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--muted); }
.cat-rail button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cat-rail button:hover { color: var(--text); filter: none; background: #211c16; }
.cat-rail button.on { color: var(--gold); background: var(--panel2); box-shadow: inset 3px 0 0 var(--gold); }
.cat-list { flex: 1; min-width: 0; padding: .4rem .9rem .9rem; overflow-y: auto; }
.cat-back { display: inline-flex; align-items: center; gap: .3rem; margin: .3rem 0 0; padding: .25rem .65rem .25rem .35rem; font-size: .85rem; font-weight: 600;
  background: var(--panel2); color: var(--text); border-color: var(--line); }
.cat-back svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cat-title { font-family: 'Caslon', Georgia, serif; font-size: 1.35rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text); padding: .8rem 0 .6rem;
  border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.cat-entry { display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%; padding: .55rem .4rem; text-align: left; font-weight: 400;
  background: transparent; color: var(--text); border: 0; border-bottom: 1px solid #2a241d; border-radius: 0; }
.cat-entry:hover { background: #26201a; filter: none; color: #fff; }
.cat-entry.sel { background: linear-gradient(90deg, #4a3913, #2c2412 70%, transparent); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.cat-entry > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.cat-list.root .cat-entry { font-family: 'Caslon', Georgia, serif; font-size: 1.05rem; letter-spacing: .1em; text-transform: uppercase; padding: .85rem .4rem; }
.cat-count { display: inline-flex; align-items: center; gap: .3rem; flex: none; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cat-count svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.cat-count.none { color: var(--red); }
.cat-main { min-width: 0; }

/* Einstellungen / ausblendbare Spalten */
.settings { max-width: 640px; }
.set-list { display: flex; flex-direction: column; gap: .15rem; margin: .8rem 0 1rem; }
.set-list .chk { padding: .35rem .2rem; color: var(--text); }
.set-list .chk input { width: 1.05rem; height: 1.05rem; }
.set-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
#items[data-hide~="category"] [data-col="category"], #items[data-hide~="tier"] [data-col="tier"], #items[data-hide~="gs"] [data-col="gs"],
#items[data-hide~="listings"] [data-col="listings"], #items[data-hide~="quantity"] [data-col="quantity"], #items[data-hide~="min"] [data-col="min"],
#items[data-hide~="median"] [data-col="median"], #items[data-hide~="avg"] [data-col="avg"], #items[data-hide~="max"] [data-col="max"],
#items[data-hide~="shop"] [data-col="shop"], #items[data-hide~="icon"] .mini-icon, #items[data-hide~="itemid"] .iid { display: none; }

/* ---------- Tablet / Handy ---------- */
.cat-toggle { display: none; }
@media (max-width: 1100px) {
  .cat-layout { grid-template-columns: 260px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .cat-layout { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .cat-toggle { display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%; text-align: left; font-weight: 600;
    background: var(--panel); color: var(--text); border-color: var(--line); padding: .6rem .8rem; }
  .cat-toggle::after { content: '▾'; color: var(--gold); }
  .cat-layout.open .cat-toggle::after { content: '▴'; }
  .cat-toggle span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .catnav { display: none; position: static; max-height: none; flex-direction: column; }
  .cat-layout.open .catnav { display: flex; }
  .cat-rail { flex-direction: row; width: auto; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; }
  .cat-rail button { flex: none; width: 52px; border-bottom: 0; border-right: 1px solid var(--line); }
  .cat-rail button.on { box-shadow: inset 0 -3px 0 var(--gold); }
  .cat-list { max-height: 320px; }
}
@media (max-width: 700px) {
  .stat { padding: .55rem .8rem; }
  .stat b { font-size: 1.2rem; }
  .toolbar > input[type=search] { flex: 1 1 100%; }
  .toolbar > select, .toolbar > .gs-filter { flex: 1 1 140px; }
  .gs-filter input { width: 100%; min-width: 0; flex: 1; }
  .panel { padding: .8rem; overflow-x: auto; }
  .capture table { display: block; overflow-x: auto; }
  .item-title { font-size: 1.3rem; }
  .login-panel { margin: 1.5rem auto; }
}
@media (max-width: 1000px) {
  .card-col #card { width: 100%; max-width: 380px; }
}
@media (max-width: 700px) {
  #serverTable { min-width: 560px; }
  #serverTable input { min-width: 110px; }
}

@media (max-width: 1000px) {
  .top { position: static; flex-wrap: wrap; gap: .5rem .9rem; padding: .6rem .8rem; }
  .top nav { flex: 1 1 100%; flex-wrap: wrap; gap: .5rem .9rem; }
  nav .sep { display: none; }
  .server-select { flex: 1 1 150px; max-width: none; }
  .menu-body { position: fixed; left: .8rem; right: .8rem; top: auto; margin-top: .5rem; min-width: 0; }
}

@media (max-width: 900px) {
  /* Item-Uebersicht als Karten statt Tabelle */
  #items { display: block; }
  #items thead { display: none; }
  #items tbody { display: block; }
  #items tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .35rem .8rem; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
  #items tbody tr:last-child { border-bottom: 0; }
  #items td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; min-width: 0; }
  #items td.item { grid-column: 1 / -1; }
  #items td.cat { grid-column: 1 / -1; max-width: none; min-width: 0; order: 1; font-size: .78rem; }
  #items td[data-label]::before { content: attr(data-label); display: block; font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  #items td.item::before, #items td.cat::before { content: none; }
  #items input.shop { width: 100%; text-align: left; }
  .table-wrap { background: transparent; }
}

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; }
.back-btn { display: inline-flex; align-items: center; padding: .15rem .7rem; margin-right: .3rem; font-weight: 600; color: var(--text); background: var(--panel2);
  border: 1px solid var(--line); border-radius: 6px; }
.back-btn:hover { text-decoration: none; border-color: var(--gold-dim); color: var(--gold); }

/* Diagramm-Tooltips (sofort, statt Browser-Title) */
.chart-tip { position: fixed; z-index: 60; pointer-events: none; max-width: 300px; background: var(--panel2); border: 1px solid var(--gold-dim); border-radius: 6px;
  padding: .35rem .6rem; font-size: .85rem; line-height: 1.35; white-space: pre-line; box-shadow: 0 6px 20px #0009; }
.chart .dot { stroke: #0000; stroke-width: 12px; }
.chart .hit { stroke: #0000; stroke-width: 14px; fill: none; }
