/* Онбординг новичка — pop-in модалка поверх затемнения (src/features/onboarding.js).
   Каждый шаг всплывает отдельной карточкой из центра (как приветствие «Добрый
   вечер»); тап по затемнённому фону закрывает. Материал/типографика — apple-design.
   Оба вьюпорта: одна центрированная карточка. */

.ob {
  --ob-dur: 0.34s;
  /* z 55: выше шторки плеера (20) и чрома, ниже тоста (60) и welcome (80). */
  position: fixed; inset: 0; z-index: 55;
  display: flex; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top) + 20px) var(--gutter) calc(env(safe-area-inset-bottom) + 20px);
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity var(--ob-dur) var(--ease);
}
.ob--open { opacity: 1; }

/* Карточка-окно: приподнятый материал, всплывает pop-in из центра (scale + blur —
   «материализуется», apple-design §12; кривая --ease-cine, как у приветствия). */
.ob__card {
  width: 100%; max-width: 400px;
  display: flex; flex-direction: column;
  padding: 16px 18px 18px; border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 40%),
    var(--surface-1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow-2);
}
.ob--open .ob__card { animation: ob-pop var(--ob-dur) var(--ease-cine) both; }
@keyframes ob-pop { from { opacity: 0; transform: scale(0.92) translateY(8px); filter: blur(8px); } }

.ob__top { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 2px 8px; }
.ob__dots { display: flex; gap: 7px; }
.ob__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--surface-3); transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.ob__dot--on { background: var(--accent); transform: scale(1.25); }
.ob__skip { font-size: 14px; font-weight: 600; color: var(--t3); padding: 6px 4px; }

/* Стопка шагов: виден только активный, всплывает pop-in при смене. */
.ob__stack { position: relative; }
.ob__slide {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 14px; padding: 14px 4px 8px; text-align: center;
}
.ob__slide--in { animation: ob-slide-in var(--ob-dur) var(--ease-cine) both; }
@keyframes ob-slide-in { from { opacity: 0; transform: scale(0.96); filter: blur(6px); } }

.ob__art { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; background: var(--surface-2); color: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-1); }
.ob__art .ic { width: 36px; height: 36px; }
.ob__title { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; max-width: 320px; }
.ob__text { max-width: 320px; font-size: 14.5px; font-weight: 500; line-height: 1.5; color: var(--t2); }
.ob__guide { font-size: 13.5px; font-weight: 700; color: var(--accent-soft); padding: 4px; text-decoration: none; }

.ob__field { width: 100%; max-width: 340px; margin: 2px 0 0; }
.ob__go { flex: none; align-self: center; min-width: 160px; padding: 12px 28px; }
.ob__go.is-busy { opacity: 0.6; pointer-events: none; }
.ob__soon { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 2px; }
.ob__soonchip { font-size: 12px; font-weight: 600; color: var(--t4); padding: 6px 12px; border-radius: var(--pill); background: var(--surface-2); }

.ob__switchrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; max-width: 340px; margin-top: 2px; padding: 14px 16px; border-radius: var(--r-card); background: var(--surface-2); text-align: left; }
.ob__switchrow-label { font-size: 15px; font-weight: 700; color: var(--t1); }

.ob__nav { flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 2px 0; }
.ob__back { font-size: 15px; font-weight: 700; color: var(--t2); padding: 12px 16px; }
.ob__next { flex: 1; }

/* Гайд «Как слушать офлайн» (#offline-guide) — та же pop-in модалка, z чуть выше:
   он открывается и поверх онбординга (с его шага). Пронумерованные шаги. */
#offline-guide { z-index: 56; }
.og-steps { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 340px; margin: 4px 0 2px; text-align: left; }
.og-step { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; font-weight: 500; line-height: 1.45; color: var(--t2); }
.og-step__n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.og-ok { align-self: stretch; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .ob { transition-duration: 0.01ms; }
  .ob--open .ob__card, .ob__slide--in { animation: none; }
}
