:root {
  --bg: #1a1d21;
  --surface: #24292f;
  --text: #e8edf3;
  --muted: #8b949e;
  --accent: #f0a030;
  --accent-dim: #c77d1f;
  --border: #30363d;
  --safe-bottom: env(safe-area-inset-bottom, 12px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(72px + var(--safe-bottom));
}

.top {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #22262c 0%, var(--bg) 100%);
}

.top h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.top p {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

main {
  flex: 1;
  padding: 16px 18px;
}

.panel {
  display: none;
  animation: fade 0.2s ease;
}

.panel.active {
  display: block;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.card .big {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.pill {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(240, 160, 48, 0.15);
  color: var(--accent);
  border: 1px solid rgba(240, 160, 48, 0.35);
}

.placeholder {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

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

.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  min-height: 88px;
}

.tile .label {
  font-size: 0.75rem;
  color: var(--muted);
}

.tile .val {
  margin-top: 6px;
  font-weight: 600;
}

nav.bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 8px calc(8px + var(--safe-bottom));
  background: #16191d;
  border-top: 1px solid var(--border);
}

nav.bottom button {
  flex: 1;
  max-width: 120px;
  margin: 0 4px;
  padding: 10px 6px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

nav.bottom button .ico {
  font-size: 1.25rem;
  line-height: 1;
}

nav.bottom button.active {
  color: var(--accent);
  background: rgba(240, 160, 48, 0.1);
}

nav.bottom button:active {
  transform: scale(0.97);
}
