* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #f7efe2 0, #eee7dc 48%, #ded7ca 100%);
  color: #2b170d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}

button,
input {
  font: inherit;
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px 10px;
}

.phone {
  position: relative;
  width: min(390px, 100%);
  height: min(820px, calc(100vh - 36px));
  min-height: 700px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 16%, rgba(188, 12, 16, 0.1) 0 54px, transparent 55px),
    linear-gradient(180deg, #fffaf2 0%, #fffdf8 54%, #fbf5ea 100%);
  border: 1px solid #e3d6c2;
  border-radius: 34px;
  box-shadow: 0 24px 80px rgba(65, 39, 22, 0.22);
}

.phone::before {
  content: "";
  position: absolute;
  left: -38px;
  right: -34px;
  top: 78px;
  height: 210px;
  opacity: 0.08;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 22% 60%, transparent 0 38px, #b80d10 40px 42px, transparent 44px),
    radial-gradient(ellipse at 42% 58%, transparent 0 48px, #b80d10 50px 52px, transparent 54px),
    radial-gradient(ellipse at 64% 60%, transparent 0 40px, #b80d10 42px 44px, transparent 46px),
    radial-gradient(ellipse at 80% 58%, transparent 0 52px, #b80d10 54px 56px, transparent 58px);
}

.phone::after {
  content: "";
  position: absolute;
  right: -58px;
  bottom: 92px;
  width: 210px;
  height: 190px;
  opacity: 0.08;
  pointer-events: none;
  background:
    radial-gradient(circle at 66% 42%, transparent 0 18px, #b80d10 20px 22px, transparent 24px),
    radial-gradient(ellipse at 54% 62%, transparent 0 44px, #b80d10 46px 48px, transparent 50px),
    radial-gradient(ellipse at 35% 70%, transparent 0 34px, #b80d10 36px 38px, transparent 40px);
  transform: rotate(-12deg);
}

.top-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 28px 22px 0;
  flex-wrap: wrap;
}

.store-source-tag {
  font-size: 12px;
  color: #9a7660;
  background: rgba(139, 58, 42, 0.08);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-source-tag.from-scan {
  color: #1f9d55;
  background: rgba(31, 157, 85, 0.10);
  border: 1px solid rgba(31, 157, 85, 0.25);
}

.brand {
  min-width: 0;
}

.logo-plaque {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 42px;
  padding: 0 22px;
  border: 2px solid #d7ae58;
  border-radius: 999px;
  color: #d7ae58;
  background: #b80d10;
  box-shadow: 0 10px 30px rgba(184, 13, 16, 0.16);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 2px;
}

.brand span {
  display: block;
  margin-top: 8px;
  color: #9a7660;
  font-size: 13px;
  letter-spacing: 0;
}

.guide-button {
  height: 46px;
  flex: 0 0 auto;
  padding: 0 18px;
  border: 1px solid #e7d4bd;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #6c3d2d;
  box-shadow: 0 12px 35px rgba(65, 39, 22, 0.1);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.center {
  position: absolute;
  z-index: 1;
  left: 20px;
  right: 20px;
  top: 45%;
  transform: translateY(-50%);
  text-align: center;
}

h1 {
  margin: 0;
  color: #2b170d;
  font-size: 31px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: 0;
}

.subtitle {
  margin: 12px auto 0;
  max-width: 322px;
  color: #9f897d;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

.welcome-panel {
  margin: 28px auto 0;
  max-width: 338px;
}

.primary-shortcuts,
.topic-shortcuts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.primary-shortcuts {
  margin-bottom: 10px;
}

.shortcut {
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid #ecdcc6;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #7b4b3a;
  font-size: 13px;
  box-shadow: 0 8px 25px rgba(65, 39, 22, 0.07);
  cursor: pointer;
}

.shortcut.strong {
  border-color: #d7ae58;
  background: linear-gradient(180deg, #bd1518, #a80b0d);
  color: #f3d88b;
  font-weight: 750;
  box-shadow: 0 10px 26px rgba(184, 13, 16, 0.14);
}

.suggest-box {
  display: none;
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 112px;
  padding: 0 4px;
  background: transparent;
}

.suggest-box.visible {
  display: block;
}

.suggest-title {
  margin: 0 0 6px 8px;
  color: #a18472;
  font-size: 12px;
}

.suggestions {
  display: grid;
  gap: 6px;
}

.suggestion {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #ecdcc6;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.94);
  color: #5b3428;
  text-align: left;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(65, 39, 22, 0.06);
  cursor: pointer;
}

.assistant-label {
  margin-bottom: 6px;
  color: #9a7660;
  font-size: 12px;
  font-weight: 750;
}

.result-panel {
  display: none;
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 112px;
  max-height: 390px;
  overflow: auto;
  padding: 14px;
  border: 1px solid #e7d4bd;
  border-radius: 20px;
  background: rgba(255, 252, 246, 0.96);
  box-shadow: 0 18px 50px rgba(65, 39, 22, 0.12);
  text-align: left;
  scrollbar-width: none;
}

.result-panel::-webkit-scrollbar {
  display: none;
}

.result-panel.visible {
  display: block;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.result-head strong {
  color: #2b170d;
  font-size: 15px;
}

.result-close {
  border: 0;
  background: transparent;
  color: #9a7660;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0 0 9px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid #ecdcc6;
  background: #fffaf2;
  color: #8a5b2d;
  font-size: 12px;
  font-weight: 700;
}

.connection-status.success {
  border-color: #d7ae58;
  background: #fbf1d5;
  color: #71501a;
}

.connection-status.fallback {
  border-color: #ead6c0;
  background: #fff4e4;
  color: #8a5b2d;
}

.answer-text {
  margin: 0 0 10px;
  color: #76524b;
  font-size: 13px;
  line-height: 1.55;
}

.product-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid #ecdcc6;
  border-radius: 14px;
  background: #fffaf2;
  margin-top: 8px;
  text-align: left;
}

.clickable-product { cursor: pointer; }
.clickable-product:hover { border-color: #d7ae58; }
.clickable-product:active { opacity: 0.8; }

.modal {
  display: none;
  position: absolute;
  z-index: 5;
  left: 18px;
  right: 18px;
  bottom: 112px;
  max-height: 420px;
  overflow: auto;
  padding: 14px;
  border: 1px solid #e7d4bd;
  border-radius: 20px;
  background: rgba(255, 252, 246, 0.97);
  box-shadow: 0 18px 50px rgba(65, 39, 22, 0.12);
  text-align: left;
  scrollbar-width: none;
}
.modal.visible { display: block; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.modal-head strong { color: #2b170d; font-size: 15px; }
.modal-body { color: #674436; font-size: 13px; line-height: 1.5; }
.product-detail-card {
  padding: 10px;
  border: 1px solid #ecdcc6;
  border-radius: 12px;
  background: #fffaf2;
  margin-bottom: 10px;
}
.product-detail-card p { margin: 4px 0; }
.product-detail-section { margin-top: 8px; }
.product-detail-section ul { margin: 4px 0; padding-left: 18px; }
.product-detail-section li { margin: 3px 0; }

.result-section {
  margin-top: 12px;
}

.result-section h3 {
  margin: 0 0 8px;
  color: #4a281b;
  font-size: 14px;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.product-tags span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #fbf1d5;
  color: #8a5b2d;
  font-size: 11px;
}

.combo-card,
.usage-card,
.evidence-card,
.report-card,
.compliance-block,
.risk-banner {
  margin-top: 7px;
  padding: 10px;
  border: 1px solid #ecdcc6;
  border-radius: 14px;
  background: #fffaf2;
  color: #674436;
  font-size: 12px;
  line-height: 1.5;
}

.combo-card strong,
.report-card strong,
.compliance-block strong,
.risk-banner strong {
  color: #3a1f14;
}

.combo-card p,
.report-card p,
.risk-banner p,
.evidence-card p {
  margin: 5px 0 0;
}

.evidence-card summary {
  cursor: pointer;
  color: #3a1f14;
  font-weight: 700;
}

.risk-banner {
  border-color: #d7ae58;
  background: #fff4e4;
}

.compliance-block.warning {
  background: #fff7e8;
}

.compliance-block.danger {
  border-color: #d7ae58;
  background: #fff0e8;
}

.product-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 70% 34%, #d7ae58 0 5px, transparent 6px),
    linear-gradient(135deg, #b80d10, #f3d88b);
  opacity: 0.9;
}

.product-name {
  color: #3a1f14;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.product-meta {
  margin-top: 4px;
  color: #9a7660;
  font-size: 12px;
  line-height: 1.4;
}

.notice {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-radius: 12px;
  background: #fff4e4;
  color: #8a5b2d;
  font-size: 12px;
  line-height: 1.5;
}

/* ─── Result sections ──────────────────────────────────────────── */

.result-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f0e4d4;
}

.section-title {
  margin: 0 0 8px;
  color: #3a1f14;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
}

/* ─── Product card enhancements ────────────────────────────────── */

.product-info {
  min-width: 0;
}

.product-reason {
  margin-top: 4px;
  color: #7a5040;
  font-size: 12px;
  line-height: 1.4;
}

.product-tags {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag.need {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fde8e8;
  color: #b80d10;
  font-size: 11px;
  font-weight: 600;
}

.product-audience {
  margin-top: 4px;
  color: #8a6858;
  font-size: 11px;
}

.product-warn {
  margin-top: 3px;
  color: #c0392b;
  font-size: 11px;
}

/* ─── Combination card ─────────────────────────────────────────── */

.combo-card {
  padding: 9px 10px;
  border: 1px solid #e8d8c0;
  border-radius: 12px;
  background: #fffdf8;
  margin-top: 6px;
  text-align: left;
}

.combo-name {
  color: #3a1f14;
  font-size: 12px;
  font-weight: 750;
}

.combo-formula {
  margin-top: 4px;
  color: #7a5040;
  font-size: 12px;
}

.combo-desc {
  margin-top: 3px;
  color: #9a7660;
  font-size: 11px;
  line-height: 1.4;
}

.combo-reason {
  margin-top: 3px;
  color: #7a5040;
  font-size: 11px;
}

.combo-precaution {
  margin-top: 4px;
  padding: 4px 7px;
  border-radius: 6px;
  background: #fff4e4;
  color: #8a5b2d;
  font-size: 11px;
}

/* ─── Usage suggestion card ────────────────────────────────────── */

.usage-card {
  padding: 9px 10px;
  border: 1px solid #e0d4c0;
  border-radius: 12px;
  background: #fffcf8;
  margin-top: 6px;
  text-align: left;
}

.usage-product-id {
  color: #b2a095;
  font-size: 11px;
  margin-bottom: 5px;
}

.usage-row {
  display: flex;
  gap: 8px;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.5;
}

.usage-label {
  flex: 0 0 52px;
  color: #9a7660;
  font-weight: 600;
}

.usage-val {
  color: #5a3a2a;
}

.usage-precaution {
  margin-top: 5px;
  padding: 4px 7px;
  border-radius: 6px;
  background: #fff4e4;
  color: #8a5b2d;
  font-size: 11px;
}

/* ─── Evidence collapsible ────────────────────────────────────── */

.evidence-card {
  margin-top: 6px;
  border: 1px solid #e8d8c0;
  border-radius: 10px;
  background: #fffdf8;
  overflow: hidden;
}

.evidence-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  color: #3a1f14;
}

.evidence-summary::-webkit-details-marker {
  display: none;
}

.evidence-summary::after {
  content: "▶";
  margin-left: auto;
  font-size: 9px;
  color: #b2a095;
  transition: transform 0.2s;
}

details[open] .evidence-summary::after {
  transform: rotate(90deg);
}

.evidence-herb {
  font-weight: 700;
}

.evidence-source {
  color: #9a7660;
  font-size: 11px;
}

.evidence-body {
  padding: 6px 10px 9px;
  border-top: 1px solid #f0e4d4;
  text-align: left;
  font-size: 11px;
  line-height: 1.5;
}

.evidence-quote {
  margin: 0 0 6px;
  padding: 5px 8px;
  border-left: 3px solid #d7ae58;
  background: #fbf1d5;
  color: #71501a;
  font-style: italic;
  border-radius: 0 6px 6px 0;
}

.evidence-modern {
  color: #5a3a2a;
  margin-bottom: 4px;
}

.evidence-allowed {
  color: #2d7a2d;
  margin-top: 4px;
}

.evidence-forbidden {
  color: #c0392b;
  margin-top: 3px;
}

/* ─── Test report card ────────────────────────────────────────── */

.report-card {
  padding: 9px 10px;
  border: 1px solid #e0d4c0;
  border-radius: 12px;
  background: #fffcf8;
  margin-top: 6px;
  text-align: left;
}

.report-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.report-title {
  color: #3a1f14;
  font-size: 12px;
  font-weight: 700;
}

.report-type {
  padding: 1px 6px;
  border-radius: 999px;
  background: #fde8e8;
  color: #b80d10;
  font-size: 10px;
  font-weight: 600;
}

.report-date,
.report-no,
.report-agency {
  color: #9a7660;
  font-size: 11px;
  line-height: 1.6;
}

.report-items {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.report-item {
  padding: 2px 7px;
  border-radius: 999px;
  background: #f0ebe0;
  color: #7a5040;
  font-size: 11px;
}

.report-file {
  margin-top: 5px;
  padding: 4px 7px;
  border-radius: 6px;
  background: #f0ebe0;
  color: #7a5040;
  font-size: 11px;
}

/* ─── Risk / escalation ──────────────────────────────────────── */

.connection-status.warning {
  border-color: #e8c070;
  background: #fff8e8;
  color: #8a6000;
}

.risk-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff8e8 0%, #fff3d0 100%);
  border: 1px solid #e8c070;
  margin-top: 10px;
}

.risk-banner-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
  padding-top: 1px;
}

.risk-banner-text {
  flex: 1;
  min-width: 0;
}

.risk-banner-title {
  color: #8a4500;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 3px;
}

.risk-banner-sub {
  color: #9a6820;
  font-size: 12px;
  line-height: 1.5;
}

.risk-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.risk-flag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fde8e8;
  color: #b80d10;
  font-size: 12px;
  font-weight: 700;
}

.compliance-warnings {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compliance-warn-item {
  padding: 5px 9px;
  border-radius: 8px;
  background: #fff4e4;
  color: #8a5b2d;
  font-size: 12px;
  line-height: 1.45;
}

.claims-block {
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.5;
}

.forbidden-claims {
  background: #fff0f0;
  border: 1px solid #f0c0c0;
}

.allowed-claims {
  background: #f0fff0;
  border: 1px solid #c0e8c0;
}

.claims-title {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 12px;
}

.forbidden-claims .claims-title {
  color: #c0392b;
}

.allowed-claims .claims-title {
  color: #2d7a2d;
}

.claim-item {
  color: #5a3a2a;
  padding: 2px 0;
}

.answer-tags {
  margin: 0 0 8px;
  color: #9a7660;
  font-size: 12px;
}

.quiz-panel {
  display: none;
  position: absolute;
  z-index: 4;
  left: 18px;
  right: 18px;
  bottom: 112px;
  max-height: 420px;
  overflow: auto;
  padding: 14px;
  border: 1px solid #e7d4bd;
  border-radius: 20px;
  background: rgba(255, 252, 246, 0.97);
  box-shadow: 0 18px 50px rgba(65, 39, 22, 0.12);
  text-align: left;
  scrollbar-width: none;
}
.quiz-panel[hidden] { display: none; }
.quiz-panel.visible { display: block; }
.quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.quiz-head strong { color: #2b170d; font-size: 15px; }
.quiz-progress {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
}
.quiz-step-dot {
  height: 4px;
  flex: 1;
  border-radius: 999px;
  background: #e8d8c0;
  transition: background 0.3s;
}
.quiz-step-dot.active { background: #b80d10; }
.quiz-question-text {
  margin: 0 0 10px;
  color: #3a1f14;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid #ecdcc6;
  border-radius: 12px;
  background: #fffaf2;
  color: #3a1f14;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.quiz-option:hover { border-color: #d7ae58; background: #fbf1d5; }
.quiz-option.selected { border-color: #b80d10; background: #fde8e8; color: #b80d10; }
.quiz-option input[type="radio"] { display: none; }
.quiz-option-check {
  width: 18px;
  height: 18px;
  border: 2px solid #d0c0b0;
  border-radius: 50%;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.quiz-option.selected .quiz-option-check { border-color: #b80d10; background: #b80d10; }
.quiz-footer { display: flex; gap: 8px; margin-top: 14px; }
.quiz-btn {
  flex: 1;
  min-height: 38px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.quiz-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.quiz-btn.back {
  flex: 0 0 auto;
  padding: 0 16px;
  border: 1px solid #e7d4bd;
  background: rgba(255, 255, 255, 0.86);
  color: #7b4b3a;
}
.quiz-btn.next,
.quiz-btn.submit {
  border: 1px solid #d7ae58;
  background: linear-gradient(180deg, #bd1518, #a80b0d);
  color: #f5d88c;
  box-shadow: 0 8px 22px rgba(184, 13, 16, 0.14);
}
.quiz-btn.submit { display: none; }

.bottom {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 18px 34px;
  background: linear-gradient(rgba(251, 245, 234, 0), #fbf5ea 24%);
}

.composer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 10px 8px 16px;
  border: 1px solid #e7d4bd;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 45px rgba(65, 39, 22, 0.12);
}

.composer input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 0;
  outline: 0;
  color: #3e2b21;
  background: transparent;
  font-size: 16px;
}

.composer input::placeholder {
  color: #b2a095;
}

.send-button {
  flex: 0 0 auto;
  min-width: 58px;
  height: 40px;
  border: 1px solid #d7ae58;
  border-radius: 999px;
  background: linear-gradient(180deg, #bd1518, #a80b0d);
  color: #f5d88c;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(184, 13, 16, 0.16);
}

.inline-guide {
  margin-top: 10px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #d7ae58;
  border-radius: 999px;
  background: linear-gradient(180deg, #bd1518, #a80b0d);
  color: #f5d88c;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

@media (max-height: 760px) {
  .phone {
    min-height: 660px;
  }

  .center {
    top: 43%;
  }

  .quick-area {
    margin-top: 18px;
  }
}

/* ─── Chat-style consultation view ─────────────────────────────── */

.result-panel {
  left: 14px;
  right: 14px;
  top: 92px;
  bottom: 104px;
  max-height: none;
  padding: 12px 10px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.result-panel.visible {
  display: flex;
  flex-direction: column;
}

.phone.chat-active .center {
  display: none;
}

.result-head {
  flex: 0 0 auto;
  margin: 0 4px 10px;
  padding: 0 2px;
}

.result-head strong {
  color: #8d7668;
  font-size: 12px;
  font-weight: 750;
}

#resultContent {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 2px 0 12px;
}

.chat-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: flex-start;
  animation: chatIn 0.22s ease both;
}

.chat-message.user {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #bd1518, #8B3A2A);
  color: #f5d88c;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 8px 22px rgba(139, 58, 42, 0.18);
}

.chat-message.user .chat-avatar {
  grid-column: 2;
  grid-row: 1;
  background: #3A5F3A;
  color: #fff;
}

.chat-bubble {
  max-width: 100%;
  width: fit-content;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #ead8c4;
  border-radius: 6px 18px 18px 18px;
  background: rgba(255, 252, 246, 0.96);
  box-shadow: 0 10px 28px rgba(65, 39, 22, 0.08);
}

.chat-message.user .chat-bubble {
  grid-column: 1;
  justify-self: end;
  border-color: #8B3A2A;
  border-radius: 18px 6px 18px 18px;
  background: #8B3A2A;
  color: #fff;
}

.chat-message.user .answer-text {
  margin: 0;
  color: #fff;
}

.chat-message.assistant .chat-bubble {
  max-width: calc(100vw - 92px);
}

.chat-bubble .connection-status.success {
  display: none;
}

.chat-bubble .answer-text {
  font-size: 14px;
  color: #5f463d;
  white-space: pre-line;
}

.chat-bubble .result-section {
  margin-top: 11px;
}

.chat-bubble .product-card {
  grid-template-columns: 44px 1fr;
  padding: 10px;
  border-radius: 12px;
  background: #fffaf2;
}

.chat-bubble .combo-card,
.chat-bubble .usage-card,
.chat-bubble .evidence-card,
.chat-bubble .report-card,
.chat-bubble .compliance-block,
.chat-bubble .risk-banner {
  border-radius: 12px;
  background: #fffaf2;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9a7660;
  animation: typingPulse 1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.14s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.28s;
}

.result-panel.visible ~ .quiz-panel[hidden] {
  display: none;
}

.result-panel.visible + .quiz-panel {
  pointer-events: none;
}

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

@keyframes typingPulse {
  0%, 80%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* ─── True conversation mode layout ───────────────────────────── */

.chat-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 2px 18px;
}

.msg {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  line-height: 1.58;
  animation: chatIn 0.22s ease both;
}

.ai-msg {
  align-self: flex-start;
  background: var(--brand-paper, #FFFCF6);
  border: 1px solid #ead8c4;
  color: #5f463d;
  box-shadow: 0 10px 28px rgba(65, 39, 22, 0.08);
}

.user-msg {
  align-self: flex-end;
  background: var(--brand-red, #8B3A2A);
  color: #fff;
  box-shadow: 0 10px 26px rgba(139, 58, 42, 0.18);
}

.msg .answer-text {
  margin: 0;
  white-space: pre-line;
}

.user-msg .answer-text {
  color: #fff;
}

.ai-msg .product-card {
  margin-top: 10px;
  width: 100%;
  background: #fffaf2;
}

.ai-msg .result-section:first-child {
  margin-top: 0;
}

.ai-msg .result-section h3 {
  margin-top: 0;
}

/* ─── ChatGPT-like consultation surface ───────────────────────── */

.result-panel {
  display: flex;
  left: 14px;
  right: 14px;
  top: 92px;
  bottom: 104px;
  max-height: none;
  padding: 0;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
}

.result-panel::-webkit-scrollbar {
  display: none;
}

.result-head {
  display: none;
}

.chat-box {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 2px 20px;
}

.msg {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.6;
}

.ai-msg {
  align-self: flex-start;
  background: rgba(255, 252, 246, 0.96);
  border: 1px solid #ead8c4;
}

.user-msg {
  align-self: flex-end;
  background: var(--brand-red, #8B3A2A);
  color: #fff;
}

.intro-msg {
  max-width: 88%;
}

.chat-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chat-shortcuts .shortcut {
  box-shadow: none;
}

.ai-msg .result-section {
  margin-top: 8px;
}

.ai-msg .result-section h3 {
  color: #3A5F3A;
  font-size: 13px;
}

.ai-msg .product-card {
  margin-top: 8px;
  border-radius: 14px;
  box-shadow: none;
}

.ai-msg .combo-card,
.ai-msg .usage-card,
.ai-msg .evidence-card,
.ai-msg .report-card,
.ai-msg .compliance-block,
.ai-msg .risk-banner {
  box-shadow: none;
}

/* ─── Final chat consultant UI pass ────────────────────────────── */

.phone {
  background:
    radial-gradient(circle at 92% 10%, rgba(139, 58, 42, 0.08) 0 58px, transparent 59px),
    linear-gradient(180deg, #fffaf2 0%, #fffdf8 48%, #fbf5ea 100%);
}

.top-bar {
  z-index: 6;
  padding-top: 42px;
  padding-bottom: 10px;
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.98), rgba(255, 250, 242, 0.78));
  backdrop-filter: blur(14px);
}

.brand span {
  font-size: 12px;
}

.guide-button {
  min-height: 40px;
}

.result-panel {
  z-index: 2;
  top: 118px;
  bottom: 96px;
  left: 12px;
  right: 12px;
  display: block;
  overflow-y: auto;
}

.result-panel[hidden] {
  display: none;
}

.result-panel.visible {
  display: block;
}

.chat-box {
  justify-content: flex-start;
  padding: 10px 2px 18px;
  gap: 10px;
}

.msg {
  max-width: 84%;
  padding: 10px 12px;
  border-radius: 18px;
  font-size: 14px;
  word-break: break-word;
}

.ai-msg {
  border-top-left-radius: 6px;
  background: rgba(255, 252, 246, 0.98);
}

.user-msg {
  border-top-right-radius: 6px;
  background: #8B3A2A;
}

.intro-msg {
  max-width: 90%;
}

.msg .answer-text + .answer-text {
  margin-top: 6px;
}

.chat-shortcuts {
  margin-top: 12px;
}

.chat-shortcuts .shortcut {
  min-height: 32px;
  padding: 7px 11px;
  font-size: 12px;
}

.ai-msg .result-section {
  margin-top: 0;
}

.ai-msg .result-section h3 {
  margin-bottom: 7px;
  font-size: 13px;
}

.ai-msg .product-card {
  grid-template-columns: 42px 1fr;
  gap: 9px;
  padding: 9px;
  border-color: #ead8c4;
}

.ai-msg .product-thumb {
  width: 42px;
  height: 42px;
  border-radius: 11px;
}

.ai-msg .product-name {
  font-size: 13px;
}

.ai-msg .product-meta,
.ai-msg .product-reason {
  font-size: 12px;
}

.ai-msg .product-tags span {
  font-size: 10px;
}

.bottom {
  z-index: 7;
  padding: 0 14px 24px;
}

.composer {
  min-height: 54px;
  padding: 7px 8px 7px 15px;
}

.send-button:disabled {
  opacity: 0.68;
  cursor: wait;
}

/* Lightweight chat reset control */
.result-head {
  display: flex;
  justify-content: flex-end;
  margin: 0 2px 6px;
}

.result-head strong {
  display: none;
}

.result-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgba(234, 216, 196, 0.8);
  border-radius: 50%;
  background: rgba(255, 252, 246, 0.88);
  color: #8B3A2A;
  font-size: 18px;
  font-weight: 750;
  box-shadow: 0 8px 24px rgba(65, 39, 22, 0.08);
  backdrop-filter: blur(10px);
}

.result-close span {
  width: auto;
  height: auto;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: #8B3A2A;
  font-size: 19px;
  line-height: 1;
  transform: translateY(-0.5px);
}

.result-close:active {
  transform: translateY(1px);
}

/* ─── Opening screen vertical rhythm tweak ────────────────────── */

.result-panel {
  background: transparent;
}

.chat-box {
  padding-top: 42vh;
  background: transparent;
}

.chat-start {
  padding-left: 4px;
  padding-right: 4px;
}

.chat-start h1 {
  font-size: 26px;
  line-height: 1.2;
}

.chat-start p {
  margin-bottom: 16px;
}

.chat-start .chat-shortcuts {
  gap: 9px;
}

.chat-start .shortcut {
  min-height: 34px;
  padding: 7px 13px;
  font-size: 13px;
}

@media (max-height: 760px) {
  .chat-box {
    padding-top: 32vh;
  }
}

/* ─── Avatar chat refinement ──────────────────────────────────── */

.chat-box {
  padding-top: 10px;
}

.chat-start {
  width: 100%;
  padding: 0 10px;
  transition: opacity 0.18s ease, transform 0.18s ease, height 0.18s ease;
}

.chat-start.hidden {
  height: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
}

.chat-start h1 {
  margin: 0 0 10px;
  color: #2b170d;
  font-size: 28px;
  line-height: 1.22;
  font-weight: 850;
}

.chat-start p {
  margin: 0 0 18px;
  color: #9f897d;
  font-size: 14px;
  line-height: 1.5;
}

.chat-start .chat-shortcuts {
  display: grid;
  justify-content: flex-start;
  gap: 10px;
}

.chat-start .shortcut {
  width: fit-content;
  min-height: 38px;
  padding: 9px 15px;
  border-color: rgba(234, 216, 196, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #4a281b;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(65, 39, 22, 0.06);
}

.chat-start .shortcut.strong {
  display: inline-flex;
  background: rgba(139, 58, 42, 0.1);
  color: #8B3A2A;
}

.msg-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  animation: chatIn 0.22s ease both;
}

.msg-row.user-row {
  justify-content: flex-end;
}

.msg-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #bd1518, #8B3A2A);
  color: #f5d88c;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 8px 20px rgba(139, 58, 42, 0.14);
}

.user-row .msg-avatar {
  order: 2;
  background: #3A5F3A;
  color: #fff;
}

.msg-row .msg {
  max-width: 76%;
  padding: 9px 12px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.52;
}

.msg-row .ai-msg {
  border-top-left-radius: 5px;
}

.msg-row .user-msg {
  border-top-right-radius: 5px;
}

.msg-row .product-card {
  margin-top: 8px;
}

@media (max-height: 760px) {
  .chat-box {
    padding-top: 10px;
  }
}

/* Final override: lower opening greeting like chat app home */
.result-panel {
  background: transparent;
}

.chat-box {
  padding-top: 10px;
  background: transparent;
}

.chat-start {
  padding-left: 4px;
  padding-right: 4px;
}

.chat-start h1 {
  font-size: 26px;
  line-height: 1.2;
}

.chat-start .shortcut {
  min-height: 34px;
  padding: 7px 13px;
  font-size: 13px;
}

@media (max-height: 760px) {
  .chat-box {
    padding-top: 10px;
  }
}

/* ─── Visual polish: warm herbal brand experience ─────────────── */

:root {
  --brand-red: #8B3A2A;
  --brand-green: #3A5F3A;
  --brand-cream: #F8F4EF;
  --brand-paper: #FFFCF6;
  --brand-gold: #D9B56A;
  --ink: #2B1A14;
  --muted: #8D7668;
}

body {
  background:
    radial-gradient(circle at 12% 8%, rgba(58, 95, 58, 0.12) 0 120px, transparent 121px),
    radial-gradient(circle at 88% 16%, rgba(139, 58, 42, 0.1) 0 132px, transparent 133px),
    linear-gradient(180deg, #F8F4EF 0%, #EEE7DC 100%);
  color: var(--ink);
}

.phone {
  background:
    radial-gradient(circle at 92% 14%, rgba(139, 58, 42, 0.11) 0 58px, transparent 59px),
    radial-gradient(circle at 10% 88%, rgba(58, 95, 58, 0.09) 0 82px, transparent 83px),
    linear-gradient(180deg, #FFFDF8 0%, #FCF7EF 56%, #F8F4EF 100%);
  border-color: rgba(139, 58, 42, 0.16);
  box-shadow: 0 24px 70px rgba(43, 26, 20, 0.2);
}

.logo-plaque,
.send-button,
.shortcut.strong,
.quiz-btn.next,
.quiz-btn.submit,
.inline-guide {
  background: linear-gradient(180deg, #A44533 0%, var(--brand-red) 100%);
  border-color: var(--brand-gold);
  color: #FFE7A8;
  box-shadow: 0 12px 28px rgba(139, 58, 42, 0.2);
}

.guide-button,
.shortcut,
.suggestion {
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.guide-button:hover,
.shortcut:hover,
.suggestion:hover {
  transform: translateY(-1px);
  border-color: rgba(58, 95, 58, 0.34);
  box-shadow: 0 12px 28px rgba(43, 26, 20, 0.1);
}

.shortcut {
  background: rgba(255, 252, 246, 0.9);
  border-color: rgba(139, 58, 42, 0.18);
  color: #6E4336;
}

.topic-shortcuts .shortcut {
  border-color: rgba(58, 95, 58, 0.22);
  color: var(--brand-green);
}

.composer {
  min-height: 62px;
  padding: 9px 10px 9px 18px;
  border-color: rgba(139, 58, 42, 0.2);
  background: rgba(255, 253, 248, 0.97);
  box-shadow: 0 18px 48px rgba(43, 26, 20, 0.16);
}

.composer:focus-within {
  border-color: rgba(58, 95, 58, 0.48);
  box-shadow: 0 18px 48px rgba(43, 26, 20, 0.16), 0 0 0 3px rgba(58, 95, 58, 0.08);
}

.composer input {
  color: var(--ink);
  font-weight: 550;
}

.send-button {
  min-width: 64px;
  height: 44px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.send-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(139, 58, 42, 0.24);
}

.result-panel,
.quiz-panel,
.modal {
  border-color: rgba(139, 58, 42, 0.18);
  background: rgba(255, 252, 246, 0.98);
  box-shadow: 0 20px 55px rgba(43, 26, 20, 0.16);
}

.result-panel.visible,
.quiz-panel.visible,
.modal.visible {
  animation: panelRise 0.22s ease-out;
}

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

.result-head strong,
.quiz-head strong,
.modal-head strong {
  color: var(--brand-red);
  font-size: 16px;
  letter-spacing: 0;
}

.result-close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease;
}

.result-close:hover {
  background: #F4E9DA;
  color: var(--brand-red);
}

.connection-status {
  border-color: rgba(58, 95, 58, 0.22);
  background: #F3F8EF;
  color: var(--brand-green);
}

.connection-status::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(58, 95, 58, 0.1);
}

.connection-status.fallback,
.connection-status.warning {
  background: #FFF6E7;
  color: #8A5B2D;
}

.answer-text {
  color: #6F5549;
  font-size: 13.5px;
}

.notice {
  border: 1px solid rgba(217, 181, 106, 0.42);
  background: #FFF7E8;
  color: #805C2D;
}

.result-section {
  border-top-color: rgba(58, 95, 58, 0.13);
}

.result-section h3,
.section-title {
  color: var(--brand-green);
  font-size: 14px;
}

.product-card {
  position: relative;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 12px;
  border-color: rgba(58, 95, 58, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 244, 239, 0.92)),
    #fffaf2;
  box-shadow: 0 10px 26px rgba(43, 26, 20, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(58, 95, 58, 0.06), transparent 38%);
}

.clickable-product:hover {
  transform: translateY(-2px);
  border-color: rgba(58, 95, 58, 0.36);
  box-shadow: 0 14px 34px rgba(43, 26, 20, 0.13);
}

.clickable-product:active {
  transform: translateY(0);
  opacity: 0.92;
}

.product-thumb {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 68% 28%, #F2D488 0 5px, transparent 6px),
    radial-gradient(circle at 34% 72%, rgba(58, 95, 58, 0.78) 0 9px, transparent 10px),
    linear-gradient(135deg, var(--brand-red), #CDA65C);
  box-shadow: inset 0 0 0 1px rgba(255, 238, 185, 0.45), 0 8px 18px rgba(139, 58, 42, 0.14);
}

.product-name {
  color: var(--ink);
  font-size: 14px;
}

.product-meta,
.product-reason {
  color: #73564A;
}

.product-tags span,
.tag.need,
.report-type {
  background: #F2E8D8;
  color: var(--brand-red);
}

.combo-card,
.usage-card,
.evidence-card,
.report-card,
.compliance-block,
.risk-banner,
.product-detail-card {
  border-color: rgba(58, 95, 58, 0.16);
  border-radius: 16px;
  background: #FFFDF8;
  box-shadow: 0 8px 22px rgba(43, 26, 20, 0.05);
}

.risk-banner {
  background: linear-gradient(135deg, #FFF6E8, #F8ECD5);
  border-color: rgba(139, 58, 42, 0.22);
}

.modal {
  max-height: 460px;
  padding: 16px;
}

.modal-content {
  position: relative;
}

.modal-body {
  color: #5F463C;
  font-size: 13.5px;
  line-height: 1.65;
}

.modal-body > p {
  margin: 8px 0;
  color: var(--muted);
}

.product-detail-card {
  padding: 12px;
}

.product-detail-card p {
  margin: 5px 0;
}

.product-detail-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(58, 95, 58, 0.12);
}

.product-detail-section strong {
  color: var(--brand-green);
}

.product-detail-section ul {
  margin-top: 7px;
  padding-left: 18px;
}

.product-detail-section li {
  margin: 5px 0;
}

.suggest-box.visible {
  animation: panelRise 0.18s ease-out;
}

.suggest-title {
  color: var(--brand-green);
  font-weight: 700;
}

.suggestion {
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.96);
}

.quiz-option {
  border-color: rgba(58, 95, 58, 0.16);
  background: #FFFDF8;
}

.quiz-option:hover {
  border-color: rgba(58, 95, 58, 0.38);
  background: #F5F8EF;
}

.quiz-option.selected {
  border-color: var(--brand-red);
  background: #F8E9E2;
  color: var(--brand-red);
}

.quiz-step-dot.active {
  background: var(--brand-green);
}

@media (max-width: 420px) {
  .stage {
    padding: 0;
  }

  .phone {
    width: 100%;
    height: 100vh;
    min-height: 680px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}


.usage-mini-card {
  display: grid;
  gap: 8px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(139, 58, 42, 0.16);
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.86);
}

.usage-mini-title {
  font-size: 15px;
  font-weight: 850;
  color: var(--green, #3A5F3A);
  margin-bottom: 2px;
}

.usage-mini-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  align-items: start;
  padding: 7px 0;
  border-top: 1px solid rgba(139, 58, 42, 0.08);
}

.usage-mini-row:first-of-type {
  border-top: 0;
}

.usage-mini-row span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: rgba(139, 58, 42, 0.09);
  color: var(--red, #8B3A2A);
  font-size: 12px;
  font-weight: 800;
}

.usage-mini-row p {
  margin: 0;
  color: #6F5548;
  font-size: 14px;
  line-height: 1.55;
}

.product-actions {
  margin-top: 10px;
}

.product-buy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid rgba(191, 143, 63, 0.72);
  border-radius: 999px;
  background: #8B3A2A;
  color: #FFF8E8;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(139, 58, 42, 0.16);
}

.product-buy-link:hover {
  background: #743023;
}

/* ─── Onboarding flow ──────────────────────────────────────────── */

.onboarding-flow {
  margin-top: 18px;
  text-align: center;
}

.onboarding-title {
  margin: 0 0 6px;
  color: #2b170d;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
}

.onboarding-sub {
  margin: 0 0 16px;
  color: #9f897d;
  font-size: 13px;
  line-height: 1.5;
}

.need-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.need-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: 1px solid rgba(139, 58, 42, 0.18);
  border-radius: 16px;
  background: rgba(255, 252, 246, 0.9);
  color: #4a281b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  box-shadow: 0 8px 22px rgba(65, 39, 22, 0.07);
}

.need-card:hover {
  transform: translateY(-2px);
  border-color: rgba(58, 95, 58, 0.36);
  box-shadow: 0 12px 28px rgba(43, 26, 20, 0.12);
  background: rgba(255, 253, 248, 0.98);
}

.need-card:active {
  transform: translateY(0);
  opacity: 0.88;
}

.need-icon {
  font-size: 22px;
  line-height: 1;
}

.need-label {
  color: #3a1f14;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.onboarding-skip {
  margin: 0;
  color: #b2a095;
  font-size: 12px;
}

/* Responsive: single column on small screens */
@media (max-width: 360px) {
  .need-cards {
    grid-template-columns: 1fr;
  }
}

/* Mobile home baseline: preserve the approved layout inside browser safe areas. */
@media (max-width: 420px) {
  .stage {
    min-height: 100dvh;
    padding: 0;
  }

  .phone {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .top-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand guide"
      "store store";
    align-items: start;
    gap: 8px 10px;
    padding: max(20px, env(safe-area-inset-top)) 20px 8px;
    flex-wrap: nowrap;
  }

  .brand {
    grid-area: brand;
  }

  .guide-button {
    grid-area: guide;
    align-self: start;
  }

  .store-source-tag {
    grid-area: store;
    justify-self: end;
    max-width: 100%;
  }

  .center {
    top: 142px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 18px 20px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: none;
    scrollbar-width: none;
  }

  .center::-webkit-scrollbar {
    display: none;
  }

  .welcome-panel {
    width: 100%;
    margin: 0 auto;
    padding-bottom: 12px;
  }

  .need-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .need-card {
    min-width: 0;
  }

  .bottom {
    padding: 0 14px max(16px, env(safe-area-inset-bottom));
  }
}