:root {
  color-scheme: dark;
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "SFMono-Regular", Menlo, monospace;
  --font-display: "GeistPixel-Square", "GeistPixel-Line", "Geist Mono", monospace;
  --color-background: #000000;
  --color-background-100: #0a0a0a;
  --color-background-200: #111111;
  --color-foreground: #ededed;
  --color-gray-100: #1a1a1a;
  --color-gray-200: #202020;
  --color-gray-300: #2a2a2a;
  --color-gray-400: #363636;
  --color-gray-500: #525252;
  --color-gray-600: #737373;
  --color-gray-700: #9a9a9a;
  --color-gray-800: #c9c9c9;
  --color-gray-900: #dddddd;
  --color-gray-1000: #ededed;
  --color-border: #2e2e2e;
  --color-accent: #ffb1ee;
  --color-accent-foreground: #ffffff;
  --color-l1: #3dd68c;
  --color-l3: #f87171;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --container-md: 28rem;
  --container-xl: 36rem;
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;
  --bg: var(--color-background);
  --panel: var(--color-background-100);
  --panel-2: var(--color-background-200);
  --panel-3: var(--color-gray-100);
  --border: var(--color-border);
  --border-strong: var(--color-gray-400);
  --text: var(--color-foreground);
  --muted: var(--color-gray-600);
  --muted-2: var(--color-gray-800);
  --mint: var(--color-accent);
  --purple: var(--color-accent);
  --danger: var(--color-l3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  background: var(--bg);
}

.app-frame {
  width: calc(100% - 48px);
  margin: 0 auto;
  padding: 132px 0 56px;
}

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 18px 24px 0;
}

.app-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  background: rgba(10, 10, 10, 0.78);
  padding: 18px 20px;
  backdrop-filter: blur(14px);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.app-header__identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-left: auto;
}

.app-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 177, 238, 0.3);
  border-radius: var(--radius-lg);
  color: var(--mint);
  background: rgba(255, 177, 238, 0.06);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.06em;
}

.app-header__eyebrow,
.label-mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.26em;
}

.app-header__eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.app-header__title {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.app-header__subtitle {
  margin: 12px 0 0;
  max-width: 520px;
  color: var(--muted-2);
  font-size: 15px;
}

.app-header__subtitle--fixed {
  margin-top: 4px;
  max-width: none;
  font-size: 13px;
}

.app-nav {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  padding: 6px;
}

.app-auth {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.app-auth__button,
.app-auth__telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.app-auth__button {
  min-width: 208px;
  max-width: 280px;
  padding: 14px 18px;
  font-weight: 700;
}

.app-auth__button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-auth__button:hover,
.app-auth__telegram:hover {
  border-color: rgba(255, 177, 238, 0.45);
  background: rgba(255, 177, 238, 0.08);
  color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(255, 177, 238, 0.05);
}

.app-auth__button.is-authenticated {
  border-color: rgba(255, 177, 238, 0.45);
  background: rgba(255, 177, 238, 0.1);
  color: var(--color-accent);
}

.app-auth__telegram {
  width: 56px;
  padding: 0;
  font-size: 24px;
  color: #42a5f5;
}

.app-auth__telegram.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.app-nav--subtle {
  align-self: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-nav__button {
  position: relative;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-2);
  min-width: 180px;
  padding: 14px 22px;
  font-size: 13px;
  font-weight: 700;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.app-nav__button:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-accent);
}

.app-nav__button.is-active {
  border-color: rgba(255, 177, 238, 0.45);
  background: rgba(255, 177, 238, 0.08);
  color: var(--color-accent);
}

.app-nav__button--has-tooltip::before,
.app-nav__button--has-tooltip::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-nav__button--has-tooltip::before {
  content: attr(data-tooltip-text);
  top: calc(100% + 18px);
  width: min(280px, calc(100vw - 48px));
  padding: 12px 14px;
  border: 1px solid rgba(255, 177, 238, 0.24);
  border-radius: 16px;
  background: rgba(10, 10, 10, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
  text-align: left;
  white-space: normal;
  transform: translate(-50%, -8px);
  z-index: 30;
}

.app-nav__button--has-tooltip::after {
  content: attr(data-tooltip-title);
  top: calc(100% + 8px);
  padding: 0 10px;
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transform: translate(-50%, -6px);
  z-index: 31;
}

.app-nav__button--has-tooltip:hover::before,
.app-nav__button--has-tooltip:hover::after,
.app-nav__button--has-tooltip:focus-visible::before,
.app-nav__button--has-tooltip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.community-view.is-hidden,
.is-hidden {
  display: none !important;
}

.community-view {
  width: 100%;
}

.module-stack {
  display: grid;
  gap: 20px;
}

.surface-card,
.soft-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.surface-card {
  background: var(--panel);
}

.soft-card {
  background: var(--panel-2);
}

.module-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 32px;
  background: var(--panel);
}

.home-hero {
  display: grid;
  gap: 18px;
  min-height: calc(100vh - 188px);
  align-content: center;
  padding: 56px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 3px,
      rgba(255, 255, 255, 0.05) 3px,
      rgba(255, 255, 255, 0.05) 4px
    ),
    var(--panel);
}

