:root {
  color-scheme: dark;
  --bg: #121211;
  --surface-1: #1a1a19;
  --surface-2: #222220;
  --surface-3: #2c2c29;
  --border: #383835;
  --text-primary: #f0efec;
  --text-secondary: #c3c2b7;
  --text-muted: #8f8e86;
  --accent: #e0b03a;
  --accent-ink: #231a00;
  --link: #6da7ec;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --good: #0ca30c; --critical: #d03b3b; --warning: #fab219;
  --up: #3ec46d; --down: #ef6b6b;
  --div-neg: #e66767; --div-pos: #3987e5; --div-mid: #383835;
  --grid: rgba(255,255,255,.07);
  --q0: #9d9d9d; --q1: #ffffff; --q2: #1eff00; --q3: #0070dd; --q4: #a335ee; --q5: #ff8000; --q6: #e6cc80; --q7: #00ccff;
  --gold: #ffd100; --silver: #c7c7cf; --copper: #d08a52;
  --neutral: #c9a227; --alle: #3987e5; --allianz: #3f7fe0; --horde: #d23c3c;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0,0,0,.35);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f3ef;
  --surface-1: #fcfcfb;
  --surface-2: #f0efec;
  --surface-3: #e6e5e0;
  --border: #d9d8d2;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #77766f;
  --accent: #b88600;
  --accent-ink: #fff;
  --link: #1c5cab;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --up: #0a7d2c; --down: #c22f2f;
  --div-mid: #f0efec; --div-pos: #2a78d6; --div-neg: #e34948;
  --grid: rgba(0,0,0,.07);
  --q1: #3a3a3a; --q2: #138a00; --q3: #0062c4; --q4: #8a2fd0; --q5: #d46a00; --q6: #a08a40; --q7: #0094b8;
  --gold: #a07c00; --silver: #6d6d78; --copper: #a0602c;
  --shadow: 0 6px 24px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text-primary); }
