/* Only the eight registration steps use the website brand on mobile.
   Welcome, home, friends, messages, profile and calls keep the dark palette. */
html:not(.desktop):has(.step) {
  --bg: #f8f8f2; --surface: #fff; --surface-raised: #eeefe5; --surface-pressed: #e4e7d8;
  --text: #252620; --text-2: #62655b; --text-3: #727569; --line: rgba(37,38,32,.14);
  --cell: #fff; --danger: #ba3737; --font: "Twoyo Sans", Arial, sans-serif;
  --rounded: "Twoyo Sans", Arial, sans-serif;
  --brand-lime: #d5fa70; --brand-lilac: #e9e5f2; color-scheme: light;
}
html:not(.desktop):has(.step) #device { background: var(--bg); }
html.framed:has(.step) .status-bar { color: var(--text); background: var(--bg); }
html.framed:has(.step) .sb-icons { filter: invert(1); }
html:not(.desktop) .screen.step {
  flex: none; height: var(--app-h); min-height: 0; overflow-y: auto; overscroll-behavior-y: contain;
  padding: calc(var(--top) + 12px) 24px calc(var(--bottom) + 20px);
  scrollbar-width: thin;
}
html:not(.desktop) .step > * { flex-shrink: 0; }
html:not(.desktop) .step > .spacer { flex: 1 0 28px; }
html:not(.desktop) .step .nav { height: 44px; gap: 16px; }
html:not(.desktop) .step .nav-back { width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; }
html:not(.desktop) .step .nav-back .i { width: 18px; height: 18px; }
html:not(.desktop) .step .progress { width: 112px; background: #e4e7d8; height: 5px; }
html:not(.desktop) .step .progress div { background: #7b9341; }
html:not(.desktop) .mobile-step-count { min-width: 44px; text-align: right; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
html:not(.desktop) .step-head { padding: 26px 0 26px; gap: 12px; }
html:not(.desktop) .step-head h1 { font: 750 32px/1.1 "Twoyo Display", Arial, sans-serif; letter-spacing: -.9px; text-wrap: balance; }
html:not(.desktop) .step-head .sub { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
html:not(.desktop) .step .step-icon { display: none; }
html:not(.desktop) .step .onboarding-app-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--brand-lime); display: grid; place-items: center; margin-bottom: 6px; }
html:not(.desktop) .step .brand-mark { display: inline-block; position: relative; width: 38px; height: 34px; transform: rotate(-7deg); }
html:not(.desktop) .step .brand-mark i { position: absolute; width: 20px; height: 29px; border-radius: 12px; top: 2px; left: 0; background: currentColor; }
html:not(.desktop) .step .brand-mark i:last-child { left: 15px; top: 5px; }
html:not(.desktop) .step .brand-mark i::after { content: ""; width: 3px; height: 3px; border-radius: 50%; position: absolute; top: 9px; right: 6px; background: var(--brand-lime); }
html:not(.desktop) .step .btn { border-radius: 999px; height: 54px; font-size: 16px; }
html:not(.desktop) .step .btn-primary { background: var(--text); color: var(--bg); }
html:not(.desktop) .step .btn-primary:not(:disabled):active { background: #404337; }
html:not(.desktop) .step .btn-secondary { background: transparent; color: var(--text); border: 1px solid #c7ccbc; }
html:not(.desktop) .step .btn:disabled { opacity: 1; background: #e7e9df; color: #777a6f; }
html:not(.desktop) .step .onboarding-later { margin-top: 10px; }
html:not(.desktop) .step .spinner { border-color: #ffffff50; border-top-color: #fff; }
html:not(.desktop) .step .step-footer { font-size: 12px; line-height: 1.5; color: var(--text-2); }
html:not(.desktop) .step :is(.big-field, .name-field) { width: 100%; height: 60px; padding: 0 16px; border: 1px solid #d4d8ca; border-radius: 16px; background: #fff; font-size: 18px; font-weight: 500; }
html:not(.desktop) .step :is(.big-field, .name-field)::placeholder { color: var(--text-3); }
html:not(.desktop) .step :focus-visible { outline: 2px solid #526b29; outline-offset: 3px; }
html:not(.desktop) .step :is(.big-field, .name-field):focus { border-color: #526b29; }
html:not(.desktop) .step .code-boxes { gap: 6px; }
html:not(.desktop) .step .code-boxes .box { height: 58px; font-size: 24px; border-radius: 13px; }
html:not(.desktop) .step .code-boxes:focus-within .box.current { border-color: #526b29; }
html:not(.desktop) .step .code-boxes:focus-within .box.current::after { background: var(--text); }
html:not(.desktop) .step .link-row { gap: 12px; font-size: 13px; }
html:not(.desktop) .step .link-row button { min-height: 44px; }
html:not(.desktop) .step .date-wheel { grid-template-columns: 1fr 1.6fr 1.2fr; gap: 8px; padding: 0; background: transparent; }
html:not(.desktop) .mobile-date-field { display: flex; flex-direction: column; min-width: 0; gap: 8px; }
html:not(.desktop) .mobile-date-field > span { font-size: 12px; color: var(--text-2); padding-left: 3px; }
html:not(.desktop) .step .date-wheel select { appearance: auto; width: 100%; height: 56px; padding: 0 8px; border: 1px solid #d4d8ca; border-radius: 14px; font-size: 16px; font-weight: 500; text-align: left; text-align-last: left; background: #fff; }
html:not(.desktop) .step .date-wheel option { background: #fff; color: var(--text); font-size: 16px; }
html:not(.desktop) .birthday-summary { display: flex; align-items: center; gap: 12px; margin-top: 24px; min-height: 48px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
html:not(.desktop) .birthday-summary > .i { width: 22px; height: 22px; }
html:not(.desktop) .birthday-summary strong { color: var(--text); }
html:not(.desktop) .birthday-summary.danger, html:not(.desktop) .birthday-summary.danger strong { color: var(--danger); }
html:not(.desktop) .step .hint-line { justify-content: flex-start; margin-top: 16px; font-size: 12px; line-height: 1.5; }
html:not(.desktop) .gender-options { padding: 4px; gap: 0; border: 1px solid var(--line); border-radius: 22px; background: #fff; }
html:not(.desktop) .gender-options .choice { padding: 12px; gap: 12px; min-height: 76px; border: 1px solid transparent; border-radius: 17px; background: transparent; }
html:not(.desktop) .gender-options .choice.on { background: #eef4de; border-color: #82945c; }
html:not(.desktop) .gender-options .headline { font-size: 16px; font-weight: 500; }
html:not(.desktop) .gender-options .choice-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-lilac); color: var(--text); font-size: 23px; }
html:not(.desktop) .gender-options .choice.on .choice-icon { background: var(--brand-lime); }
html:not(.desktop) .gender-options .choice.on > .i:last-child { color: #526b29; }
html:not(.desktop) .step .photo-pick-big { width: 156px; height: 156px; background: #e9ecdd; color: #465c23; outline-color: #82945c; }
html:not(.desktop) .step .photo-badge { background: var(--brand-lime); color: var(--text); box-shadow: 0 0 0 3px var(--bg); }
html:not(.desktop) .step .onboarding-photo-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
html:not(.desktop) .step .photo-pick-big:has(input:focus-visible) { outline: 2px solid #526b29; outline-offset: 4px; }
html:not(.desktop) .step .guidelines { margin-top: 24px; }
html:not(.desktop) .step .guideline { font-size: 13px; line-height: 1.5; }
html:not(.desktop) .step .guide-icon { color: #526b29; }
html:not(.desktop) .step .guide-icon.no { color: var(--text-2); }
html:not(.desktop) .step .group, html:not(.desktop) .step .rules { border: 1px solid var(--line); border-radius: 22px; background: #fff; }
html:not(.desktop) .step .perm-row { padding: 18px 16px; gap: 12px; }
html:not(.desktop) .step .perm-row .headline { font-size: 16px; }
html:not(.desktop) .step .perm-row .caption { margin-top: 4px; line-height: 1.4; }
html:not(.desktop) .step :is(.perm-icon, .rule-icon) { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-lilac); color: var(--text); font-size: 21px; }
html:not(.desktop) .step .perm-row:nth-child(2) .perm-icon, html:not(.desktop) .step .rule:nth-child(2) .rule-icon { background: #e9ecdd; }
html:not(.desktop) .step .rule:nth-child(3) .rule-icon { background: #f5e8db; }
html:not(.desktop) .step .rules { gap: 0; padding: 0 14px; }
html:not(.desktop) .step .rule { padding: 16px 0; gap: 12px; align-items: center; }
html:not(.desktop) .step .rule + .rule { border-top: 1px solid var(--line); }
html:not(.desktop) .step .rule .headline { font-size: 14px; }
html:not(.desktop) .step .rule .sub { font-size: 12px; line-height: 1.5; }
html:not(.desktop) .step .check-row { font-size: 14px; line-height: 1.5; min-height: 44px; margin-top: 16px; }
html:not(.desktop) .step .terms-toggle { font-size: 14px; min-height: 44px; }
html:not(.desktop) .step .check-row.terms-row { margin-top: 4px; }
html:not(.desktop) .step .checkbox { width: 24px; height: 24px; border-radius: 8px; }
html:not(.desktop) .step .checkbox.on { background: var(--brand-lime); border-color: #718742; color: var(--text); }
html:not(.desktop) .step .rules-legal { font-size: 12px; margin-top: 8px; }
/* Sign-out and error dialogs opened over a step use the same readable palette. */
html:not(.desktop):has(.step) .dialog { background: var(--surface); border: 1px solid var(--line); }
html:not(.desktop):has(.step) .dialog-message { color: var(--text-2); }
html:not(.desktop):has(.step) .dialog-actions button { background: var(--surface-raised); }
html:not(.desktop):has(.step) .dialog-actions button.bold { background: var(--text); color: var(--bg); }
@media (max-width: 360px) {
  html:not(.desktop) .screen.step { padding-inline: 18px; }
  html:not(.desktop) .step-head h1 { font-size: 29px; }
  html:not(.desktop) .step .date-wheel { gap: 6px; }
  html:not(.desktop) .step .date-wheel select { padding-inline: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  html:not(.desktop) .step, html:not(.desktop) .step * { animation: none !important; transition: none !important; }
}