.home-hero__eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.home-hero__title {
  margin: 0;
  position: relative;
  display: inline-block;
  isolation: isolate;
  font-size: clamp(4.2rem, 12vw, 9rem);
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  font-family: var(--font-display);
  color: #ffd8f8;
  text-shadow:
    0 0 0 rgba(255, 177, 238, 0.5),
    0 0 14px rgba(255, 177, 238, 0.24),
    0 0 30px rgba(255, 177, 238, 0.1);
  animation:
    fade-up 0.5s ease-out 120ms both,
    home-hero-flicker 6.8s steps(1, end) infinite 0.7s;
}

.home-hero__title::before,
.home-hero__title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-hero__title::before {
  z-index: -1;
  color: rgba(255, 177, 238, 0.68);
  filter: blur(10px);
  opacity: 0.9;
  transform: translateZ(0);
  animation: home-hero-glow 6.8s linear infinite 0.7s;
}

.home-hero__title::after {
  z-index: 1;
  color: transparent;
  background:
    linear-gradient(
      102deg,
      transparent 0%,
      transparent 42%,
      rgba(255, 255, 255, 0.04) 47%,
      rgba(255, 255, 255, 0.96) 50%,
      rgba(255, 177, 238, 0.85) 52%,
      transparent 58%,
      transparent 100%
    );
  background-size: 220% 100%;
  background-position: 150% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0;
  animation: home-hero-surge 4.9s ease-in-out infinite 1.1s;
}

.home-hero__copy {
  margin: 0;
  max-width: 640px;
  color: var(--muted-2);
  font-size: 18px;
  line-height: 1.5;
  animation: fade-up 0.5s ease-out 180ms both;
}

.home-hero__notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 980px;
  animation: fade-up 0.55s ease-out 240ms both;
}

.home-note {
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 177, 238, 0.08), rgba(255, 177, 238, 0.02)),
    rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.home-note__eyebrow {
  margin: 0 0 10px;
  color: var(--mint);
  font-size: 10px;
  font-weight: 700;
}

.home-note__title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.home-note__copy {
  margin: 0;
  color: var(--muted-2);
  font-size: 14px;
  line-height: 1.7;
}

.module-hero__eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.module-hero__title {
  margin: 0;
  max-width: 9ch;
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.module-hero__copy {
  margin: 12px 0 0;
  max-width: 560px;
  color: var(--muted-2);
  font-size: 16px;
  line-height: 1.55;
}

.module-hero__status {
  min-width: 220px;
  align-self: start;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-2);
  padding: 14px 18px;
}

.module-hero__status p {
  margin: 0;
}

.module-hero__status p:last-child {
  margin-top: 8px;
  color: var(--text);
  font-weight: 700;
}

