/* ── 小奥 AI 助手原型 ───────────────────────────────────────────── */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.ole-assistant-shell{position:fixed;right:28px;bottom:28px;z-index:1000;font-family:"PingFang SC","Helvetica Neue","Microsoft YaHei",sans-serif}
.ole-assistant-hint{position:absolute;right:86px;bottom:12px;width:max-content;padding:10px 14px;border:1px solid rgba(17,18,23,.1);border-radius:14px;background:rgba(255,255,255,.96);box-shadow:0 12px 34px rgba(17,18,23,.13);font-size:12px;font-weight:750;color:#252830;transition:.25s ease;pointer-events:none}
.ole-assistant-hint:after{content:"";position:absolute;right:-5px;top:50%;width:10px;height:10px;background:#fff;border-top:1px solid rgba(17,18,23,.1);border-right:1px solid rgba(17,18,23,.1);transform:translateY(-50%) rotate(45deg)}
.ole-assistant-launcher{position:relative;width:74px;height:74px;border:0;border-radius:24px;background:#ffd500;box-shadow:0 18px 46px rgba(17,18,23,.28);cursor:pointer;transition:transform .25s ease,box-shadow .25s ease;overflow:visible}
@media(hover:hover) and (pointer:fine){.ole-assistant-entry:not(.is-pressed):not(.is-dragging) .ole-assistant-launcher:hover{transform:translateY(-2px);box-shadow:0 22px 52px rgba(17,18,23,.34)}}
.ole-assistant-launcher:focus-visible,.ole-assistant-close:focus-visible,.ole-assistant-chip:focus-visible,.ole-assistant-send:focus-visible,.ole-assistant-input:focus-visible{outline:3px solid rgba(0,162,255,.34);outline-offset:3px}
.ole-assistant-launcher img{position:absolute;width:88px;max-width:none;left:-8px;bottom:-2px;filter:drop-shadow(0 8px 10px rgba(17,18,23,.18));pointer-events:none}
.ole-assistant-status-dot{position:absolute;right:-3px;top:-3px;width:17px;height:17px;border:4px solid #fff;border-radius:50%;background:#52c41a}
.ole-assistant-panel{position:fixed;right:28px;bottom:116px;width:min(400px,calc(100vw - 32px));height:min(610px,calc(100vh - 145px));display:flex;flex-direction:column;border:1px solid rgba(17,18,23,.13);border-radius:28px;background:#fff;box-shadow:0 34px 90px rgba(17,18,23,.3);overflow:hidden;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(18px) scale(.96);transform-origin:bottom right;transition:opacity .22s ease,transform .22s ease,visibility .22s}
.ole-assistant-panel.is-open{opacity:1;visibility:visible;pointer-events:auto;transform:none}
.ole-assistant-entry[hidden],.ole-assistant-hint[hidden]{display:none}
.ole-assistant-head,.ole-assistant-notice,.ole-assistant-composer{flex-shrink:0}
.ole-assistant-head{display:flex;align-items:center;gap:12px;padding:16px 16px 14px;background:#121923;color:#fff}
.ole-assistant-avatar{width:50px;height:50px;flex:0 0 50px;display:grid;place-items:center;border-radius:16px;background:#ffd500;overflow:hidden}
.ole-assistant-avatar img{width:61px;max-width:none;margin-top:7px}
.ole-assistant-title{min-width:0;flex:1}.ole-assistant-title strong{display:block;font-size:15px;letter-spacing:.2px}.ole-assistant-title span{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:10px;color:rgba(255,255,255,.62)}
.ole-assistant-title span:before{content:"";width:6px;height:6px;border-radius:50%;background:#52c41a;box-shadow:0 0 0 3px rgba(82,196,26,.12)}
.ole-assistant-close{width:44px;height:44px;flex:0 0 44px;border:0;border-radius:12px;background:rgba(255,255,255,.08);color:#fff;font-size:26px;line-height:1;cursor:pointer;touch-action:manipulation}
.ole-assistant-notice{padding:8px 14px;background:#e8f8ee;border-bottom:1px solid rgba(35,124,72,.12);color:#17653a;font-size:10px;text-align:center}.ole-assistant-notice.is-error{background:#fff0ed;color:#9d2c1c}
.ole-assistant-messages{flex:1;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:18px 16px 14px;background:#f5f2eb}
.ole-message{display:flex;gap:9px;margin-bottom:14px;align-items:flex-end}.ole-message.user{justify-content:flex-end}.ole-message-mini{width:28px;height:28px;flex:0 0 28px;display:grid;place-items:center;border-radius:9px;background:#ffd500;overflow:hidden}.ole-message-mini img{width:34px;max-width:none;margin-top:5px}
.ole-bubble{min-width:0;max-width:calc(100% - 37px);overflow-wrap:anywhere;word-break:break-word;padding:12px 14px;border-radius:17px;background:#fff;box-shadow:0 5px 16px rgba(17,18,23,.06);font-size:14px;line-height:1.68;color:#303238;white-space:pre-wrap}.ole-message.assistant .ole-bubble{border-bottom-left-radius:5px}.ole-message.user .ole-bubble{max-width:88%;background:#111820;color:#fff;border-bottom-right-radius:5px}
.ole-bubble p{margin:0 0 9px}.ole-bubble p:last-child{margin-bottom:0}.ole-bubble ul,.ole-bubble ol{margin:3px 0 8px;padding-left:20px}.ole-bubble li{margin:4px 0}.ole-bubble strong{font-weight:850;color:#15181d}.ole-bubble code{padding:1px 4px;border-radius:5px;background:#edf0f2;font:11px ui-monospace,SFMono-Regular,Menlo,monospace}
.ole-bubble blockquote{margin:5px 0 10px;padding:7px 9px;border-left:3px solid #74cbe9;background:#f2fafc;color:#40515a}.ole-bubble pre{max-width:100%;margin:7px 0 10px;padding:9px;overflow:auto;border-radius:9px;background:#17212b;color:#f4f7f8;white-space:pre}.ole-bubble pre code{padding:0;background:transparent;color:inherit;white-space:pre}.ole-bubble hr{height:1px;margin:10px 0;border:0;background:#dfe5e8}
.ole-markdown-table-scroll{max-width:100%;margin:7px 0 11px;overflow-x:auto;border:1px solid #dce3e7;border-radius:11px;background:#fff;white-space:normal;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;scrollbar-width:thin}.ole-markdown-table{width:max-content;min-width:100%;border-collapse:collapse;font-size:12px;line-height:1.5}.ole-markdown-table th,.ole-markdown-table td{min-width:108px;max-width:230px;padding:8px 9px;border-right:1px solid #e4e9ec;border-bottom:1px solid #e4e9ec;text-align:left;vertical-align:top;overflow-wrap:anywhere;word-break:break-word}.ole-markdown-table th{background:#eef7fa;color:#142a35;font-weight:800}.ole-markdown-table th:last-child,.ole-markdown-table td:last-child{border-right:0}.ole-markdown-table tbody tr:last-child td{border-bottom:0}.ole-markdown-table-scroll:focus-visible{outline:2px solid #17a9dd;outline-offset:2px}
.ole-assistant-suggestions{display:flex;flex-wrap:wrap;gap:7px;margin:2px 0 15px 37px}.ole-assistant-chip{padding:8px 10px;border:1px solid rgba(0,118,189,.2);border-radius:999px;background:#eaf7fd;color:#006da9;font-size:11px;font-weight:700;cursor:pointer}.ole-assistant-chip:hover{background:#d9f2fd}
.ole-typing{display:inline-flex;gap:4px;align-items:center;height:16px}.ole-typing i{width:5px;height:5px;border-radius:50%;background:#8d9096;animation:ole-typing 1s infinite ease-in-out}.ole-typing i:nth-child(2){animation-delay:.14s}.ole-typing i:nth-child(3){animation-delay:.28s}@keyframes ole-typing{0%,60%,100%{transform:none;opacity:.35}30%{transform:translateY(-4px);opacity:1}}
.ole-assistant-composer{padding:12px 13px 13px;background:#fff;border-top:1px solid rgba(17,18,23,.09)}
.ole-assistant-form{display:flex;align-items:flex-end;gap:9px;padding:7px 7px 7px 13px;border:1px solid rgba(17,18,23,.14);border-radius:17px;background:#fafafa}.ole-assistant-form:focus-within{border-color:#00a2ff;box-shadow:0 0 0 3px rgba(0,162,255,.1)}
.ole-assistant-input{min-width:0;width:0;min-height:44px;max-height:86px;flex:1;resize:none;border:0;background:transparent;color:#22252b;font:inherit;font-size:16px;line-height:1.5;outline:0;padding:10px 0}.ole-assistant-input::placeholder{color:#9b9da1}
.ole-assistant-send{width:44px;height:44px;flex:0 0 44px;border:0;border-radius:12px;background:#00a2ff;color:#052034;font-size:22px;font-weight:900;cursor:pointer;touch-action:manipulation}.ole-assistant-send:disabled{opacity:.4;cursor:not-allowed}
.ole-assistant-privacy,.ole-assistant-voice-tip{display:block;padding-top:6px;text-align:center;font-size:10px;line-height:1.45;color:#747780;overflow-wrap:anywhere}
.ole-assistant-voice-tip{color:#42677d}
.ole-assistant-quota-note{margin:0 0 6px;padding:6px 9px;border-radius:9px;background:#fff5cf;color:#70571c;text-align:center;font-size:11px;font-weight:700}
.ole-assistant-limit{padding:12px;border:1px solid #e3d49a;border-radius:14px;background:#fff9e8}.ole-assistant-limit strong,.ole-assistant-limit span{display:block}.ole-assistant-limit strong{font-size:14px;color:#202830}.ole-assistant-limit span{margin-top:4px;font-size:11px;line-height:1.5;color:#6d7073}.ole-assistant-limit div{display:flex;gap:7px;margin-top:10px}.ole-assistant-limit a{flex:1;min-height:40px;display:grid;place-items:center;border-radius:10px;background:#111923;color:white;font-size:12px;font-weight:750;text-decoration:none}.ole-assistant-limit a+ a{background:#00a2ff;color:#062235}.ole-assistant-composer.is-limited>.ole-assistant-form,.ole-assistant-composer.is-limited>.ole-assistant-voice-tip,.ole-assistant-composer.is-limited>.ole-voice-review,.ole-assistant-composer.is-limited>.ole-voice-restore,.ole-assistant-composer.is-limited>.ole-voice-surface{display:none!important}
@media(max-width:620px),(max-height:500px){
  /* Bottom tabs: 64px high + their safe-area offset; leave 24px above them. */
  .ole-assistant-shell{right:14px;bottom:96px;bottom:calc(64px + max(8px,env(safe-area-inset-bottom)) + 24px);z-index:1200}.ole-assistant-launcher{width:62px;height:62px;border-radius:20px}.ole-assistant-launcher img{width:75px;left:-7px}.ole-assistant-status-dot{width:15px;height:15px}.ole-assistant-hint{right:72px;bottom:9px;font-size:10px;padding:8px 10px}
  body.ole-chat-open .mobile-tabs{visibility:hidden;pointer-events:none}
  .ole-assistant-panel{position:fixed;inset:auto;top:var(--ole-vtop,0px);left:var(--ole-vleft,0px);width:var(--ole-vwidth,100%);height:100vh;height:var(--ole-vheight,100dvh);max-height:none;border:0;border-radius:0;transform:none;transition:opacity .15s,visibility .15s}
  .ole-assistant-head{min-height:58px;padding:8px 10px;padding-top:max(8px,env(safe-area-inset-top));padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}.ole-assistant-avatar{width:40px;height:40px;flex-basis:40px;border-radius:12px}.ole-assistant-avatar img{width:49px}.ole-assistant-close{width:40px;height:40px;flex-basis:40px}.ole-privacy-head-button{min-width:40px;min-height:40px;padding:0 8px}
  .ole-assistant-title strong{font-size:15px}.ole-assistant-title span{font-size:10px}.ole-assistant-notice{padding:6px 12px;font-size:11px}
  .ole-assistant-messages{padding:13px max(10px,env(safe-area-inset-right)) 8px max(10px,env(safe-area-inset-left))}.ole-message{gap:7px;margin-bottom:11px}.ole-message-mini{width:25px;height:25px;flex-basis:25px;border-radius:8px}.ole-message-mini img{width:31px}.ole-bubble{max-width:calc(100% - 32px);padding:10px 12px;border-radius:15px;font-size:15px;line-height:1.58}.ole-message.user .ole-bubble{max-width:82%}.ole-assistant-suggestions{margin:0 0 11px 32px;gap:6px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.ole-assistant-suggestions::-webkit-scrollbar{display:none}.ole-assistant-chip{min-height:38px;flex:0 0 auto;font-size:12px;padding:7px 11px}
  .ole-assistant-composer{padding:8px max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
  .ole-assistant-panel.is-keyboard-open .ole-assistant-composer{padding-bottom:8px}
  .ole-assistant-panel.is-keyboard-open .ole-assistant-voice-tip,.ole-assistant-panel.is-keyboard-open .ole-assistant-privacy{display:none}
}
@media(max-height:450px){
  .ole-assistant-head{padding-top:6px;padding-bottom:6px}.ole-assistant-notice{padding:4px 12px}.ole-assistant-voice-tip,.ole-assistant-privacy{display:none}
}

/* The entry is separate from the fixed chat panel. Padding encloses image/label/motion. */
.ole-assistant-entry{position:fixed;right:28px;bottom:28px;width:74px;padding:20px 8px 22px;box-sizing:content-box;transform-origin:top left}
.ole-assistant-entry.is-snapping{transition:transform .18s ease-out}
.ole-assistant-launcher{display:block;padding:0;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.ole-assistant-launcher img{height:auto}
.ole-assistant-launcher-label{position:absolute;left:0;right:0;bottom:-22px;height:20px;line-height:20px;text-align:center;border-radius:10px;background:#fff;color:#27313c;font-size:11px;font-weight:750;box-shadow:0 2px 8px #17212b18}
.ole-assistant-entry.is-pressed .ole-assistant-launcher,.ole-assistant-entry.is-dragging .ole-assistant-launcher{transform:none;transition:none}
.ole-assistant-entry.is-dragging .ole-assistant-launcher{cursor:grabbing}
.ole-assistant-entry.is-dragging{will-change:transform}
.ole-assistant-hint{display:flex;align-items:center;gap:4px;right:calc(100% + 10px);bottom:28px;max-width:min(230px,var(--ole-hint-width,calc(100vw - 140px)));box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;pointer-events:auto;line-height:1.5;padding:9px 8px 9px 12px;font-size:12px}
.ole-assistant-hint small{display:block;margin-top:2px;color:#687780;font-size:10px;font-weight:400}
.ole-assistant-hint button{flex:0 0 32px;width:32px;height:32px;border:0;border-radius:50%;background:transparent;color:#687780;font:20px sans-serif;cursor:pointer}
.ole-assistant-entry[data-edge="left"] .ole-assistant-hint{left:calc(100% + 10px);right:auto}
.ole-assistant-entry[data-edge="left"] .ole-assistant-hint:after{right:auto;left:-5px;transform:translateY(-50%) rotate(225deg)}
.ole-assistant-entry.is-cramped .ole-assistant-hint{display:none}
.ole-assistant-safe-area{position:fixed;width:0;height:0;visibility:hidden;pointer-events:none;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}
.ole-assistant-entry-tools{flex-shrink:0;display:flex;justify-content:flex-end;padding:0 12px;background:#f5f2eb}
.ole-assistant-entry-tools button{min-height:32px;padding:4px 0;border:0;background:none;color:#687780;cursor:pointer;font-family:inherit;font-size:11px}
.ole-assistant-entry-tools button:focus-visible,.ole-assistant-hint button:focus-visible{outline:2px solid #00a2ff;outline-offset:2px}
.ole-assistant-entry.is-nudging .ole-assistant-launcher img{animation:ole-launcher-nudge .7s ease-in-out 2}
@keyframes ole-launcher-nudge{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@media(max-width:620px),(max-height:500px){
  .ole-assistant-entry{right:14px;bottom:96px;bottom:calc(64px + max(8px,env(safe-area-inset-bottom)) + 24px);width:62px}
}
@media(prefers-reduced-motion:reduce){
  .ole-assistant-entry.is-snapping,.ole-assistant-launcher{transition:none}
  .ole-assistant-entry.is-nudging .ole-assistant-launcher img{animation:none}
  .ole-assistant-entry:not(.is-pressed):not(.is-dragging) .ole-assistant-launcher:hover{transform:none}
}

/* Knowledge diagrams remain readable in narrow chat bubbles. */
.ole-knowledge-image{display:block;max-width:100%;margin:10px 0;line-height:0}
.ole-knowledge-image img{display:block;width:auto;height:auto;max-width:100%;border-radius:8px;background:#fff}
