/* ============================================================================
   Public surfaces: boot splash, landing page, auth.
   Everything here is plain CSS — the landing's "live" preview is HTML, not
   an image or a WebGL scene, so it costs almost nothing to load.
   ========================================================================== */

/* ---- Visibility while a returning user's session restores (src/boot.js) -- */
.boot-splash {
  display: none;
}
html[data-boot="app"] body:not(.in-app) .boot-splash {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: var(--bg);
}
html[data-boot="app"] #landing {
  display: none;
}
.boot-mark {
  animation: bootPulse 1.4s var(--ease) infinite;
}
@keyframes bootPulse {
  50% {
    transform: scale(0.92);
    opacity: 0.75;
  }
}
body.in-app #landing,
body.in-app #auth-screen {
  display: none !important;
}
body.in-app {
  overflow: hidden;
}

/* ---- Tones: a small named palette for icons and cards ---- */
.tone-ember { --tone: #d83b17; }
.tone-grape { --tone: #7b45e0; }
.tone-sun { --tone: #c98a00; }
.tone-ocean { --tone: #0b7a9e; }
.tone-rose { --tone: #cc2e66; }
.tone-forest { --tone: #1e8250; }
:root[data-theme="dark"] .tone-sun { --tone: #ffc24b; }
:root[data-theme="dark"] .tone-ember { --tone: #ff7a52; }
:root[data-theme="dark"] .tone-grape { --tone: #a987ff; }
:root[data-theme="dark"] .tone-ocean { --tone: #4cc3e6; }
:root[data-theme="dark"] .tone-rose { --tone: #ff6f9f; }
:root[data-theme="dark"] .tone-forest { --tone: #45cf8b; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}
.wordmark.small {
  font-size: 1.1rem;
}
.wordmark.light {
  color: #fff;
}
/* "Panalo Chat": the family name bold, the product name lighter. */
.wordmark .wm-sub {
  font-weight: 600;
  opacity: 0.7;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--primary-text);
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--online) 22%, transparent);
}

/* ============================================================================
   LANDING
   ========================================================================== */
.landing {
  position: relative;
  z-index: 1;
  overflow-x: clip;
}
.landing::before {
  content: "";
  position: absolute;
  inset: -20vh -10vw auto -10vw;
  height: 110vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 72% 30%, color-mix(in oklab, var(--brand-coral) 30%, transparent), transparent 70%),
    radial-gradient(30% 36% at 88% 62%, color-mix(in oklab, var(--brand-grape) 20%, transparent), transparent 70%),
    radial-gradient(34% 38% at 12% 12%, color-mix(in oklab, var(--brand-sun) 22%, transparent), transparent 70%);
  filter: blur(8px);
}
:root[data-theme="dark"] .landing::before {
  background:
    radial-gradient(38% 42% at 72% 30%, rgba(47, 111, 228, 0.34), transparent 70%),
    radial-gradient(32% 38% at 90% 64%, rgba(123, 69, 224, 0.34), transparent 70%),
    radial-gradient(34% 38% at 12% 12%, rgba(64, 196, 255, 0.16), transparent 70%);
}

.land-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--s-6);
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  transition: background-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.land-nav.scrolled {
  max-width: none;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 1px 0 var(--divider);
}
.land-nav.scrolled > * {
  max-width: 1200px;
}
.land-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.land-links a {
  padding: 8px 14px;
  border-radius: var(--r-full);
  color: var(--text-2);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease);
}
.land-links a:hover {
  color: var(--text);
  background: var(--surface-3);
}
.land-nav-cta {
  display: flex;
  gap: 8px;
}
.land-nav-cta .btn {
  min-height: 40px;
  font-size: var(--fs-sm);
}

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(28px, 6vh, 72px) 24px clamp(48px, 9vh, 96px);
}
.hero h1 {
  margin: 18px 0 20px;
  font-size: var(--fs-3xl);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.hero-hl {
  background: linear-gradient(100deg, var(--brand-ember), var(--brand-coral) 55%, #f29a1b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 34rem;
  font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.2rem);
  line-height: 1.55;
  color: var(--text-2);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 28px;
}
.hero-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hero-facts [data-icon] {
  color: var(--primary-text);
}

/* ---- Live demo ---- */
.hero-demo {
  --d-bg: #f6f2ed;
  --d-surface: #ffffff;
  --d-text: #1b1822;
  --d-muted: #6f6876;
  --d-in: #ffffff;
  --d-border: #ebe5de;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
}
.hero-demo.demo-dark {
  --d-bg: #0f0d14;
  --d-surface: #17151e;
  --d-text: #f3f0f7;
  --d-muted: #a39cae;
  --d-in: #23202c;
  --d-border: #2a2633;
}
.demo-glow {
  position: absolute;
  inset: 8% 6% 18%;
  z-index: -1;
  border-radius: 40px;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--primary) 40%, transparent), transparent);
  filter: blur(30px);
  opacity: 0.8;
  transition: background var(--dur-3) var(--ease);
}
.demo-phone {
  width: min(100%, 380px);
  border-radius: 34px;
  background: var(--d-bg);
  border: 1px solid var(--d-border);
  box-shadow: var(--shadow-3), 0 0 0 8px color-mix(in oklab, var(--d-surface) 70%, transparent);
  overflow: hidden;
  color: var(--d-text);
  transform: rotate(-1.5deg);
  transition: background-color var(--dur-3) var(--ease), color var(--dur-3) var(--ease);
  animation: demoFloat 7s ease-in-out infinite;
}
@keyframes demoFloat {
  50% {
    transform: rotate(-1.5deg) translateY(-8px);
  }
}
.demo-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
  background: var(--d-surface);
  border-bottom: 1px solid var(--d-border);
}
.demo-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: hsl(var(--h) 55% 48%);
  color: #fff;
  font-weight: 800;
  font-family: var(--font-display);
}
.demo-title {
  display: grid;
  line-height: 1.25;
  flex: 1;
  min-width: 0;
}
.demo-title strong {
  font-size: 0.95rem;
}
.demo-title small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary-text);
  font-size: 0.78rem;
  font-weight: 600;
}
.hero-demo.demo-dark .demo-title small {
  color: color-mix(in oklab, var(--primary) 55%, white);
}
.demo-online {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--online);
}
.demo-lock {
  color: var(--d-muted);
}
.demo-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 14px 10px;
  min-height: 340px;
}
.demo-day {
  align-self: center;
  margin-bottom: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: color-mix(in oklab, var(--d-text) 7%, transparent);
  color: var(--d-muted);
  font-size: 0.7rem;
  font-weight: 700;
}
.demo-msg {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 0.86rem;
  line-height: 1.38;
  animation: demoIn 0.5s var(--ease-spring) both;
  animation-delay: calc(var(--i) * 0.55s + 0.3s);
  position: relative;
}
.demo-msg.in {
  align-self: flex-start;
  background: var(--d-in);
  border: 1px solid var(--d-border);
  border-bottom-left-radius: 6px;
}
.demo-msg.out {
  align-self: flex-end;
  background: var(--primary);
  color: var(--on-primary);
  border-bottom-right-radius: 6px;
  transition: background-color var(--dur-3) var(--ease);
}
.demo-msg b {
  display: block;
  font-size: 0.72rem;
  color: hsl(var(--h) 60% 45%);
}
.hero-demo.demo-dark .demo-msg b {
  color: hsl(var(--h) 70% 70%);
}
.demo-mention {
  font-weight: 700;
  color: var(--primary-text);
  background: var(--primary-soft);
  padding: 0 4px;
  border-radius: 5px;
}
.hero-demo.demo-dark .demo-mention {
  color: color-mix(in oklab, var(--primary) 55%, white);
}
.demo-react {
  position: absolute;
  right: 10px;
  bottom: -12px;
  padding: 1px 7px;
  border-radius: var(--r-full);
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  color: var(--d-text);
  font-size: 0.7rem;
  box-shadow: var(--shadow-1);
}
.demo-msg:has(.demo-react) {
  margin-bottom: 10px;
}
.demo-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  background: var(--d-in);
  border: 1px solid var(--d-border);
  animation: demoIn 0.5s var(--ease-spring) both;
  animation-delay: calc(var(--i) * 0.55s + 0.3s);
}
.demo-typing i,
.typing-bubble i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  animation: typingDot 1.2s infinite ease-in-out;
}
.demo-typing i:nth-child(2),
.typing-bubble i:nth-child(2) {
  animation-delay: 0.15s;
}
.demo-typing i:nth-child(3),
.typing-bubble i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes typingDot {
  30% {
    transform: translateY(-4px);
    opacity: 0.9;
  }
}
@keyframes demoIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
}
.demo-composer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 12px 14px;
  padding: 10px 10px 10px 16px;
  border-radius: var(--r-full);
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  color: var(--d-muted);
  font-size: 0.86rem;
}
.demo-composer i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  transition: background-color var(--dur-3) var(--ease);
}
.demo-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 14px;
  border-radius: var(--r-full);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
}
.demo-controls-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
  margin-right: 2px;
}
.demo-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px transparent;
  transition: transform var(--dur-2) var(--ease-spring), box-shadow var(--dur-2) var(--ease);
}
.demo-swatch:hover {
  transform: scale(1.12);
}
.demo-swatch[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c);
}
.demo-mode {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
}