.module-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 14px 22px;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.primary-action {
  border: 1px solid rgba(255, 177, 238, 0.45);
  background: rgba(255, 177, 238, 0.08);
  color: var(--color-accent);
  font-weight: 700;
}

.primary-action:hover {
  background: rgba(255, 177, 238, 0.14);
  border-color: rgba(255, 177, 238, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 177, 238, 0.08);
}

.primary-action--compact,
.secondary-action--compact {
  min-width: 172px;
  min-height: 52px;
  padding: 12px 18px;
  font-size: 14px;
}

.secondary-action {
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
  color: var(--text);
  font-weight: 600;
}

.secondary-action:hover {
  border-color: rgba(255, 177, 238, 0.45);
  background: rgba(255, 177, 238, 0.04);
  color: var(--color-accent);
}

.secondary-action--mint {
  border-color: rgba(255, 177, 238, 0.45);
  color: var(--color-accent);
  background: transparent;
}

.secondary-action--mint:hover {
  background: rgba(255, 177, 238, 0.12);
}

.secondary-action--danger {
  border-color: var(--danger);
  color: var(--danger);
  background: transparent;
}

.secondary-action--danger:hover {
  background: rgba(248, 113, 113, 0.08);
  color: var(--danger);
}

.status-banner {
  border-radius: 22px;
  border: 1px solid var(--border);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
}

.status-banner--info {
  background: var(--panel-2);
  color: var(--text);
}

.status-banner--success {
  border-color: rgba(255, 177, 238, 0.3);
  background: rgba(255, 177, 238, 0.06);
  color: var(--color-accent);
}

.status-banner--warning {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.status-banner--danger {
  border-color: rgba(198, 90, 82, 0.28);
  background: rgba(248, 113, 113, 0.08);
  color: #ffb4b4;
}

.control-input,
.control-textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 1rem;
  background: transparent;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.control-input {
  min-height: 56px;
  padding: 14px 18px;
}

.control-input--tight {
  min-height: 46px;
  padding: 10px 14px;
}

.control-textarea {
  resize: vertical;
  padding: 16px 18px;
}

.control-input:focus,
.control-textarea:focus,
.control-input:hover,
.control-textarea:hover {
  background: rgba(255, 177, 238, 0.04);
  border-color: rgba(255, 177, 238, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 177, 238, 0.05);
}

.field-stack {
  display: grid;
  gap: 8px;
}

.field-stack--full {
  grid-column: 1 / -1;
}

.sharp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-2);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.empty-state {
  padding: 56px 32px;
  text-align: center;
}

.empty-state h3 {
  margin: 14px 0 8px;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.empty-state p:last-child {
  margin: 0 auto;
  max-width: 680px;
  color: var(--muted-2);
  line-height: 1.7;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 16px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.modal__dialog {
  position: relative;
  width: min(100%, 640px);
  padding: 24px;
}

.modal__dialog--wide {
  width: min(100%, 920px);
}

.modal__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.modal__head h3 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-2);
  color: var(--muted-2);
}

.modal__grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 280px;
}

.modal__side {
  display: grid;
  gap: 16px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.modal__actions--spread {
  justify-content: space-between;
}

.modal__hint {
  margin: 0;
  color: var(--muted-2);
  font-size: 14px;
  line-height: 1.65;
}

.auth-panel {
  display: grid;
  gap: 18px;
}

.auth-session-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel-2);
  padding: 20px;
}

.auth-session-card h4 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
}

