#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 30px rgba(0, 100, 255, 0.5);
  letter-spacing: 4px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-glow);
  background: var(--bg-primary);
}
.header-logo {
  height: 36px;
  width: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(0, 120, 255, 0.6));
}

main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px;
  padding-bottom: 200px;
}

.page { display: none; }
.page.active { display: block; }

#tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-glow);
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
  z-index: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.54rem;
  font-weight: 500;
  padding: 6px 2px;
  transition: color 0.2s;
}

.tab-btn svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-btn.active {
  color: var(--accent-cyan);
}
.tab-btn.active svg {
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.5));
}

#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
}

@media (min-width: 600px) {
  main { max-width: 480px; margin: 0 auto; }
}
