:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  background: #101113;
  color: #f7f7f7;
  --panel: #202225;
  --panel-2: #181a1e;
  --line: rgba(255, 255, 255, 0.12);
  --muted: #bfc4ce;
  --green: #46c765;
  --blue: #48a7ff;
  --cyan: #24d5e8;
  --pink: #e948a8;
  --amber: #ffae30;
}

body.theme-light {
  color: #14171d;
  --panel: #ffffff;
  --panel-2: #f3f5f9;
  --line: rgba(15, 23, 42, 0.14);
  --muted: #596274;
}

* {
  box-sizing: border-box;
}

::selection {
  color: #ffffff;
  background: rgba(157, 91, 255, 0.82);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(44, 140, 255, 0.18), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(233, 72, 168, 0.16), transparent 30%),
    #101113;
  overflow-x: hidden;
}

body.theme-light {
  background:
    radial-gradient(circle at 15% 10%, rgba(44, 140, 255, 0.12), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(233, 72, 168, 0.1), transparent 30%),
    #f6f8fb;
}

a {
  color: inherit;
}

button,
.button {
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  padding: 14px 22px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.secondary,
.ghost,
.provider {
  background: transparent;
  color: #fff;
  border: 1px solid var(--line);
}

body.logged-in .ghost,
body.logged-in [data-open-auth] {
  background: rgba(70, 199, 101, 0.16);
  border-color: rgba(70, 199, 101, 0.5);
  color: #e9ffef;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 64px);
  background: rgba(16, 17, 19, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-light .topbar {
  background: rgba(255, 255, 255, 0.86);
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 46px;
  min-width: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-size: 18px;
  line-height: 1;
}

body.theme-light .theme-toggle {
  color: #14171d;
  background: rgba(15, 23, 42, 0.04);
}

body.theme-light .secondary,
body.theme-light .ghost,
body.theme-light .provider {
  color: #14171d;
}

body.theme-light nav,
body.theme-light .console-bar,
body.theme-light .module-tools label,
body.theme-light footer,
body.theme-light .section-heading p,
body.theme-light .download p,
body.theme-light .policy-grid p,
body.theme-light #capsule-summary,
body.theme-light .account-overview p,
body.theme-light .private-panel p {
  color: #475569;
}

body.theme-light .hero-console,
body.theme-light .capsule-preview,
body.theme-light .download,
body.theme-light .dashboard,
body.theme-light .chat-showcase,
body.theme-light .policy-grid article,
body.theme-light .auth-card,
body.theme-light .info-card {
  color: #172033;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

body.theme-light .hero-console {
  color: #f7f7f7;
  background: rgba(32, 34, 37, 0.88);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

body.theme-light .hero-console .console-bar,
body.theme-light .hero-console #hero-command {
  color: #dfe5ef;
}

body.theme-light .hero-console .hero-status span {
  color: #dce3ef;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

body.theme-light .hero-status span,
body.theme-light .module-cloud button,
body.theme-light .capsule-status,
body.theme-light .platform-tabs,
body.theme-light .capsule-list button,
body.theme-light .module-group,
body.theme-light .module-group-head,
body.theme-light .module-group-body button,
body.theme-light .private-panel,
body.theme-light .real-device-grid article,
body.theme-light .account-overview,
body.theme-light .account-card,
body.theme-light .linked-device,
body.theme-light .qr-pairing,
body.theme-light .face-card,
body.theme-light footer a {
  color: #172033;
  background: rgba(248, 250, 252, 0.92);
  border-color: rgba(15, 23, 42, 0.13);
}

body.theme-light .capsule-list small,
body.theme-light .capsule-list button span,
body.theme-light .module-group-head small,
body.theme-light .account-card span,
body.theme-light .linked-device span,
body.theme-light .qr-pairing span,
body.theme-light .dashboard-account small {
  color: #64748b;
}

body.theme-light .platform-tabs button {
  color: #172033;
}

body.theme-light .platform-tabs button.active,
body.theme-light .capsule-list button.active {
  color: #0f172a;
  background: rgba(36, 213, 232, 0.16);
}

body.theme-light .hero-console .hero-status span {
  color: #dce3ef;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

body.theme-light footer {
  background: rgba(255, 255, 255, 0.9);
  border-top-color: rgba(15, 23, 42, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 900;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 12px;
  filter:
    drop-shadow(0 0 14px rgba(36, 213, 232, 0.34))
    drop-shadow(0 0 18px rgba(233, 72, 168, 0.18));
}

.brand span {
  color: transparent;
  background: linear-gradient(135deg, #24d5e8, #e948a8 52%, #ffae30);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 34px rgba(36, 213, 232, 0.2);
}

nav {
  display: flex;
  gap: clamp(10px, 2vw, 22px);
  color: #d7dbe3;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
}

.hero,
.capsule-studio,
.capability-band,
.download,
.band,
.policy-grid {
  padding: clamp(38px, 7vw, 92px) clamp(18px, 5vw, 80px);
  width: min(100% - clamp(24px, 5vw, 96px), 1500px);
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
}

.hero {
  width: 100%;
  max-width: none;
}

.hero {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 520px);
  gap: clamp(30px, 6vw, 84px);
  align-items: center;
}

.hero-copy {
  max-width: 800px;
}

.eyebrow {
  color: #9db5ff;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(74px, 15vw, 172px);
  line-height: 0.86;
  color: transparent;
  background: linear-gradient(135deg, #ffffff 0%, #24d5e8 34%, #e948a8 68%, #ffae30 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 24px 54px rgba(36, 213, 232, 0.22));
}

h2 {
  font-size: clamp(30px, 5vw, 54px);
  margin: 0 0 14px;
}

h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 38px);
}

.lede,
.section-heading p,
.download p,
.policy-grid p {
  color: var(--muted);
  line-height: 1.55;
}

.lede {
  max-width: 720px;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.2;
}

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.download-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.download-title-row h2 {
  margin-bottom: 0;
}

.download-help-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(36, 213, 232, 0.42);
  background: rgba(36, 213, 232, 0.12);
  color: #e9fbff;
  font-weight: 900;
  line-height: 1;
}

.download-help-button:hover,
.download-help-button:focus-visible {
  background: rgba(36, 213, 232, 0.22);
  outline: 2px solid rgba(36, 213, 232, 0.38);
  outline-offset: 2px;
}

.hero-console,
.capsule-preview,
.download,
.dashboard,
.policy-grid article,
.auth-card {
  background: rgba(32, 34, 37, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}

.hero-console {
  min-height: 430px;
  padding: 26px;
  display: grid;
  align-content: space-between;
  overflow: hidden;
}

.account-strip {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(70, 199, 101, 0.46);
  border-radius: 8px;
  background: rgba(70, 199, 101, 0.09);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.account-strip span,
.dashboard-account span {
  display: block;
  color: #77f39a;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-strip small,
.dashboard-account small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #dfe5ef;
}

.console-bar span {
  width: 48px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.assistant-orb {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  min-height: 130px;
}

.assistant-orb i {
  width: 38px;
  height: 92px;
  border-radius: 999px;
  background: #304cff;
  box-shadow: 0 0 34px rgba(72, 167, 255, 0.72);
  animation: level 1.3s ease-in-out infinite;
}

.assistant-orb i:nth-child(2) { animation-delay: 0.1s; }
.assistant-orb i:nth-child(3) { animation-delay: 0.2s; }
.assistant-orb i:nth-child(4) { animation-delay: 0.3s; }
.assistant-orb i:nth-child(5) { animation-delay: 0.4s; }

@keyframes level {
  50% {
    transform: scaleY(0.55);
    opacity: 0.7;
  }
}

#hero-command {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
}

.hero-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hero-status span,
.module-cloud button,
.capsule-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #dce3ef;
  text-align: center;
}

.section-heading {
  max-width: 900px;
  margin-bottom: 28px;
}

.section-heading.compact {
  margin-bottom: 18px;
}

.platform-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 22px;
}

.platform-tabs button {
  min-height: 42px;
  padding: 10px 18px;
  color: #fff;
  background: transparent;
  border: 0;
}

.platform-tabs button.active {
  color: #111;
  background: #fff;
}

.capsule-layout {
  display: grid;
  grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
  gap: 20px;
}

.capsule-list {
  display: grid;
  gap: 10px;
  align-content: start;
  max-height: 760px;
  overflow: auto;
  padding-right: 6px;
}

.capsule-list button {
  position: relative;
  border-radius: 8px;
  justify-content: flex-start;
  text-align: left;
  color: #f5f7fb;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  min-height: 64px;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.capsule-list button span {
  color: #aeb5c2;
  font-size: 0.98rem;
  font-weight: 900;
}

.capsule-list button.active span {
  color: #f5f7fb;
}

.capsule-list small {
  color: #aeb5c2;
}

.capsule-list button.active {
  border-color: var(--blue);
  background: rgba(72, 167, 255, 0.18);
  animation: activePulse 1.7s ease-in-out infinite;
}

.capsule-list button.active::after,
.module-group.open .module-group-head::after,
.module-group-body button.selected::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--amber), var(--cyan));
  background-size: 260% 100%;
  padding: 2px;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: activeLine 1.6s linear infinite;
}

.capsule-preview {
  padding: clamp(16px, 3vw, 28px);
  min-width: 0;
}

.preview-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.capsule-install-toast {
  position: absolute;
  z-index: 5;
  left: clamp(12px, 2vw, 24px);
  right: clamp(12px, 2vw, 24px);
  top: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(36, 213, 232, 0.44);
  color: #f7fbff;
  background: rgba(9, 12, 20, 0.88);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.capsule-install-toast::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--amber), var(--cyan));
  background-size: 260% 100%;
  padding: 2px;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: activeLine 1.6s linear infinite;
}

