/* Isolated from legacy onboarding rules and authenticated app styles. */
body:has(.ios-onboarding:not(.hidden)) {
  margin: 0;
  padding: 0;
  background: #f5f5f7;
}
.auth-view:has(.ios-onboarding:not(.hidden)) {
  display: grid;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100dvh !important;
  padding: 24px !important;
  place-items: center;
  background: #f5f5f7;
}
.ios-onboarding,
.ios-onboarding * {
  box-sizing: border-box;
  min-width: 0;
  letter-spacing: 0;
}
.ios-onboarding {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  max-width: 480px;
  height: min(780px, calc(100dvh - 48px));
  overflow: hidden;
  color: #080b07;
  background: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ios-onboarding.hidden { display: none; }
.ios-onboarding-header,
.ios-onboarding-footer {
  background: #fff;
  border: 1px solid #e5e5e8;
  border-radius: 24px;
  box-shadow: 0 4px 18px rgb(0 0 0 / 4%);
}
@supports ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {
  .ios-onboarding-header,
  .ios-onboarding-footer {
    background: rgb(255 255 255 / 72%);
    border-color: rgb(255 255 255 / 90%);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }
}
.ios-onboarding-header { padding: 14px 18px; }
.ios-onboarding-brand { display: flex; align-items: center; gap: 12px; }
.ios-onboarding-brand strong { font-size: 16px; font-weight: 600; }
.ios-onboarding-monogram {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  height: 36px;
  border-radius: 12px;
  background: #080b07;
  color: var(--neon, #cfff12);
  font-size: 14px;
  font-weight: 700;
}
.ios-onboarding-content {
  display: grid;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 24px;
}
.ios-onboarding-slide {
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
  animation: ios-slide-in 220ms ease-out;
}
.ios-onboarding-icon {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin-bottom: 12px;
  border-radius: 28px;
  background: var(--neon, #cfff12);
  --icon-navy: #080b07;
  --icon-green: #080b07;
}
.ios-onboarding-icon .icon-premium { width: 60px; height: 60px; }
.ios-onboarding-slide h1 {
  max-width: 100%;
  margin: 0;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.2;
  word-break: normal;
  overflow-wrap: normal;
}
.ios-onboarding-slide p {
  max-width: 280px;
  margin: 0;
  color: #626268;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  word-break: normal;
  overflow-wrap: normal;
}
.ios-onboarding-footer { display: grid; gap: 10px; padding: 10px 16px 16px; }
.ios-onboarding-dots { display: flex; justify-content: center; }
.ios-onboarding-dots button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}
.ios-onboarding-dots button::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 10px;
  background: #c6c6cb;
  transition: width 180ms ease, background 180ms ease;
}
.ios-onboarding-dots button.active::after { width: 22px; background: #080b07; }
.ios-onboarding-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ios-onboarding-actions button {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 0;
  border-radius: 16px;
  background: var(--neon, #cfff12);
  color: #080b07;
  box-shadow: none;
  font: 600 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  white-space: normal;
}
.ios-onboarding button { cursor: pointer; touch-action: manipulation; }
.ios-onboarding button:focus-visible { outline: 2px solid #080b07; outline-offset: 2px; }
.ios-onboarding.is-last-slide .ios-onboarding-actions { grid-template-columns: 1fr; }
.ios-onboarding.is-last-slide [data-action="onboarding-skip"] { display: none; }
/* Reserve space for consent instead of covering the slide navigation. */
.shell:has(.ios-onboarding:not(.hidden)):has(#cookieConsent:not(.hidden)) {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100dvh;
  min-height: 0;
}
.shell:has(#cookieConsent:not(.hidden)) .auth-view:has(.ios-onboarding:not(.hidden)) {
  min-height: 0 !important;
  height: 100% !important;
}
.shell:has(#cookieConsent:not(.hidden)) .ios-onboarding:not(.hidden) { height: 100%; }
.shell:has(.ios-onboarding:not(.hidden)) #cookieConsent:not(.hidden) {
  position: static;
  width: calc(100% - 32px);
  max-height: 40dvh;
  overflow-y: auto;
  margin: 0 auto max(12px, env(safe-area-inset-bottom));
}
.shell:has(.ios-onboarding:not(.hidden)) #cookieConsent .cookie-consent-actions button {
  background: var(--neon, #cfff12);
  color: #080b07;
  box-shadow: none;
}
@keyframes ios-slide-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
  .auth-view:has(.ios-onboarding:not(.hidden)) { padding: 0 !important; }
  .ios-onboarding {
    max-width: 100%;
    height: 100dvh;
    padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
  }
  .ios-onboarding-content { padding: 20px 12px; }
}
@media (max-height: 500px) {
  .ios-onboarding-content { padding-block: 16px; }
  .ios-onboarding-icon { width: 72px; height: 72px; margin-bottom: 0; border-radius: 20px; }
  .ios-onboarding-icon .icon-premium { width: 44px; height: 44px; }
  .ios-onboarding-slide { gap: 10px; }
}
@media (max-height: 500px) and (min-width: 641px) {
  .ios-onboarding-slide { grid-template-columns: 72px minmax(0, 1fr); text-align: left; justify-items: start; column-gap: 20px; }
  .ios-onboarding-icon { grid-row: 1 / 3; align-self: center; }
  .ios-onboarding-slide h1 { align-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  .ios-onboarding-slide { animation: none; }
  .ios-onboarding-dots button::after { transition: none; }
}
