.lca-launcher,
.lca-panel,
.lca-overlay {
  --lca-bg: #fffdfb;
  --lca-surface: #f8f5f2;
  --lca-card: #ffffff;
  --lca-text: #2b2b2a;
  --lca-muted: #706a65;
  --lca-primary: #c5a880;
  --lca-primary-dark: #8f6d46;
  --lca-border: #e7dfd8;
  --lca-danger: #b54747;
  --lca-shadow: 0 18px 60px rgba(35, 32, 29, 0.2);
  font-family: "Inter", "DM Sans", Arial, sans-serif;
  letter-spacing: 0;
}

.lca-launcher {
  position: fixed;
  z-index: 1000;
  right: 1.25rem;
  bottom: 1.25rem;
  min-width: 58px;
  height: 58px;
  padding: 0 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: #252423;
  color: #ffffff;
  box-shadow: 0 12px 32px rgba(24, 22, 20, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, bottom 220ms ease;
}

.lca-launcher:hover {
  transform: translateY(-2px);
  background: #34312f;
}

.lca-launcher:focus-visible,
.lca-panel button:focus-visible,
.lca-panel input:focus-visible,
.lca-panel textarea:focus-visible,
.lca-panel a:focus-visible {
  outline: 3px solid rgba(197, 168, 128, 0.4);
  outline-offset: 2px;
}

.lca-launcher-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lca-primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.lca-launcher-label {
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.lca-launcher-notice {
  position: absolute;
  top: -3px;
  right: -2px;
  width: 11px;
  height: 11px;
  border: 2px solid #252423;
  border-radius: 50%;
  background: #6ca77a;
}

.lca-overlay {
  position: fixed;
  z-index: 1001;
  inset: 0;
  background: rgba(27, 25, 23, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.lca-panel {
  position: fixed;
  z-index: 1002;
  right: 1.25rem;
  bottom: 5.75rem;
  width: min(420px, calc(100vw - 2rem));
  height: min(720px, calc(100vh - 7rem));
  min-height: 520px;
  border: 1px solid var(--lca-border);
  border-radius: 12px;
  background: var(--lca-bg);
  color: var(--lca-text);
  box-shadow: var(--lca-shadow);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    "header"
    "progress"
    "feed"
    "composer";
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 180ms ease, transform 220ms ease;
}

body.lca-open .lca-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

body.lca-open .lca-launcher {
  opacity: 0;
  pointer-events: none;
}

.lca-header {
  grid-area: header;
  position: static;
  inset: auto;
  width: auto;
  height: auto;
  min-height: 76px;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--lca-border);
  background: #252423;
  color: #ffffff;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

.lca-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--lca-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.lca-header-copy {
  min-width: 0;
}

.lca-header-copy strong,
.lca-header-copy span {
  display: block;
}

.lca-header-copy strong {
  font-size: 0.96rem;
}

.lca-header-copy span {
  margin-top: 0.15rem;
  color: #d7d0ca;
  font-size: 0.72rem;
}

.lca-online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.3rem;
  border-radius: 50%;
  background: #73bd82;
}

.lca-header-actions {
  display: flex;
  gap: 0.25rem;
}

.lca-icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lca-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lca-progress-wrap {
  grid-area: progress;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--lca-border);
  background: var(--lca-card);
  display: none;
  align-items: center;
  gap: 0.75rem;
}

.lca-progress-wrap.visible {
  display: flex;
}

.lca-progress-copy {
  flex: 0 0 auto;
  color: var(--lca-muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.lca-progress-track {
  height: 4px;
  border-radius: 999px;
  background: var(--lca-border);
  flex: 1;
  overflow: hidden;
}

.lca-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--lca-primary);
  transition: width 220ms ease;
}

.lca-feed {
  grid-area: feed;
  min-height: 0;
  padding: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--lca-border) transparent;
}

.lca-message-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.lca-message-row.user {
  justify-content: flex-end;
}

.lca-message-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--lca-primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.72rem;
  font-weight: 700;
}

