/* ============================================================
   Grindora — Der Förderturm  ·  Theme
   ============================================================ */
:root {
  --bg:        #0a0c10;
  --bg-2:      #0d1017;
  --panel:     #141925;
  --panel-2:   #1a2030;
  --panel-3:   #222a3d;
  --line:      #2a3346;
  --line-soft: #1e2636;

  --text:      #e7ebf3;
  --muted:     #8b96ac;
  --dim:       #5d6780;

  --amber:     #ffb02e;
  --amber-d:   #e0871a;
  --copper:    #cd7f46;
  --teal:      #3fe0c8;
  --void:      #a06bff;
  --gold:      #ecc14e;
  --danger:    #ff5454;
  --danger-d:  #c43838;
  --success:   #4cd185;
  --blood:     #b33;

  --r-common:    #9aa6bd;
  --r-uncommon:  #57c97a;
  --r-rare:      #4ea0ff;
  --r-epic:      #b66bff;
  --r-legendary: #ffb02e;
  --r-mythic:    #ff5a7a;

  --shadow: 0 10px 40px rgba(0,0,0,.5);
  --radius: 14px;
  --radius-sm: 9px;

  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;
  --head: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  --body: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 50% -10%, #161d2e 0%, transparent 60%),
    radial-gradient(900px 500px at 50% 120%, #1a1208 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.hidden { display: none !important; }
.mono { font-family: var(--mono); }

/* ---------- Layout shell ---------- */
#app {
  max-width: 760px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(10,12,16,.96), rgba(10,12,16,.78));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--head); font-weight: 700; letter-spacing: .5px; }
.brand .logo { font-size: 22px; filter: drop-shadow(0 0 8px var(--amber)); }
.brand .name { font-size: 18px; }
.brand .name b { color: var(--amber); }
.brand .sub { font-size: 10px; color: var(--dim); letter-spacing: 2px; text-transform: uppercase; margin-top: -3px; }

.wallet { margin-left: auto; display: flex; gap: 8px; }
.coin {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-weight: 600; font-size: 13px;
  background: var(--panel); border: 1px solid var(--line);
  padding: 5px 9px; border-radius: 999px;
}
.coin .ic { font-size: 13px; }
.coin.gulden  { color: var(--gold); }
.coin.kris    { color: var(--teal); }
.coin.split   { color: var(--r-epic); }

main { flex: 1; padding: 14px 14px 96px; }

/* ---------- Bottom nav ---------- */
.navbar {
  position: sticky; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: linear-gradient(0deg, rgba(10,12,16,.98), rgba(10,12,16,.85));
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line-soft);
}
.navbar button {
  background: none; border: none; color: var(--muted);
  padding: 10px 2px 12px; font-size: 11px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  letter-spacing: .3px; position: relative; transition: color .15s;
}
.navbar button .nic { font-size: 19px; }
.navbar button.active { color: var(--amber); }
.navbar button.active::before {
  content: ''; position: absolute; top: 0; left: 22%; right: 22%; height: 2px;
  background: var(--amber); border-radius: 2px; box-shadow: 0 0 10px var(--amber);
}

