/* ==========================================================
   Tutorial screens – scoped under .new-onboarding
   ========================================================== */

/* Shell */
.new-onboarding .shell {
  width: 100%;
  max-width: 393px;
  height: 100%;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--white) 0%, var(--warm-cream) 100%);
}

/* ── Top bar ─────────────────────────────────────────────── */
.new-onboarding .tut-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 20px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 40;
  background: linear-gradient(180deg, var(--white) 70%, transparent);
}

.new-onboarding .tut-bk {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--white);
  flex-shrink: 0;
}

.new-onboarding .tut-bk:active {
  opacity: .7;
}

.new-onboarding .tut-bk svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.new-onboarding .tut-ptr {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}

.new-onboarding .tut-pf {
  height: 100%;
  background: var(--coral);
  border-radius: 2px;
  transition: width .4s ease;
}

/* ── Pages strip ─────────────────────────────────────────── */
.new-onboarding .pages {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}

.new-onboarding .pg {
  min-width: 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Copy screen (pg0) ───────────────────────────────────── */
.new-onboarding .copy {
  padding: 72px 28px 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.new-onboarding .c-line {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.4s cubic-bezier(.25, .1, .25, 1),
              transform 1.4s cubic-bezier(.25, .1, .25, 1);
}

.new-onboarding .c-line.tut-vis {
  opacity: 1;
  transform: translateY(0);
}

.new-onboarding .c-name {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 38px;
  color: var(--coral);
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 18px;
}

.new-onboarding .c-main {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 32px;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -.025em;
  margin-bottom: 28px;
}

.new-onboarding .c-sub {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Tutorial screens ────────────────────────────────────── */
.new-onboarding .tut {
  padding: 56px 0 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.new-onboarding .phone-wrap {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 0;
  padding: 0 20px;
}

.new-onboarding .phone-shell {
  position: relative;
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
}

.new-onboarding .phone-shell::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 72px;
  width: 3px;
  height: 28px;
  background: #C8C8CC;
  border-radius: 2px 0 0 2px;
  box-shadow: 0 36px 0 #C8C8CC, 0 68px 0 #C8C8CC;
}

.new-onboarding .phone-shell::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 96px;
  width: 3px;
  height: 52px;
  background: #C8C8CC;
  border-radius: 0 2px 2px 0;
}

.new-onboarding .tut-phone {
  width: 100%;
  flex: 1;
  min-height: 0;
  border-radius: 44px;
  border: 8px solid #1A1A1E;
  background: var(--sand-light);
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 0 1px #3A3A3C,
              0 2px 4px rgba(0, 0, 0, .3),
              0 12px 40px rgba(0, 0, 0, .22),
              0 24px 60px rgba(0, 0, 0, .12),
              inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.new-onboarding .phone-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 20px;
  background: #1A1A1E;
  border-radius: 20px;
  z-index: 20;
}

.new-onboarding .phone-status {
  height: 44px;
  background: var(--white);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 20px 6px;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.new-onboarding .phone-status-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.02em;
}

.new-onboarding .phone-status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.new-onboarding .phone-body {
  height: calc(100% - 44px - 50px);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.new-onboarding .phone-scroll {
  padding: 12px 14px 60px;
  transition: transform .8s ease-in-out;
}

.new-onboarding .phone-nav {
  display: flex;
  border-top: none;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  padding: 6px 4px 14px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  gap: 1px;
  box-shadow: 0 -0.5px 0 rgba(0, 0, 0, .12);
}

.new-onboarding .pnav {
  flex: 1;
  text-align: center;
  font-size: 9px;
  color: var(--text-muted);
  padding: 2px 2px 0;
  font-weight: 500;
  letter-spacing: -.01em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  transition: color .2s ease;
}

.new-onboarding .pnav::before {
  content: attr(data-icon);
  font-size: 16px;
  line-height: 1;
}

.new-onboarding .pnav.tut-on {
  color: var(--coral);
  font-weight: 600;
}

/* ── Callout bubble ──────────────────────────────────────── */
.new-onboarding .callout {
  position: absolute;
  left: 10px;
  right: 10px;
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--coral);
  border: 1.5px solid var(--coral);
  box-shadow: 0 4px 16px rgba(239, 83, 80, .35),
              0 2px 8px rgba(0, 0, 0, .08);
  display: flex;
  align-items: flex-start;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transform: scale(.85);
  transform-origin: 50% 100%;
  transition: opacity .32s cubic-bezier(.34, 1.56, .64, 1),
              transform .32s cubic-bezier(.34, 1.56, .64, 1),
              top .55s cubic-bezier(.4, 0, .2, 1);
}

.new-onboarding .callout.show {
  opacity: 1;
  transform: scale(1);
}

.new-onboarding .callout::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid var(--coral);
}

.new-onboarding .callout.arrow-up {
  transform-origin: 50% 0;
}

.new-onboarding .callout.arrow-up::after {
  bottom: auto;
  top: -7px;
  border-top: none;
  border-bottom: 8px solid var(--coral);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
}

.new-onboarding .callout-text {
  display: none;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .9);
  line-height: 1.45;
  flex: 1;
}

