/**
 * Welcome Chat - ChatGPT/Claude-style layout
 * Left sidebar (desktop) / Hamburger flyout (mobile) + right chat area
 */

/* Hide base hamburger and slide menu on welcome-chat page */
body.welcome-chat-page .hamburger-menu,
body.welcome-chat-page .slide-menu {
  display: none !important;
}

/* Prevent body scroll - layout fills viewport */
body.welcome-chat-page {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

body.welcome-chat-page main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Main layout - fills main so input bar stays visible */
.welcome-chat-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* Left sidebar - constrained to layout, scrolls internally when accordions expand */
/* Styled to match slide-menu: light cream, earthy gradient header */
.welcome-chat-sidebar {
  width: 260px;
  min-width: 260px;
  height: 100%;
  min-height: 0;
  background: #f5f5f0;
  color: #374151;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.3s ease, visibility 0.3s;
}

.welcome-chat-sidebar-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #8b9d83 0%, #a67c52 100%);
  flex-shrink: 0;
}

.welcome-chat-sidebar-header a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.welcome-chat-sidebar-header-tagline {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  font-style: italic;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.01em;
}

.welcome-chat-sidebar-content {
  flex: 1;
  padding: 0.75rem 0;
  overflow-y: auto;
  background-color: #f5f5f0;
}

.welcome-chat-sidebar-section {
  margin-bottom: 0.5rem;
}

.welcome-chat-sidebar-section-header {
  padding: 0.5rem 1.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.welcome-chat-sidebar-section-header:hover {
  background-color: #e8e8e0;
  color: #495057;
}

.welcome-chat-sidebar-section-header.accordion-toggle::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-left: auto;
  font-size: 0.65rem;
  color: #374151;
  transition: transform 0.2s;
}

.welcome-chat-sidebar-section-header.expanded::after {
  transform: rotate(180deg);
}

/* Top-level accordion headers need stronger separation from nested toggles/items */
.welcome-chat-sidebar-content > .welcome-chat-sidebar-section > .welcome-chat-sidebar-section-header.accordion-toggle {
  margin: 0 0.55rem;
  padding: 0.56rem 0.8rem;
  border: 1px solid rgba(139, 157, 131, 0.34);
  border-left: 3px solid #8b9d83;
  border-radius: 0.5rem;
  background: linear-gradient(180deg, rgba(139, 157, 131, 0.14) 0%, rgba(166, 124, 82, 0.1) 100%);
  color: #2f3b2f;
  font-weight: 600;
}

.welcome-chat-sidebar-content > .welcome-chat-sidebar-section > .welcome-chat-sidebar-section-header.accordion-toggle::after {
  color: #2f3b2f;
}

.welcome-chat-sidebar-content > .welcome-chat-sidebar-section > .welcome-chat-sidebar-section-header.accordion-toggle:hover {
  background: linear-gradient(180deg, rgba(139, 157, 131, 0.2) 0%, rgba(166, 124, 82, 0.16) 100%);
  border-color: rgba(139, 157, 131, 0.5);
  color: #233023;
}

.welcome-chat-sidebar-content > .welcome-chat-sidebar-section > .welcome-chat-sidebar-section-header.accordion-toggle.expanded {
  background: linear-gradient(180deg, rgba(139, 157, 131, 0.24) 0%, rgba(166, 124, 82, 0.18) 100%);
  border-color: rgba(139, 157, 131, 0.58);
}

.welcome-chat-sidebar-item {
  display: block;
  padding: 0.6rem 1.25rem;
  color: #374151;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.welcome-chat-sidebar-item:hover {
  background-color: #e8e8e0;
  color: #212529;
}

.welcome-chat-sidebar-item i {
  width: 1.25rem;
  margin-right: 0.5rem;
  opacity: 0.8;
}

.welcome-chat-sidebar-item.speaker-available {
  cursor: pointer;
}

.welcome-chat-sidebar-submenu {
  display: none;
  padding-left: 0.5rem;
}

.welcome-chat-sidebar-submenu.expanded {
  display: block;
}

.welcome-chat-tradition-group .welcome-chat-speakers-submenu {
  display: none;
}

.welcome-chat-tradition-group .welcome-chat-speakers-submenu.expanded {
  display: block;
}

.welcome-chat-speakers-submenu .welcome-chat-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.welcome-chat-sidebar-submenu-nested-item {
  padding-left: 2rem;
  font-size: 0.86rem;
}

.welcome-chat-sidebar-dynamic-list {
  margin-top: 0.2rem;
}