/* ---- Sections ---- */
.land-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 96px) 24px;
}
.section-head {
  max-width: 44rem;
  margin-bottom: 36px;
}
.section-head h2 {
  margin-top: 10px;
  font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.9rem);
  letter-spacing: -0.035em;
  font-weight: 800;
}
.section-sub {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.6;
}

.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-3) var(--ease), box-shadow var(--dur-3) var(--ease);
  overflow: hidden;
}
.bento-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}
.bento-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--tone) 16%, transparent), transparent);
  pointer-events: none;
}
.bento-card h3 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.bento-card p {
  color: var(--text-2);
  font-size: var(--fs-md);
  line-height: 1.55;
}
.bento-lg {
  grid-row: span 2;
}
.bento-wide {
  grid-column: 1 / -1;
}
.bento-icon,
.choice-icon,
.cm-ico,
.modal-hero-icon,
.home-ico {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: color-mix(in oklab, var(--tone, var(--primary)) 14%, transparent);
  color: var(--tone, var(--primary));
}
.cipher {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  font-size: var(--fs-sm);
}
.cipher span:first-child {
  padding: 6px 10px;
  border-radius: 12px;
  background: var(--brand-ember);
  color: #fff;
  font-weight: 600;
}
.cipher-arrow {
  color: var(--text-3);
}
.cipher code {
  font-family: var(--font-mono);
  color: var(--text-2);
  letter-spacing: 0.02em;
}

