:root {
  --color-bg: #F5F0EA;
  --color-card: #FFFFFF;
  --color-border: #ECE6DE;
  --color-warm-grey: #DDD7CF;
  --color-mid-grey: #C8C0B5;
  --color-text-muted: #BBB5AD;
  --color-text: #1A1A1A;
  --color-terracotta: #E05C38;
  --color-win: #2A6E2A;
  --color-loss: #DC2626;
  --color-tint-streak: #EEF5E6;
  --color-tint-rank: #EEF3FA;
  --color-tint-group: #FEF7F4;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --color-bg: #111111;
    --color-card: #1A1A1A;
    --color-border: #2A2A2A;
    --color-warm-grey: #333333;
    --color-mid-grey: #555555;
    --color-text-muted: #555555;
    --color-text: #FFFFFF;
    --color-terracotta: #E05C38;
    --color-win: #4ADE80;
    --color-loss: #DC2626;
    --color-tint-streak: rgba(74, 222, 128, 0.08);
    --color-tint-rank: rgba(100, 150, 220, 0.08);
    --color-tint-group: rgba(224, 92, 56, 0.10);
  }
}
:root.dark {
  --color-bg: #111111;
  --color-card: #1A1A1A;
  --color-border: #2A2A2A;
  --color-warm-grey: #333333;
  --color-mid-grey: #555555;
  --color-text-muted: #555555;
  --color-text: #FFFFFF;
  --color-terracotta: #E05C38;
  --color-win: #4ADE80;
  --color-loss: #DC2626;
  --color-tint-streak: rgba(74, 222, 128, 0.08);
  --color-tint-rank: rgba(100, 150, 220, 0.08);
  --color-tint-group: rgba(224, 92, 56, 0.10);
}

html, body { height: 100%; overflow-x: hidden; }

/* ── Bottom Navigation Bar ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  padding: 12px 0 calc(20px + env(safe-area-inset-bottom));
  min-height: 72px;
  z-index: 100;
}

.bn-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 16px;
  border-radius: 26px;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--color-text-muted);
  min-width: 64px;
}

.bn-tab i {
  font-size: 22px;
}

.bn-tab span {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
  display: block;
}

.bn-tab.active {
  background: #1A1A1A;
  color: #ffffff;
}

.bn-tab.active i {
  color: #ffffff;
}

.bn-tab.active span {
  font-weight: 600;
  color: #ffffff;
}

.bn-tab--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (prefers-color-scheme: dark) {
  html:not(.light) .bottom-nav { background: #0D0D0D; }
  html:not(.light) .bn-tab.active { background: #E05C38; }
}
html.dark .bottom-nav { background: #0D0D0D; }
html.dark .bn-tab.active { background: #E05C38; }