.welcome-chat-sidebar-dynamic-label {
  padding: 0.35rem 1.25rem 0.25rem 2rem;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

.welcome-chat-sidebar-load-more {
  display: block;
  width: calc(100% - 3.25rem);
  margin: 0.15rem 1.25rem 0.35rem 2rem;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: var(--accent-color, #687c5f);
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
}

.welcome-chat-sidebar-load-more:hover,
.welcome-chat-sidebar-load-more:focus-visible {
  color: var(--primary-color, #34495e);
  text-decoration: underline;
}

.welcome-chat-sidebar-coin {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-chat-sidebar-coin-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.welcome-chat-sidebar-coin-fallback {
  display: none;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
}

.welcome-chat-sidebar-coin-fallback i {
  width: 1.25rem;
  margin-right: 0;
  opacity: 0.8;
}

.welcome-chat-sidebar-footer {
  flex-shrink: 0;
  border-top: 1px solid #e8e8e0;
  background-color: #f0f0eb;
  font-size: 0.7rem;
  color: #6b7280;
}

.welcome-chat-sidebar-footer-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.welcome-chat-sidebar-footer-title::-webkit-details-marker {
  display: none;
}

.welcome-chat-sidebar-footer-title::after {
  content: '\f078';
  margin-left: auto;
  font-family: 'Font Awesome 6 Free';
  font-size: 0.65rem;
  font-weight: 900;
  transition: transform 0.2s ease;
}

.welcome-chat-sidebar-footer[open] .welcome-chat-sidebar-footer-title::after {
  transform: rotate(180deg);
}

.welcome-chat-sidebar-footer-title:hover {
  background-color: #e8e8e0;
}

.welcome-chat-sidebar-footer-title:focus-visible {
  outline: 2px solid #687c5f;
  outline-offset: -2px;
}

.welcome-chat-sidebar-footer-details {
  padding: 0 1rem 0.5rem;
}

.welcome-chat-sidebar-footer-tagline {
  font-size: 0.62rem;
  font-weight: 400;
  font-style: italic;
  color: #7c8494;
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.welcome-chat-sidebar-footer-subtitle {
  font-size: 0.65rem;
  color: #6b7280;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.welcome-chat-sidebar-footer-links {
  font-size: 0.6rem;
  margin-bottom: 0.25rem;
}

.welcome-chat-sidebar-footer-links a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s ease;
}

.welcome-chat-sidebar-footer-links a:hover {
  color: #374151;
  text-decoration: underline;
}

.welcome-chat-sidebar-footer-copyright {
  font-size: 0.6rem;
  color: #9ca3af;
}

/* Mobile hamburger for welcome chat */
.welcome-chat-hamburger {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  left: auto;
  z-index: 2002;
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Right chat area - flex column with scrollable messages, fixed input bar */
.welcome-chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--chat-bg, #f5f5f5);
}

/* Legacy standalone welcome_chat.html only (not app_welcome / app_shell) */
body.welcome-chat-page .welcome-chat-banner {
  flex-shrink: 0;
  height: 140px;
  min-height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
}

body.welcome-chat-page .welcome-chat-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
}

body.welcome-chat-page .welcome-chat-banner-content {
  position: absolute;
  bottom: 1rem;
  left: 1.5rem;
  right: 1.5rem;
  color: #fff;
  font-weight: 600;
  font-size: 1.25rem;
}

/* Chat messages area - scrolls independently (legacy template) */
body.welcome-chat-page .welcome-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Logged-in-only chrome not used on anonymous welcome; hide if ever present */
.anonymous-welcome-chat .help-icon,
.anonymous-welcome-chat .export-chat-icon,
.anonymous-welcome-chat .delete-chat-icon,
.anonymous-welcome-chat .bio-chat-icon,
.anonymous-welcome-chat .play-button-overlay {
  display: none !important;
}

/* Landing (all users): no speaker banner chrome on / until chat starts */
body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .welcome-chat-speaker-chrome {
  display: none !important;
}

/* Welcome landing page: subtle depth + warmth (app_welcome.html body modifier) */
body.welcome-landing-page {
  position: relative;
}

body.welcome-landing-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 85% 65% at 50% 35%, rgba(255, 252, 248, 0.97) 0%, rgba(245, 240, 232, 0.92) 55%, rgba(228, 222, 210, 0.88) 100%);
}

body.welcome-landing-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.welcome-landing-page .welcome-chat-layout {
  position: relative;
  z-index: 1;
}

/* Anonymous app landing: DiF story + name (app_welcome.html) */
.anonymous-welcome-chat #welcomeChatLanding {
  display: block;
}

/* Centered shell: ~1180px on desktop so landing content can breathe horizontally */
.anonymous-welcome-chat .anonymous-welcome-main {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12px;
  padding-right: 12px;
}