.capsule-install-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.capsule-install-toast span {
  color: #cbd5e1;
}

.capsule-install-toast a {
  pointer-events: auto;
  color: #24d5e8;
  font-weight: 900;
  text-decoration: none;
}

.capsule-status {
  display: inline-flex;
  width: auto;
  margin: 0 0 14px;
  color: #98ffb0;
  border-color: rgba(70, 199, 101, 0.5);
}

#capsule-summary {
  color: var(--muted);
  line-height: 1.5;
}

.capsule-visual,
#capsule-image {
  width: 100%;
  max-width: 100%;
  max-height: 430px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #090a0d;
  min-width: 0;
}

.capsule-visual {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  padding: 18px;
  display: grid;
  align-content: space-between;
  isolation: isolate;
  background:
    linear-gradient(145deg, rgba(72, 167, 255, 0.2), transparent 45%),
    linear-gradient(315deg, rgba(233, 72, 168, 0.2), transparent 45%),
    #0b0e14;
}

.capsule-visual::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  pointer-events: none;
}

.phone-frame {
  width: 100%;
  justify-self: center;
  border-radius: 24px;
  min-height: 430px;
}

.capsule-visual.flutter-frame.phone-frame {
  width: 100%;
  border-radius: 24px;
  min-height: 560px;
  grid-template-rows: minmax(520px, 1fr);
}

