:root {
  --bg: #000000;
  --surface: #0c0c0c;
  --surface-2: #111111;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.52);
  --dim: rgba(255, 255, 255, 0.34);
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.14);
  --select: #7c3aed;
  --danger: #ff453a;
  --r: 20px;
  --font: "Manrope", system-ui, -apple-system, sans-serif;
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  overflow-x: hidden;
  overflow-y: auto;
  display: grid;
  place-items: center;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-app {
  display: flex;
  flex-direction: column;
  place-items: stretch;
  min-height: 100dvh;
  overflow: hidden;
}

::selection { background: var(--select); color: #fff; }
::-moz-selection { background: var(--select); color: #fff; }

[hidden] { display: none !important; }

/* ── Language switcher ── */
.lang {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 30;
}

body.is-app .lang {
  top: max(10px, env(safe-area-inset-top));
}

.lang__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.lang__btn:hover { border-color: rgba(255, 255, 255, 0.22); background: #151515; }
.lang__btn:active { transform: scale(0.96); }
.lang.is-open .lang__btn { border-color: rgba(255, 255, 255, 0.28); }

.lang__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: #111111;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  animation: langIn 0.18s ease;
}

@keyframes langIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lang__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.lang__opt:hover { background: rgba(255, 255, 255, 0.06); }
.lang__opt.is-active { background: rgba(255, 255, 255, 0.1); color: #fff; }
.lang__name { letter-spacing: 0.01em; }

.flag {
  width: 30px;
  height: 22px;
  border-radius: 5px;
  display: inline-block;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.18),
    0 0 0 0.5px rgba(0, 0, 0, 0.28),
    0 2px 4px rgba(0, 0, 0, 0.35);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.lang__btn .flag {
  width: 28px;
  height: 20px;
  border-radius: 4.5px;
}

.flag--ru {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 22'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff' stop-opacity='0.25'/%3E%3Cstop offset='0.45' stop-color='%23ffffff' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='30' height='22' rx='4' fill='%23fff'/%3E%3Crect y='7.33' width='30' height='7.34' fill='%230039a6'/%3E%3Crect y='14.67' width='30' height='7.33' fill='%23d52b1e'/%3E%3Crect width='30' height='22' rx='4' fill='url(%23g)'/%3E%3C/svg%3E");
}

.flag--us {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 22'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff' stop-opacity='0.22'/%3E%3Cstop offset='0.5' stop-color='%23ffffff' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='30' height='22' rx='4' fill='%23b22234'/%3E%3Cg stroke='%23fff' stroke-width='1.69'%3E%3Cpath d='M0 2.54h30M0 5.92h30M0 9.31h30M0 12.69h30M0 16.08h30M0 19.46h30'/%3E%3C/g%3E%3Crect width='12' height='11.85' fill='%233c3b6e'/%3E%3Cg fill='%23fff'%3E%3Ccircle cx='2.2' cy='2' r='0.55'/%3E%3Ccircle cx='4.4' cy='2' r='0.55'/%3E%3Ccircle cx='6.6' cy='2' r='0.55'/%3E%3Ccircle cx='8.8' cy='2' r='0.55'/%3E%3Ccircle cx='3.3' cy='3.5' r='0.55'/%3E%3Ccircle cx='5.5' cy='3.5' r='0.55'/%3E%3Ccircle cx='7.7' cy='3.5' r='0.55'/%3E%3Ccircle cx='2.2' cy='5' r='0.55'/%3E%3Ccircle cx='4.4' cy='5' r='0.55'/%3E%3Ccircle cx='6.6' cy='5' r='0.55'/%3E%3Ccircle cx='8.8' cy='5' r='0.55'/%3E%3Ccircle cx='3.3' cy='6.5' r='0.55'/%3E%3Ccircle cx='5.5' cy='6.5' r='0.55'/%3E%3Ccircle cx='7.7' cy='6.5' r='0.55'/%3E%3Ccircle cx='2.2' cy='8' r='0.55'/%3E%3Ccircle cx='4.4' cy='8' r='0.55'/%3E%3Ccircle cx='6.6' cy='8' r='0.55'/%3E%3Ccircle cx='8.8' cy='8' r='0.55'/%3E%3Ccircle cx='3.3' cy='9.5' r='0.55'/%3E%3Ccircle cx='5.5' cy='9.5' r='0.55'/%3E%3Ccircle cx='7.7' cy='9.5' r='0.55'/%3E%3C/g%3E%3Crect width='30' height='22' rx='4' fill='url(%23g)'/%3E%3C/svg%3E");
}

/* ── Background (flat black like panel) ── */
.bg { display: none; }

.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.is-app .app-bg { opacity: 1; }

.app-bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: orbDrift 18s ease-in-out infinite;
}

.app-bg__orb--1 {
  width: min(70vw, 420px);
  height: min(70vw, 420px);
  top: -12%;
  left: -18%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, transparent 70%);
}

.app-bg__orb--2 {
  width: min(60vw, 360px);
  height: min(60vw, 360px);
  bottom: 8%;
  right: -16%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 72%);
  animation-delay: -6s;
}

