.kimi-dock { --kimi-edge:24px; --kimi-bottom:24px; position:fixed; z-index:20; right:var(--kimi-edge); bottom:calc(var(--kimi-bottom) + env(safe-area-inset-bottom)); display:flex; align-items:flex-end; flex-direction:column; gap:12px; pointer-events:none; }
body:has(.workflow-save-bar) .kimi-dock { --kimi-bottom:108px; }
.kimi-dock > * { pointer-events:auto; }
.kimi-launcher { position:relative; display:flex; align-items:center; justify-content:center; gap:0; min-width:56px; height:56px; padding:0 17px; border:1px solid #fff5; border-radius:19px; background:linear-gradient(135deg,#397cab,#245e95); color:white; box-shadow:0 5px 20px #245e9538,0 1px 3px #17203314; font-weight:600; font-size:13px; }
.kimi-launcher > .icon { width:23px; height:23px; }
.kimi-launcher-label { max-width:0; opacity:0; overflow:hidden; white-space:nowrap; transition:max-width .2s ease,opacity .2s ease,margin .2s ease; }
.kimi-launcher:is(:hover,:focus-visible) .kimi-launcher-label { max-width:160px; opacity:1; margin-left:10px; }
.kimi-launcher:hover { background:linear-gradient(135deg,#3377a5,#194e80); }
.kimi-launcher-indicator { position:absolute; right:1px; top:1px; width:12px; height:12px; border:2px solid white; border-radius:50%; background:#1b9566; }
.kimi-panel { position:relative; display:flex; flex-direction:column; width:var(--kimi-width,560px); max-width:calc(100vw - 2 * var(--kimi-edge)); height:var(--kimi-height,760px); max-height:calc(100dvh - var(--appbar-height) - var(--kimi-bottom) - 84px); border:1px solid #cfdeeb; border-radius:18px; background:var(--surface); box-shadow:0 18px 64px #18365026,0 3px 12px #18365010; overflow:hidden; }
.kimi-panel-expanded { --kimi-width:860px; --kimi-height:900px; }
.kimi-resize-handle { position:absolute; top:1px; left:1px; width:25px; height:25px; padding:5px; display:grid; place-items:center; border:0; border-radius:16px 0 8px; background:transparent; color:#6c87a0; opacity:.55; cursor:nwse-resize; touch-action:none; z-index:1; }
.kimi-resize-handle .icon { width:13px; height:13px; pointer-events:none; }
.kimi-resize-handle:is(:hover,:focus-visible),.kimi-resizing .kimi-resize-handle { opacity:1; background:#e6f1fa; }
.kimi-resizing { user-select:none; }
.kimi-panel-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px 18px; background:linear-gradient(105deg,#f2f8fd,#fff); border-bottom:1px solid var(--border); flex-shrink:0; }
.kimi-identity { display:flex; align-items:center; gap:11px; min-width:0; }
.kimi-identity > div { min-width:0; }
.kimi-identity h2 { margin:0; font-size:16px; }
.kimi-identity small { display:block; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); margin-top:3px; font-size:11px; }
.kimi-avatar { display:grid; place-items:center; flex-shrink:0; width:38px; height:38px; border:1px solid #d9e9f5; border-radius:12px; background:white; color:#3478a8; }
.kimi-avatar .icon { width:22px; height:22px; }
.kimi-panel-actions { display:flex; gap:3px; }
.kimi-panel-actions .icon-button { width:32px; height:34px; }
.kimi-panel-actions .icon { width:16px; height:16px; }
.kimi-panel-content { display:flex; flex:1; min-height:0; overflow:auto; }
.kimi-panel-content > .loading-state,.kimi-load-error { width:100%; align-self:center; padding:28px; text-align:center; }
.kimi-chat { flex:1; min-width:0; min-height:340px; display:flex; flex-direction:column; }
.kimi-chat-toolbar { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 14px; border-bottom:1px solid #edf1f6; flex-shrink:0; }
.kimi-chat-toolbar > span { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:10px; }
.kimi-chat-toolbar > span .icon { width:13px; height:13px; }
.kimi-chat-toolbar > div { display:flex; align-items:center; gap:2px; }
.kimi-chat-toolbar .button { min-height:32px; padding:6px 8px; font-size:11px; }
.kimi-chat-toolbar .icon-button { width:32px; height:32px; }
.kimi-transcript { flex:1; min-height:100px; overflow-y:auto; padding:22px 20px; overscroll-behavior:contain; scrollbar-width:thin; }
.kimi-welcome { max-width:600px; margin:4px auto 12px; }
.kimi-welcome h3 { font-size:20px; line-height:1.4; letter-spacing:-.4px; margin:0 0 8px; }
.kimi-welcome > p { color:var(--muted); margin:0; font-size:12px; }
.kimi-suggestions { display:grid; gap:8px; margin-top:20px; }
.kimi-suggestions button { display:flex; align-items:center; gap:10px; width:100%; text-align:left; border:1px solid var(--border); background:var(--surface); color:#3d526b; font:inherit; font-size:11px; line-height:1.5; padding:12px; border-radius:9px; cursor:pointer; }
.kimi-suggestions button .icon { width:16px; height:16px; color:#457fa7; }
.kimi-suggestions button .icon:last-child { margin-left:auto; width:14px; color:#899aad; }
.kimi-suggestions button:hover { border-color:#8fbbdc; background:#f3f9fd; }
.kimi-message { width:92%; margin:0 0 18px; padding:14px 16px; border:1px solid #dce5ef; border-radius:14px; font-size:14px; font-weight:400; line-height:1.7; color:#34465c; overflow-wrap:anywhere; }
.kimi-message > strong { display:flex; align-items:center; gap:6px; color:#203851; font-size:12px; font-weight:600; line-height:1.5; margin-bottom:8px; }
.kimi-message > strong .icon { width:15px; height:15px; color:#397cab; }
.kimi-message > p { white-space:pre-wrap; margin:0; font-size:inherit; line-height:inherit; }
.kimi-user { margin-left:auto; background:#edf5fb; border-color:#d9e7f4; border-bottom-right-radius:4px; }
.kimi-answer { margin-right:auto; background:#f8fafc; border-bottom-left-radius:4px; }
.kimi-answer-body { font:inherit; color:inherit; }
.kimi-answer-body p { font-size:inherit; font-weight:inherit; line-height:inherit; margin:0 0 12px; }
.kimi-answer-body > :last-child { margin-bottom:0; }
.kimi-answer-body h3 { font-size:inherit; font-weight:600; line-height:inherit; margin:16px 0 8px; }
.kimi-answer-body strong { font-weight:600; color:#203851; }
.kimi-answer-body ul { margin:10px 0 12px; padding:0 0 0 20px; }
.kimi-answer-body li { padding:3px 0; }
.kimi-answer-body code { font:inherit; font-variant-numeric:tabular-nums; padding:1px 4px; border:1px solid var(--border); border-radius:4px; background:#fff; }
.kimi-sources-label { text-transform:uppercase; letter-spacing:.07em; font-size:10px; font-weight:600; color:var(--muted); }
.kimi-sources { display:flex; flex-direction:column; gap:7px; margin-top:14px; }
.kimi-source { display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; color:#345b7b; text-decoration:none; font-size:12px; background:#fff; }
.kimi-source:hover { border-color:#91b9d7; background:#f0f7fc; }
.kimi-source > span { min-width:0; }
.kimi-source > .icon { width:15px; height:15px; }
.kimi-source > .icon:last-child { margin-left:auto; }
.kimi-source small { display:block; color:var(--muted); font-size:11px; margin-top:3px; }
.kimi-compose { padding:12px 16px 10px; border-top:1px solid #e6edf4; background:#fbfdff; flex-shrink:0; }
.kimi-compose textarea { width:100%; resize:none; min-height:64px; max-height:110px; padding:10px 12px; font:inherit; font-size:14px; line-height:1.7; border:1px solid #cbd9e6; border-radius:10px; background:var(--surface); }
.kimi-compose textarea:focus { border-color:#6da6ce; }
.kimi-compose-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:7px; }
.kimi-compose-actions > div { display:flex; gap:6px; }
.kimi-compose-actions .button { min-height:34px; padding:7px 12px; font-size:11px; }
.kimi-input-hint { font-size:10px; color:var(--muted); }
.kimi-compose > .form-hint { margin:8px 0 0; font-size:10px; display:flex; align-items:center; gap:5px; }
.kimi-compose > .form-hint .icon { width:12px; height:12px; }
.kimi-compose .form-error { margin:0 0 10px; padding:8px 10px; max-height:90px; overflow:auto; font-size:11px; }
.kimi-about { flex-shrink:0; border-top:1px solid var(--border); font-size:11px; background:var(--surface); }
.kimi-about summary { display:flex; justify-content:space-between; gap:12px; padding:11px 17px; cursor:pointer; color:var(--muted); }
.kimi-about summary .icon { width:14px; height:14px; }
.kimi-about[open] > summary > .icon { transform:rotate(180deg); }
.kimi-about > div { max-height:165px; overflow:auto; padding:0 17px 12px; }
.kimi-about p { font-size:12px; line-height:1.6; margin:0 0 8px; }
.kimi-about p:last-child { margin-bottom:0; }
.kimi-history { display:flex; flex-direction:column; flex:1; min-height:0; overflow:hidden; padding:18px; }
.kimi-history [data-kimi-history-list] { display:flex; flex-direction:column; flex:1; min-height:0; }
.kimi-history-rows { flex:1; min-height:0; overflow:auto; scrollbar-width:thin; }
.kimi-history .loading-state,.kimi-history-empty { flex:1; }
.kimi-show-history .kimi-compose,.kimi-show-history .kimi-about { display:none; }
.kimi-history .list-pagination { flex-shrink:0; margin-top:auto; border-top:1px solid var(--border); }
.kimi-history-row:last-child { border-bottom:0; }
.kimi-history-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.kimi-history-heading h3 { margin:0; font-size:18px; }
.kimi-history-heading .button { min-height:32px; font-size:11px; }
.kimi-history .field { font-size:11px; gap:6px; margin-bottom:10px; }
.kimi-history input { min-height:36px; }
.kimi-history-row { display:flex; align-items:center; border-bottom:1px solid #e8edf3; gap:6px; padding:6px 0; }
.kimi-resume { flex:1; min-width:0; text-align:left; padding:10px 8px; border:0; border-radius:7px; background:transparent; color:inherit; }
.kimi-resume:hover { background:#f0f7fc; }
.kimi-resume strong { display:block; font-size:12px; line-height:1.6; }
.kimi-resume small { display:block; font-size:10px; color:var(--muted); margin-top:3px; }
.kimi-history-row .icon-button { flex-shrink:0; }
.kimi-history .list-pagination { gap:10px; flex-wrap:wrap; padding:14px 0; }
.kimi-history .list-pagination-controls { gap:6px; }
.kimi-history .list-pagination .button { padding:6px 8px; min-height:32px; font-size:10px; }
.kimi-history .list-pagination p,.kimi-history .list-page-number { font-size:10px; }
.kimi-history-empty { text-align:center; color:var(--muted); padding:24px 10px; }
.kimi-history-empty > .icon { width:28px; height:28px; }
.kimi-history-empty h3 { color:var(--ink); }
.kimi-panel-expanded .kimi-suggestions { grid-template-columns:1fr 1fr; }
.kimi-usage-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:16px; margin:8px 0 18px; }
.kimi-usage-cards > div { display:flex; flex-direction:column; gap:8px; }
.kimi-usage-cards span { color:var(--muted); font-size:.78rem; }
.kimi-usage-cards strong { font-size:1.3rem; }
.kimi-settings .kimi-usage-cards { grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; margin:0 0 18px; }
.kimi-settings .kimi-usage-cards > div { padding:2px 20px; border-left:1px solid var(--border); }
.kimi-settings .kimi-usage-cards > div:first-child { border-left:0; padding-left:0; }
.kimi-settings fieldset > p { margin:0 0 16px; }
.kimi-settings fieldset > .form-hint { margin:12px 0 0; }
.kimi-settings fieldset > .checkbox-field { margin-top:12px; }
.kimi-settings fieldset > .field { max-width:640px; }
.kimi-settings table { min-width:740px; }
.kimi-settings table th,.kimi-settings table td { padding:15px 22px; }
.kimi-settings .kimi-workspace-table :is(th,td):nth-child(3),.kimi-settings .kimi-workspace-table :is(th,td):nth-child(4) { text-align:right; font-variant-numeric:tabular-nums; }
.kimi-settings fieldset { min-width:0; margin:0; padding:0; border:0; }
.kimi-settings legend { font-size:14px; font-weight:600; margin-bottom:12px; }
@media (max-width:600px) {
  .kimi-dock { --kimi-edge:12px; --kimi-bottom:12px; }
  body:has(.workflow-save-bar) .kimi-dock { --kimi-bottom:136px; }
  .kimi-panel,.kimi-panel-expanded { width:calc(100vw - 24px); max-height:calc(100dvh - var(--kimi-bottom) - 84px); }
  .kimi-panel [data-kimi-expand],.kimi-resize-handle { display:none; }
  .kimi-panel-expanded .kimi-suggestions { grid-template-columns:1fr; }
  .kimi-launcher { height:52px; min-width:52px; border-radius:17px; }
  .kimi-launcher-label { max-width:160px; opacity:1; margin-left:8px; }
  .kimi-panel-header { padding:14px 16px; }
  .kimi-transcript { padding:16px 12px; }
  .kimi-message { width:96%; padding:12px 14px; }
  .kimi-identity small { max-width:215px; }
  .kimi-settings .kimi-usage-cards { grid-template-columns:1fr 1fr; gap:20px 0; }
  .kimi-settings .kimi-usage-cards > div:nth-child(odd) { border-left:0; padding-left:0; }
}
@media (prefers-reduced-motion:reduce) { .kimi-launcher-label { transition:none; } }

.kimi-safeguards > .settings-disclosure { border-radius:0; }
.kimi-safeguards .surface-footer { border-radius:0; }
.kimi-safeguards .settings-subheading { border-top:1px solid var(--border); }
.kimi-safeguards .list-empty { padding:26px 22px; }
.kimi-settings .settings-form-body > fieldset + fieldset { padding-top:20px; border-top:1px solid var(--border); }