.capsule-visual.flutter-frame.phone-frame .flutter-preview-frame {
  min-height: 520px;
  border-radius: 18px;
}

.desktop-frame {
  aspect-ratio: 16 / 10;
  min-height: 330px;
}

.visual-topline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #d9e3ef;
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.preview-mode-note {
  position: relative;
  z-index: 1;
  margin: 10px 0;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #b8c3d6;
  background: rgba(0,0,0,0.22);
  font-size: 0.82rem;
}

.mobile-preview-rotate-hint {
  display: none;
  position: relative;
  z-index: 4;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(36, 213, 232, 0.34);
  border-radius: 8px;
  color: #d7f7ff;
  background: rgba(8, 15, 24, 0.78);
  font-size: 0.84rem;
  line-height: 1.35;
}

.flutter-preview-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 300px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: #05070a;
}

.capsule-visual.flutter-frame {
  max-height: none;
  min-height: 680px;
  aspect-ratio: auto;
  padding: 10px;
  grid-template-rows: minmax(640px, 1fr);
}

.capsule-visual.flutter-frame .flutter-preview-frame {
  height: 100%;
  min-height: 640px;
}

.preview-action-shield {
  position: absolute;
  inset: 10px;
  z-index: 2;
  display: block;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.preview-action-shield:focus-visible {
  outline: 2px solid rgba(36, 213, 232, 0.78);
  outline-offset: -4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.flutter-loading {
  position: absolute;
  inset: 10px;
  z-index: 3;
  display: none;
  place-items: center;
  align-content: center;
  gap: 12px;
  border-radius: 8px;
  color: #f7fbff;
  background:
    radial-gradient(circle at 50% 40%, rgba(36, 213, 232, 0.14), transparent 34%),
    linear-gradient(135deg, #05070b, #140623 58%, #080b14);
  text-align: center;
}

.capsule-visual.flutter-frame.is-loading .flutter-loading {
  display: grid;
}

.flutter-loading span {
  width: 42px;
  aspect-ratio: 1;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #24d5e8;
  animation: spin 850ms linear infinite;
}

.flutter-loading strong {
  font-size: 14px;
  letter-spacing: 0.02em;
}

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

.app-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  min-height: 100%;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(72, 167, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(18, 20, 32, 0.84);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 22px 70px rgba(0,0,0,0.35);
  backdrop-filter: blur(14px);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-header b {
  font-size: clamp(18px, 2.5vw, 26px);
}

.app-header span {
  color: #c7ceda;
  font-size: 13px;
  text-align: right;
}

.app-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.app-tabs i {
  padding: 10px 8px;
  border-radius: 8px;
  text-align: center;
  color: #b8bfca;
  font-style: normal;
  font-weight: 800;
  border-bottom: 2px solid transparent;
}

.app-tabs i.active {
  color: #fff;
  border-color: var(--green);
  background: rgba(70, 199, 101, 0.16);
}

.visual-clock {
  justify-self: center;
  align-self: center;
  font-size: clamp(52px, 8vw, 94px);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 34px rgba(72, 167, 255, 0.7);
}

.visual-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.visual-buttons i {
  width: 96px;
  height: 42px;
  border-radius: 999px;
  background: var(--amber);
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 900;
}

.visual-buttons i + i {
  background: #ff4b42;
}

.pulse-ring {
  position: absolute;
  inset: 30%;
  border: 2px solid rgba(70, 199, 101, 0.7);
  border-radius: 50%;
  animation: pulseRing 1.8s ease-out infinite;
}

@keyframes pulseRing {
  0% { transform: scale(0.72); opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-grid i,
.file-grid i {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-style: normal;
}

.calendar-grid .hot {
  background: var(--blue);
}

.split-ui {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.agenda-card {
  display: grid;
  place-items: center;
  min-height: 210px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255,255,255,0.1);
}

.weather-scene {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 250px;
  position: relative;
}

.weather-stats,
.device-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.weather-stats span,
.device-cards span,
.input-strip {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px;
  color: #cbd2dd;
}

.weather-stats b {
  display: block;
  color: #fff;
}

.device-cards {
  grid-template-columns: repeat(4, 1fr);
}

.device-cards span {
  text-align: center;
  font-weight: 900;
}

.weather-scene .sun {
  width: 98px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffd35a;
  box-shadow: 0 0 60px rgba(255, 211, 90, 0.75);
  animation: floatY 3s ease-in-out infinite;
}

.cloud {
  position: absolute;
  width: 150px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  animation: drift 8s linear infinite;
}

.cloud.one { top: 42%; left: 8%; }
.cloud.two { top: 55%; right: 5%; animation-duration: 11s; }

@keyframes floatY {
  50% { transform: translateY(-12px); }
}

@keyframes drift {
  50% { transform: translateX(34px); opacity: 0.7; }
}

.math-board,
.wallet-scene,
.lock-scene {
  min-height: 250px;
  display: grid;
  place-items: center;
  gap: 14px;
  text-align: center;
}

.math-board strong {
  font-size: clamp(48px, 8vw, 86px);
}

.math-board i {
  width: 70%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  animation: scanLine 2s ease-in-out infinite;
}

@keyframes scanLine {
  50% { transform: translateY(-70px); }
}

.chat-bubbles {
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 260px;
}

.chat-bubbles p {
  width: max-content;
  max-width: 75%;
  margin: 0;
  padding: 14px 18px;
  border-radius: 20px;
  background: rgba(70, 199, 101, 0.28);
  animation: popIn 2.4s ease-in-out infinite;
}

.chat-bubbles p:nth-child(2) {
  justify-self: end;
  background: rgba(72, 167, 255, 0.28);
  animation-delay: 0.3s;
}

.chat-bubbles p:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes popIn {
  50% { transform: translateY(-5px); }
}

.device-gauges,
.admin-bars,
.health-bars {
  min-height: 230px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 18px;
}

.device-gauges i,
.admin-bars i,
.health-bars i {
  width: 46px;
  height: var(--v, 60%);
  min-height: 34px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(36, 213, 232, 0.35);
  animation: meter 2.4s ease-in-out infinite;
}

.health-bars i {
  background: linear-gradient(180deg, var(--amber), #ff6838);
}

.admin-bars i {
  background: linear-gradient(180deg, #b166ff, var(--pink));
}

@keyframes meter {
  50% { transform: scaleY(0.72); transform-origin: bottom; }
}

.network-nodes {
  position: absolute;
  inset: 80px 45px 60px;
}

.network-nodes b {
  position: absolute;
  width: 16px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 24px rgba(70, 199, 101, 0.7);
}

.network-nodes b:nth-child(1) { left: 12%; top: 24%; }
.network-nodes b:nth-child(2) { right: 18%; top: 22%; }
.network-nodes b:nth-child(3) { left: 30%; bottom: 18%; }
.network-nodes b:nth-child(4) { right: 30%; bottom: 24%; }

.file-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-self: center;
}

.upload-arrow {
  position: absolute;
  right: 32px;
  bottom: 32px;
  font-size: 48px;
  color: var(--cyan);
  animation: uploadMove 1.8s ease-in-out infinite;
}

@keyframes uploadMove {
  50% { transform: translate(-28px, -28px); }
}

.route-map {
  position: relative;
  min-height: 260px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 44px 44px,
    rgba(36, 213, 232, 0.08);
}

.route-map i {
  position: absolute;
  left: 12%;
  top: 60%;
  width: 76%;
  height: 4px;
  background: var(--cyan);
  transform: rotate(-14deg);
  transform-origin: left;
}

.route-map b {
  position: absolute;
  width: 18px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
}

.route-map b:nth-child(2) { left: 18%; top: 62%; }
.route-map b:nth-child(3) { left: 50%; top: 46%; }
.route-map b:nth-child(4) { right: 16%; top: 32%; }

.route-map span {
  position: absolute;
  left: 18%;
  top: 59%;
  width: 20px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--amber);
  animation: routeDot 3s linear infinite;
}

@keyframes routeDot {
  100% { transform: translate(340px, -110px); }
}

.lock-scene i {
  width: 110px;
  aspect-ratio: 1;
  border-radius: 22px;
  border: 12px solid var(--green);
  box-shadow: 0 0 34px rgba(70, 199, 101, 0.45);
}

.lock-scene ul {
  text-align: left;
  color: #dfe7ef;
}

.wallet-scene {
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 174, 48, 0.34), rgba(233, 72, 168, 0.18));
}

.wallet-scene strong {
  font-size: 30px;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 22px;
  padding: 4px 0;
}

.preview-actions button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: #fff;
}

.preview-actions button.active {
  background: #fff;
  color: #111;
}

.capsule-demo {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.22);
  min-height: 190px;
}

.demo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.demo-row:last-child {
  border-bottom: 0;
}

.demo-value {
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 900;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  min-width: 0;
}

.demo-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  min-height: 95px;
  background: rgba(255, 255, 255, 0.05);
  min-width: 0;
}

.demo-tile strong {
  display: block;
  margin-bottom: 8px;
}

.command-strip {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #dce3ef;
}

body.theme-light .command-strip {
  color: #334155;
}

.module-cloud {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.module-tools {
  display: grid;
  grid-template-columns: auto minmax(240px, 460px);
  gap: 12px;
  align-items: center;
  margin: -6px 0 18px;
}

.module-tools label {
  color: #dce3ef;
  font-weight: 900;
}

.module-tools input {
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}

.module-group {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.module-group.open {
  border-color: rgba(72, 167, 255, 0.7);
  background: rgba(72, 167, 255, 0.08);
  transform: translateY(-1px);
}

.module-group-head {
  position: relative;
  width: 100%;
  min-height: 58px;
  border-radius: 8px;
  color: #fff;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.module-group-head small {
  color: #aeb6c5;
}

.module-group-body {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(170px, 220px);
  gap: 10px;
  overflow-x: auto;
  max-height: 0;
  opacity: 0;
  padding: 0 4px;
  transition: max-height 220ms ease, opacity 180ms ease, padding 220ms ease;
  scrollbar-color: rgba(148, 163, 184, 0.55) rgba(255, 255, 255, 0.08);
}

.module-group-body::-webkit-scrollbar {
  height: 10px;
}

.module-group-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.module-group-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.55);
  border-radius: 999px;
}

.module-group.open .module-group-body {
  max-height: 170px;
  opacity: 1;
  padding: 14px 4px 4px;
}

.module-cloud button,
.module-group button {
  color: #cbd5e1;
  min-height: auto;
  padding: 10px 14px;
}

.module-group-body button {
  position: relative;
  border-radius: 8px;
  min-height: 82px;
  justify-content: flex-start;
  text-align: left;
  background:
    linear-gradient(145deg, rgba(72, 167, 255, 0.14), transparent 52%),
    rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.module-group-body button.selected {
  color: #f8fafc;
  border-color: rgba(36, 213, 232, 0.72);
  background:
    linear-gradient(145deg, rgba(36, 213, 232, 0.18), rgba(233, 72, 168, 0.1)),
    rgba(255, 255, 255, 0.08);
  animation: activePulse 1.7s ease-in-out infinite;
}

body.theme-light .module-group-body {
  scrollbar-color: rgba(100, 116, 139, 0.5) rgba(226, 232, 240, 0.9);
}

body.theme-light .module-group-body::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.9);
}