.lca-message {
  max-width: 86%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--lca-border);
  border-radius: 8px 8px 8px 2px;
  background: var(--lca-card);
  color: var(--lca-text);
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.lca-message-row.user .lca-message {
  border-color: var(--lca-primary);
  border-radius: 8px 8px 2px 8px;
  background: var(--lca-primary);
  color: #ffffff;
}

.lca-message.error {
  border-color: rgba(181, 71, 71, 0.35);
  background: #fff7f7;
  color: var(--lca-danger);
}

.lca-typing {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
}

.lca-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lca-muted);
  animation: lca-bounce 900ms infinite ease-in-out;
}

.lca-typing span:nth-child(2) {
  animation-delay: 120ms;
}

.lca-typing span:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes lca-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.lca-block {
  margin: 0.35rem 0 1rem 2.15rem;
}

.lca-action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.lca-action-card,
.lca-choice,
.lca-primary-btn,
.lca-secondary-btn {
  min-height: 44px;
  border: 1px solid var(--lca-border);
  border-radius: 8px;
  background: var(--lca-card);
  color: var(--lca-text);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.lca-action-card {
  width: 100%;
  padding: 0.8rem;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
}

.lca-action-card:hover,
.lca-choice:hover {
  border-color: var(--lca-primary);
}

.lca-action-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--lca-surface);
  color: var(--lca-primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lca-action-copy strong,
.lca-action-copy span {
  display: block;
}

.lca-action-copy strong {
  font-size: 0.84rem;
}

.lca-action-copy span {
  margin-top: 0.1rem;
  color: var(--lca-muted);
  font-size: 0.7rem;
}

.lca-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.lca-choice {
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
}

.lca-choice.selected {
  border-color: var(--lca-primary);
  background: var(--lca-primary);
  color: #ffffff;
}

.lca-service-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 300px;
  overflow-y: auto;
}

.lca-service-option {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--lca-border);
  border-radius: 8px;
  background: var(--lca-card);
  color: var(--lca-text);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  cursor: pointer;
}

.lca-service-option:hover,
.lca-service-option.selected {
  border-color: var(--lca-primary);
}

.lca-service-option.selected {
  background: rgba(197, 168, 128, 0.12);
}

.lca-service-option strong,
.lca-service-option small {
  display: block;
}

.lca-service-option strong {
  font-size: 0.78rem;
  line-height: 1.3;
}

.lca-service-option small {
  margin-top: 0.2rem;
  color: var(--lca-muted);
  font-size: 0.67rem;
}

.lca-service-price {
  color: var(--lca-primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.lca-form-card,
.lca-summary-card,
.lca-estimate-card,
.lca-product-card {
  border: 1px solid var(--lca-border);
  border-radius: 8px;
  background: var(--lca-card);
}

.lca-form-card,
.lca-summary-card,
.lca-estimate-card {
  padding: 0.9rem;
}

.lca-fieldset {
  margin: 0 0 0.9rem;
  padding: 0;
  border: 0;
}

.lca-fieldset:last-child {
  margin-bottom: 0;
}

.lca-fieldset legend,
.lca-label {
  display: block;
  width: 100%;
  margin-bottom: 0.45rem;
  color: var(--lca-text);
  font-size: 0.74rem;
  font-weight: 700;
}

.lca-input,
.lca-textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--lca-border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--lca-text);
  font: inherit;
  font-size: 0.82rem;
}

.lca-textarea {
  min-height: 72px;
  resize: vertical;
}

.lca-field-error {
  display: none;
  margin-top: 0.3rem;
  color: var(--lca-danger);
  font-size: 0.68rem;
}

.lca-field-error.visible {
  display: block;
}

.lca-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.lca-primary-btn,
.lca-secondary-btn {
  padding: 0.65rem 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.lca-primary-btn {
  border-color: var(--lca-primary);
  background: var(--lca-primary);
  color: #ffffff;
  flex: 1;
}

.lca-primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lca-secondary-btn {
  background: transparent;
  color: var(--lca-primary-dark);
}

.lca-estimate-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.lca-estimate-main strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
}

