/* Onboarding + profile setup. Refs: 01-onboarding/*, 02-profile-setup/* */

body[data-route='onboarding'] .nav,
body[data-route='onboarding'] .app-header {
  display: none !important;
}
body[data-route='onboarding'] .view {
  padding: 0 !important;
  height: 100dvh;
  background: var(--yaqin-bg);
}

.ob-start {
  min-height: 100%;
  background: var(--yaqin-yellow);
  display: flex;
  flex-direction: column;
}
.ob-brand {
  flex: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 40px 20px 20px;
  color: var(--yaqin-text);
}
.ob-mark {
  font-size: 42px;
  line-height: 1;
}
.ob-brand b {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.ob-card {
  background: var(--yaqin-bg);
  border-radius: 36px 36px 0 0;
  padding: 28px 24px max(28px, env(safe-area-inset-bottom));
}
.ob-card h1 {
  margin: 0 0 22px;
  text-align: center;
  font-size: var(--yaqin-fs-title);
  font-weight: 700;
}
.ob-perm {
  width: 100%;
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  text-align: left;
  color: var(--yaqin-text);
}
.ob-perm span:nth-child(2) {
  flex: 1;
  display: grid;
  gap: 2px;
}
.ob-perm b {
  font-size: 16px;
}
.ob-perm small {
  font-size: 13px;
  color: var(--yaqin-text-tertiary);
}
.ob-perm-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--yaqin-yellow);
  display: grid;
  place-items: center;
  font-size: 20px;
}
.ob-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--yaqin-sep);
  display: grid;
  place-items: center;
  color: var(--yaqin-ink-inverse);
  font-size: 14px;
}
.ob-check.on {
  border-color: var(--yaqin-text);
  background: var(--yaqin-text);
}

.ob-next {
  display: block;
  width: min(100%, 280px);
  margin: 24px auto 0;
  border: 0;
  border-radius: var(--yaqin-radius-pill);
  background: var(--yaqin-text-tertiary);
  color: var(--yaqin-ink-inverse);
  font-size: 17px;
  font-weight: 700;
  padding: 16px;
}
.ob-next.on {
  background: var(--yaqin-text);
}
.ob-next.blue.on {
  background: var(--yaqin-blue);
}
.ob-link {
  display: block;
  margin: 16px auto 0;
  border: 0;
  background: none;
  color: var(--yaqin-text-tertiary);
  font-size: 15px;
}

.ob-plain,
.ob-form,
.ob-processing {
  min-height: 100%;
  background: var(--yaqin-bg);
  padding: 16px 24px 40px;
  position: relative;
}
.ob-plain {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 72px;
}
.ob-flower {
  font-size: 36px;
  margin-bottom: 28px;
}
.ob-plain h1,
.ob-form h1,
.ob-processing h1 {
  margin: 0;
  font-size: var(--yaqin-fs-title);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: center;
}
.ob-plain p,
.ob-sub,
.ob-processing p {
  margin: 12px 0 0;
  color: var(--yaqin-text-tertiary);
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
}
.ob-plain .ob-next {
  margin-top: auto;
}

.ob-back {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  font-size: 22px;
  color: var(--yaqin-text);
  display: grid;
  place-items: center;
  margin: 0 0 18px -8px;
}
.ob-input {
  display: block;
  width: 100%;
  margin-top: 14px;
  border: 1.5px solid var(--yaqin-sep);
  border-radius: var(--yaqin-radius-pill);
  padding: 16px 18px;
  text-align: center;
  font-size: 17px;
  outline: 0;
  background: var(--yaqin-bg);
}
.ob-age {
  margin: 10px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--yaqin-text);
  min-height: 22px;
}
.ob-choices {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}
.ob-choice {
  border: 1.5px solid var(--yaqin-sep);
  border-radius: var(--yaqin-radius-pill);
  background: var(--yaqin-bg);
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  color: var(--yaqin-text);
}
.ob-choice.on {
  border-color: var(--yaqin-text);
  background: var(--yaqin-text);
  color: var(--yaqin-ink-inverse);
}

.ob-form.photos {
  padding-bottom: 110px;
}
.ob-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}
.ob-photo {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 22px;
  border: 1.5px solid var(--yaqin-sep);
  background: var(--yaqin-bg-muted);
  color: var(--yaqin-text-tertiary);
  overflow: hidden;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 12px;
}
.ob-photo.filled {
  padding: 0;
  border: 0;
}
.ob-photo.filled img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ob-photo .ti-plus {
  font-size: 34px;
}
.ob-photo small {
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}
.ob-main {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--yaqin-yellow);
  color: var(--yaqin-yellow-ink);
  border-radius: var(--yaqin-radius-pill);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ob-form.photos .ob-next {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 5;
}