body.theme-light .module-group-body::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.5);
}

body.theme-light .module-cloud button,
body.theme-light .module-group button,
body.theme-light .module-group-body button {
  color: #64748b;
}

body.theme-light .module-group-body button.selected {
  color: #172033;
}

@keyframes activeLine {
  to { background-position: 260% 0; }
}

@keyframes activePulse {
  50% {
    box-shadow:
      0 0 0 1px rgba(36, 213, 232, 0.3),
      0 18px 38px rgba(36, 213, 232, 0.12);
  }
}

.module-empty {
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.private-panel,
.real-device-grid article,
.setup-grid article,
.account-overview,
.account-card,
.linked-device,
.qr-pairing,
.face-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.private-panel {
  margin-top: 16px;
  padding: 18px;
}

.private-panel p {
  color: var(--muted);
}

.real-device-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 14px;
  align-items: stretch;
}

.dashboard-account article,
.dashboard-account button {
  border: 1px solid rgba(70, 199, 101, 0.38);
  border-radius: 8px;
  background: rgba(70, 199, 101, 0.08);
  padding: 14px;
}

.account-overview {
  display: grid;
  gap: 14px;
  padding: 18px;
  margin-bottom: 16px;
}

.account-overview p {
  margin: 0;
  color: var(--muted);
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.account-card,
.linked-device,
.qr-pairing {
  padding: 14px;
}

.account-card span,
.linked-device span,
.qr-pairing span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.username-editor,
.device-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.username-editor input {
  max-width: 260px;
}

.account-status {
  min-height: 1.3em;
  color: #9db5ff;
}

.linked-devices {
  display: grid;
  gap: 10px;
}

.linked-device {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.pairing-code {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(36, 213, 232, 0.1);
  border: 1px solid rgba(36, 213, 232, 0.35);
  font-weight: 900;
  letter-spacing: 0;
}

.pairing-qr {
  width: 164px;
  height: 164px;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  image-rendering: pixelated;
}

.real-device-grid article {
  padding: 14px;
}

.real-device-grid span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.setup-grid,
.face-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.setup-grid article,
.face-card {
  padding: 20px;
}

.setup-grid li {
  margin: 8px 0;
  color: #d4d9e2;
}

.face-card {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.face-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px rgba(72, 167, 255, 0.35);
}

.section-flash {
  animation: sectionFlash 1.8s ease-in-out;
}

@keyframes sectionFlash {
  0%, 100% { box-shadow: none; }
  20% {
    transform: translateY(-4px);
    box-shadow:
      0 0 0 3px rgba(36, 213, 232, 0.75),
      0 0 55px rgba(36, 213, 232, 0.35),
      0 0 100px rgba(233, 72, 168, 0.22);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(233, 72, 168, 0.55),
      0 0 42px rgba(233, 72, 168, 0.28);
  }
}

.download {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 190px);
  align-items: center;
  gap: 24px;
  margin: 0 auto clamp(34px, 5vw, 70px);
}

.chat-showcase {
  position: relative;
  overflow: hidden;
  margin-bottom: clamp(34px, 5vw, 70px);
}

.chat-showcase-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
}

