/* =========================================
   1. ПЕРЕМЕННЫЕ И БАЗОВЫЕ НАСТРОЙКИ
========================================= */
:root {
  --font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg-page: #f8fafc;
  --bg-surface: rgba(255, 255, 255, 0.7);
  --bg-surface-solid: #ffffff;
  --bg-input: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-soft: #94a3b8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.1);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.08);
  --border: #e2e8f0;
  --border-focus: #93c5fd;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.08);
  --ring: 0 0 0 4px rgba(37, 99, 235, 0.15);
  --radius-md: 12px;
  --radius-lg: 24px;
}

[data-theme="dark"] {
  --bg-page: #0b0f19;
  --bg-surface: rgba(15, 23, 42, 0.6);
  --bg-surface-solid: #0f172a;
  --bg-input: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-soft: #64748b;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --border: #334155;
  --border-focus: #3b82f6;
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  --ring: 0 0 0 4px rgba(59, 130, 246, 0.25);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: var(--bg-page);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   2. ГЛОБАЛЬНЫЙ LAYOUT И GRID-НАЛОЖЕНИЯ
========================================= */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(400px, 560px) 1fr;
}

/* --- Левая панель (Форма) --- */
.auth-pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 4rem;
  background: var(--bg-surface-solid);
  position: relative;
  z-index: 10;
  box-shadow: 2px 0 20px rgba(0,0,0,0.02);
}

[data-theme="dark"] .auth-pane {
  box-shadow: 2px 0 30px rgba(0,0,0,0.2);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
}

.auth-topbar {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  z-index: 10;
}

.auth-card > .view-section {
  grid-row: 2;
  grid-column: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* --- Правая панель (Промо) --- */
.auth-hero {
  position: relative;
  overflow: hidden;
  display: grid; 
  align-items: center;
  justify-items: center;
  padding: 3rem;
  background: var(--bg-page);
}

.auth-hero > .view-section {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* =========================================
   3. ЛОГИКА СТЕЙТОВ ДЛЯ VIEW TRANSITIONS API
========================================= */
.view-section {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Активное состояние просто мгновенно включается. 
   Плавный переход делает JS View Transitions API */
[data-view="login"] #view-login,
[data-view="login"] #view-login-hero,
[data-view="register"] #view-register,
[data-view="register"] #view-register-hero {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

/* =========================================
   4. КОМПОНЕНТЫ ИНТЕРФЕЙСА
========================================= */
.mobile-only { display: none !important; }

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-back-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  margin-left: -10px;
  transition: background-color 0.2s, transform 0.2s;
}

.mobile-back-btn:hover { background-color: var(--bg-surface-solid); }
.mobile-back-btn:active { transform: scale(0.95); }

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.brand-badge svg { 
  width: 24px; 
  height: 24px; 
  color: var(--accent); 
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  color: var(--text-main);
  border-color: var(--text-soft);
  background: var(--bg-page);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.auth-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.auth-subtitle {
  margin: 0.5rem 0 2rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex-grow: 1;
}

#loginStatus, 
#registerStatus {
  margin-top: auto;
}

/* Кастомный чекбокс */
.checkbox-line {
  display: flex;
  align-items: center; 
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none; 
  transition: color 0.2s;
}

.checkbox-line:hover { color: var(--text-main); }

.checkbox-line input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 6px; 
  border: 2px solid var(--border);
  background-color: var(--bg-page);
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

[data-theme="dark"] .checkbox-line input[type="checkbox"] {
  background-color: rgba(15, 23, 42, 0.8);
}

.checkbox-line:hover input[type="checkbox"]:not(:checked) {
  border-color: var(--accent);
  background-color: var(--bg-surface-solid);
}

.checkbox-line input[type="checkbox"]:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.checkbox-line input[type="checkbox"]::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0); 
  opacity: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
}

.checkbox-line input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
  opacity: 1;
}

.checkbox-line input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Поля ввода (Floating Labels) */
.field {
  position: relative;
  display: flex;
  flex-direction: column;
}

