
:root { --background:#fff; --foreground:#252525; --border:#e7e7e7; --muted:#818181; --radius: .625rem; color-scheme:light; }
* { box-sizing:border-box; }
html,body { margin:0; height:100%; background:#fff; }
body { color:#252525; font-family:Arial,"PingFang SC","Microsoft YaHei",sans-serif; font-size:14px; -webkit-font-smoothing:antialiased; }
button,textarea { font:inherit; }
button { cursor:pointer; }
button:disabled { cursor:default; }
button:focus-visible,textarea:focus-visible { outline:2px solid #727272; outline-offset:3px; }
button { -webkit-tap-highlight-color:transparent; }
.chat-app { display:flex; height:100dvh; min-height:420px; overflow:hidden; background:#fff; }
.chat-sidebar { width:252px; flex:0 0 252px; display:flex; flex-direction:column; padding:18px 12px 14px; background:#f7f7f7; border-right:1px solid #eeeeee; }
.sidebar-heading { display:flex; align-items:center; justify-content:space-between; padding:0 3px 25px 6px; }
.brand-home { border:0; background:none; padding:0; display:flex; align-items:center; gap:10px; font-size:18px; font-weight:600; color:#222; white-space:nowrap; }
.app-mark { width:29px; height:29px; display:grid; place-items:center; }
.icon-button { width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; padding:0; border:0; border-radius:8px; background:transparent; color:#777; flex-shrink:0; }
.icon-button:hover:not(:disabled) { background:#ececec; color:#252525; }
.icon-button:disabled { opacity:.4; }
.new-chat-button { display:flex; align-items:center; gap:11px; width:100%; border:0; border-radius:9px; color:#252525; padding:11px 12px; background:#ededed; font-size:14px; text-align:left; }
.new-chat-button:hover:not(:disabled) { background:#e5e5e5; }
.history-section { flex:1; min-height:0; margin-top:31px; display:flex; flex-direction:column; }
.history-caption { color:#999; font-size:12px; padding:0 12px 13px; }
.history-list { overflow:auto; scrollbar-width:thin; flex:1; }
.history-item { display:block; background:transparent; border:0; width:100%; padding:11px 12px; border-radius:8px; margin-bottom:3px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; text-align:left; color:#494949; font-size:13px; }
.history-item:hover:not(:disabled),.history-item.is-active { background:#eaeaea; }
.history-empty { font-size:12px; color:#ababab; margin:0; padding:2px 12px; line-height:1.7; }
.sidebar-footer { display:flex; align-items:center; gap:10px; margin-top:15px; padding:13px 9px 0; border-top:1px solid #e9e9e9; font-size:13px; color:#555; }
.visitor-avatar { width:29px; height:29px; border-radius:50%; background:#e8e8e8; color:#737373; display:grid; place-items:center; font-size:12px; }
.chat-main { flex:1; min-width:0; height:100%; display:flex; flex-direction:column; position:relative; }
.chat-header { height:68px; min-height:68px; display:flex; align-items:center; justify-content:space-between; padding:0 30px; }
.header-left,.header-right { display:flex; gap:12px; align-items:center; }
.header-brand { font-size:18px; font-weight:600; color:#414141; letter-spacing:-.3px; }
.demo-badge { color:#999; font-size:11px; line-height:1; border:1px solid #e9e9e9; border-radius:5px; padding:5px 7px; font-weight:400; }
.header-new-chat { display:none; }
.sidebar-open-button { display:none; }
.conversation-scroll { flex:1; min-height:0; overflow-y:auto; overflow-anchor:none; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#d8d8d8 transparent; }
.welcome { min-height:100%; max-width:800px; margin:0 auto; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:30px 22px 74px; text-align:center; }
.welcome h1 { color:#242424; font-size:30px; font-weight:600; line-height:1.45; letter-spacing:-.7px; margin:0 0 15px; }
.welcome > p { color:#919191; font-size:14px; margin:0; line-height:1.6; }
.suggestions { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; margin-top:34px; }
.suggestions button { color:#656565; display:flex; align-items:center; gap:10px; background:#fff; border:1px solid #e7e7e7; border-radius:10px; padding:12px 14px; font-size:12px; line-height:1.4; text-align:left; transition:background .15s,border-color .15s; }
.suggestions button:hover:not(:disabled) { background:#f7f7f7; border-color:#d3d3d3; }
.suggestions button svg { color:#aaa; }
.conversation { max-width:800px; margin:0 auto; padding:21px 20px 12px; }
.message { margin:0 0 26px; }
.message-user { display:flex; justify-content:flex-end; margin-top:12px; margin-bottom:29px; }
.user-bubble { background:#f1f1f1; border-radius:19px; padding:12px 19px; font-size:15px; line-height:1.75; max-width:85%; white-space:pre-wrap; overflow-wrap:anywhere; }
.assistant-message { width:100%; }
.reply-text { color:#303030; font-size:15px; line-height:1.95; overflow-wrap:anywhere; }
.reply-text p { margin:0; white-space:pre-wrap; }
.reply-text strong { font-weight:600; color:#242424; }
.reply-heading { font-weight:600; padding-top:6px; padding-bottom:3px; }
.paragraph-gap { height:12px; }
.reply-list-item { display:flex; gap:10px; padding:1px 0; }
.reply-list-item > span:first-child { flex-shrink:0; min-width:11px; }
.reply-actions { height:30px; margin-top:9px; display:flex; align-items:center; }
.copy-reply { width:29px; height:29px; border-radius:6px; color:#969696; position:relative; }
.copy-error { position:absolute; left:34px; top:4px; font-size:11px; white-space:nowrap; }
.thinking { height:44px; color:#999; display:flex; align-items:center; gap:8px; font-size:14px; margin-top:-5px; }
.thinking-dot { width:7px; height:7px; border-radius:50%; background:#737373; animation:breathe 1.2s ease-in-out infinite; }
.thinking-ellipsis { margin-left:-6px; }
.restoring { display:flex; justify-content:center; gap:10px; align-items:center; color:#888; padding:50px; }
.conversation-end { height:4px; }
.composer-region { position:relative; flex-shrink:0; padding:14px 26px 0; background:#fff; }
.jump-latest { position:absolute; left:50%; top:-44px; transform:translateX(-50%); width:36px; height:36px; display:grid; place-items:center; border:1px solid #e7e7e7; border-radius:50%; background:#fff; color:#555; box-shadow:0 2px 8px #0001; }
.stream-caret { display:inline-block; width:6px; height:6px; margin:3px 0; border-radius:50%; background:#777; animation:breathe 1s infinite; }
.composer-wrap { width:100%; max-width:760px; margin:0 auto; }
.composer { border:1px solid #e2e2e2; background:#fff; border-radius:23px; padding:16px 16px 11px 20px; box-shadow:0 3px 13px rgba(0,0,0,.035); transition:border-color .15s; }
.composer:focus-within { border-color:#c7c7c7; }
.composer textarea { display:block; resize:none; width:100%; min-height:30px; max-height:180px; padding:0; outline:none; border:0; background:none; font-size:15px; color:#333; line-height:1.65; scrollbar-width:thin; }
.composer textarea:focus-visible { outline:none; }
.composer textarea::placeholder { color:#a1a1a1; }
.composer textarea:disabled { color:#999; }
.composer-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:8px; }
.composer-hint { font-size:10px; color:#b0b0b0; letter-spacing:.1px; }
.send-button { width:33px; height:33px; border:0; border-radius:50%; background:#232323; color:#fff; display:grid; place-items:center; flex-shrink:0; }
.send-button:hover:not(:disabled) { background:#444; }
.send-button:disabled { background:#e8e8e8; color:#aaa; }
.composer-note { font-size:10px; color:#aaa; margin:10px 0 11px; text-align:center; line-height:1.5; }
.chat-error { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:11px 13px; margin-bottom:10px; border:1px solid #eed9d5; background:#fff9f7; border-radius:10px; color:#985e50; font-size:12px; line-height:1.7; }
.chat-error > button { flex-shrink:0; display:flex; align-items:center; gap:5px; padding:5px 7px; background:none; border:0; color:#8c5548; text-decoration:underline; text-underline-offset:3px; }
.chat-error .error-close { padding:2px; }
.sponsor-section { margin-top:17px; padding-top:18px; border-top:1px solid #eeeeee; }
.sponsor-card { display:block; width:100%; max-width:570px; border:1px solid #e3e3e3; background:#fff; border-radius:15px; padding:16px 18px; text-align:left; color:#252525; transition:border-color .15s,background .15s; }
.sponsor-card:hover { border-color:#c9c9c9; background:#fefefe; }
.sponsor-top { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:11px; }
.sponsor-brand { display:flex; align-items:center; gap:7px; font-size:12px; color:#676767; }
.brand-mark { width:19px; height:19px; display:grid; place-items:center; border-radius:50%; border:1px solid #eaeaea; font-size:10px; background:#fbfbfb; color:#808080; }
.sponsor-label { font-size:10px; color:#929292; padding:3px 6px; background:#f3f3f3; border-radius:5px; line-height:1.2; }
.sponsor-body { display:flex; align-items:center; gap:20px; }
.sponsor-copy { flex:1; min-width:0; }
.sponsor-copy h3 { font-size:15px; line-height:1.6; margin:0 0 5px; font-weight:600; }
.sponsor-copy > p { font-size:12px; color:#7c7c7c; line-height:1.7; margin:0; overflow-wrap:anywhere; }
.sponsor-bottom { display:flex; align-items:center; gap:16px; margin-top:10px; }
.product-price { font-size:13px; font-weight:600; color:#555; }
.product-link { display:flex; align-items:center; gap:2px; font-size:11px; color:#767676; }
.product-thumbnail { width:82px; height:90px; flex-shrink:0; display:grid; place-items:center; border-radius:9px; overflow:hidden; background:#f7f7f5; color:#aaa; font-size:12px; }
.product-thumbnail img { width:100%; height:100%; object-fit:contain; }
.product-dialog { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); width:min(430px,calc(100vw - 36px)); border:1px solid #e2e2e2; padding:22px; border-radius:18px; background:#fff; color:#333; max-height:90dvh; overflow:auto; box-shadow:0 20px 60px #0002; }
.product-dialog::backdrop { background:#0005; }
.dialog-heading { display:flex; align-items:center; justify-content:space-between; font-size:13px; color:#999; margin-bottom:18px; }
.dialog-product-image { display:block; width:160px; height:180px; object-fit:contain; background:#f7f7f5; border-radius:12px; margin:0 auto 22px; }
.dialog-brand { color:#999; font-size:11px; }
.product-dialog h2 { font-size:20px; margin:9px 0; line-height:1.5; }
.product-dialog p { font-size:14px; line-height:1.8; margin:8px 0; color:#777; }
.dialog-price { display:block; margin-top:18px; font-size:19px; }
.product-dialog .dialog-note { font-size:11px; border-top:1px solid #eee; margin-top:20px; padding-top:13px; color:#999; }
.sidebar-overlay { display:none; }
.sidebar-collapsed .chat-sidebar { display:none; }
.sidebar-collapsed .sidebar-open-button { display:flex; }
.sidebar-collapsed .header-new-chat { display:flex; }
.spin { animation:spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
@keyframes breathe { 50% { opacity:.35; transform:scale(.85); } }
@media(min-width:1600px) { .chat-sidebar { width:266px; flex-basis:266px; } .chat-header { padding-left:36px; padding-right:36px; } }
@media(max-width:1050px) { .chat-sidebar { width:224px; flex-basis:224px; } .sidebar-heading { padding-left:3px; } .brand-home { gap:6px; font-size:16px; } .chat-header { padding:0 22px; } .welcome h1 { font-size:28px; } .suggestions { max-width:480px; } }
@media(max-width:760px) { .chat-app { min-height:0; } .chat-sidebar,.sidebar-collapsed .chat-sidebar { display:flex; position:fixed; z-index:30; left:0; top:0; bottom:0; width:260px; transform:translateX(-100%); transition:transform .18s; } .chat-sidebar.is-open { transform:translateX(0); } .sidebar-overlay { display:block; position:fixed; inset:0; background:#0005; border:0; padding:0; z-index:25; } .sidebar-open-button,.header-new-chat { display:flex; } .chat-header { height:60px; min-height:60px; padding:0 14px; } .header-left { gap:6px; } .header-brand { font-size:16px; } .header-right { gap:6px; } .demo-badge { font-size:10px; padding:4px 6px; } .welcome { padding:25px 24px 55px; } .welcome h1 { font-size:27px; } .welcome > p { font-size:13px; } .suggestions { margin-top:28px; gap:9px; max-width:340px; } .suggestions button { font-size:11px; padding:10px 12px; } .conversation { padding:10px 20px 0; } .user-bubble { max-width:90%; font-size:14px; padding:11px 15px; border-radius:17px; } .reply-text { font-size:14px; line-height:1.9; } .message-user { margin-bottom:24px; } .composer-region { padding:10px 14px 0; } .composer { padding:14px 12px 10px 16px; border-radius:21px; } .composer textarea { font-size:16px; } .composer-hint { font-size:9px; } .composer-note { font-size:9px; margin:8px 0 max(9px,env(safe-area-inset-bottom)); } .sponsor-card { padding:14px; } .sponsor-body { gap:13px; } .sponsor-copy h3 { font-size:14px; } .sponsor-copy > p { font-size:11px; } .product-thumbnail { width:70px; height:83px; } .chat-error { font-size:11px; gap:8px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; scroll-behavior:auto!important; } }

/* Follow-up cue appears only after the assigned advertisement is in view. */
.followup-cue { max-width:570px; margin: 12px 0 0; padding: 0 2px; }
.followup-cue p { margin: 0 0 6px; color: #65707b; font-size: 14px; line-height: 1.5; }
.followup-cue > div { display: flex; gap: 6px; flex-wrap: wrap; }
.followup-cue button { max-width: 100%; border: 1px solid #e5e8eb; border-radius: 14px; background: #fafbfc; padding: 6px 10px; font-size: 14px; line-height: 1.5; color: #46515c; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.followup-cue button:hover { background: #edf4f7; border-color: #afc2cc; }
.followup-cue button:focus-visible { outline: 2px solid #537b90; outline-offset: 2px; }
.followup-cue button:disabled { opacity: .5; cursor: default; }
@media (max-width: 600px) { .followup-cue { margin-bottom: 6px; } .followup-cue > div { gap: 5px; } .followup-cue button { padding: 5px 9px; } }
