.intro-service{display:flex;flex-direction:column;gap:6px;padding:17px 18px;background:#eaf2ff;border:1px solid #dbe8fa;border-radius:12px;max-width:340px;margin-top:32px}.intro-service strong{font-size:13px;font-weight:600;color:#395f93}.intro-service span{font-size:12px;color:#677b97;line-height:1.8}.customer-service-policy{display:flex;align-items:flex-start;gap:12px;padding:14px 15px;border:1px solid #dae7fb;border-radius:11px;background:#f3f7ff;margin:0 0 22px}.service-policy-icon{display:grid;place-items:center;flex-shrink:0;width:28px;height:28px;color:#1769ed;background:#e6effe;border-radius:8px;font-size:22px;line-height:1}.customer-service-policy strong{display:block;font-size:13px;color:#315987;font-weight:600;line-height:1.7}.customer-service-policy p{color:#687e9a;font-size:12px;line-height:1.8;margin-top:3px}.customer-save-status{font-size:12px;line-height:1.7;background:#edf7f1;color:#47755c;padding:10px 18px;border-bottom:1px solid #dfede4;flex-shrink:0}.customer-offline-note{font-size:11px;line-height:1.7;padding:8px 16px;color:#738198;background:#f5f8fc;border-top:1px solid #e7edf5;flex-shrink:0}.customer-chat{height:min(790px,calc(100dvh - 180px));min-height:500px}.customer-chat .message-list{min-height:160px}.customer-chat .composer{max-height:45dvh;overflow:auto}.customer-chat .attachment-draft{max-width:90px}.customer-chat .attachment-composer{margin:7px 0}.customer-chat .attachment-limit{font-size:10px}.customer-chat .attachment-add{min-height:36px;padding:5px 10px;font-size:12px}.customer-page .presence{max-width:220px}.customer-page .field>#start-attachments{margin:0}.customer-chat .new-message-button{bottom:242px}.customer-page .chat-privacy{flex-shrink:0}.customer-chat .message-count{margin-left:auto}@media(max-width:760px){.customer-service-policy{padding:12px;gap:9px;margin-bottom:19px}.customer-service-policy strong{font-size:13px}.customer-service-policy p{font-size:12px}.customer-save-status{padding:9px 14px;font-size:12px}.customer-offline-note{padding:8px 14px;font-size:11px}.customer-chat{height:calc(100dvh - 145px);min-height:520px;max-height:none}.customer-chat .composer{max-height:48dvh}.customer-chat .attachment-add{min-height:44px}.customer-chat .attachment-draft{max-width:82px}.customer-header{align-items:center}.customer-header>div:nth-child(2){min-width:0}.customer-page .presence{font-size:11px}.customer-chat .new-message-button{bottom:252px}}@media(max-width:380px){.customer-header h2{font-size:14px}.customer-page .presence{font-size:10px}.customer-service-policy strong{font-size:12px}.customer-service-policy p{font-size:11px}.customer-chat .attachment-limit{font-size:10px}.customer-chat .composer{padding-left:12px;padding-right:12px}}@media(max-width:760px) and (max-height:600px){.customer-chat{height:auto;min-height:0}.customer-chat .message-list{flex:0 0 160px;min-height:160px;max-height:160px}.customer-chat .composer{max-height:none;overflow:visible}.customer-chat .new-message-button{position:static;transform:none;align-self:center;margin:7px}.customer-save-status,.customer-offline-note{flex-shrink:0}}

/* 窄屏按内容自然增高，图片草稿和软键盘不会裁掉发送入口。 */
@media(max-width:760px){.customer-chat{height:auto;min-height:0}.customer-chat .message-list{flex:0 0 clamp(200px,38dvh,360px);min-height:200px;max-height:360px}.customer-chat .composer{max-height:none;overflow:visible}.customer-chat .new-message-button{position:static;transform:none;align-self:center;margin:7px}}


/* 提示位于消息区与输入区之间，不依赖带图草稿的动态高度。 */
.customer-chat .new-message-button{position:static;transform:none;align-self:center;margin:7px}

.identity-tools { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:12px 24px; border-bottom:1px solid #edf0f5; font-size:12px; color:#64748b; }
.identity-tools>div { display:flex; gap:16px; }
.identity-status { margin:12px 24px; font-size:13px; color:#52647d; line-height:1.7; }
.identity-confirm { margin:20px 24px; padding:20px; border:1px solid #dce6f4; border-radius:16px; background:#f6f9ff; }
.identity-confirm h3 { margin:0 0 10px; font-size:17px; }
.identity-confirm p { line-height:1.8; font-size:13px; }
.identity-confirm button { display:block; width:100%; margin-top:12px; }
.identity-page { min-height:100dvh; display:grid; place-items:center; padding:24px; }
.identity-card { width:min(100%,480px); padding:36px; border:1px solid #e4eaf2; border-radius:24px; background:white; box-shadow:0 16px 60px #18365d0d; }
.identity-brand { color:#1769ed; font-size:14px; font-weight:650; text-decoration:none; }
.identity-card h1 { font-size:26px; line-height:1.4; margin:24px 0 12px; }
.identity-card p { font-size:14px; line-height:1.8; color:#52647d; }
.identity-card section, .identity-card form { margin-top:24px; }
.identity-card label { display:block; font-size:13px; margin-bottom:8px; }
.identity-card input { width:100%; min-width:0; padding:12px; border:1px solid #cdd7e6; border-radius:10px; font-size:13px; background:#fbfdff; }
#generated-code-panel { margin-top:24px; }
#generated-recovery-code { font-family:monospace; font-size:12px; }
.identity-center-actions { display:flex; flex-wrap:wrap; gap:10px; margin:20px 0; }
.identity-card .form-error, .identity-status.form-error { color:#b42318; }
@media(max-width:540px) { .identity-tools { padding:10px 18px; } .identity-status { margin:10px 18px; } .identity-confirm { margin:18px; } .identity-page { padding:16px; } .identity-card { padding:24px; border-radius:20px; } }

/* 顾客入口：单栏留言，低频说明按需展开；不影响客服后台及身份中心。 */
.customer-page { --customer-space:24px; background:#f4f7fb; }
.customer-page .customer-layout { display:block; width:min(720px,calc(100% - 32px)); margin:28px auto; }
.customer-page .customer-card { overflow:visible; border-radius:18px; box-shadow:0 12px 40px #25467609; }
.customer-page .customer-header { padding:18px var(--customer-space) 12px; gap:10px; flex-wrap:wrap; border:0; }
.customer-heading { flex:1; min-width:160px; }
.customer-heading h1 { font-size:17px; font-weight:650; line-height:1.5; margin:0 0 3px; }
.customer-page .presence { max-width:none; font-size:11px; color:#607087; }
.customer-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:4px; margin-left:auto; }
.customer-page .customer-actions .text-button,.customer-more>summary { min-height:44px; padding:10px 8px; font-size:12px; white-space:nowrap; }
.customer-page .history-button { margin:0; }
.customer-page .identity-tools { display:flex; flex-wrap:nowrap; padding:0; gap:4px; border:0; }
.customer-more { position:relative; }
.customer-more>summary { display:flex; align-items:center; justify-content:center; color:#536984; list-style:none; cursor:pointer; border-radius:8px; }
.customer-more>summary::-webkit-details-marker { display:none; }
.customer-more>summary:hover,.customer-more[open]>summary { background:#edf3fc; }
.customer-more-panel { position:absolute; z-index:30; right:0; top:calc(100% + 4px); width:min(260px,calc(100vw - 40px)); padding:8px; border:1px solid #dce5f1; border-radius:12px; background:white; box-shadow:0 12px 36px #19375c20; }
.customer-page .customer-more-panel>.text-button { display:block; width:100%; text-align:left; padding:12px; }
.customer-page .customer-more-panel .browser-note { margin:4px 0 0; padding:10px 12px; text-align:left; font-size:12px; color:#62728a; border-top:1px solid #edf1f6; }
.customer-page summary:focus-visible,.customer-page button:focus-visible { outline:3px solid #87b5f8; outline-offset:2px; }
.service-summary { padding:0 var(--customer-space) 13px; border-bottom:1px solid #eaf0f7; color:#62728a; font-size:12px; }
.service-summary>summary { display:flex; flex-wrap:wrap; column-gap:14px; row-gap:3px; align-items:center; cursor:pointer; min-height:44px; list-style:none; }
.service-summary>summary::-webkit-details-marker { display:none; }
.service-summary-more { margin-left:auto; color:#47658c; }
.service-summary>div { padding:8px 0 2px; line-height:1.8; }
.customer-page .privacy-note { margin:8px 0 0; padding:0; color:#62728a; font-size:12px; }
.customer-page .welcome-panel { padding:20px var(--customer-space) 24px; }
.account-block { margin:0 0 8px; font-size:13px; }
.shop-account-summary { display:flex; align-items:baseline; gap:6px 10px; flex-wrap:wrap; min-height:38px; padding:8px 0; color:#62728a; }
.shop-account-summary strong { color:#243c59; font-size:14px; font-weight:600; overflow-wrap:anywhere; min-width:0; }
.account-detected { color:#47755c; font-size:11px; }
.username-details>summary { min-height:44px; padding:10px 0; cursor:pointer; color:#526985; }
.username-details>summary>span { margin-left:6px; color:#6b7c92; font-size:12px; }
.username-details>.field { margin:6px 0 16px; }
.customer-page .order-fieldset { position:relative; margin:0 0 20px; padding:0; border:0; min-width:0; }
.customer-page .order-fieldset>legend { width:1px; padding:0; margin:-1px; }
.order-line { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px 12px; min-height:44px; }
.order-label { font-size:13px; color:#435a77; }
.order-label>span { color:#6b7c92; margin-left:5px; font-size:12px; }
.customer-page .order-entry-actions { margin:0 0 0 auto; gap:0; }
.customer-page .order-entry-actions>button { min-height:44px; margin:0; padding:8px 12px; font-size:12px; }
.customer-page .order-selection { margin:4px 0 0; padding:12px 14px; border-radius:10px; }
.customer-page .order-selection-label { display:none; }
.customer-page .order-selection-copy>strong { font-size:13px; }
.customer-page .order-selection-actions .text-button { min-height:44px; }
.customer-page .order-manual-field { margin-top:8px; }
.customer-page .question-field { margin-bottom:18px; }
.customer-page .question-field>label { font-size:18px; font-weight:600; color:#243953; margin-bottom:12px; }
.customer-page #start-message { min-height:132px; line-height:1.7; font-size:15px; padding:13px 14px; resize:vertical; }
.customer-page .text-counter { color:#62728a; font-size:11px; }
.customer-page .payment-help { margin:6px 0 0; font-size:12px; color:#5d708c; }
.payment-help>summary { cursor:pointer; min-height:44px; padding:12px 0; line-height:1.7; }
.payment-help>p { padding:0 0 8px; line-height:1.8; }
.customer-page #start-submit { min-height:48px; font-size:14px; border-radius:10px; }
.customer-page .attachment-toolbar { gap:8px 12px; }
.customer-page .attachment-limit { font-size:11px; }
.customer-page .attachment-add { min-height:44px; }
.customer-page .attachment-drafts:empty { display:none; }
.customer-page.has-order-picker { overflow:hidden; }
.customer-page .order-picker { position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center; margin:0; padding:24px; width:auto; max-width:none; max-height:none; border:0; border-radius:0; background:#14294066; overscroll-behavior:contain; }
.order-picker-panel { display:flex; flex-direction:column; width:min(540px,100%); max-height:calc(100dvh - 48px); overflow:auto; background:#fff; border-radius:16px; padding:20px; box-shadow:0 18px 70px #14294026; }
.customer-page .order-picker-heading { flex-shrink:0; }
.customer-page .order-picker-heading .text-button { min-height:44px; }
.customer-page .order-picker-list { min-height:0; overflow:auto; overscroll-behavior:contain; max-height:none; }
.customer-page .order-picker-controls { flex-shrink:0; padding-top:12px; gap:8px; flex-wrap:wrap; }
.customer-page .order-picker-controls>button { min-height:44px; }
.customer-page .customer-chat { height:min(760px,calc(100dvh - 225px)); min-height:420px; max-height:none; overflow:hidden; border-radius:0 0 18px 18px; }
.conversation-details { flex-shrink:0; border-bottom:1px solid #e7edf5; font-size:12px; }
.conversation-details>summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; padding:10px var(--customer-space); cursor:pointer; color:#536984; list-style:none; }
.conversation-details>summary::-webkit-details-marker { display:none; }
.conversation-details>summary>span:first-child::after { content:'⌄'; margin-left:8px; }
.conversation-details[open]>summary>span:first-child::after { content:'⌃'; }
.customer-page .conversation-details .conversation-strip { padding:0 var(--customer-space) 4px; border:0; }
.customer-page .conversation-details .chat-context { padding:4px var(--customer-space) 12px; background:white; font-size:12px; color:#62728a; max-height:140px; overflow:auto; }
.customer-page .customer-chat .message-list { flex:1 1 auto; min-height:160px; max-height:none; padding:20px var(--customer-space); }
.customer-page .customer-chat .composer { flex-shrink:0; padding:14px var(--customer-space) max(14px,env(safe-area-inset-bottom)); max-height:48dvh; overflow:auto; border-top:1px solid #e7edf5; background:white; }
.customer-page .customer-chat .new-message-button { position:static; transform:none; align-self:center; margin:7px; }
.customer-page .customer-save-status { padding:9px var(--customer-space); font-size:12px; }
.recovery-reminder { display:flex; align-items:center; flex-wrap:wrap; gap:0 8px; padding:4px var(--customer-space); font-size:12px; color:#506e94; background:#f2f7ff; flex-shrink:0; }
.recovery-reminder>span { flex:1; min-width:190px; }
.recovery-reminder>.text-button { min-height:44px; font-size:12px; padding:8px 4px; }
@media(max-width:600px) {
  .customer-page { --customer-space:18px; }
  .customer-page .customer-layout { width:100%; margin:0; }
  .customer-page .customer-card { border:0; border-radius:0; min-height:100dvh; box-shadow:none; }
  .customer-page .customer-header { padding-top:max(14px,env(safe-area-inset-top)); padding-bottom:4px; gap:4px 10px; }
  .customer-heading h1 { font-size:16px; }
  .customer-page .service-avatar { width:36px; height:36px; border-radius:10px; }
  .customer-actions { flex-basis:100%; }
  .service-summary { padding-bottom:8px; font-size:11px; }
  .service-summary>summary { position:relative; display:block; padding:5px 34px 5px 0; line-height:1.8; }
  .service-summary #service-reply-window { display:block; }
  .service-summary-more { position:absolute; top:50%; right:0; transform:translateY(-50%); }
  .customer-page .welcome-panel { padding-top:14px; }
  .customer-page #start-message { min-height:120px; font-size:16px; }
  .customer-page .customer-chat { height:calc(100dvh - 173px); min-height:420px; border-radius:0; }
  .customer-page .customer-chat .message-list { min-height:160px; }
  .customer-page .customer-chat .composer { max-height:48dvh; }
  .customer-page .order-picker { align-items:flex-end; padding:0; }
  .order-picker-panel { width:100%; max-height:88dvh; padding:16px 18px max(20px,env(safe-area-inset-bottom)); border-radius:18px 18px 0 0; }
  .customer-page .customer-more-panel .browser-note { font-size:12px; }
}
/* 短屏或软键盘打开时允许整页滚动，不把图片草稿和发送按钮裁掉。 */
@media(max-height:620px) {
  .customer-page .customer-chat { height:auto; min-height:0; max-height:none; }
  .customer-page .customer-chat .message-list { flex:0 0 200px; min-height:200px; max-height:200px; }
  .customer-page .customer-chat .composer { max-height:none; overflow:visible; }
}

/* Multi-order choices remain inside the existing compact dialog. */
.order-picker-confirm { position:sticky; bottom:-20px; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-shrink:0; padding:12px 0; background:#fff; border-top:1px solid var(--line); }
.order-picker-confirm>span { font-size:13px; color:var(--muted); }
.order-picker-confirm>button { min-height:44px; }
.customer-page .order-choice { position:relative; padding-right:42px; }
.customer-page .order-choice::after { content:''; position:absolute; right:14px; top:18px; width:18px; height:18px; border:1px solid #9caec0; border-radius:4px; }
.customer-page .order-choice[aria-pressed="true"]::after { content:'✓'; text-align:center; line-height:18px; color:#fff; background:#285f9d; border-color:#285f9d; }
#order-selected-ref { overflow-wrap:anywhere; }
@media(max-width:600px) { .order-picker-confirm { bottom:-16px; } }

.order-handoff{margin:12px 0;padding:14px;background:#f0f6ff;border:1px solid #dbe8fb;border-radius:12px;overflow-wrap:anywhere}.order-handoff h3{margin:0 0 8px;font-size:16px}.order-handoff p{font-size:13px;line-height:1.6;margin:6px 0}.order-handoff-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.order-handoff[hidden]{display:none}

/* Customer navigation, editable prompts and local draft recovery. */
.customer-page .return-shop{display:inline-flex;align-items:center;min-height:44px;text-decoration:none;white-space:nowrap;margin-right:auto;font-size:14px;color:#285c9e}
.customer-page .return-shop[hidden]{display:none}
.customer-page .question-shortcuts{display:flex;gap:6px;flex-wrap:wrap;margin:4px 0 10px}
.customer-page .question-shortcuts button{min-height:44px;padding:8px 10px;border:1px solid #dce6f3;border-radius:8px;background:#f5f8fd;color:#285c9e;font:inherit;font-size:13px;line-height:1.4;cursor:pointer}
.customer-page .question-shortcuts button:focus-visible{outline:2px solid #1769ed;outline-offset:2px}
.customer-page .draft-note{font-size:13px;line-height:1.6;color:#53667f;margin:6px 0}
.customer-page .draft-orders{padding:10px 12px;margin:8px 0;border-radius:8px;background:#fff7e8;color:#694d20;overflow-wrap:anywhere}
.customer-page .draft-orders p{font-size:13px;line-height:1.6;margin:0 0 6px}
.customer-page .draft-orders button{min-height:44px;margin-right:8px}
.customer-page .draft-orders[hidden],.customer-page .draft-note[hidden]{display:none}

/* Scoped customer assistance: retain existing layout and tap areas. */
.customer-page .customer-actions .return-shop{font-size:14px;min-height:44px}
.customer-page .help-feedback{color:#53667f;font-size:13px;line-height:1.6;margin:6px 0;overflow-wrap:anywhere}
.customer-page .help-feedback[hidden],.customer-page .aftercare-panel[hidden],.customer-page .draft-clear[hidden]{display:none}
.customer-page .draft-clear{min-height:44px;padding:8px 0;font-size:13px;color:#285c9e}
.customer-page .aftercare-panel{background:#f7faff;border:1px solid #dce6f3;border-radius:10px;padding:12px;margin:8px 0 12px}
.customer-page .aftercare-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
.customer-page .aftercare-heading strong{font-size:15px}
.customer-page .aftercare-heading button{min-height:44px}
.customer-page .aftercare-field{display:block;font-size:14px;font-weight:500;margin:8px 0}
.customer-page .aftercare-field select{display:block;width:100%;max-width:100%;box-sizing:border-box;min-height:44px;padding:8px 10px;margin-top:6px;border:1px solid #cad6e5;border-radius:7px;background:#fff;color:#23344b;font:inherit;font-size:16px}
.customer-page .aftercare-field select:focus-visible{outline:2px solid #1769ed;outline-offset:2px}
.customer-page .aftercare-policy,.customer-page .aftercare-terms{font-size:13px;line-height:1.7;color:#52667f;margin:8px 0}
.customer-page .aftercare-details summary{font-size:14px;min-height:44px;display:flex;align-items:center;color:#285c9e;cursor:pointer}
.customer-page .aftercare-details[hidden]{display:none}
.customer-page .aftercare-panel .secondary-button{min-height:44px}

/* Selection-based questions stay within the existing customer composer. */
.customer-page .aftercare-field[hidden]{display:none}
.customer-page .question-shortcuts button[aria-expanded="true"]{border-color:#7ca6df;background:#eaf3ff;color:#164b91}
.customer-page .question-panel .help-feedback:empty{display:none}
.customer-page .aftercare-panel p{overflow-wrap:anywhere}

/* An unanswered choice never silently changes the message being sent. */
.customer-page .help-pending{margin:6px 0 10px;padding:8px 10px;border-left:3px solid #8dadd6;background:#f5f8fd}
.customer-page .help-pending[hidden]{display:none}
.customer-page .help-pending .text-button{min-height:44px;font-size:13px}
.customer-page .help-pending .text-button[hidden]{display:none}

/* Keep selected orders and guided questions in the document flow. A fixed chat
   height plus a second composer scroller could clip the submit area entirely. */
.customer-page .customer-chat { height:auto; min-height:0; max-height:none; overflow:visible; }
.customer-page .customer-chat .message-list { flex:0 0 auto; height:clamp(160px,32dvh,320px); min-height:160px; max-height:320px; }
.customer-page .customer-chat .composer { max-height:none; overflow:visible; }
.customer-page .customer-chat .composer-actions {
  position:sticky; bottom:0; z-index:2; margin-top:12px;
  padding:10px 0 max(10px,env(safe-area-inset-bottom));
  background:#fff; border-top:1px solid #e7edf5; gap:8px;
}
.customer-page .customer-chat .composer-actions .message-count { min-width:0; overflow-wrap:anywhere; }
.customer-page .customer-chat .composer-actions .primary-button { flex-shrink:0; min-height:44px; }
.customer-page #start-submit,.customer-page #customer-send { scroll-margin-block:16px; }