.anonymous-welcome-landing {
  --aw-warm: #a67c52;
  --aw-warm-light: #c4a574;
  --aw-green: #4a7d56;
  --aw-green-hover: #3d6b48;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  background: linear-gradient(180deg, rgba(139, 157, 131, 0.12) 0%, rgba(250, 247, 242, 0.98) 100%);
  border: 1px solid rgba(139, 157, 131, 0.32);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(45, 42, 38, 0.06);
}

.anonymous-welcome-landing--enter {
  animation: anonymousWelcomeLandingEnter 0.75s ease-out both;
}

@keyframes anonymousWelcomeLandingEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .anonymous-welcome-landing--enter {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Hero: wide cinematic band (~16:6); clamp height so desktop stays wide, not vertically squished */
.anonymous-welcome-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 180px;
  max-height: 200px;
  aspect-ratio: 16 / 6;
}

.anonymous-welcome-hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  border-radius: 12px 12px 0 0;
}

/* Legibility: darker at top (title), medium mid, soft/light bottom — photo stays visible */
.anonymous-welcome-hero-overlay {
  position: absolute;
  inset: 0;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(
    180deg,
    rgba(8, 6, 5, 0.84) 0%,
    rgba(16, 13, 11, 0.58) 28%,
    rgba(32, 27, 22, 0.32) 55%,
    rgba(252, 249, 244, 0.38) 82%,
    rgba(252, 249, 244, 0.82) 100%
  );
  pointer-events: none;
}

.anonymous-welcome-hero-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  text-align: center;
  flex: 1 1 auto;
  min-height: 0;
}

/* Light headline/subline over dark overlay (H1 in template) */
.anonymous-welcome-landing-title {
  font-size: clamp(1.85rem, 2.6vw, 2.4rem);
  font-weight: 500;
  text-align: center;
  margin: 0 0 0.5rem;
  color: #fdfaf6;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
}

.anonymous-welcome-landing-lead {
  font-size: clamp(0.94rem, 1.25vw, 1.06rem);
  line-height: 1.45;
  color: rgba(252, 250, 246, 0.94);
  margin: 0 auto;
  text-align: center;
  max-width: 36ch;
  font-weight: 400;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.anonymous-welcome-landing-lead strong {
  color: #fff;
  font-weight: 600;
}

@media (max-width: 767.98px) {
  /* Narrow viewports: fixed height reads better than extreme letterboxing */
  .anonymous-welcome-hero {
    aspect-ratio: auto;
    max-height: none;
    min-height: 200px;
    height: clamp(200px, 48vw, 280px);
  }

  .anonymous-welcome-hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(8, 6, 5, 0.88) 0%,
      rgba(18, 15, 12, 0.62) 50%,
      rgba(28, 24, 20, 0.48) 100%
    );
  }
}

/* Quick-action strip: welcome row + two CTAs between hero and voices marquee */
.anonymous-welcome-quick-cards {
  margin: 0;
  border-top: 1px solid rgba(139, 157, 131, 0.22);
  background: rgba(252, 249, 244, 0.55);
}

.anonymous-welcome-quick-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  max-width: 100%;
}

@media (min-width: 768px) {
  .anonymous-welcome-quick-cards-grid--two {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    align-items: stretch;
  }
}

.anonymous-welcome-quick-card {
  padding: 1rem 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(139, 157, 131, 0.28);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(45, 42, 38, 0.05);
}