/* ---- Make it yours ---- */
.yours-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.yours-grid li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
}
.yours-grid strong {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.yours-grid li > span:last-child {
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.yours-swatches,
.yours-modes,
.yours-bubbles {
  display: flex;
  gap: 6px;
  height: 44px;
  align-items: center;
}
.yours-swatches i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c);
  margin-left: -10px;
  border: 3px solid var(--surface);
}
.yours-swatches i:first-child {
  margin-left: 0;
}
.yours-modes i {
  width: 56px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
}
.yours-modes .m-light {
  background: linear-gradient(135deg, #fff 60%, #f3efe9);
}
.yours-modes .m-dark {
  background: linear-gradient(135deg, #1c1a24 60%, #0b0a0f);
}
.yours-bubbles i {
  width: 34px;
  height: 26px;
  background: var(--primary);
}
.yours-bubbles .b1 {
  border-radius: 14px 14px 14px 4px;
}
.yours-bubbles .b2 {
  border-radius: 9px 9px 9px 3px;
  opacity: 0.8;
}
.yours-bubbles .b3 {
  border-radius: 4px;
  opacity: 0.6;
}
.yours-wall {
  height: 44px;
  border-radius: 12px;
  background-color: var(--surface-2);
  background-image: radial-gradient(color-mix(in oklab, var(--text) 22%, transparent) 1.2px, transparent 1.2px);
  background-size: 12px 12px;
  border: 1px solid var(--border);
}

/* ---- Privacy ---- */
.privacy-card {
  padding: clamp(28px, 5vw, 56px);
  border-radius: 36px;
  background: var(--brand-ink);
  color: #f3f0f7;
  position: relative;
  overflow: hidden;
}
.privacy-card::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -30%;
  width: 60%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(123, 69, 224, 0.35), transparent);
  pointer-events: none;
}
.privacy-card h2,
.privacy-card h3 {
  color: #fff;
}
.privacy-card .eyebrow {
  color: #ff9b73;
}
.privacy-card .section-sub {
  color: #bdb6c8;
}
.privacy-cols {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.privacy-h {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.privacy-h.ok [data-icon] {
  color: #45cf8b;
}
.privacy-h.no [data-icon] {
  color: #ffc24b;
}
.privacy-cols ul {
  list-style: none;
  display: grid;
  gap: 10px;
}
.privacy-cols li {
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #d9d3e2;
  line-height: 1.5;
  font-size: var(--fs-md);
}

/* ---- Final CTA + footer ---- */
.land-final {
  max-width: 1152px;
  margin: 0 auto clamp(40px, 8vh, 80px);
  padding: clamp(40px, 7vw, 80px) 24px;
  border-radius: 36px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(60% 90% at 90% 10%, rgba(255, 194, 75, 0.45), transparent 60%),
    radial-gradient(60% 90% at 10% 100%, rgba(123, 69, 224, 0.55), transparent 60%),
    linear-gradient(120deg, #d83b17, #ff6a3d);
  box-shadow: var(--shadow-3);
}
.land-final h2 {
  color: #fff;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem);
  letter-spacing: -0.04em;
  font-weight: 800;
}
.land-final p {
  margin: 12px 0 26px;
  font-size: 1.1rem;
  opacity: 0.92;
}
.land-final .btn-primary {
  background: #fff;
  color: #b02c0d;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
}
.land-final .btn-primary:hover {
  background: #fff4ee;
}
.land-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--divider);
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.land-footer nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
}
.land-footer nav a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
}
.land-footer nav a:hover {
  color: var(--text);
}

