:root {
  --page: #f2f0eb;
  --surface: #ffffff;
  --surface-soft: #f6f7f5;
  --ink: #1c211f;
  --muted: #69716d;
  --line: #dfe4e1;
  --brand: #12695f;
  --brand-strong: #0b5149;
  --brand-soft: #e5f3ef;
  --success: #2a9b70;
  --danger: #c95252;
  --trace-bg: #101917;
  --trace-ink: #deebe7;
  --shadow: 0 18px 50px rgba(37, 47, 43, 0.13);
  --font-sans: Inter, "Segoe UI Variable Text", "Segoe UI", Aptos, ui-sans-serif, system-ui, sans-serif;
  --font-display: Inter, "Segoe UI Variable Display", "Segoe UI", Aptos, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--page);
  color: var(--ink);
  overflow: hidden;
}
button, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, textarea:focus-visible { outline: 3px solid rgba(18, 105, 95, .25); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .5; }

.app-shell { height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 68px;
  flex: 0 0 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 30;
}
.brand-block, .topbar-actions, .stage-pill, .assistant-identity, .connection-line,
.product-title-line, .product-row-actions, .detail-actions, .compare-bar,
.product-panel-controls { display: flex; align-items: center; }
.brand-block { gap: 11px; }
.brand-mark, .assistant-avatar {
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}
.brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.brand-title { font-size: 14px; font-weight: 750; }
.brand-subtitle { color: var(--muted); font-size: 11px; margin-top: 2px; }
.topbar-actions { gap: 8px; }
.stage-pill {
  gap: 7px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}