.anonymous-welcome-quick-card--journal {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.anonymous-welcome-quick-journal-actions {
  display: grid;
  gap: 0.55rem;
  width: 100%;
}

.anonymous-welcome-quick-card--journal .anonymous-welcome-quick-journal-label {
  margin: 0;
  padding: 0.5rem 0 !important;
  font-style: normal;
}

.anonymous-welcome-quick-name-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.anonymous-welcome-quick-name-row .form-control {
  flex: 1 1 8rem;
  min-width: 0;
}

.anonymous-welcome-quick-name-row .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.anonymous-welcome-quick-greeting {
  font-size: 1.05rem;
  line-height: 1.45;
  color: #2d2a26;
  font-weight: 500;
}

.anonymous-welcome-quick-journal-btn {
  font-weight: 600;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.anonymous-welcome-quick-journal-btn--new {
  color: #fff;
  background: linear-gradient(90deg, #79986f 0%, #b28a5f 100%);
  border: 1px solid rgba(122, 145, 112, 0.6);
}

.anonymous-welcome-quick-journal-btn--new:hover,
.anonymous-welcome-quick-journal-btn--new:focus-visible {
  color: #fff;
  background: linear-gradient(90deg, #6d8b63 0%, #a67d52 100%);
  border-color: rgba(109, 139, 99, 0.72);
}

.anonymous-welcome-quick-journal-btn--entries {
  color: #3f5d47;
  background: rgba(121, 152, 111, 0.14);
  border: 1px solid rgba(121, 152, 111, 0.46);
}

.anonymous-welcome-quick-journal-btn--entries:hover,
.anonymous-welcome-quick-journal-btn--entries:focus-visible {
  color: #2f4b36;
  background: rgba(121, 152, 111, 0.22);
  border-color: rgba(93, 123, 83, 0.54);
}

.anonymous-welcome-quick-journal-btn--collections {
  color: #735d45;
  background: rgba(178, 138, 95, 0.14);
  border: 1px solid rgba(178, 138, 95, 0.48);
}

.anonymous-welcome-quick-journal-btn--collections:hover,
.anonymous-welcome-quick-journal-btn--collections:focus-visible {
  color: #5f4b36;
  background: rgba(178, 138, 95, 0.22);
  border-color: rgba(150, 114, 74, 0.56);
}

.anonymous-welcome-quick-talk-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--aw-warm, #a67c52);
  margin: 0 0 0.6rem;
  text-align: center;
}

.anonymous-welcome-talk-greeting {
  margin: 0 auto 0.9rem;
  max-width: 100%;
  text-align: left;
}

.anonymous-welcome-talk-greeting #welcomeQuickGuestForm {
  text-align: left;
}

.anonymous-welcome-talk-greeting #welcomeQuickGuestForm .anonymous-welcome-quick-name-row {
  display: block;
}

.anonymous-welcome-talk-greeting #welcomeQuickGuestForm .anonymous-welcome-quick-name-row .form-control {
  width: 100%;
}

.anonymous-welcome-talk-greeting #welcomeQuickGuestForm .anonymous-welcome-quick-name-row .btn {
  margin-top: 0.5rem;
  width: 100%;
}

.anonymous-welcome-talk-greeting .anonymous-welcome-quick-greeting {
  font-size: clamp(1.02rem, 1.25vw, 1.16rem);
  line-height: 1.45;
}

.anonymous-welcome-talk-greeting .anonymous-welcome-talk-bubble {
  max-width: 100%;
  margin: 0;
  text-align: left;
}

.anonymous-welcome-talk-greeting .anonymous-welcome-talk-bubble .message-content {
  white-space: normal;
}

.anonymous-welcome-talk-bubble-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.anonymous-welcome-talk-speaker-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  color: #2d2a26;
  text-align: center;
}

.anonymous-welcome-talk-speaker-identity strong {
  font-size: 1.05rem;
  line-height: 1.25;
}

.anonymous-welcome-quick-coin-wrap--inline {
  flex: 0 0 auto;
  margin-top: 0.1rem;
}

.anonymous-welcome-quick-coin-wrap--inline .anonymous-welcome-quick-coin-img {
  width: 92px;
  height: 92px;
}

.anonymous-welcome-quick-talk-greeting .chat-bubble,
.anonymous-welcome-talk-greeting .chat-bubble {
  flex: 1 1 auto;
}

.anonymous-welcome-quick-card--talk-clickable {
  cursor: pointer;
}

@media (max-width: 767.98px) {
  .anonymous-welcome-talk-bubble-row {
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
  }

  .anonymous-welcome-talk-greeting .chat-bubble {
    width: 100%;
  }
}

.anonymous-welcome-quick-talk-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #2d2a26;
  gap: 0.5rem;
}

.anonymous-welcome-quick-talk-link:hover {
  color: var(--aw-green-hover, #3d6b48);
}

.anonymous-welcome-quick-coin-wrap {
  display: block;
  line-height: 0;
}

.anonymous-welcome-quick-coin-img {
  width: 125px;
  height: 125px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(139, 157, 131, 0.35);
  box-shadow: 0 2px 8px rgba(45, 42, 38, 0.08);
}

.anonymous-welcome-landing-body {
  padding: 0.9rem 1rem 1.1rem;
}

/* Desktop: slightly tighter vertical rhythm so more fits above the fold */
@media (min-width: 992px) {
  .anonymous-welcome-landing-body {
    padding: 0.85rem 1.15rem 1rem;
  }

  .anonymous-welcome-why {
    margin-top: 1rem;
    padding: 1rem 0.95rem 1.1rem;
  }

  .anonymous-welcome-voices {
    margin-top: 1rem;
  }

  .anonymous-welcome-chat #welcomeChatLanding .welcome-chat-name-prompt {
    margin-top: 1.35rem;
    padding-top: 1.5rem;
  }

  .anonymous-welcome-chat .welcome-chat-name-prompt {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }

  /* Landing only — do not shrink bottom padding when chat is active (input bar is position:absolute) */
  .anonymous-welcome-chat:not(.welcome-chat-started) .chat-window-container > .card-body.chat-messages {
    padding: 1rem 1.2rem !important;
  }

  .anonymous-welcome-landing-card {
    padding: 0.92rem 1.05rem;
  }
}

