/* EAI City — onboarding over the city panorama (ob-). The avatar editor (av-) lives in avatar.css. Owner: shell.
   Welcome: a cinematic wordmark over the live city; then calm white cards over the dimmed city. */

.ob { position: fixed; inset: 0; z-index: 60; display: grid; overflow: hidden; color: var(--ink); background: rgba(12, 16, 22, 0.52); transition: opacity 0.38s ease; }
.ob[data-step="1"] { background:
  linear-gradient(90deg, rgba(9, 13, 19, 0.84) 0%, rgba(9, 13, 19, 0.6) 34%, rgba(9, 13, 19, 0.16) 68%, rgba(9, 13, 19, 0) 100%),
  linear-gradient(0deg, rgba(9, 13, 19, 0.5) 0%, rgba(9, 13, 19, 0) 38%); }
.ob.ob-out { opacity: 0; pointer-events: none; }
.ob-view { grid-area: 1 / 1; min-height: 0; min-width: 0; }
.ob-in { animation: obIn 0.36s var(--ease); }
.ob-in-back { animation: obBack 0.36s var(--ease); }
.ob-in-fade { animation: fadeIn 0.6s ease; }
@keyframes obIn { from { opacity: 0; transform: translateX(24px); } }
@keyframes obBack { from { opacity: 0; transform: translateX(-24px); } }
@keyframes obRise { from { opacity: 0; transform: translateY(10px); } }
.ob :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.ob[data-step="1"] :focus-visible { outline-color: rgba(227, 200, 142, 0.6); outline-offset: 4px; }
.ob-title:focus, .ob-logo:focus { outline: none; }

/* ---------------------------------------------------------------- 1. welcome */
.ob-welcome { display: flex; align-items: center; height: 100%; padding: calc(32px + env(safe-area-inset-top, 0px)) clamp(24px, 7vw, 128px) calc(32px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; color: #fff; }
.ob-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: 640px; }
.ob-kicker { display: inline-flex; align-items: center; gap: 12px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #e3c88e; animation: obRise 0.6s var(--ease) both; }
.ob-kicker::before { content: ''; width: 28px; height: 1px; background: currentColor; opacity: 0.8; }
.ob-logo { outline: none; font-size: clamp(3.4rem, 7.2vw, 6.2rem); color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25); animation: obRise 0.7s 0.05s var(--ease) both; }
.ob-tagline { max-width: 32em; font-size: clamp(1.12rem, 1.5vw, 1.3rem); font-weight: 500; line-height: 1.6; color: rgba(255, 255, 255, 0.86); animation: obRise 0.7s 0.12s var(--ease) both; }
.ob-bchips { display: flex; flex-wrap: wrap; gap: 8px; max-width: 620px; animation: obRise 0.7s 0.2s var(--ease) both; }
.ob-bchip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.ob-bchip .ico { width: 16px; height: 16px; color: #e3c88e; }
.ob-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; margin-top: 10px; animation: obRise 0.7s 0.28s var(--ease) both; }
.ob-enter { min-height: 58px; padding: 0 28px 0 30px; font-size: 1.08rem; border-radius: 14px; box-shadow: 0 10px 30px rgba(201, 163, 90, 0.28); }
.ob-enter .ico { width: 1.15em; height: 1.15em; }
.ob-cta__note { color: rgba(255, 255, 255, 0.78); font-size: 1rem; font-weight: 500; }

/* ---------------------------------------------------------------- card steps */
.ob-cardwrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; height: 100%; padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(20px + env(safe-area-inset-bottom, 0px)); }
.ob-mini { flex: none; font-size: 1.5rem; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3); }
.ob-card { display: flex; flex-direction: column; width: min(600px, 100%); min-height: 0; max-height: 100%; overflow: hidden; border-radius: 20px; background: var(--panel); box-shadow: var(--sh-3); }
.ob-wide .ob-card { width: min(980px, 100%); }
.ob-card__top { padding: 26px 32px 0; }
.ob-prog { display: flex; align-items: center; gap: 14px; }
.ob-prog__bars { display: flex; gap: 6px; }
.ob-prog__bars i { width: 36px; height: 4px; border-radius: 3px; background: var(--line); transition: background-color 0.3s ease; }
.ob-prog__bars i.done, .ob-prog__bars i.on { background: var(--primary); }
.ob-prog__t { font-size: 0.9rem; font-weight: 600; color: var(--ink2); letter-spacing: 0.02em; }
.ob-title { padding: 16px 32px 0; font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
.ob-sub { padding: 8px 32px 0; color: var(--ink2); font-size: 1.06rem; }
.ob-card__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 32px 26px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.ob-card__foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 32px 22px; border-top: 1px solid var(--line); background: var(--panel); }
.ob-back .ico { width: 1.1em; height: 1.1em; }
.ob-next { min-width: 200px; }

