.app-shell {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--safe-top) + 12px);
  padding-bottom: calc(var(--safe-bottom) + 96px);
  padding-left: 16px;
  padding-right: 16px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 18px;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  user-select: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--gradient-festive);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  font-size: 20px;
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand-text span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 5px 11px 5px 6px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.user-pill:active {
  transform: scale(0.96);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 1.15rem;
}

.avatar-xl {
  width: 68px;
  height: 68px;
  font-size: 1.65rem;
}

.bottom-nav {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 460px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  z-index: 40;
}

.bottom-nav.has-admin {
  grid-template-columns: repeat(4, 1fr);
}

.nav-item {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 6px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-item svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.1;
}

.nav-item.active {
  background: rgba(244, 63, 94, 0.16);
  color: #fda4af;
}

.app-legal-footer {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.73rem;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

.app-legal-footer strong {
  color: var(--text-secondary);
}

.legal-link-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin-left: 4px;
  color: #fda4af;
  font-size: 0.73rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.legal-link-btn:hover {
  color: #fecdd3;
}
