@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  -webkit-appearance: none;
}

a {
  color: var(--accent-text);
  text-decoration: none;
}

/* Tabular nums for consistent number widths */
.num {
  font-variant-numeric: tabular-nums;
}

/* App shell */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
}

#view {
  flex: 1;
  padding-bottom: 64px; /* tab bar space */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tab Bar */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 56px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-divider);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.tab-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  color: var(--text-tertiary);
  transition: color 150ms ease;
  position: relative;
  min-width: 48px;
  min-height: 48px;
  justify-content: center;
}

.tab-bar-item.active {
  color: var(--accent);
}

.tab-bar-item .tab-icon {
  font-size: 22px;
  line-height: 1;
}

.tab-bar-item .tab-label {
  font-size: 11px;
  font-weight: 500;
}

.tab-bar-item .tab-dot {
  position: absolute;
  top: 4px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: none;
}

.tab-bar-item .tab-dot.visible {
  display: block;
}
