/* Эфир · экран входа (макет «Эфир - вход.dc.html»). Цвета — токены из tokens.css,
   стена всегда тёмная. Всё, что двигается, выключается при prefers-reduced-motion. */

@keyframes efUp { from { transform: translateY(0) } to { transform: translateY(-50%) } }
@keyframes efDown { from { transform: translateY(-50%) } to { transform: translateY(0) } }
@keyframes efIn { from { opacity: 0; transform: translateY(-10px) } to { opacity: 1; transform: none } }
@keyframes efPop { 0% { opacity: 0; transform: translateY(6px) } 20% { opacity: 1; transform: none } 80% { opacity: 1 } 100% { opacity: 0; transform: translateY(-10px) } }
@keyframes efPulse { 0% { box-shadow: 0 0 0 0 rgba(242,84,45,.55) } 70% { box-shadow: 0 0 0 12px rgba(242,84,45,0) } 100% { box-shadow: 0 0 0 0 rgba(242,84,45,0) } }
@keyframes efBar { from { width: 0 } to { width: 100% } }
@keyframes efSpin { to { transform: rotate(360deg) } }
@keyframes efRise { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
@keyframes efShake { 0% { transform: translateX(0) } 20% { transform: translateX(-9px) } 40% { transform: translateX(8px) } 60% { transform: translateX(-5px) } 80% { transform: translateX(3px) } 100% { transform: translateX(0) } }

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
.ln-body { background: var(--bg); color: var(--ink); font-family: var(--font-ui); -webkit-font-smoothing: antialiased; }
.ln-vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ln b { font-weight: 700; }

.ln { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--bg); }