.chat-copy-panel,
.chat-preview-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(72, 167, 255, 0.12), transparent 45%),
    rgba(255, 255, 255, 0.045);
}

.chat-copy-panel {
  padding: clamp(18px, 3vw, 26px);
  display: grid;
  gap: 18px;
  align-content: start;
}

.chat-health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.chat-health-row span,
.chat-health-row small {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(36, 213, 232, 0.35);
  background: rgba(36, 213, 232, 0.1);
  color: #dffaff;
  font-weight: 900;
}

.chat-health-row span.online {
  color: #ddffea;
  border-color: rgba(70, 199, 101, 0.45);
  background: rgba(70, 199, 101, 0.13);
}

.chat-health-row span.offline {
  color: #ffe4e6;
  border-color: rgba(255, 91, 96, 0.45);
  background: rgba(255, 91, 96, 0.12);
}

.chat-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.chat-feature-list li {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.chat-feature-list span {
  color: var(--muted);
  line-height: 1.45;
}

.chat-preview-panel {
  position: relative;
  padding: clamp(14px, 2vw, 20px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  gap: 16px;
  background:
    radial-gradient(circle at 78% 16%, rgba(36, 213, 232, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(233, 72, 168, 0.13), transparent 48%),
    rgba(10, 12, 18, 0.9);
}

.flutter-chat-preview-panel {
  grid-template-columns: minmax(0, 1fr);
  min-height: 640px;
}

.chat-flutter-shell {
  position: relative;
  min-height: 620px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #071018;
}

.chat-flutter-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #071018;
}

.chat-preview-action-shield {
  inset: 0;
  z-index: 3;
}

.chat-flutter-shell .flutter-loading {
  z-index: 2;
}

.chat-install-toast {
  position: absolute;
  z-index: 4;
  left: 18px;
  right: 18px;
  top: 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  color: #f8fbff;
  background: rgba(9, 12, 20, 0.92);
  border: 1px solid rgba(36, 213, 232, 0.44);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.chat-install-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.chat-install-toast::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--amber), var(--cyan));
  background-size: 260% 100%;
  padding: 2px;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: activeLine 1.6s linear infinite;
}

