/* =============================================================================
   GREEN GOOSE · BIER EXCHANGE
   Pub-Style Theme — Tannengrün · Holz · Bier-Gold · Schaum-Creme
   Mobile-First
   ============================================================================= */

/* DSGVO-Hinweis: Für Produktivbetrieb Fonts lokal hosten statt von Google laden. */
@import url('https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Bricolage+Grotesque:opsz,wght@12..96,300..800&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  /* Pub Greens — der Tannengrüne Schildhintergrund */
  --bg:           #1a2418;
  --bg-elev:      #21301f;
  --surface:      #263825;
  --surface-2:    #324430;
  --border:       #4a5d44;
  --border-soft:  #2e3f2c;

  /* Wood & Bronze — Rahmenfarbe */
  --wood:         #5c3a1f;
  --wood-light:   #7a4f2c;
  --bronze:       #8a6a3c;

  /* Beer Gold — wie das Bier im Logo */
  --gold:         #d4a84a;
  --gold-light:   #e8c47e;
  --gold-dim:     #a8862e;
  --gold-bg:      rgba(212,168,74,0.10);

  /* Schaum-Creme — wie der Bierschaum / die Logo-Schrift */
  --cream:        #f0e1bd;
  --cream-soft:   #d9c8a0;

  /* Text */
  --text:         #f5ede0;
  --text-dim:     #b8a98a;
  --text-mute:    #7a6f5a;

  /* Funktional — Hopfen-Grün für Plus, Rost für Minus */
  --pos:          #9fc55a;
  --neg:          #d96b4a;
  --pos-bg:       rgba(159,197,90,0.12);
  --neg-bg:       rgba(217,107,74,0.12);

  --font-display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --font-brand:   'Alfa Slab One', Georgia, serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body {
  padding-top: 116px;
  padding-bottom: 88px;
}

/* Subtile Pub-Hintergrund-Textur: zwei warme Radial-Gradients + vertikale Holzandeutung */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 10% 0%,   rgba(212,168,74,0.05), transparent 40%),
    radial-gradient(circle at 90% 100%, rgba(212,168,74,0.04), transparent 50%),
    repeating-linear-gradient(90deg,
      transparent 0,
      transparent 80px,
      rgba(0,0,0,0.05) 80px,
      rgba(0,0,0,0.05) 81px);
  opacity: 0.6;
}