.app-bg__orb--3 {
  width: min(40vw, 240px);
  height: min(40vw, 240px);
  top: 42%;
  left: 50%;
  margin-left: min(-20vw, -120px);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  animation-delay: -12s;
}

@keyframes orbDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -18px) scale(1.06); }
  66% { transform: translate(-16px, 14px) scale(0.96); }
}

/* ── Site header (app mode) ── */
.site-head {
  position: sticky;
  top: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding:
    max(8px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    8px
    max(16px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-head__back {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.site-head__back:active { background: #151515; border-color: var(--line-2); }

.site-head__back svg {
  width: 20px;
  height: 20px;
}

.site-head__brand {
  text-align: center;
  line-height: 1.05;
}

.site-head__aurora {
  display: block;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-head__imperial {
  display: block;
  margin-top: 3px;
  font-family: var(--display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  color: var(--muted);
}

.site-head__spacer { width: 44px; height: 44px; }

/* ── Stage ── */
.stage {
  position: relative;
  z-index: 1;
  width: min(92vw, 460px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 24px;
  animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-app .stage {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  gap: 0;
  padding:
    0
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  overflow-x: hidden;
  overflow-y: auto;
  animation: none;
}

body.is-app .stage:has(.app-screen--chat:not([hidden])) {
  overflow: hidden;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Card ── */
.card {
  width: 100%;
  padding: 40px 28px 34px;
  border-radius: var(--r);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  position: relative;
  overflow: hidden;
}

.card::before { display: none; }

.card--form {
  text-align: center;
}

/* ── Crest (Lottie sticker) ── */
.crest {
  width: 168px;
  height: 168px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  filter: none;
  overflow: hidden;
  position: relative;
}

.crest--hi {
  width: min(68vw, 200px);
  height: min(68vw, 200px);
  margin: 0 auto 4px;
}

.crest > svg,
.crest > canvas {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.crest > svg:nth-child(n+2),
.crest > canvas:nth-child(n+2) {
  display: none !important;
}

.hello {
  margin-top: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 6.5vw, 32px);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.tagline--gate {
  margin-top: 10px;
  max-width: 28em;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
  color: var(--dim);
  font-size: 14px;
  font-weight: 500;
}

.auth-actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-actions .cta {
  margin-top: 0;
  width: 100%;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.auth-actions .cta--ghost { margin-top: 0; }

.form-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 5.5vw, 26px);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.form-hint {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--dim);
  font-weight: 500;
}

.auth-form {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.field { display: flex; flex-direction: column; gap: 7px; }

.field__label {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
}

.field__input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0a0a0a;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__input::placeholder { color: rgba(255, 255, 255, 0.24); }

.field__input:focus {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.form-error {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
  text-align: center;
}

.auth-form .cta {
  margin-top: 6px;
  width: 100%;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.auth-form .cta:disabled { opacity: 0.55; cursor: wait; }

.back-gate {
  margin-top: 18px;
  border: 0;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 10px;
  transition: color 0.15s ease, background 0.15s ease;
}

.back-gate:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

/* ── Brand ── */
.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 8vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.brand__im {
  display: block;
  font-size: 0.42em;
  letter-spacing: 0.28em;
  margin-top: 8px;
  padding-left: 0.28em;
  color: var(--muted);
  font-weight: 700;
}

.tagline {
  margin-top: 14px;
  font-size: clamp(13px, 3.6vw, 15px);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--dim);
}

/* ── CTA ── */
.cta {
  position: relative;
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 24px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: #000;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
  transition: transform 0.16s ease, opacity 0.16s ease;
  isolation: isolate;
}

.cta:hover { transform: translateY(-1px); opacity: 0.94; }
.cta:active { transform: translateY(0) scale(0.99); opacity: 0.88; }

.cta__glow { display: none; }

.cta__ico { display: inline-flex; color: #000; }
.cta__ico svg { width: 20px; height: 20px; stroke-width: 1.6; }
.cta__label { line-height: 1; }
.cta__arrow { font-size: 18px; font-weight: 400; transition: transform 0.2s ease; }
.cta:hover .cta__arrow { transform: translateX(3px); }

.cta--ghost {
  margin-top: 10px;
  color: #fff;
  background: #171717;
  border: 1px solid var(--line-2);
  box-shadow: none;
}

.cta--ghost:hover {
  background: #1f1f1f;
  border-color: rgba(255, 255, 255, 0.18);
}

.cta--ghost .cta__ico { color: #fff; }
.cta--ghost .cta__ico svg { width: 20px; height: 20px; }

#linksView .cta:first-of-type { margin-top: 24px; }

/* ── App screens (full site after login) ── */
.app-screen {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  animation: rise 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-screen--center { justify-content: flex-start; }

.app-screen--chat {
  min-height: 0;
  overflow: hidden;
}

.app-hero {
  padding: 28px 4px 24px;
  text-align: center;
}

.app-hero__sticker {
  width: min(42vw, 140px);
  height: min(42vw, 140px);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  animation: heroFloat 5s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.app-hero__sticker > svg,
.app-hero__sticker > canvas {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

.app-hero__lead {
  margin-top: 14px;
  font-family: var(--display);
  font-size: clamp(18px, 4.5vw, 22px);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.app-pagehead {
  padding: 20px 4px 16px;
}

.app-pagehead__title {
  font-family: var(--display);
  font-size: clamp(22px, 5.5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.app-nav {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}

.app-nav--links {
  margin-top: 4px;
  gap: 12px;
  border: none;
  background: transparent;
  overflow: visible;
}

.app-nav__item,
.app-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  overflow: hidden;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.app-nav--links .app-nav__link {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(12, 12, 12, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.app-nav__item:nth-child(1) { animation: navIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards; animation-delay: 0.06s; }
.app-nav__item:nth-child(2) { animation: navIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards; animation-delay: 0.12s; }
.app-nav__item:nth-child(3) { animation: navIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards; animation-delay: 0.18s; }

.app-nav--links .app-nav__link:nth-child(1) { animation: navIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards; animation-delay: 0.08s; }
.app-nav--links .app-nav__link:nth-child(2) { animation: navIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards; animation-delay: 0.16s; }

@keyframes navIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-nav__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 255, 255, 0.07) 50%,
    transparent 62%
  );
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.app-nav__item:last-child,
.app-nav__link:last-child { border-bottom: none; }

.app-nav__item:hover,
.app-nav__link:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.12);
}

.app-nav--links .app-nav__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.app-nav__item:hover .app-nav__shine,
.app-nav__link:hover .app-nav__shine { transform: translateX(120%); }

.app-nav__item:active,
.app-nav__link:active {
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.05);
}

.app-nav--links .app-nav__link:active { transform: translateY(0) scale(0.985); }

.app-nav__item:hover .app-nav__arrow,
.app-nav__link:hover .app-nav__arrow {
  transform: translateX(3px);
  color: rgba(255, 255, 255, 0.5);
}

.app-nav__icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.app-nav__link--panel .app-nav__icon {
  background: linear-gradient(145deg, #1f1f1f, #141414);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.app-nav__link--news .app-nav__icon {
  background: linear-gradient(145deg, #222, #161616);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.app-nav__item:hover .app-nav__icon,
.app-nav__link:hover .app-nav__icon {
  transform: scale(1.06);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}

.app-nav__link--panel:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 36px rgba(255, 255, 255, 0.04), 0 12px 32px rgba(0, 0, 0, 0.45);
}

.app-nav__link--news:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 36px rgba(255, 255, 255, 0.03), 0 12px 32px rgba(0, 0, 0, 0.45);
}

.app-nav__icon svg {
  width: 20px;
  height: 20px;
}

.app-nav__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-nav__online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6ee7a8;
  letter-spacing: 0.01em;
}

.app-nav__online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.65);
  animation: onlinePulse 2s ease-in-out infinite;
}

@keyframes onlinePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.88); }
}

.app-nav__title {
  flex: 1;
  min-width: 0;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.app-nav__arrow {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.24);
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
}

.app-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 12px 48px;
  min-height: 320px;
}

.app-placeholder__sticker {
  width: min(52vw, 200px);
  height: min(52vw, 200px);
  position: relative;
  overflow: hidden;
  animation: heroFloat 5s ease-in-out infinite;
}

.app-placeholder__sticker > svg,
.app-placeholder__sticker > canvas {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

.app-placeholder__text {
  margin-top: 16px;
  font-family: var(--display);
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--muted);
}

/* ── Hub chat ── */
.hub-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  text-align: left;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}

.hub-chat__log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.hub-chat__empty {
  margin: auto 0;
  text-align: center;
  font-size: 13px;
  color: var(--dim);
  padding: 24px 12px;
}

.chat-msg {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #111111;
}

.chat-msg--mine {
  align-self: flex-end;
  background: #171717;
  border-color: rgba(255, 255, 255, 0.1);
}

.chat-msg--other { align-self: flex-start; }

.chat-msg__meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.chat-msg__login {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--dim);
}

.chat-msg__time {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.28);
}

.chat-msg__text {
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hub-chat__error {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
  text-align: center;
}

.hub-chat__composer {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #0a0a0a;
}

.hub-chat__input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0a0a0a;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
}

.hub-chat__input:focus {
  border-color: rgba(255, 255, 255, 0.2);
}

.hub-chat__send {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: #000;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.hub-chat__send:active { transform: scale(0.96); }
.hub-chat__send:disabled { opacity: 0.45; cursor: wait; }

.hub-chat__send svg {
  width: 18px;
  height: 18px;
}

/* ── Dots ── */
.dots { margin-top: 24px; display: flex; justify-content: center; gap: 7px; }

.dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  opacity: 0.35;
  animation: pulse 1.8s ease-in-out infinite;
}

.dots i:nth-child(2) { animation-delay: 0.3s; }
.dots i:nth-child(3) { animation-delay: 0.6s; }

@keyframes pulse {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.35); }
}

@media (max-width: 380px) {
  .card { padding: 36px 20px 30px; }
  .app-nav__item,
  .app-nav__link { padding: 16px 14px; }
}

@media (min-width: 720px) {
  body.is-app .stage {
    padding-top: 8px;
  }

  .app-hero {
    padding-top: 36px;
    padding-bottom: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dots i { animation: none; }
  .app-bg__orb,
  .app-hero__sticker,
  .app-placeholder__sticker,
  .app-nav__item,
  .app-nav--links .app-nav__link,
  .app-nav__online-dot { animation: none; }
}