.chat-install-toast span {
  color: #cbd5e1;
}

.chat-install-toast a {
  color: #24d5e8;
  font-weight: 900;
  text-decoration: none;
  pointer-events: auto;
}

.chat-preview-shell {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  min-height: 520px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(3, 7, 14, 0.72);
}

.chat-preview-list {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.chat-preview-search {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  color: #91a0b9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
}

.chat-preview-list button {
  width: 100%;
  min-height: 74px;
  display: grid;
  justify-content: stretch;
  text-align: left;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  color: #eef5ff;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.chat-preview-list button.active {
  border-color: rgba(36, 213, 232, 0.65);
  background: rgba(36, 213, 232, 0.14);
}

.chat-preview-list small,
.chat-thread-head span {
  color: #9aa7bb;
}

.chat-preview-thread {
  min-width: 0;
  padding: 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 12px;
}

.chat-thread-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-thread-head strong,
.chat-thread-head span {
  display: block;
}

.chat-thread-actions {
  display: flex;
  gap: 8px;
}

.chat-thread-actions button,
.chat-call-strip button,
.chat-composer-preview button {
  min-height: 38px;
  padding: 8px 12px;
}

.chat-message-flow {
  display: grid;
  align-content: end;
  gap: 12px;
  min-height: 260px;
}

.chat-message-flow p,
.voice-note {
  width: fit-content;
  max-width: min(78%, 460px);
  margin: 0;
  padding: 12px 14px;
  border-radius: 18px;
  color: #f7fbff;
  line-height: 1.35;
}

.chat-message-flow .incoming,
.voice-note.incoming {
  background: rgba(255, 255, 255, 0.09);
  border-bottom-left-radius: 5px;
}

.chat-message-flow .outgoing {
  justify-self: end;
  background: linear-gradient(135deg, rgba(36, 213, 232, 0.38), rgba(72, 167, 255, 0.2));
  border-bottom-right-radius: 5px;
}

.voice-note {
  display: flex;
  align-items: center;
  gap: 10px;
}

.voice-note i {
  width: 74px;
  height: 18px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #24d5e8, #24d5e8 4px, transparent 4px, transparent 10px);
  opacity: 0.9;
}

.chat-call-strip,
.chat-composer-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(70, 199, 101, 0.32);
  background: rgba(70, 199, 101, 0.1);
}

.chat-call-strip span,
.chat-composer-preview span {
  color: #b7c0d1;
}

.chat-composer-preview {
  grid-template-columns: minmax(0, 1fr) auto;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.chat-mobile-preview {
  display: grid;
  place-items: center;
}

.mobile-chat-frame {
  width: min(100%, 230px);
  min-height: 500px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    #070b12;
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.04);
}

.mobile-chat-top,
.mobile-call-card {
  min-height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #f7fbff;
  font-weight: 900;
  background: rgba(72, 167, 255, 0.2);
  border: 1px solid rgba(72, 167, 255, 0.34);
}

.mobile-chat-frame p {
  margin: 0;
  padding: 11px 13px;
  border-radius: 17px;
  color: #f7fbff;
}

