* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.06);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--bg-app);
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-color);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.app-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.9rem;
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  padding: 10px 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input:focus {
  border-color: var(--color-primary);
}

.clear-search-btn {
  position: absolute;
  right: 10px;
  background: var(--bg-subtle);
  border: none;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  cursor: pointer;
}

.app-main {
  flex: 1;
  padding: 16px 16px 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  height: 70px;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  z-index: 30;
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  font-family: inherit;
  cursor: pointer;
  padding: 6px 10px;
  transition: color 0.2s;
}

.nav-item.active {
  color: var(--color-primary);
  font-weight: 700;
}

.nav-icon {
  font-size: 1.2rem;
}

.nav-label {
  font-size: 0.7rem;
}

.nav-fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background-color: var(--color-primary);
  color: var(--text-inverse);
  font-size: 1.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -22px;
  box-shadow: var(--shadow-float);
  cursor: pointer;
  transition: transform 0.15s;
}

.nav-fab:active {
  transform: scale(0.94);
}

.hidden {
  display: none !important;
}