.new-onboarding .callout-text strong {
  color: #fff;
  font-weight: 700;
}

/* ── App preview card components ─────────────────────────── */
.new-onboarding .ap-card {
  background: var(--white);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  transition: border-color .4s ease, box-shadow .4s ease;
}

.new-onboarding .ap-card.hl {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(239, 83, 80, .15);
}

.new-onboarding .habit-wrap {
  border-radius: 12px;
  padding: 2px;
  margin-bottom: 8px;
  transition: box-shadow .4s ease, outline-color .4s ease;
  outline: 1.5px solid transparent;
}

.new-onboarding .habit-wrap.hl {
  outline-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(239, 83, 80, .15);
}

.new-onboarding .hl-group {
  border-radius: 10px;
  transition: box-shadow .4s ease, outline .4s ease;
  outline: 1.5px solid transparent;
}

.new-onboarding .hl-group.hl {
  outline-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(239, 83, 80, .15);
}

.new-onboarding .ap-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.new-onboarding .ap-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--coral);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-hint);
  flex-shrink: 0;
}

.new-onboarding .ap-trks {
  display: flex;
  gap: 3px;
  margin-top: 6px;
}

.new-onboarding .ap-trk {
  font-size: 13px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sand-light);
  border-radius: 6px;
}

.new-onboarding .ap-trk-label {
  font-size: 6.5px;
  color: var(--text-hint);
  text-align: center;
  margin-top: 1px;
}

.new-onboarding .ap-btn {
  background: linear-gradient(135deg, #EF5350, #E53935);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 10px;
  width: 100%;
  font-family: var(--font-b);
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  text-align: center;
}

.new-onboarding .ap-streak-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid var(--coral);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--coral);
  flex-shrink: 0;
}

.new-onboarding .ap-cal {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  margin-top: 6px;
}

.new-onboarding .ap-day {
  text-align: center;
  font-size: 7px;
  color: var(--text-hint);
  font-weight: 600;
}

.new-onboarding .ap-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  margin: 3px auto 0;
}

.new-onboarding .ap-dot.tut-done {
  background: var(--green);
  opacity: .4;
}

.new-onboarding .ap-dot.today {
  border: 2px solid var(--coral);
  background: rgba(239, 83, 80, .15);
}

.new-onboarding .ap-habit {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.new-onboarding .ap-habit:last-child {
  border-bottom: none;
}

.new-onboarding .ap-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  margin-top: 2px;
}

.new-onboarding .ap-check.tut-done {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

.new-onboarding .ap-check.undone {
  border-color: var(--coral);
}

.new-onboarding .ap-habit-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.new-onboarding .ap-habit-task {
  font-size: 9px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.new-onboarding .ap-see-why {
  font-size: 8px;
  color: var(--coral);
  font-weight: 600;
  margin-left: auto;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Bottom CTA ──────────────────────────────────────────── */
.new-onboarding .tut-bot {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 12px 24px 32px;
  background: linear-gradient(0deg, var(--warm-cream) 80%, transparent);
  z-index: 30;
}

.new-onboarding .tut-btn {
  width: 100%;
  padding: 15px;
  border-radius: 16px;
  background: var(--coral);
  color: var(--white);
  font-family: var(--font-b);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.new-onboarding .tut-btn:active {
  transform: scale(.97);
}