.mobile-chat-frame .incoming {
  justify-self: start;
  background: rgba(255, 255, 255, 0.09);
}

.mobile-chat-frame .outgoing {
  justify-self: end;
  background: rgba(36, 213, 232, 0.28);
}

.mobile-call-card {
  margin-top: 100px;
  min-height: 80px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(70, 199, 101, 0.28), rgba(36, 213, 232, 0.15));
}

body.theme-light .chat-copy-panel,
body.theme-light .chat-feature-list li {
  color: #172033;
  background: rgba(248, 250, 252, 0.94);
  border-color: rgba(15, 23, 42, 0.12);
}

body.theme-light .chat-health-row span,
body.theme-light .chat-health-row small {
  color: #075985;
  background: rgba(14, 165, 233, 0.12);
}

body.theme-light .chat-preview-panel {
  color: #f7fbff;
}

body.theme-light .chat-feature-list span {
  color: #475569;
}

.qr {
  aspect-ratio: 1;
  border-radius: 8px;
  background: #ffffff;
  color: #111;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 8px;
  place-items: center;
  padding: 12px;
  text-align: center;
  font-weight: 900;
  min-width: 210px;
}

.qr small {
  background: #eef4ff;
  border-radius: 6px;
  padding: 4px;
  font-size: 11px;
}

.download-qr {
  width: min(180px, 100%);
  height: auto;
  border-radius: 4px;
  background: #fff;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.policy-grid article {
  padding: 24px;
}

footer {
  display: flex;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 80px);
  color: #d9deea;
  flex-wrap: wrap;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(0, 0, 0, 0.22);
}

footer span {
  font-weight: 900;
  margin-right: auto;
  color: transparent;
  background: linear-gradient(135deg, #24d5e8, #e948a8 52%, #ffae30);
  -webkit-background-clip: text;
  background-clip: text;
}

footer a {
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
}

dialog {
  border: 0;
  background: transparent;
  width: min(94vw, 480px);
}

#info-dialog {
  width: min(94vw, 860px);
}

.info-card {
  position: relative;
  width: 100%;
  padding-top: 24px;
}

.info-card .close {
  position: absolute;
  top: 14px;
  right: 14px;
  margin: 0;
}

.info-card .eyebrow,
.info-card h2 {
  padding-right: 46px;
}

#info-dialog-body {
  display: grid;
  gap: 14px;
  color: #d8deea;
}

#info-dialog-body .legal-list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 12px;
  line-height: 1.55;
}

#info-dialog-body .support-list {
  display: grid;
  gap: 10px;
  line-height: 1.5;
  min-width: 0;
}

#info-dialog-body .support-list a {
  display: block;
  width: fit-content;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.34);
}

#info-dialog-body .install-guide-list {
  display: grid;
  gap: 12px;
}

#info-dialog-body .install-guide-list article {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}

#info-dialog-body .install-guide-list strong {
  color: #f7fbff;
}

#info-dialog-body .install-guide-list ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  line-height: 1.45;
}

#info-dialog-body p {
  margin: 0;
}

body.theme-light #info-dialog-body,
body.theme-light #info-dialog-body .legal-list,
body.theme-light #info-dialog-body p {
  color: #172033;
}

body.theme-light #info-dialog-body .legal-list strong {
  color: #0f172a;
}

body.theme-light .download-help-button {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.32);
  color: #075985;
}

body.theme-light #info-dialog-body .install-guide-list article {
  background: rgba(248, 250, 252, 0.96);
  border-color: rgba(15, 23, 42, 0.12);
}

body.theme-light #info-dialog-body .install-guide-list strong {
  color: #172033;
}

.support-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.support-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}

.support-card span {
  color: #9aa4b5;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.support-card a,
.support-card strong {
  color: #f1f5f9;
  font-weight: 900;
}

body.theme-light .support-card {
  color: #172033;
  background: rgba(248, 250, 252, 0.96);
  border-color: rgba(15, 23, 42, 0.12);
}

body.theme-light .support-card span {
  color: #64748b;
}

body.theme-light .support-card a,
body.theme-light .support-card strong {
  color: #172033;
}

.client-auth-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.client-auth-user {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}

.client-auth-user span,
.client-auth-note {
  color: var(--muted);
}

.client-auth-user strong {
  font-size: clamp(1.1rem, 3vw, 1.45rem);
}

.client-auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.client-auth-note {
  line-height: 1.45;
}

body.theme-light .client-auth-user {
  color: #172033;
  background: rgba(248, 250, 252, 0.96);
  border-color: rgba(15, 23, 42, 0.12);
}

body.theme-light .client-auth-user span,
body.theme-light .client-auth-note {
  color: #475569;
}

.continue-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.continue-options .button,
.continue-options button {
  width: auto;
}

.flutter-preview-frame {
  border: 0;
  background: #05070b;
}

.auth-card {
  position: relative;
  padding: clamp(16px, 3vw, 22px);
  padding-top: clamp(26px, 4vw, 34px);
  display: grid;
  gap: 10px;
  max-height: 90vh;
  overflow: auto;
}

.auth-card h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
}

