/* rin onboarding + phone login + profile.
   Same paper / ink / ember language as style.css: ink outlines, hard offset shadows, a
   serif with one italic ember word per heading. Loaded after style.css. */

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.link-btn.inline { display: inline; padding: 0; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.mini-label { display: block; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin-bottom: 0.5rem; text-align: left; }
.btn-glow.sm { padding: 0.5rem 1.1rem; font-size: 0.84rem; text-decoration: none; }

/* ═════════ the onboarding view ═════════ */
.ob {
  overflow-x: clip;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.ob-head {
  width: min(100%, 600px);
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  padding: 1rem 0 0.7rem;
}
.ob-brand { justify-self: center; display: flex; align-items: center; gap: 0.5rem; font-family: var(--serif); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; }
.ob-icon {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  transition: transform 0.2s var(--spring), box-shadow 0.2s var(--ease), opacity 0.2s;
}
.ob-icon:hover { border-color: var(--ink); box-shadow: 2px 2px 0 var(--shadow-c); transform: translate(-1px, -1px); }
.ob-icon.off { opacity: 0; pointer-events: none; }

/* the step bar: one outlined track that fills in ember, a hairline between steps, the count beside it. It used to be
   six loose 6px dashes with the current one half filled, which read as a broken line (owner, 2026-11-01). */
.ob-track { display: flex; align-items: center; gap: 10px; width: min(100%, 400px); margin: 0.35rem 0 0.2rem; }
.ob-progress {
  flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: 12px; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden;
  box-shadow: 2px 2px 0 var(--shadow-c); transition: opacity 0.3s;
}
.ob-progress.off, .ob-progress.off + .ob-count { opacity: 0; }
.ob-progress i { position: relative; }
.ob-progress i + i::before { content: ""; position: absolute; z-index: 1; left: 0; top: 0; bottom: 0; width: 1.5px; background: rgba(23, 21, 15, 0.16); }
.ob-progress i::after {
  content: ""; position: absolute; inset: 0;
  background: var(--ember); transform: scaleX(0); transform-origin: left;
  transition: transform 0.55s var(--ease);
}
.ob-progress i.done::after, .ob-progress i.now::after { transform: scaleX(1); }
.ob-count { min-width: 3.4em; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; color: var(--dim);
  text-align: right; white-space: nowrap; transition: opacity 0.3s; }

.ob-stage {
  width: min(100%, 600px);
  display: flex; flex-direction: column; align-items: center;
}

/* ── mascot + speech bubble ── */
.ob-hero { display: flex; flex-direction: column; align-items: center; gap: 1.05rem; margin-top: 1.8rem; }   /* room for her hats */
.ob-mascot { position: relative; width: clamp(104px, 22vw, 144px); animation: obBob 3.6s ease-in-out infinite; }
.ob-mascot svg { display: block; width: 100%; height: auto; overflow: visible; }
/* each step's pose (static/onboard.js obMascot) pops in, standing on its own shadow */
.ob-figure.drawn::after { content: ""; display: block; width: 56%; height: 9px; margin: 4px auto 0; border-radius: 50%;
  background: rgba(23, 21, 15, 0.13); animation: obShadow 3.6s ease-in-out infinite; }
.ob-figure.swap svg { animation: obSwap 0.55s var(--spring) both; }
.ob-figure text { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
@keyframes obSwap { from { opacity: 0; scale: 0.7; rotate: -10deg; } }
.ob-shadow { transform-box: fill-box; transform-origin: center; animation: obShadow 3.6s ease-in-out infinite; }
.ob-eyes { transform-box: fill-box; transform-origin: center; animation: obBlink 5s infinite; }
.ob-wave { transform-box: fill-box; transform-origin: 0 100%; animation: obWave 2.6s ease-in-out infinite; }
.ob-mascot.hop { animation: obHop 0.7s var(--spring) both, obBob 3.6s 0.7s ease-in-out infinite; }
@keyframes obBob { 50% { transform: translateY(-7px); } }
@keyframes obShadow { 50% { transform: scaleX(0.82); opacity: 0.6; } }
@keyframes obBlink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.08); } }
@keyframes obWave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-16deg); } 80% { transform: rotate(8deg); } 90% { transform: rotate(-12deg); } }
@keyframes obHop { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-26px) scale(1.06, 0.95); } 70% { transform: translateY(0) scale(0.96, 1.05); } 100% { transform: translateY(0) scale(1); } }