.anonymous-welcome-education {
  display: grid;
  gap: 0.65rem;
}

.anonymous-welcome-detail {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(139, 157, 131, 0.28);
  border-radius: 8px;
  box-shadow: 0 1px 8px rgba(30, 27, 24, 0.04);
  overflow: hidden;
}

.anonymous-welcome-detail[open] {
  background: #fff;
  border-color: rgba(166, 124, 82, 0.42);
}

.anonymous-welcome-detail summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  color: #2d2a26;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  list-style: none;
}

.anonymous-welcome-detail summary::-webkit-details-marker {
  display: none;
}

.anonymous-welcome-detail summary::after {
  content: "\f078";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: #8a6a48;
  font-size: 0.78rem;
  transition: transform 0.2s ease;
}

.anonymous-welcome-detail[open] summary::after {
  transform: rotate(180deg);
}

.anonymous-welcome-detail summary span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.anonymous-welcome-detail summary i {
  color: var(--aw-warm, #a67c52);
}

.anonymous-welcome-detail-body {
  padding: 0 0.95rem 0.95rem;
}

.anonymous-welcome-detail-body--flush {
  padding-left: 0;
  padding-right: 0;
}

.anonymous-welcome-detail-body p {
  color: #4a4540;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 0.75rem;
}

.anonymous-welcome-detail-link {
  color: var(--aw-green, #4a7d56);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.anonymous-welcome-detail-link:hover,
.anonymous-welcome-detail-link:focus-visible {
  color: var(--aw-green-hover, #3d6b48);
  text-decoration: underline;
}

.anonymous-welcome-landing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 768px) {
  /* Two-up row on tablet+ — less vertical stacking on desktop */
  .anonymous-welcome-landing-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.95rem;
  }

  .anonymous-welcome-landing-card-wide {
    grid-column: 1 / -1;
  }

  .anonymous-welcome-landing-card--journal {
    transform: scale(1.02);
    transform-origin: center top;
  }
}

@media (prefers-reduced-motion: reduce) {
  .anonymous-welcome-landing-card--journal {
    transform: none;
  }
}

.anonymous-welcome-landing-card {
  display: flow-root;
  background: #fff;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 2px 10px rgba(30, 27, 24, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.anonymous-welcome-landing-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.anonymous-welcome-landing-card-link:focus-visible {
  outline: 3px solid rgba(74, 125, 86, 0.45);
  outline-offset: 3px;
  border-radius: 12px;
}

.anonymous-welcome-landing-card:not(.anonymous-welcome-landing-card--journal):hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(30, 27, 24, 0.12);
}

.anonymous-welcome-landing-card--journal {
  border-color: rgba(166, 124, 82, 0.45);
  box-shadow: 0 3px 14px rgba(166, 124, 82, 0.12), 0 2px 10px rgba(30, 27, 24, 0.06);
}

.anonymous-welcome-landing-card--journal:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(166, 124, 82, 0.18), 0 6px 18px rgba(30, 27, 24, 0.1);
}

@media (min-width: 768px) {
  .anonymous-welcome-landing-card--journal:hover {
    transform: translateY(-3px) scale(1.02);
  }
}

.anonymous-welcome-landing-card-eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--aw-warm);
  margin: 0 0 0.45rem;
}

.anonymous-welcome-landing-card-icon {
  float: right;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7a8f72 0%, var(--aw-warm) 100%);
  color: #fff;
  font-size: 0.95rem;
  margin: 0 0 0.55rem 0.75rem;
  transition: transform 0.25s ease;
}

.anonymous-welcome-landing-card--journal .anonymous-welcome-landing-card-icon {
  background: linear-gradient(135deg, #8f7a62 0%, #c4a574 55%, #a67c52 100%);
}

.anonymous-welcome-landing-card--models .anonymous-welcome-landing-card-icon {
  background: linear-gradient(135deg, #7a6a58 0%, #a67c52 55%, #8b7355 100%);
}

.anonymous-welcome-landing-card:hover .anonymous-welcome-landing-card-icon {
  transform: scale(1.05) rotate(1deg);
}

@media (prefers-reduced-motion: reduce) {
  .anonymous-welcome-landing-card:hover .anonymous-welcome-landing-card-icon {
    transform: none;
  }
}

.anonymous-welcome-landing-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 0.4rem;
}

.anonymous-welcome-landing-card-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #4a5568;
  margin: 0;
}