body { font-size: 14px; line-height: 1.45; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; font-weight: 650; }
h2 { font-size: 16px; margin: 0 0 10px; font-weight: 620; }
h3 { font-size: 13px; margin: 0 0 8px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
button, input, select { font: inherit; color: inherit; }

/* ------------------------------------------------------------ Kopf */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px 20px;
  background: color-mix(in srgb, var(--surface-1) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.coin { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-family: Georgia, serif; font-weight: 700; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { padding: 6px 10px; border-radius: 8px; color: var(--text-secondary); font-weight: 520; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text-primary); }
.nav a.active { background: var(--surface-3); color: var(--text-primary); }
.badge[hidden] { display: none; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; text-align: center; font-weight: 700; }
.topctl { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.topctl select { max-width: 260px; }
.market { display: inline-flex; align-items: stretch; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); padding: 2px; gap: 2px; }
.market button { border: 0; background: none; padding: 4px 11px; border-radius: 7px; cursor: pointer; color: var(--text-secondary); font-weight: 560; white-space: nowrap; }
.market button:hover { color: var(--text-primary); }
.market button.on { background: var(--surface-3); color: var(--text-primary); box-shadow: inset 0 -2px 0 var(--accent); }
.market button[data-k="allianz"].on { box-shadow: inset 0 -2px 0 var(--allianz); }
.market button[data-k="horde"].on { box-shadow: inset 0 -2px 0 var(--horde); }
.market button[data-k="neutral"].on { box-shadow: inset 0 -2px 0 var(--neutral); }
.market select { border: 0; background: none; min-height: 30px; max-width: 150px; color: var(--text-secondary); padding: 2px 6px; cursor: pointer; }
.market select.on { color: var(--text-primary); background: var(--surface-3); border-radius: 7px; }
.quick { position: relative; }
.quick input { width: 220px; }
.iconbtn { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; }

input[type=search], input[type=text], input[type=number], select {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px; min-height: 34px; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
input[type=number] { width: 100px; }

.ac { position: absolute; top: calc(100% + 4px); right: 0; width: 420px; max-width: calc(100vw - 32px); max-height: 480px; overflow: auto; background: var(--surface-1);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 40; padding: 4px; }
.filters .ac { left: 0; right: auto; }
.ac a { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; color: var(--text-primary); }
.ac a:hover, .ac a.sel { background: var(--surface-3); text-decoration: none; }
.ac .acmain { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ac .acname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac .acname mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.ac .acsub { display: block; font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac .acprice { text-align: right; font-size: 13px; flex: none; }
.ac .acall { justify-content: center; color: var(--link); font-size: 13px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; margin-top: 2px; }
.ac .acempty { padding: 12px; color: var(--text-muted); text-align: center; }
.ico.md { width: 34px; height: 34px; border-radius: 6px; border-width: 2px; }
.fresh { white-space: nowrap; }
.fresh:hover { text-decoration: none; color: var(--text-primary); }
@media (max-width: 1100px) { .topctl .fresh { display: none; } }

/* ----------------------------------------------------------- Layout */
main { padding: 20px; max-width: 1500px; margin: 0 auto; outline: none; }
.pagehead { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.pagehead .sub { color: var(--text-muted); }
.crumbs { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }
.crumbs a { color: var(--text-secondary); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g32 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 1000px) { .g2, .g3, .g32 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card.flush { padding: 0; }
.card.flush > h2 { padding: 14px 16px 0; }
.cardhead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.cardhead h2 { margin: 0; }
.cardhead .right { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.mt { margin-top: 16px; }
.loading, .empty { padding: 40px; text-align: center; color: var(--text-muted); }
.error { padding: 16px; border: 1px solid var(--critical); border-radius: var(--radius); color: var(--text-primary); background: color-mix(in srgb, var(--critical) 12%, transparent); }
.note { padding: 10px 14px; border-radius: 8px; background: var(--surface-2); color: var(--text-secondary); font-size: 13px; }

/* KPI-Kacheln */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.kpi .l { font-size: 12px; color: var(--text-muted); }
.kpi .v { font-size: 20px; font-weight: 650; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .d { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Buttons / Segmente */
.btn { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; cursor: pointer; min-height: 34px; }
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.btn.small { padding: 3px 8px; min-height: 26px; font-size: 12px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { background: var(--surface-2); border: 0; padding: 5px 11px; cursor: pointer; border-right: 1px solid var(--border); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--surface-3); color: var(--text-primary); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.toggles { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.toggles label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }

/* Filterleiste */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 14px; }
.catfilter { margin: 12px 0 14px; padding: 12px 16px; }
.catfilter .range input { width: 72px; }
h2 .catcount { font-weight: 400; }
.filters .f { display: flex; flex-direction: column; gap: 3px; }
.filters .f > span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.filters .range { display: flex; gap: 4px; align-items: center; }
.qual { display: flex; gap: 4px; }
.qual label { cursor: pointer; }
.qual input { display: none; }
.qual span { display: inline-block; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); font-size: 12px; background: var(--surface-2); }
.qual input:checked + span { border-color: currentColor; background: var(--surface-3); font-weight: 600; }

/* Tabellen */
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.t th, .t td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.t th { font-size: 12px; color: var(--text-muted); font-weight: 600; position: sticky; top: 0; background: var(--surface-1); }
.t th.sortable { cursor: pointer; user-select: none; }
.t th.sortable:hover { color: var(--text-primary); }
.t th.sorted::after { content: " ▼"; font-size: 10px; }
.t th.sorted.asc::after { content: " ▲"; }
.t td.n, .t th.n { text-align: right; }
.t tbody tr { cursor: pointer; }
.t tbody tr:hover { background: var(--surface-2); }
.t tbody tr.nohover { cursor: default; }
.t td.itemcell { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 10px 12px; color: var(--text-muted); font-size: 13px; }

/* Item-Darstellung */
.item { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ico { width: 26px; height: 26px; border-radius: 5px; border: 1px solid var(--border); flex: none; object-fit: cover; background: var(--surface-3);
  display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--text-muted); }
.ico.big { width: 56px; height: 56px; border-radius: 9px; font-size: 22px; border-width: 2px; }
.q0 { color: var(--q0); } .q1 { color: var(--q1); } .q2 { color: var(--q2); } .q3 { color: var(--q3); }
.q4 { color: var(--q4); } .q5 { color: var(--q5); } .q6 { color: var(--q6); } .q7 { color: var(--q7); }
.bq0 { border-color: var(--q0) !important; } .bq2 { border-color: var(--q2) !important; } .bq3 { border-color: var(--q3) !important; }
.bq4 { border-color: var(--q4) !important; } .bq5 { border-color: var(--q5) !important; }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.money .g { color: var(--gold); } .money .s { color: var(--silver); } .money .c { color: var(--copper); }
.money i { font-style: normal; font-size: .8em; margin-left: 1px; margin-right: 3px; opacity: .85; }
.up { color: var(--up); } .down { color: var(--down); }
.chg { font-weight: 600; white-space: nowrap; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: var(--surface-3); color: var(--text-secondary); white-space: nowrap; }
.pill.liq-h { background: color-mix(in srgb, var(--up) 16%, transparent); color: var(--up); }
.pill.liq-m { background: color-mix(in srgb, #d8a028 16%, transparent); color: #d8a028; }
.pill.liq-l { background: color-mix(in srgb, var(--down) 14%, transparent); color: var(--down); }
.spark { display: block; }
.bar { height: 6px; border-radius: 3px; background: var(--s1); min-width: 2px; }
.barcell { width: 140px; }

/* Charts */
.chartbox { position: relative; height: 340px; }
.chartbox.sm { height: 180px; }
.chartbox.md { height: 240px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }

/* Item-Kopf */
.itemhead { display: flex; gap: 14px; align-items: center; }
.itemhead .meta { color: var(--text-muted); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Kategorien */
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cat { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; cursor: pointer; display: block; color: var(--text-primary); }
.cat:hover { border-color: var(--accent); text-decoration: none; }
.cat .nm { font-weight: 650; font-size: 15px; }
.cat .row { display: flex; justify-content: space-between; color: var(--text-secondary); font-size: 13px; margin-top: 6px; }
.cat .bar { margin-top: 10px; }

/* Vergleich */
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 6px 4px 10px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; }
.chip button { background: none; border: 0; cursor: pointer; color: var(--text-muted); font-size: 14px; padding: 0 4px; }
.matrix td { text-align: center; font-size: 12px; min-width: 64px; }

/* Ladder */
.ladder td { padding: 4px 10px; }

/* Tooltip, Toast */
.vtip { position: fixed; z-index: 60; pointer-events: none; background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; box-shadow: var(--shadow); font-size: 12px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--border); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); z-index: 70; max-width: 90vw; }
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--text-secondary); }
.dropzone.over { border-color: var(--accent); background: var(--surface-2); }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

@media (max-width: 760px) {
  main { padding: 12px 16px; }
  .topbar { padding: 8px 16px; gap: 8px; }
  .topctl { margin-left: 0; width: 100%; }
  .quick { flex: 1; } .quick input { width: 100%; }
  .chartbox { height: 260px; }
}
.flow { margin: 0 0 12px; padding-left: 20px; color: var(--text-secondary); }
.flow li { margin-bottom: 6px; }
.flow b { color: var(--text-primary); }
.ac .acen { color: var(--text-secondary); font-style: italic; }

/* ---------------------------------------------------- Item-Seite (neu) */
.ihead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; margin-bottom: 16px; }
.ihead .who { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.ihead .ico.big { width: 64px; height: 64px; }
.ihead h1 { font-size: 26px; line-height: 1.15; }
.ihead .en { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.chiprow { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 12px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-secondary); white-space: nowrap; }
.tag b { color: var(--text-primary); font-weight: 600; }
a.tag:hover { text-decoration: none; border-color: var(--link); color: var(--text-primary); }
.ihead .actions { margin-left: 0; justify-content: flex-end; }
.ilayout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .ilayout { grid-template-columns: minmax(0, 1fr); } .ihead { grid-template-columns: minmax(0, 1fr); } }
.markets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 640px) { .markets { grid-template-columns: minmax(0, 1fr); } }
.mcard { position: relative; text-align: left; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 14px 20px; cursor: pointer; color: inherit; overflow: hidden; }
.mcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--mc, var(--alle)); opacity: .55; }
.mcard.neutral { --mc: var(--neutral); }
.mcard:hover { border-color: color-mix(in srgb, var(--mc, var(--alle)) 60%, var(--border)); }
.mcard.on { border-color: var(--mc, var(--alle)); box-shadow: 0 0 0 1px var(--mc, var(--alle)) inset; }
.mcard.on::before { opacity: 1; }
.mcard .mt1 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--text-muted); }
.mcard .mt1 b { color: var(--text-primary); font-weight: 620; font-size: 13.5px; }
.mcard .big { font-size: 28px; font-weight: 680; margin: 6px 0 4px; letter-spacing: -.01em; }
.mcard .mrow { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-secondary); }
.mcard .mrow span b { color: var(--text-primary); font-weight: 600; }
.mcard .none { color: var(--text-muted); padding: 14px 0 6px; }
.mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.mini .kpi { padding: 10px 12px; }
.mini .kpi .v { font-size: 17px; }
.wtip { background: linear-gradient(180deg, #0d1424, #070b14); border: 1px solid #3a4a6a; border-radius: 8px; padding: 12px 14px; color: #fff; font-size: 13px; line-height: 1.5; box-shadow: var(--shadow); }
:root[data-theme="light"] .wtip { box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.wtip .tn { font-size: 15px; font-weight: 650; margin-bottom: 2px; }
.wtip .ln { display: flex; justify-content: space-between; gap: 12px; }
.wtip .cg { color: #1eff00; } .wtip .cy { color: #ffd100; } .wtip .cb { color: #66bbff; } .wtip .cm { color: #9d9d9d; }
.wtip .q0 { color: #9d9d9d; } .wtip .q1 { color: #fff; } .wtip .q2 { color: #1eff00; } .wtip .q3 { color: #0070dd; } .wtip .q4 { color: #a335ee; } .wtip .q5 { color: #ff8000; }
.wtip .sell { margin-top: 6px; color: #fff; }
.side { display: flex; flex-direction: column; gap: 16px; }
.hgroup td.vb { color: var(--text-muted); font-size: 12px; font-weight: 600; letter-spacing: .03em; }
.fac { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.fac.Allianz { background: var(--allianz); } .fac.Horde { background: var(--horde); } .fac.Neutral { background: var(--neutral); } .fac.Alle { background: var(--alle); }
.pbar { position: relative; height: 6px; border-radius: 3px; background: var(--surface-3); min-width: 80px; }
.pbar i { position: absolute; top: -2px; width: 3px; height: 10px; border-radius: 2px; background: var(--text-primary); }
.hint { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 8px; font-size: 13px; background: color-mix(in srgb, var(--up) 12%, transparent); color: var(--text-primary); margin-bottom: 16px; }
.scope { display: inline-flex; align-items: center; gap: 6px; }

/* ------------------------------------------- Item-Seite: Fraktionen + Häuser */
.ftabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; background: var(--surface-1); }
.ftab { --fc: var(--allianz); display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n p" "n d"; align-items: center; gap: 0 10px; text-align: left; border: 0; border-right: 1px solid var(--border);
  background: none; padding: 10px 14px; cursor: pointer; color: var(--text-secondary); position: relative; }
.ftab:last-child { border-right: 0; }
.ftab.horde { --fc: var(--horde); } .ftab.neutral { --fc: var(--neutral); }
.ftab:hover { background: var(--surface-2); }
.ftab.on { background: var(--surface-2); color: var(--text-primary); }
.ftab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--fc); }
.ftab .fn { grid-area: n; font-weight: 650; font-size: 15px; display: flex; flex-direction: column; }
.ftab .fn small { font-weight: 400; font-size: 11.5px; color: var(--text-muted); margin-left: 14px; }
.ftab .fp { grid-area: p; font-size: 17px; font-weight: 650; text-align: right; }
.ftab .fd { grid-area: d; font-size: 11.5px; text-align: right; }
.hcards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (max-width: 1000px) { .hcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ftab { grid-template-columns: 1fr; grid-template-areas: "n" "p" "d"; padding: 8px 10px; } .ftab .fp { text-align: left; font-size: 15px; } .ftab .fd { text-align: left; } .ftab .fn small { display: none; } }
.hcard { text-align: left; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 13px; cursor: pointer; color: inherit; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hcard:hover { border-color: color-mix(in srgb, var(--link) 50%, var(--border)); }
.hcard.on { border-color: var(--link); box-shadow: 0 0 0 1px var(--link) inset; }
.hcard.total { background: var(--surface-2); }
.hcard.off { cursor: default; opacity: .6; }
.hcard .ht { display: flex; justify-content: space-between; gap: 6px; font-size: 12.5px; color: var(--text-muted); }
.hcard .ht b { color: var(--text-primary); font-weight: 620; }
.hcard .hp { font-size: 22px; font-weight: 680; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcard .hm { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--text-secondary); flex-wrap: wrap; }
.hcard .best { color: var(--gold); font-weight: 600; }
.folds { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.fold { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); }
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 16px; user-select: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover { background: var(--surface-2); border-radius: var(--radius); }
.fold .ft { font-weight: 620; }
.fold .fs { color: var(--text-muted); font-size: 12.5px; }
.fold .chev { margin-left: auto; transition: transform .15s; color: var(--text-muted); font-size: 18px; line-height: 1; }
.fold[open] .chev { transform: rotate(90deg); }
.fold .fb { padding: 4px 16px 16px; }
.fold .fb .mini { margin-bottom: 0; }
/* Ein/Aus-Schalter (Chart-Anzeige) */
.tgl { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tgl button { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-secondary); border-radius: 14px; padding: 4px 12px; font-size: 12.5px; cursor: pointer; }
.tgl button:hover { color: var(--text-primary); }
.tgl button.on { background: var(--surface-3); color: var(--text-primary); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); font-weight: 600; }
.infogrid { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .infogrid { grid-template-columns: minmax(0, 1fr); } }
.kv td { white-space: normal; }

/* ------------------------------------------- Item-Seite: Herstellung & Verwendung */
.rbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rbar label { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-secondary); }
.rchips { display: flex; flex-wrap: wrap; gap: 6px; }
.rchips button { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-secondary); border-radius: 14px; padding: 3px 11px; font-size: 12.5px; cursor: pointer; }
.rchips button span { color: var(--text-muted); margin-left: 3px; }
.rchips button:hover { color: var(--text-primary); }
.rchips button.on { background: var(--link); border-color: var(--link); color: #fff; }
.rchips button.on span { color: rgba(255,255,255,.8); }
.rnote { margin-bottom: 10px; }
.fold .fb h3 { font-size: 14px; margin: 14px 0 8px; }
.rhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rprof { margin-bottom: 12px; }
.rprof h4 { font-size: 13px; margin: 10px 0 4px; }
.tscroll { overflow-x: auto; }
.rt td, .rt th { padding: 5px 8px; }
@media (max-width: 640px) { .rt td, .rt th { padding: 5px 5px; } .rcard { padding: 8px; } .rind { padding-left: calc(var(--d, 0) * 12px); } }
.rt td.itemcell { max-width: none; width: 100%; white-space: normal; }
.rind { display: inline-flex; align-items: center; gap: 6px; padding-left: calc(var(--d, 0) * 20px); min-width: 0; }
.rind .item { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rtog { width: 20px; height: 20px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 5px;
  background: var(--surface-2); color: var(--text-secondary); cursor: pointer; font-size: 11px; padding: 0; line-height: 1; }
.rtog:hover { color: var(--text-primary); border-color: var(--link); }
.rtog.off { border-color: transparent; background: none; cursor: default; color: var(--text-muted); }
.rname { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.rcat { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt tr[data-d]:not([data-d="0"]) { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.rt tr.rsub td { border-bottom: 0; padding-top: 8px; }
.miss { color: var(--text-muted); font-style: italic; font-size: 12px; }
.rcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 10px; }
.rcard { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); padding: 10px 12px; min-width: 0; }
.rcard .t th { background: var(--surface-2); }
.rcardh { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 4px; }
.rfoot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 13px; color: var(--text-secondary); }
.rfoot b { color: var(--text-primary); font-weight: 600; }
.qlist { display: flex; flex-direction: column; gap: 6px; }
.qrow { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.qt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.qt a { font-weight: 600; color: var(--text-primary); }
.qrw { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.qri { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border-radius: 8px; }
.qri.me { background: color-mix(in srgb, var(--link) 18%, transparent); }
.qri .qp { font-size: 12.5px; }
.rt tr.me { background: color-mix(in srgb, var(--link) 14%, transparent); }
.sfx { margin-top: 8px; font-size: 12.5px; color: var(--cg, #1eff00); display: flex; flex-direction: column; gap: 2px; }
.olist { display: flex; flex-direction: column; gap: 4px; }
.orow { padding: 4px 0; border-bottom: 1px solid var(--border); }
.orow:last-child { border-bottom: 0; }
.srcnote { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--border); }
.rbook { margin: -2px 0 8px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.hero { padding: 22px 24px; margin-bottom: 18px; }
.hero h1 { margin: 0 0 4px; font-size: 22px; }
.hero p { margin: 0 0 14px; }
.herobox { position: relative; display: flex; gap: 8px; }
.herobox input { flex: 1; min-width: 0; font-size: 16px; padding: 11px 14px; }
.herobox .btn { flex: none; }
.hero-ac { left: 0; right: auto; width: 100%; max-width: 100%; }
.heroex { margin-top: 10px; }
@media (max-width: 600px) { .hero { padding: 16px; } .hero h1 { font-size: 19px; } }
.newver { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; display: flex; gap: 12px; align-items: center;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; box-shadow: 0 6px 24px rgba(0,0,0,.35);
  max-width: calc(100vw - 32px); }

/* ============================================================ WoW-Theme (dezent)
   Edle, subtile Anlehnung an das Auktionshaus-UI von WoW:
   tiefes Nachtblau, warme Pergament-Toene, Gold-Akzente,
   Serifen-Headlines und ein gepraegter Gold-Button.
   Reine Farb- und Detailarbeit - kein Layout geaendert. */

:root {
  --bg: #0b0f17;
  --surface-1: #121826;
  --surface-2: #1a2133;
  --surface-3: #232c42;
  --border: #2c3750;
  --text-primary: #f1e9d6;
  --text-secondary: #c9bfa9;
  --text-muted: #8f8976;
  --accent: #eec04b;
  --accent-ink: #2a1e00;
  --link: #84b6f4;
  --grid: rgba(240,220,160,.07);
}
:root[data-theme="light"] {
  --bg: #f2eee1;
  --surface-1: #fbf8ef;
  --surface-2: #f0ebdb;
  --surface-3: #e6dec9;
  --border: #d6cdb4;
  --text-primary: #251d0d;
  --text-secondary: #5c5340;
  --text-muted: #857a62;
  --accent: #a97e0b;
  --grid: rgba(90,70,20,.08);
}

/* Auswahl & Fokus in Gold */
::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); }
input:focus, select:focus, button:focus-visible { outline-color: var(--accent); }

/* Serifen-Headlines wie im Spielclient */
h1, .brand { font-family: Georgia, "Times New Roman", serif; letter-spacing: .01em; }
.brand { font-size: 16.5px; }
h1 { font-weight: 700; }

/* Topbar mit feiner Gold-Kante */
.topbar { border-bottom-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 14%, transparent); }
.nav a.active { color: var(--accent); }

/* Gepraegte Gold-Muenze im Logo */
.coin { background: radial-gradient(circle at 35% 30%, #ffe9a3, var(--accent) 55%, #9a7207);
  box-shadow: inset 0 -2px 3px rgba(0,0,0,.35), inset 0 1px 1px rgba(255,255,255,.55), 0 1px 2px rgba(0,0,0,.4); }

/* Karten: warmer Gold-Schleier im Rand, dezente Oberkante */
.card, .kpi, .cat, .fold, .mcard, .hcard, .rcard, .qrow {
  border-color: color-mix(in srgb, var(--border) 84%, var(--accent));
}
.card { box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }

/* Primaer-Button wie eine AH-Schaltflaeche */
.btn.primary { background: linear-gradient(180deg, #f6d576, #d9a41c);
  border: 1px solid #8f6d14; color: #2a1e00; font-weight: 650;
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 2px rgba(0,0,0,.3); }
.btn.primary:hover { background: linear-gradient(180deg, #ffe08a, #e3ae24); }
.btn.primary:active { background: linear-gradient(180deg, #d9a41c, #c3930f); box-shadow: inset 0 2px 3px rgba(0,0,0,.25); }

/* Hero-Suche mit leichtem Gold-Schimmer */
.hero { background: linear-gradient(160deg, var(--surface-1), color-mix(in srgb, var(--surface-2) 88%, var(--accent) 12%)); }

/* Kleine Ansichten: Marktauswahl bleibt erreichbar, kein abgeschnittener Selektor. */
@media (max-width: 760px) {
  .topctl { min-width: 0; width: 100%; flex-wrap: wrap; }
  .market { display: flex; flex-wrap: wrap; min-width: 0; max-width: 100%; }
  .market select { min-width: 0; max-width: 100%; }
}

.listing-status { display: block; white-space: normal; font-size: 11px; line-height: 1.4; font-weight: 400; }
.hcard .hp .listing-status, .ftab .fp .listing-status { white-space: normal; }

/* ------------------------------------------------------- Fußzeile & Abschnitte */
.foot { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  max-width: 1500px; margin: 26px auto 0; padding: 14px 20px 26px; color: var(--text-muted); font-size: 13px; border-top: 1px solid var(--border); }
.foot a { color: var(--text-secondary); }
.foot .badge { position: relative; top: -1px; }
/* Dezente News-Karte (Übersicht): kuratierte Gold-Guides + Feed-News */
/* Newsboard: eigener Abschnitt über der Suche (Gold-Guides + aktuelle News mit Icons) */
.newsboard { margin-bottom: 18px; padding: 15px 20px 12px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border)); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 9%, var(--surface-1)), var(--surface-1) 55%); box-shadow: 0 6px 22px #00000014; }
.newsboard-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.newsboard-title { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--accent-2); }
.newsboard-title svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.newsboard-note { flex: none; }
.newsboard-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 26px; }
.newsboard-sub { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin: 4px 0 2px; }
.newsrow { display: flex; align-items: center; gap: 11px; padding: 6px 8px; margin: 0 -8px; border-radius: 11px; text-decoration: none; color: var(--text-primary); min-width: 0; }
.newsrow:hover { background: color-mix(in srgb, var(--surface-2) 75%, transparent); }
.newsrow-text { min-width: 0; }
.newsrow b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--text-primary); }
.newsrow:hover b { color: var(--link); }
.newsrow small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.newsico { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; }
.newsico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.newsrow.guide .newsico { color: var(--s2); background: color-mix(in srgb, var(--s2) 14%, transparent); border: 1px solid color-mix(in srgb, var(--s2) 30%, transparent); }
.newsrow.blue .newsico { color: var(--s1); background: color-mix(in srgb, var(--s1) 13%, transparent); border: 1px solid color-mix(in srgb, var(--s1) 28%, transparent); }
.newsrow.news .newsico { color: var(--s3); background: color-mix(in srgb, var(--s3) 13%, transparent); border: 1px solid color-mix(in srgb, var(--s3) 28%, transparent); }
@media (max-width: 760px) { .newsboard-cols { grid-template-columns: 1fr; } .newsboard-head { flex-wrap: wrap; row-gap: 2px; } .newsboard-note { width: 100%; } }

.secthead { display: flex; align-items: baseline; gap: 12px; margin: 22px 0 12px; flex-wrap: wrap; }
.secthead h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 18px; }
.secthead .sub { color: var(--text-muted); font-size: 13px; }

/* Fokus-Listen: Item-Namen duerfen umbrechen, keine Querscrollbalken */
.g3 table.t { font-size: 12.5px; }
.g3 table.t td, .g3 table.t th { padding-left: 6px; padding-right: 6px; }
.g3 table.t td:first-child, .g3 table.t th:first-child { white-space: normal; overflow-wrap: anywhere; }

/* ============================================================ REDESIGN 2026-11
   "Das goldene Auktionshaus" - moderne, edle Nachtmarkt-Optik mit
   WoW-Charme: muenzfoermige Preise, Kerzenlicht-Gluehen, Pergament-
   Serifen, vergoldete Rahmen, Micro-Interactions. Reine Farb-/Form-
   Sprache, keine geschuetzten Assets. Cascade-Layer: gewinnt ueber
   gleich spezifische Altregeln. */

:root {
  --bg: #080c15;
  --surface-1: #101827;
  --surface-2: #162134;
  --surface-3: #1f2c45;
  --border: #2b3a56;
  --text-primary: #f3ecd9;
  --text-secondary: #cbc1ab;
  --text-muted: #918a74;
  --accent: #eec04b;
  --accent-2: #f7dc8a;
  --accent-deep: #9a7207;
  --accent-ink: #2a1e00;
  --link: #8ab8f5;
  --up: #4ecb7d; --down: #f27777;
  --grid: rgba(240,220,160,.08);
  --radius: 14px;
  --shadow: 0 10px 32px rgba(0,0,0,.45);
  --serif: Georgia, "Times New Roman", serif;
}
:root[data-theme="light"] {
  --bg: #f1ebdb;
  --surface-1: #fdfaf0;
  --surface-2: #f5efdf;
  --surface-3: #ebe3cd;
  --border: #d8ceb2;
  --text-primary: #2b2213;
  --text-secondary: #5b5240;
  --text-muted: #8a7f65;
  --accent: #a97e0b;
  --accent-2: #c49a2a;
  --accent-deep: #7d5c06;
  --accent-ink: #fffaf0;
  --link: #2a63b8;
  --up: #0d8a34; --down: #c22f2f;
  --grid: rgba(90,70,20,.09);
  --shadow: 0 8px 26px rgba(80,60,10,.12);
}

/* Grundflaeche: naechtliches Kerzenlicht bzw. Pergament */
html, body { background: var(--bg); }
body {
  background-image:
    radial-gradient(1100px 480px at 50% -140px, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    radial-gradient(900px 600px at 88% 8%, color-mix(in srgb, var(--allianz) 9%, transparent), transparent 65%),
    radial-gradient(800px 620px at 8% 22%, color-mix(in srgb, var(--horde) 7%, transparent), transparent 60%);
  background-attachment: fixed;
}
:root[data-theme="light"] body {
  background-image:
    radial-gradient(1100px 480px at 50% -140px, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(900px 700px at 90% 0%, rgba(255,255,255,.5), transparent 60%);
}

::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--text-primary); }

/* Sanfte Uebergaenge ueberall */
a, button, .card, .cat, .mcard, .hcard, .fold > summary, input, select, .tag, .pill {
  transition: border-color .16s ease, background-color .16s ease, box-shadow .18s ease, transform .18s ease, color .16s ease;
}

/* ---------------------------------------------------------- Kopfzeile */
.topbar {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 10%, transparent), 0 8px 28px rgba(0,0,0,.25);
}
.brand { font-family: var(--serif); font-size: 17px; letter-spacing: .015em; color: var(--text-primary); }
.coin {
  background: radial-gradient(circle at 34% 28%, #fff0b8, var(--accent) 52%, var(--accent-deep) 88%);
  color: var(--accent-ink);
  box-shadow: inset 0 -2px 3px rgba(0,0,0,.4), inset 0 1px 1px rgba(255,255,255,.6), 0 0 10px color-mix(in srgb, var(--accent) 45%, transparent);
  position: relative; overflow: hidden;
}
.coin::after { content: ""; position: absolute; top: -60%; left: -70%; width: 45%; height: 220%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.75), transparent);
  transform: rotate(8deg); transition: left .5s ease; }
.brand:hover .coin::after { left: 130%; }

.nav { gap: 4px; }
.nav a { border-radius: 10px; position: relative; padding: 7px 12px; }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transform: scaleX(.4); transition: opacity .18s, transform .18s; }
.nav a:hover::after { opacity: .55; transform: scaleX(1); }
.nav a.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-2); }
:root[data-theme="light"] .nav a.active { color: var(--accent-deep); }
.nav a.active::after { opacity: 1; transform: scaleX(1); }

