:root {
  --bg: #12141f;
  --bg2: #1a1d2c;
  --card: #1f2335;
  --card-hi: #262b40;
  --line: #2f3550;
  --text: #eef0f7;
  --muted: #9aa1bd;
  --gold: #f5c86a;
  --gold-dim: #c99a3e;
  --accent: #7cc4ff;
  --good: #6ee7a8;
  --warn: #ffc56b;
  --bad: #ff7d8a;
  --radius: 16px;
  --shadow: 0 8px 28px #0006;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; color: var(--text); font: 15px/1.55 "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #2a2350 0%, transparent 60%),
              radial-gradient(900px 500px at 110% 10%, #1b3a4f 0%, transparent 55%), var(--bg);
  background-attachment: fixed;
}
h1, h2, h3 { font-family: "Nunito", "Nunito Sans", "Segoe UI", sans-serif; }
button, input, select { font: inherit; color: inherit; }
button {
  background: linear-gradient(180deg, var(--gold), var(--gold-dim)); color: #1a1405; border: 0;
  border-radius: 8px; padding: 7px 14px; font-weight: 600; cursor: pointer;
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: .5; cursor: default; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 500; }
button.ghost:hover { border-color: var(--gold-dim); }
button.danger:hover { border-color: var(--bad); color: var(--bad); }
button.small { padding: 3px 9px; font-size: 13px; }
input, select {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0;
}
input:focus, select:focus { outline: 2px solid var(--gold-dim); outline-offset: -1px; }
input[type=number] { width: 72px; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 24px; border-bottom: 1px solid #ffffff10; background: #12141fcc; backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 5;
}
.brand { font: 800 20px "Nunito", sans-serif; letter-spacing: .3px; }
.brand b { color: var(--gold); }
.logo { color: var(--gold); }
.charbar { display: flex; gap: 8px; align-items: center; }
.charbar select { min-width: 220px; }

main { max-width: 1240px; margin: 0 auto; padding: 22px 24px 70px; display: flex; flex-direction: column; gap: 18px; }
.card { background: linear-gradient(180deg, var(--card-hi), var(--card)); border: 1px solid #ffffff12; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.hidden { display: none !important; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.hint.inline { margin: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.row input#charName { flex: 1; min-width: 160px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 12px; overflow-x: auto; }
.tab {
  background: none; color: var(--muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  padding: 8px 12px; font-weight: 500; white-space: nowrap;
}
.tab.active { color: var(--gold); border-bottom-color: var(--gold); }
/* Hauptnavigation als Pillen */
.tabs.views { margin: 2px 0 -4px; border: 0; gap: 8px; padding: 4px 0; flex-wrap: wrap; overflow: visible; }
.tabs.views .tab {
  border: 1px solid #ffffff14; border-radius: 999px; padding: 9px 18px; background: #ffffff08; color: var(--text);
  font-weight: 700; display: inline-flex; align-items: center; gap: 8px;
}
.tabs.views .tab:hover { background: #ffffff12; }
.tabs.views .tab.active { background: linear-gradient(180deg, var(--gold), var(--gold-dim)); color: #241a05; border-color: transparent; box-shadow: 0 4px 16px #f5c86a33; }
.tabs.views .tab.minor { font-weight: 600; color: var(--muted); padding: 7px 14px; font-size: 14px; }
.tabs.views .tab.minor.active { color: #241a05; }
.navsep { width: 1px; background: #ffffff1a; margin: 4px 6px; align-self: stretch; }

.results { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.result {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 8px;
}
.result .who { flex: 1; }
.result small { color: var(--muted); }

.drop {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px; text-align: center;
  display: flex; flex-direction: column; gap: 4px; color: var(--muted);
}
.drop b { color: var(--text); }
.drop.over { border-color: var(--gold); background: #f2c94c0d; }
.link { color: var(--accent); cursor: pointer; text-decoration: underline; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumb { position: relative; }
.thumb img { height: 84px; border-radius: 6px; border: 1px solid var(--line); display: block; }
.thumb button { position: absolute; top: 2px; right: 2px; padding: 0 6px; font-size: 12px; }
.radio { display: inline-flex; gap: 6px; align-items: center; }
.ocr { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-height: 220px; overflow: auto; font-size: 12px; white-space: pre-wrap; }

.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; }
.grid-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.grid-form input[type=number] { width: auto; }

/* Hero */
.hero { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.avatar {
  position: relative; width: 76px; height: 76px; border-radius: 50%; border: 2px solid var(--gold-dim); background: var(--bg2);
  display: grid; place-items: center; font-size: 30px; font-weight: 700; color: var(--gold-dim); overflow: hidden;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nowrap { white-space: nowrap; }
.hero h1 { margin: 0; font-size: 24px; }
.hero .sub { color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero .sub select { padding: 2px 6px; font-size: 13px; }
.kpis { display: flex; gap: 22px; text-align: right; }
.kpi .v { font-size: 26px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.kpi .d { font-size: 12px; }
.gate { grid-column: 1 / -1; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; display: flex; gap: 16px; flex-wrap: wrap; }
.gate b { color: var(--text); }

/* Ausbaustand */
#progress h3, .view h3 { margin: 0 0 10px; font-size: 15px; }
.bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 28px; }
.bar { display: grid; grid-template-columns: 150px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.bar .track { height: 10px; background: var(--bg2); border-radius: 5px; overflow: hidden; border: 1px solid var(--line); }
.bar .fill { height: 100%; border-radius: 5px; }
.bar .pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Empfehlungen */
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
button.chip { cursor: pointer; font-weight: 500; }
button.chip.on { border-color: var(--gold); color: var(--gold); }
.chip.quick { color: var(--good); border-color: #5fd35f55; }
.chip.risk { color: var(--warn); border-color: #ffb54755; }
.chip.pvp { color: var(--accent); border-color: #6cb6ff55; }
.recs { display: flex; flex-direction: column; gap: 10px; }
.rec { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; padding: 12px 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; }
.rec.top { border-color: var(--gold-dim); }
.rec .n { font-size: 18px; font-weight: 700; color: var(--gold-dim); text-align: center; }
.rec .t { font-weight: 600; }
.rec .d { color: #c3cad8; font-size: 14px; margin-top: 2px; }
.rec .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.rec .meter { text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }
.dots { letter-spacing: 2px; font-size: 13px; }
.dots.imp { color: var(--gold); }
.dots.cost { color: var(--accent); }
.rec details { margin-top: 6px; font-size: 13px; color: var(--muted); }
.rec summary { cursor: pointer; }
.rec ul { margin: 4px 0 0; padding-left: 18px; }

/* Tabellen */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 6px 8px; border-bottom: 1px solid #222a38; vertical-align: middle; }
.tbl tr.flag td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.tbl tr.emptyrow td { color: var(--muted); }
.tbl input[type=text] { width: 100%; min-width: 140px; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tblwrap { overflow-x: auto; }
.grade { font-weight: 600; }
.stones { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.stone { font-size: 12px; padding: 1px 7px; border-radius: 4px; background: #0003; border: 1px solid; white-space: nowrap; }
.stone.off { text-decoration: line-through; opacity: .75; }
.stone.empty { border-style: dashed; color: var(--muted); border-color: var(--line); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.muted { color: var(--muted); }

/* Routine */
.needs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 18px; }
.need { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.need b { display: block; font-size: 14px; margin-bottom: 4px; }
.need ul { margin: 0; padding-left: 18px; color: var(--muted); }
.task { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; border-bottom: 1px solid #222a38; }
.task.done .tn { text-decoration: line-through; color: var(--muted); }
.task.locked { opacity: .5; }
.task .tb { flex: 1; min-width: 0; }
.task .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.task input { width: 18px; height: 18px; accent-color: var(--gold); flex: none; margin: 2px 0 0; }
.task .prio { margin-top: 8px; }
.prio { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* Upgrades */
.small { font-size: 12px; }
.ups summary { cursor: pointer; white-space: nowrap; font-size: 13px; }
.uplist { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; min-width: 320px; }
.up { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 8px; background: #0003; border-radius: 6px; font-size: 13px; }
.up.off { opacity: .55; }
.upbtns { display: flex; gap: 4px; flex: none; }

/* Bestand & Plan */
.invgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.invgrid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.invgrid input { width: 100%; }
.plansum { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 12px; }
.plansum div { display: flex; flex-direction: column; }
.plansum b { font-size: 22px; color: var(--gold); font-variant-numeric: tabular-nums; }
.plansum small { color: var(--muted); font-size: 12px; }
.plan { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.plan li { padding-left: 4px; }
.plan .t { font-weight: 600; }
.advice { margin: 0; padding-left: 18px; color: #c3cad8; }

/* Übersicht */
.overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.ocard { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-width: 0; }
.ocard.wide { grid-column: 1 / -1; }
.ohead { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ohead h3 { margin: 0 !important; }
.ohead > div { display: flex; gap: 6px; flex-wrap: wrap; }
.olist { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.olist .t { font-weight: 600; font-size: 14px; }
.gold { color: var(--gold); }
.changes { margin: 6px 0; padding-left: 18px; font-size: 13px; }
.changes li.up::marker { color: var(--good); content: "▲ "; }
.changes li.down::marker { color: var(--bad); content: "▼ "; }
button.chip.link { color: var(--accent); border-color: #6cb6ff44; }
.matlinks { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
select.mini { padding: 1px 4px; font-size: 12px; }

.chip.gain { color: var(--gold); border-color: #f2c94c55; }
.gatebox { background: var(--bg2); border: 1px solid var(--gold-dim); border-radius: 8px; padding: 12px 14px; margin-top: 18px; }

/* Build */
.buildview { display: flex; flex-direction: column; gap: 14px; }
.blist { margin: 4px 0 8px; padding-left: 4px; list-style: none; font-size: 14px; }
.blist .add { color: var(--good); font-weight: 700; }
.blist .rem { color: var(--bad); font-weight: 700; }
.macro ol { margin: 4px 0 10px; padding-left: 22px; }

/* Materialien */
.mats { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; }
.mat { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mat.needed { border-color: #5fd35f66; }
.mat.focus { border-color: var(--gold); box-shadow: 0 0 0 2px #f2c94c33; }
.easy { background: #f2c94c12; border-left: 3px solid var(--gold); padding: 6px 10px; border-radius: 4px; font-size: 14px; }
.roll { display: flex; align-items: center; gap: 2px; font-size: 11px; }
.rollseg { color: #111; text-align: center; border-radius: 3px; padding: 1px 0; font-weight: 600; min-width: 34px; }
.srcs { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.src { font-size: 13px; }
.mat details summary { cursor: pointer; font-size: 13px; color: var(--accent); }

.empty h2 { margin-top: 0; color: var(--gold); }
.empty p { color: var(--muted); max-width: 720px; }
.spark { width: 100%; height: 90px; }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--card); border: 1px solid var(--gold-dim);
  padding: 10px 16px; border-radius: 8px; box-shadow: 0 6px 24px #0008; z-index: 10; max-width: 90vw;
}
.toast.err { border-color: var(--bad); }

@media (max-width: 720px) {
  .top, main { padding-left: 16px; padding-right: 16px; }
  .hero { grid-template-columns: auto 1fr; }
  .kpis { grid-column: 1 / -1; justify-content: space-between; text-align: left; }
  .bar { grid-template-columns: 110px 1fr 40px; }
  .rec { grid-template-columns: 26px 1fr; }
  .rec .meter { grid-column: 2; text-align: left; }
  .charbar select { min-width: 0; max-width: 46vw; }
}

/* ================================================================ Neues Design */
.view.bare { background: none; border: 0; box-shadow: none; padding: 0; }
.hero { background: linear-gradient(135deg, #2b2547, #1e2638 60%, #1a2e3a); border-color: #ffffff1c; }
.hero h1 { font: 800 28px "Nunito", sans-serif; }
.kpi .v { font-family: "Nunito", sans-serif; font-weight: 800; }
.ocard, .need, .mat, .rec, .result { border-radius: 12px; }
.ocard { background: #ffffff08; border-color: #ffffff14; }
.chip { border-radius: 999px; }
h3.sect { margin: 0 0 12px; font: 800 17px "Nunito", sans-serif; }
.sg-title { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 12px 0 8px; font-weight: 700; cursor: default; }
details > summary.sg-title { cursor: pointer; }
.legend { margin-top: 10px; }
.pbar { height: 8px; background: #ffffff12; border-radius: 99px; overflow: hidden; flex: 1; }
.pbar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); }

/* Kennzahlen */
.kpirow { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.kpi-tile { background: linear-gradient(180deg, var(--card-hi), var(--card)); border: 1px solid #ffffff12; border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.kpi-tile.hl { cursor: pointer; border-color: #f5c86a55; background: linear-gradient(180deg, #3a3020, #262236); }
.kpi-tile.hl:hover { border-color: var(--gold); }
.kt-l { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.kt-v { font: 800 26px "Nunito", sans-serif; color: var(--gold); line-height: 1.15; }
.kt-v.small-v { font-size: 17px; color: var(--text); }
.kt-s { font-size: 13px; color: var(--muted); }

/* Charakter-Raster */
.charpage, .improve { display: flex; flex-direction: column; gap: 18px; }
.cgrid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.colstack { display: flex; flex-direction: column; gap: 18px; }
.slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.slot-tile { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: #ffffff07;
  border: 1px solid #ffffff10; min-width: 0; }
.slot-tile:hover { background: #ffffff0f; }
.slot-tile.empty { opacity: .55; border-style: dashed; }
.sl-icon { position: relative; flex: none; }
.ico { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; overflow: hidden; background: #0005; font-size: 18px; flex: none; }
.ico.big { width: 46px; height: 46px; font-size: 22px; }
.ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot-tile .ico.big { box-shadow: 0 0 0 2px var(--gc, #666), 0 0 14px color-mix(in srgb, var(--gc, #666) 35%, transparent); }
.ench { position: absolute; right: -6px; bottom: -6px; background: #12141f; border: 1px solid var(--gc, #666); color: var(--gold);
  font: 800 11px "Nunito", sans-serif; padding: 0 5px; border-radius: 8px; }
.sl-text { min-width: 0; }
.sl-slot { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.sl-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dots { display: flex; gap: 3px; margin-top: 3px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.empty { background: none; border: 1px dashed #ffffff55; }

.skgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.skgrid.small { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); }
.sk-tile { text-align: center; }
.sk-icon { position: relative; display: inline-block; }
.sk-icon .ico.big { width: 50px; height: 50px; border-radius: 12px; box-shadow: 0 0 0 1px #ffffff22; }
.skgrid.small .sk-icon .ico.big { width: 40px; height: 40px; }
.lvl { position: absolute; right: -8px; bottom: -6px; background: var(--good); color: #0b2216; font: 800 11px "Nunito", sans-serif;
  border-radius: 99px; padding: 0 6px; min-width: 20px; }
.lvl.low { background: var(--bad); color: #2b0910; }
.sk-name { font-size: 11px; line-height: 1.25; margin-top: 6px; color: #d7dbea; }
.brow { display: grid; grid-template-columns: 80px 1fr 64px; gap: 10px; align-items: center; margin: 7px 0; font-size: 14px; }
.b-val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.pw { display: flex; gap: 18px; flex-wrap: wrap; }
.pw-item { display: flex; gap: 10px; align-items: center; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.statgrid.deity { margin-top: 12px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.stat { background: #ffffff07; border: 1px solid #ffffff10; border-radius: 12px; padding: 10px 12px; }
.stat.sm { padding: 7px 10px; }
.st-v { font: 800 20px "Nunito", sans-serif; color: var(--gold); }
.stat.sm .st-v { font-size: 16px; color: var(--text); }
.st-l { font-size: 13px; font-weight: 700; }
.st-e { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Stärker werden */
.imp-hero { display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(135deg, #2b2547, #1e2638 60%, #1a2e3a); }
.imp-hero h2 { margin: 0 0 4px; font-size: 24px; }
.imp-hero p { margin: 0; max-width: 620px; }
.imp-total { text-align: right; }
.imp-group { display: flex; flex-direction: column; gap: 10px; }
.ig-head { display: flex; align-items: baseline; gap: 12px; }
.ig-head h3 { margin: 0; font-size: 18px; }
.imp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.imp-card { display: flex; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: linear-gradient(180deg, var(--card-hi), var(--card));
  border: 1px solid #ffffff12; box-shadow: var(--shadow); }
.imp-card.quick { border-color: #6ee7a855; }
.imp-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: #ffffff0c; }
.imp-body { min-width: 0; flex: 1; }
.imp-title { font-weight: 800; font-size: 15px; line-height: 1.35; }
.imp-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; align-items: center; }
.gain-big { font: 800 14px "Nunito", sans-serif; color: var(--gold); background: #f5c86a17; border-radius: 99px; padding: 3px 10px; }
.imp-card details summary { color: var(--accent); cursor: pointer; }

/* Build mit Icons */
.keycap { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 8px; border-radius: 8px;
  background: linear-gradient(180deg, #3a4060, #2a2f48); border: 1px solid #ffffff22; border-bottom-width: 3px;
  font: 800 13px "Nunito", sans-serif; color: var(--text); }
.skrow { display: flex; align-items: center; gap: 10px; }
.speclist { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.speclist span b { color: var(--gold); margin-right: 4px; }

@media (max-width: 900px) { .cgrid { grid-template-columns: 1fr; } .imp-total { text-align: left; } }

/* Anmeldung */
.login { max-width: 560px; margin: 40px auto; text-align: center; padding: 36px 32px; }
.login h2 { margin: 6px 0 8px; font-size: 26px; }
.login p { color: var(--muted); }
.login-art { font-size: 44px; color: var(--gold); text-shadow: 0 0 24px #f5c86a66; }
.discord-btn { display: inline-flex; align-items: center; gap: 10px; margin: 14px 0 6px; padding: 12px 26px; border-radius: 999px;
  background: #5865f2; color: #fff; font: 800 16px "Nunito", sans-serif; text-decoration: none; box-shadow: 0 6px 20px #5865f255; }
.discord-btn:hover { filter: brightness(1.1); }
.userbox { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; margin-left: 6px; }
.userbox img, .userbox .ua { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: #5865f2; font-weight: 800; }
.userbox a { color: var(--muted); font-size: 13px; }

/* ================================================================ Aion-Optik & Einstieg */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, #12141fcc 0%, #12141ff2 55%, #12141f 100%), url("assets/atreia.webp") center top / cover no-repeat; }
.hero { position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -30px; width: 340px; height: 340px; pointer-events: none;
  background: var(--race-art) right top / contain no-repeat; opacity: .22; mask-image: linear-gradient(90deg, transparent, #000 60%); }
.hero > * { position: relative; z-index: 1; }
.hero h1 { display: flex; align-items: center; gap: 10px; }
.emblem { width: 34px; height: 34px; filter: drop-shadow(0 0 6px #ffffff40); }
.share-btn { margin-top: 8px; }
.share-box { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.share-box input { min-width: 260px; flex: 1; font-size: 13px; }

.login { position: relative; overflow: hidden; }
.login-races { display: flex; justify-content: center; gap: 0; height: 170px; margin: -10px 0 6px; }
.login-races img { height: 170px; object-fit: contain; filter: drop-shadow(0 6px 24px #0008); }
.login-races img:last-child { margin-left: -40px; }
.login-alt { color: var(--text) !important; background: #ffffff0a; border-radius: 10px; padding: 8px 12px; display: inline-block; }
.sharebar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(90deg, #2c3b6b, #2b2547); border: 1px solid #7cc4ff44; border-radius: var(--radius); padding: 12px 16px; }

/* Charakter hinzufügen */
.addchar { padding: 24px; }
.add-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.add-head h2 { margin: 0 0 4px; font-size: 24px; }
.add-head p { margin: 0; max-width: 680px; }
.stepper { display: flex; gap: 10px; list-style: none; padding: 0; margin: 18px 0; flex-wrap: wrap; }
.stepper li { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: #ffffff08; color: var(--muted); font-weight: 700; font-size: 14px; }
.stepper li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #ffffff14; font: 800 13px "Nunito", sans-serif; }
.stepper li.now { color: var(--text); background: #f5c86a1f; }
.stepper li.now span { background: var(--gold); color: #241a05; }
.stepper li.done span { background: var(--good); color: #0b2216; }
.add-step { background: #ffffff06; border: 1px solid #ffffff12; border-radius: 14px; padding: 16px 18px; }
.add-step form input[name=name] { flex: 1; min-width: 180px; }
.probe-title { background: linear-gradient(90deg, #f5c86a22, transparent); border-left: 4px solid var(--gold); padding: 12px 16px; border-radius: 10px; margin: 6px 0 12px; }
.probe-title small { display: block; color: var(--muted); }
.probe-title b { font: 800 22px "Nunito", sans-serif; color: var(--gold); }
.probe-status { margin: 10px 0 0; }
.pending { margin-top: 16px; }

/* Mehr-Menü */
.tabs.views { position: relative; }
.moremenu { position: absolute; top: 100%; right: 0; z-index: 6; margin-top: 6px; background: #1f2335f7; backdrop-filter: blur(10px);
  border: 1px solid #ffffff1c; border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 300px; box-shadow: var(--shadow); }
.moremenu .tab.minor { border-radius: 10px; justify-content: flex-start; flex-direction: column; align-items: flex-start; gap: 0; border: 0; background: none; color: var(--text); }
.moremenu .tab.minor:hover { background: #ffffff10; }
.moremenu .tab.minor small { font-weight: 400; color: var(--muted); font-size: 12px; }
.moremenu .tab.minor.active { background: #f5c86a22; color: var(--gold); }
.tabs.views .tab.more { margin-left: auto; }

/* Übersicht: Tipp, Bereichs-Kacheln, Unterseiten */
.tipbox { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; background: linear-gradient(90deg, #2c3b6bcc, #262236cc);
  border: 1px solid #7cc4ff33; border-radius: var(--radius); padding: 14px 18px; }
.tipbox ol { margin: 6px 0 0; padding-left: 20px; }
.secgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sec-tile { display: flex; gap: 14px; align-items: center; text-align: left; padding: 16px; border-radius: var(--radius); cursor: pointer;
  background: linear-gradient(180deg, var(--card-hi), var(--card)); border: 1px solid #ffffff14; color: var(--text); font-weight: 400; box-shadow: var(--shadow); }
.sec-tile:hover { border-color: #f5c86a77; transform: translateY(-1px); filter: none; }
.sec-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: #ffffff0d; flex: none; }
.sec-body { flex: 1; min-width: 0; }
.sec-body b { font: 800 16px "Nunito", sans-serif; }
.sec-prev { display: flex; gap: 4px; margin-top: 8px; }
.sec-prev .ico { width: 28px; height: 28px; border-radius: 7px; }
.go { color: var(--gold); font-size: 20px; }
.subnav { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.nextsec { align-self: flex-end; }

/* Daevanion-Brett */
.daewrap { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; margin-top: 8px; }
.daeboard { --cell: 42px; display: grid; gap: 0; padding: 18px; border-radius: 18px; overflow: auto; max-width: 100%;
  background: radial-gradient(circle at 50% 50%, #2b2a4a 0%, #15172a 70%); border: 1px solid #ffffff14; box-shadow: inset 0 0 40px #0008; }
.dnode { position: relative; display: grid; place-items: center; }
.dnode img { width: 34px; height: 34px; position: relative; z-index: 2; transition: transform .12s; }
.dnode.off img { opacity: .55; }
.dnode.on img { filter: drop-shadow(0 0 6px #f5c86a88); }
.dnode.t-start img { width: 38px; height: 38px; }
.dnode:hover img { transform: scale(1.25); }
.lnk { position: absolute; z-index: 1; background: #ffffff1c; }
.lnk.h { height: 3px; left: 50%; width: 100%; top: calc(50% - 1.5px); }
.lnk.v { width: 3px; top: 50%; height: 100%; left: calc(50% - 1.5px); }
.lnk.lit { background: linear-gradient(90deg, var(--gold-dim), var(--gold)); box-shadow: 0 0 6px #f5c86a66; }
.dn-skill { position: absolute; z-index: 3; right: 1px; top: -2px; font-size: 11px; color: #9fd8ff; text-shadow: 0 0 4px #000; }
.daeside { flex: 1; min-width: 240px; }
.bonuslist { display: flex; flex-wrap: wrap; gap: 6px; }
.bonuslist span { font-size: 12px; background: #ffffff0a; border-radius: 99px; padding: 3px 9px; }
.bonuslist b { color: var(--gold); }
.dlegend { display: flex; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.lg.on { background: var(--gold); } .lg.off { background: #4a5070; }
@media (max-width: 700px) { .daeboard { --cell: 26px; padding: 10px; } .dnode img { width: 22px; height: 22px; } .hero::after { opacity: .12; } }
.showall { align-self: center; padding: 10px 22px; border-radius: 999px; }

/* ---------------------------------------------------------------- Admin-Menü */
.admin-btn.active { border-color: var(--gold); color: var(--gold); }
.adminview .admin-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.adminview .admin-head h2 { margin: 0; flex: 1; }
.adminview .tabs { flex-wrap: wrap; margin-bottom: 14px; }
.adminview .row input { flex: 1; min-width: 200px; }
.adm-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.adm-kpi { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.adm-kpi b { font-size: 24px; font-family: Nunito, sans-serif; }
.adm-kpi span { font-size: 12px; opacity: .7; }
.adm-kpi.click { cursor: pointer; } .adm-kpi.click:hover { border-color: var(--gold); }
.adm-kpi.warn b { color: var(--warn); }
.tbl-wrap { overflow-x: auto; }
.adminview td.acts { white-space: nowrap; text-align: right; } .adminview td.acts button { margin-left: 4px; }
.adminview tr.banned td { opacity: .55; }
.adminview .bad, .adminview td.bad { color: var(--bad); }
.adminview .chip.bad { color: var(--bad); border-color: var(--bad); }
.adm-user { display: inline-flex; align-items: center; gap: 8px; }
.adm-user img, .adm-user .ua { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: #5865f2; font-size: 12px; }
.adminview a.link { cursor: pointer; }

/* ---------------------------------------------------------------- Anmeldung: Browser oder Discord-App */
.login-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px auto 8px; max-width: 640px; text-align: left; }
.login-way { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.login-way h3 { margin: 0; }
.login-way .discord-btn { align-self: flex-start; margin: 4px 0 0; }
.discord-btn.alt { border: 0; cursor: pointer; font: inherit; }
.codebox { margin-top: 8px; }
.code-big { font-family: ui-monospace, Consolas, monospace; font-size: 30px; letter-spacing: 4px; font-weight: 700; color: var(--gold); text-align: center; padding: 10px; border: 1px dashed var(--gold); border-radius: 12px; margin-bottom: 8px; }
.codebox code { background: rgba(0,0,0,.35); padding: 2px 6px; border-radius: 6px; user-select: all; }
.code-status { font-size: 13px; }

/* ---------------------------------------------------------------- Item-Tooltip wie im Spiel */
.slot-tile.clickable { cursor: pointer; }
.slot-tile.clickable:hover, .slot-tile.clickable:focus-visible { border-color: var(--gc); outline: none; }
.itemtip { position: fixed; z-index: 60; width: 340px; max-height: calc(100vh - 16px); overflow-y: auto;
  background: linear-gradient(180deg, #1d2333 0%, #141927 100%); border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px; padding: 12px 14px; box-shadow: 0 14px 40px rgba(0,0,0,.6); font-size: 13px; pointer-events: none; }
.itemtip.pinned { pointer-events: auto; }
.itemtip.pinned .it-head { padding-right: 22px; }
.itemtip .it-head { display: flex; gap: 10px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.1); }
.itemtip .it-head .ico.big { border: 2px solid var(--gc); border-radius: 10px; }
.itemtip .it-name { font-weight: 800; font-size: 15px; font-family: Nunito, sans-serif; }
.itemtip .it-sub { font-size: 12px; opacity: .7; }
.itemtip .it-row { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 0 2px; font-size: 12px; opacity: .9; }
.itemtip .it-sect { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.07); }
.itemtip .it-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .55; margin-bottom: 4px; }
.itemtip .it-stat { display: flex; justify-content: space-between; gap: 10px; padding: 1px 0; }
.itemtip .it-ico { display: inline-flex; align-items: center; gap: 6px; }
.itemtip .it-ico .ico { width: 20px; height: 20px; }
.itemtip .it-ico .ico img { width: 20px; height: 20px; }
.itemtip .plus { color: var(--good); font-style: normal; }
.itemtip .it-desc { font-size: 12px; opacity: .8; white-space: pre-line; margin: 2px 0 4px 26px; }
.itemtip .it-foot { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.07); font-size: 11.5px; opacity: .65; }
.itemtip .it-close { position: absolute; top: 8px; right: 8px; background: none; border: 0; color: inherit; font-size: 16px; cursor: pointer; opacity: .7; }
@media (max-width: 639px) {
  .itemtip { left: 8px !important; right: 8px; bottom: 8px; top: auto !important; width: auto; max-height: 70vh; }
}

/* ---------------------------------------------------------------- Charakter-Editor */
.editor { display: flex; flex-direction: column; gap: 14px; }
.ed-head h2 { margin: 0 0 4px; }
.ed-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 12px 0; }
.ed-kpis .adm-kpi b { font-size: 20px; }
.good { color: var(--good); } .bad { color: var(--bad); }
.ed-actions { flex-wrap: wrap; gap: 8px; }
.ed-tbl td { vertical-align: middle; }
.ed-tbl tr.changed td { background: rgba(242, 201, 76, .06); }
.ed-tbl select.mini { max-width: 340px; }
.ed-tbl select.stone { width: auto; margin-right: 3px; }
.ed-tbl input.num { width: 70px; }
.ed-tbl input[type=range] { width: 160px; vertical-align: middle; }
.stig-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.plan-list { display: flex; flex-direction: column; gap: 8px; }
.plan-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.plan-item.target { border-color: var(--gold); }
.plan-item.open { box-shadow: inset 3px 0 0 var(--gold); }
.plan-item .acts button, .t5 .acts button { margin-left: 4px; }
.target-card { border: 1px solid var(--gold); }

/* Referenz-Auswahl, Top 5, Skillleiste */
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-top: 8px; }
.ref-opt { text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); color: inherit; font: inherit; }
.ref-opt small { opacity: .65; font-size: 11.5px; }
.ref-opt.on { border-color: var(--gold); background: rgba(242, 201, 76, .1); }
.ref-opt:hover:not(:disabled) { border-color: var(--gold); }
.top5 { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.t5 { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.t5.on { border-color: var(--gold); }
.t5-rank { font: 800 20px Nunito, sans-serif; color: var(--gold); width: 22px; text-align: center; }
.t5-body { flex: 1; min-width: 0; }
.t5-st { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.skillbar { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; }
.sb-col { min-width: 108px; display: flex; flex-direction: column; gap: 6px; background: rgba(0,0,0,.25); border-radius: 12px; padding: 8px; border: 1px solid rgba(255,255,255,.08); }
.sb-key { text-align: center; margin-bottom: 2px; }
.sb-skill { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.sb-name { font-size: 11px; line-height: 1.2; }
.sb-tag { font-size: 10px; color: #c58cff; }
@media (max-width: 639px) { .t5 { flex-wrap: wrap; } .stig-pick { grid-template-columns: 1fr; } }

/* Bewertung der Item-Werte */
.itemtip .rate { display: inline-block; width: 14px; font-weight: 800; margin-right: 4px; text-align: center; }
.itemtip .rate.good { color: var(--good); } .itemtip .rate.ok { color: #8a93a8; } .itemtip .rate.weak { color: var(--bad); }
.itemtip .it-advice .adv { font-size: 12.5px; padding: 4px 0 4px 18px; position: relative; line-height: 1.35; }
.itemtip .it-advice .adv::before { position: absolute; left: 0; top: 4px; }
.itemtip .adv.bad::before { content: "✗"; color: var(--bad); font-weight: 800; }
.itemtip .adv.up::before { content: "↑"; color: var(--gold); font-weight: 800; }
.itemtip .adv.info::before { content: "i"; color: #4aa8ff; font-weight: 800; }
.itemtip .adv.good { color: var(--good); padding-left: 0; }
.slot-tile.has-bad { position: relative; }
.slot-tile.has-bad::after { content: "!"; position: absolute; top: 6px; right: 8px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bad); color: #fff; font: 800 11px/16px Nunito, sans-serif; text-align: center; }

/* Anmeldung: wie es am Handy und PC abläuft */
.login-how { display: grid; gap: 10px; max-width: 520px; margin: 16px auto 4px; text-align: left; }
.login-how > div { display: flex; gap: 10px; align-items: flex-start; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px 12px; }
.login-how span { font-size: 20px; line-height: 1.2; }
.login-how p { margin: 0; font-size: 13px; }