.anonymous-welcome-landing-card-text + .anonymous-welcome-landing-card-text {
  margin-top: 0.65rem;
}

.anonymous-welcome-why {
  margin-top: 1.35rem;
  padding: 1.25rem 1rem 1.35rem;
  background: rgba(237, 232, 224, 0.55);
  border-radius: 10px;
  text-align: center;
}

.anonymous-welcome-why-divider {
  height: 1px;
  margin: 0 0 1.1rem;
  background: linear-gradient(90deg, transparent, rgba(166, 124, 82, 0.35), transparent);
}

.anonymous-welcome-why-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #2d2824;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}

.anonymous-welcome-why-text {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #4a4540;
  margin: 0 auto;
  max-width: 46ch;
}

.anonymous-welcome-why-text strong {
  color: #3a3630;
  font-weight: 600;
}

.anonymous-welcome-voices {
  margin: 1rem auto 0;
  text-align: center;
  background: #fff;
  border-radius: 10px;
  padding: 1.25rem 0;
  border: 1px solid rgb(165 130 64 / 83%);
  box-shadow: 0 2px 10px rgba(30, 27, 24, 0.07);
  width: 97%;
}

.anonymous-welcome-detail .anonymous-welcome-voices {
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(166, 124, 82, 0.18);
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  padding: 0.95rem 0 0.85rem;
}

.anonymous-welcome-voices-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2d2824;
  margin: 0 0 0.85rem;
}

.anonymous-welcome-voices-marquee {
  --voices-gap: 0.65rem;
  width: 100%;
  overflow: hidden;
  padding: 0.25rem;
  margin: 0;
}

.anonymous-welcome-voices-strip {
  list-style: none;
  padding: 15px 0;
  margin: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: var(--voices-gap);
  width: max-content;
  overflow-y: hidden;
  animation: anonymousWelcomeVoicesMarquee 62s linear infinite;
  will-change: transform;
}

.anonymous-welcome-voices-item {
  flex: 0 0 auto;
}

.anonymous-welcome-voices-coin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 10px rgba(40, 36, 32, 0.12);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  background: #f5f2ed;
}

button.anonymous-welcome-voices-coin {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

.anonymous-welcome-voices-coin:hover {
  box-shadow: 0 4px 18px rgba(166, 124, 82, 0.35), 0 2px 12px rgba(40, 36, 32, 0.15);
  transform: translateY(-2px);
}

.anonymous-welcome-voices-coin-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.anonymous-welcome-voices-coin-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #8a8278;
  font-size: 1.25rem;
}

.anonymous-welcome-voices-caption {
  font-size: 0.8rem;
  color: #6b6560;
  margin: 0;
  letter-spacing: 0.02em;
}

@keyframes anonymousWelcomeVoicesMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - (var(--voices-gap) / 2)));
  }
}

.anonymous-welcome-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.anonymous-welcome-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .anonymous-welcome-voices-marquee {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(129, 116, 99, 0.55) transparent;
  }

  .anonymous-welcome-voices-strip {
    animation: none;
    transform: none;
  }

  .anonymous-welcome-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.welcome-chat-name-prompt {
  max-width: 440px;
  margin: 2rem auto;
  text-align: center;
}

.anonymous-welcome-chat #welcomeChatLanding .welcome-chat-name-prompt {
  border-top: 1px solid rgba(55, 65, 81, 0.12);
  margin-top: 1.75rem;
  padding-top: 2rem;
}

.welcome-chat-name-prompt h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: #333;
}

.welcome-chat-name-prompt-lead {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.welcome-chat-name-input-wrap {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  align-items: stretch;
}

.welcome-chat-name-input-wrap input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(100, 95, 88, 0.35);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.welcome-chat-name-input-wrap input:focus {
  outline: none;
  border-color: rgba(166, 124, 82, 0.65);
  box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.2), 0 0 22px rgba(166, 124, 82, 0.12);
}

.welcome-chat-name-input-wrap input.anonymous-welcome-name-has-value {
  border-color: rgba(166, 124, 82, 0.55);
}

.welcome-chat-name-hint {
  font-size: 0.82rem;
  color: #6b6560;
  margin: 0.65rem 0 0;
  line-height: 1.4;
}

.welcome-chat-name-input-wrap button {
  padding: 0.8rem 1.45rem;
  font-size: 1.02rem;
  background: var(--aw-green);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}