.field-control {
  width: 100%;
  border-radius: 16px;
  border: 1px solid transparent;
  background: var(--bg-page); 
  color: var(--text-main);
  padding: 1.6rem 1.2rem 0.6rem;
  font-size: 1.05rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .field-control {
  background: rgba(30, 41, 59, 0.4);
}

.field-control:focus,
.field-control:not(:placeholder-shown) {
  background: var(--bg-surface-solid);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 4px 12px rgba(0,0,0,0.05); 
  outline: none;
}

.field-label {
  position: absolute;
  left: 1.2rem;
  top: 1.2rem;
  font-size: 1rem;
  color: var(--text-soft);
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
  transform-origin: left top;
}

.field-control:focus ~ .field-label,
.field-control:not(:placeholder-shown) ~ .field-label {
  transform: translateY(-0.75rem) scale(0.75);
  color: var(--accent);
  font-weight: 500;
}

.password-wrap { position: relative; }

.pwd-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-soft);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.pwd-toggle:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Индикатор пароля */
.password-meter-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: -0.2rem;
  /* Добавляем плавность появления самого индикатора */
  transition: opacity 0.3s ease, visibility 0.3s;
}

.password-meter-container.is-hidden {
  /* Убираем display: none, чтобы высота формы НИКОГДА не менялась */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.meter {
  height: 4px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
  width: 100%;
}

.meter__bar {
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.4s ease;
}

.meter__bar[data-level="0"] { width: 0; }
.meter__bar[data-level="1"] { width: 25%; }
.meter__bar[data-level="2"] { width: 50%; }
.meter__bar[data-level="3"] { width: 75%; }
.meter__bar[data-level="4"] { width: 100%; }
.meter__bar.is-weak { background: #ef4444; }
.meter__bar.is-strong { background: #f59e0b; }
.meter__bar.is-reliable { background: #10b981; }

.status-line {
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 1.2rem;
  display: flex;
  align-items: center;
}
.status-line.is-weak { color: #ef4444; font-weight: 600; }
.status-line.is-strong { color: #f59e0b; font-weight: 600; }
.status-line.is-reliable { color: #10b981; font-weight: 600; }
.status-line.is-error { color: var(--danger); font-weight: 500; }
.status-line.is-success { color: var(--success); font-weight: 500; }

.btn-submit {
  border: none;
  border-radius: 40px;
  min-height: 3.5rem;
  padding: 0 2rem;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.5); 
}

.btn-submit:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(37, 99, 235, 0.6);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 4px 10px -4px rgba(37, 99, 235, 0.4);
}

.btn-submit.is-loading {
  color: transparent;
  position: relative;
  pointer-events: none;
}

.btn-submit.is-loading::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -10px;
  margin-top: -10px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.text-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-switch-link {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.text-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.auth-footer {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
}

@media (min-width: 1025px) {
  .desktop-hidden { display: none !important; }
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-main);
  color: var(--bg-surface-solid);
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================
   5. АНИМАЦИИ ПРОМО-БЛОКА И ГРАФИКА
========================================= */
.landing-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.hero-bg-blob {
  position: absolute;
  filter: blur(80px);
  border-radius: 50%;
  z-index: 0;
  opacity: 0;
  animation: blob-fade-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards, float 15s 0.9s infinite ease-in-out alternate;
}

.blob-1 {
  top: 10%; left: 20%;
  width: 400px; height: 400px;
  background: var(--accent-soft);
}

.blob-2 {
  bottom: 10%; right: 10%;
  width: 500px; height: 500px;
  background: rgba(16, 185, 129, 0.1);
  animation: blob-fade-in 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards, float 15s 1.2s infinite ease-in-out alternate;
}

[data-view="register"] .blob-2 { background: rgba(37, 99, 235, 0.15); }

@keyframes float {
  0% { transform: translateX(-8px) scale(1); }
  100% { transform: translateX(8px) scale(1.05); }
}

@keyframes blob-fade-in {
  from { opacity: 0; filter: blur(100px); transform: scale(0.9); }
  to { opacity: 0.6; filter: blur(80px); transform: scale(1); }
}

/* Прячем текст до тех пор, пока JS не подготовит его для анимации */
.animate-chars:not([data-chars-ready="1"]) {
  opacity: 0;
  visibility: hidden;
  display: inline-block;
  transform: translateY(40px) scale(0.85); /* Совпадает с начальным ключом анимации букв! */
}

.apple-title {
  font-family: var(--font-family);
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 2.5rem 0;
}

.brand-gradient { margin-bottom: 0.2rem; }

.brand-gradient .char {
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 50%, #ec4899 100%);
  background-size: 800% 100%; 
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.tagline {
  color: var(--text-main);
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 700;
}

.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px) scale(0.85);
  animation: pop-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.char.space { width: 0.3em; }

@keyframes pop-in {
  0% { opacity: 0; transform: translateY(50px) scale(0.8); filter: blur(10px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 320px;
  opacity: 0;
  animation: fade-in-up-btn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
}

.glass-actions { animation-delay: 1.8s; }

.hero-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 2.8rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--bg-surface-solid);
  background: var(--text-main); 
  border-radius: 40px; 
  border: none;
  text-decoration: none;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.2);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, background 0.3s;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

[data-theme="dark"] .hero-action-btn {
  color: #0f172a;
  background: #f8fafc;
  box-shadow: 0 10px 30px -10px rgba(255,255,255,0.15);
}

.hero-action-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.3);
}

@keyframes fade-in-up-btn {
  from { opacity: 0; transform: translateY(25px); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.field-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-soft); 
  margin-top: -0.5rem; 
  line-height: 1.4;
  transition: color 0.3s;
}

.field-hint svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.field-control:focus ~ .field-hint,
.password-wrap:focus-within ~ .field-hint { color: var(--text-muted); }

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin: 1rem 0 3.5rem;
  text-align: left;
  width: 100%;
  max-width: 380px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  opacity: 0; 
  transform: translateY(20px);
  animation: fade-in-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.feature-item:nth-child(1) { animation-delay: 1.0s; }
.feature-item:nth-child(2) { animation-delay: 1.2s; }
.feature-item:nth-child(3) { animation-delay: 1.4s; }

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .feature-item { opacity: 1; transform: none; animation: none; }
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg-surface-solid);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

[data-theme="dark"] .feature-icon {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.feature-icon svg { width: 22px; height: 22px; }

.feature-text h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.feature-text p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.hero-action-btn.glass-btn {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--text-main);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .hero-action-btn.glass-btn {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-action-btn.glass-btn:hover {
  background: var(--bg-surface-solid);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* =========================================
   6. МОБИЛЬНАЯ АДАПТИВНОСТЬ (SPATIAL UI)
========================================= */
@media (max-width: 1024px) {
  .mobile-only { display: inline-flex !important; }

  .auth-layout {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100vh; 
    height: 100dvh;
  }

  .auth-pane, .auth-hero {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Плавное скольжение панелей для мобильного UX */
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.3, 1), 
                opacity 0.4s ease, 
                visibility 0.45s;
  }

  .auth-hero {
    display: grid; 
    padding-top: 3rem;
  }

  /* СТЕЙТ 1: Показ промо-блока (Стартовый) */
  .auth-layout[data-mobile-state="promo"] .auth-hero {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    z-index: 2;
  }
  
  .auth-layout[data-mobile-state="promo"] .auth-pane {
    transform: translateX(100%); 
    opacity: 0;
    visibility: hidden;
    z-index: 1;
  }

  /* СТЕЙТ 2: Показ формы (По клику на кнопку) */
  .auth-layout[data-mobile-state="form"] .auth-hero {
    transform: translateX(-30%); 
    opacity: 0;
    visibility: hidden;
    z-index: 1;
  }
  
  .auth-layout[data-mobile-state="form"] .auth-pane {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    z-index: 2;
  }

  .desktop-hidden { display: block !important; }
}

@media (max-width: 480px) {
  .auth-pane { padding: 1.5rem 1.25rem; }
  .auth-hero { padding: 2rem 1.25rem; }
  .auth-title { font-size: 1.6rem; }
  .field-control { font-size: 16px; }
}

/* =========================================
   7. СВЕРХБЫСТРЫЕ VIEW TRANSITIONS (ZERO LAG)
========================================= */
/* Делаем анимацию короткой и убираем любые тяжелые фильтры */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.2s; /* 200мс — золотой стандарт для быстрых интерфейсов */
  animation-timing-function: ease-out;
  mix-blend-mode: normal;
}

/* Оставляем только работу с прозрачностью, это гарантирует 60 FPS на любом железе */
::view-transition-old(root) {
  animation: ultra-fast-fade-out 0.2s ease-out forwards;
}

::view-transition-new(root) {
  animation: ultra-fast-fade-in 0.2s ease-out forwards;
}

@keyframes ultra-fast-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes ultra-fast-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}