/* Scroll-reveal (src/public.js adds .in when a section enters view). */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .hero-demo {
    order: 2;
  }
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bento-lg {
    grid-row: auto;
    grid-column: span 2;
  }
  .yours-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .land-links {
    display: none;
  }
  .land-nav-cta {
    margin-left: auto;
  }
}
@media (max-width: 600px) {
  .land-nav {
    padding: 12px 16px;
  }
  .land-nav-cta .btn-ghost {
    display: none;
  }
  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero-cta .btn {
    flex: 1 1 100%;
  }
  .land-section {
    padding-left: 16px;
    padding-right: 16px;
  }
  .bento,
  .yours-grid,
  .privacy-cols {
    grid-template-columns: 1fr;
  }
  .bento-lg,
  .bento-wide {
    grid-column: auto;
  }
  .land-final {
    margin-left: 16px;
    margin-right: 16px;
    border-radius: 28px;
  }
  .land-footer nav {
    margin-left: 0;
  }
  .demo-phone {
    transform: none;
    animation: none;
  }
}

/* ============================================================================
   AUTH
   ========================================================================== */
.auth-screen {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  min-height: 100vh;
  min-height: 100dvh;
}
.auth-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px;
  margin: 12px;
  border-radius: 32px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(70% 60% at 100% 0%, rgba(255, 194, 75, 0.5), transparent 60%),
    radial-gradient(80% 70% at 0% 100%, rgba(123, 69, 224, 0.75), transparent 60%),
    linear-gradient(150deg, #ff6a3d, #d83b17 55%, #8f2c6e);
}
.auth-art-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
}
.art-bubble {
  padding: 12px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 1.02rem;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.35);
  animation: demoIn 0.6s var(--ease-spring) both;
}
.art-bubble.in {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.95);
  color: #1b1822;
  border-bottom-left-radius: 6px;
}
.art-bubble.out {
  align-self: flex-end;
  background: #1b1822;
  color: #fff;
  border-bottom-right-radius: 6px;
  animation-delay: 0.35s;
}
.art-bubble:nth-child(3) {
  animation-delay: 0.7s;
}
.auth-art-foot {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.auth-main {
  position: relative;
  display: grid;
  place-items: center;
  padding: 72px 24px 40px;
}
.auth-back {
  position: absolute;
  top: 22px;
  left: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  border-radius: var(--r-full);
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-sm);
}
.auth-back:hover {
  background: var(--surface-3);
  color: var(--text);
}
.auth-box {
  width: min(100%, 410px);
}
.auth-mobile-mark {
  display: none;
  margin-bottom: 20px;
}
.auth-form {
  display: flex;
  flex-direction: column;
}
.auth-title {
  font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.4rem);
  letter-spacing: -0.035em;
  font-weight: 800;
}
.auth-lead {
  margin: 8px 0 26px;
  color: var(--text-2);
}
.field-label {
  display: block;
  margin: 14px 0 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}
