/* Landing guide widget — marketing page only */
.lg-launcher {
  position: fixed;
  z-index: 9000;
  left: max(1rem, env(safe-area-inset-left, 0));
  bottom: max(1rem, env(safe-area-inset-bottom, 0));
}

body.has-sticky-cta .lg-launcher {
  bottom: max(4.75rem, calc(env(safe-area-inset-bottom, 0) + 4rem));
}

.lg-launcher-btn {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  box-shadow: var(--shadow);
}

.lg-launcher-btn:hover {
  background: var(--accent-hover);
}

.lg-root--open .lg-launcher {
  display: none;
}

.lg-voice-conn {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--text-body);
}

.lg-voice-conn-dot {
  flex-shrink: 0;
  width: 0.625rem;
  height: 0.625rem;
  margin-top: 0.2rem;
  border-radius: 50%;
}

.lg-voice-conn-dot--connecting {
  background: #c62828;
  box-shadow: 0 0 0 2px rgb(198 40 40 / 0.2);
  animation: lg-voice-pulse 1s ease-in-out infinite;
}

.lg-voice-conn-dot--live {
  background: #2e7d32;
  box-shadow: 0 0 0 2px rgb(46 125 50 / 0.25);
}

.lg-voice-status {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
}

.lg-voice-status--listening,
.lg-voice-status--speaking {
  position: relative;
  padding-left: 1.25rem;
}

.lg-voice-status--listening::before,
.lg-voice-status--speaking::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.25rem;
  border-radius: 50%;
  background: var(--accent);
  animation: lg-voice-pulse 1.2s ease-in-out infinite;
}

.lg-voice-status--speaking::before {
  animation-duration: 0.75s;
}

@keyframes lg-voice-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.lg-voice-hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.lg-voice-end-cta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.lg-voice-end-text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.lg-voice-check-link {
  text-align: center;
  text-decoration: none;
}

.lg-feedback:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.lg-feedback-title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.lg-feedback-help {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.lg-feedback-rating {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.lg-feedback-thumb {
  flex: 1;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}

.lg-feedback-thumb--selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.lg-feedback-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.lg-feedback-tag {
  font-family: var(--sans);
  font-size: 0.75rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  color: var(--text-body);
}

.lg-feedback-tag--selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.lg-feedback-comment {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.8125rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  resize: vertical;
  min-height: 2.75rem;
  margin-bottom: 0.65rem;
}

.lg-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lg-voice-transcript {
  flex: 1;
  min-height: 6rem;
  max-height: 14rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.45;
  contain: layout style;
}

.lg-voice-line {
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius);
}

.lg-voice-line--user {
  align-self: flex-end;
  background: var(--accent-soft);
  max-width: 92%;
}

.lg-voice-line--user::before {
  content: "You · ";
  font-weight: 600;
  font-style: normal;
}

.lg-voice-line--assistant {
  align-self: flex-start;
  background: var(--bg-subtle);
  max-width: 92%;
}

.lg-voice-line--assistant::before {
  content: "Guide · ";
  font-weight: 600;
  font-style: normal;
}

.lg-voice-line--pending {
  color: var(--text-muted);
  font-style: italic;
}

.lg-voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.lg-panel {
  position: fixed;
  z-index: 9001;
  left: max(1rem, env(safe-area-inset-left, 0));
  bottom: max(4.5rem, calc(env(safe-area-inset-bottom, 0) + 3.5rem));
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(32rem, 70vh);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}

.lg-panel[hidden] {
  display: none !important;
}

.lg-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-subtle);
}

.lg-panel-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.lg-panel-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
}

.lg-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lg-consent p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.lg-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lg-messages {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 8rem;
}

.lg-msg {
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  max-width: 95%;
}

.lg-msg--user {
  align-self: flex-end;
  background: var(--accent-soft);
  color: var(--text);
}

.lg-msg--assistant {
  align-self: flex-start;
  background: var(--bg-subtle);
  color: var(--text-body);
}

.lg-msg--error {
  align-self: stretch;
  background: #fff4ed;
  border: 1px solid #f0c4a8;
  color: var(--text-body);
}

.lg-compose {
  border-top: 1px solid var(--line);
  padding: 0.65rem 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.lg-input {
  flex: 1;
  font-family: var(--sans);
  font-size: 0.875rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  resize: none;
  min-height: 2.5rem;
  max-height: 6rem;
}

.lg-send {
  flex-shrink: 0;
}

.lg-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0 1rem 0.5rem;
}

body.has-sticky-cta .lg-panel {
  bottom: max(8rem, calc(env(safe-area-inset-bottom, 0) + 7.5rem));
}

@media (max-width: 480px) {
  .lg-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}
