/* Страницы lorrr в браузере: приглашение, новый пароль, условия и политика. Строгий чёрный, как в приложении:
   свет есть только за человеком — аура его состояния за фото, — остальное ровная темнота. Аура приходит из разметки
   одной строкой стиля: цвет (--aura), ядро (--core), ступени (--k1, --k2, --h), размытие (--b), дыхание (--dur). */
@font-face {
  font-family: Geist;
  src: url("/static/geist.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

/* Слово lorrr буквами логотипа (как на главной, только o — буква); в шрифте одни l, o и r. */
@font-face {
  font-family: "lorrr mark";
  src: url("/static/lorrr-mark.woff2") format("woff2");
  font-display: block;
}

:root {
  --bg: #09090a;
  --ink: #f2f2f0;
  --ink2: rgba(242, 242, 240, 0.6);
  --ink3: rgba(242, 242, 240, 0.38);
  --line: rgba(255, 255, 255, 0.08);
  --on-white: #0a0a0b;
  --aura: #c9a46a;
  --aura-glow: rgba(201, 164, 106, 0.34);
  --aura-dim: rgba(201, 164, 106, 0.1);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100svh;
  overflow-x: hidden;
}

/* Плёночное зерно, как в приложении: на чёрном его не видно, в свете ауры оно убирает полосы градиента. */
.grain {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.22;
  mix-blend-mode: multiply;
  pointer-events: none;
}

main {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 440px;
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(22px + env(safe-area-inset-top)) 24px calc(20px + env(safe-area-inset-bottom));
}

.brand {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  font-family: "lorrr mark", Geist, sans-serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}

/* Свой слой: аура лежит под заголовком и текстом этого блока, а не поверх них. */
.who {
  position: relative;
  z-index: 0;
  margin: auto 0 0;
  padding-top: 56px;
  text-align: center;
  animation: rise 0.8s var(--ease) both;
}

/* Человек: фото без рамки на ауре его состояния — той же, что в профиле в приложении (lib/ui/aura.dart): приятное
   светится ядром, неприятное — полое кольцо; чем больше энергии, тем чётче край и быстрее дыхание. Аура в 4 раза
   шире фото и уходит за края экрана; за фото — первая буква имени, если фото нет. */
.face {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto;
}

.face > img,
.face > .initial {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #141416;
  object-fit: cover;
  font-size: 42px;
  font-weight: 400;
  color: var(--ink2);
}

.glow {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: var(--s, 460px);
  height: var(--s, 460px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.glow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  filter: blur(var(--b, 20px));
  background: radial-gradient(
    circle,
    var(--core) 0%,
    var(--aura) var(--k1, 22%),
    var(--aura-c2) var(--k2, 46%),
    transparent 70%
  );
  animation: breathe var(--dur, 6s) ease-in-out infinite alternate;
}

.glow.hollow::before {
  background: radial-gradient(
    circle,
    transparent 0%,
    transparent var(--h),
    var(--aura) calc(var(--h) + 12%),
    var(--aura-c2) 50%,
    transparent 70%
  );
}

h1 {
  margin: 30px 0 0;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.state {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--ink3);
}

.state b {
  font-weight: 500;
  color: var(--aura);
}

.pitch {
  max-width: 34ch;
  margin: 22px auto 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink2);
  text-wrap: pretty;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 44px;
  animation: rise 0.8s 0.12s var(--ease) both;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.15s var(--ease),
    background 0.2s,
    border-color 0.2s;
}

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.primary {
  background: var(--ink);
  color: var(--on-white);
}

.secondary {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.secondary:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn:focus-visible,
.code-box:focus-visible,
a:focus-visible {
  outline: 2px solid var(--aura);
  outline-offset: 3px;
}

.note {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  color: var(--ink3);
}

/* Запасной путь: код приглашения крупно (нажатие копирует) и три шага; подсвечивается после неудачного «Открыть». */
.code {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  padding: 20px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.025);
  transition:
    border-color 0.4s,
    box-shadow 0.4s;
  animation: rise 0.8s 0.24s var(--ease) both;
}

.code.lit {
  border-color: var(--aura-glow);
  box-shadow: 0 0 0 1px var(--aura-glow);
}

.code-title {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--ink3);
}

.code-box {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  padding: 18px 12px 14px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.15s var(--ease),
    border-color 0.3s,
    background 0.3s;
}

.code-box:active {
  transform: scale(0.98);
}

.code-box.done {
  border-style: solid;
  border-color: var(--aura-glow);
  background: rgba(255, 255, 255, 0.05);
}

.code-value {
  white-space: nowrap;
  font-size: clamp(26px, 9vw, 34px);
  font-weight: 500;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  /* отступ слева уравновешивает разрядку после последнего знака — код ровно по центру */
  padding-left: 0.14em;
  user-select: all;
}

.code-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink2);
}

.code-box.done .code-action {
  color: var(--aura);
}

.code-action svg {
  width: 16px;
  height: 16px;
}

.steps {
  margin: 0;
  padding: 2px 2px 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 6px 0 6px 34px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink2);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

/* Подвал всех страниц: условия и политика — мелко и тихо. */
.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 36px 0 0;
  font-size: 12px;
}

.legal a {
  color: var(--ink3);
  text-decoration: none;
}