.ob-bubble {
  position: relative; max-width: min(92vw, 440px); text-align: center;
  background: var(--ink); color: var(--paper);
  padding: 0.68rem 1.3rem; border-radius: 999px;
  font-family: var(--sans); font-weight: 700; font-size: 1.02rem; line-height: 1.25;
  box-shadow: 0 6px 0 rgba(23, 21, 15, 0.14);
}
.ob-bubble::before {
  content: ""; position: absolute; left: 50%; top: -12px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--ink); transform: translateX(-50%);
}
.ob-bubble:empty { display: none; }
.ob-bubble.pop { animation: obPop 0.5s var(--spring) both; }
@keyframes obPop { from { opacity: 0; transform: translateY(8px) scale(0.9); } }

/* ── steps ── */
.ob-steps { width: 100%; margin-top: 1.5rem; display: flex; flex-direction: column; align-items: center; }
.ob-step { display: none; width: 100%; flex-direction: column; align-items: center; text-align: center; gap: 0.95rem; }
.ob-step.active { display: flex; animation: obIn 0.5s var(--ease) both; }
.ob-step.active.back { animation-name: obInBack; }
@keyframes obIn { from { opacity: 0; transform: translateX(34px) scale(0.985); } }
@keyframes obInBack { from { opacity: 0; transform: translateX(-34px) scale(0.985); } }

.ob-title {
  font-family: var(--serif); font-weight: 500; letter-spacing: -0.025em; line-height: 1.04;
  font-size: clamp(2rem, 7vw, 3.1rem); outline: none;
}
.ob-title em { font-style: italic; color: var(--ember); font-weight: 500; }
.ob-sub { color: var(--dim); font-size: 1.05rem; line-height: 1.55; max-width: 30rem; }
.ob-sub b { color: var(--ink); font-weight: 600; }
.ob-hint { color: var(--dim); font-size: 0.9rem; line-height: 1.5; max-width: 27rem; }
.ob-tip { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.ob-error { min-height: 1.3em; color: var(--ember); font-weight: 600; font-size: 0.92rem; margin: 0; }

/* the big underlined answer field. Overrides the site's boxed input. */
.ob .ob-input, .ob .ob-input:focus {
  width: 100%; max-width: 440px; margin: 0.6rem 0 0;
  padding: 0.35rem 0.5rem; text-align: center;
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 7vw, 2.7rem); letter-spacing: -0.01em;
  background: transparent; color: var(--ink);
  border: 0; border-bottom: 2.5px solid var(--ink); border-radius: 0; box-shadow: none;
  transition: border-color 0.25s;
}
.ob .ob-input:focus { border-bottom-color: var(--ember); }
.ob .ob-input::placeholder { color: rgba(23, 21, 15, 0.22); font-style: italic; }
.ob .ob-input.bad { border-bottom-color: var(--ember); animation: obShake 0.4s; }
.ob .ob-age { max-width: 190px; letter-spacing: 0.06em; }
@keyframes obShake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* country code + number */
.ob-phone { width: 100%; max-width: 480px; display: flex; align-items: flex-end; gap: 0.6rem; }
.ob .ob-phone .ob-input, .ob .ob-phone .ob-input:focus { flex: 1; min-width: 0; text-align: left; font-size: clamp(1.5rem, 6vw, 2.2rem); }
.cc-select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  font-family: var(--mono); font-weight: 500; font-size: 0.95rem; color: var(--ink);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%2317150F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 0.7rem center;
  border: 1.5px solid var(--line-2); border-radius: 12px;
  padding: 0.7rem 1.9rem 0.7rem 0.85rem; margin-bottom: 0.15rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cc-select:hover, .cc-select:focus { border-color: var(--ink); box-shadow: 2px 2px 0 var(--shadow-c); outline: none; }

/* ── welcome preview ── */
.ob-chat { display: flex; flex-direction: column; gap: 0.4rem; width: min(100%, 340px); }
.ob-msg { max-width: 82%; padding: 0.55rem 0.9rem; border-radius: 18px; font-size: 0.93rem; line-height: 1.35; text-align: left; animation: bubbleIn 0.5s var(--spring) both; }
.ob-msg.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line-2); border-bottom-left-radius: 5px; }
.ob-msg.me { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 5px; }
.ob-step.active .ob-msg:nth-child(1) { animation-delay: 0.25s; }
.ob-step.active .ob-msg:nth-child(2) { animation-delay: 1.05s; }
.ob-step.active .ob-msg:nth-child(3) { animation-delay: 1.85s; }

/* ── "why" chips ── */
.ob-wide { max-width: 560px; }
.ob-groups { width: 100%; display: flex; flex-direction: column; gap: 0.35rem; text-align: left; }
.ob-glabel { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin: 0.7rem 0.15rem 0.4rem; }
.ob-chiprow { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ob-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 0.95rem; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 0.9rem; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line-2); cursor: pointer;
  transition: transform 0.22s var(--spring), box-shadow 0.22s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
}
.ob-chip:hover { border-color: var(--ink); transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--shadow-c); }
.ob-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ember); transform: translate(-1px, -1px); }
.ob .ob-note, .ob .ob-note:focus {
  width: 100%; max-width: 100%; margin: 1rem 0 0; padding: 0.75rem 1.1rem;
  font-family: var(--sans); font-size: 0.95rem; text-align: center;
  background: var(--card); border: 1.5px dashed var(--line-2); border-radius: 999px; box-shadow: none;
}
.ob .ob-note:focus { border-color: var(--ink); border-style: solid; }