/* ---------- стена ---------- */
.ln-wall { flex: 1.25 1 520px; min-height: 560px; position: relative; overflow: hidden; background: #0F0F11; color: #EEEDEA; }
.ln-wall__tiles { position: absolute; inset: -40px -20px; opacity: .5; }
.ln-cols { display: flex; gap: 14px; height: 200%; }
.ln-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; animation: efUp 70s linear infinite; will-change: transform; }
.ln-col--1 { margin-top: -60px; animation-name: efDown; animation-duration: 84s; }
.ln-col--2 { margin-top: -120px; animation-duration: 98s; }
.ln-col--3 { margin-top: -180px; animation-name: efDown; animation-duration: 112s; }
.ln-col--4 { margin-top: -240px; animation-duration: 126s; }
.ln-tile { flex-shrink: 0; border-radius: 8px; overflow: hidden; background: #18181B; border: 1px solid rgba(255,255,255,.06); }
.ln-tile__img { background: #222226; overflow: hidden; }
.ln-tile__img--tall { aspect-ratio: 4 / 5; }
.ln-tile__img--wide { aspect-ratio: 16 / 9; }
.ln-tile__img--sq { aspect-ratio: 1 / 1; }
.ln-tile__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ln-tile__body { padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.ln-tile__brand { font-size: var(--fs-min); color: #8A8A93; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-tile__title { font-size: 12px; font-weight: 600; line-height: 1.3; color: #D6D5D1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ln-tile__price { font-family: var(--font-data); font-size: 11px; color: #EEEDEA; }
.ln-wall__shade { position: absolute; inset: 0; pointer-events: none; }
.ln-wall__shade--x { background: linear-gradient(90deg, rgba(15,15,17,.25) 0%, rgba(15,15,17,.6) 60%, rgba(15,15,17,.92) 100%); }
.ln-wall__shade--y { background: linear-gradient(180deg, rgba(15,15,17,.88) 0%, rgba(15,15,17,0) 24%, rgba(15,15,17,0) 44%, rgba(15,15,17,.97) 100%); }
.ln-wall__inner { position: relative; height: 100%; min-height: 560px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: 40px 48px; }

.ln-brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ln-brand__name { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.ln-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); flex-shrink: 0; display: inline-block; animation: efPulse 2.2s ease-out infinite; }
.ln-live { margin-left: 10px; display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border-radius: 13px; background: rgba(255,255,255,.08); font-family: var(--font-data); font-size: 11px; color: #A9A9B0; white-space: nowrap; }

.ln-hero { display: flex; flex-direction: column; gap: 18px; max-width: 560px; }
.ln-hero__top { display: flex; flex-direction: column; gap: 6px; }
.ln-count { display: flex; align-items: flex-start; gap: 10px; }
.ln-count__num { font-family: var(--font-data); font-size: clamp(48px, 7vw, 96px); font-weight: 600; letter-spacing: -.045em; line-height: .95; font-variant-numeric: tabular-nums; }
.ln-count__plus { font-family: var(--font-data); font-size: 15px; font-weight: 600; color: #FF6A42; margin-top: 8px; opacity: 0; }
.ln-count__plus.is-on { animation: efPop 2.4s ease-out forwards; }
.ln-count__cap { font-size: clamp(15px, 1.4vw, 18px); line-height: 1.45; color: #A9A9B0; text-wrap: pretty; }

.ln-feed { display: flex; flex-direction: column; border-top: 1px solid rgba(255,255,255,.12); }
.ln-feed__row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.08); transition: opacity .4s; }
.ln-feed__row:nth-child(2) { opacity: .72; }
.ln-feed__row:nth-child(3) { opacity: .44; }
.ln-feed__row:nth-child(n+4) { display: none; }
.ln-feed__row.is-new { animation: efIn .5s var(--ease); }
.ln-feed__ago { font-family: var(--font-data); font-size: 11px; color: #8A8A93; padding-top: 2px; font-variant-numeric: tabular-nums; }
.ln-feed__row:first-child .ln-feed__ago { color: #FF6A42; }
.ln-feed__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ln-feed__title { font-size: 13.5px; color: #EEEDEA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-feed__meta { font-size: 12px; color: #8A8A93; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- панель формы ---------- */
.ln-side { flex: 1 1 440px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 48px 32px 24px; }
.ln-spacer { flex: 1; }
.ln-panel { width: 100%; max-width: 392px; display: flex; flex-direction: column; gap: 22px; animation: efRise 320ms var(--ease); }
.ln-foot { padding-top: 28px; display: flex; justify-content: center; gap: 10px 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); text-align: center; }
.ln-foot a { color: var(--ink-3); }

.ln-head { display: flex; flex-direction: column; gap: 8px; }
.ln-head--10 { gap: 10px; }
.ln-h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; text-wrap: balance; }
.ln-h1--34 { font-size: 34px; }
.ln-h1--32 { font-size: 32px; }
.ln-h1--38 { font-size: 38px; letter-spacing: -.03em; line-height: 1.05; }
.ln-lead { font-size: 15px; color: var(--ink-2); line-height: 1.55; }
.ln-lead--16 { font-size: 16px; }
.ln-lead b, .ln-mail { color: var(--ink); }
.ln-mail { word-break: break-all; }
.ln-small { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.ln-small--12 { font-size: 12px; }
.ln-small--13 { font-size: 13px; }
.ln-cap { font-family: var(--font-data); font-size: 11px; letter-spacing: .06em; color: var(--ink-3); }

.ln-form { display: flex; flex-direction: column; gap: 14px; }
.ln-form.is-shake { animation: efShake 380ms ease-out; }
.ln-step { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.ln-field { display: flex; flex-direction: column; gap: 6px; }
.ln-field--pw { gap: 8px; }
.ln-label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.ln-label__hint { color: var(--ink-3); font-weight: 400; }
.ln-label-row { display: flex; align-items: baseline; }
.ln-label-row .ln-label { flex: 1; }

.ln-input { width: 100%; height: 48px; border-radius: var(--r-field); border: 1.5px solid var(--line-strong); background: var(--surface); padding: 0 14px; font-family: var(--font-ui); font-size: 16px; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.ln-input::placeholder { color: var(--placeholder); }
.ln-input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(20,20,20,.08); }
.ln-input.is-bad { border-color: var(--danger); }
.ln-input:disabled { opacity: .7; }
/* сброс автозаливки браузера (жёлтая/голубая заливка ОС) — фон и цвет текста возвращаем в тему, кольцо фокуса не теряем */
.ln-input:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 1000px var(--surface) inset; }
.ln-input:-webkit-autofill:focus { border-color: var(--ink); box-shadow: 0 0 0 1000px var(--surface) inset, 0 0 0 4px rgba(20,20,20,.08); }
.ln-pw { position: relative; display: flex; }
.ln-input--pw { flex: 1; min-width: 0; padding-right: 92px; }
.ln-pw__show { position: absolute; right: 7px; top: 7px; height: 34px; border: 0; background: transparent; padding: 0 10px; border-radius: 7px; font-family: var(--font-ui); font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.ln-pw__show:hover { background: var(--bg); }
.ln-caps { font-size: 12.5px; color: var(--warn); }

.ln-locked-in { height: 48px; border-radius: var(--r-field); border: 1.5px solid var(--line); background: var(--rail); padding: 0 14px; display: flex; align-items: center; gap: 10px; }
.ln-locked-in__v { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; outline: none; font-family: var(--font-ui); font-size: 15px; color: var(--ink-2); text-overflow: ellipsis; }
.ln-locked-in__i { font-size: 12px; color: var(--ink-3); }

.ln-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ln-meter span { height: 4px; border-radius: 2px; background: var(--line); transition: background .25s; }
.ln-meter[data-score="1"] span:nth-child(-n+1) { background: var(--danger); }
.ln-meter[data-score="2"] span:nth-child(-n+2) { background: var(--warn); }
.ln-meter[data-score="3"] span:nth-child(-n+3) { background: var(--ok); }
.ln-meter[data-score="4"] span { background: var(--ok); }
.ln-meter__label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.ln-meter__label[data-score="1"] { color: var(--danger); }
.ln-meter__label[data-score="2"] { color: var(--warn); }
.ln-meter__label[data-score="3"], .ln-meter__label[data-score="4"] { color: var(--ok); }
.ln-rules { display: flex; flex-direction: column; gap: 4px; }
.ln-rule { font-size: 12.5px; color: var(--ink-3); transition: color .2s; }
.ln-rule.is-tried { color: var(--danger); }
.ln-rule.is-ok { color: var(--ok); }

.ln-alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--r-field); background: var(--danger-bg); border: 1px solid var(--danger-line); font-size: 13.5px; line-height: 1.45; color: var(--danger); }
.ln-alert--net { background: var(--surface); border-color: var(--line); color: var(--ink); }
.ln-alert__i { font-weight: 700; width: 14px; flex-shrink: 0; text-align: center; }
.ln-alert__t { display: flex; flex-direction: column; gap: 2px; }
.ln-alert__t span { color: var(--ink-2); }
.ln-alert__t span:empty { display: none; }
.ln-err { font-size: 13px; color: var(--danger); font-weight: 600; }

.ln-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-field); background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; }
.ln-note__i { color: var(--warn); font-weight: 700; }
.ln-note__t { display: flex; flex-direction: column; gap: 2px; }
.ln-note__t span { color: var(--ink-2); }

/* кнопки */
.ln-btn { height: 50px; border: 0; border-radius: 11px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; font-family: var(--font-ui); font-size: 15.5px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .12s, background .15s, border-color .15s; }
.ln-btn:hover { background: #2A2A2E; }
.ln-btn:active { transform: scale(.985); }
.ln-btn[aria-busy="true"] { background: var(--ink-2); cursor: progress; }
.ln-btn:focus-visible, .ln-link:focus-visible, .ln-back:focus-visible, .ln-pw__show:focus-visible, .ln-chip:has(:focus-visible), .ln-check:has(:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.ln-btn--46 { height: 46px; border-radius: var(--r-field); font-size: 14.5px; }
.ln-btn--48 { height: 48px; font-size: 15px; }
.ln-btn--grow { flex: 1; min-width: 140px; }
.ln-btn--line { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.ln-btn--line:hover { background: var(--surface); }
.ln-btn--46.ln-btn--line { background: var(--surface); font-weight: 500; }
.ln-btn--outline { height: 46px; border-radius: var(--r-field); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 14.5px; font-weight: 500; }
.ln-btn--outline:hover { background: var(--surface); border-color: var(--ink); }
.ln-btn--dim { background: var(--ink-3); transition: background .2s; }
.ln-btn--dim.is-ready { background: var(--ink); }
.ln-btn--ok, .ln-btn--ok:hover { background: var(--ok); cursor: default; }
.ln-btn--text { background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 400; padding: 0 14px; }
.ln-btn--text:hover { background: transparent; color: var(--ink); }
.ln-btn--sm { height: 48px; flex-shrink: 0; font-size: 14.5px; border-radius: var(--r-field); }
.ln-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; flex-shrink: 0; display: none; animation: efSpin .7s linear infinite; }
[aria-busy="true"] .ln-spin { display: inline-block; }

.ln-link { border: 0; background: none; padding: 2px 0; font-family: var(--font-ui); font-size: 13px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-dash); text-underline-offset: 2px; cursor: pointer; align-self: flex-start; }
.ln-link--sm, .ln-link--btn { font-size: 12.5px; }
.ln-back { align-self: flex-start; border: 0; background: none; padding: 4px 0; font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer; }

.ln-check { display: flex; align-items: center; gap: 10px; padding: 2px 0; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.ln-check__box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-dash); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 11px; color: transparent; flex-shrink: 0; transition: background .15s, border-color .15s; }
.ln-check:has(:checked) .ln-check__box { background: var(--ink); border-color: var(--ink); color: #fff; }

.ln-alt { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line-strong); }
.ln-alt__t { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.ln-inv summary { list-style: none; }
.ln-inv summary::-webkit-details-marker { display: none; }
.ln-inv[open] summary { border-color: var(--ink); }
.ln-inv__form { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
.ln-inv__row { display: flex; gap: 8px; }
.ln-inv__row .ln-input { flex: 1; min-width: 0; }

.ln-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ln-row--16 { gap: 16px; }
.ln-wait { height: 46px; border-radius: var(--r-field); border: 1px solid var(--line-strong); background: var(--surface); display: flex; align-items: center; padding: 0 16px; font-size: 14.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.ln-badge { width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.ln-badge--ok { background: var(--ok-bg); color: var(--ok); }
.ln-badge--warn { background: var(--warn-bg); color: var(--warn); font-size: 26px; }

.ln-lock { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.ln-lock__cap { font-size: 13px; color: var(--ink-3); }
.ln-lock__num { font-family: var(--font-data); font-size: 48px; font-weight: 600; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.ln-lock__bar { height: 6px; border-radius: 3px; background: var(--rail); position: relative; overflow: hidden; }
.ln-lock__bar span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ink); border-radius: 3px; transition: width 1s linear; }
.ln-lock__acc { font-size: 12.5px; color: var(--ink-3); }
.ln-lock__acc b { color: var(--ink-2); }
.ln-lock.is-over .ln-lock__num { color: var(--ok); }
.ln-lock.is-over .ln-lock__bar span { background: var(--ok); width: 100%; }

/* приглашение */
.ln-steps-head { display: flex; align-items: center; gap: 10px; }
.ln-steps-head__n { margin-left: auto; font-family: var(--font-data); font-size: 12px; color: var(--ink-3); }
.ln-progress { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ln-progress span { height: 3px; border-radius: 2px; background: var(--line-strong); }
.ln-progress span.is-on { background: var(--ink); }
.ln-invcard { background: var(--ink); color: #EEEDEA; border-radius: 14px; padding: 16px 18px; display: flex; gap: 12px; align-items: center; }
.ln-invcard__av { width: 40px; height: 40px; border-radius: 50%; background: #EEEDEA; color: var(--ink); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ln-invcard__t { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; line-height: 1.45; }
.ln-invcard__meta { font-size: 12px; color: #A9A9B0; }
.ln-group { display: flex; flex-direction: column; gap: 8px; }
.ln-group__head { display: flex; align-items: baseline; }
.ln-group__head .ln-cap { flex: 1; }
.ln-group__hint { font-size: 12px; color: var(--ink-3); }
.ln-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ln-chip { position: relative; height: 38px; display: flex; align-items: center; gap: 6px; padding: 0 13px; border-radius: 19px; font-size: 14px; cursor: pointer; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); transition: background .15s, color .15s, border-color .15s; user-select: none; }
.ln-chip__n { font-family: var(--font-data); font-size: 11px; opacity: .55; }
.ln-chip:has(:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.ln-chip--offer:has(:checked) { background: var(--tag-offer-bg); color: var(--tag-offer); border-color: #F2A48A; }
.ln-preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.ln-preview__title { font-size: 12.5px; color: var(--ink-3); }
.ln-preview__list { display: flex; flex-direction: column; gap: 8px; }
.ln-preview__list:empty { display: none; }
.ln-preview__row { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.ln-preview__row b { flex: 1; min-width: 0; }
.ln-preview__row span { font-family: var(--font-data); font-size: 13px; color: var(--ink-2); }
.ln-preview__empty { font-size: 13.5px; color: var(--ink-2); }

/* финальный экран */
.ln-today { display: flex; align-items: center; gap: 12px; }
.ln-today__t { font-family: var(--font-data); font-size: 12px; color: var(--ink-3); }
.ln-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.ln-stat { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; }
.ln-stat__n { font-family: var(--font-data); font-size: 28px; font-weight: 600; }
.ln-stat__n--acc { color: var(--accent-text); }
.ln-stat__l { font-size: 12.5px; color: var(--ink-3); }
.ln-redirect { display: flex; flex-direction: column; gap: 8px; }
.ln-redirect__bar { height: 4px; border-radius: 2px; background: var(--rail); overflow: hidden; display: block; }
.ln-redirect__bar span { display: block; height: 100%; width: 0; background: var(--ink); animation: efBar 4s linear forwards; }
.ln-redirect.is-stopped .ln-redirect__bar span { animation: none; width: 100%; }
.ln-redirect__t { font-size: 12.5px; color: var(--ink-3); }
.ln-link--btn { color: var(--ink-2); padding: 0; }

/* ---------- адаптив ---------- */
@media (max-width: 979px) {
  .ln-wall, .ln-wall__inner { min-height: 380px; }
  .ln-side { min-height: auto; }
}
@media (max-width: 559px) {
  .ln-wall, .ln-wall__inner { min-height: 250px; }
  .ln-wall__inner { padding: 24px 22px; }
  .ln-feed { display: none; }
  .ln-side { padding: 32px 20px 24px; }
  .ln-live { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ln-count__plus { opacity: 0; }
  .ln-redirect__bar span { width: 100%; }
}