.field-label:first-of-type {
  margin-top: 0;
}
.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 14px;
}
.label-row .field-label {
  margin: 0 0 6px;
}
.small {
  font-size: var(--fs-sm);
}
.password-field,
.prefix-field {
  position: relative;
}
.password-field input {
  padding-right: 52px;
}
.reveal-btn {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  color: var(--text-3);
}
.reveal-btn:hover {
  color: var(--text);
  background: var(--surface-3);
}
.prefix-field .prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-weight: 600;
  pointer-events: none;
}
.prefix-field input {
  padding-left: 34px;
}
.caps-hint,
.field-error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--warning);
}
.field-error {
  color: var(--danger);
}
.otp-hint,
.fine-print {
  margin-top: 8px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.5;
}
.fine-print {
  color: var(--text-3);
}
.strength {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 10px;
}
.strength i {
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
  transition: background-color var(--dur-2) var(--ease);
}
.strength[data-level="1"] i:nth-child(-n + 1) { background: var(--danger); }
.strength[data-level="2"] i:nth-child(-n + 2) { background: var(--warning); }
.strength[data-level="3"] i:nth-child(-n + 3) { background: #6fae3a; }
.strength[data-level="4"] i { background: var(--success); }

.otp-input {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.6rem !important;
  letter-spacing: 0.4em;
  font-weight: 700;
}
.remember-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 20px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  cursor: pointer;
}
.auth-form .btn-block {
  margin-top: 18px;
}
.remember-row + .btn-block {
  margin-top: 0;
}
.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.auth-message {
  margin-top: 16px;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}
.auth-message:empty {
  display: none;
}
.auth-message[data-tone="error"] {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--danger-soft);
  color: var(--danger);
}
.auth-message[data-tone="ok"] {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--success-soft);
  color: var(--success);
}

@media (max-width: 900px) {
  .auth-screen {
    grid-template-columns: 1fr;
  }
  .auth-art {
    display: none;
  }
  .auth-mobile-mark {
    display: inline-flex;
  }
  .auth-main {
    place-items: start center;
    padding-top: 76px;
  }
}