/* ── abilities ── */
.ob-abilities { width: 100%; display: flex; flex-direction: column; gap: 0.7rem; }
.ob-ab {
  display: flex; align-items: flex-start; gap: 0.95rem; text-align: left;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 16px; padding: 0.95rem 1.1rem;
  box-shadow: 4px 4px 0 var(--shadow-c);
  animation: obIn 0.5s var(--ease) both;
}
.ob-ab .ab-ico { width: 40px; height: 40px; font-size: 1.25rem; border-radius: 11px; }
.ob-ab h3 { font-size: 1rem; font-weight: 700; margin: 0 0 0.15rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ob-ab p { color: var(--dim); font-size: 0.88rem; line-height: 1.4; }
.ob-for { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; background: var(--ember-soft); color: var(--ember); border-radius: 999px; padding: 0.15rem 0.5rem; }
.ob-more { margin-top: 0.4rem; color: var(--ink); font-weight: 600; font-size: 0.92rem; text-decoration: none; border-bottom: 1.5px solid var(--ink); padding-bottom: 0.1rem; }
.ob-more:hover { color: var(--ember); border-color: var(--ember); }
.ob-more i { font-style: normal; }

/* ── text the code ── */
.ob-codecard {
  width: min(100%, 380px); padding: 1.3rem 1.4rem 1.1rem;
  background: var(--card); border: 2px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--shadow-c);
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
}
.ob-code { font-family: var(--mono); font-weight: 500; font-size: clamp(2.3rem, 10vw, 3.2rem); letter-spacing: 0.22em; padding-left: 0.22em; line-height: 1.1; }
.ob-to { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin-top: 0.7rem; }
.ob-number { font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 6vw, 1.95rem); letter-spacing: -0.01em; }
.ob-copy {
  background: none; border: 0; cursor: pointer; color: var(--dim); font-family: var(--sans); font-weight: 600; font-size: 0.8rem;
  text-decoration: underline; text-underline-offset: 3px; padding: 0.2rem 0.3rem; transition: color 0.2s;
}
.ob-copy:hover { color: var(--ember); }
.ob-sms { text-decoration: none; }
.ob-wait { display: flex; align-items: center; gap: 0.55rem; font-family: var(--mono); font-size: 0.8rem; color: var(--dim); }
.ob-small { font-size: 0.85rem; color: var(--dim); }
.ob-small b { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.ob-small .link-btn { font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.ob-codecard.expired .ob-code { opacity: 0.25; text-decoration: line-through; }

/* ── done ── */
.ob-numcard { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 1.1rem 1.6rem; background: var(--card); border: 2px solid var(--ink); border-radius: 20px; box-shadow: 5px 5px 0 var(--shadow-c); }
.ob-numcard .ob-to { margin-top: 0; }
.ob-numactions { display: flex; gap: 0.9rem; margin-top: 0.25rem; }
.ob-numactions a { text-decoration: underline; }
.ob-numcard.hidden { display: none; }
.ob-confetti { position: absolute; inset: 0; pointer-events: none; }
.ob-confetti span { position: absolute; left: 50%; top: 42%; font-size: 1.2rem; opacity: 0; animation: obConfetti 1.5s var(--ease) forwards; }
@keyframes obConfetti {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.4) rotate(0); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1) rotate(var(--rot)); }
}

/* ── footer CTA ──
   Right under the step's content, not pinned to the bottom of the screen with a gap above it (owner, 2026-11-01:
   "too much down"). Still sticky, so on a long step (the reasons, the abilities) it stays in reach while you scroll. */
.ob-foot {
  position: sticky; bottom: 0; width: min(100%, 600px);
  padding: 1.8rem 0 calc(1.1rem + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  isolation: isolate;
}
/* The fade is full-bleed on purpose: a background on the 600px column showed up as a
   lighter box with hard side edges over the wallpaper. */
.ob-foot::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  background: linear-gradient(to top, rgba(246, 244, 238, 0.95) 55%, rgba(246, 244, 238, 0));
}
/* only while the step is taller than the screen and the button floats over it; under a short step it was a pale band */
.ob:not(.ob-long) .ob-foot::before { display: none; }
.ob-cta { width: min(100%, 420px); justify-content: center; }
.ob-foot-err { margin: 0; max-width: 420px; text-align: center; color: var(--ember); font-weight: 600; font-size: 0.9rem; line-height: 1.35; }
.ob-foot-err:empty { display: none; }
.ob-cta:disabled { opacity: 0.38; cursor: not-allowed; box-shadow: none; transform: none; background: var(--ink); border-color: var(--ink); }
.ob-cta.hidden { display: none; }
.ob-login { font-size: 0.86rem; color: var(--dim); }
.ob-login.hidden { display: none; }