/* Marktwahl: Segment mit Fraktionsgloedchen */
.market { border-radius: 12px; background: color-mix(in srgb, var(--surface-1) 82%, transparent); }
.market button { border-radius: 9px; }
.market button.on { background: var(--surface-3); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
.market button[data-k="allianz"].on { box-shadow: inset 0 -2px 0 var(--allianz), inset 0 0 0 1px color-mix(in srgb, var(--allianz) 30%, transparent); }
.market button[data-k="horde"].on { box-shadow: inset 0 -2px 0 var(--horde), inset 0 0 0 1px color-mix(in srgb, var(--horde) 30%, transparent); }
.market button[data-k="neutral"].on { box-shadow: inset 0 -2px 0 var(--neutral), inset 0 0 0 1px color-mix(in srgb, var(--neutral) 30%, transparent); }

.fresh.pill { background: color-mix(in srgb, var(--surface-2) 85%, transparent); border: 1px solid var(--border); padding: 4px 10px; }

/* Eingabefelder */
input[type=search], input[type=text], input[type=number], select {
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  border-color: color-mix(in srgb, var(--border) 90%, var(--accent));
  border-radius: 10px;
}
input:hover, select:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 1px;
  border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Buttons */
.btn { border-radius: 10px; }
.btn.primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent) 55%, #cf9a17);
  border: 1px solid var(--accent-deep); color: var(--accent-ink); font-weight: 700;
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 4px rgba(90,60,0,.35), 0 2px 6px rgba(0,0,0,.3), 0 0 14px color-mix(in srgb, var(--accent) 22%, transparent);
}
.btn.primary:hover { background: linear-gradient(180deg, #ffe9a8, var(--accent-2) 55%, var(--accent)); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 3px 10px rgba(0,0,0,.35), 0 0 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.primary:active { background: linear-gradient(180deg, #d9a41c, #c3930f); box-shadow: inset 0 2px 4px rgba(0,0,0,.3); transform: translateY(1px); }

/* ---------------------------------------------------------- Karten */
.card, .kpi, .cat, .fold, .mcard, .hcard, .rcard, .qrow {
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--border) 88%, var(--accent));
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-1) 96%, var(--accent) 4%), var(--surface-1));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 2px 10px rgba(0,0,0,.18);
}
:root[data-theme="light"] .card, :root[data-theme="light"] .kpi, :root[data-theme="light"] .cat,
:root[data-theme="light"] .fold, :root[data-theme="light"] .mcard, :root[data-theme="light"] .hcard,
:root[data-theme="light"] .rcard, :root[data-theme="light"] .qrow {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 10px rgba(90,70,20,.07);
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 32%, var(--border)); }
.cat:hover, .mcard:hover, .hcard:hover { transform: translateY(-2px); box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }

/* Abschnittskoepfe mit Raute und Serifen */
.secthead h2, .pagehead h1, .hero h1 { font-family: var(--serif); }
.secthead { position: relative; padding-left: 18px; }
.secthead::before { content: "❖"; position: absolute; left: 0; top: 1px; color: var(--accent); font-size: 13px;
  text-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent); }
.pagehead h1 { font-size: 26px; letter-spacing: .01em;
  background: linear-gradient(180deg, var(--text-primary) 62%, color-mix(in srgb, var(--text-primary) 60%, var(--accent)) );
  -webkit-background-clip: text; background-clip: text; }
.cardhead h2 { font-family: var(--serif); font-size: 17px; letter-spacing: .01em; }
h3 { letter-spacing: .09em; color: var(--text-muted); }

/* KPI-Kacheln */
.kpi .l { text-transform: uppercase; letter-spacing: .07em; font-size: 11px; color: var(--text-muted); }
.kpi .v { font-family: var(--serif); font-size: 23px; font-weight: 700; letter-spacing: .01em; }
.kpi .v .money, .kpi .money { font-family: var(--serif); }

/* ---------------------------------------------------------- Tabellen */
.t th { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  background: color-mix(in srgb, var(--surface-1) 94%, transparent); backdrop-filter: blur(4px); }
.t th, .t td { padding: 8px 10px; border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent); }
.t tbody tr:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.t tbody tr:last-child td { border-bottom: 0; }
.t th.sorted { color: var(--accent-2); }
:root[data-theme="light"] .t th.sorted { color: var(--accent-deep); }