.legal a:hover {
  color: var(--ink2);
}

/* Новый пароль: посередине экрана, поле и кнопка — как на экранах входа в приложении. */
.solo {
  margin: auto 0;
  padding-top: 32px;
}

.form {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
}

.form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--ink3);
}

.form input {
  height: 56px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #141416;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  outline: none;
  transition: border-color 0.2s;
}

.form input:focus {
  border-color: rgba(255, 255, 255, 0.28);
}

.result {
  min-height: 1.5em;
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink2);
}

/* Условия и политика: длинный текст на чёрном — спокойная колонка, крупный кегль, редкие заголовки. */
.doc main {
  max-width: 680px;
}

.doc article {
  margin-top: 44px;
  animation: rise 0.6s var(--ease) both;
}

.doc h1 {
  margin: 0;
  font-size: clamp(26px, 8.4vw, 34px);
  letter-spacing: -0.03em;
  text-wrap: balance;
  hyphens: auto;
}

.doc h2 {
  margin: 40px 0 0;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.doc h3 {
  margin: 26px 0 0;
  font-size: 17px;
  font-weight: 500;
}

.doc p,
.doc li {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(242, 242, 240, 0.8);
  text-wrap: pretty;
}

.doc p {
  margin: 14px 0 0;
}

.doc article > p:first-of-type {
  color: var(--ink2);
}

.doc ul,
.doc ol {
  margin: 12px 0 0;
  padding-left: 22px;
}

.doc li + li {
  margin-top: 6px;
}

.doc li::marker {
  color: var(--ink3);
}

.doc strong {
  font-weight: 500;
  color: var(--ink);
}

.doc article a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(242, 242, 240, 0.3);
  text-underline-offset: 3px;
}

.doc article a:hover {
  text-decoration-color: var(--ink);
}

.doc .legal {
  justify-content: flex-start;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.only-desktop,
.only-android {
  display: none;
}

html.android .only-android {
  display: block;
}

html.ios .not-ios {
  display: none;
}

.note a {
  color: var(--ink2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

html.desktop .only-desktop {
  display: block;
}

html.desktop .only-phone {
  display: none;
}

@keyframes breathe {
  from {
    transform: scale(0.94);
  }
  to {
    transform: scale(1.06);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .glow::before,
  .who,
  .actions,
  .code,
  .doc article {
    animation: none;
  }
}

/* Низкий экран (панели браузера съели высоту): обе кнопки приглашения должны быть видны без прокрутки. */
@media (max-height: 700px) {
  .who {
    padding-top: 24px;
  }

  .face {
    width: 88px;
    height: 88px;
  }

  .who h1 {
    margin-top: 20px;
    font-size: 26px;
  }

  .actions {
    padding-top: 24px;
  }
}

/* Гости без lorrr: затея, «как ты?» по ссылке, «Что дальше» круга, афиша. */
.plan-card {
  margin: 28px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}

.plan-title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
}

.plan-when,
.plan-local {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--ink2);
}

.plan-local {
  color: var(--ink3);
}

.plan-going {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--aura);
}

.field {
  margin: 0;
  font-size: 13px;
  color: var(--ink3);
}

.picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pick {
  display: inline-flex !important;
  cursor: pointer;
}

.pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pick span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.15s, color 0.15s;
}

.pick input:checked + span {
  background: var(--ink);
  color: var(--on-white);
  border-color: var(--ink);
}

.pick input:focus-visible + span {
  outline: 2px solid var(--aura);
  outline-offset: 2px;
}

.wave0,
.wants {
  display: grid;
  gap: 10px;
}

.check {
  display: flex !important;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px !important;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink2);
}

.check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--ink);
}

.form select {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.result.bad {
  color: #ff8a7a;
}

.care {
  display: grid;
  gap: 6px;
  margin: 24px 0 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.care .note {
  text-align: left;
  color: var(--ink2);
}

.next {
  margin: 32px 0 0;
}

.next .plan-card {
  margin-top: 10px;
}

.lorrr-pitch {
  margin: 40px 0 0;
  text-align: center;
}

.actions.tight {
  padding-top: 16px;
}

.pitch.about {
  margin-top: 12px;
  color: var(--ink);
}

.poster {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: 48px 0 0;
  text-align: center;
}

.poster-kicker,
.poster-how,
.poster-link {
  margin: 0;
  font-size: 15px;
  color: var(--ink2);
}

.poster-title {
  margin: 0;
  font-size: 44px;
  line-height: 1.05;
}

.poster-about {
  max-width: 30ch;
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
}

.poster-qr svg {
  display: block;
  width: 260px;
  height: 260px;
  border-radius: 18px;
}

@media print {
  body {
    background: #fff;
    color: #0a0a0b;
  }

  .brand,
  .legal,
  .no-print,
  .grain {
    display: none !important;
  }

  .poster-kicker,
  .poster-how,
  .poster-link,
  .poster-about {
    color: #0a0a0b;
  }
}

[hidden] {
  display: none !important;
}

/* Затея по ссылке: «Открыть в lorrr» и «Скачать» сразу под карточкой, ответ без установки — ниже */
.actions.plan-open {
  margin-top: 24px;
  padding-top: 0;
}

.field.or {
  margin: 36px 0 0;
  text-align: center;
}