.lca-confidence {
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  background: var(--lca-surface);
  color: var(--lca-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.lca-reasons {
  margin: 0.65rem 0 0;
  padding: 0.65rem 0 0 1rem;
  border-top: 1px solid var(--lca-border);
  color: var(--lca-muted);
  font-size: 0.7rem;
}

.lca-reasons li + li {
  margin-top: 0.25rem;
}

.lca-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.lca-slot {
  min-height: 54px;
  padding: 0.55rem;
  border: 1px solid var(--lca-border);
  border-radius: 8px;
  background: var(--lca-card);
  color: var(--lca-text);
  cursor: pointer;
  text-align: left;
}

.lca-slot:hover {
  border-color: var(--lca-primary);
}

.lca-slot strong,
.lca-slot span {
  display: block;
}

.lca-slot strong {
  font-size: 0.78rem;
}

.lca-slot span {
  margin-top: 0.15rem;
  color: var(--lca-primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
}

.lca-summary-list {
  display: grid;
  gap: 0.55rem;
}

.lca-summary-row {
  display: grid;
  grid-template-columns: minmax(88px, 0.4fr) 1fr;
  gap: 0.6rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--lca-border);
  font-size: 0.73rem;
}

.lca-summary-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.lca-summary-row span:first-child {
  color: var(--lca-muted);
}

.lca-summary-row strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.lca-product-list {
  display: grid;
  gap: 0.6rem;
}

.lca-product-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  overflow: hidden;
}

.lca-product-image {
  min-height: 96px;
  padding: 0.5rem;
  background: var(--lca-surface);
}

.lca-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lca-product-content {
  min-width: 0;
  padding: 0.7rem;
}

.lca-product-content strong {
  display: block;
  margin-bottom: 0.3rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.82rem;
  line-height: 1.25;
}

.lca-product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.lca-product-price {
  color: var(--lca-primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.lca-product-add {
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--lca-primary);
  border-radius: 50%;
  background: transparent;
  color: var(--lca-primary-dark);
  cursor: pointer;
}

.lca-success {
  padding: 1rem;
  border: 1px solid rgba(77, 145, 92, 0.35);
  border-radius: 8px;
  background: #f3fbf5;
  text-align: center;
}

.lca-success-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.7rem;
  border-radius: 50%;
  background: #5b9b69;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.lca-success strong,
.lca-success span {
  display: block;
}

.lca-success strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.05rem;
}

.lca-success span {
  margin-top: 0.35rem;
  color: var(--lca-muted);
  font-size: 0.75rem;
}

.lca-composer {
  grid-area: composer;
  padding: 0.75rem;
  border-top: 1px solid var(--lca-border);
  background: var(--lca-card);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: end;
  gap: 0.5rem;
}

.lca-composer textarea {
  width: 100%;
  min-height: 44px;
  max-height: 100px;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--lca-border);
  border-radius: 8px;
  background: var(--lca-bg);
  color: var(--lca-text);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.35;
  resize: none;
}

.lca-send {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--lca-primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lca-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lca-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.lca-open .floating-cart,
body.lca-open .mobile-cart-bar {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 760px) {
  .lca-launcher {
    right: 0.9rem;
    bottom: 0.9rem;
    width: 56px;
    min-width: 56px;
    height: 56px;
    padding: 0;
  }

  .lca-launcher-label {
    display: none;
  }

  body:has(#mobileCartBar.visible):not(.lca-open) .lca-launcher {
    bottom: 5.8rem;
  }

  .lca-overlay {
    display: block;
  }

  body.lca-open .lca-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .lca-panel {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    transform: translateY(100%);
    transform-origin: bottom center;
  }

  body.lca-open {
    overflow: hidden;
  }

  body.lca-open .lca-panel {
    transform: translateY(0);
  }

  .lca-header {
    min-height: 68px;
    padding-top: max(0.7rem, env(safe-area-inset-top));
  }

  .lca-feed {
    padding: 0.85rem;
  }

  .lca-block {
    margin-left: 2rem;
  }

  .lca-message {
    max-width: 90%;
  }

  .lca-composer {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .lca-slot-grid {
    grid-template-columns: 1fr;
  }

  .lca-summary-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .lca-summary-row strong {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lca-launcher,
  .lca-panel,
  .lca-overlay,
  .lca-progress-bar {
    transition: none;
  }

  .lca-typing span {
    animation: none;
  }
}