/* ---------- Panels & cards ---------- */
.panel {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 14px; }
.panel-title {
  font-family: var(--head); font-weight: 700; font-size: 13px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.panel-title .line { flex: 1; height: 1px; background: var(--line-soft); }

.row { display: flex; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none; border: 1px solid var(--line);
  background: var(--panel-3); color: var(--text);
  padding: 11px 16px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; letter-spacing: .3px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .08s ease, filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.btn.block { width: 100%; }
.btn.lg { padding: 15px 18px; font-size: 16px; }
.btn.sm { padding: 7px 11px; font-size: 12.5px; }
.btn-primary {
  background: linear-gradient(180deg, var(--amber), var(--amber-d));
  border-color: var(--amber-d); color: #1a1205;
  box-shadow: 0 4px 16px rgba(255,176,46,.25);
}
.btn-danger { background: linear-gradient(180deg, var(--danger), var(--danger-d)); border-color: var(--danger-d); color: #fff; }
.btn-success { background: linear-gradient(180deg, var(--success), #2c9c5e); border-color: #2c9c5e; color: #06210f; }
.btn-teal { background: linear-gradient(180deg, var(--teal), #1aa899); border-color: #1aa899; color: #042b26; }
.btn-ghost { background: transparent; }
.btn-void { background: linear-gradient(180deg, var(--void), #6f3fd1); border-color: #6f3fd1; color: #fff; box-shadow: 0 4px 16px rgba(160,107,255,.25); }

/* ---------- Stats / bars ---------- */
.stat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 9px; font-size: 12.5px;
}
.stat-pill .ic { font-size: 13px; }
.stat-pill b { font-family: var(--mono); }

.bar { height: 9px; border-radius: 6px; background: #0a0e16; overflow: hidden; border: 1px solid var(--line-soft); }
.bar > span { display: block; height: 100%; border-radius: 6px; transition: width .35s ease; }
.bar.hp > span    { background: linear-gradient(90deg, #ff6a6a, #ff3b3b); }
.bar.stam > span  { background: linear-gradient(90deg, #ffd24d, #ffb02e); }
.bar.cap > span   { background: linear-gradient(90deg, #5fd2ff, #4ea0ff); }
.bar.ox > span    { background: linear-gradient(90deg, #6ff0ff, #2bb8d8); }
.bar.xp > span    { background: linear-gradient(90deg, #b66bff, #8a4dff); }
.bar.dur > span   { background: linear-gradient(90deg, #6fe39a, #46d17a); }
.bar.dur.warn > span { background: linear-gradient(90deg, #ffd24d, #ffb02e); }
.bar.dur.crit > span { background: linear-gradient(90deg, #ff6a6a, #ff3b3b); }

.barwrap { display: grid; grid-template-columns: 64px 1fr 56px; align-items: center; gap: 9px; font-size: 12px; }
.barwrap .lab { color: var(--muted); font-weight: 600; }
.barwrap .val { font-family: var(--mono); text-align: right; font-size: 12px; }

/* ---------- Surface / hero ---------- */
.hero {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #10131c 0%, #0c0f16 100%);
  padding: 18px 16px;
}
.hero .depth-record { font-family: var(--mono); }
.hero h2 { font-family: var(--head); font-weight: 700; letter-spacing: 1px; font-size: 17px; }

.miner-card { display: flex; align-items: center; gap: 14px; }
.miner-av {
  width: 58px; height: 58px; border-radius: 14px; flex: none;
  display: grid; place-items: center; font-size: 30px;
  background: radial-gradient(circle at 50% 30%, #2a3147, #161b29);
  border: 1px solid var(--line); box-shadow: inset 0 0 22px rgba(255,176,46,.12);
}

/* ---------- Items ---------- */
.item {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); padding: 11px; position: relative; overflow: hidden;
}
.item .rar-edge { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.item .item-head { display: flex; align-items: center; gap: 9px; }
.item .item-icon {
  width: 38px; height: 38px; border-radius: 9px; flex: none; display: grid; place-items: center;
  font-size: 20px; background: #0e121b; border: 1px solid var(--line);
}
.item .item-name { font-weight: 700; font-family: var(--head); letter-spacing: .4px; font-size: 15px; }
.item .item-sub { font-size: 11px; color: var(--muted); }
.item .lvl { font-family: var(--mono); font-size: 11px; color: var(--gold); }
.item .equipped-tag {
  position: absolute; top: 8px; right: 8px; font-size: 9px; letter-spacing: 1px;
  background: var(--success); color: #06210f; padding: 2px 6px; border-radius: 5px; font-weight: 700;
}
.item .stats { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 5px; }
.item .s {
  font-size: 11px; font-family: var(--mono); background: #0e121b;
  border: 1px solid var(--line-soft); border-radius: 6px; padding: 3px 7px; color: var(--muted);
}
.item .s b { color: var(--text); }
.item .item-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 7px; }
.item .item-actions .btn { flex: 1 1 auto; }

.rar-common    { color: var(--r-common); }
.rar-uncommon  { color: var(--r-uncommon); }
.rar-rare      { color: var(--r-rare); }
.rar-epic      { color: var(--r-epic); }
.rar-legendary { color: var(--r-legendary); }
.rar-mythic    { color: var(--r-mythic); }
.bg-common    { background: var(--r-common); }
.bg-uncommon  { background: var(--r-uncommon); }
.bg-rare      { background: var(--r-rare); }
.bg-epic      { background: var(--r-epic); }
.bg-legendary { background: var(--r-legendary); }
.bg-mythic    { background: var(--r-mythic); }

.broken-tag { color: var(--danger); font-weight: 700; font-size: 11px; }

/* ---------- Dive screen ---------- */
.dive-wrap { display: flex; flex-direction: column; gap: 12px; }
.shaft-frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #070a0f;
  box-shadow: var(--shadow);
}
#shaft { display: block; width: 100%; height: 300px; }
.floor-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(8,10,16,.7); border: 1px solid var(--line);
  border-radius: 10px; padding: 7px 11px; backdrop-filter: blur(4px);
}
.floor-badge .et { font-family: var(--head); font-weight: 700; font-size: 22px; line-height: 1; }
.floor-badge .zn { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.pvp-flag {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: rgba(180,40,40,.18); border: 1px solid var(--danger-d);
  color: var(--danger); font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  padding: 6px 9px; border-radius: 8px; backdrop-filter: blur(4px);
  animation: pulseRed 1.6s infinite;
}
@keyframes pulseRed { 0%,100%{opacity:.65} 50%{opacity:1} }

.carry-strip {
  display: flex; gap: 7px; flex-wrap: wrap; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px;
}
.carry-chip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12.5px; }
.carry-chip .ic { font-size: 14px; }

.dive-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.dive-actions .btn { flex-direction: column; gap: 3px; padding: 12px; }
.dive-actions .btn small { font-size: 10.5px; font-weight: 500; opacity: .8; letter-spacing: .2px; }

/* ---------- Log ---------- */
.log {
  background: #080b11; border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 10px 12px; height: 142px; overflow-y: auto;
  font-family: var(--mono); font-size: 12px; line-height: 1.6;
  display: flex; flex-direction: column-reverse;
}
.log .l { color: var(--muted); }
.log .l .t { color: var(--dim); margin-right: 6px; }
.log .l.good { color: var(--success); }
.log .l.bad  { color: var(--danger); }
.log .l.warn { color: var(--amber); }
.log .l.loot { color: var(--teal); }
.log .l.pvp  { color: var(--r-mythic); }
.log .l.big  { color: var(--text); font-weight: 700; }

/* ---------- Gacha ---------- */
.gacha-banner {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); padding: 22px 16px; text-align: center;
  background:
    radial-gradient(600px 240px at 50% -20%, rgba(160,107,255,.30), transparent 70%),
    linear-gradient(180deg, #161226, #0f1018);
}
.gacha-banner h2 { font-family: var(--head); font-size: 24px; letter-spacing: 1px; }
.gacha-banner .glyph { font-size: 50px; filter: drop-shadow(0 0 18px var(--void)); }

.pull-result-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pull-cell {
  aspect-ratio: 3/4; border-radius: 10px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; position: relative;
  border: 1px solid var(--line); background: #0e121b; padding: 6px;
  animation: cellPop .35s ease both;
}
@keyframes cellPop { from { transform: scale(.6); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.pull-cell .pc-ic { font-size: 24px; }
.pull-cell .pc-name { font-size: 9.5px; text-align: center; font-weight: 600; line-height: 1.1; }
.pull-cell.dupe::after { content: 'DUP'; position: absolute; top: 4px; right: 4px; font-size: 8px; color: var(--dim); font-family: var(--mono); }

/* ---------- Faction ---------- */
.faction-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px;
  background: var(--panel); position: relative; overflow: hidden; cursor: pointer;
  transition: border-color .15s, transform .08s;
}
.faction-card:active { transform: scale(.99); }
.faction-card.sel { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 8px 24px rgba(255,176,46,.12); }
.faction-card .fc-crest { font-size: 30px; }
.faction-card h3 { font-family: var(--head); letter-spacing: .5px; }

.standings .srow {
  display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line-soft);
}
.standings .srow:last-child { border-bottom: none; }
.standings .srank { font-family: var(--mono); color: var(--dim); font-weight: 700; }
.standings .sbar { height: 7px; border-radius: 5px; background: #0a0e16; overflow: hidden; margin-top: 5px; }
.standings .sbar > span { display: block; height: 100%; }
.standings .sval { font-family: var(--mono); font-size: 12.5px; }

/* ---------- Modal ---------- */
.modal-layer {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4,6,10,.74); backdrop-filter: blur(5px);
  display: grid; place-items: center; padding: 18px;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: 0 24px 70px rgba(0,0,0,.6);
  animation: modalUp .25s cubic-bezier(.2,.9,.3,1.2) both;
}

/* ---------- Co-op-Tauchgang (Modal) ---------- */
.coop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.coop-fighters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.coop-fighter { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; }
.coop-fighter.down { border-color: var(--danger); opacity: .72; }
.coop-fighter .cf-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.coop-fighter .bar.hp { height: 9px; }
.coop-fighter .cf-hp { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 5px; text-align: right; }
@keyframes modalUp { from { transform: translateY(24px) scale(.96); opacity: 0 } to { transform: none; opacity: 1 } }
.modal h2 { font-family: var(--head); letter-spacing: .5px; margin-bottom: 4px; }
.modal .modal-body { margin: 12px 0 18px; color: var(--text); }
.modal .modal-actions { display: flex; gap: 10px; }
.modal .modal-actions .btn { flex: 1; }

.big-emoji { font-size: 54px; text-align: center; line-height: 1; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; left: 0; right: 0; bottom: 92px; z-index: 90;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  padding: 10px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow); animation: toastIn .25s ease, toastOut .3s ease 2.4s forwards;
  max-width: 90%;
}
.toast.good { border-left-color: var(--success); }
.toast.bad  { border-left-color: var(--danger); }
.toast.loot { border-left-color: var(--teal); }
@keyframes toastIn  { from { transform: translateY(14px); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes toastOut { to { transform: translateY(-10px); opacity: 0 } }

/* ---------- Misc ---------- */
.material-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.mat-cell {
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px;
  padding: 9px; display: flex; align-items: center; gap: 8px;
}
.mat-cell .mc-ic { font-size: 18px; }
.mat-cell .mc-q { font-family: var(--mono); font-weight: 700; margin-left: auto; }
.mat-cell .mc-n { font-size: 11px; color: var(--muted); }

/* ---------- Förderturm (Idle-Förderung) ---------- */
.mine-haul { display: flex; align-items: center; gap: 12px; margin: 2px 0 12px; }
.mine-haul .mh-ore { font-size: 34px; line-height: 1; flex: none; filter: drop-shadow(0 0 8px rgba(255,176,46,.3)); }
.mine-haul .mh-body { flex: 1; min-width: 0; }
.mine-haul .mh-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.mine-haul .mh-num { font-size: 13.5px; color: var(--muted); }
.mine-haul .mh-num b { font-family: var(--mono); font-size: 19px; color: var(--amber); }
.bar.mine { height: 10px; }
.bar.mine > span { background: linear-gradient(90deg, var(--amber-d), var(--amber)); }
.mine-upgrades { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; margin-top: 10px; }
.mine-up { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 6px; line-height: 1.2; text-align: center; }
.mine-up small { font-size: 10.5px; opacity: .85; font-family: var(--mono); }

/* ---------- Boss-Tor ---------- */
.boss-panel { box-shadow: 0 0 26px rgba(0,0,0,.45); }
.boss-head { display: flex; align-items: center; gap: 12px; }
.boss-head .boss-crest { font-size: 40px; line-height: 1; flex: none; animation: bossPulse 2.2s ease-in-out infinite; }
@keyframes bossPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* ---------- Biom-Banner (Tauchgang) ---------- */
.biome-banner {
  display: flex; align-items: center; gap: 11px; margin-top: 10px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm); padding: 9px 12px;
}
.biome-banner .bb-ic { font-size: 22px; flex: none; }
.biome-banner .bb-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.biome-banner .bb-txt b { font-family: var(--head); font-size: 14px; letter-spacing: .3px; }
.biome-banner .bb-txt span { font-size: 11.5px; color: var(--muted); }

/* ---------- Gilde ---------- */
.guild-member { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.guild-member:first-of-type { border-top: none; }
.guild-member .gm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.guild-member .gm-dot.on { background: var(--success); box-shadow: 0 0 6px var(--success); }
.guild-member .gm-name { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-member .gm-contrib { color: var(--gold); font-size: 12.5px; }

/* ---------- Talentbaum ---------- */
.talent-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.talent-row:first-of-type { border-top: none; }
.talent-row .tl-ic { font-size: 22px; width: 30px; text-align: center; flex: none; }
.talent-row .tl-body { flex: 1; min-width: 0; }
.talent-row .tl-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.talent-row .tl-top b { font-family: var(--head); font-size: 14.5px; }
.talent-row .tl-cur { font-family: var(--mono); font-size: 12px; color: var(--amber); white-space: nowrap; }
.talent-row .tl-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.talent-row .tl-ctl { display: flex; gap: 6px; flex: none; }
.talent-row .tl-ctl .btn { min-width: 40px; padding: 7px 0; font-size: 16px; font-weight: 700; }

/* ---------- Login-Streak (Kalender) ---------- */
.streak-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 4px 0 12px; }
.streak-cell {
  position: relative; border: 1px solid var(--line); border-radius: 9px; padding: 8px 3px;
  background: var(--panel); display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-height: 60px; justify-content: center; text-align: center;
}
.streak-cell .sc-day { font-size: 9px; letter-spacing: .2px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.streak-cell .sc-rew { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.streak-cell .sc-main { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--text); }
.streak-cell .sc-extra { font-size: 9px; color: var(--gold); margin-top: 1px; }
.streak-cell .sc-check { position: absolute; top: 2px; right: 4px; color: var(--success); font-size: 11px; font-weight: 700; }
.streak-cell.done { opacity: .5; border-color: var(--line-soft); }
.streak-cell.done .sc-main { color: var(--muted); }
.streak-cell.today { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 0 14px rgba(255,176,46,.25); background: rgba(255,176,46,.07); }
.streak-cell.today .sc-main { color: var(--amber); }
.streak-cell.big .sc-main { color: var(--r-epic); }
.streak-cell.big.today .sc-main { color: var(--amber); }

/* ---------- Aufträge (Quests) ---------- */
.quest-head { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.quest { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.quest:first-of-type { border-top: none; }
.quest .q-ic { font-size: 20px; flex: none; width: 26px; text-align: center; }
.quest .q-body { flex: 1; min-width: 0; }
.quest .q-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 5px; }
.quest .q-label { font-size: 13px; font-weight: 600; }
.quest .q-reward { font-size: 11px; color: var(--gold); font-family: var(--mono); white-space: nowrap; flex: none; }
.quest .bar.q-bar { height: 7px; }
.quest .bar.q-bar > span { background: linear-gradient(90deg, var(--teal), #2bb8d8); }
.quest .q-act { flex: none; min-width: 56px; text-align: right; }
.quest .q-prog { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.quest .q-claimed { color: var(--success); font-weight: 700; font-size: 16px; }
.quest.claimed { opacity: .5; }
.quest.done .q-bar > span { background: linear-gradient(90deg, var(--success), #2c9c5e); }

.flash-dmg { animation: flashDmg .4s ease; }
@keyframes flashDmg { 0% { box-shadow: inset 0 0 0 2000px rgba(255,40,40,.0) } 30% { box-shadow: inset 0 0 0 2000px rgba(255,40,40,.28) } 100% { box-shadow: inset 0 0 0 2000px rgba(255,40,40,0) } }

.empty-note { text-align: center; color: var(--dim); padding: 24px 10px; font-size: 13px; }

.tag {
  font-size: 10px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700;
  padding: 3px 7px; border-radius: 5px; background: var(--panel-3); color: var(--muted);
}
.tag.sim { background: rgba(160,107,255,.14); color: var(--void); border: 1px solid rgba(160,107,255,.3); }

.section-gap { height: 14px; }

@media (max-width: 420px) {
  body { font-size: 14px; }
  .pull-result-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; }
}

/* ---------- Werkstatt: mobil einspaltig (Standard) ---------- */
.gear-wrap { display: flex; flex-direction: column; gap: 14px; }
.inv-grid { display: flex; flex-direction: column; gap: 10px; }

/* "Ausgerüstet & Werte" — standardmäßig eingeklappt (übersichtlicher) */
.gear-equipped { padding: 0; overflow: hidden; }
.gear-equipped > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
}
.gear-equipped > summary::-webkit-details-marker { display: none; }
.gear-summary .gs-title { font-family: var(--head); font-weight: 700; font-size: 14px; letter-spacing: .3px; flex: 1; }
.gear-summary .gs-preview { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.gear-summary .gs-stat {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--muted);
  background: #0e121b; border: 1px solid var(--line-soft); border-radius: 6px; padding: 3px 7px;
}
.gear-summary .gs-chev { flex: none; color: var(--muted); font-size: 12px; transition: transform .2s; }
.gear-equipped[open] .gs-chev { transform: rotate(180deg); }
.gear-equipped[open] .gs-preview { display: none; }
.gear-equipped-body { padding: 0 16px 16px; }
.item.item-empty { opacity: .6; border-style: dashed; }
.item.item-empty .empty-slot-note { margin-top: 10px; font-size: 11.5px; color: var(--dim); }
@media (max-width: 560px) { .gear-summary .gs-preview { display: none; } }

/* ---------- Desktop: einheitliche, breite Tabs (alle Nav-Tabs wie die Werkstatt) ---------- */
@media (min-width: 900px) {
  #app.screen-surface,
  #app.screen-gear,
  #app.screen-talent,
  #app.screen-gacha,
  #app.screen-faction { max-width: 1180px; }
  #app.screen-gear .material-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; align-items: start; }
}
@media (min-width: 1300px) {
  #app.screen-surface,
  #app.screen-gear,
  #app.screen-talent,
  #app.screen-gacha,
  #app.screen-faction { max-width: 1320px; }
}

/* ---------- Auth / Login (Landing) ---------- */
#app.screen-auth { max-width: 100%; }
.auth-screen {
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  padding: 42px 18px 64px; gap: 24px;
}
.auth-aurora {
  position: fixed; inset: -20% -10% auto -10%; height: 85vh; z-index: 0; pointer-events: none;
  background:
    radial-gradient(600px 380px at 22% 16%, rgba(255,176,46,.16), transparent 60%),
    radial-gradient(620px 420px at 80% 10%, rgba(160,107,255,.16), transparent 60%),
    radial-gradient(720px 460px at 60% 82%, rgba(63,224,200,.10), transparent 60%);
  filter: blur(8px); animation: auroraDrift 16s ease-in-out infinite alternate;
}
@keyframes auroraDrift { from { transform: translate3d(-2%, -1%, 0) scale(1); } to { transform: translate3d(3%, 2%, 0) scale(1.08); } }
.auth-head, .auth-grid { position: relative; z-index: 1; }

.auth-head { text-align: center; max-width: 640px; }
.auth-logo .lg {
  font-size: 58px; line-height: 1; filter: drop-shadow(0 0 22px var(--amber));
  animation: logoFloat 4.5s ease-in-out infinite;
}
@keyframes logoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.auth-logo h1 { font-family: var(--head); font-size: 38px; letter-spacing: 1.5px; margin-top: 6px; }
.auth-logo h1 b { color: var(--amber); text-shadow: 0 0 24px rgba(255,176,46,.5); }
.auth-logo .sub { font-size: 11px; letter-spacing: 5px; text-transform: uppercase; color: var(--dim); }
.auth-tagline { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 14px auto 0; max-width: 520px; }
.auth-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.auth-badge {
  font-size: 11.5px; font-weight: 700; color: var(--text);
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
}

.auth-grid { width: 100%; max-width: 460px; display: grid; grid-template-columns: 1fr; gap: 24px; }

.auth-card {
  width: 100%; max-width: 430px; margin: 0 auto;
  border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(0,0,0,.55);
  background: linear-gradient(180deg, rgba(26,32,48,.92), rgba(20,25,37,.94));
  backdrop-filter: blur(6px);
}
.auth-card-head { text-align: center; margin-bottom: 16px; }
.auth-card-head h2 { font-family: var(--head); font-size: 22px; letter-spacing: .4px; }
.auth-card-head p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 16px;
  background: #0c1018; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.auth-tabs button {
  background: none; border: none; color: var(--muted); padding: 9px; border-radius: 7px;
  font-weight: 700; font-size: 13.5px; letter-spacing: .3px; font-family: var(--head); transition: background .15s, color .15s;
}
.auth-tabs button.on { background: var(--panel-3); color: var(--text); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; font-weight: 600; letter-spacing: .3px; }
.field input {
  width: 100%; background: #0a0e16; border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; padding: 11px 12px; font-size: 15px; font-family: var(--body);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,176,46,.12); }
.field-hint { font-size: 11px; color: var(--dim); margin-top: 5px; }
.pw-field { position: relative; }
.pw-field input { padding-right: 44px; }
.pw-eye {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  background: none; border: none; font-size: 17px; line-height: 1; cursor: pointer;
  padding: 4px 6px; opacity: .65; transition: opacity .15s;
}
.pw-eye:hover { opacity: 1; }
.auth-error { color: var(--danger); font-size: 12.5px; margin: -4px 0 12px; min-height: 16px; font-weight: 600; }
.auth-alt { text-align: center; margin-top: 14px; }
.auth-alt button { background: none; border: none; color: var(--muted); font-size: 12.5px; text-decoration: underline; cursor: pointer; }
.auth-alt button:hover { color: var(--text); }
.auth-trust { text-align: center; color: var(--dim); font-size: 11px; margin-top: 14px; line-height: 1.5; }

/* Feature-Übersicht */
.auth-sec-title {
  font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); margin: 4px 0 12px; display: flex; align-items: center; gap: 8px;
}
.soon-tag {
  font-size: 9.5px; letter-spacing: 1px; background: rgba(160,107,255,.16); color: var(--void);
  border: 1px solid rgba(160,107,255,.3); border-radius: 5px; padding: 2px 6px;
}
.feat-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 26px; }
.feat {
  display: flex; gap: 12px; align-items: flex-start;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px;
  transition: transform .15s, border-color .15s;
}
.feat:hover { transform: translateY(-2px); border-color: var(--amber-d); }
.feat-ic { font-size: 24px; line-height: 1; flex: none; filter: drop-shadow(0 0 8px rgba(255,176,46,.25)); }
.feat b { display: block; font-family: var(--head); font-size: 15px; letter-spacing: .3px; }
.feat span { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 2px; }

/* Roadmap */
.roadmap { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.roadmap li {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.02); border: 1px dashed var(--line); border-radius: 10px; padding: 11px 13px;
  font-weight: 600; font-size: 13.5px; color: var(--text);
}
.roadmap .rm-ic { font-size: 18px; flex: none; }
.roadmap .rm-soon {
  margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--dim); background: var(--panel-3); border-radius: 5px; padding: 3px 7px;
}

@media (min-width: 900px) {
  .auth-grid { max-width: 1040px; grid-template-columns: 1fr 430px; align-items: start; }
  .auth-hero { grid-column: 1; grid-row: 1; }
  .auth-side { grid-column: 2; grid-row: 1; position: sticky; top: 30px; }
  .auth-card { margin: 0; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
}

.account-chip {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 10px; font-size: 12.5px; font-weight: 600; color: var(--text);
}
.account-chip .av { font-size: 13px; }
.cloud-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 6px var(--success); }

/* ---------- Online-Rangliste ---------- */
.lb-row { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.lb-row:last-child { border-bottom: none; }
.lb-row.me { background: rgba(255,176,46,.06); border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.lb-rank { font-family: var(--mono); color: var(--dim); font-weight: 700; text-align: center; }
.lb-rank.gold { color: var(--gold); }
.lb-name { font-weight: 600; }
.lb-name .fc { opacity: .8; margin-right: 4px; }
.lb-deep { font-family: var(--mono); color: var(--teal); font-weight: 700; }

/* ---------- Mitspieler im Schacht ---------- */
.codiver {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft);
}
.codiver:last-child { border-bottom: none; }
.codiver .cd-av {
  width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center;
  font-size: 16px; background: #0e121b; border: 1px solid var(--line);
}
.codiver .cd-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Schacht-Funk ---------- */
.feed {
  background: #080b11; border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 8px 11px; max-height: 180px; overflow-y: auto;
  font-size: 12.5px; line-height: 1.7;
}
.feed-row { color: var(--muted); }
.feed-row .dim { font-family: var(--mono); font-size: 11px; margin-right: 6px; }
.feed-row.raid { color: var(--r-mythic); }
.feed-row.death { color: var(--danger); }
.feed-row.secure { color: var(--success); }
.feed-row.broadcast { color: var(--amber); font-weight: 600; }

/* ---------- Eingabefelder (Tickets/Admin) ---------- */
.ta {
  width: 100%; background: #0a0e16; border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; padding: 10px 12px; font-size: 14px; font-family: var(--body); resize: vertical;
}
.ta:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,176,46,.12); }
select.ta { appearance: none; }

/* ---------- Ticket-Liste & Thread ---------- */
.ticket-row {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px; margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); transition: border-color .12s;
}
.ticket-row:hover { border-color: var(--line); filter: brightness(1.08); }
.ticket-row:active { transform: scale(.995); }
.thread { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; max-height: 360px; overflow-y: auto; }
.msg { border-radius: 10px; padding: 9px 11px; max-width: 90%; }
.msg.user { background: var(--panel-3); align-self: flex-end; border: 1px solid var(--line); }
.msg.staff { background: rgba(79,160,255,.12); align-self: flex-start; border: 1px solid rgba(79,160,255,.3); }
.msg-head { font-size: 10.5px; color: var(--muted); margin-bottom: 3px; }
.msg-body { font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }

/* ---------- Admin-Tabs ---------- */
.admin-tabs { display: flex; gap: 5px; overflow-x: auto; background: #0c1018; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.admin-tabs button {
  background: none; border: none; color: var(--muted); padding: 8px 11px; border-radius: 7px;
  font-weight: 600; font-size: 12.5px; white-space: nowrap; flex: none;
}
.admin-tabs button.on { background: var(--panel-3); color: var(--text); }

/* ---------- Mini-Balkendiagramme ---------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding-top: 6px; }
.bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; height: 100%; }
.bar-item .bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; background: #0a0e16; border-radius: 5px; overflow: hidden; border: 1px solid var(--line-soft); }
.bar-item .bar-fill { width: 100%; border-radius: 5px 5px 0 0; min-height: 2px; transition: height .4s ease; }
.bar-item .bar-val { font-family: var(--mono); font-size: 11px; font-weight: 700; }
.bar-item .bar-lab { font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---------- Banner-Durchsage ---------- */
#banner-layer { position: sticky; top: 0; z-index: 60; }
.announce {
  display: flex; align-items: center; gap: 10px; max-width: 760px; margin: 0 auto;
  padding: 9px 14px; font-size: 13.5px; font-weight: 600;
  background: linear-gradient(180deg, #1c2740, #141d30); color: var(--text);
  border-bottom: 2px solid var(--r-rare);
}
.announce.warn { border-bottom-color: var(--amber); background: linear-gradient(180deg, #2a2412, #1c1a10); }
.announce.critical { border-bottom-color: var(--danger); background: linear-gradient(180deg, #2a1414, #1c1010); animation: pulseRed 1.8s infinite; }
.announce .an-ic { font-size: 16px; flex: none; }
.announce .an-text { flex: 1; }
.announce .an-x { background: none; border: none; color: var(--muted); font-size: 15px; cursor: pointer; flex: none; padding: 2px 6px; }
.announce .an-x:hover { color: var(--text); }

/* ---------- PWA-Installations-Angebot (abweisbar) ---------- */
.install-bar {
  position: fixed; left: 50%; bottom: 78px; transform: translateX(-50%) translateY(160%);
  z-index: 70; width: calc(100% - 24px); max-width: 480px;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px;
  box-shadow: var(--shadow); opacity: 0;
  transition: transform .35s cubic-bezier(.2,.7,.3,1), opacity .35s ease;
}
.install-bar.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.install-bar .ib-ic { font-size: 26px; flex: none; filter: drop-shadow(0 0 8px var(--amber)); }
.install-bar .ib-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.install-bar .ib-text b { font-family: var(--head); font-size: 14px; }
.install-bar .ib-text span { font-size: 11.5px; color: var(--muted); }
.install-bar .btn { flex: none; }
.install-bar .ib-x {
  align-self: flex-start; background: none; border: none; color: var(--muted);
  font-size: 16px; cursor: pointer; flex: none; padding: 2px 4px;
}
.install-bar .ib-x:hover { color: var(--text); }
