.ask-open { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 14px; border: 0; border-radius: 12px; background: var(--btn-bg); color: var(--btn-fg); font: 600 15px var(--sans); cursor: pointer; box-shadow: 0 8px 24px -10px rgba(15, 23, 42, .45); }
.ask-open svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ask-open:focus-visible, .ask-x:focus-visible, .ask-send:focus-visible, .ask-sugg button:focus-visible, .ask-open[aria-expanded="true"] { display: none; }
.ask { --bub: #F1F4F8; position: fixed; right: 20px; bottom: 20px; z-index: 41; display: flex; flex-direction: column; width: min(392px, calc(100vw - 24px)); height: min(600px, calc(100svh - 96px)); border: 1px solid var(--rule-strong); border-radius: 18px; background: #FFFFFF; color: #0F172A; box-shadow: 0 24px 60px -24px rgba(15, 23, 42, .45); overflow: hidden; }
[data-theme="dark"] .ask { --bub: #2C2C2E; background: #1C1C1E; color: #F5F5F7; }
.ask[hidden] { display: none; }
.ask-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--rule); }
.ask-head b { font-size: 16px; font-weight: 650; }
.ask-x { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: inherit; cursor: pointer; }
.ask-x:hover { background: var(--chip); }
.ask-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ask-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.5; overscroll-behavior: contain; }
.ask-row { display: flex; align-items: flex-end; gap: 8px; max-width: 92%; }
.ask-row.me { align-self: flex-end; }
.ask-msg { padding: 9px 13px; white-space: pre-line; overflow-wrap: anywhere; }
.ask-row.me .ask-msg { border-radius: 16px 16px 4px 16px; background: var(--btn-bg); color: var(--btn-fg); }
.ask-row.bot .ask-msg { border-radius: 16px 16px 16px 4px; background: var(--bub); }
.ask-msg a { color: var(--accent); font-weight: 600; }
.ask-w { opacity: 0; filter: blur(3px); animation: askWord .38s ease forwards; }
@keyframes askWord { to { opacity: 1; filter: blur(0); } }
.ask-dots { display: inline-flex; gap: 4px; padding: 13px 14px; border-radius: 16px 16px 16px 4px; background: var(--bub); }
.ask-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--sub); animation: askDot 1.2s ease-in-out infinite; }
.ask-dots i:nth-child(2) { animation-delay: .15s; }
.ask-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes askDot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.ask-think { display: inline-flex; align-items: center; gap: 9px; padding: 8px 4px; font-size: 14.5px; font-weight: 600; }
.ask-think i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: askPulse 1.2s ease-in-out infinite; }
@keyframes askPulse { 0%, 100% { transform: scale(.7); opacity: .5; } 50% { transform: scale(1.15); opacity: 1; } }
.ask-think span { background: linear-gradient(90deg, var(--sub) 0%, var(--sub) 35%, var(--ink) 50%, var(--sub) 65%, var(--sub) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: askShine 1.8s linear infinite; }
@keyframes askShine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.ask-sugg { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-sugg button { padding: 7px 12px; border: 1px solid var(--rule-strong); border-radius: 999px; background: none; color: inherit; font: 500 13.5px var(--sans); text-align: left; cursor: pointer; }
.ask-sugg button:hover { border-color: currentColor; }
.ask-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--rule); }
.ask-form textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; padding: 11px 12px; border: 1px solid var(--rule-strong); border-radius: 12px; background: transparent; color: inherit; font: 15px/1.4 var(--sans); }
.ask-form textarea:focus { outline: none; border-color: var(--accent); }
.ask-send { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--btn-bg); color: var(--btn-fg); cursor: pointer; }
.ask-send:disabled { opacity: .45; cursor: default; }
.ask-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ask-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .ask-w, .ask-dots i, .ask-think i, .ask-think span { animation: none; opacity: 1; filter: none; } .ask-think span { color: var(--sub); } }
@media (max-width: 599px) {
  .ask-open { right: 12px; bottom: 12px; height: 44px; padding: 0 14px 0 12px; }
  .ask { right: 8px; bottom: 8px; width: calc(100vw - 16px); height: min(620px, calc(100svh - 16px)); }
  }