/* the optional "connect google" step, and what happened, on the last page */
.ob-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; width: 100%; max-width: 27rem; text-align: left; }
.ob-perks li { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.7rem 0.9rem; background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--shadow-c); font-size: 0.95rem; line-height: 1.35; }
.ob-perks li span:first-child { font-size: 1.25rem; line-height: 1.1; }
.ob-gnote { max-width: 27rem; margin: 0; padding: 0.7rem 1rem; background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px; font-size: 0.92rem; line-height: 1.4; }
.ob-gnote.ok { border-color: #2c7a3f; background: #eaf5ec; color: #1f5c2e; font-weight: 600; }
.ob-gnote.hidden { display: none; }

/* ═════════ log in by text (modal) ═════════ */
.phone-row { display: flex; gap: 0.5rem; align-items: stretch; margin-bottom: 0.85rem; }
.phone-row .cc-select { margin: 0; flex-shrink: 0; }
.phone-row input { margin: 0; flex: 1; min-width: 0; }
.auth-card .btn-glow.wide { text-decoration: none; }
.code-box { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.code-big { font-family: var(--mono); font-weight: 500; font-size: 2.4rem; letter-spacing: 0.2em; padding-left: 0.2em; }
.code-to { font-size: 0.95rem; color: var(--dim); margin-bottom: 0.3rem; }
.code-to b { color: var(--ink); font-family: var(--serif); font-size: 1.15rem; }
.code-wait { display: flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-size: 0.78rem; color: var(--dim); margin-top: 0.3rem; }
.switch-link { margin-top: 0.9rem; font-size: 0.86rem; text-decoration: underline; text-underline-offset: 3px; }

/* ═════════ profile + your rin number ═════════ */
.profile-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.profile-ava { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 1.6rem; flex-shrink: 0; }
.profile-name { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; letter-spacing: -0.02em; line-height: 1.1; }
.rin-number { padding: 1rem 1.2rem; background: var(--paper); border: 1.5px dashed var(--line-2); border-radius: 16px; }
.rin-number-val { display: block; font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 5vw, 2.2rem); letter-spacing: -0.01em; margin-bottom: 0.2rem; }
.rin-number.none .rin-number-val { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; color: var(--dim); }
.rin-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.8rem; }
.rin-actions .btn-glass { margin-top: 0; }
.rin-chip { display: inline-flex; align-items: baseline; gap: 0.5rem; margin-top: 0.5rem; font-size: 0.92rem; }
.rin-chip span { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.rin-chip b { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.rin-chip.hidden { display: none; }

@media (max-width: 480px) {
  .ob-phone { gap: 0.4rem; }
  .cc-select { padding-left: 0.6rem; font-size: 0.88rem; }
}

/* ── email codes (Resend): the sign-up email step and the login box ── */
.ob .ob-otp { margin-top: 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.ob .ob-otp-input, .ob .ob-otp-input:focus {
  font-family: var(--mono); letter-spacing: 0.42em; padding-left: 0.42em;
  font-size: clamp(1.8rem, 7vw, 2.5rem); max-width: 12ch; text-align: center;
}
.ob .ob-input[readonly] { color: var(--dim); border-bottom-style: dashed; }
.ob .ob-verified { margin-top: 0.8rem; font-weight: 600; color: #2E8B57; }
.ob .ob-skip-link { margin-top: 0.9rem; font-size: 0.88rem; text-decoration: underline; text-underline-offset: 3px; }
.otp-input {
  width: 100%; text-align: center; font-family: var(--mono); font-size: 1.9rem;
  letter-spacing: 0.4em; padding-left: 0.4em;
}
#login-email-code-form { display: flex; flex-direction: column; gap: 0.6rem; }
#login-email-code-form .code-to { text-align: center; }
.link-phone { display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem; }
.link-phone .code-box { align-items: flex-start; }
/* an email is long: the headline-size input the name step uses would cut it off */
.ob #ob-email, .ob #ob-email:focus { font-size: clamp(1.05rem, 4vw, 1.45rem); }

/* QA T11: the cards they didn't pick sit under a small "also", so they never read as picks */
.ob-also { margin: var(--sp-2) 0 0; font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
/* QA L2: the texting consent under the number */
.ob-consent { max-width: 27rem; margin: 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--dim); }
.ob-consent a { color: var(--ink); text-underline-offset: 2px; }