main {
  position: relative; z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

/* =============================================================================
   STICKY HEADER — Pub-Schild-Anmutung mit Bronze-Rand
   ============================================================================= */

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: linear-gradient(180deg, #1c2719 0%, #161f14 100%);
  border-bottom: 2px solid var(--bronze);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.topbar-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.topbar-brand {
  display: flex; align-items: center;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}
.topbar-logo {
  height: 80px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
.topbar-cash {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--gold);
  background: var(--gold-bg);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(212,168,74,0.25);
}

/* =============================================================================
   BOTTOM NAV
   ============================================================================= */

.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: linear-gradient(180deg, #161f14 0%, #0f1a0e 100%);
  border-top: 2px solid var(--bronze);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.4);
}
.bottomnav-inner {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 9px 2px 11px;
  color: var(--text-mute);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  transition: color 0.15s;
}
.bottomnav a.active {
  color: var(--gold);
}
.bottomnav a.disabled { opacity: 0.4; pointer-events: none; }
.bottomnav .ico { font-size: 18px; line-height: 1; }

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: var(--cream);
}
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  margin-top: 24px;
  color: var(--cream);
}
h2 .label {
  font-size: 11px; font-weight: 500;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 2px;
}
.subtitle { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.pos { color: var(--pos); }
.neg { color: var(--neg); }
.neu { color: var(--text-dim); }

/* =============================================================================
   CARDS — warmer Holz-Schein
   ============================================================================= */

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.card-stat {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.card-stat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}
.card-stat .label {
  font-size: 12px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  font-weight: 600;
}
.card-stat .big {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}
.card-stat .sub {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-grid .card-stat { padding: 14px; }
.stat-grid .card-stat .big { font-size: 20px; }
.stat-grid .card-stat .label { font-size: 10px; }

/* =============================================================================
   ROWS (Aktien / Positionen)
   ============================================================================= */

.row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.1s, border-color 0.15s, background 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.row:active { transform: scale(0.98); }
.row:hover  {
  border-color: var(--bronze);
  background: var(--bg-elev);
}

/* === SPARKLINE-Row Variante (Markt + Depot) === */
.row-spark {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #243121 0%, #1d2a1a 100%);
  padding: 14px 14px;
  border-radius: 14px;
  margin-bottom: 10px;
}
.row-spark .spark-bg {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 55%;
  height: 100%;
  opacity: 0.4;
  pointer-events: none;
}
.row-spark > * { z-index: 1; position: relative; }
.row-spark .row-ticker {
  width: 56px; height: 56px;
}
.row-spark .row-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-top: 4px;
}
.row-side-pill {
  text-align: right;
  background: rgba(20,28,18,0.85);
  padding: 5px 9px;
  border-radius: 8px;
  backdrop-filter: blur(2px);
  border: 1px solid rgba(212,168,74,0.08);
}
.row-side-pill .row-price {
  font-size: 17px;
  line-height: 1;
  display: block;
}
.row-change-pill {
  display: inline-block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
}
.row-change-pill.pos {
  background: rgba(159,197,90,0.18);
  color: var(--pos);
  border: 1px solid rgba(159,197,90,0.3);
}
.row-change-pill.neg {
  background: rgba(217,107,74,0.18);
  color: var(--neg);
  border: 1px solid rgba(217,107,74,0.3);
}

/* === HERO-Stat-Card mit Sparkline (Depot oben) === */
.card-stat.hero-stat {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #2a3520 0%, #1d2a1a 100%);
  border-color: rgba(212,168,74,0.3);
}
.card-stat.hero-stat .spark-bg {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 60%;
  height: 100%;
  opacity: 0.3;
  pointer-events: none;
}
.card-stat.hero-stat > * { position: relative; z-index: 1; }
.card-stat.hero-stat .big { color: var(--gold); }

/* === Achievement-Banner === */
.achv-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, rgba(212,168,74,0.12) 0%, var(--surface) 100%);
  border: 1px solid rgba(212,168,74,0.3);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 14px 0;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.achv-card:hover { border-color: var(--gold); }
