/* Estrutura — shell, header, nav, screens */
.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 22px 20px calc(120px + env(safe-area-inset-bottom, 0px));
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  overflow-x: hidden;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  width: 100%;
  min-width: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.brand-copy {
  min-width: 0;
  overflow: hidden;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}

.brand-lockup .eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-lockup .brand {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.05;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: riseIn 0.45s var(--ease);
}

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

.nav {
  position: fixed;
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(var(--max-width) - 24px);
  width: calc(100% - 24px);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 8px;
  z-index: 20;
  box-shadow: var(--shadow);
}

.nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  padding: 8px 4px;
  border-radius: 16px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav button .nav-ico {
  display: block;
  font-size: 16px;
  margin-bottom: 3px;
  font-style: normal;
}

.nav button.active {
  color: var(--accent-deep);
  background: rgba(12, 143, 116, 0.12);
  font-weight: 800;
}

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

.nav.hidden,
.app-header.hidden {
  display: none;
}

.wrap.onboarding-mode {
  padding-bottom: 28px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap.onboarding-mode #screen-onboarding.active {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.section-head {
  margin: 18px 0 16px;
}

.section-head h2 {
  margin: 0 0 6px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