.auth-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.close {
  position: absolute;
  top: 12px;
  right: 12px;
  justify-self: auto;
  background: transparent;
  color: #fff;
  padding: 0;
  width: 34px;
  min-height: 34px;
  border-radius: 999px;
}

body.theme-light .close {
  color: #172033;
}

.auth-card h2,
.auth-card > p {
  padding-right: 42px;
}

input,
select {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #050505;
  color: #fff;
  padding: 13px 16px;
  font: inherit;
}

body.theme-light input,
body.theme-light select {
  color: #172033;
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.18);
}

body.theme-light .module-tools input {
  background: #ffffff;
}

body.theme-light .close {
  color: #172033;
}

body.theme-light .provider-help {
  color: #1e3a8a;
  background: rgba(59, 130, 246, 0.1);
}

.provider-help {
  border: 1px solid rgba(72, 167, 255, 0.45);
  background: rgba(72, 167, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  color: #dbeaff;
  line-height: 1.45;
}

.provider-help input,
.provider-help button {
  margin-top: 10px;
}

.auth-provider-stack {
  display: grid;
  gap: 10px;
}

.auth-provider-stack input,
.auth-provider-stack button {
  margin-top: 0;
}

#auth-next,
#profile-next {
  display: grid;
  gap: 10px;
}

#auth-next[hidden],
#profile-next[hidden],
.provider-help[hidden],
.account-strip[hidden],
.dashboard-account[hidden] {
  display: none;
}

.or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: #aaa;
}

.or::before,
.or::after {
  content: '';
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
}

#password-checks {
  margin: 0;
  padding-left: 18px;
  color: #c5c9d2;
}

#password-checks .ok {
  color: #77f39a;
}

#auth-message {
  color: #9db5ff;
  min-height: 1.4em;
}

@media (max-width: 1050px) {
  .hero,
  .capsule-layout,
  .preview-main,
  .download,
  .chat-showcase-grid,
  .chat-preview-panel,
  .policy-grid,
  .module-cloud,
  .setup-grid,
  .face-grid {
    grid-template-columns: 1fr;
  }

  .capsule-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }
}

@media (max-width: 720px) {
  nav {
    display: none;
  }

  .hero-status,
  .demo-grid,
  .chat-preview-shell,
  .chat-call-strip,
  .dashboard-account,
  .account-grid,
  .capsule-list,
  .real-device-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(64px, 25vw, 110px);
  }

  .hero-console {
    min-height: 320px;
  }

  button,
  .button {
    width: 100%;
  }

  .topbar {
    gap: 10px;
  }

  .hero,
  .capsule-studio,
  .capability-band,
  .download,
  .band,
  .policy-grid {
    padding-left: 14px;
    padding-right: 14px;
  }

  .download {
    margin-left: 14px;
    margin-right: 14px;
  }

  .chat-preview-panel {
    padding: 12px;
  }

  .mobile-preview-rotate-hint {
    display: block;
  }

  .flutter-chat-preview-panel {
    min-height: 620px;
  }

  .chat-flutter-shell {
    min-height: 590px;
  }

  .chat-preview-shell {
    min-height: 560px;
  }

  .chat-preview-list {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    grid-template-columns: 1fr;
  }

  .chat-thread-head,
  .chat-thread-actions,
  .chat-install-toast {
    grid-template-columns: 1fr;
  }

  .chat-thread-head,
  .chat-thread-actions {
    align-items: stretch;
  }

  .chat-install-toast {
    left: 12px;
    right: 12px;
  }

  .chat-mobile-preview {
    display: none;
  }

  .assistant-orb {
    gap: 7px;
  }

  .assistant-orb i {
    width: 28px;
    height: 76px;
  }

  .preview-actions,
  .actions {
    align-items: stretch;
  }

  .account-strip,
  .dashboard-account {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .capsule-visual,
  #capsule-image {
    height: auto;
    min-height: 420px;
  }

  .flutter-preview-frame {
    min-height: 560px;
  }

  .capsule-visual.flutter-frame {
    min-height: 600px;
    grid-template-rows: minmax(560px, 1fr);
  }

  .phone-frame {
    width: 100%;
  }

  .platform-tabs {
    width: 100%;
  }

  .platform-tabs button {
    width: 50%;
  }

  .module-tools {
    grid-template-columns: 1fr;
  }

  .file-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) and (orientation: portrait) {
  .capsule-visual.flutter-frame {
    min-height: min(760px, calc(100vw * 2.02));
    grid-template-rows: 1fr;
  }

  .capsule-visual.flutter-frame.phone-frame {
    min-height: min(760px, calc(100vw * 2.02));
    grid-template-rows: 1fr;
  }

  .capsule-visual.flutter-frame .flutter-preview-frame {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(760px, calc(100vh - 118px));
    height: calc(100vw - 28px);
    min-height: 0;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center;
  }

  .flutter-chat-preview-panel {
    min-height: min(780px, calc(100vw * 2.08));
  }

  .chat-flutter-shell {
    min-height: min(760px, calc(100vw * 2.02));
  }

  .chat-flutter-frame {
    left: 50%;
    top: 50%;
    width: min(760px, calc(100vh - 118px));
    height: calc(100vw - 28px);
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center;
  }
}