.ob-polaroid-wrap {
  position: relative;
  width: 260px;
  height: 300px;
  margin: 10px auto 28px;
}
.ob-polaroid {
  width: 180px;
  margin: 36px auto 0;
  background: var(--yaqin-bg);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  padding: 12px 12px 18px;
  transform: rotate(4deg);
  text-align: center;
}
.ob-polaroid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
.ob-polaroid b {
  display: block;
  margin-top: 10px;
  color: var(--yaqin-text-tertiary);
  font-weight: 500;
}
.ob-bubble {
  position: absolute;
  background: var(--yaqin-yellow);
  color: var(--yaqin-yellow-ink);
  border-radius: var(--yaqin-radius-pill);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.ob-bubble.b1 { left: 0; top: 24px; transform: rotate(-8deg); }
.ob-bubble.b2 { right: 0; top: 8px; transform: rotate(8deg); }
.ob-bubble.b3 { right: -8px; top: 120px; transform: rotate(12deg); }
.ob-bubble.b4 { right: 10px; bottom: 40px; transform: rotate(-4deg); }
.ob-bubble.b5 { left: -4px; bottom: 56px; transform: rotate(-10deg); }

.ob-qhead {
  height: 48px;
  display: grid;
  grid-template-columns: 44px 1fr 72px;
  align-items: center;
  margin-bottom: 18px;
}
.ob-qhead .ob-back {
  margin: 0;
}
.ob-qhead span {
  text-align: center;
  color: var(--yaqin-text-tertiary);
  font-size: 14px;
}
.ob-head-next {
  justify-self: end;
  border: 0;
  background: none;
  color: var(--yaqin-text-tertiary);
  font-size: 17px;
  font-weight: 700;
}
.ob-head-next.on {
  color: var(--yaqin-text);
}
.ob-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 28px 0 18px;
  border-bottom: 1.5px solid var(--yaqin-sep);
  padding-bottom: 10px;
}
.ob-line input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 18px;
  background: none;
}
.ob-line button {
  border: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--yaqin-text-tertiary);
  color: var(--yaqin-ink-inverse);
}
.ob-suggest {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-top: 8px;
}
.ob-suggest button {
  border: 0;
  border-radius: var(--yaqin-radius-pill);
  background: var(--yaqin-bg-subtle);
  color: var(--yaqin-text);
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
}

.ob-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 56px;
}
.ob-spinner {
  width: 120px;
  height: 120px;
  margin-top: 72px;
  border-radius: 50%;
  border: 10px solid var(--yaqin-bg-subtle);
  border-top-color: var(--yaqin-text);
  animation: ob-spin 0.9s linear infinite;
}
@keyframes ob-spin {
  to { transform: rotate(360deg); }
}

.ob-ready-visual {
  position: relative;
  width: 280px;
  height: 320px;
  margin: 8px auto 24px;
}
.ob-ready-visual .ob-polaroid {
  margin-top: 40px;
}
.ob-ready-tag {
  position: absolute;
  background: var(--yaqin-yellow);
  color: var(--yaqin-yellow-ink);
  border-radius: var(--yaqin-radius-pill);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  z-index: 2;
}
.ob-ready-tag.t1 { left: 8px; top: 28px; transform: rotate(-8deg); }
.ob-ready-tag.t2 { right: 0; top: 110px; transform: rotate(8deg); }
.ob-ready-tag.t3 { left: 18px; bottom: 70px; transform: rotate(-4deg); }
.ob-loc {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: var(--yaqin-yellow);
  color: var(--yaqin-yellow-ink);
  border-radius: var(--yaqin-radius-pill);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.ob-input.code {
  letter-spacing: 0.18em;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
}
.ob-link.soft {
  margin: 8px 0 18px;
  color: var(--yaqin-text-tertiary);
  font-weight: 600;
}
.ob-legal {
  margin-top: 16px;
  color: var(--yaqin-text-tertiary);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}
.ob-toast {
  margin-top: 12px;
  text-align: center;
  color: var(--yaqin-danger);
  font-weight: 700;
}
.ob-choice.stacked {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 14px 16px;
}
.ob-choice.stacked small {
  color: var(--yaqin-danger);
  font-weight: 600;
}
.ob-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  font-size: 14px;
  color: var(--yaqin-text-secondary);
}
.ob-warn {
  margin: 8px 0 0;
  color: var(--yaqin-danger);
  font-size: 13px;
  line-height: 1.4;
}