.achv-icon {
  width: 38px; height: 38px;
  background: rgba(212,168,74,0.18);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.achv-text { flex: 1; }
.achv-name { font-size: 14px; color: var(--cream); font-weight: 600; }
.achv-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.achv-arrow { color: var(--gold); font-size: 20px; }

.row-ticker {
  width: 72px; height: 72px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, #3a2918 0%, #261a0e 100%);
  border: 1px solid var(--bronze);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
  overflow: hidden;
}
.row-ticker.has-logo {
  background: #fff;
  padding: 5px;
}
.row-ticker.has-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.row-main { flex: 1; min-width: 0; }
.row-name {
  font-weight: 600; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--cream);
}
.row-sub  { font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.row-side { text-align: right; flex-shrink: 0; }
.row-price {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}
.row-change {
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* =============================================================================
   FORMS
   ============================================================================= */

.form-group { margin-bottom: 16px; }
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--cream-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
input:focus {
  border-color: var(--gold);
  background: var(--surface);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #2a1d08;
  border: 1px solid var(--gold-dim);
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  transition: transform 0.1s, filter 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn:active { transform: scale(0.98); }
.btn:hover  { filter: brightness(1.08); }

.btn-secondary {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--bronze);
  box-shadow: none;
}
.btn-secondary:hover {
  border-color: var(--gold);
  background: var(--gold-bg);
  filter: none;
}

.btn-buy {
  background: linear-gradient(180deg, #b8d96f 0%, var(--pos) 100%);
  color: #1a2a0a;
  border-color: #6b8c3a;
}
.btn-sell {
  background: linear-gradient(180deg, #e88a6a 0%, var(--neg) 100%);
  color: #2a0e0a;
  border-color: #9c4a32;
}

.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* =============================================================================
   FLASH MESSAGES
   ============================================================================= */

.flash {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  margin-bottom: 12px;
  font-size: 14px;
  border-left: 3px solid;
}
.flash.ok  { background: var(--pos-bg); color: var(--pos); border-color: var(--pos); }
.flash.err { background: var(--neg-bg); color: var(--neg); border-color: var(--neg); }

/* Badge-Toast: erscheint oben, wenn neues Achievement vergeben wird */
.badge-toast {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #2a1f10 0%, #1a1208 100%);
  border: 1px solid var(--gold);
  border-radius: var(--r-md);
  box-shadow: 0 0 24px rgba(212,168,74,0.25);
  animation: badgePop 0.5s ease-out;
}
.badge-toast-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}
.badge-toast-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 2px;
}
.badge-toast-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--cream);
}
@keyframes badgePop {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Badge-Galerie auf Achievements-Seite */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.badge-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 14px 10px;
  text-align: center;
  position: relative;
}
.badge-card.earned {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(212,168,74,0.10) 0%, var(--surface) 100%);
}
.badge-card.locked .badge-card-icon {
  filter: grayscale(1);
  opacity: 0.3;
}
.badge-card-icon { font-size: 38px; line-height: 1; margin-bottom: 8px; }
.badge-card-title {
  font-weight: 600; font-size: 12px; color: var(--cream);
  margin-bottom: 4px; line-height: 1.2;
}
.badge-card-desc {
  font-size: 10px; color: var(--text-mute); line-height: 1.3;
}
.badge-card-date {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--gold);
  margin-top: 6px;
}

/* =============================================================================
   AUTH PAGES — Pub-Schild als Hero
   ============================================================================= */

.auth-wrap {
  min-height: calc(100vh - 116px - 88px);
  display: flex; flex-direction: column; justify-content: center;
}

.auth-logo {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}

.auth-wrap h1 {
  font-family: var(--font-brand);
  font-size: 24px;
  text-align: center;
  letter-spacing: 0.04em;
  color: var(--cream);
  margin-bottom: 6px;
}
.auth-wrap .subtitle {
  text-align: center;
  color: var(--gold-light);
  font-style: italic;
  font-size: 14px;
  margin-bottom: 28px;
}

.auth-link {
  text-align: center;
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 14px;
}
.auth-link a { color: var(--gold); text-decoration: none; font-weight: 600; }

/* =============================================================================
   EMPTY STATES
   ============================================================================= */

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-mute);
}
.empty .ico { font-size: 36px; margin-bottom: 12px; opacity: 0.6; }
.empty p { font-size: 14px; }

/* =============================================================================
   STOCK DETAIL HERO
   ============================================================================= */

.stock-hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.stock-hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}
.stock-hero .ticker {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.stock-hero .hero-logo {
  width: 240px; height: 240px;
  max-width: 100%;
  border-radius: var(--r-md);
  background: #fff;
  padding: 14px;
  margin-bottom: 18px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.45);
}
.stock-hero .hero-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.stock-hero .name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  color: var(--cream);
}
.stock-hero .price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 36px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.stock-hero .change {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.stock-hero .desc {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.branch-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cream-soft);
  background: var(--wood-light);
  border: 1px solid var(--bronze);
  padding: 3px 9px;
  border-radius: 999px;
  margin-top: 8px;
}

/* =============================================================================
   NEWS
   ============================================================================= */

.news-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 12px;
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.news-card:hover  { border-color: var(--bronze); background: var(--bg-elev); }
.news-card:active { transform: scale(0.99); }