/* ---------------------------------------------------------------- 2. registration */
.ob-form { display: flex; flex-direction: column; gap: 20px; }
.ob-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ob-grid-na { grid-template-columns: minmax(0, 1fr) 170px; }
.ob-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ob-label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-weight: 700; font-size: 1rem; color: var(--ink); }
.ob-opt { font-weight: 500; font-size: 0.8rem; color: var(--ink3); }
.ob-form .input, .ob-form .select { min-height: 56px; font-size: 1.1rem; }
.ob .input.is-bad { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(176, 67, 60, 0.12); }
.ob-age__in { letter-spacing: 0.02em; }
.ob-namerow { display: flex; flex-direction: column; gap: 8px; }
.ob-hint { font-size: 0.94rem; color: var(--ink2); line-height: 1.4; margin-top: -8px; }
/* the avatar editor (avatar.css) uses --display for small labels: keep them in the UI sans */
.av-ed { --display: var(--font); }
.ob-err { display: flex; align-items: flex-start; gap: 6px; color: var(--danger); font-weight: 600; font-size: 0.96rem; line-height: 1.35; }
.ob-err .ico { width: 16px; height: 16px; margin-top: 1px; }
.ob-err[hidden] { display: none; }
.ob-sso { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.ob-sso__row { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-sso__b { flex: 1 1 150px; min-height: 48px; font-weight: 600; }
.ob-sso__b i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink3); }
.ob-sso__b.vk i { background: #2787f5; }
.ob-sso__b.ya i { background: #fc3f1d; }
.ob-sso__b.tg i { background: #2aabee; }
.ob-consent .check { font-size: 0.98rem; color: var(--ink); font-weight: 500; align-items: center; }
.ob-consent .check input { width: 20px; height: 20px; margin: 0; }
.ob-consent .ob-err { margin-top: 6px; }
.ob-link { position: relative; padding: 0; border: 0; background: none; color: var(--primary); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ob-link::after { content: ''; position: absolute; inset: -10px -4px; } /* a finger-sized hit area without moving the text */
.ob-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--panel2); color: var(--ink2); font-size: 0.96rem; line-height: 1.45; }
.ob-note .ico { width: 16px; height: 16px; margin-top: 2px; color: var(--ink3); }
.ob-rules { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-left: 1.3em; color: var(--ink2); }
.ob-rules li::marker { color: var(--ink3); font-weight: 700; }

/* ---------------------------------------------------------------- 3. interests */
.ob-intwrap { display: flex; flex-direction: column; gap: 12px; }
.ob-ints { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.ob-ints.is-compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ob-int { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 108px; padding: 14px; border: 1px solid var(--line2); border-radius: 14px; background: var(--panel); color: var(--ink); text-align: left; font-weight: 600; font-size: 1rem; line-height: 1.3; transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease; animation: obRise 0.4s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 25ms); }
.ob-ints.is-compact .ob-int { min-height: 104px; animation: none; }
.ob-int:hover { border-color: #c5bcad; }
.ob-int[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--panel2); }
.ob-int[aria-pressed="true"] .isq { --tc: var(--ink); --ti: #fff; }
.ob-int__ck { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; opacity: 0; transition: opacity 0.15s ease; }
.ob-int__ck .ico { width: 14px; height: 14px; }
.ob-int[aria-pressed="true"] .ob-int__ck { opacity: 1; }
.ob-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; flex-wrap: wrap; }
.ob-count { font-weight: 600; font-size: 0.94rem; color: var(--ink2); }
/* v8.7.1: «Вам может подойти» — the interests that fit the resident's age come first */
.ob-ints__h { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; margin: 2px 0 -2px; font-size: 0.86rem; font-weight: 700; letter-spacing: 0.02em; color: var(--gold-t); }
.ob-ints__h .ico { width: 16px; height: 16px; color: var(--gold-d); }
.ob-ints__h.is-rest { margin-top: 10px; color: var(--ink3); font-weight: 600; }
.ob-int.is-fit { background: var(--gold-ll); border-color: #e6d6b4; }
.ob-int.is-fit:hover { border-color: #d4bd8c; }
.ob-int.is-fit[aria-pressed="true"] { border-color: var(--ink); background: var(--panel2); }
.ob-h3 { margin-top: 14px; font-size: 1rem; }
.ob-purp { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-chip { min-height: 46px; padding: 8px 16px; font-size: 0.96rem; }

/* ---------------------------------------------------------------- 5. ready */
.ob-ready { display: flex; flex-direction: column; gap: 22px; }
.ob-ready__hero { display: flex; align-items: center; gap: 20px; }
.ob-ready__ava { width: 96px; height: 96px; background: var(--panel3); }
.ob-ready__txt { display: flex; flex-direction: column; gap: 4px; font-size: 1rem; }
.ob-ready__txt b { font: 700 1.45rem/1.25 var(--display); }
.ob-recs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ob-rec { position: relative; display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); color: var(--ink); text-align: left; font-family: var(--font); transition: box-shadow 0.2s ease, transform 0.2s var(--ease); animation: obRise 0.45s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 70ms + 0.1s); }
.ob-rec:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.ob-rec__art { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, var(--bc-d) 0%, var(--bc-dd) 100%); }
.ob-rec__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s ease; }
.ob-rec__art.has-img img { opacity: 1; }
.ob-rec__star { position: absolute; left: 10px; top: 10px; z-index: 2; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.ob-rec__body { display: flex; flex-direction: column; gap: 6px; padding: 0 14px 16px; }
.ob-rec__who { display: flex; align-items: flex-start; gap: 10px; margin-top: -22px; position: relative; z-index: 2; }
.ob-rec__ava { width: 52px; height: 52px; border-width: 3px; box-shadow: var(--sh-1); }
.ob-rec__n { font: 700 1.1rem/1.2 var(--display); padding-top: 27px; }
.ob-rec__a { font-size: 0.88rem; font-weight: 500; color: var(--ink2); line-height: 1.35; }
.ob-rec__h { font-size: 0.8rem; font-weight: 600; color: var(--ink3); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .ob-recs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .ob[data-step="1"] { background: linear-gradient(180deg, rgba(9, 13, 19, 0.15) 0%, rgba(9, 13, 19, 0.55) 38%, rgba(9, 13, 19, 0.9) 100%); }
  .ob-welcome { align-items: flex-end; padding: calc(24px + env(safe-area-inset-top, 0px)) 20px calc(26px + env(safe-area-inset-bottom, 0px)); }
  .ob-hero { gap: 16px; }
  .ob-kicker { font-size: 0.78rem; letter-spacing: 0.12em; }
  .ob-logo { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .ob-tagline { font-size: 1rem; }
  .ob-bchips { gap: 6px; }
  .ob-bchip { font-size: 0.82rem; padding: 5px 11px 5px 9px; gap: 6px; }
  .ob-bchip .ico { width: 14px; height: 14px; }
  .ob-cta { width: 100%; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 4px; }
  .ob-enter { width: 100%; }
  .ob-cta__note { text-align: center; font-size: 0.86rem; }
  .ob-cardwrap { justify-content: flex-end; gap: 10px; padding: calc(12px + env(safe-area-inset-top, 0px)) 0 0; }
  .ob-mini { font-size: 1.2rem; }
  .ob-card, .ob-wide .ob-card { width: 100%; max-height: calc(100% - 4px); border-radius: 20px 20px 0 0; }
  .ob-card__top { padding: 20px 20px 0; }
  .ob-title { padding: 12px 20px 0; font-size: 1.6rem; }
  .ob-sub { padding: 6px 20px 0; font-size: 0.98rem; }
  .ob-card__body { padding: 18px 20px 20px; }
  .ob-card__foot { padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .ob-next { min-width: 0; flex: 1 1 auto; }
  .ob-grid2, .ob-grid-na { grid-template-columns: 1fr; gap: 18px; }
  .ob-form { gap: 18px; }
  .ob-sso__b { flex: 1 1 30%; padding: 6px 8px; font-size: 0.84rem; }
  .ob-ints { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ob-int { min-height: 104px; }
  .ob-chip { min-height: 44px; font-size: 0.94rem; padding: 6px 14px; }
  .ob-ready__hero { gap: 14px; }
  .ob-ready__ava { width: 72px; height: 72px; }
  .ob-ready__txt b { font-size: 1.2rem; }
  .ob-recs { gap: 10px; }
  .ob-rec__body { padding: 0 12px 14px; }
  .ob-rec__ava { width: 44px; height: 44px; }
  .ob-rec__n { font-size: 1rem; }
  .ob-rec__a { font-size: 0.82rem; }
  .ob-rec__h { display: none; }
  .ob-rec__who { flex-direction: column; align-items: flex-start; gap: 6px; }
  .ob-rec__n { padding-top: 0; }
}
@media (max-height: 700px) and (min-width: 601px) {
  .ob-mini { display: none; }
  .ob-hero { gap: 16px; }
  .ob-logo { font-size: clamp(3.4rem, 7vw, 5.6rem); }
}
html.big .ob-grid-na { grid-template-columns: minmax(0, 1fr) 220px; }
@media (prefers-reduced-motion: reduce) {
  .ob-kicker, .ob-logo, .ob-tagline, .ob-bchips, .ob-cta, .ob-int, .ob-rec { animation: none; }
}

/* ---------------------------------------------------------------- the look step: only what matters at first sight
   (outfit, colours and background wait in the profile editor) */
.ob-look .av-row[data-key="clothing"], .ob-look .av-row[data-key="clothesColor"], .ob-look .av-row[data-key="bg"] { display: none; }
.ob .ob-link { font-size: inherit; }
.ob-card__foot .ob-next { min-height: 56px; }
html.big .ob-int { min-height: 118px; }
@media (max-width: 600px) {
  .ob-hint { margin-top: -6px; }
  .ob-int { min-height: 96px; font-size: 0.98rem; }
}
/* phones: the sticky look preview covers the body's top padding too, so the options never peek out above it */
@media (max-width: 600px) {
  .ob-card__body .av-ed__stage { top: -18px; margin-top: -18px; padding-top: 28px; }
}
/* (v8.5) «Уже были в городе? Войти по почте» — a quiet text link under the main button */
.ob-signin-row { flex-basis: 100%; display: flex; }
.ob-signin-row[hidden] { display: none; }
.ob-signin { min-height: 44px; padding: 10px 2px; border: 0; background: none; color: #fff; font: inherit; font-size: 0.98rem; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.5); text-underline-offset: 4px; cursor: pointer; }
.ob-signin:hover { text-decoration-color: #fff; }
.ob-signin:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
@media (max-width: 600px) { .ob-signin-row { justify-content: center; } .ob-signin { font-size: 0.92rem; } }
