/* ======================================================================
   商城 AI 助手 · 对话界面 v28
   参考主流智能体对话页：白底阅读流 / 渐变欢迎卡 / 浅紫用户气泡 /
   灰色“查询过程”条 / 反馈行 + 猜你想问 / 列表式商品卡 / 胶囊输入框。
   v28：“查询过程”逐步实时更新（按 step_id 原位刷新、显示查询条件），运行中自动展开。
   保留原业务组件 class 与 hidden、disabled、aria-busy 状态；无外部字体及图标依赖。
   ====================================================================== */

/* 01 / Design tokens */
:root {
  color-scheme: light;
  --ink: #1d1d22;
  --ink-2: #5f5f6b;
  --ink-3: #9b9ba6;
  --line: #f0f0f3;
  --line-2: #e7e7ed;
  --bg: #f5f5f7;
  --card: #fff;
  --brand: #6d4fe0;
  --brand-deep: #5638c9;
  --brand-wash: #f1edfd;
  --brand-soft: #d9cff9;
  --brand-grad: linear-gradient(135deg,#8f6dff 0%,#6d4fe0 52%,#4f7bff 100%);
  --user-bubble: #efeafd;
  --user-ink: #2a2140;
  --price: #f2270c;
  --action: #f2270c;
  --shop: #f26b0f;
  --success: #1f8a62;
  --success-wash: #eaf7f1;
  --warn: #9a6512;
  --warn-wash: #fff6e6;
  --danger: #d0323f;
  --danger-wash: #fff0f1;
  --radius: 14px;
  --radius-sm: 10px;
  --dur: .2s;
  --ease: cubic-bezier(.2,.7,.25,1);
  --shadow-card: none;
  --shadow-pop: 0 6px 24px rgba(24,22,40,.1);
  --safe-b: env(safe-area-inset-bottom,0px);
  --dock-height: 124px;
  --page-inset: 16px;
  --message-size: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system,BlinkMacSystemFont,"PingFang SC","HarmonyOS Sans SC","Microsoft YaHei","Noto Sans CJK SC",system-ui,sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
body.keyboard-open { --safe-b: 0px; }
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; padding: 0; background: none; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
button[aria-busy="true"] { cursor: progress; }
button:focus-visible, [tabindex]:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
h1,h2,h3,h4,p { margin: 0; }
img,svg { display: block; }
img { max-width: 100%; }
::selection { background: #e2d9fc; color: #2a1d55; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; }
.clipboard-fallback { position: fixed; top: 0; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.app {
  position: fixed;
  top: var(--viewport-top,0px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 840px;
  height: var(--viewport-height,100dvh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}
.app[data-text-size="large"] { --message-size: 18px; }

/* 02 / Header：头像 + 标题 + 连接状态，右侧菜单 */
.app-header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: calc(56px + env(safe-area-inset-top,0px));
  padding: calc(8px + env(safe-area-inset-top,0px)) max(var(--page-inset),env(safe-area-inset-right,0px)) 8px max(var(--page-inset),env(safe-area-inset-left,0px));
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  z-index: 30;
  transition: border-color var(--dur) var(--ease);
}
.has-scrolled .app-header { border-bottom-color: var(--line); }
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.brand-avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: var(--brand-grad); box-shadow: 0 3px 10px rgba(109,79,224,.22); }
.brand-avatar svg { width: 20px; height: 20px; stroke-width: 1.6; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.brand-copy h1 { font-size: 16px; line-height: 1.35; letter-spacing: -.2px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-copy p { color: var(--ink-3); font-size: 11px; line-height: 1.4; }
.header-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.header-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--bg);
  color: #3b3b44;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform .14s var(--ease);
}
.header-pill-btn svg { flex: none; }
.header-pill-btn:active { background: var(--brand-wash); color: var(--brand-deep); transform: scale(.96); }
.conn { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; line-height: 1.4; color: var(--ink-3); white-space: nowrap; }
.conn-dot { width: 6px; height: 6px; border-radius: 50%; background: #c6c6cf; flex: none; }
.conn[data-state="ready"] .conn-dot { background: #2fb37c; box-shadow: 0 0 0 3px rgba(47,179,124,.14); }
.conn[data-state="error"] { color: var(--danger); }
.conn[data-state="error"] .conn-dot { background: var(--danger); }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; flex: none; color: #3b3b44; transition: background var(--dur) var(--ease), transform .14s var(--ease), color var(--dur) var(--ease); }
.icon-button:active { background: var(--bg); transform: scale(.93); }
.header-menu { margin-right: -6px; }

/* 03 / Timeline & welcome：渐变欢迎卡 + 2x2 任务入口 + 猜你想问 */
.timeline-wrap { position: relative; display: flex; flex: 1; min-height: 0; }
.timeline {
  flex: 1;
  min-width: 0;
  padding: 6px max(var(--page-inset),env(safe-area-inset-right,0px)) calc(var(--dock-height) + 24px) max(var(--page-inset),env(safe-area-inset-left,0px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
  scrollbar-width: thin;
  scrollbar-color: #e4e4ea transparent;
}
.timeline::-webkit-scrollbar { width: 3px; }
.timeline::-webkit-scrollbar-thumb { background: #e4e4ea; border-radius: 3px; }
.timeline.is-entering { animation: timeline-enter .24s var(--ease); }
.empty-state { position: relative; isolation: isolate; max-width: 560px; margin: 0 auto; padding: 8px 0 24px; animation: welcome-enter .28s var(--ease); }
.empty-state::before { content: none; }
.welcome-copy { position: relative; overflow: hidden; isolation: isolate; padding: 20px 18px 18px; border: 1px solid rgba(109,79,224,.08); border-radius: 20px; background: linear-gradient(155deg,#f2edff 0%,#f6f3ff 42%,#edf3ff 100%); }
.welcome-copy::before,.welcome-copy::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.welcome-copy::before { width: 150px; height: 150px; right: -40px; top: -56px; background: radial-gradient(circle,rgba(143,109,255,.22) 0%,rgba(143,109,255,0) 70%); }
.welcome-copy::after { width: 120px; height: 120px; right: 34px; bottom: -70px; background: radial-gradient(circle,rgba(79,123,255,.16) 0%,rgba(79,123,255,0) 70%); }
.welcome-eyebrow { display: flex; align-items: center; gap: 7px; font-size: 13px; line-height: 1.5; color: var(--brand-deep); font-weight: 500; }
.welcome-dot { width: 7px; height: 7px; background: var(--brand-grad); border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.8); }
.empty-state h2 { margin-top: 10px; font-size: clamp(22px,6.6vw,28px); line-height: 1.4; letter-spacing: -.5px; font-weight: 650; color: var(--ink); }
.empty-state h2 span { color: var(--brand); background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.empty-hint { margin-top: 8px; color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.mobile-break { display: none; }
.task-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.task-entry { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 104px; border: 1px solid #efeff3; border-radius: 16px; padding: 13px 13px 12px; text-align: left; background: #fff; box-shadow: 0 2px 10px rgba(24,22,40,.03); transition: transform .18s var(--ease),border-color var(--dur),box-shadow var(--dur),background var(--dur); }
.task-entry:active { transform: scale(.98); border-color: var(--brand-soft); }
.task-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 8px; border-radius: 10px; color: var(--brand); background: #f0ebff; }
.task-icon svg { width: 19px; height: 19px; stroke-width: 1.8; }
.task-entry--compare .task-icon { color: #2f74e8; background: #e9f2ff; }
.task-entry--order .task-icon { color: #e8731f; background: #fff1e6; }
.task-entry--truck .task-icon { color: #1f9566; background: #e7f7ef; }
.task-title { font-size: 14.5px; line-height: 1.45; font-weight: 600; letter-spacing: -.1px; }
.task-desc { color: var(--ink-3); font-size: 11.5px; line-height: 1.5; }
.task-arrow { position: absolute; right: 12px; top: 18px; color: #c4c4cc; }
.task-arrow svg { width: 15px; height: 15px; }
.starter-questions { margin-top: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.starter-label { font-size: 13px; line-height: 1.5; color: var(--ink-3); margin-bottom: 0; }
.starter-question { min-height: 42px; width: auto; max-width: 100%; display: inline-flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: var(--bg); text-align: left; font-size: 14px; line-height: 1.5; color: #33333b; transition: background var(--dur),color var(--dur),transform .14s var(--ease); }
.starter-question svg { color: #b0b0ba; flex: none; width: 15px; height: 15px; }
.starter-question:active { background: var(--brand-wash); color: var(--brand-deep); transform: scale(.98); }
.scroll-bottom { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--dock-height) + 12px); width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #ececf1; border-radius: 50%; background: rgba(255,255,255,.98); color: #4a4a54; box-shadow: var(--shadow-pop); z-index: 12; animation: pop-up .18s var(--ease); transition: transform .15s var(--ease), background var(--dur); }
.scroll-bottom svg { width: 19px; height: 19px; }
.scroll-bottom:active { transform: translate(-50%,2px) scale(.94); }

/* 04 / Messages：助手回答整宽阅读，用户为右侧浅紫气泡 */
.message { display: flex; gap: 0; margin: 18px 0 14px; animation: rise-in .2s var(--ease); }
.avatar { display: none; }
.message--user { justify-content: flex-end; margin: 16px 0 20px; }
.bubble { min-width: 0; overflow-wrap: anywhere; }
.message--user .bubble { max-width: 80%; padding: 10px 14px; background: var(--user-bubble); color: var(--user-ink); border-radius: 18px 18px 4px 18px; font-size: calc(var(--message-size) - .5px); line-height: 1.6; white-space: pre-wrap; }
.message--assistant .bubble { width: 100%; max-width: 100%; padding: 0; background: transparent; border: 0; box-shadow: none; color: var(--ink); font-size: var(--message-size); line-height: 1.75; }
.message--user.queued .bubble { opacity: .7; }
.queued-tag { display: block; margin-top: 4px; font-size: 11px; color: var(--brand); white-space: normal; }
.message-body { min-width: 0; }
.message-body p + p { margin-top: 10px; }
.message-body h2,.message-body h3 { font-size: calc(var(--message-size) + 1px); line-height: 1.55; font-weight: 650; margin: 18px 0 8px; letter-spacing: -.2px; }
.message-body h3 { font-size: var(--message-size); }
.message-body > :first-child { margin-top: 0; }
.message-body strong { font-weight: 650; color: #111116; }
.message-body ul,.message-body ol { margin: 8px 0 10px; padding-left: 20px; }
.message-body li { padding-left: 2px; margin: 4px 0; }
.message-body li::marker { color: #9a88e6; }
.message-body a { color: var(--brand-deep); text-decoration: underline; text-decoration-color: rgba(86,56,201,.35); text-underline-offset: 3px; }
.message-body blockquote { margin: 12px 0; padding: 9px 13px; border-left: 3px solid var(--brand-soft); background: #f8f7fb; color: #5d5a6b; border-radius: 0 10px 10px 0; font-size: calc(var(--message-size) - 1px); }
.message-body hr { height: 1px; border: 0; background: var(--line); margin: 18px 0; }
.message-body code { background: #f2f2f6; border-radius: 5px; padding: 2px 5px; color: #5a3fbf; font-size: .86em; word-break: break-word; }
.message-body pre { margin: 12px 0; padding: 14px; max-width: 100%; overflow: auto; background: #f7f7f9; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; line-height: 1.7; }
.message-body pre code { background: transparent; padding: 0; color: inherit; white-space: pre; word-break: normal; }
/* 回答底部：复制 / 有帮助 / 没帮助 + 内容由AI生成 */
.message-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; margin-top: 6px; color: var(--ink-3); }
.message-actions-left { display: flex; align-items: center; gap: 0; margin-left: -12px; }
.message-copy,.message-feedback { display: grid; place-items: center; width: 44px; height: 36px; border-radius: 9px; color: #8b8b96; transition: color var(--dur),background var(--dur); }
.message-copy svg,.message-feedback svg { width: 18px; height: 18px; }
.message-copy:active,.message-copy.is-copied { color: var(--brand); background: var(--brand-wash); }
.message-feedback:active { background: var(--bg); }
.message-feedback[aria-pressed="true"] { color: var(--brand); }
.message-feedback[aria-pressed="true"] svg .fill-on-press { fill: currentColor; fill-opacity: .16; }
.message-disclaimer { font-size: 11px; color: #b4b4be; letter-spacing: .2px; white-space: nowrap; }
.streaming .message-actions, .message-body:empty + .message-actions { display: none; }
/* 等待首字：三点跳动；输出中：末尾光标 */
.message--assistant.streaming .message-body:empty::after { content: ""; display: block; width: 7px; height: 7px; margin: 12px 0 12px 2px; border-radius: 50%; background: #c9bdf6; box-shadow: 11px 0 #c9bdf6,22px 0 #c9bdf6; animation: typing-dots 1.1s ease-in-out infinite; }
.message--assistant.streaming .message-body > p:last-child::after,
.message--assistant.streaming .message-body > ul:last-child > li:last-child::after,
.message--assistant.streaming .message-body > ol:last-child > li:last-child::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -.16em; border-radius: 1px; background: var(--brand); animation: caret-blink 1s steps(1) infinite; }
.markdown-table-scroll { margin: 14px 0; max-width: 100%; overflow: auto; overscroll-behavior-x: contain; border: 1px solid var(--line-2); border-radius: 12px; }
.markdown-table { border-collapse: separate; border-spacing: 0; min-width: 100%; width: max-content; font-size: 13.5px; line-height: 1.6; }
.markdown-table th,.markdown-table td { padding: 10px 12px; min-width: 104px; max-width: 230px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: normal; }
.markdown-table th { background: #f6f6f8; color: #3a3a43; font-weight: 600; }
.markdown-table tr:last-child td { border-bottom: 0; }
.markdown-table .align-center { text-align: center; }
.markdown-table .align-right { text-align: right; }

/* 05 / Real query progress：灰色“查询过程”条。原生 details 保留展开状态。 */
.timeline-status { width: fit-content; min-width: min(240px,100%); max-width: 100%; margin: 6px 0 12px; border: 0; border-radius: 12px; background: var(--bg); color: var(--ink-2); font-size: 13px; overflow: hidden; }
.timeline-status[open] { width: 100%; }
.process-summary { display: flex; gap: 8px; align-items: center; cursor: pointer; list-style: none; min-height: 40px; padding: 8px 12px; }
.process-summary::-webkit-details-marker { display: none; }
.process-current { flex: 1; min-width: 0; font-size: 13px; line-height: 1.5; color: #4c4c56; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.process-caption { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.process-chevron { color: #a3a3ad; flex: none; transform: rotate(90deg); transition: transform var(--dur); }
.process-chevron svg { width: 14px; height: 14px; }
.timeline-status[open] .process-chevron { transform: rotate(-90deg); }
.status-spinner { width: 14px; height: 14px; flex: none; border: 1.6px solid #ddd5fb; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.status-check,.status-error { width: 16px; height: 16px; display: grid; place-items: center; flex: none; border-radius: 50%; }
.status-check { color: #fff; background: #2fb37c; }
.status-check svg { width: 10px; height: 10px; }
.status-error { color: var(--danger); }
.timeline-status[data-state="partial"] .status-error { color: var(--warn); }
.timeline-status[data-state="failed"], .timeline-status[data-state="error"] { background: #fff5f6; }
.process-steps { list-style: none; margin: 0 12px 10px 19px; padding: 2px 0 0 14px; border-left: 1px dashed #d7d7df; color: #8a8a95; font-size: 12.5px; line-height: 1.6; }
.process-steps li { position: relative; padding: 4px 0 5px; }
.process-steps li::before { content: ""; position: absolute; left: -18px; top: 11px; width: 7px; height: 7px; background: #cfcfd8; border-radius: 50%; box-shadow: 0 0 0 3px var(--bg); }
.process-steps li.is-current { color: #45454f; }
.process-steps li.is-current::before { background: var(--brand); }
.process-steps li[data-state="failed"], .process-steps li[data-state="error"] { color: var(--danger); }
/* v28：逐步实时进度。进行中的步骤呼吸提示；完成为绿点；部分/待核实为琥珀色，不使用成功样式。 */
.process-step-label { display: block; }
.process-step-detail { display: block; margin-top: 1px; color: var(--ink-3); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.process-steps li[data-state="running"] { color: #45454f; }
.process-steps li[data-state="running"]::before { background: var(--brand); animation: breathing 1.2s ease-in-out infinite; }
.process-steps li[data-state="completed"]::before, .process-steps li[data-state="done"]::before { background: #2fb37c; }
.process-steps li[data-state="partial"] { color: var(--warn); }
.process-steps li[data-state="partial"]::before { background: var(--warn); }
.process-steps li[data-state="failed"]::before, .process-steps li[data-state="error"]::before { background: var(--danger); }
.process-steps li[data-state="skipped"], .process-steps li[data-state="cancelled"] { color: var(--ink-3); }
.process-steps li[data-state="skipped"]::before, .process-steps li[data-state="cancelled"]::before { background: transparent; border: 1px solid #c4c4cd; width: 5px; height: 5px; }
.status-skip { width: 14px; height: 14px; flex: none; border: 1.6px solid #c4c4cd; border-radius: 50%; }

/* 06 / Shared result cards：浅边框、无阴影 */
.card { min-width: 0; margin: 10px 0; background: var(--card); border: 1px solid #ececf1; border-radius: var(--radius); overflow: hidden; overflow-wrap: anywhere; box-shadow: var(--shadow-card); }
.card-updated { animation: card-flash .3s var(--ease); }
.card-header { display: flex; align-items: center; gap: 10px; padding: 14px 14px 0; }
.card-title { min-width: 0; flex: 1; }
.card-title h3 { font-size: 15px; line-height: 1.5; font-weight: 600; }
.card-meta { color: var(--ink-2); font-size: 12px; }
.card-title .card-meta { margin-top: 2px; color: var(--ink-3); }
.card-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 14px; padding: 12px 14px; }
.card-detail-label { display: block; font-size: 12px; color: var(--ink-3); }
.card-detail-value { display: block; font-size: 14px; color: var(--ink); margin-top: 2px; overflow-wrap: anywhere; }
.card-status { display: inline-block; flex: none; font-size: 11.5px; line-height: 1.3; padding: 4px 8px; border-radius: 6px; background: var(--bg); color: var(--ink-2); }
.card-status.success { background: var(--success-wash); color: var(--success); }
.card-status.warning { background: var(--warn-wash); color: var(--warn); }
.card-status.error { background: var(--danger-wash); color: var(--danger); }
.card-status.info { background: #edf3fe; color: #3f6fc0; }
.tag { display: inline-block; font-size: 11px; line-height: 1.3; padding: 2px 5px; border-radius: 4px; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.tag-warn { background: var(--warn-wash); color: var(--warn); }
.tag-danger { background: var(--danger-wash); color: var(--danger); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 15px; border-radius: 10px; font-size: 13px; font-weight: 600; transition: opacity var(--dur),transform var(--dur),background var(--dur); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; }
.btn-solid { background: var(--action); color: #fff; }
.btn-ghost { color: var(--ink-2); background: var(--bg); }
.card-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 10px 14px 12px; border-top: 1px solid var(--line); }
.card-actions button { min-height: 40px; padding: 0 16px; border-radius: 20px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; }
.card-actions button.secondary { background: var(--brand-wash); color: var(--brand-deep); }
.card-actions button:disabled { opacity: .45; }

/* 07 / 商品卡：列表式行布局（参考电商智能体）。SKU、库存与价格节点保持原逻辑。 */
.card-product { margin: 0; border: 0; border-radius: 0; background: transparent; overflow: visible; animation: none; }
.card-product + .card-product { border-top: 1px solid var(--line); }
.card-product.card-updated { animation: none; }
.pcard { display: flex; gap: 12px; padding: 14px 0; align-items: flex-start; }
.pcard.is-clickable { cursor: pointer; border-radius: 12px; }
.pcard.is-clickable:focus-visible { outline-offset: 2px; }
.pcard-media { width: 92px; height: 92px; flex: none; border-radius: 10px; border: 1px solid var(--line); background: #f7f7f9; object-fit: contain; }
.pcard-media--empty { display: grid; place-items: center; color: #c3c3cb; }
.pcard-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pcard-name { font-size: 15px; line-height: 1.45; font-weight: 500; color: var(--ink); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.pcard-shop { display: block; max-width: 100%; font-size: 12px; line-height: 1.5; color: var(--shop); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-spec { color: var(--ink-3); font-size: 12px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pcard-promo { display: inline-block; max-width: 100%; padding: 0 4px; border: 1px solid rgba(242,39,12,.42); border-radius: 3px; color: var(--price); font-size: 11px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-review { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-catalog-price { color: var(--ink-3); font-size: 12px; line-height: 1.5; }
.pcard-bottom { display: flex; gap: 6px; justify-content: space-between; align-items: flex-end; margin-top: 2px; }
.pcard-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; flex: 1; min-width: 0; padding-bottom: 8px; }
.pcard-price { color: var(--price); display: inline-flex; align-items: baseline; flex-wrap: wrap; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pcard-price-label { flex-basis: 100%; color: var(--ink-3); font-size: 11px; font-weight: 400; margin: 0 0 2px; }
.pcard-price-pending { color: var(--ink-2); font-size: 13px; }
.pcard-price-symbol { font-style: normal; font-size: 12px; font-weight: 600; margin-right: 1px; }
.pcard-price-int { font-size: 21px; font-weight: 700; letter-spacing: -.5px; }
.pcard-price-rest { font-size: 13px; font-weight: 600; }
.pcard-price-suffix { color: var(--price); font-size: 11px; line-height: 1.3; font-weight: 500; }
.pcard-meta .tag { align-self: center; }
.pcard-actions { display: flex; gap: 2px; align-items: center; flex: none; padding: 0; margin: 0 -7px 0 0; border: 0; }
.pcard-actions .btn-ghost { gap: 0; min-width: 0; padding: 0 2px 0 6px; color: #9b9ba6; background: transparent; font-size: 12px; font-weight: 400; }
.pcard-actions .btn-ghost svg { width: 13px; height: 13px; }
/* 视觉 30px 红色加购按钮，透明边框保证 44px 触控区 */
.pcard-actions .btn-solid { width: 44px; height: 44px; min-width: 44px; padding: 0; border-radius: 50%; border: 7px solid transparent; background-clip: padding-box; background-color: var(--action); }
.pcard-actions .btn-solid svg { width: 17px; height: 17px; }
.pcard-actions .btn-solid:disabled { opacity: .5; }
.spec-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 0; }
.spec-chip { max-width: 100%; min-height: 44px; padding: 6px 10px; border: 1px solid transparent; border-radius: 8px; background: var(--bg); color: #44444d; font-size: 12px; line-height: 1.4; text-align: left; overflow-wrap: anywhere; transition: border-color var(--dur),background var(--dur),color var(--dur); }
.spec-chip.is-selected { border-color: var(--brand); background: var(--brand-wash); color: var(--brand-deep); }
.spec-chip.is-disabled { opacity: .4; text-decoration: line-through; }
.card-note { display: flex; align-items: flex-start; gap: 7px; margin: 0 14px 12px; padding: 8px 10px; border-radius: 9px; background: var(--warn-wash); color: var(--warn); font-size: 12px; line-height: 1.65; }
.card-product .card-note { margin: -4px 0 14px; }
.card-note-icon { flex: none; display: grid; place-items: center; margin-top: 3px; }
.card-note.info { background: #f4f3f8; color: #6d6a7c; }
.card-note.error { background: var(--danger-wash); color: var(--danger); }

/* 08 / Order cards */
.ocard { padding: 14px; }
.ocard.is-clickable { cursor: pointer; }
.ocard.is-clickable:focus-visible { outline-offset: -3px; }
.ocard-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ocard-no { min-width: 0; color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-pill,.status-pill { flex: none; display: inline-block; padding: 4px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 500; line-height: 1.3; white-space: nowrap; }
.order-pill.tone-warning,.status-pill[data-tone="pending"] { background: var(--warn-wash); color: var(--warn); }
.order-pill.tone-info,.status-pill[data-tone="shipped"] { background: #edf3fe; color: #3f6fc0; }
.order-pill.tone-cyan { background: #e9f6f7; color: #2f7f84; }
.order-pill.tone-purple,.status-pill[data-tone="review"] { background: var(--brand-wash); color: var(--brand-deep); }
.order-pill.tone-success,.status-pill[data-tone="done"] { background: var(--success-wash); color: var(--success); }
.order-pill.tone-muted,.status-pill[data-tone="cancel"] { background: var(--bg); color: var(--ink-2); }
.ocard-items { display: flex; flex-direction: column; gap: 8px; }
.ocard-item { display: block; font-size: 14px; line-height: 1.55; }
.ocard-item-primary { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ocard-item-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ocard-item-spec { max-width: 33%; flex: none; color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ocard-item-qty { flex: none; font-size: 12px; color: var(--ink-3); }
.ocard-item--more { color: var(--ink-3); font-size: 12px; }
.ocard-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 11px; font-size: 12px; }
.ocard-time { color: var(--ink-3); }
.ocard-total { color: var(--ink-2); margin-left: auto; }
.ocard-total b { color: var(--ink); font-size: 15px; font-weight: 650; }
.ocard-cue { color: var(--brand); flex: none; }

/* 09 / Cart cards：商品卡（媒体+价格）与订单卡（头部/汇总脚）的视觉语言 */
.ccard { padding: 14px; }
.ccard-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.ccard-title { font-size: 14px; line-height: 1.4; font-weight: 650; color: var(--ink); }
.ccard-count { flex: none; padding: 4px 8px; border-radius: 6px; background: var(--bg); color: var(--ink-2); font-size: 11.5px; font-weight: 500; line-height: 1.3; white-space: nowrap; }
.ccard-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.ccard-media { width: 72px; height: 72px; flex: none; border-radius: 10px; border: 1px solid var(--line); background: #f7f7f9; object-fit: contain; }
.ccard-media--empty { display: grid; place-items: center; color: #c3c3cb; }
.ccard-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ccard-name { font-size: 14.5px; line-height: 1.45; font-weight: 500; color: var(--ink); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.ccard-spec { color: var(--ink-3); font-size: 12px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard-warn { color: var(--warn); font-size: 11.5px; line-height: 1.5; }
.ccard-bottom { display: flex; gap: 6px; justify-content: space-between; align-items: flex-end; margin-top: 2px; flex-wrap: wrap; }
.ccard-price { color: var(--price); display: inline-flex; align-items: baseline; flex-wrap: wrap; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ccard-price-symbol { font-style: normal; font-size: 12px; font-weight: 600; margin-right: 1px; }
.ccard-price-int { font-size: 20px; font-weight: 700; letter-spacing: -.5px; }
.ccard-price-rest { font-size: 12.5px; font-weight: 600; }
.ccard-stepper { display: flex; align-items: center; gap: 6px; }
.ccard-step { width: 30px; height: 30px; min-width: 30px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); font-size: 16px; line-height: 1; display: grid; place-items: center; }
.ccard-step:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.ccard-step:disabled { opacity: .35; }
.ccard-qty { min-width: 34px; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.ccard-remove { height: 30px; padding: 0 10px; border-radius: 15px; border: 1px solid rgba(220, 38, 38, .28); background: transparent; color: var(--danger); font-size: 12px; line-height: 1; display: inline-flex; align-items: center; }
.ccard-remove:hover:not(:disabled) { background: var(--danger-wash); }
.ccard-remove:disabled { opacity: .35; }
.ccard-item--more { color: var(--ink-3); font-size: 12.5px; line-height: 1.6; }
.ccard-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; border-top: 1px solid var(--line); padding-top: 11px; font-size: 12px; }
.ccard-summary { color: var(--ink-3); }
.ccard-total { color: var(--ink-2); }
.ccard-total b { color: var(--price); font-size: 16px; font-weight: 700; }
.ccard-cta { height: 32px; padding: 0 16px; margin-left: auto; border: 0; border-radius: 16px; background: var(--action); color: #fff; font-size: 13px; font-weight: 600; line-height: 1; }
.ccard-cta:disabled { opacity: .5; }
.ccard-native { height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 16px; background: transparent; color: var(--ink-2); font-size: 12.5px; line-height: 1; }
.ccard-native:hover { border-color: var(--brand); color: var(--brand); }
.card-logistics .card-detail-grid { grid-template-columns: 1fr; gap: 12px; }
.card-logistics .card-detail { display: flex; align-items: baseline; gap: 16px; }
.card-logistics .card-detail-label { min-width: 48px; }
.card-logistics .card-detail-value { font-variant-numeric: tabular-nums; }
.card-native_entry .card-header { padding-bottom: 12px; }
.card-native_entry > .card-meta { display: block; padding: 0 14px 12px; }

/* 09 / Action results: never style UNKNOWN as success */
.result-head { display: flex; align-items: center; gap: 9px; padding: 14px 14px 6px; }
.result-icon { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--success); background: var(--success-wash); }
.result-icon.is-error,.result-icon[data-tone="fail"] { color: var(--danger); background: var(--danger-wash); }
.result-icon.is-unknown,.result-icon[data-tone="unknown"] { color: var(--warn); background: var(--warn-wash); }
.result-title { font-size: 15px; line-height: 1.55; font-weight: 600; }
.result-body { padding: 0 14px 12px; }
.result-product { font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-bottom: 6px; }
.result-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; font-size: 13px; }
.result-label { color: var(--ink-3); flex: none; }
.result-value { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.result-value.money { color: var(--price); font-size: 15px; font-weight: 650; }
.result-sub { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.result-copy { min-width: 0; }
.result-amount-row { padding: 8px 14px 14px; }
.card-link-action { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 46px; padding: 11px 14px; border-top: 1px solid var(--line); color: var(--brand); font-size: 13.5px; font-weight: 600; }
.card-link-cue { display: grid; place-items: center; }

/* 10 / Checkout preview, addresses, quotation expiry */
.checkout-head { flex-wrap: wrap; padding: 14px 14px 10px; }
.checkout-countdown { flex: none; font-size: 11px; padding: 4px 7px; border-radius: 6px; color: var(--warn); background: var(--warn-wash); }
.card.is-expired .checkout-countdown { color: var(--danger); background: var(--danger-wash); }
.checkout-blockers { display: flex; align-items: flex-start; gap: 7px; margin: 0 14px 10px; padding: 10px 11px; border-radius: 9px; color: var(--warn); background: var(--warn-wash); }
.checkout-blockers ul { margin: 0; padding-left: 14px; }
.checkout-blockers li { font-size: 12.5px; line-height: 1.7; }
.checkout-items { padding: 0 14px; }
.checkout-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.checkout-item + .checkout-item { border-top: 1px solid var(--line); }
.checkout-item-main { flex: 1; min-width: 0; }
.checkout-item-name { font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.checkout-item-spec { color: var(--ink-3); font-size: 12px; margin-top: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.checkout-item-side { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: none; }
.checkout-item-qty { color: var(--ink-3); font-size: 12px; }
.checkout-item-amount { font-size: 13.5px; font-weight: 600; margin-top: 3px; }
/* 取消订单确认卡：复用结账卡骨架，仅补订单号行与单价展示 */
.cancel-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 14px 10px; }
.cancel-meta-no { min-width: 0; color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checkout-item-price { color: var(--ink-2); font-size: 12.5px; font-weight: 500; margin-top: 3px; }
.checkout-totals { display: flex; flex-direction: column; gap: 7px; border-top: 1px solid var(--line); margin: 6px 14px 0; padding: 12px 0; }
.checkout-total-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--ink-2); }
.checkout-total-row.is-payable { font-size: 14px; color: var(--ink); font-weight: 600; align-items: baseline; padding-top: 4px; }
.checkout-total-row.is-payable .checkout-total-value { color: var(--price); font-size: 22px; font-weight: 700; letter-spacing: -.5px; }
.checkout-section-title,.checkout-section { display: flex; align-items: center; gap: 6px; padding: 12px 14px 7px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; }
.checkout-section-icon { display: grid; place-items: center; color: var(--brand); }
.address-picker { margin: 3px 14px 9px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.address-picker.is-expanded { border-color: var(--brand-soft); }
.address-summary { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; text-align: left; background: #f8f7fb; }
.address-summary[aria-expanded="true"] { background: #fff; }
.address-summary-copy,.address-option-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.address-summary-cue { display: flex; align-items: center; gap: 2px; color: var(--brand); font-size: 12px; flex: none; }
.address-summary-arrow { transform: rotate(90deg); transition: transform var(--dur); }
.address-summary-arrow svg { width: 14px; height: 14px; }
.address-summary[aria-expanded="true"] .address-summary-arrow { transform: rotate(-90deg); }
.address-line1 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13.5px; font-weight: 600; }
.address-mobile { color: var(--ink-2); font-weight: 400; font-size: 12.5px; }
.address-default-tag { font-size: 10px; padding: 1px 4px; border: 1px solid var(--brand-soft); border-radius: 4px; color: var(--brand); font-weight: 400; }
.address-line2 { color: var(--ink-3); font-size: 12px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
.checkout-addresses { padding: 0 10px; border-top: 1px solid var(--line); max-height: 254px; overflow-y: auto; overscroll-behavior: contain; }
.checkout-addresses.is-collapsed { display: none; }
.address-option { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 60px; text-align: left; padding: 11px 2px; background: #fff; border-bottom: 1px solid var(--line); }
.address-option:last-child { border-bottom: 0; }
.address-option.is-selected .address-name { color: var(--brand); }
.address-check { display: grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid #d6d6de; border-radius: 50%; flex: none; }
.address-check svg { width: 11px; height: 11px; }
.address-option:not(.is-selected) .address-check svg { visibility: hidden; }
.address-option.is-selected .address-check { color: #fff; border-color: var(--brand); background: var(--brand); }
.address-manage-link { display: block; width: calc(100% - 28px); min-height: 44px; margin: 0 14px 5px; color: var(--ink-2); font-size: 12.5px; text-align: center; }
.address-manage-link:active { color: var(--brand); }
.checkout-empty-address { margin: 4px 14px 10px; padding: 14px 12px; border-radius: 10px; color: var(--ink-3); background: var(--bg); font-size: 12.5px; text-align: center; }
.checkout-excluded { margin: 4px 14px; padding: 8px 10px; border-radius: 8px; font-size: 12px; color: var(--ink-3); background: var(--bg); }
.checkout-scope-note { margin: 5px 14px 10px; font-size: 12px; color: var(--ink-3); }
.checkout-excluded-label { font-size: 12px; color: var(--ink-3); }
.checkout-item.is-excluded { opacity: .55; }
.checkout-actions { display: flex; flex-wrap: wrap; gap: 9px; padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.checkout-confirm,.checkout-native { min-height: 46px; border-radius: 23px; min-width: 0; flex: 1 1 120px; padding: 10px 12px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.checkout-confirm { background: var(--action); color: #fff; }
.checkout-native { border: 1px solid var(--line-2); color: #4a4a54; background: #fff; font-weight: 500; }
.checkout-actions button:disabled { opacity: .45; }
.checkout-expired { padding: 8px 14px 13px; color: var(--danger); font-size: 12.5px; }
.checkout-result-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--success); background: var(--success-wash); }
.checkout-result-icon[data-tone="fail"] { color: var(--danger); background: var(--danger-wash); }
.checkout-result-icon[data-tone="unknown"] { color: var(--warn); background: var(--warn-wash); }

/* 11 / Product clarification & selection */
.selection-card > h3 { padding: 14px 14px 4px; font-size: 15px; font-weight: 600; }
.selection-card > .card-meta { display: block; padding: 0 14px 6px; font-size: 12.5px; color: var(--ink-3); }
.selection-options { display: flex; flex-direction: column; gap: 8px; padding: 6px 14px 14px; }
.selection-option { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: 12px; text-align: left; background: #fff; transition: border-color var(--dur),background var(--dur); }
.selection-option:active { border-color: var(--brand-soft); background: var(--brand-wash); }
.selection-option:disabled { opacity: .5; }
.selection-option-main { flex: 1; min-width: 0; }
.selection-option-main > span { display: block; }
.selection-option-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selection-option-spec { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.selection-option-price { font-size: 15px; color: var(--price); margin-top: 4px; font-weight: 650; }
.selection-option-cue { color: #b4b4be; flex: none; }
.clarification-question { font-size: 15px; line-height: 1.6; font-weight: 600; padding: 14px 14px 10px; }
.clarification-options { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 12px; }
.clarification-option { padding: 9px 14px; min-height: 44px; text-align: left; font-size: 14px; border: 1px solid transparent; border-radius: 12px; background: var(--bg); color: #33333b; transition: border-color var(--dur),background var(--dur),color var(--dur); }
.clarification-option:active,.clarification-option.is-selected { border-color: var(--brand); background: var(--brand-wash); color: var(--brand-deep); }
.clarification-option:disabled { opacity: .55; }
.clarification-skip { min-height: 44px; margin: 0 14px 9px; color: var(--ink-3); padding: 0 4px; font-size: 13px; }
.clarification-text-row { display: flex; gap: 8px; padding: 0 14px 13px; }
.clarification-text-input { min-height: 44px; min-width: 0; flex: 1; padding: 10px 14px; border: 1px solid transparent; border-radius: 22px; outline: none; background: var(--bg); font-size: 16px; transition: border-color var(--dur),background var(--dur); }
.clarification-text-input:focus { border-color: var(--brand-soft); background: #fff; }
.clarification-text-input::placeholder { color: var(--ink-3); font-size: 13px; }
.clarification-text-submit { min-width: 64px; min-height: 44px; padding: 0 14px; border-radius: 22px; background: var(--brand); color: #fff; font-size: 13.5px; font-weight: 600; }
.clarification-multi-submit { opacity: .55; transition: opacity var(--dur); }
.clarification-multi-submit.is-ready { opacity: 1; }
.clarification-options-multi .clarification-option::before { content: "\FF0B "; color: var(--ink-3); font-size: 12px; }
.clarification-options-multi .clarification-option.is-selected::before { content: "\2713 "; color: var(--brand-deep); }
.clarification-expiry { display: block; padding: 0 14px 12px; color: var(--ink-3); font-size: 11px; }
.clarification-status { margin: 0; padding: 0 14px 12px; font-size: 13px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.clarification-recover { min-height: 44px; margin: 0 14px 14px; padding: 8px 14px; border: 1px solid var(--brand-soft); border-radius: 8px; color: var(--brand-deep); background: var(--brand-wash); scroll-margin-block-end: calc(var(--dock-height) + 24px); }
.clarification-text-input:disabled { opacity: .65; }
.clarification-text-submit:disabled { opacity: .5; }

/* 12 / Search conditions, comparison, “猜你想问” */
.card-search_summary,.card-result_summary { border: 0; box-shadow: none; background: transparent; border-radius: 0; margin: 8px 0 12px; }
.condition-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 2px 0 8px; }
.condition-chip { font-size: 12px; padding: 4px 9px; line-height: 1.5; border-radius: 6px; color: #55555f; background: var(--bg); }
.condition-chip--edit { background: transparent; color: var(--brand); min-height: 36px; padding: 4px 6px; text-decoration: none; }
.search-summary-details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0; }
.search-summary-details summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; min-height: 44px; font-size: 13px; color: var(--ink-3); }
.search-summary-details summary::-webkit-details-marker { display: none; }
.search-summary-details summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid #aaaab3; border-bottom: 1.5px solid #aaaab3; transform: rotate(45deg); margin-right: 6px; }
.search-summary-details[open] summary::after { transform: rotate(225deg); }
.search-summary-body { padding: 0 0 12px; }
.search-summary-callout { padding: 12px 14px; margin: 0 0 10px; border-radius: 12px; background: #faf9fd; border: 1px solid var(--line-2); }
.search-summary-callout-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.search-summary-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 1.4; background: var(--brand-wash); color: var(--brand-deep); flex: none; }
.search-summary-badge.is-warn { background: var(--warn-wash); color: var(--warn); }
.search-summary-callout-title { font-size: 13.5px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.search-summary-items { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.search-summary-item { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 9px; background: #fff; border: 1px solid var(--line); }
.search-summary-item-name { flex: 1; min-width: 0; font-size: 13px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.search-summary-item-price { flex: none; font-size: 13.5px; font-weight: 600; color: var(--price); white-space: nowrap; font-variant-numeric: tabular-nums; }
.search-summary-callout-note { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.65; color: var(--ink-2); }
.search-summary-note,.search-summary-time { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.75; margin-top: 4px; }
.search-summary-tail { margin: 0 0 14px; }
.search-summary-more { width: 100%; margin: 4px 0 10px; border-radius: 12px; }
.search-summary-tail > .condition-chips { padding: 2px 0 8px; }
.search-summary-tail .next-step-actions { padding-top: 8px; }
.next-step-actions { display: flex; align-items: flex-start; flex-direction: column; gap: 8px; padding: 14px 0 0; }
.next-step-actions::before { content: "猜你想问"; color: var(--ink-3); font-size: 13px; line-height: 1.5; margin-bottom: 0; }
.next-step-actions.is-guided::before { content: "可以这样继续"; }
.next-step-button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 100%; padding: 8px 14px; border-radius: 12px; background: var(--bg); color: #33333b; font-size: 14px; text-align: left; line-height: 1.5; transition: background var(--dur),color var(--dur); }
.next-step-button::after { content: none; }
.next-step-button:active { background: var(--brand-wash); color: var(--brand-deep); }
.message-follow-ups { margin: -2px 0 16px; padding-top: 2px; animation: rise-in .2s var(--ease); }
.comparison-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 14px 14px 12px; }
.comparison-title { font-size: 15px; font-weight: 600; }
.comparison-time { font-size: 11px; color: var(--ink-3); }
.comparison-scroll { overflow-x: auto; overscroll-behavior-x: contain; margin: 0 12px 12px; border: 1px solid var(--line-2); border-radius: 12px; scrollbar-width: thin; scrollbar-color: #dcdce3 transparent; }
.comparison-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; line-height: 1.6; }
.comparison-table th,.comparison-table td { min-width: 126px; max-width: 224px; padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.comparison-table thead th { background: #f6f6f8; color: var(--ink); font-weight: 600; }
.comparison-table thead th:first-child,.comparison-table tbody th { min-width: 74px; width: 74px; position: sticky; left: 0; z-index: 1; background: #fafafb; color: var(--ink-3); font-weight: 400; box-shadow: 1px 0 0 var(--line); }
.comparison-table thead th:first-child { background: #f6f6f8; z-index: 2; }
.comparison-table tr:last-child th,.comparison-table tr:last-child td { border-bottom: 0; }
.comparison-spec { display: block; margin-top: 4px; color: var(--ink-3); font-size: 11px; font-weight: 400; }
.comparison-table td.is-unverified { color: var(--ink-3); }
.result-set-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; margin: 4px 0 14px; border: 0; border-radius: 12px; background: var(--bg); color: var(--ink-2); font-size: 13px; }
.result-set-toggle::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.result-set-toggle[aria-expanded="true"]::after { transform: rotate(225deg) translate(-2px,-1px); }
.result-set-toggle:active { background: var(--brand-wash); color: var(--brand-deep); }

/* 13 / Bottom composer：快捷标签 + 胶囊输入框，独立于滚动内容 */
.dock { position: absolute; left: 0; bottom: 0; width: 100%; z-index: 40; padding: 8px max(12px,env(safe-area-inset-right,0px)) calc(6px + var(--safe-b)) max(12px,env(safe-area-inset-left,0px)); background: #fff; }
.dock::before { content: ""; position: absolute; top: -18px; left: 0; right: 0; height: 18px; background: linear-gradient(rgba(255,255,255,0),#fff); pointer-events: none; }
.quick-actions { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 0 2px 8px; scroll-padding-inline: 12px; }
.quick-actions::-webkit-scrollbar { display: none; }
.quick-action { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; flex: 0 0 auto; padding: 6px 13px; border: 1px solid var(--line-2); border-radius: 999px; color: #44444d; background: #fff; font-size: 13px; line-height: 1.4; white-space: nowrap; transition: background var(--dur),border-color var(--dur),color var(--dur),transform .14s var(--ease); }
.quick-action svg { width: 15px; height: 15px; color: var(--brand); flex: none; }
.quick-action:active { background: var(--brand-wash); border-color: var(--brand-soft); color: var(--brand-deep); transform: scale(.96); }
.composer { display: flex; align-items: flex-end; gap: 4px; padding: 4px 4px 4px 16px; border: 1px solid transparent; border-radius: 24px; background: var(--bg); transition: border-color var(--dur),background var(--dur),box-shadow var(--dur); }
.composer:focus-within { border-color: var(--brand-soft); background: #fff; box-shadow: 0 0 0 3px rgba(109,79,224,.08); }
.voice-button { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; color: #5f5f6b; background: transparent; transition: color var(--dur),background var(--dur),transform var(--dur); }
.voice-button:active { transform: scale(.93); }
.voice-button.is-listening { color: var(--brand); background: var(--brand-wash); }
.voice-button .icon-mic-stop { display: none; }
.voice-button.is-listening .icon-mic { display: none; }
.voice-button.is-listening .icon-mic-stop { display: block; }
.input-wrap { flex: 1; min-width: 0; position: relative; padding: 0; }
#message-input { display: block; width: 100%; min-height: 40px; max-height: 120px; padding: 8px 0; border: 0; outline: none; resize: none; background: none; color: var(--ink); font-family: inherit; font-size: 16px; line-height: 24px; }
#message-input::placeholder { font-size: 15px; color: #a3a3ad; }
.char-counter { position: absolute; bottom: -2px; right: 0; font-size: 10px; line-height: 1.2; color: var(--ink-3); opacity: 0; pointer-events: none; }
.char-counter.is-near-limit { opacity: 1; color: var(--warn); background: #fff; padding: 1px 2px; }
.send-button { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; color: #fff; background: var(--brand); transition: transform var(--dur),background var(--dur),color var(--dur); }
.send-button svg { width: 20px; height: 20px; }
.send-button:active { transform: scale(.93); }
.send-button.is-empty { background: #d8d8df; color: #fff; }
.send-button.is-stop { background: var(--brand-wash); color: var(--brand); }
.send-button .icon-stop { display: none; }
.send-button.is-stop .icon-send { display: none; }
.send-button.is-stop .icon-stop { display: block; }
.send-button.is-stop .icon-stop { width: 16px; height: 16px; }
.queue-state { border-radius: 10px; padding: 8px 12px; background: var(--brand-wash); color: var(--brand-deep); font-size: 12px; margin-bottom: 8px; }
.recovery-button, .focus-state { display: block; width: 100%; margin-bottom: 8px; padding: 9px 12px; border-radius: 10px; color: var(--brand-deep); background: var(--brand-wash); text-align: left; font-size: 12px; }
.recovery-button[hidden], .focus-state[hidden] { display: none; }
.plan-choice { margin: 0 0 8px; }
.plan-choice[hidden] { display: none; }
.plan-choice-panel { border: 1px solid #e7e2fb; border-radius: 14px; padding: 10px; background: linear-gradient(145deg,#fbfaff,#f5f2ff); box-shadow: 0 5px 18px rgba(63,45,129,.08); }
.plan-choice-panel.is-submitted { opacity: .7; }
.plan-choice-heading { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.plan-choice-copy { flex: 1; min-width: 0; }
.plan-choice-title { display: block; color: var(--brand-deep); font-size: 13px; font-weight: 650; line-height: 1.4; }
.plan-choice-question { display: block; margin-top: 2px; color: var(--ink-3); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.plan-choice-dismiss { flex: none; min-height: 28px; padding: 3px 7px; color: var(--ink-3); border-radius: 7px; font-size: 11px; }
.plan-choice-dismiss:active { background: rgba(120,99,207,.1); color: var(--brand-deep); }
.plan-choice-options { display: flex; gap: 7px; overflow-x: auto; padding: 1px 0 5px; scrollbar-width: none; }
.plan-choice-options::-webkit-scrollbar { display: none; }
.plan-choice-option { flex: 0 0 auto; min-height: 36px; max-width: 75%; padding: 7px 11px; border: 1px solid #ddd6fa; border-radius: 18px; color: #41346b; background: #fff; font-size: 12px; line-height: 1.45; text-align: left; }
.plan-choice-option:active { background: var(--brand-wash); border-color: var(--brand-soft); }
.plan-choice-panel button:disabled,.plan-choice-panel textarea:disabled { cursor: default; opacity: .48; }
.plan-choice-text { display: flex; gap: 7px; align-items: flex-end; margin-top: 5px; }
.plan-choice-input { flex: 1; min-width: 0; min-height: 35px; max-height: 78px; resize: none; padding: 8px 11px; border: 1px solid #e3def8; border-radius: 17px; outline: none; background: #fff; color: var(--ink); font: inherit; font-size: 13px; line-height: 1.45; }
.plan-choice-input:focus { border-color: var(--brand-soft); box-shadow: 0 0 0 2px rgba(109,79,224,.08); }
.plan-choice-input::placeholder { color: #aaa4bd; font-size: 12px; }
.plan-choice-submit { flex: none; min-width: 48px; min-height: 35px; padding: 0 12px; border-radius: 18px; color: #fff; background: var(--brand); font-size: 12px; font-weight: 600; }
.plan-choice-submit:active { background: var(--brand-deep); }
.dock-disclaimer { text-align: center; font-size: 10px; color: #b4b4be; margin-top: 6px; line-height: 1.4; letter-spacing: .2px; }
body.keyboard-open .dock-disclaimer { display: none; }

/* 14 / Reading preferences & toast */
.reading-setting { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.reading-setting h3 { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.reading-setting p { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.size-switch { display: flex; flex: none; background: var(--bg); border-radius: 10px; padding: 3px; }
.size-switch button { min-width: 54px; min-height: 36px; border-radius: 8px; font-size: 13px; color: var(--ink-2); transition: background .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease), transform .12s var(--ease); }
.size-switch button:active { transform: scale(.96); }
.size-switch button[aria-pressed="true"] { color: var(--brand); background: #fff; font-weight: 600; box-shadow: 0 1px 4px rgba(20,18,30,.08); }
.app-toast { position: absolute; bottom: calc(var(--dock-height) + 14px); left: 50%; max-width: min(90%,540px); width: max-content; transform: translate(-50%,8px); z-index: 150; padding: 10px 16px; color: #fff; background: rgba(28,28,34,.9); border-radius: 12px; box-shadow: var(--shadow-pop); font-size: 13px; line-height: 1.6; opacity: 0; pointer-events: none; transition: opacity var(--dur),transform var(--dur); }
.app-toast.is-visible { opacity: 1; transform: translate(-50%,0); }

/* 15 / Responsive & motion */
@keyframes rise-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes card-flash { from { border-color: var(--brand-soft); } to { border-color: #ececf1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathing { 50% { opacity: .4; transform: scale(.8); } }
@keyframes typing-dots {
  0%,100% { background: #8f74ec; box-shadow: 11px 0 #d6ccf8,22px 0 #d6ccf8; }
  33% { background: #d6ccf8; box-shadow: 11px 0 #8f74ec,22px 0 #d6ccf8; }
  66% { background: #d6ccf8; box-shadow: 11px 0 #d6ccf8,22px 0 #8f74ec; }
}
@keyframes caret-blink { 50% { opacity: 0; } }
@keyframes sheet-in { from { transform: translateY(22px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-out { from { transform: none; opacity: 1; } to { transform: translateY(20px); opacity: 0; } }
@keyframes welcome-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes timeline-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop-up { from { opacity: 0; transform: translate(-50%, 8px) scale(.92); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@media (hover:hover) {
  .task-entry:hover { border-color: var(--brand-soft); box-shadow: 0 6px 18px rgba(40,30,90,.06); transform: translateY(-2px); }
  .quick-action:hover,.next-step-button:hover,.starter-question:hover { background: #ecebf1; }
  .header-pill-btn:hover { background: #ecebf1; color: var(--brand); }
  .icon-button:hover,.message-copy:hover,.message-feedback:hover,.voice-button:hover { background: var(--bg); color: var(--brand); }
  .pcard-actions .btn-solid:hover { background-color: #d81e05; }
  .pcard.is-clickable:hover .pcard-name { color: var(--brand-deep); }
  .send-button:not(.is-empty):not(.is-stop):hover { background: var(--brand-deep); }
  .selection-option:hover,.clarification-option:hover { border-color: var(--brand-soft); }
}
@media (min-width:600px) {
  :root { --page-inset: 32px; }
  .app-header { min-height: 64px; }
  .brand-copy h1 { font-size: 17px; }
  .timeline { padding-top: 16px; }
  .empty-state { padding-top: 24px; }
  .welcome-copy { padding: 28px 28px 26px; border-radius: 22px; }
  .empty-state h2 { font-size: 30px; }
  .empty-hint { font-size: 14px; }
  .task-grid { margin-top: 14px; gap: 12px; }
  .task-entry { min-height: 112px; padding: 16px; }
  .task-desc { font-size: 12.5px; }
  .task-title { font-size: 15px; }
  .starter-question { font-size: 14.5px; }
  .dock { padding-left: var(--page-inset); padding-right: var(--page-inset); }
  .quick-actions { gap: 9px; }
  .pcard-media { width: 104px; height: 104px; }
  .pcard { gap: 16px; padding: 16px 0; }
  .pcard-name { font-size: 16px; }
  .pcard-spec { font-size: 12.5px; }
  .pcard-actions { gap: 6px; }
  .pcard-actions .btn-ghost { font-size: 13px; }
  .pcard-price-label { flex-basis: auto; margin: 0 4px 0 0; }
  .comparison-table th,.comparison-table td { min-width: 160px; }
  .comparison-table thead th:first-child,.comparison-table tbody th { min-width: 92px; }
}
@media (min-width:1000px) {
  :root { --page-inset: 48px; }
  .app { border-left: 1px solid #ececf1; border-right: 1px solid #ececf1; box-shadow: 0 0 60px rgba(20,18,40,.04); }
  .empty-state { padding-top: 36px; }
}
@media (max-width:359px) {
  :root { --page-inset: 12px; --message-size: 15px; }
  .brand-copy h1 { font-size: 14.5px; }
  .brand { gap: 8px; }
  .brand-avatar { width: 32px; height: 32px; }
  .conn { font-size: 10px; }
  .welcome-copy { padding: 18px 16px 16px; }
  .empty-state h2 { font-size: 21px; }
  .empty-hint { font-size: 12px; }
  .task-entry { padding: 11px; min-height: 100px; }
  .task-icon { width: 30px; height: 30px; margin-bottom: 6px; }
  .task-title { font-size: 13.5px; }
  .task-desc { font-size: 11px; }
  .task-arrow { right: 10px; }
  .pcard { gap: 9px; }
  .pcard-media { width: 76px; height: 76px; }
  .pcard-name { font-size: 14px; }
  .pcard-price-int { font-size: 19px; }
  .pcard-price-rest { font-size: 12px; }
  .pcard-spec { font-size: 11px; }
  .pcard-actions { gap: 0; }
  .pcard-bottom { gap: 2px; }
  .pcard-actions .btn-ghost { font-size: 11px; }
  .checkout-actions { gap: 7px; }
  .checkout-confirm,.checkout-native { font-size: 13px; }
  .quick-action { padding: 6px 10px; font-size: 12.5px; }
  .header-pill-btn { padding: 0 9px; font-size: 12px; gap: 4px; }
  .drawer-header { padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px 14px; }
  .history-search-wrap { margin: 10px 12px 4px; }
  .drawer-status { margin: 2px 12px 6px; }
  .drawer-scroll { padding: 4px 12px 20px; }
  .reading-setting { gap: 10px; }
  .size-switch button { min-width: 48px; }
}
@media (max-height:620px) {
  .empty-state { padding-top: 6px; }
  .welcome-copy { padding-top: 16px; padding-bottom: 14px; }
  .empty-state h2 { font-size: 22px; margin-top: 6px; }
  .task-grid { margin-top: 10px; }
  .task-entry { min-height: 92px; }
  body.keyboard-open .quick-actions { padding-bottom: 5px; }
  body.keyboard-open .quick-action { min-height: 30px; padding-top: 4px; padding-bottom: 4px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Conversation history & personal settings right drawers (75% width). */
.ui-overlay.drawer-overlay {
  position: fixed;
  top: var(--viewport-top, 0px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 840px;
  height: var(--viewport-height, 100dvh);
  z-index: 110;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  background: rgba(20, 18, 30, .38);
  animation: drawer-fade-in .22s var(--ease) both;
}
.ui-overlay.drawer-overlay.is-closing {
  pointer-events: none;
  animation: drawer-fade-out .2s var(--ease) both;
}
.drawer-sheet {
  position: relative;
  width: 75%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px 0 0 20px;
  box-shadow: -12px 0 36px rgba(20, 18, 30, .14);
  overflow: hidden;
  padding-bottom: var(--safe-b);
  will-change: transform;
  animation: drawer-in-right .26s cubic-bezier(.22, 1, .36, 1) both;
}
.ui-overlay.drawer-overlay.is-closing .drawer-sheet {
  animation: drawer-out-right .2s var(--ease) both;
}
@keyframes drawer-in-right {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes drawer-out-right {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}
@keyframes drawer-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes drawer-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
.drawer-header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: calc(56px + env(safe-area-inset-top, 0px));
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 10px 16px;
  border-bottom: 1px solid var(--line);
}
.drawer-header h2 { font-size: 17px; font-weight: 650; line-height: 1.4; color: var(--ink); }
.drawer-header-actions { display: flex; align-items: center; gap: 6px; }
.drawer-new-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-wash);
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--dur), transform .14s var(--ease);
}
.drawer-new-btn:active { background: var(--brand-soft); transform: scale(.96); }
.drawer-close-btn { width: 40px; height: 40px; color: var(--ink-2); }
.history-search-wrap {
  flex: none;
  position: relative;
  display: flex;
  align-items: center;
  margin: 12px max(16px, env(safe-area-inset-right, 0px)) 6px 16px;
  padding: 0 12px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid transparent;
  transition: border-color var(--dur), background var(--dur), box-shadow var(--dur);
}
.history-search-wrap:focus-within {
  background: #fff;
  border-color: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(109, 79, 224, .08);
}
.history-search-icon { flex: none; color: var(--ink-3); margin-right: 8px; }
.history-search-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--ink);
}
.history-search-wrap input::placeholder { font-size: 13.5px; color: var(--ink-3); }
.history-search-wrap input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.history-search-clear {
  flex: none;
  width: 24px;
  height: 24px;
  margin-left: 6px;
  border-radius: 50%;
  background: #c8c8d2;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background var(--dur), transform .12s var(--ease);
}
.history-search-clear:active { transform: scale(.9); background: #a8a8b4; }
.drawer-status {
  flex: none;
  margin: 2px max(16px, env(safe-area-inset-right, 0px)) 6px 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
}
.drawer-status:empty { display: none; }
.drawer-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px max(16px, env(safe-area-inset-right, 0px)) 24px 16px;
  -webkit-overflow-scrolling: touch;
}
.drawer-more-btn {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13.5px;
  transition: background var(--dur), transform .14s var(--ease);
}
.drawer-more-btn:active { background: var(--bg); transform: scale(.98); }
.conversation-list { display: flex; flex-direction: column; gap: 10px; }
.conversation-group { display: flex; flex-direction: column; gap: 2px; }
.conversation-group-label {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 4px 0 2px;
  padding: 6px 4px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: .2px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.conversation-group-items { display: flex; flex-direction: column; gap: 2px; }
.conversation-row { border-radius: 10px; }
.conversation-title {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: background .15s var(--ease), transform .14s var(--ease), color .15s var(--ease);
}
.conversation-title:active:not(.is-pressing) { background: var(--bg); }
.conversation-row.is-active .conversation-title {
  background: var(--brand-wash);
  color: var(--brand-deep);
  font-weight: 600;
}
.conversation-title.is-pressing {
  background: #ece7fb;
  transform: scale(.98);
}
@media (hover: hover) {
  .conversation-row:not(.is-active) .conversation-title:hover { background: var(--bg); }
  .drawer-new-btn:hover { background: #e6defc; }
}
.conversation-action-menu {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px 14px calc(14px + var(--safe-b));
}
.conversation-action-menu.is-closing { pointer-events: none; }
.conversation-action-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 30, .32);
  animation: drawer-fade-in .18s var(--ease) both;
}
.conversation-action-menu.is-closing .conversation-action-backdrop {
  animation: drawer-fade-out .16s var(--ease) both;
}
.conversation-action-card {
  position: relative;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 18, 30, .2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: sheet-in .2s cubic-bezier(.22, 1, .36, 1) both;
}
.conversation-action-menu.is-closing .conversation-action-card {
  animation: sheet-out .16s var(--ease) both;
}
.conversation-action-title {
  padding: 2px 4px 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid var(--line);
}
.conversation-action-buttons { display: flex; flex-direction: column; gap: 6px; }
.conversation-action-btn, .conversation-action-cancel {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 500;
  text-align: center;
  background: var(--bg);
  color: var(--ink);
  transition: background .15s var(--ease), transform .12s var(--ease);
}
.conversation-action-btn:active, .conversation-action-cancel:active { transform: scale(.98); }
.conversation-action-btn.is-danger { color: var(--danger); background: var(--danger-wash); }
.conversation-action-cancel { background: #fff; border: 1px solid var(--line-2); color: var(--ink-2); margin-top: 2px; }
.conversation-rename-form, .conversation-delete-confirm { display: flex; flex-direction: column; gap: 10px; }
.conversation-rename-form input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  outline: none;
}
.conversation-rename-form input::placeholder { font-size: 13.5px; color: var(--ink-3); }
.conversation-rename-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(109, 79, 224, .1); }
.conversation-delete-tip { font-size: 13px; color: var(--ink-2); line-height: 1.5; padding: 2px 0; }
.conversation-rename-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.conversation-rename-actions button {
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: opacity .15s, transform .12s var(--ease);
}
.conversation-rename-actions button:active { transform: scale(.97); }
.conversation-rename-actions button.secondary { background: var(--bg); color: var(--ink-2); }
.conversation-rename-actions button.primary { background: var(--brand); color: #fff; }
.conversation-rename-actions button.danger { background: var(--danger); color: #fff; }

.settings-section { padding: 12px 0 16px; border-bottom: 1px solid var(--line-2); }
.settings-section-desc { font-size: 12px; color: var(--ink-2); margin: -6px 0 10px; line-height: 1.5; }
.busy-action-options { display: flex; flex-direction: column; gap: 8px; }
.busy-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 11px 12px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform .14s var(--ease);
}
.busy-option:active { transform: scale(.985); }
.busy-option.is-selected {
  border-color: var(--brand);
  background: var(--brand-wash);
}
.busy-option-radio {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid #c6c6d0;
  position: relative;
}
.busy-option.is-selected .busy-option-radio {
  border-color: var(--brand);
}
.busy-option.is-selected .busy-option-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--brand);
}
.busy-option-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.busy-option-title { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.busy-option.is-selected .busy-option-title { color: var(--brand-deep); }
.busy-option-desc { font-size: 12px; color: var(--ink-2); line-height: 1.45; }

.cart-item-actions, .conversation-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.memory-row { border-bottom: 1px solid #e5e7eb; padding: 12px 0; }
.cart-item-spec, .memory-status { color: #6b7280; font-size: 13px; display: block; margin: 6px 0; }
.conversation-actions button, .cart-item-actions button { min-height: 36px; padding: 6px 12px; border: 1px solid #e5e7eb; border-radius: 8px; }
.memory-row input, #memory-content input, #memory-content select { box-sizing: border-box; width: 100%; padding: 10px; margin: 6px 0; border: 1px solid #d1d5db; border-radius: 8px; font: inherit; }
.cart-item { padding: 12px 0; border-bottom: 1px solid #e5e7eb; }
.cart-item-name { font-weight: 600; display: block; }
.cart-item-price { font-variant-numeric: tabular-nums; }
.memory-setting { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.memory-setting input { width: auto !important; }
.memory-settings-group { padding: 8px 0 12px; border-bottom: 1px solid var(--line-2); }
.memory-section-title { display: block; font-weight: 600; font-size: 15px; color: var(--ink); margin: 0 0 12px; }
.memory-settings-group .memory-setting { justify-content: space-between; align-items: center; gap: 16px; margin: 0; padding: 12px 0; cursor: pointer; }
.memory-setting-copy { flex: 1; min-width: 0; order: 1; }
.memory-setting-label { display: block; font-size: 14px; color: var(--ink); }
.memory-setting-description { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-2); line-height: 1.6; overflow-wrap: anywhere; }
#memory-content .memory-setting input[role="switch"] { appearance: none; flex: none; order: 2; position: relative; width: 42px !important; height: 26px; margin: 0; padding: 0; border: 0; border-radius: 13px; background: #c9ccd2; cursor: pointer; transition: background var(--dur); }
#memory-content .memory-setting input[role="switch"]::before { content: ""; position: absolute; width: 20px; height: 20px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); transition: transform var(--dur); }
#memory-content .memory-setting input[role="switch"]:checked { background: var(--success); }
#memory-content .memory-setting input[role="switch"]:checked::before { transform: translateX(16px); }
#memory-content .memory-setting input[role="switch"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
#memory-content .memory-setting input[role="switch"]:disabled { opacity: .55; cursor: progress; }
.memory-list { padding-top: 20px; }
.memory-row-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.memory-category { color: var(--ink-2); font-size: 12px; }
.memory-row .memory-status { margin: 0; font-size: 12px; color: var(--success); }
.memory-row .memory-value { display: block; margin: 8px 0 4px; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.memory-source { display: block; color: var(--ink-2); font-size: 12px; line-height: 1.6; }
.memory-row .conversation-actions { gap: 8px; margin-bottom: 0; }
.memory-row-notice { color: var(--ink-2); font-size: 12px; line-height: 1.6; margin-top: 8px; }
.memory-row-notice:empty { display: none; }
.memory-empty { padding: 18px 0 24px; font-size: 13px; color: var(--ink-2); }
.memory-empty-title { display: block; font-size: 14px; color: var(--ink); margin-bottom: 6px; }
#memory-content > button, #memory-content form button, .privacy-controls button {
  min-height: 42px; padding: 8px 12px; border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px; background: #fff; color: var(--text, #262332); font: inherit; font-size: 13.5px; cursor: pointer;
  transition: background .16s var(--ease), transform .12s var(--ease);
}
#memory-content > button:active, #memory-content form button:active, .privacy-controls button:active { transform: scale(.98); }
#memory-content button:hover { background: var(--bg, #f4f3f8); }
#memory-content button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
#memory-content button:disabled { opacity: .55; cursor: default; }
#memory-content form { display: grid; gap: 8px; margin: 16px 0; }
#memory-content > button { margin: 4px 0 16px; }
.privacy-controls { border-top: 1px solid #e5e7eb; padding-top: 16px; margin-top: 12px; display: grid; gap: 10px; }
.privacy-controls h3 { font-size: 16px; margin: 0; }
.privacy-controls > span, .privacy-controls > div { font-size: 13px; line-height: 1.6; color: #6b7280; }

.ocard-item-amount { display: block; width: auto; font-size: 12px; color: var(--text-secondary, #68717d); margin-top: 3px; padding-left: 0; }
.checkout-excluded { color: #9c3c24; }
.after-sales-fields { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.after-sales-fields select { flex: 1 1 140px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line-2, #dcdfe6); border-radius: 8px; background: #fff; color: var(--ink, #1f2329); font: inherit; font-size: 13px; }
.after-sales-note { display: block; width: 100%; box-sizing: border-box; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line-2, #dcdfe6); border-radius: 8px; font: inherit; font-size: 13px; line-height: 1.5; resize: vertical; background: #fff; color: var(--ink, #1f2329); }
.card-after_sales_preview .card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