/* Karten mit Thumbnail: Flexbox-Layout */
.news-card.has-thumb {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.news-card .news-thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}
.news-card .news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-card .news-body {
  flex: 1;
  min-width: 0;
}
.news-card .news-body > *:last-child { margin-bottom: 0; }

.news-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--text-mute);
}
.news-meta .cat {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.news-meta .dot { color: var(--border); }

.news-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 4px;
  color: var(--cream);
}
.news-teaser {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 8px;
  /* maximal 2 Zeilen */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-effects {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.eff-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.eff-pill.pos { background: var(--pos-bg); color: var(--pos); }
.eff-pill.neg { background: var(--neg-bg); color: var(--neg); }

.news-body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  padding: 14px 16px;
  margin-top: 4px;
}

.news-image {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--r-md);
  margin-bottom: 12px;
  display: block;
  border: 1px solid var(--border);
}

.news-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.news-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  display: block;
}

/* =============================================================================
   TRADE FEED
   ============================================================================= */

.feed-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.feed-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.feed-user {
  font-weight: 600;
  font-size: 14px;
  color: var(--cream);
}
.feed-time {
  font-size: 11px;
  color: var(--text-mute);
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.feed-action {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.feed-action strong { color: var(--text); font-weight: 600; }
.feed-action .ticker {
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.feed-action .mono { color: var(--cream); font-weight: 500; }

.reactions {
  display: flex; gap: 6px;
  flex-wrap: wrap;
}
.rx-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  transition: transform 0.1s, background 0.15s, border-color 0.15s;
}
.rx-btn:hover  { border-color: var(--bronze); }
.rx-btn:active { transform: scale(0.94); }
.rx-btn.active {
  background: var(--gold-bg);
  border-color: rgba(212,168,74,0.40);
  color: var(--gold);
}
.rx-btn .emo { font-size: 14px; line-height: 1; }
.rx-btn form { display: inline; margin: 0; }
.rx-btn button {
  background: none; border: none;
  display: inline-flex; align-items: center; gap: 5px;
  color: inherit; font: inherit; cursor: pointer;
  padding: 0;
}

/* Filter-Bar */
.filter-bar {
  display: flex; gap: 6px;
  margin-bottom: 14px;
}
.filter-bar a {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border-soft);
}
.filter-bar a.active {
  color: var(--gold);
  background: var(--gold-bg);
  border-color: rgba(212,168,74,0.35);
}

/* =============================================================================
   LIGA
   ============================================================================= */

.season-info {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.season-info .name { font-weight: 600; font-size: 15px; color: var(--cream); }
.season-info .meta {
  font-size: 12px;
  color: var(--text-mute);
  font-family: var(--font-mono);
}

.my-rank-card {
  background: linear-gradient(135deg, rgba(212,168,74,0.15), rgba(212,168,74,0.05));
  border: 1px solid rgba(212,168,74,0.40);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 2px 6px rgba(212,168,74,0.10);
}
.my-rank-card .pos {
  font-family: var(--font-brand);
  font-size: 24px;
  color: var(--gold);
  min-width: 50px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}
.my-rank-card .label-mini {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-mute);
  margin-bottom: 2px;
}
.my-rank-card .val {
  font-family: var(--font-mono);
  font-weight: 600; font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}
.my-rank-card .roi {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.rank-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  margin-bottom: 6px;
}
.rank-row.me {
  background: rgba(212,168,74,0.10);
  border-color: rgba(212,168,74,0.35);
}
.rank-row .rank-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-mute);
  min-width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rank-row .rank-medal {
  font-size: 20px;
  min-width: 28px;
  text-align: center;
}
.rank-row .rank-name {
  flex: 1; min-width: 0;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--cream);
}
.rank-row.me .rank-name { color: var(--gold); }
.rank-row .rank-side { text-align: right; flex-shrink: 0; }
.rank-row .rank-total {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}
.rank-row .rank-roi {
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.rank-divider {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: .2em;
  margin: 16px 0 8px;
}

/* =============================================================================
   CHECK-IN SUCCESS-SCREEN — die Bier-Stunde!
   ============================================================================= */

.checkin-screen {
  min-height: calc(100vh - 116px - 88px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 30px 20px;
}
.checkin-screen .ico-big {
  font-size: 56px;
  margin-bottom: 16px;
  line-height: 1;
}
.checkin-screen .label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--gold);
  margin-bottom: 8px;
}
.checkin-screen .amount {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 700;
  color: var(--pos);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.checkin-screen .amount.muted { color: var(--cream); }
.checkin-screen .headline {
  font-family: var(--font-brand);
  font-size: 24px;
  letter-spacing: 0.02em;
  color: var(--cream);
  margin-bottom: 8px;
}
.checkin-screen .subline {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 320px;
  margin-bottom: 24px;
}
.checkin-screen .cash-now {
  background: var(--surface);
  border: 1px solid var(--bronze);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.checkin-screen .cash-now strong { color: var(--gold); }
.checkin-screen .btn { max-width: 320px; }

.signup-bonus-banner {
  background: linear-gradient(135deg, rgba(159,197,90,0.12), rgba(212,168,74,0.10));
  border: 1px solid rgba(159,197,90,0.35);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--cream);
}
.signup-bonus-banner strong {
  color: var(--pos);
  font-family: var(--font-mono);
  font-size: 16px;
}

/* =============================================================================
   STATIC PAGES (Spielregeln, Impressum, Datenschutz)
   ============================================================================= */

.rules-content {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 20px;
  line-height: 1.7;
  color: var(--text);
  font-size: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.rules-content h1 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--gold);
  margin-top: 32px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212,168,74,0.3);
  font-weight: 600;
}
.rules-content h1:first-child { margin-top: 0; }