.switch {
  position: relative;
  display: inline-flex;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch__track {
  width: 48px;
  height: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--color-gray-200);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.switch input:checked + .switch__track {
  border-color: rgba(255, 177, 238, 0.45);
  background: rgba(255, 177, 238, 0.18);
}

.switch input:checked + .switch__track::after {
  transform: translateX(20px);
  background: var(--color-accent);
}

@media (max-width: 960px) {
  .app-frame {
    width: calc(100% - 24px);
    padding-top: 176px;
  }

  .app-header {
    padding: 12px 12px 0;
  }

  .app-header__bar {
    border-radius: 24px;
    padding: 16px;
  }

  .app-nav {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .app-header__actions,
  .app-auth {
    width: 100%;
  }

  .app-auth__button {
    min-width: 0;
    width: 100%;
  }

  .app-nav__button {
    min-width: 0;
    width: 100%;
  }

  .home-hero {
    min-height: calc(100vh - 232px);
    padding: 28px;
  }

  .home-hero__notes {
    grid-template-columns: 1fr;
  }

  .app-nav__button--has-tooltip::before,
  .app-nav__button--has-tooltip::after {
    display: none;
  }
}

.loading-strip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 600;
}

.loading-strip__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(97, 88, 79, 0.18);
  border-top-color: var(--mint);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.status-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
}

.status-card--success {
  border-color: rgba(255, 177, 238, 0.3);
  background: rgba(255, 177, 238, 0.06);
}

.status-card--error {
  border-color: rgba(198, 90, 82, 0.28);
  background: rgba(248, 113, 113, 0.08);
}

.status-card__head {
  display: grid;
  gap: 6px;
}

.status-card__head h4 {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.status-card__copy {
  margin: 0;
  color: var(--muted-2);
}

.status-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes home-hero-flicker {
  0%, 7%, 9%, 11%, 22%, 24%, 56%, 100% {
    opacity: 1;
    text-shadow:
      0 0 0 rgba(255, 177, 238, 0.52),
      0 0 16px rgba(255, 177, 238, 0.26),
      0 0 34px rgba(255, 177, 238, 0.14);
  }

  8% {
    opacity: 0.38;
    text-shadow:
      0 0 0 rgba(255, 177, 238, 0.08),
      0 0 7px rgba(255, 177, 238, 0.08);
  }

  10% {
    opacity: 0.72;
    text-shadow:
      0 0 0 rgba(255, 177, 238, 0.18),
      0 0 10px rgba(255, 177, 238, 0.14);
  }

  23% {
    opacity: 0.18;
    text-shadow: none;
  }

  57% {
    opacity: 0.55;
    text-shadow:
      0 0 0 rgba(255, 177, 238, 0.16),
      0 0 11px rgba(255, 177, 238, 0.12);
  }

  58% {
    opacity: 1;
    text-shadow:
      0 0 0 rgba(255, 177, 238, 0.7),
      0 0 22px rgba(255, 177, 238, 0.38),
      0 0 44px rgba(255, 177, 238, 0.18);
  }
}

@keyframes home-hero-glow {
  0%, 7%, 9%, 11%, 22%, 24%, 56%, 100% {
    opacity: 0.82;
    transform: translate3d(0, 0, 0) scale(1);
  }

  8%, 23% {
    opacity: 0.18;
    transform: translate3d(0, 0, 0) scale(0.995);
  }

  10%, 57% {
    opacity: 0.42;
  }

  58% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1.01);
  }
}

@keyframes home-hero-surge {
  0%, 14%, 100% {
    opacity: 0;
    background-position: 150% 50%;
  }

  18% {
    opacity: 0.96;
    background-position: 100% 50%;
  }

  22% {
    opacity: 0.2;
    background-position: 85% 50%;
  }

  24% {
    opacity: 0.9;
    background-position: 70% 50%;
  }

  28% {
    opacity: 0;
    background-position: 54% 50%;
  }

  62% {
    opacity: 0;
    background-position: 24% 50%;
  }

  66% {
    opacity: 0.82;
    background-position: -6% 50%;
  }

  70% {
    opacity: 0;
    background-position: -26% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__title,
  .home-hero__title::before,
  .home-hero__title::after {
    animation: none;
  }

  .home-hero__title {
    text-shadow:
      0 0 0 rgba(255, 177, 238, 0.5),
      0 0 12px rgba(255, 177, 238, 0.22);
  }

  .home-hero__title::before {
    opacity: 0.5;
  }
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-gray-500) transparent;
}

*::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

*::-webkit-scrollbar-thumb {
  background: var(--color-gray-500);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-600);
}