/* ---------------------------------------------------------- Muenzen */
.money i {
  display: inline-grid; place-items: center; width: 1.05em; height: 1.05em; border-radius: 50%;
  font-size: .62em; font-weight: 800; font-style: normal; line-height: 1; margin-left: 2px; margin-right: 4px;
  vertical-align: baseline; position: relative; top: -.08em; opacity: 1;
  font-family: var(--serif);
}
.money i.g { background: radial-gradient(circle at 35% 30%, #ffe9a3, #ffd100 55%, #a07c00); color: #4a3400;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.4), inset 0 1px 1px rgba(255,255,255,.6), 0 0 4px rgba(255,209,0,.35); }
.money i.s { background: radial-gradient(circle at 35% 30%, #f4f4fa, #c7c7cf 55%, #6d6d78); color: #33333c;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.35), inset 0 1px 1px rgba(255,255,255,.65); }
.money i.c { background: radial-gradient(circle at 35% 30%, #f0b98a, #d08a52 55%, #8a4f26); color: #40230f;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.4), inset 0 1px 1px rgba(255,255,255,.5); }
.money .g { color: var(--gold); } .money .s { color: var(--silver); } .money .c { color: var(--copper); }

/* ---------------------------------------------------------- Badges & Pills */
.pill { border-radius: 999px; padding: 2px 10px; border: 1px solid transparent; font-weight: 600; font-size: 11.5px; letter-spacing: .01em; }
.pill.liq-h { background: color-mix(in srgb, var(--up) 15%, transparent); color: var(--up); border-color: color-mix(in srgb, var(--up) 35%, transparent); }
.pill.liq-m { background: color-mix(in srgb, #d8a028 15%, transparent); color: #d8a028; border-color: color-mix(in srgb, #d8a028 35%, transparent); }
.pill.liq-l { background: color-mix(in srgb, var(--down) 13%, transparent); color: var(--down); border-color: color-mix(in srgb, var(--down) 30%, transparent); }
.badge { border-radius: 999px; box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 40%, transparent); }

/* Qualitaets-Icons mit sanftem Leuchten */
.ico { border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.ico.bq2 { box-shadow: 0 0 8px color-mix(in srgb, var(--q2) 35%, transparent), inset 0 0 0 1px rgba(0,0,0,.25); }
.ico.bq3 { box-shadow: 0 0 8px color-mix(in srgb, var(--q3) 40%, transparent), inset 0 0 0 1px rgba(0,0,0,.25); }
.ico.bq4 { box-shadow: 0 0 10px color-mix(in srgb, var(--q4) 45%, transparent), inset 0 0 0 1px rgba(0,0,0,.25); }
.ico.bq5 { box-shadow: 0 0 12px color-mix(in srgb, var(--q5) 50%, transparent), inset 0 0 0 1px rgba(0,0,0,.25); }
.ico.big { border-radius: 12px; }

/* Tags / Chips */
.tag { border-radius: 999px; background: color-mix(in srgb, var(--surface-2) 85%, transparent); }
.chip { border-radius: 999px; }

/* ---------------------------------------------------------- Hero-Suche */
.hero {
  border-radius: 18px; padding: 26px 28px; position: relative; overflow: hidden;
  background:
    radial-gradient(600px 200px at 85% -60px, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    linear-gradient(165deg, color-mix(in srgb, var(--surface-2) 88%, var(--accent) 6%), var(--surface-1));
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 24px rgba(0,0,0,.25);
}
.hero h1 { font-size: 27px; }
.hero h1::before { content: "⚖ "; color: var(--accent); }
.herobox input { border-radius: 12px; background: color-mix(in srgb, var(--bg) 55%, var(--surface-2)); }
.heroflavor { margin-top: 12px; font-family: var(--serif); font-style: italic; color: var(--accent-2); font-size: 13.5px; opacity: .9; }
:root[data-theme="light"] .heroflavor { color: var(--accent-deep); }
.heroex a { color: var(--link); }

/* ---------------------------------------------------------- Item-Seite */
.ihead h1 { font-family: var(--serif); font-size: 30px; letter-spacing: .01em; }
.ftab { background: color-mix(in srgb, var(--surface-1) 92%, transparent); }
.ftab.on { background: linear-gradient(180deg, color-mix(in srgb, var(--fc) 12%, var(--surface-1)), var(--surface-1)); }
.ftab.on::after { height: 3px; box-shadow: 0 0 10px var(--fc); }
.hcard.on { box-shadow: 0 0 0 1px var(--link) inset, 0 0 14px color-mix(in srgb, var(--link) 25%, transparent); }
.mcard.on { box-shadow: 0 0 0 1px var(--mc, var(--alle)) inset, 0 0 14px color-mix(in srgb, var(--mc, var(--alle)) 22%, transparent); }
.mcard .big, .hcard .hp { font-family: var(--serif); letter-spacing: 0; }

/* Folds: ruhige Schubladen mit Gold-Chevron */
.fold > summary { border-radius: var(--radius); }
.fold > summary:hover { background: color-mix(in srgb, var(--accent) 6%, var(--surface-1)); }
.fold .chev { color: var(--accent); transition: transform .2s ease; }
.fold[open] { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.fold .ft { font-family: var(--serif); font-size: 15px; }

/* WoW-Tooltip: tieferes Blau, wärmere Kante */
.wtip { background: linear-gradient(180deg, #0e1526, #080c16); border: 1px solid #57627f; border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 8px 30px rgba(0,0,0,.5), inset 0 0 24px rgba(60,80,140,.15); }

/* Autocomplete & Popover */
.ac { border-radius: 12px; background: color-mix(in srgb, var(--surface-1) 96%, transparent);
  backdrop-filter: blur(10px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 25%, var(--border)); }
.ac a.sel, .ac a:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* ---------------------------------------------------------- Loader: kreisende Muenze */
.loading { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--text-muted);
  font-family: var(--serif); font-style: italic; font-size: 15px; }
.loading::before { content: "g"; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  font-family: var(--serif); font-weight: 700; font-size: 19px; color: var(--accent-ink);
  background: radial-gradient(circle at 35% 30%, #ffe9a3, var(--accent) 55%, var(--accent-deep));
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent);
  animation: coinflip 1.15s ease-in-out infinite; }
@keyframes coinflip { 0% { transform: rotateY(0); } 50% { transform: rotateY(180deg) scale(1.06); } 100% { transform: rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading::before { animation: none; } }

/* ---------------------------------------------------------- Sonstiges */
.note { border-radius: 10px; border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.hint { border-radius: 10px; border: 1px solid color-mix(in srgb, var(--up) 30%, transparent); }
.toast { border-radius: 12px; border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.vtip { border-radius: 9px; border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.foot { border-top: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border)); font-family: var(--serif); }
.pbar { border-radius: 999px; }
.bar { border-radius: 999px; background: linear-gradient(90deg, var(--s1), color-mix(in srgb, var(--s1) 60%, var(--accent))); }
.seg { border-radius: 10px; }
.seg button.on { box-shadow: inset 0 -2px 0 var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface-3)); }
.tgl button, .rchips button { border-radius: 999px; }
.tgl button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface-3));
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 22%, transparent); }
.qual span { border-radius: 999px; }
.iconbtn { border-radius: 10px; }
.iconbtn:hover { border-color: var(--accent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent); }

/* Scrollbars in Gold/Nachtblau */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 45%, var(--surface-3)) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 40%, var(--surface-3)); border-radius: 8px; border: 2px solid var(--bg); }
*::-webkit-scrollbar-track { background: transparent; }

/* Fokus-Listen: Spaltenkoepfe ruhiger */
.g3 .cardhead h2 { font-size: 15.5px; }

@media (max-width: 600px) { .hero { padding: 18px; border-radius: 14px; } .hero h1 { font-size: 21px; } .pagehead h1 { font-size: 22px; } }
