:root {
  --blue: #1568f0;
  --green: #14af4b;
  --orange: #fe6f00;
  --violet: #793cf9;
  --ink: #19273b;
  --muted: #667080;
  --line: rgba(42, 60, 94, .12);
}
.onboarding-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: #f6f8fc;
  background-image:
    radial-gradient(ellipse at 16% 28%, #1568f012, transparent 43%),
    radial-gradient(ellipse at 84% 22%, #14af4b0b, transparent 39%),
    radial-gradient(ellipse at 20% 90%, #fe6f000a, transparent 38%),
    radial-gradient(ellipse at 85% 80%, #793cf910, transparent 44%);
  background-attachment: fixed;
}
.onboarding-page a { color: inherit; }
.onboarding-page header {
  width: 100%;
  max-width: 1120px;
  padding: 28px 36px;
  margin: 0 auto;
}
.onboarding-page .brand { width: 148px; }
/* «Mi cuenta»: pequeño y enmarcado en el naranjo del logo, como «Ingresar» en el inicio */
.account-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 2px solid var(--orange);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 800 15px/1 var(--display);
  text-decoration: none;
  box-shadow: 0 8px 16px -12px rgba(254,111,0,.75);
  transition: background-color .2s, transform .25s cubic-bezier(.34,1.56,.64,1);
}
.account-link:hover { background: #fff4ec; transform: translateY(-1px); }
.onboarding-shell {
  width: 100%;
  max-width: 676px;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 116px 24px 40px;
  margin: 0 auto;
}
.journey-main {
  width: 100%;
  min-width: 0;
  padding: 32px 40px 30px;
  border: 1px solid #ffffffed;
  border-radius: 32px;
  background: rgba(255, 255, 255, .67);
  -webkit-backdrop-filter: blur(28px) saturate(125%);
  backdrop-filter: blur(28px) saturate(125%);
  box-shadow: 0 20px 75px -30px #27375623, inset 0 1px 1px #ffffff;
}
.journey-progress-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}
#stepCount { font-variant-numeric: tabular-nums; }
#progressTrack { height: 3px; background: #dfe3ec8a; border-radius: 20px; overflow: hidden; }
#progressFill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--orange), var(--violet));
  transition: width .55s cubic-bezier(.2,.8,.2,1);
  border-radius: inherit;
}
#journeyForm { display: block; }
#stepBody { padding: 34px 0 8px; min-height: 316px; animation: enterStep .35s both; }
#stepBody h2, #planResult h2, #building h2 {
  font-size: clamp(27px, 3vw, 33px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.2;
  margin: 0 0 30px;
  text-wrap: balance;
}
#stepBody h2:focus, #planResult h2:focus { outline: none; }
#stepBody > p { color: var(--muted); font-size: 14px; }
.journey-field { display: grid; gap: 10px; margin: 16px 0; }
.journey-field legend { margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.journey-main input {
  min-height: 58px;
  padding: 15px 18px;
  color: var(--ink);
  background: #ffffff82;
  border: 1px solid #d6dce6c9;
  border-radius: 16px;
  box-shadow: inset 0 1px 3px #19273b03;
}
.journey-main input::placeholder { color: #79818e; opacity: 1; }
.journey-main input:focus { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(21,104,240,.1); outline: none; }
.phone-control {
  display: flex;
  align-items: stretch;
  min-width: 0;
  border: 1px solid #d6dce6c9;
  border-radius: 16px;
  background: #ffffff82;
  box-shadow: inset 0 1px 3px #19273b03;
}
.phone-control:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(21,104,240,.1); outline: none; }
.phone-country { position: relative; flex: 0 0 auto; min-width: 100px; border-right: 1px solid var(--line); }
.phone-country select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.phone-country:focus-within { background: #793cf909; border-radius: 15px 0 0 15px; }
.phone-country-value { display: flex; align-items: center; justify-content: center; gap: 7px; height: 100%; padding: 0 12px; font-size: 14px; pointer-events: none; }
#phoneFlag { font-size: 19px; }
.phone-chevron { color: var(--muted); font-size: 13px; }
.phone-control input { min-width: 0; width: 100%; flex: 1; border: 0; background: transparent; box-shadow: none; border-radius: 0 16px 16px 0; padding-left: 14px; }
.phone-control input:focus { background: transparent; outline: none; }
.date-calendar { width: 100%; max-width: 370px; margin: 0 auto 12px; }
.calendar-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.calendar-nav select { min-width: 0; max-width: 220px; color: var(--ink); border: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 500; padding: 10px 8px; border-radius: 10px; cursor: pointer; }
.calendar-nav button { background: transparent; color: var(--ink); font-size: 26px; font-weight: 400; padding: 2px; min-width: 40px; min-height: 44px; border-radius: 12px; }
.calendar-week, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 3px; text-align: center; }
.calendar-week { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.calendar-week span { padding: 6px 0; }
.calendar-day { border: 1px solid transparent; background: transparent; color: var(--ink); min-height: 40px; width: 100%; padding: 6px 0; border-radius: 12px; font-size: 14px; font-weight: 400; transition: background .15s, box-shadow .15s; }
.calendar-day:hover:not(:disabled), .calendar-nav button:hover:not(:disabled) { background: #793cf90c; }
.calendar-day[aria-current=date] { border-color: var(--line); }
.calendar-day[aria-pressed=true], .calendar-day[aria-pressed=true]:hover { background: var(--blue); color: white; box-shadow: 0 3px 10px rgba(21,104,240,.3); }
.calendar-day:disabled, .calendar-nav button:disabled { opacity: .25; cursor: default; }
.date-calendar :focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.journey-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 24px; }
.journey-actions #next, .plan-result-actions .button {
  margin-left: auto;
  background: var(--blue);
  border-radius: 16px;
  min-width: 150px;
  padding: 14px 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 14px 26px -14px rgba(21,104,240,.8);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), background-color .2s, box-shadow .25s;
}
.journey-actions #next:hover:not(:disabled), .plan-result-actions .button:hover { background: #0f58d4; transform: translateY(-2px); }
.journey-actions #next:disabled { box-shadow: none; }
/* Paito se asoma sobre la tarjeta, como en la compra */
.journey-main { position: relative; }
.journey-peek { position: absolute; right: 40px; top: -104px; height: 128px; width: auto; transform-origin: 50% 100%; animation: peek 3.2s ease-in-out infinite; pointer-events: none; user-select: none; }
.journey-main .text-button { color: var(--muted); min-height: 44px; }
.choice-grid { display: grid; gap: 10px; }
.choice-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  min-height: 62px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff6b;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.choice-card:hover { background: #ffffffb0; transform: translateY(-1px); }
.choice-card[aria-pressed=true] { border-color: rgba(21,104,240,.55); background: rgba(21,104,240,.06); box-shadow: inset 0 0 0 1px rgba(21,104,240,.28); }
.choice-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #1568f00a;
  color: var(--blue);
  font-size: 18px;
}
.choice-card:nth-child(2) .choice-icon { background: #14af4b0b; color: #128e3f; }
.choice-card:nth-child(3) .choice-icon { background: #fe6f000a; color: #c65500; }
.choice-card:nth-child(4) .choice-icon { background: #793cf90a; color: var(--violet); }
.journey-main fieldset { margin: 18px 0; }
.add-interest button { border-radius: 16px; background: #ffffff60; border-color: var(--line); }
.chips:empty { display: none; }
.chips li { border: 1px solid #ffffffcf; background: #793cf909; border-radius: 12px; }
.days { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.day, .time-options button, .level-options button {
  background: #ffffff73;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  padding: 10px 4px;
  min-height: 44px;
  transition: background .2s, border-color .2s;
}
.day:hover, .time-options button:hover, .level-options button:hover { background: #ffffffc9; }
.day[aria-pressed=true], .time-options button[aria-pressed=true] { background: rgba(21,104,240,.08); border-color: rgba(21,104,240,.6); }
.time-options { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; }
.level-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.level-row:last-child { border-bottom: 0; }
.level-row > span { display: block; margin-bottom: 10px; font-size: 14px; }
.level-options { display: flex; gap: 7px; }
.level-options button { flex: 1; font-size: 12px; }
.level-options button[aria-pressed=true] { border-color: #14af4b95; background: #14af4b0e; }
.journey-review { padding: 0; list-style: none; margin: 0; }
.journey-review li { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; font-size: 14px; }
.journey-review li:last-child { border: 0; }
.journey-review li > span { color: var(--muted); }
.journey-review strong { text-align: right; font-weight: 500; }
#journeyMessage { font-size: 13px; color: #a32c42; }
#journeyMessage:empty { display: none; }
#building { padding: 74px 0; text-align: center; }
#building h2 { margin-bottom: 15px; }
#buildState { font-size: 14px; color: var(--muted); }
.plan-spinner { width: 48px; height: 48px; margin: 0 auto 30px; border: 3px solid; border-color: var(--blue) var(--green) var(--orange) var(--violet); border-radius: 50%; animation: spin 1.8s linear infinite; }
#planResult { padding-top: 32px; animation: enterStep .4s both; }
#planResult h2 { margin-bottom: 24px; }
.plan-start { --subject-color: var(--blue); position: relative; padding: 22px 24px; border: 1px solid #ffffffda; border-radius: 20px; background: #ffffff67; box-shadow: 0 4px 14px #19273b03; }
.plan-start::before { content: ''; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px; background: var(--subject-color); border-radius: 3px; }
.plan-start.green { --subject-color: var(--green); }
.plan-start.orange { --subject-color: var(--orange); }
.plan-start.violet { --subject-color: var(--violet); }
.plan-start p { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.plan-start strong { display: block; font-size: clamp(19px, 3vw, 23px); line-height: 1.3; letter-spacing: -.025em; font-weight: 600; overflow-wrap: anywhere; }
.plan-continuity { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 18px 0 22px; }
.plan-week-title { font-size: 13px; font-weight: 500; color: var(--muted); margin: 14px 0 12px; }

.week-plan { display: grid; gap: 10px; margin: 0 0 22px; }
.plan-day { background: #ffffff67; border: 1px solid #ffffffda; border-radius: 18px; padding: 16px 20px; box-shadow: 0 4px 14px #19273b03; }
.plan-day h3 { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 12px; }
.plan-session { padding-left: 12px; border-left: 3px solid var(--blue); margin-top: 12px; }
.plan-session.green { border-color: var(--green); }
.plan-session.orange { border-color: var(--orange); }
.plan-session.violet { border-color: var(--violet); }
.plan-session > strong { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 500; }
.plan-session strong span { white-space: nowrap; color: var(--muted); font-size: 12px; font-weight: 400; }
.plan-session p, .plan-details p { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 10px 0 0; }
.journey-main summary { cursor: pointer; font-size: 12px; color: var(--muted); padding: 9px 0; }
.journey-main summary:focus-visible { outline: 3px solid #8974c3; outline-offset: 4px; border-radius: 3px; }
.plan-details { border-top: 1px solid var(--line); padding-top: 6px; }
.plan-details summary { font-size: 13px; }
.plan-notice { font-size: 13px; color: var(--muted); }
.plan-result-actions { display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 26px; }
.plan-result-actions .button { margin-left: 0; color: #fff; }
.onboarding-page footer { border: 0; justify-content: center; width: 100%; margin: 0 auto; padding: 12px 24px 24px; color: var(--muted); font-size: 12px; }
.onboarding-page footer a { text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@keyframes enterStep { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 650px) {
  .onboarding-page header { padding: 22px 22px 18px; }
  .onboarding-page .brand { width: 126px; }
  .account-link { min-height: 36px; font-size: 14px; padding: 0 13px; }
  .onboarding-shell { padding: 84px 16px 28px; align-items: flex-start; }
  .journey-peek { right: 26px; top: -84px; height: 104px; }
  .journey-main { padding: 26px 24px; border-radius: 28px; }
  #stepBody { padding-top: 30px; min-height: 310px; }
  #stepBody h2 { margin-bottom: 28px; }
  .journey-review li { font-size: 13px; gap: 15px; }
  .level-options button { font-size: 11px; }
  .choice-card { padding: 12px; font-size: 14px; }
  .plan-day { padding: 16px; }
  .onboarding-page footer { padding-bottom: 20px; }
}
@media (max-width: 370px) {
  .journey-main { padding: 24px 18px; }
  .days { gap: 3px; }
  .level-options { gap: 4px; }
  .level-options button { font-size: 10px; }
  .journey-actions #next { min-width: 130px; padding-inline: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
}
