/* First-run onboarding carousel (js/onboarding.js). Palette matches the main app buttons. */
.onb {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #fff;
  color: #13233F;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 20px calc(env(safe-area-inset-bottom, 0px) + 16px);
  animation: onbFadeIn 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  overscroll-behavior: contain;
}
.onb.is-closing { opacity: 0; transition: opacity 0.2s ease; }

.onb__inner {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: auto;
  gap: 12px;
}

.onb__top {
  display: flex;
  justify-content: flex-end;
  min-height: 28px;
}
.onb__skip {
  background: none;
  border: 0;
  padding: 6px 8px;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #7b828a;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.onb__skip:active {
  background: rgba(0, 0, 0, 0.05);
  color: #13233F;
}

.onb__viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
}
.onb__track {
  display: flex;
  width: 100%;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.onb__slide {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 4px;
  min-height: 0;
  overflow: hidden;
}
.onb__img {
  display: block;
  flex: 0 1 auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 280px;
  max-height: 35dvh;
  margin: 0 auto;
  border-radius: 20px;
  background: #dbdbdb;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.onb__copy {
  text-align: center;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}
.onb__copy h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #13233F;
  text-wrap: balance;
}
.onb__copy p {
  margin: 8px 0 0;
  color: #5d6670;
  font-size: 15px;
  line-height: 1.4;
  text-wrap: pretty;
}

.onb__bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 4px;
}
.onb__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.onb__dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(19, 35, 63, 0.18);
  transition: width 0.25s, background 0.25s;
}
.onb__dot[aria-current="true"] {
  width: 24px;
  background: #3390ec;
}

.onb__cta {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #4facfe 0%, #3390ec 100%);
  box-shadow: 0 6px 20px rgba(51, 144, 236, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.onb__cta:active {
  transform: scale(0.985);
  box-shadow: 0 3px 10px rgba(51, 144, 236, 0.25);
}
.onb button:focus-visible {
  outline: 2px solid #3390ec;
  outline-offset: 3px;
}

@keyframes onbFadeIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .onb__track { transition: none; }
  .onb { animation: none; }
}

@media (max-height: 700px) {
  .onb__inner { gap: 8px; }
  .onb__img { max-height: 28dvh; max-width: 230px; }
  .onb__slide { gap: 12px; }
  .onb__copy h2 { font-size: 20px; }
  .onb__copy p { font-size: 14px; margin-top: 6px; }
  .onb__bottom { gap: 12px; }
  .onb__cta { padding: 14px; }
}
.onb, .onb *, .onb *::before, .onb *::after { box-sizing: border-box; }