*::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1024px) {
  .app-frame {
    width: min(100%, calc(100% - 24px));
  }

  .modal__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-frame {
    width: calc(100% - 16px);
    padding: 14px 0 28px;
  }

  .app-header {
    position: sticky;
    padding: 8px 8px 0;
  }

  .app-header__bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "identity auth"
      "nav nav";
    align-items: start;
    gap: 12px;
    padding: 12px;
    border-radius: 20px;
  }

  .app-header__identity {
    grid-area: identity;
    width: 100%;
    align-items: flex-start;
    gap: 12px;
  }

  .app-header__actions {
    display: contents;
  }

  .app-logo {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .app-header__eyebrow {
    margin-bottom: 6px;
    font-size: 9px;
  }

  .app-header__subtitle--fixed {
    font-size: 12px;
    line-height: 1.5;
  }

  .app-auth {
    grid-area: auth;
    display: grid;
    grid-template-columns: 50px 50px;
    gap: 10px;
    align-items: stretch;
    justify-content: end;
  }

  .module-hero {
    padding: 20px;
  }

  .module-toolbar,
  .modal__actions,
  .status-card__actions {
    flex-direction: column;
  }

  .modal__actions--spread {
    justify-content: flex-end;
    align-items: stretch;
  }

  .app-header .app-nav {
    grid-area: nav;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    gap: 8px;
    padding: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    border-radius: 20px;
  }

  .app-header .app-nav::-webkit-scrollbar {
    display: none;
  }

  .app-nav__button {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    min-height: 46px;
    padding: 11px 16px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  .app-nav--subtle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .app-nav--subtle .app-nav__button {
    min-width: 0;
    width: 100%;
  }

  .primary-action,
  .secondary-action,
  .app-auth__button {
    width: 100%;
  }

  .app-auth__button,
  .app-auth__telegram {
    width: 50px;
    min-width: 50px;
    min-height: 50px;
    padding: 0;
  }

  .app-auth__button {
    max-width: none;
    justify-self: end;
  }

  .app-auth__telegram {
    font-size: 22px;
  }

  .app-auth__button span {
    display: none;
  }

  .app-auth__button i {
    font-size: 20px;
  }

  .home-hero {
    min-height: auto;
    padding: 18px 16px;
    gap: 12px;
  }

  .home-hero__title {
    font-size: clamp(2.1rem, 14vw, 3.55rem);
    line-height: 0.92;
  }

  .home-hero__copy {
    font-size: 14px;
    line-height: 1.55;
  }

  .home-note {
    padding: 18px;
    border-radius: 18px;
  }

  .home-note__title {
    font-size: 19px;
  }

  .info-strip {
    flex-direction: column;
    gap: 10px;
  }

  .modal {
    padding: 8px;
    align-items: end;
  }

  .modal__dialog,
  .modal__dialog--wide {
    width: 100%;
    max-height: calc(100vh - 16px);
    padding: 18px;
    overflow-y: auto;
    border-radius: 22px;
  }

  .modal__head {
    margin-bottom: 16px;
  }

  .modal__head h3 {
    font-size: 24px;
  }

  .auth-session-card h4,
  .status-card__head h4 {
    font-size: 20px;
  }

  .status-banner {
    padding: 12px 14px;
    border-radius: 18px;
  }

  .control-input {
    min-height: 52px;
    padding: 12px 16px;
  }

  .control-textarea {
    padding: 14px 16px;
  }
}

@media (max-width: 480px) {
  .app-header__identity {
    gap: 10px;
  }

  .app-logo {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .app-header__eyebrow {
    letter-spacing: 0.18em;
  }

  .app-header__subtitle--fixed {
    font-size: 11px;
  }

  .home-hero__title {
    font-size: clamp(1.9rem, 12.5vw, 3.1rem);
  }

  .home-note__title {
    font-size: 18px;
  }

  .home-note__copy {
    font-size: 13px;
    line-height: 1.6;
  }
}
