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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior-y: none;
  /* Экраны въезжают через translateX — горизонтальная прокрутка не нужна. */
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

/* Мягкое свечение за контентом — глубина, как на референсе */
body::before {
  content: "";
  position: fixed;
  inset: -30% -30% auto -30%;
  height: 60vh;
  background: radial-gradient(
      50% 50% at 30% 0%,
      rgba(47, 107, 255, 0.16) 0%,
      rgba(47, 107, 255, 0) 70%
    ),
    radial-gradient(40% 40% at 85% 10%, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea {
  font: inherit;
  color: inherit;
}

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

img {
  max-width: 100%;
  display: block;
}

svg {
  display: block;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- каркас приложения --------------------------------------------------- */
#app {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  padding: 0 var(--pad);
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px);
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  animation: screen-in var(--t-mid) var(--ease) both;
}

.screen--sub {
  animation: sub-in var(--t-mid) var(--ease) both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes sub-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
}

.appbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--safe-t) + 12px) 0 14px;
  min-height: 56px;
}

.appbar__logo {
  width: 32px;
  height: 32px;
  flex: none;
}

.appbar__title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appbar__sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0;
}

.section {
  margin-top: 22px;
}

.section__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
  padding-left: 2px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
