:root {
  color-scheme: light;
  --forest: #16463c;
  --forest-dark: #0f342c;
  --forest-light: #236154;
  --mint: #d9ece4;
  --mint-light: #f2f8f5;
  --cream: #faf7f2;
  --cream-dark: #f0eae1;
  --peach: #f5c7ad;
  --gold: #f4c430;
  --ink: #1b3832;
  --muted: #627b74;
  --line: #dbe7e1;
  --white: #ffffff;
  --good: #dff3e7;
  --good-text: #1d6148;
  --warn: #fef3d6;
  --warn-text: #825e14;
  --accent: #e57a44;
  --shadow-sm: 0 4px 14px rgba(22, 70, 60, 0.06);
  --shadow-md: 0 12px 36px rgba(22, 70, 60, 0.09);
  --shadow-lg: 0 24px 60px rgba(22, 70, 60, 0.13);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

button, textarea, input { font: inherit; }
button { cursor: pointer; }

/* Top Switcher Bar */
.top-notice-bar {
  background: #eaf3ef;
  border-bottom: 1px solid var(--line);
  padding: 8px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--forest);
}
.top-notice-bar a {
  color: var(--forest-dark);
  font-weight: 700;
  text-decoration: underline;
}
.badge-version {
  background: var(--forest);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.guide {
  width: min(1280px, calc(100% - 32px));
  margin: 16px auto 48px;
}

/* Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--forest);
}
.brand-logo {
  max-width: 140px;
  height: auto;
  display: block;
}
.brand-tag {
  font-size: 0.8rem;
  background: var(--mint);
  color: var(--forest-dark);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.restart-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--forest);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.restart-btn:hover {
  background: var(--mint-light);
  border-color: var(--forest-light);
}

/* Hero Section */
.welcome {
  background: linear-gradient(135deg, #1b4d43 0%, #133a32 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 48px 56px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}
.welcome::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 196, 48, 0.2) 0%, transparent 70%);
  pointer-events: none;
}
.welcome-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}
.welcome .kicker {
  color: #8bd3bc;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.welcome h1 {
  font-family: Georgia, serif;
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  line-height: 1.1;
  font-weight: 500;
  margin-bottom: 16px;
}
.welcome p {
  font-size: 1.12rem;
  line-height: 1.6;
  color: #dbeae4;
}

/* Starters */
.starter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.starter-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: all 0.22s ease;
}
.starter-card:hover {
  transform: translateY(-3px);
  border-color: #8cc3b2;
  box-shadow: var(--shadow-md);
}
.starter-icon {
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  background: var(--mint);
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.starter-card:nth-child(2) .starter-icon { background: #ffe9d9; }
.starter-card:nth-child(3) .starter-icon { background: #e0eff5; }
.starter-card:nth-child(4) .starter-icon { background: #fdf2d0; }
.starter-body strong {
  display: block;
  font-size: 0.94rem;
  color: var(--forest-dark);
  margin-bottom: 4px;
}
.starter-body small {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

/* Workspace */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.chat-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(90deg, #fff, var(--mint-light));
  border-bottom: 1px solid var(--line);
}
.advisor-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-family: Georgia, serif;
}
.profile-meta strong {
  display: block;
  font-size: 0.95rem;
  color: var(--forest-dark);
}
.profile-meta small {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  color: var(--muted);
}
.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34a853;
}

/* Conversation Flow */
.conversation {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
}

.bubble {
  max-width: min(84%, 720px);
  padding: 15px 20px;
  border-radius: 20px;
  font-size: 1rem;
  line-height: 1.55;
  position: relative;
  scroll-margin-top: 24px;
}
.bubble p + p { margin-top: 8px; }

.bubble.assistant {
  align-self: flex-start;
  background: #f1f7f4;
  color: var(--forest-dark);
  border-bottom-left-radius: 4px;
  border: 1px solid #dcece4;
}
.bubble.user {
  align-self: flex-end;
  background: var(--forest);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Product Cards Container */
.products-wrapper {
  margin: 10px 0;
}
.products-headline {
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--forest-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #a4cebe;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(22, 70, 60, 0.92);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  z-index: 2;
}
.product-badge.alt {
  background: #c96732;
}

.product-img-wrap {
  aspect-ratio: 4/3;
  background: var(--mint-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
  position: relative;
}
.product-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.25s;
}
.product-card:hover .product-img-wrap img {
  transform: scale(1.05);
}

.product-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.product-brand {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.product-title {
  font-family: Georgia, serif;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--forest-dark);
  line-height: 1.3;
  margin-bottom: 8px;
}
.product-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--forest);
  margin-bottom: 8px;
}

/* Personalization / Engraving Badge */
.engraving-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef7e7;
  color: #92540d;
  border: 1px solid #ffe58f;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  margin-bottom: 10px;
  align-self: flex-start;
}
.engraving-badge strong {
  font-weight: 700;
  color: #793c00;
}
.engraving-icon {
  font-size: 0.85rem;
}

/* Sibling Colors Row */
.product-sibling-colors {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.76rem;
}
.colors-label {
  color: var(--muted);
  font-weight: 600;
  margin-right: 2px;
}
.color-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fbfcfb;
  color: var(--forest-dark);
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.74rem;
  border: 1px solid #dcece4;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}
.color-pill:hover {
  border-color: #8cc3b2;
  background: #f0f7f4;
  transform: translateY(-1px);
}
.color-pill.is-active {
  background: #e6f4ef;
  border-color: var(--forest);
  box-shadow: 0 0 0 2px rgba(22, 70, 60, 0.25);
  color: var(--forest);
}
.color-swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.color-swatch.is-light {
  box-shadow: 0 0 0 1px #94a3b8;
}
.color-text {
  display: inline-block;
}
.color-pill.more {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 2px 2px;
  font-weight: 700;
}

.product-highlights {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
}
.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--good-text);
}
.highlight-item.caveat {
  color: var(--warn-text);
}

