/* JAN-15 onboarding visual parity.
   Geometry is matched against the original reference viewports:
   tall 853×1844 (~390×844 CSS) and short 941×1672 (~390×693 CSS).
   CSP production policy requires this external stylesheet. */

.ob-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Slides use the full viewport as their coordinate system. */
.ob-slide { position: absolute; inset: 0; overflow: hidden; text-align: center; pointer-events: none; }
.ob-art { position: absolute; display: block; height: auto; object-fit: contain; }
.ob-title,
.ob-text,
.ob-chips,
.ob-hint { position: absolute; box-sizing: border-box; margin: 0; }
.ob-title { left: 20px; right: 20px; color: #fff; font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.ob-text { left: 20px; right: 20px; color: rgba(255,255,255,.66); font-size: 14px; line-height: 1.5; }
.ob-chips { left: 20px; right: 20px; display: flex; justify-content: center; align-items: center; gap: 0 10px; }
.ob-chip,
.ob-chip-sep { font-size: 13px; white-space: nowrap; }
.ob-chip-sep { color: rgba(255,255,255,.45); }
.ob-hint { left: 20px; right: 20px; color: rgba(255,255,255,.55); font-size: 13px; line-height: 1.45; }

/* Tall-reference screens, ref-10 … ref-05. Artwork is width-driven so
   every source keeps its intrinsic ratio; the old vh-driven rules shrank it. */
[data-ob-slide="welcome"] .ob-art { top: 2%; left: 50%; width: 112%; transform: translateX(-50%); }
[data-ob-slide="welcome"] .ob-title { top: 64.5%; }
[data-ob-slide="welcome"] .ob-text { top: 73.1%; }

[data-ob-slide="food"] .ob-art,
[data-ob-slide="sleep"] .ob-art,
[data-ob-slide="practices"] .ob-art,
[data-ob-slide="training"] .ob-art { top: 6%; left: 4.5%; width: 91%; }
[data-ob-slide="practices"] .ob-art,
[data-ob-slide="training"] .ob-art { top: 1.5%; }
[data-ob-slide="food"] .ob-art,
[data-ob-slide="sleep"] .ob-art,
[data-ob-slide="practices"] .ob-art { left: 4.5%; width: 91%; }
[data-ob-slide="food"] .ob-title { top: 62.5%; }
[data-ob-slide="food"] .ob-text { top: 67.7%; }
[data-ob-slide="food"] .ob-chips { top: 78.2%; }
[data-ob-slide="sleep"] .ob-title { top: 68.4%; }
[data-ob-slide="sleep"] .ob-text { top: 75.0%; }
[data-ob-slide="practices"] .ob-title { top: 73.6%; }
[data-ob-slide="practices"] .ob-text { top: 78.6%; }
[data-ob-slide="training"] .ob-title { top: 73.5%; }
[data-ob-slide="training"] .ob-text { top: 78.8%; }

/* Ascetics reference: title first, large 88%-wide artwork. */
[data-ob-slide="ascetics"] .ob-title { top: 3.5%; }
[data-ob-slide="ascetics"] .ob-art { top: 9.5%; left: 1.5%; width: 97%; }
[data-ob-slide="ascetics"] .ob-text { top: 70.8%; }
[data-ob-slide="ascetics"] .ob-chips { top: 78.0%; }

/* Short-reference screens, ref-04 and ref-03. */
[data-ob-slide="picture"] .ob-title,
[data-ob-slide="trial"] .ob-title,
[data-ob-slide="notifications"] .ob-title {
  left: 22px;
  right: 22px;
  text-align: center;
  font-size: 29px;
  line-height: 1.12;
}
[data-ob-slide="picture"] .ob-title { top: 3.5%; }
[data-ob-slide="picture"]::before {
  content: "";
  position: absolute;
  left: 5%;
  width: 90%;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 15px;
  box-sizing: border-box;
}
[data-ob-slide="picture"]::before { top: 17%; height: 51.7%; }
[data-ob-slide="picture"] .ob-art { top: 16%; left: -2%; width: 104%; }
[data-ob-slide="picture"] .ob-text { top: 77.7%; text-align: center; font-size: 16px; }
[data-ob-slide="trial"] .ob-title { top: 3.7%; }
[data-ob-slide="trial"] .ob-art { top: 16%; left: -1.5%; width: 103%; }
[data-ob-slide="trial"] .ob-text { top: 68%; text-align: center; font-size: 16px; }
[data-ob-slide="trial"] > .ob-hint { top: 88%; font-size: 10px; white-space: nowrap; }

/* Notifications reference, ref-02. */
[data-ob-slide="notifications"] .ob-title { top: 1.5%; }
[data-ob-slide="notifications"] .ob-art { top: 11.5%; left: .5%; width: 99%; }
[data-ob-slide="notifications"] .ob-text { top: 62%; text-align: center; font-size: 16px; }

/* Semantic chip colors sampled from references. */
[data-ob-slide="food"] .ob-chip:nth-child(1) { color: #4fce79; }
[data-ob-slide="food"] .ob-chip:nth-child(3) { color: #e2813c; }
[data-ob-slide="food"] .ob-chip:nth-child(5) { color: #8e73ce; }
[data-ob-slide="ascetics"] .ob-chip { color: #0a84ff; }

/* CTA and progress are separate fixed rows; no Back button in references. */
.ob-footer { position: absolute; z-index: 4; left: 7.7%; right: 7.7%; bottom: 10.9%; display: flex; }
.ob-primary {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #0a84ff, #1667f7);
  color: #fff;
  font: 600 18px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}
.ob-primary:disabled { opacity: .6; }
.ob-progress { position: absolute; z-index: 4; left: 0; right: 0; bottom: 2.7%; display: flex; justify-content: center; gap: 12px; }
.ob-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.28); }
.ob-dot.active { background: #0a84ff; }
.ob-dot.passed { background: rgba(255,255,255,.28); }

[data-ob-slide="welcome"] ~ .ob-footer { bottom: 12.8%; }
.ob-hint-under { z-index: 4; top: auto; bottom: 7.2%; text-align: center; }
[data-ob-slide="sleep"] ~ .ob-footer,
[data-ob-slide="practices"] ~ .ob-footer,
[data-ob-slide="training"] ~ .ob-footer { bottom: 7.5%; }
[data-ob-slide="sleep"] ~ .ob-progress,
[data-ob-slide="practices"] ~ .ob-progress,
[data-ob-slide="training"] ~ .ob-progress { bottom: 1.8%; }
[data-ob-slide="ascetics"] ~ .ob-footer { left: 5.8%; right: 5.8%; bottom: 9.9%; }
[data-ob-slide="ascetics"] ~ .ob-progress { bottom: 2.6%; }
[data-ob-slide="picture"] ~ .ob-footer { left: 5.2%; right: 5.2%; bottom: 7.3%; }
[data-ob-slide="trial"] ~ .ob-footer { left: 5.2%; right: 5.2%; bottom: 13%; }
[data-ob-slide="picture"] ~ .ob-progress,
[data-ob-slide="trial"] ~ .ob-progress { bottom: 1.2%; }

.ob-footer-notifications { left: 5.8%; right: 5.8%; bottom: 17%; }
.ob-not-now {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 10.5%;
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  color: #0a84ff;
  font: 400 18px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  white-space: nowrap;
  cursor: pointer;
}

/* Expired trial, ref-01. */
.ob-expired-title {
  position: absolute;
  top: 3.5%;
  left: 22px;
  right: 22px;
  margin: 0;
  color: #fff;
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: -.02em;
  text-align: center;
}
.ob-expired-card {
  position: absolute;
  top: 13.5%;
  left: 4.8%;
  width: 90.4%;
  height: 75.4%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 15px;
  box-sizing: border-box;
}
.ob-expired-art {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
}
.ob-expired-copy {
  position: absolute;
  top: 70%;
  left: 12px;
  right: 12px;
  margin: 0;
  color: rgba(255,255,255,.66);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.ob-expired-pay { position: absolute; top: 80.3%; left: 3.2%; width: 93.6%; font-size: 16px; }
.ob-expired-later {
  position: absolute;
  top: calc(80.3% + 56px);
  left: 50%;
  translate: -50% 0;
  border: 0;
  background: transparent;
  color: #0a84ff;
  font: 400 18px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

/* Very short WebViews: preserve the reference short-screen composition. */
@media (max-height: 720px) {
  .ob-title { font-size: 21px; }
  .ob-text { font-size: 14px; }
  .ob-chip, .ob-chip-sep { font-size: 12px; }

  /* Each artwork has a different intrinsic ratio. Keep it as large as the
     short viewport permits, while reserving non-overlapping copy/CTA rows. */
  [data-ob-slide="welcome"] .ob-art { width: 97%; }
  [data-ob-slide="welcome"] .ob-title { top: 64%; }
  [data-ob-slide="welcome"] .ob-text { top: 73.5%; }

  [data-ob-slide="food"] .ob-art { width: 74%; left: 13%; }
  [data-ob-slide="food"] .ob-title { top: 62%; }
  [data-ob-slide="food"] .ob-text { top: 66.5%; }
  [data-ob-slide="food"] .ob-chips { top: 77.5%; }

  [data-ob-slide="sleep"] .ob-art { width: 72%; left: 14%; }
  [data-ob-slide="sleep"] .ob-title { top: 68%; }
  [data-ob-slide="sleep"] .ob-text { top: 75.5%; }
  [data-ob-slide="practices"] .ob-art { width: 71%; left: 14.5%; }
  [data-ob-slide="training"] .ob-art { width: 69%; left: 15.5%; }
  [data-ob-slide="practices"] .ob-title,
  [data-ob-slide="training"] .ob-title { top: 72.5%; }
  [data-ob-slide="practices"] .ob-text,
  [data-ob-slide="training"] .ob-text { top: 77%; font-size: 13px; line-height: 1.4; }
  [data-ob-slide="ascetics"] .ob-art { width: 76%; left: 12%; }
  [data-ob-slide="picture"] .ob-art { top: 16%; left: 3%; width: 94%; }
  [data-ob-slide="notifications"] .ob-art { width: 82%; left: 9%; }

  [data-ob-slide="picture"] .ob-title,
  [data-ob-slide="trial"] .ob-title,
  [data-ob-slide="notifications"] .ob-title { font-size: 29px; }
}
