html { height: 100%; }
/* Assistant page: site chrome + embedded chat + PWA install. */

body.assistant {
  padding-bottom: 0;
  height: 100%;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg, #050505);
}

body.assistant .buy-bar { display: none !important; }

body.assistant .site-header {
  flex: none;
}

body.assistant .header-cta { display: none; }
@media (min-width: 900px) {
  body.assistant .header-cta { display: inline-flex; }
}

.bot-app {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  border-inline: 1px solid var(--line, rgba(243, 244, 246, 0.09));
  background: linear-gradient(180deg, rgba(12, 14, 19, 0.65), rgba(8, 9, 12, 0.2));
}

body.assistant .bot-header {
  position: relative;
  top: auto;
  flex: none;
  z-index: 2;
}

body.assistant .bot-header .logo { display: none; }

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

#install-sheet {
  position: fixed;
  z-index: 80;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 440px;
  margin-inline: auto;
  background: var(--surface, #12141b);
  color: var(--text, #f3f4f7);
  border: 1px solid var(--line-strong, rgba(243,244,246,0.16));
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  padding: 16px;
}
#install-sheet[hidden] { display: none !important; }
#install-sheet h3 { margin: 0 0 8px; font-family: var(--font-display, inherit); }
#install-sheet p, #install-sheet li { font-size: 0.92rem; color: var(--text-dim, #a7adb8); }
#install-sheet ol { margin: 0.4em 0 0.8em; padding-left: 1.2em; }
#install-sheet .btn { width: 100%; margin-top: 6px; min-height: 44px; }

@media (display-mode: standalone), (display-mode: fullscreen) {
  body.assistant .site-nav,
  body.assistant .nav-toggle,
  body.assistant .header-cta { display: none !important; }
  body.assistant .bot-header { top: 0; }
}
html.standalone-preview body.assistant .site-nav,
html.standalone-preview body.assistant .nav-toggle,
html.standalone-preview body.assistant .header-cta,
html.standalone-preview #install-btn { display: none !important; }
html.standalone-preview body.assistant .bot-header { top: 0; }

@media (max-width: 480px) {
  #install-btn { font-size: 0.72rem; padding: 0 8px; max-width: 46vw; white-space: normal; line-height: 1.15; min-height: 40px; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.assistant .bot-footer { display: none; }

body.assistant .site-header {
  background: rgba(5, 5, 5, 0.88);
  border-bottom-color: rgba(200, 255, 0, 0.15);
}
#install-btn {
  background: #c8ff00;
  color: #111;
  border: 2px solid #111;
  box-shadow: 2px 2px 0 #ff3cac;
  font-weight: 800;
}
#install-btn:hover { background: #e8ff6a; }
#install-sheet { border-color: rgba(200, 255, 0, 0.3); }
#install-sheet .btn-primary, #install-close.btn {
  background: #c8ff00;
  color: #111;
  border-radius: 999px;
  font-weight: 800;
}
.lock-card {
  border-color: rgba(200, 255, 0, 0.35) !important;
  background: linear-gradient(180deg, rgba(200, 255, 0, 0.12), transparent 70%), #1a1a1a !important;
}
.lock-card .btn-primary {
  background: #c8ff00;
  color: #111;
  animation: pulse-glow 2.6s ease-in-out infinite;
}

body.assistant.is-ctm-follow .site-header {
  display: none;
}
body.assistant.is-ctm-follow .bot-app {
  max-width: none;
  margin: 0;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
}

@media (max-width: 899px) {
  #open-beside-header { display: none !important; }
}
body.assistant.is-ctm-follow #open-beside-note {
  flex: none;
}
