/* Страница входа. Общее (страница, шапка, подвал) в public-v2.css.
   Кукла стоит за карточкой и выглядывает из-за её края; позы переключает login-page.js. */

.lg-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 4vw;
  align-items: center;
  min-height: calc(100vh - 200px);
  min-height: calc(100svh - 200px);
  padding: 8px max(var(--pad), env(safe-area-inset-right, 0px)) 24px max(var(--pad), env(safe-area-inset-left, 0px));
}

/* слева: большой заголовок и нить из фото, которая «входит» в карточку */
.lg-hero { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 24px; min-height: 420px; }
.lg-hero h1 { font-size: clamp(48px, 7.2vw, 108px); line-height: 0.95; }
.lg-note { font-size: clamp(17px, 1.6vw, 22px); color: var(--text-secondary); max-width: 520px; }
/* нить в потоке под текстом, уходит к левому краю экрана и входит в карточку */
.lg-thread-wrap { position: relative; height: 24px; margin: 8px 0 0 calc(-1 * var(--pad)); width: calc(100% + var(--pad) + 4vw + 40px); }
.lg-thread { position: absolute; left: 0; top: 50%; width: 100%; max-width: none; height: auto; transform: translateY(-50%); mix-blend-mode: lighten; pointer-events: none; }

/* справа: кукла за карточкой */
.lg-side { position: relative; z-index: 1; padding-top: 236px; }
.doll { position: absolute; left: 50%; top: 0; width: 190px; margin-left: -95px; aspect-ratio: 278 / 521; pointer-events: none; }
.doll-stage { position: relative; width: 100%; height: 100%; transform-origin: 50% 100%; animation: doll-sway 5s ease-in-out infinite; }
.doll img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.16s ease; }
.doll img.is-on { opacity: 1; }
@keyframes doll-sway { 0%, 100% { transform: rotate(-1deg); } 50% { transform: rotate(1deg); } }

.lg-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-radius: var(--radius-panel);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lg-card h2 { font-size: 34px; line-height: 1.05; letter-spacing: -0.02em; }
.lg-lead { color: var(--text-secondary); }

.lg-password { position: relative; }
.lg-password input { padding-right: 104px; }
.lg-password button {
  position: absolute;
  right: 6px;
  top: 6px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: var(--font-small);
  cursor: pointer;
}
.lg-password button:hover { color: var(--text-primary); }

.lg-consents { margin: 0; padding: 16px; border: 0; border-radius: var(--radius-card); background: var(--surface-2); display: flex; flex-direction: column; gap: 12px; }
.lg-consents legend { padding: 0; font-size: 16px; font-weight: var(--weight-medium); float: left; width: 100%; margin-bottom: 8px; }
.lg-consents p { clear: both; font-size: var(--font-small); color: var(--text-secondary); }
.lg-support { font-size: var(--font-small); color: var(--text-secondary); text-underline-offset: 3px; }

@media (max-width: 899px) {
  .lg-shell { grid-template-columns: 1fr; gap: 0; min-height: 0; }
  .lg-hero { min-height: 0; gap: 10px; padding-bottom: 8px; }
  .lg-hero h1 { font-size: 36px; }
  .lg-note, .lg-thread-wrap { display: none; }
  .lg-side { padding-top: 168px; }
  .doll { width: 150px; margin-left: -75px; }
  .lg-card { padding: 22px; gap: 12px; }
  .lg-card h2 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .doll-stage { animation: none; }
  .doll img { transition: none; }
}