.rules-content h2 {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--cream);
  margin-top: 24px;
  margin-bottom: 8px;
  font-weight: 600;
  background: none;
  padding: 0;
  border: none;
}

.rules-content h3 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--cream);
  margin-top: 18px;
  margin-bottom: 6px;
  font-weight: 600;
}

.rules-content p {
  margin-bottom: 12px;
}

.rules-content em {
  color: var(--gold);
  font-style: italic;
}

.rules-content strong {
  color: var(--cream);
  font-weight: 600;
}

.rules-content ul,
.rules-content ol {
  margin: 8px 0 14px 20px;
  padding-left: 8px;
}
.rules-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}
.rules-content li::marker { color: var(--gold); }

.rules-content blockquote {
  background: rgba(212,168,74,0.08);
  border-left: 3px solid var(--gold);
  padding: 10px 14px;
  margin: 14px 0;
  border-radius: 4px;
  font-style: italic;
  color: var(--text-dim);
}

.rules-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
}
.rules-content table th {
  background: var(--surface-2);
  color: var(--gold);
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.rules-content table td {
  padding: 8px 12px;
  border-top: 1px solid var(--border-soft);
}
.rules-content table tr:nth-child(odd) td {
  background: rgba(255,255,255,0.02);
}

.rules-content code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
}

.rules-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* Letztes Element ohne unteren Abstand */
.rules-content > *:last-child {
  margin-bottom: 0;
}

/* Versteckte Anchor-IDs sollen nicht stören */
.rules-content [id] {
  scroll-margin-top: 90px;
}

/* === DANGER ZONE (Account löschen) === */
.danger-zone {
  background: rgba(217,107,74,0.05);
  border: 1px solid rgba(217,107,74,0.25);
  border-radius: var(--r-md);
  padding: 16px;
  margin-top: 24px;
}
.danger-zone h3 {
  color: var(--neg);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.danger-zone p {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.5;
}
.btn-danger {
  background: transparent;
  color: var(--neg);
  border: 1px solid var(--neg);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-danger:hover {
  background: var(--neg);
  color: #fff;
}