.stage-dot, .connection-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.connection-dot.offline { background: var(--danger); }
.topbar-button, .round-button, .trace-close, .usage-close {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 650;
}
.topbar-button:hover, .round-button:hover { background: var(--surface-soft); }
.topbar-button.secondary { background: var(--ink); color: #fff; border-color: var(--ink); }

.workspace { flex: 1; min-height: 0; display: flex; position: relative; overflow: hidden; }
.storefront { order: 3; flex: 1 1 auto; min-width: 0; background: var(--page); display: flex; flex-direction: column; }
.store-nav { height: 58px; flex: 0 0 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 26px; border-bottom: 1px solid rgba(28, 33, 31, .08); background: rgba(255,255,255,.52); }
.store-logo { font: 700 22px Georgia, serif; letter-spacing: -.04em; }
.store-links { display: flex; gap: 20px; font-size: 11px; color: #4e5753; }
.store-icons { display: flex; gap: 14px; align-items: center; font-size: 11px; }
.store-scroll { overflow-y: auto; padding: 20px 24px 40px; }
.store-hero { min-height: 310px; border-radius: 20px; overflow: hidden; display: grid; grid-template-columns: 56% 44%; background: linear-gradient(135deg, #d7e4df, #e5d7c8); }
.hero-copy { padding: clamp(30px, 4vw, 64px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.hero-kicker, .eyebrow, .panel-eyebrow, .welcome-eyebrow, .decision-label { color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.hero-copy h1 { margin: 12px 0 14px; font: 500 clamp(33px, 4vw, 58px)/1.02 Georgia, serif; letter-spacing: -.035em; }
.hero-copy p { color: #52615b; max-width: 460px; font-size: 13px; line-height: 1.65; }
.hero-copy button { margin-top: 12px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; padding: 12px 18px; font-weight: 700; font-size: 12px; }
.hero-art { display: grid; place-items: center; background: radial-gradient(circle at 60% 38%, #f5eee5 0 22%, transparent 23%), linear-gradient(160deg, transparent 0 20%, rgba(255,255,255,.48) 21% 46%, transparent 47%); }
.hero-art span { width: 155px; height: 155px; border-radius: 50%; background: rgba(255,255,255,.72); display: grid; place-items: center; text-align: center; font: italic 28px/1.05 Georgia, serif; color: #36584f; transform: rotate(-7deg); }
.featured-section { margin-top: 25px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.section-heading h2 { margin: 5px 0 0; font: 500 25px Georgia, serif; }
.section-note { color: var(--muted); font-size: 11px; }
.featured-grid { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 13px; }
.featured-card { background: var(--surface); border-radius: 14px; overflow: hidden; min-width: 0; box-shadow: 0 8px 24px rgba(37,47,43,.06); }
.featured-image { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: #e8ecea; }
.featured-copy { padding: 11px; }
.featured-category { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.featured-copy h3 { margin: 5px 0; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.featured-copy strong { font-size: 12px; }
.featured-action { display: block; margin-top: 8px; padding: 0; border: 0; background: transparent; color: var(--brand); font-size: 11px; font-weight: 750; }
.products-open .store-links, .products-open .store-icons, .products-open .hero-art { display: none; }
.products-open .store-hero { grid-template-columns: 1fr; min-height: 260px; }
.products-open .hero-copy { padding: 30px 26px; }
.products-open .hero-copy h1 { font-size: 34px; }
.products-open .featured-grid { grid-template-columns: repeat(2, minmax(105px, 1fr)); }

.chat-panel { order: 1; width: clamp(500px, 39vw, 640px); flex: 0 0 auto; min-width: 460px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; transition: width .28s ease; position: relative; z-index: 5; }
.products-open .chat-panel { width: clamp(480px, 37vw, 610px); min-width: 460px; }
.assistant-header { height: 58px; flex: 0 0 58px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.assistant-identity { gap: 9px; }
.assistant-avatar { width: 32px; height: 32px; border-radius: 50%; font-size: 12px; }
.assistant-identity strong { display: block; font-size: 13px; }
.assistant-identity span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.connection-line { gap: 6px; color: var(--muted); font-size: 10px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 22px 20px 138px; scroll-behavior: smooth; background: linear-gradient(180deg, #fff, #fafbf9); }
.welcome-card { margin: 6vh auto 22px; padding: 22px 15px; text-align: center; max-width: 390px; }
.welcome-card[hidden] { display: none; }
.welcome-card h2 { margin: 9px 0 10px; font: 500 28px/1.1 Georgia, serif; letter-spacing: -.02em; }
.welcome-card p { margin: 0 auto; color: var(--muted); font-size: 12px; line-height: 1.6; }
.suggestion-list { display: grid; gap: 8px; margin-top: 18px; }
.suggestion-list button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 11px; padding: 10px 12px; text-align: left; font-size: 11px; }
.suggestion-list button:hover { border-color: #a8c8c1; background: var(--brand-soft); }
.messages { display: flex; flex-direction: column; gap: 17px; }
.message-row { display: flex; }
.message-row.user { justify-content: flex-end; }
.message-wrap { max-width: 90%; }
.message-bubble { border-radius: 17px; padding: 13px 15px; white-space: pre-wrap; font-size: 14px; line-height: 1.58; letter-spacing: -.005em; }
.user .message-bubble { background: var(--ink); color: #fff; border-bottom-right-radius: 5px; }
.assistant .message-bubble { background: #f7f8f6; border: 1px solid #dce3df; border-bottom-left-radius: 5px; box-shadow: 0 3px 12px rgba(37,47,43,.035); }
.message-rich { white-space: normal; }
.message-rich p { margin: 0; }
.message-rich p + p, .message-rich p + ul, .message-rich p + ol,
.message-rich ul + p, .message-rich ol + p { margin-top: 9px; }
.message-rich ul, .message-rich ol { margin: 8px 0 0; padding-left: 20px; }
.message-rich li { padding-left: 2px; margin: 4px 0; }
.message-rich strong { color: #101513; font-weight: 760; }
.inline-choice-message { white-space: pre-wrap; }
.inline-choice-pill { display: inline-flex; align-items: center; vertical-align: baseline; margin: 1px 2px; padding: 2px 9px; border: 1px solid #8fbdb2; border-radius: 999px; background: #fff; color: var(--brand-strong); font: inherit; font-weight: 760; line-height: 1.45; cursor: pointer; box-shadow: 0 1px 2px rgba(37,47,43,.06); }
.inline-choice-pill:hover { border-color: var(--brand); background: var(--brand-soft); }
.inline-choice-pill.more-choice { border-style: dashed; background: var(--brand-soft); }
.inline-choice-pill.more-choice::after { content: '›'; margin-left: 5px; font-size: 1.1em; }
.inline-choice-pill:focus-visible { outline: 3px solid rgba(24,113,90,.2); outline-offset: 2px; }
.inline-choice-pill:disabled { opacity: .62; cursor: wait; }
.inline-choice-resolved { color: inherit; }
.typing-bubble { display: inline-block; }
.message-meta { margin: 5px 5px 0; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 9px; }
.message-meta button { border: 0; padding: 0; background: transparent; color: var(--brand); font-size: 9px; font-weight: 700; }
.message-meta .feedback-trigger { color: var(--muted); }
.message-meta .feedback-trigger:hover { color: #8b3b35; }
.inline-product-card { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; margin-top: 9px; padding: 11px; border: 1px solid #d9e1dd; border-radius: 16px; background: var(--surface); box-shadow: 0 7px 22px rgba(37,47,43,.065); }
.inline-product-image { width: 88px; height: 102px; border-radius: 12px; object-fit: cover; background: #edf0ef; }
.inline-product-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 1px 0; }
.inline-product-copy .inline-product-title { display: block; max-width: 100%; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inline-product-copy span { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inline-product-copy .inline-product-price { margin-top: 5px; color: var(--ink); font-size: 14px; font-weight: 760; }
.inline-product-copy .inline-product-meta { margin-top: 3px; color: var(--muted); font-size: 12px; }
.inline-product-copy .inline-product-benefit { margin-top: 4px; color: #46534e; font-size: 11.5px; }
.inline-result-capsule { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 10px; margin-top: 8px; padding: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.inline-result-capsule.comparison { background: linear-gradient(135deg, var(--surface), var(--brand-soft)); }
.inline-image-stack { width: 94px; min-width: 0; display: flex; align-items: center; overflow: hidden; padding: 1px 0 1px 3px; isolation: isolate; }
.inline-stack-image { width: 38px; height: 52px; flex: 0 0 38px; margin-left: -10px; border: 2px solid var(--surface); border-radius: 8px; object-fit: cover; background: #edf0ef; box-shadow: 0 3px 9px rgba(37,47,43,.12); }
.inline-stack-image:first-child { margin-left: 0; }
.inline-result-copy { min-width: 0; overflow: hidden; padding-top: 1px; }
.inline-result-copy strong { display: block; font-size: 11px; line-height: 1.35; }
.inline-result-copy span { display: block; max-width: 100%; margin-top: 3px; color: var(--muted); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inline-product-link { border: 0; padding: 0; margin-top: 8px; color: var(--brand); background: transparent; font-size: 11px; font-weight: 760; }
.product-view-button { padding: 7px 11px; border: 1px solid #9fc9bf; border-radius: 999px; background: var(--brand-soft); }
.product-view-button:hover { border-color: var(--brand); background: #d9eee9; }
.turn-suggestions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.turn-suggestion { border: 1px solid #a8c8c1; border-radius: 999px; padding: 8px 12px; background: #fff; color: var(--brand-strong); font-size: 11.5px; font-weight: 750; text-align: left; }
.turn-suggestion:hover { background: var(--brand-soft); }
.turn-suggestions.expired { opacity: .58; }
.typing { display: inline-flex; gap: 4px; align-items: center; height: 14px; }
.typing span { width: 5px; height: 5px; border-radius: 50%; background: #8b9691; animation: pulse 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .12s; }
.typing span:nth-child(3) { animation-delay: .24s; }
@keyframes pulse { 0%, 80%, 100% { opacity: .35; transform: scale(.85); } 40% { opacity: 1; transform: scale(1); } }
.composer-wrap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 10px; background: linear-gradient(to top, #fff 72%, rgba(255,255,255,0)); }
.composer { display: flex; align-items: flex-end; gap: 7px; border: 1px solid #cbd5d1; background: var(--surface); border-radius: 16px; padding: 7px; box-shadow: 0 14px 35px rgba(37,47,43,.12); }
.composer textarea { flex: 1; min-height: 38px; max-height: 130px; resize: none; border: 0; outline: 0; padding: 10px 8px; color: var(--ink); background: transparent; font-size: 14px; line-height: 1.45; }
.composer textarea::placeholder { color: #929c98; }
.send-button { width: 38px; height: 38px; flex: 0 0 38px; border: 0; border-radius: 12px; background: var(--brand); color: #fff; font-size: 20px; }
.send-button:hover { background: var(--brand-strong); }
.composer-note { margin-top: 6px; text-align: center; color: var(--muted); font-size: 9px; }

.product-panel { order: 2; width: 0; flex: 0 0 auto; overflow: hidden; opacity: 0; visibility: hidden; background: var(--surface); border-right: 1px solid var(--line); transition: width .28s ease, opacity .2s ease; display: flex; flex-direction: column; position: relative; z-index: 6; }
.product-panel.open { width: min(46vw, 760px); min-width: 560px; opacity: 1; visibility: visible; }
.product-panel-header { min-width: 560px; min-height: 72px; padding: 13px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.product-panel-header h2 { margin: 4px 0 0; font-family: var(--font-display); font-size: 20px; font-weight: 720; line-height: 1.2; letter-spacing: -.025em; }
.product-panel-controls { gap: 8px; }
.return-latest-button { border: 1px solid #a8c8c1; border-radius: 999px; padding: 7px 10px; background: var(--brand-soft); color: var(--brand-strong); font-size: 9px; font-weight: 750; white-space: nowrap; }
.product-panel-context { min-width: 560px; padding: 9px 22px; border-bottom: 1px solid #d5e8e3; background: var(--brand-soft); color: var(--brand-strong); font-size: 11px; line-height: 1.45; }
.product-panel-context[hidden], .return-latest-button[hidden] { display: none; }
.round-button { width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: 20px; font-weight: 400; }
.product-content { flex: 1; min-width: 560px; overflow-y: auto; padding: 0 22px 24px; }
.panel-intro { position: sticky; top: 0; z-index: 2; padding: 13px 0 9px; background: rgba(255,255,255,.96); }
.panel-intro p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.product-row-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.product-row-image { width: 120px; height: 150px; object-fit: cover; border-radius: 14px; background: #e9edeb; }
.product-row-copy { min-width: 0; padding-top: 3px; }
.product-title-line { justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 7px 10px; }
.product-title-line h3 { min-width: 0; margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 720; line-height: 1.32; letter-spacing: -.015em; overflow-wrap: anywhere; }
.status-badge { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px; padding: 4px 7px; background: var(--brand-soft); color: var(--brand-strong); font-size: 9px; font-weight: 750; }
.product-price { display: block; margin-top: 7px; font-size: 16px; line-height: 1.2; }
.product-meta { margin-top: 6px; color: #4f5c57; font-size: 13px; line-height: 1.45; }
.product-summary { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.product-row-actions { flex-wrap: wrap; gap: 9px 12px; margin-top: 12px; }
.primary-action, .secondary-action, .text-action, .compare-action { border-radius: 10px; padding: 9px 12px; font-size: 12px; font-weight: 750; }
.primary-action { border: 1px solid var(--brand); background: var(--brand); color: #fff; }
.primary-action:hover { background: var(--brand-strong); }
.secondary-action { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.text-action { border: 0; background: transparent; color: var(--brand); padding-left: 0; padding-right: 0; }
.text-action.selected { color: var(--brand-strong); }
.shortlist-toggle { white-space: nowrap; }
.compare-bar { position: sticky; bottom: 10px; justify-content: space-between; gap: 12px; margin: 12px 0 0; padding: 10px 12px; border-radius: 11px; background: var(--ink); color: #fff; box-shadow: var(--shadow); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .18s ease; }
.compare-bar.visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.compare-bar span { font-size: 11px; font-weight: 700; }
.compare-action { border: 0; background: #fff; color: var(--ink); }

.product-detail-view { min-height: 100%; padding-top: 18px; padding-bottom: 0; }
.detail-overview { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(270px, 1.1fr); gap: 22px; align-items: start; }
.detail-media { position: relative; }
.detail-image { width: 100%; height: clamp(238px, 31vh, 310px); object-fit: contain; display: block; border-radius: 17px; background: #eef1ef; }
.detail-media .status-badge { position: absolute; top: 12px; right: 12px; }
.detail-info { min-width: 0; }
.detail-heading { padding: 3px 2px 8px; }
.product-brand { color: var(--brand-strong); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.detail-heading h3 { margin: 7px 0 9px; font-family: var(--font-display); font-size: clamp(23px, 2vw, 29px); font-weight: 760; line-height: 1.13; letter-spacing: -.035em; }
.detail-price { font-size: 20px; line-height: 1.25; }
.detail-heading p { max-width: 56ch; color: var(--muted); margin: 10px 0 0; font-size: 13.5px; line-height: 1.55; }
.why-box, .decision-box { margin-top: 13px; padding: 14px; border-radius: 14px; background: var(--brand-soft); }
.why-box strong { font-size: 13px; }
.why-box ul { margin: 8px 0 0; padding-left: 18px; color: #40504b; font-size: 12px; line-height: 1.55; }
.product-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 16px 0 0; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--line); }
.fact-item { margin: 0; padding: 11px; background: var(--surface); }
.fact-item dt { color: var(--muted); font-size: 10.5px; font-weight: 680; }
.fact-item dd { margin: 5px 0 0; font-size: 12.5px; font-weight: 700; line-height: 1.35; }
.detail-actions { position: sticky; bottom: -24px; z-index: 5; gap: 9px; margin: 16px -22px -24px; padding: 13px 22px 15px; border-top: 1px solid var(--line); background: rgba(255,255,255,.97); box-shadow: 0 -10px 26px rgba(37,47,43,.08); backdrop-filter: blur(12px); }
.primary-action.large, .secondary-action.large { padding: 10px 14px; font-size: 12px; }
.selection-confirmed { display: inline-flex; align-items: center; min-height: 35px; padding: 0 11px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-strong); font-size: 11px; font-weight: 750; }

.comparison-view { padding-top: 15px; }
.comparison-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 9px; }
.comparison-product { min-width: 0; position: relative; }
.comparison-image { width: 100%; height: 132px; object-fit: cover; border-radius: 11px; background: #edf0ef; }
.comparison-product strong { display: block; margin-top: 7px; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comparison-product > span:not(.status-badge) { color: var(--muted); font-size: 10px; }
.comparison-product .status-badge { position: absolute; top: 8px; left: 8px; }
.comparison-table-wrap { overflow-x: auto; margin-top: 15px; border: 1px solid var(--line); border-radius: 12px; }
.comparison-table { width: 100%; min-width: 500px; border-collapse: collapse; font-size: 10px; }
.comparison-table th, .comparison-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.comparison-table thead th { background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 700; }
.comparison-table tbody th { width: 96px; color: var(--muted); font-weight: 650; }
.comparison-table tr:last-child th, .comparison-table tr:last-child td { border-bottom: 0; }
.decision-box { padding: 15px; }
.decision-box h3 { margin: 5px 0 4px; font-size: 14px; }
.decision-box p { margin: 0 0 10px; color: #40504b; font-size: 10px; line-height: 1.5; }
.historical-comparison-action { margin-top: 12px; }
.shortlist-view { padding-top: 12px; }
.shortlist-card { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.shortlist-image { width: 86px; height: 108px; object-fit: cover; border-radius: 11px; background: #edf0ef; }
.shortlist-copy { min-width: 0; padding-top: 3px; }
.shortlist-copy > strong { display: block; font-size: 14px; line-height: 1.35; }
.shortlist-copy > span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.shortlist-compare { margin-top: 14px; }
.shortlist-toast { position: absolute; right: 18px; bottom: 18px; z-index: 35; width: min(360px, calc(100vw - 36px)); padding: 13px 14px; border: 1px solid #a8c8c1; border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.shortlist-toast[hidden] { display: none; }
.shortlist-toast strong, .shortlist-toast span { display: block; }
.shortlist-toast strong { font-size: 12px; }
.shortlist-toast span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.shortlist-toast-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.toast-action { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: #fff; color: var(--ink); font-size: 10px; font-weight: 750; }
.toast-action.primary { border-color: var(--brand); background: var(--brand); color: #fff; }
.empty-panel { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty-panel strong { color: var(--ink); }
.empty-panel p { font-size: 11px; }
.no-match-view { display: flex; min-height: 420px; padding: 54px 26px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 13px; }
.no-match-view h3, .no-match-view p { margin: 0; }
.no-match-view p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.no-match-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-size: 20px; transform: rotate(90deg); }
.no-match-label { margin-top: 6px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.requirement-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.requirement-chip { padding: 7px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 10px; text-transform: capitalize; }
.no-match-guidance { padding: 10px 12px; border-left: 2px solid var(--brand); background: var(--brand-soft); }

.trace-panel, .usage-panel { position: absolute; inset: 0 0 0 auto; width: min(58vw, 760px); z-index: 20; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease; box-shadow: -18px 0 55px rgba(0,0,0,.24); }
.trace-panel { background: var(--trace-bg); color: var(--trace-ink); }
.trace-panel.open { transform: translateX(0); }
.trace-header { min-height: 68px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid rgba(255,255,255,.09); }
.trace-header strong { display: block; font-size: 13px; }
.trace-header span { display: block; margin-top: 3px; color: #92a69f; font-size: 10px; }
.trace-close { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: var(--trace-ink); }
.trace-meta { padding: 11px 17px; border-bottom: 1px solid rgba(255,255,255,.07); color: #92a69f; font-size: 10px; }
.trace-content { flex: 1; margin: 0; padding: 17px; overflow: auto; color: var(--trace-ink); font: 10px/1.55 Consolas, "Liberation Mono", monospace; white-space: pre-wrap; }

.usage-panel { width: min(42vw, 560px); background: var(--surface); color: var(--ink); }
.usage-panel.open { transform: translateX(0); }
.usage-header { min-height: 68px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.usage-header strong, .usage-header span { display: block; }
.usage-header strong { font-size: 15px; }
.usage-header span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.usage-content { flex: 1; overflow: auto; padding: 20px; background: var(--surface-soft); }
.usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.usage-metric { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.usage-metric span, .usage-metric strong, .usage-metric small { display: block; }
.usage-metric span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.usage-metric strong { margin-top: 8px; font-size: 21px; line-height: 1.15; }
.usage-metric small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.usage-health { margin-top: 13px; padding: 15px; border-radius: 13px; background: var(--brand-soft); }
.usage-health strong, .usage-health span { display: block; }
.usage-health strong { font-size: 12px; }
.usage-health span { margin-top: 6px; color: #40504b; font-size: 11px; line-height: 1.5; }
.usage-actions { padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.usage-actions span { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.usage-download { width: 100%; border: 0; border-radius: 10px; padding: 11px 14px; background: var(--brand); color: #fff; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.usage-download:hover { filter: brightness(.94); }
.usage-download:focus-visible { outline: 3px solid rgba(24, 113, 90, .22); outline-offset: 2px; }
.usage-note { padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.45; }
.usage-empty { color: var(--muted); font-size: 12px; }

.feedback-dialog { width: min(92vw, 520px); padding: 0; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--surface); box-shadow: 0 28px 85px rgba(15,25,22,.28); }
.feedback-dialog::backdrop { background: rgba(11,18,16,.45); backdrop-filter: blur(2px); }
.feedback-dialog form { padding: 20px; }
.feedback-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.feedback-heading h2 { margin: 5px 0 0; font-size: 20px; }
.feedback-dialog form > p { margin: 10px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.feedback-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.feedback-reasons label { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 11.5px; line-height: 1.35; cursor: pointer; }
.feedback-reasons label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.feedback-note { display: block; margin-top: 16px; font-size: 11px; font-weight: 750; }
.feedback-note span { color: var(--muted); font-weight: 500; }
.feedback-note textarea { width: 100%; margin-top: 7px; padding: 10px 11px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; font: inherit; line-height: 1.45; box-sizing: border-box; }
.feedback-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.feedback-actions span { color: var(--muted); font-size: 10px; }
.feedback-actions .primary-action { padding: 9px 13px; }

@media (max-width: 1180px) {
  .storefront { display: none; }
  .chat-panel { width: 100%; max-width: 520px; min-width: 350px; }
  .products-open .chat-panel { width: 38vw; max-width: none; min-width: 0; }
  .product-panel.open { width: 62vw; min-width: 0; }
  .product-panel-header, .product-panel-context, .product-content { min-width: 0; }
  .detail-overview { grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.2fr); gap: 16px; }
  .detail-image { height: clamp(220px, 30vh, 280px); }
  .product-facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .topbar { padding: 0 12px; }
  .brand-subtitle { max-width: 130px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .stage-pill, .topbar-button.secondary { display: none; }
  .chat-panel, .products-open .chat-panel { width: 100%; max-width: none; min-width: 0; border-right: 0; }
  .product-panel, .product-panel.open { position: absolute; inset: 0; width: 100%; min-width: 0; transform: translateX(100%); transition: transform .24s ease; }
  .product-panel.open { transform: translateX(0); }
  .product-panel-header, .product-panel-context, .product-content { min-width: 0; }
  .product-content { padding-left: 13px; padding-right: 13px; }
  .detail-overview { grid-template-columns: 1fr; gap: 14px; }
  .detail-image { height: min(34vh, 260px); }
  .detail-actions { bottom: -24px; margin-left: -13px; margin-right: -13px; padding-left: 13px; padding-right: 13px; }
  .product-row-card { grid-template-columns: 96px minmax(0, 1fr); gap: 13px; }
  .product-row-image { width: 96px; height: 122px; }
  .product-title-line h3 { font-size: 14px; }
  .product-summary { font-size: 11px; }
  .trace-panel, .usage-panel { width: 100%; }
  .message-wrap { max-width: 94%; }
  .feedback-reasons { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