.product-btn {
  margin-top: 14px;
  background: var(--forest);
  color: #fff;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 0.2s;
  display: block;
}
.product-btn:hover {
  background: var(--forest-light);
}

/* Quick Replies Chips */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 24px;
  background: #fbfdfc;
  border-top: 1px solid #edf4f1;
}
.chip-btn {
  background: #fff;
  border: 1px solid #c8ddd5;
  color: var(--forest-dark);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.18s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.chip-btn:hover {
  background: var(--mint);
  border-color: var(--forest-light);
  transform: translateY(-1px);
}

/* Active Requirements */
.active-requirements {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 24px;
  background: #f5faf8;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}
.filter-pill {
  background: #fff;
  border: 1px solid #bcdbd1;
  color: var(--forest);
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
}
.filter-pill span.remove {
  color: #922b21;
  cursor: pointer;
  font-weight: 900;
}

/* Composer Form */
.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.composer textarea {
  resize: none;
  border: 1px solid #c2d8cf;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 0.98rem;
  color: var(--ink);
  outline: none;
  min-height: 52px;
  max-height: 120px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.composer textarea:focus {
  border-color: var(--forest-light);
  box-shadow: 0 0 0 3px rgba(22, 70, 60, 0.12);
}
.send-btn {
  background: var(--forest);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.send-btn:hover {
  background: var(--forest-light);
}
.send-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Side Note Card */
.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.side-card h3 {
  font-family: Georgia, serif;
  font-size: 1.25rem;
  color: var(--forest-dark);
  margin-bottom: 12px;
}
.side-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}
.side-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.84rem;
}
.side-card li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.side-card li span.icon {
  color: #2f855a;
  font-weight: 800;
}

/* Typing animation */
.thinking-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}
.dots {
  display: flex;
  gap: 4px;
}
.dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--forest-light);
  animation: bounce 1.2s infinite;
}
.dots span:nth-child(2) { animation-delay: 0.15s; }
.dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Responsiveness */
@media (max-width: 960px) {
  .starter-grid { grid-template-columns: repeat(2, 1fr); }
  .workspace { grid-template-columns: 1fr; }
  .side-card { display: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .guide {
    padding: 0 10px;
    margin: 8px auto 24px;
  }

  /* Compact Mobile Header */
  .topbar {
    padding: 6px 2px 12px;
  }
  .brand-logo {
    max-width: 105px;
  }
  .brand-tag {
    font-size: 0.7rem;
    padding: 2px 7px;
  }
  .restart-btn {
    padding: 5px 11px;
    font-size: 0.78rem;
  }

  /* Slim Hero Section on Mobile */
  .welcome {
    padding: 20px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 14px;
  }
  .welcome .kicker {
    font-size: 0.72rem;
    margin-bottom: 4px;
  }
  .welcome h1 {
    font-size: 1.45rem;
    line-height: 1.2;
    margin-bottom: 8px;
  }
  .welcome p {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  /* Compact Starter Chips on Mobile */
  .starter-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
  }
  .starter-card {
    padding: 10px;
    gap: 8px;
    border-radius: var(--radius-sm);
  }
  .starter-icon {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    border-radius: 8px;
  }
  .starter-body strong {
    font-size: 0.82rem;
    margin-bottom: 2px;
  }
  .starter-body small {
    display: none; /* Hide subtitle to keep mobile cards neat and compact */
  }

  /* Spacious, Immersive Mobile Chat Panel */
  .chat-panel {
    border-radius: var(--radius-md);
  }
  .chat-header {
    padding: 10px 14px;
  }
  .avatar {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }
  .profile-meta strong {
    font-size: 0.86rem;
  }
  .profile-meta small {
    font-size: 0.72rem;
  }

  .conversation {
    padding: 14px 12px;
    gap: 12px;
    min-height: 340px;
  }
  .bubble {
    max-width: 94%;
    padding: 11px 14px;
    font-size: 0.92rem;
    line-height: 1.45;
    border-radius: 14px;
  }

  /* Mobile Product Grid */
  .products-wrapper {
    margin: 8px 0;
  }
  .products-headline {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }
  .product-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .product-img-wrap {
    height: 170px;
    padding: 12px;
  }
  .product-content {
    padding: 12px;
  }
  .product-title {
    font-size: 1.02rem;
  }

  /* Mobile Quick Replies Chips */
  .quick-replies {
    padding: 8px 12px;
    gap: 6px;
  }
  .chip-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  /* Mobile Composer & Send Button */
  .composer {
    padding: 10px 12px;
    gap: 8px;
    position: sticky;
    bottom: 0;
    z-index: 10;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.05);
  }
  .composer textarea {
    padding: 10px 12px;
    font-size: 0.92rem;
    min-height: 44px;
  }
  .send-btn {
    padding: 0 16px;
    font-size: 0.88rem;
  }
}