.welcome-chat-name-input-wrap button:hover {
  background: var(--aw-green-hover);
  transform: scale(1.02);
}

@media (prefers-reduced-motion: reduce) {
  .welcome-chat-name-input-wrap button:hover {
    transform: none;
  }
}

.welcome-chat-name-error {
  color: #c00;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* app_welcome: match chat.html bubble markup (chat.css + traditions.css); user = Christian light blue */
.anonymous-welcome-chat #welcomeChatUI {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.anonymous-welcome-chat #welcomeChatBubbles {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.anonymous-welcome-chat .chat-bubble.bubble-user {
  min-width: auto !important;
  max-width: 90%;
  background: var(--tradition-christian-secondary, #e3f2fd);
  color: var(--tradition-christian-text, #0d47a1);
  border: 1px solid rgba(25, 118, 210, 0.22);
}

.anonymous-welcome-chat .chat-bubble.bubble-user .bubble-header.bubble-header-user,
.anonymous-welcome-chat .chat-bubble.bubble-user .message-content {
  color: var(--tradition-christian-text, #0d47a1) !important;
}

/* Preserve greeting.txt line breaks in welcome AI bubbles (escapeHtml does not emit <br>) */
.anonymous-welcome-chat .chat-bubble.bubble-ai .message-content {
  white-space: pre-line;
}

/* Input area - legacy standalone template only (app_welcome uses .chat-input-bar) */
body.welcome-chat-page .welcome-chat-input-bar {
  flex-shrink: 0;
  padding: 1rem 1.5rem;
  background: #fff;
  border-top: 1px solid #e5e5e5;
}

body.welcome-chat-page .welcome-chat-input-form {
  display: flex;
  gap: 0.5rem;
  max-width: 800px;
  margin: 0 auto;
}

body.welcome-chat-page .welcome-chat-input-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 24px;
  font-size: 1rem;
}

body.welcome-chat-page .welcome-chat-input-form input:focus {
  outline: none;
  border-color: #5a9367;
}

body.welcome-chat-page .welcome-chat-input-form button {
  padding: 0.75rem 1.25rem;
  background: #5a9367;
  color: #fff;
  border: none;
  border-radius: 24px;
  cursor: pointer;
}

body.welcome-chat-page .welcome-chat-input-form button:hover {
  background: #4a8257;
}

body.welcome-chat-page .welcome-chat-input-form button:disabled {
  background: #999;
  cursor: not-allowed;
}

/* Token reminder toast */
.welcome-chat-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 3000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: welcomeToastIn 0.3s ease;
}

@keyframes welcomeToastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Mobile */
@media (max-width: 768px) {
  body.welcome-chat-page {
    height: 100dvh;
    min-height: -webkit-fill-available;
  }

  .welcome-chat-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 2001;
    transform: translateX(-100%);
  }

  .welcome-chat-sidebar.open {
    transform: translateX(0);
  }

  .welcome-chat-hamburger {
    display: flex;
  }

  .welcome-chat-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2000;
  }

  .welcome-chat-sidebar-backdrop.open {
    display: block;
  }

  body.welcome-chat-page .welcome-chat-banner {
    height: 100px;
    min-height: 100px;
  }

  /* Input bar: safe-area (legacy standalone template) */
  body.welcome-chat-page .welcome-chat-input-bar {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    min-height: 52px;
  }

  /* app_welcome: match chat input bar safe-area inside app shell */
  .anonymous-welcome-chat .chat-input-bar {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    min-height: 52px;
  }
}

/* --------------------------------------------------------------------------
   Welcome landing (/) — scroll + flex chain fix (guest, before chat starts)
   App shell uses overflow:hidden on main; nested flex + .chat-messages flex:1
   can collapse to 0px height → blank card / no mobile scroll. Scroll #app-main
   for landing only; after .welcome-chat-started, restore inner chat scroll.
   -------------------------------------------------------------------------- */
body.welcome-landing-page #app-main {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

body.welcome-landing-page #app-main:has(.anonymous-welcome-chat.welcome-chat-started) {
  overflow: hidden;
}

body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started).chat-in-app-main {
  overflow: visible;
  flex: 1 1 auto;
  min-height: min-content;
}

/* app_shell gives .container-fluid / .row / .col-12 flex:1 — they fill the viewport and
   clip natural content height; flex:0 1 auto lets the landing column grow with its content
   so #app-main scroll shows the full hero + cards + name prompt. */
body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) > .container-fluid {
  flex: 0 1 auto !important;
  min-height: auto !important;
  overflow: visible !important;
}

