/* ============================================================
   SALZPENNER LÜNEBURG — Premium Grunge-Look (v2)
   ============================================================ */

:root {
  --bg: #16140f;
  --panel: #262219;
  --panel2: #322c20;
  --panel3: #3d3526;
  --border: #4a4234;
  --border-hi: #6a5d42;
  --text: #f0e8d4;
  --muted: #a89d84;
  --accent: #ffd76a;
  --accent2: #c4972f;
  --good: #8fc855;
  --bad: #e06a52;
  --beer: #f5a623;
  --map-fill: #3a4a35;
  --map-sel: #5a6b45;
  --map-here: #6b5a2a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background:
    radial-gradient(ellipse at 20% -10%, rgba(255, 215, 106, .07), transparent 55%),
    radial-gradient(ellipse at 90% 110%, rgba(61, 90, 107, .12), transparent 60%),
    repeating-linear-gradient(45deg, transparent 0 60px, rgba(0, 0, 0, .14) 60px 61px),
    var(--bg);
  color: var(--text);
  font-family: 'Rubik', 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo, .logo-big, .act-timer, .crew-total-rate {
  font-family: 'Alfa Slab One', 'Arial Black', serif;
  font-weight: 400;
  letter-spacing: .5px;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 10px; }

/* ---------- Header mit Hero-Artwork ---------- */
.topbar {
  position: relative; overflow: hidden;
  border: 2px solid var(--border); border-radius: 14px;
  margin-bottom: 8px; min-height: 92px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
}
.topbar-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 38%;
  filter: brightness(.62) saturate(1.1);
}
.topbar-content {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; min-height: 92px;
  background: linear-gradient(90deg, rgba(22, 20, 15, .82) 0%, rgba(22, 20, 15, .35) 45%, rgba(22, 20, 15, .75) 100%);
}
.emblem {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid var(--accent2); cursor: pointer;
  box-shadow: 0 0 14px rgba(255, 215, 106, .35);
  transition: transform .2s;
}
.emblem:hover { transform: scale(1.08) rotate(-4deg); }
.logo {
  font-size: 1.7rem; color: var(--accent); cursor: pointer; white-space: nowrap;
  text-shadow: 2px 3px 0 #000, 0 0 24px rgba(255, 215, 106, .4);
}
.logo-city { color: #d8cdb2; font-size: .8rem; letter-spacing: 5px; display: block; margin-top: -4px; }
.ticker {
  flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-style: italic; color: #d8cdb2; font-size: .88rem;
  text-shadow: 1px 1px 2px #000;
}
.tick-in { animation: tickIn .5s ease; }
@keyframes tickIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sound-btn {
  background: rgba(0, 0, 0, .4); border: 1px solid var(--border-hi); border-radius: 10px;
  font-size: 1.1rem; padding: 6px 10px; cursor: pointer; transition: all .15s;
}
.sound-btn:hover { border-color: var(--accent); transform: scale(1.08); }

/* ---------- Statusleiste ---------- */
.statbar {
  display: flex; flex-wrap: wrap; gap: 6px;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 2px solid var(--border); border-radius: 12px;
  padding: 8px 10px; margin-bottom: 8px;
  position: sticky; top: 6px; z-index: 50;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}
.stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .25); border: 1px solid var(--border); border-radius: 9px;
  padding: 5px 12px; min-width: 105px; flex: 1; text-align: center;
  transition: border-color .3s;
}
.stat b { font-size: .98rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat b.counting { color: #aff07a; text-shadow: 0 0 10px rgba(143, 200, 85, .7); }
.stat small { color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: 1px; }
.stat .rate { color: var(--good); text-transform: none; letter-spacing: 0; }
.stat.full { border-color: var(--bad); animation: pulseWarn 1.2s infinite; }
@keyframes pulseWarn { 50% { box-shadow: 0 0 12px rgba(224, 106, 82, .55); } }
.stat-ico { font-size: .92rem; }
.districtname { font-size: .8rem !important; }
.bar {
  width: 92px; height: 11px; background: #12100b; border-radius: 6px;
  border: 1px solid var(--border); overflow: hidden; margin: 3px 0;
}
.small-bar { width: 150px; }
.bar-fill {
  height: 100%; transition: width .6s ease;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .18) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .18) 50%, rgba(255, 255, 255, .18) 75%, transparent 75%);
  background-size: 14px 14px;
  animation: barStripes 1.2s linear infinite;
}
@keyframes barStripes { to { background-position: 14px 0; } }
.bar-fill.hp { background-color: #d95f4a; }
.bar-fill.xp { background-color: var(--accent2); }
.bar-fill.hunger { background-color: #d97f3a; }

/* ---------- Layout ---------- */
.main { display: flex; gap: 8px; align-items: flex-start; }
.side {
  width: 222px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 2px solid var(--border); border-radius: 12px;
  padding: 10px; display: flex; flex-direction: column; gap: 4px;
}
.side-avatar { text-align: center; padding-bottom: 8px; border-bottom: 1px dashed var(--border); margin-bottom: 6px; }
.avatar-img {
  border-radius: 14px; border: 2px solid var(--border-hi); object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}
.side-name { font-weight: 700; color: var(--accent); font-size: 1.05rem; margin-top: 6px; }
.side-rank { color: var(--muted); font-style: italic; font-size: .8rem; }

.nav-btn {
  background: var(--panel2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 8px 10px; text-align: left; cursor: pointer;
  font-family: inherit; font-size: .88rem; transition: all .15s;
  display: flex; align-items: center; gap: 6px;
}
.nav-btn:hover { background: var(--panel3); border-color: var(--accent2); transform: translateX(3px); }
.nav-btn.active {
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  color: #1a1813; font-weight: 700; border-color: var(--accent);
  box-shadow: 0 0 12px rgba(255, 215, 106, .35);
}
.nav-badge {
  margin-left: auto; font-size: .66rem; background: rgba(0, 0, 0, .35);
  border-radius: 8px; padding: 2px 7px; color: var(--good); font-weight: 700;
}
.nav-btn.active .nav-badge { color: #1a4d0e; background: rgba(255, 255, 255, .35); }

.view { flex: 1; min-width: 0; }
.view h2 {
  color: var(--accent); margin-bottom: 10px; font-size: 1.3rem;
  text-shadow: 2px 2px 0 #000;
}
.view h2 small { font-family: 'Rubik', sans-serif; font-weight: 400; letter-spacing: 0; font-size: .85rem; }
.view h3 { color: var(--accent); margin-bottom: 8px; font-size: .98rem; letter-spacing: .3px; }
.shop-title { margin: 14px 2px 8px; }

.card {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 2px solid var(--border); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.cols { display: flex; gap: 10px; flex-wrap: wrap; }
.cols > .card { flex: 1; min-width: 290px; }
.muted { color: var(--muted); }
p { margin-bottom: 8px; line-height: 1.5; }

/* ---------- Buttons ---------- */
.btn {
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  border: 2px solid #8a6a1a; border-radius: 9px; color: #221c10;
  font-weight: 700; font-family: inherit; font-size: .92rem;
  padding: 8px 16px; cursor: pointer; transition: all .12s;
  box-shadow: 0 3px 0 #6b5215, 0 5px 10px rgba(0, 0, 0, .4);
}
.btn:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 4px 0 #6b5215, 0 7px 14px rgba(0, 0, 0, .4); }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #6b5215; }
.btn:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.btn.big { font-size: 1.08rem; padding: 13px 26px; width: 100%; margin-top: 8px; }
.btn.small { font-size: .8rem; padding: 5px 11px; }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--border); box-shadow: none; }
.btn.glow, .buybtn.can { animation: glowPulse 1.6s ease-in-out infinite; }
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 3px 0 #6b5215, 0 0 6px rgba(255, 215, 106, .3); }
  50% { box-shadow: 0 3px 0 #6b5215, 0 0 22px rgba(255, 215, 106, .75); }
}
.btn.dur { display: flex; flex-direction: column; padding: 10px; }
.btn.dur small { font-weight: 400; font-size: .72rem; opacity: .78; }
.dur-grid { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.dur-grid .btn { flex: 1; min-width: 108px; }

/* ---------- Tabellen ---------- */
.kv { width: 100%; border-collapse: collapse; }
.kv td { padding: 4px 6px; border-bottom: 1px dashed #3a342a; font-size: .9rem; }
.kv td:first-child { color: var(--muted); width: 45%; }
.kv tr:hover { background: rgba(255, 255, 255, .03); }

.ranking { width: 100%; border-collapse: collapse; }
.ranking th { text-align: left; color: var(--muted); border-bottom: 2px solid var(--border); padding: 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; }
.ranking td { padding: 7px 6px; border-bottom: 1px dashed #3a342a; }
.ranking tr.top3 td { background: rgba(255, 215, 106, .05); }
.ranking tr.me td { background: rgba(255, 215, 106, .14); color: var(--accent); font-weight: 700; }

/* ---------- Shop ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 9px; margin-bottom: 16px; }
.shop-item {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 2px solid var(--border); border-radius: 12px;
  padding: 10px; display: flex; gap: 10px; transition: all .15s;
}
.shop-item:hover { border-color: var(--border-hi); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, .4); }
.shop-item.owned { border-color: var(--good); }
.shop-img { flex-shrink: 0; }
.shop-img .iimg, .crew-img .iimg {
  width: 62px; height: 62px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--border-hi); display: block;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .4);
}
.iemo { font-size: 2.2rem; display: flex; width: 62px; height: 62px; align-items: center; justify-content: center; }
.shop-body { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.shop-body b { font-size: .92rem; }
.shop-body small { line-height: 1.3; }
.shop-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; gap: 6px; flex-wrap: wrap; }
.shop-effect { color: var(--good); font-size: .76rem; font-weight: 700; }
.owned-tag { color: var(--good); font-size: .8rem; font-weight: 700; }

/* ---------- Crew (Idle) ---------- */
.crew-total { text-align: center; }
.crew-total-rate { font-size: 2rem; color: var(--good); text-shadow: 0 0 18px rgba(143, 200, 85, .45); }
.crew-total-rate small { font-size: .9rem; color: var(--muted); font-family: 'Rubik', sans-serif; margin-left: 6px; }
.crew-list { display: flex; flex-direction: column; gap: 8px; }
.crew-row {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 2px solid var(--border); border-radius: 12px; padding: 10px 14px;
  transition: all .15s;
}
.crew-row:hover { border-color: var(--border-hi); }
.crew-row.hired { border-color: #5a7a3a; }
.crew-img { position: relative; flex-shrink: 0; }
.crew-count {
  position: absolute; bottom: -6px; right: -8px;
  background: var(--good); color: #14290a; font-weight: 800; font-size: .78rem;
  border-radius: 10px; padding: 2px 8px; border: 2px solid var(--panel);
}
.crew-info { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.crew-buy { text-align: center; line-height: 1.15; min-width: 110px; }
.crew-buy small { font-weight: 400; }

/* ---------- Kampf ---------- */
.fight-list { display: flex; flex-direction: column; gap: 6px; }
.fight-row {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 2px solid var(--border); border-radius: 11px; padding: 8px 14px;
  transition: all .15s;
}
.fight-row:hover { border-color: var(--bad); }
.fight-who { flex: 1; display: flex; flex-direction: column; }
.fight-who small { color: var(--muted); }
.fight-loot { color: var(--muted); }

/* ---------- Aktivität ---------- */
.act-box {
  margin-top: 8px; background: rgba(0, 0, 0, .3); border: 2px dashed var(--accent2);
  border-radius: 10px; padding: 10px; text-align: center; font-size: .84rem;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.act-box.idle { border-color: var(--border); color: var(--muted); }
.act-box.jail { border-color: var(--bad); animation: pulseWarn 1.5s infinite; }
.act-timer { font-size: 1.35rem; color: var(--accent); }
.act-bar { width: 100%; height: 9px; background: #12100b; border-radius: 5px; overflow: hidden; }
.act-bar-fill {
  height: 100%; background: var(--accent); transition: width 1s linear;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .25) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .25) 50%, rgba(255, 255, 255, .25) 75%, transparent 75%);
  background-size: 12px 12px; animation: barStripes 1s linear infinite;
}

/* ---------- Nächstes Ziel ---------- */
.goal-strip {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  background: linear-gradient(90deg, rgba(255, 215, 106, .1), rgba(255, 215, 106, .02));
  border: 2px solid var(--border-hi); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 10px; transition: all .15s;
}
.goal-strip:hover { border-color: var(--accent); }
.goal-ico { font-size: 1.7rem; }
.goal-info { flex: 1; }
.goal-info small { color: var(--muted); display: block; }
.goal-bar { width: 100%; margin-top: 4px; }
.goal-pct { font-weight: 800; color: var(--accent); font-size: 1.1rem; }

/* ---------- Pfandautomat ---------- */
.pfand-card { text-align: center; }
.pfand-machine {
  width: 220px; margin: 0 auto 14px;
  background: linear-gradient(180deg, #4a5a4a, #2d382d);
  border: 3px solid #1d241d; border-radius: 14px; padding: 16px;
  transition: all .3s;
}
.pfand-machine.ready { box-shadow: 0 0 26px rgba(106, 255, 106, .25); }
.pfand-screen {
  background: #0d1f0d; color: #6aff6a; font-family: 'Courier New', monospace;
  font-weight: 700; padding: 10px; border-radius: 6px; border: 2px solid #050f05;
  font-size: 1rem; line-height: 1.5; text-shadow: 0 0 7px #6aff6a99;
}
.pfand-slot { width: 90px; height: 26px; background: #0a0a0a; border-radius: 13px; margin: 12px auto 0; border: 2px solid #1d241d; }

/* ---------- Karte & Stadtteile ---------- */
.citymap { width: 100%; height: auto; display: block; }
.map-card { padding: 8px; }
.map-cols > .card:last-child { min-width: 280px; max-width: 400px; }
.map-district:hover ellipse { filter: brightness(1.35); }
.district-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.dstars { background: rgba(0, 0, 0, .25); border: 1px solid var(--border); border-radius: 7px; padding: 4px 9px; font-size: .78rem; }
.dstars b { color: var(--accent); letter-spacing: 1px; }
.district-photo {
  width: 100%; max-height: 210px; object-fit: cover; object-position: center;
  border-radius: 10px; border: 1px solid var(--border-hi); margin-bottom: 10px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .4);
}
.district-card { padding: 0; overflow: hidden; }
.district-card .district-photo { border-radius: 0; border: none; margin: 0; max-height: 190px; }
.district-card-body { padding: 12px 16px 14px; }

/* ---------- Übersicht ---------- */
.ov-avatar { text-align: center; margin: 8px 0; }
.totals { display: flex; flex-wrap: wrap; gap: 8px; }
.totals span { background: rgba(0, 0, 0, .25); border: 1px solid var(--border); border-radius: 7px; padding: 5px 10px; font-size: .84rem; }
.dog-row { display: flex; gap: 12px; align-items: flex-start; }
.dog-img { width: 70px !important; height: 70px !important; }

/* ---------- Erfolge ---------- */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 9px; }
.ach-card {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 2px solid var(--border); border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center;
  filter: saturate(.55); opacity: .85; transition: all .2s;
}
.ach-card .bar { width: 100%; }
.ach-card.done {
  filter: none; opacity: 1; border-color: var(--accent2);
  box-shadow: 0 0 16px rgba(255, 215, 106, .18);
}
.ach-big { font-size: 2.2rem; }
.ach-card.done .ach-big { text-shadow: 0 0 16px rgba(255, 215, 106, .8); }
.ach-reward { color: var(--good); font-weight: 700; }

/* ---------- Bank ---------- */
.bank-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.bank-actions .name-input { width: 140px; margin: 0; }

/* ---------- Tagebuch ---------- */
.log-row { padding: 6px 4px; border-bottom: 1px dashed #3a342a; line-height: 1.4; font-size: .9rem; }
.log-time { color: var(--muted); margin-right: 8px; font-family: 'Courier New', monospace; }

/* ---------- Startbildschirm ---------- */
.start-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.start-box {
  max-width: 680px; width: 100%; background: var(--panel); border: 3px solid var(--border);
  border-radius: 18px; overflow: hidden; text-align: center;
  box-shadow: 0 14px 50px rgba(0, 0, 0, .65);
}
.start-hero { position: relative; min-height: 150px; }
.start-hero img { width: 100%; height: 215px; object-fit: cover; display: block; filter: brightness(.8); }
.start-hero-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px; background: linear-gradient(180deg, transparent 30%, rgba(22, 20, 15, .92) 96%);
}
.logo-big {
  font-size: 2.9rem; color: var(--accent); letter-spacing: 3px;
  text-shadow: 3px 4px 0 #000, 0 0 36px rgba(255, 215, 106, .5);
}
.logo-sub { color: #d8cdb2; letter-spacing: 6px; text-transform: uppercase; font-size: .8rem; }
.start-inner { padding: 22px 28px 28px; }
.start-intro { text-align: left; line-height: 1.55; margin-bottom: 18px; }
.start-avatars { display: flex; gap: 10px; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; }
.start-avatar {
  border: 2px solid var(--border); border-radius: 14px; padding: 8px; cursor: pointer;
  background: var(--panel2); transition: all .15s;
}
.start-avatar:hover { border-color: var(--accent2); transform: translateY(-3px); }
.start-avatar.sel { border-color: var(--accent); background: var(--panel3); box-shadow: 0 0 16px rgba(255, 215, 106, .35); }
.start-avatar .avatar-img { border: none; box-shadow: none; }
.av-name { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.name-input {
  width: 100%; padding: 11px 14px; border-radius: 9px; border: 2px solid var(--border);
  background: #14110c; color: var(--text); font-family: inherit; font-size: 1rem; margin-bottom: 4px;
}
.name-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 10px rgba(255, 215, 106, .25); }

/* ---------- Floating Numbers & Partikel ---------- */
#floaters { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.floater {
  position: absolute; top: 38%;
  font-family: 'Alfa Slab One', serif; font-size: 1.5rem; color: var(--accent);
  text-shadow: 2px 2px 0 #000, 0 0 14px rgba(255, 215, 106, .6);
  animation: floatUp 2s ease-out forwards;
}
.floater.gold { color: #ffd76a; }
.floater.good { color: var(--good); text-shadow: 2px 2px 0 #000, 0 0 14px rgba(143, 200, 85, .6); }
.floater.bad { color: var(--bad); text-shadow: 2px 2px 0 #000, 0 0 14px rgba(224, 106, 82, .6); }
.floater.beer { color: var(--beer); text-shadow: 2px 2px 0 #000, 0 0 14px rgba(245, 166, 35, .6); }
.floater.passive { font-size: 1.05rem; color: #aff07a; opacity: .9; }
@keyframes floatUp {
  0% { opacity: 0; transform: translateY(20px) scale(.7); }
  15% { opacity: 1; transform: translateY(0) scale(1.12); }
  30% { transform: translateY(-12px) scale(1); }
  100% { opacity: 0; transform: translateY(-110px) scale(.92); }
}
.spark {
  position: absolute; top: 42%; font-size: 1.4rem;
  animation: sparkFly 1.2s ease-out forwards;
}
@keyframes sparkFly {
  0% { opacity: 1; transform: translate(0, 0) scale(.6); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.25) rotate(40deg); }
}
.confetto {
  position: absolute; top: -16px; width: 9px; height: 14px; border-radius: 2px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(105vh) rotate(var(--rot)); opacity: .7; }
}

/* ---------- Modals ---------- */
#modal-overlay {
  position: fixed; inset: 0; background: rgba(8, 7, 4, .75); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 300;
  opacity: 0; transition: opacity .25s; padding: 16px;
}
#modal-overlay.show { opacity: 1; }
.modal-card {
  background: linear-gradient(180deg, var(--panel3), var(--panel));
  border: 3px solid var(--accent2); border-radius: 18px;
  max-width: 460px; width: 100%; padding: 0 22px 22px; text-align: center;
  box-shadow: 0 0 50px rgba(255, 215, 106, .25), 0 20px 60px rgba(0, 0, 0, .7);
  transform: scale(.85); transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
  overflow: hidden;
}
#modal-overlay.show .modal-card { transform: scale(1); }
.modal-hero { width: calc(100% + 44px); margin: 0 -22px 14px; height: 130px; object-fit: cover; display: block; }
.modal-title { color: var(--text); font-size: 1.45rem; margin-bottom: 10px; text-shadow: 2px 2px 0 #000; }
.modal-title.gold { color: var(--accent); font-size: 2rem; text-shadow: 2px 3px 0 #000, 0 0 26px rgba(255, 215, 106, .6); }
.modal-sub { color: var(--muted); margin-bottom: 12px; }
.lvlup-burst { font-size: 3.4rem; margin-top: 18px; animation: lvlBounce 1s ease infinite alternate; }
@keyframes lvlBounce { from { transform: scale(1) rotate(-6deg); } to { transform: scale(1.18) rotate(6deg); } }
.wb-row {
  display: flex; align-items: center; gap: 11px; text-align: left;
  background: rgba(0, 0, 0, .28); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; margin-bottom: 8px;
}
.wb-row > div { flex: 1; }
.wb-row small { color: var(--muted); display: block; line-height: 1.3; }
.wb-ico { font-size: 1.5rem; }
.wb-val { color: var(--good); font-weight: 800; white-space: nowrap; }
.wb-row.daily { border-color: var(--accent2); }

/* ---------- Toasts ---------- */
#toasts { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 250; max-width: 390px; }
.toast {
  background: linear-gradient(180deg, var(--panel3), var(--panel2));
  border: 2px solid var(--accent2); border-left-width: 6px;
  border-radius: 10px; padding: 10px 14px; font-size: .88rem;
  opacity: 0; transform: translateX(40px); transition: all .35s cubic-bezier(.34, 1.3, .64, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .55);
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.good { border-color: var(--good); }
.toast.bad { border-color: var(--bad); }
.toast.achieve { border-color: var(--accent); box-shadow: 0 0 24px rgba(255, 215, 106, .35); }
.ach-pop { display: flex; gap: 10px; align-items: center; }
.ach-ico { font-size: 1.9rem; }

/* ---------- Footer ---------- */
.foot { text-align: center; color: var(--muted); font-size: .78rem; padding: 14px 0 24px; }
.foot a { color: var(--accent2); }

/* ---------- Hero-Card (Penner im Mittelpunkt) ---------- */
.hero-card { text-align: center; padding: 18px 16px; }
.hero-av { position: relative; display: inline-block; }
.hero-av .avatar-img {
  border-radius: 50%; border: 3px solid var(--accent2);
  box-shadow: 0 0 26px rgba(255, 215, 106, .3), 0 8px 22px rgba(0, 0, 0, .5);
}
.hero-lvl {
  position: absolute; bottom: 2px; right: -10px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  color: #221c10; font-weight: 800; font-size: .85rem;
  border-radius: 12px; padding: 3px 10px; border: 2px solid var(--panel);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .5);
}
.hero-name { font-family: 'Alfa Slab One', serif; font-size: 1.35rem; color: var(--accent); margin-top: 10px; text-shadow: 2px 2px 0 #000; }
.hero-rank { color: var(--muted); font-style: italic; font-size: .85rem; margin-bottom: 8px; }
.hero-xp { width: min(300px, 80%); margin: 0 auto 4px; }
.quick-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px;
  margin-top: 14px; max-width: 560px; margin-left: auto; margin-right: auto;
}
.btn.quick {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 11px 6px; font-size: .82rem;
}
.btn.quick span { font-size: 1.5rem; }

/* ---------- Mobile: Bottom-Nav & Sheet ---------- */
.bottom-nav { display: none; }
#sheet-overlay {
  position: fixed; inset: 0; background: rgba(8, 7, 4, .65); z-index: 280;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
#sheet-overlay.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, var(--panel3), var(--panel));
  border-top: 3px solid var(--accent2); border-radius: 20px 20px 0 0;
  padding: 10px 14px calc(96px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .26s cubic-bezier(.34, 1.2, .64, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .6);
}
#sheet-overlay.open .sheet { transform: translateY(0); }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--border-hi); margin: 2px auto 12px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet-btn {
  background: rgba(0, 0, 0, .28); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); font-family: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 4px; font-size: 1.4rem; transition: all .15s;
}
.sheet-btn small { font-size: .68rem; color: var(--muted); }
.sheet-btn.active { border-color: var(--accent); background: rgba(255, 215, 106, .12); }
.sheet-btn.active small { color: var(--accent); }
.sheet-foot { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }

/* ---------- Responsive: App-Style auf dem Smartphone ---------- */
@media (max-width: 780px) {
  body { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .wrap { padding: 6px; }
  .main { flex-direction: column; }
  .side { display: none; }              /* Sidebar → Bottom-Nav */
  .foot { display: none; }
  .ticker { display: none; }

  /* Kompakter Header */
  .topbar { min-height: 56px; border-radius: 12px; }
  .topbar-content { min-height: 56px; padding: 7px 12px; gap: 10px; }
  .emblem { width: 40px; height: 40px; }
  .logo { font-size: 1.12rem; }
  .logo-city { font-size: .62rem; letter-spacing: 3px; }

  /* Kompakter HUD: 3 Spalten, klein */
  .statbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 6px; position: static; }
  .stat { min-width: 0; padding: 4px 4px; }
  .stat b { font-size: .8rem; }
  .stat small { font-size: .56rem; }
  .bar { width: 100%; }

  /* Inhalte */
  .view h2 { font-size: 1.08rem; }
  .cols > .card { min-width: 100%; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .btn.quick { padding: 14px 6px; font-size: .9rem; }
  .dur-grid .btn { min-width: calc(50% - 4px); }
  .shop-grid, .ach-grid { grid-template-columns: 1fr 1fr; }
  .shop-item { flex-direction: column; align-items: center; text-align: center; }
  .shop-foot { justify-content: center; }
  .crew-row { flex-wrap: wrap; }
  .crew-buy { flex: 1; }
  .map-cols > .card:last-child { max-width: none; }
  #toasts { bottom: calc(96px + env(safe-area-inset-bottom)); right: 8px; left: 8px; max-width: none; }
  .modal-card { max-width: 94vw; }

  /* Bottom-Tab-Bar */
  .bottom-nav {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  }
  .mob-activity {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(180deg, var(--panel3), var(--panel2));
    border-top: 2px dashed var(--accent2);
    padding: 5px 12px; font-size: .82rem;
  }
  .mob-activity:empty { display: none; }
  .mob-act-time { font-family: 'Courier New', monospace; color: var(--accent); }
  .tabs {
    display: flex;
    background: linear-gradient(180deg, #2e2920, #1d1a13);
    border-top: 2px solid var(--border-hi);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .55);
  }
  .tab {
    flex: 1; background: none; border: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    color: var(--muted); font-family: inherit; padding: 4px 0;
    transition: all .15s;
  }
  .tab-ico { font-size: 1.45rem; filter: grayscale(.6) brightness(.85); transition: all .15s; }
  .tab small { font-size: .6rem; letter-spacing: .3px; }
  .tab.active { color: var(--accent); }
  .tab.active .tab-ico { filter: none; transform: translateY(-2px) scale(1.12); }
  .tab.active small { font-weight: 700; }
}

@media (max-width: 420px) {
  .shop-grid, .ach-grid { grid-template-columns: 1fr; }
  .start-avatars { gap: 6px; }
  .start-avatar .avatar-img { width: 64px !important; height: 64px !important; }
}