body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .container > .row {
  flex: 0 1 auto !important;
  min-height: auto !important;
  overflow: visible !important;
}

body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .container .col-12 {
  flex: 0 1 auto !important;
  min-height: auto !important;
  overflow: visible !important;
}

body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .chat-main-container {
  overflow: visible;
  flex: 0 1 auto;
  min-height: min-content;
}

body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .chat-layout-wrapper {
  overflow: visible;
  flex: 0 1 auto;
  min-height: min-content;
}

body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .chat-window-container {
  flex: none !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .chat-messages {
  overflow: visible !important;
  flex: none !important;
  max-height: none !important;
  min-height: 0 !important;
  height: auto !important;
  margin-bottom: 0 !important;
}

/* mobile.css forces fixed heights on .chat-window-container — undo for landing only */
@media (max-width: 768px) {
  body.welcome-landing-page .anonymous-welcome-chat {
    padding-top: 10px !important;
  }

  /* Landing shell: remove inherited top spacing so hero sits near the top on phones */
  body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) > .container-fluid.anonymous-welcome-main,
  body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .chat-main-container,
  body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .chat-layout-wrapper,
  body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .chat-window-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Nudge the wrapper down 10px on mobile so the welcome content sits a bit lower */
  body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .chat-layout-wrapper {
    padding-top: 10px !important;
  }

  body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .chat-window-container {
    height: auto !important;
    min-height: 0 !important;
  }

  body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .chat-window-container > .card-body {
    height: auto !important;
    display: block !important;
  }

  body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .chat-messages {
    padding-bottom: 1.5rem !important;
  }

  /* Tighten space above embedded hero (Bootstrap p-3 + mt-* was adding a lot on small screens) */
  body.welcome-landing-page .anonymous-welcome-chat:not(.welcome-chat-started) .chat-window-container > .card-body.chat-messages {
    padding-top: 0 !important;
    top: 0 !important;
    margin-top: 0 !important;
  }
}

/* --------------------------------------------------------------------------
   Anonymous guest AFTER chat starts (.welcome-chat-started)
   app_shell.css sets .chat-window-container { height: auto !important } which
   breaks the flex column; chat.css pins .chat-input-bar absolute bottom. The
   card must fill chat-layout-wrapper so .chat-messages can flex:1 and scroll.
   -------------------------------------------------------------------------- */
body.welcome-landing-page .anonymous-welcome-chat.welcome-chat-started.chat-in-app-main {
  overflow: hidden;
  min-height: 0;
  flex: 1;
}

body.welcome-landing-page .anonymous-welcome-chat.welcome-chat-started > .container-fluid {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.welcome-landing-page .anonymous-welcome-chat.welcome-chat-started .chat-main-container {
  flex: 1;
  min-height: 0 !important;
  overflow: hidden;
}

body.welcome-landing-page .anonymous-welcome-chat.welcome-chat-started .chat-layout-wrapper {
  flex: 1 1 0%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Fill wrapper + guarantee a usable min height (app_shell height:auto alone collapses with absolute input) */
body.welcome-landing-page .anonymous-welcome-chat.welcome-chat-started .chat-window-container {
  flex: 1 1 0% !important;
  min-height: min(72vh, calc(100dvh - 14rem)) !important;
  max-height: none !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Reserve space above the absolutely positioned .chat-input-bar (chat.css padding-bottom is often overridden by .card-body { padding: 1rem }) */
body.welcome-landing-page .anonymous-welcome-chat.welcome-chat-started .chat-messages {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  height: auto !important;
  max-height: none !important;
  margin-bottom: 0 !important;
  padding-top: 0.75rem !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px)) !important;
}

@media (max-width: 768px) {
  body.welcome-landing-page .anonymous-welcome-chat.welcome-chat-started .chat-window-container {
    min-height: min(62vh, calc(100dvh - 10rem)) !important;
  }
}

/* Final guest prompt: primary CTA + fine print + other Welcome Guides */
.message-content .message-content-primary {
  white-space: pre-wrap;
}

.welcome-cta-fineprint {
  font-size: 0.72rem;
  line-height: 1.35;
  color: #6b7280;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(107, 114, 128, 0.25);
}

.welcome-chat-handoff {
  align-self: flex-start;
  max-width: 100%;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #374151;
}

.welcome-chat-handoff-label {
  font-weight: 600;
  margin-right: 0.35rem;
}

button.welcome-chat-handoff-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0 0.15rem;
  cursor: pointer;
  color: #5a9367;
  text-decoration: underline;
  font: inherit;
  font-weight: 500;
}

button.welcome-chat-handoff-link:hover {
  color: #3d6b48;
}
