:root{
  --cpaee-ai-panel-bg:#ffffff;
  --cpaee-ai-panel-soft:#f5f6f8;
  --cpaee-ai-panel-border:#dfe4ea;
  --cpaee-ai-panel-shadow:0 22px 60px rgba(17,24,39,.18), 0 4px 16px rgba(17,24,39,.12);
  --cpaee-ai-text-main:#2f3640;
  --cpaee-ai-text-soft:#697386;
  --cpaee-ai-pill-border:#8aa3ba;
  --cpaee-ai-blue:#2f6ae6;
  --cpaee-ai-blue-strong:#1e5bd8;
  --cpaee-ai-warm:#c4741e;
}

.cpaee-quiz-ai-root{
  position:relative;
  z-index:2147483000;
}

.cpaee-ai-screenlock{
  overflow:hidden !important;
}

.cpaee-ai-overlay{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:2147483647;
  pointer-events:none;
}
.cpaee-ai-overlay.is-fullscreen{
  inset:0;
  right:auto;
  bottom:auto;
}

.cpaee-ai-widget{
  pointer-events:auto;
  width:min(420px, calc(100vw - 32px));
  height:min(620px, calc(100vh - 28px));
  max-height:calc(100vh - 28px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:24px;
  border:1px solid var(--cpaee-ai-panel-border);
  background:var(--cpaee-ai-panel-bg);
  box-shadow:var(--cpaee-ai-panel-shadow);
  color:var(--cpaee-ai-text-main);
  font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  animation:cpaeeAiSlideIn .24s ease-out forwards;
}
.cpaee-ai-widget.is-fullscreen,
.cpaee-ai-overlay.is-fullscreen .cpaee-ai-widget{
  position:fixed !important;
  inset:14px !important;
  width:auto !important;
  height:auto !important;
  max-width:none !important;
  max-height:none !important;
  border-radius:26px !important;
}
@keyframes cpaeeAiSlideIn{
  from{ transform:translateY(10px); opacity:0; }
  to{ transform:translateY(0); opacity:1; }
}

.cpaee-ai-header{
  position:sticky;
  top:0;
  z-index:2;
  height:58px;
  padding:10px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:linear-gradient(180deg,#f7f8fa 0%,#eef1f5 100%);
  border-bottom:1px solid #e2e7ec;
}
.cpaee-ai-titlewrap{
  display:flex;
  align-items:center;
  gap:8px;
  margin-right:12px;
  color:#3a4653;
  font-size:15px;
  font-weight:700;
}
.cpaee-ai-titlebot{
  width:24px;
  height:24px;
  min-width:24px;
  background:transparent url('../farhat-robot-premium.png') center bottom/contain no-repeat;
}
.cpaee-ai-headerbtns{
  display:flex;
  gap:22px;
  align-items:center;
}
.cpaee-ai-btn{
  position:relative;
  width:18px;
  height:18px;
  min-width:18px;
  min-height:18px;
  padding:0;
  margin:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:#7d8894;
  cursor:pointer;
  box-shadow:none;
}
.cpaee-ai-btn:hover{
  color:#5f6b78;
  background:transparent;
  transform:none;
}
.cpaee-ai-btn:focus-visible{
  outline:2px solid rgba(47,106,230,.22);
  outline-offset:3px;
  border-radius:4px;
}
.cpaee-ai-fullscreen::before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:13px;
  height:13px;
  transform:translate(-50%,-50%);
  background:
    linear-gradient(currentColor,currentColor) left top/7px 2px no-repeat,
    linear-gradient(currentColor,currentColor) left top/2px 7px no-repeat,
    linear-gradient(currentColor,currentColor) right top/7px 2px no-repeat,
    linear-gradient(currentColor,currentColor) right top/2px 7px no-repeat,
    linear-gradient(currentColor,currentColor) left bottom/7px 2px no-repeat,
    linear-gradient(currentColor,currentColor) left bottom/2px 7px no-repeat,
    linear-gradient(currentColor,currentColor) right bottom/7px 2px no-repeat,
    linear-gradient(currentColor,currentColor) right bottom/2px 7px no-repeat;
}
.cpaee-ai-close::before,
.cpaee-ai-close::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:12px;
  height:2px;
  background:currentColor;
  border-radius:2px;
}
.cpaee-ai-close::before{ transform:translate(-50%,-50%) rotate(45deg); }
.cpaee-ai-close::after{ transform:translate(-50%,-50%) rotate(-45deg); }

.cpaee-ai-body{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-height:240px;
  overflow:hidden;
  background:#fff;
}
.cpaee-ai-messages{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:22px 16px 20px;
  background:#fff;
}
.cpaee-ai-messages::-webkit-scrollbar{ width:8px; }
.cpaee-ai-messages::-webkit-scrollbar-thumb{ background:#d6dde6; border-radius:999px; }

.cpaee-ai-welcome{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
  min-height:160px;
  padding-top:14px;
  text-align:center;
}
.cpaee-ai-messages.has-response{ gap:18px; }
.cpaee-ai-messages.has-response .cpaee-ai-welcome{
  min-height:0;
  padding-top:2px;
  padding-bottom:16px;
  border-bottom:1px solid #e8edf4;
}
.cpaee-ai-messages.has-response .cpaee-ai-welcome-copy{ max-width:760px; }
.cpaee-ai-messages.has-response .cpaee-ai-welcome-title{
  font-size:18px;
  line-height:1.25;
}
.cpaee-ai-messages.has-response .cpaee-ai-welcome-sub{
  margin-top:6px;
  font-size:14px;
  line-height:1.45;
  color:#6a7585;
}
.cpaee-ai-welcome-copy{ max-width:290px; }
.cpaee-ai-welcome-title{
  margin:0;
  color:#323b44;
  font-size:24px;
  line-height:1.22;
  font-weight:600;
}
.cpaee-ai-welcome-sub{
  margin:8px 0 0;
  color:#5d6775;
  font-size:20px;
  line-height:1.25;
  font-weight:500;
}
.cpaee-ai-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:8px;
  width:100%;
}
.cpaee-ai-actions > *{ margin:0 !important; }
.cpaee-ai-action-btn{
  appearance:none;
  display:inline-flex !important;
  float:none !important;
  width:auto;
  min-height:0;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid var(--cpaee-ai-pill-border);
  background:#ffffff;
  color:#486273;
  font-size:13px;
  line-height:1.2;
  font-weight:500;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  cursor:pointer;
  margin:0 !important;
  transition:background .15s ease,color .15s ease,border-color .15s ease,transform .15s ease;
}
.cpaee-ai-action-btn:hover:not(:disabled){
  background:#f7fafc;
  transform:translateY(-1px);
}
.cpaee-ai-action-btn:disabled{ opacity:.65; cursor:not-allowed; }

.cpaee-ai-status,
.cpaee-ai-empty{
  margin:0 0 6px;
  padding:10px 12px;
  color:#2958c8;
  background:#eef4ff;
  border:1px solid rgba(47,106,230,.14);
  border-radius:14px;
  font-size:14px;
  line-height:1.35;
}
.cpaee-ai-empty{
  color:#5d6775;
  background:#f8fafc;
  border-color:#e4e8ef;
}
.cpaee-ai-status.is-error{
  color:#9c3112;
  background:#fff4ed;
  border-color:#fed7aa;
}
.cpaee-ai-status:empty{ display:none; }

.cpaee-ai-conversation{
  display:flex;
  flex-direction:column;
  gap:14px;
  width:100%;
  margin-top:2px;
}
.cpaee-ai-msg{
  padding:12px 14px;
  border-radius:20px;
  max-width:92%;
  border:1px solid #e4e8ef;
  background:#f7f8fb;
  color:#2f3640;
  line-height:1.6;
  box-shadow:0 8px 18px rgba(15,23,42,.05);
  font-size:14px;
  word-wrap:break-word;
}
.cpaee-ai-user{
  margin-left:auto;
  background:#edf4ff;
  border-color:#cfe0ff;
  font-size:12px;
  color:#3d5e8f;
  align-self:flex-end;
}
.cpaee-ai-assistant{
  max-width:100%;
  width:100%;
  align-self:stretch;
  padding:18px 18px 16px;
  border-radius:22px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfcfe 100%);
  border-color:#dfe6ee;
  box-shadow:0 12px 26px rgba(15,23,42,.06);
}
.cpaee-ai-assistant h1,.cpaee-ai-assistant h2,.cpaee-ai-assistant h3,.cpaee-ai-assistant h4,.cpaee-ai-assistant h5,.cpaee-ai-assistant h6{
  color:#24364d;
  margin:.4em 0 .3em;
  line-height:1.25;
}
.cpaee-ai-assistant p{ margin:.35em 0; }
.cpaee-ai-assistant ul,.cpaee-ai-assistant ol{ margin:.45em 0 .7em 1.2em; }
.cpaee-ai-assistant li{ margin:.15em 0; }
.cpaee-ai-assistant blockquote{
  margin:.5em 0;
  padding:8px 12px;
  border-left:3px solid var(--cpaee-ai-blue);
  background:#f2f8ff;
  color:#1a2b44;
}
.cpaee-ai-assistant pre,.cpaee-ai-assistant code{
  color:#1e293b;
  background:#eef2f7;
  border:1px solid #d8e0ea;
  border-radius:8px;
}
.cpaee-ai-assistant pre{ padding:10px 12px; overflow:auto; }
.cpaee-ai-assistant code{ padding:.18rem .4rem; }
.cpaee-ai-assistant table{ width:100%; border-collapse:collapse; margin:.6em 0; }
.cpaee-ai-assistant th,.cpaee-ai-assistant td{ border:1px solid #e2e8f0; padding:6px 8px; font-size:12px; }
.cpaee-ai-assistant a{ color:#225ede; }

.cpaee-ai-launcher,
button.cpaee-ai-launcher,
.cpaee-ai-launcher.show,
button.cpaee-ai-launcher.show{
  all:unset;
  position:fixed;
  right:22px;
  bottom:14px;
  z-index:2147483647;
  width:220px;
  height:206px;
  display:block;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  background:transparent !important;
  cursor:grab;
  pointer-events:auto;
  touch-action:none;
  user-select:none;
}
.cpaee-ai-launcher:hover{ cursor:grab; }
.cpaee-ai-launcher:active,
.cpaee-ai-launcher.is-dragging{ cursor:grabbing !important; }
.cpaee-ai-bubble-tip{
  position:absolute;
  left:0;
  bottom:92px;
  width:126px;
  min-height:126px;
  padding:16px 16px 15px;
  border-radius:20px;
  border:1px solid #dce6f2;
  background:#fff;
  box-shadow:0 18px 38px rgba(15,23,42,.14),0 5px 14px rgba(47,106,230,.08);
  color:#3f4e63;
  font-size:13.5px;
  font-weight:900;
  line-height:1.22;
  letter-spacing:-.015em;
  text-align:left;
  white-space:pre-line;
  opacity:0;
  transform:translateY(6px);
  pointer-events:none;
}
.cpaee-ai-bubble-tip.is-visible{
  animation:cpaeeAiBubbleIn 7.45s cubic-bezier(.19,1,.22,1) forwards;
}
.cpaee-ai-bubble-tip::after{
  content:"";
  position:absolute;
  right:20px;
  bottom:-9px;
  width:18px;
  height:18px;
  background:#fff;
  border-right:1px solid #dce6f2;
  border-bottom:1px solid #dce6f2;
  transform:rotate(45deg);
}
@keyframes cpaeeAiBubbleIn{
  0%{ opacity:0; transform:translate3d(0,12px,0) scale(.96); }
  6%{ opacity:1; transform:translate3d(0,0,0) scale(1); }
  83%{ opacity:1; transform:translate3d(0,0,0) scale(1); }
  100%{ opacity:0; transform:translate3d(0,-5px,0) scale(.985); }
}
.cpaee-ai-bubble-ico{
  position:absolute;
  right:0;
  bottom:0;
  z-index:2;
  width:118px;
  height:144px;
  display:block;
  background:transparent !important;
}
.cpaee-ai-bubble-robot{
  position:absolute;
  right:0;
  bottom:0;
  width:118px;
  height:144px;
  display:block;
  background:transparent url('../farhat-robot-premium.png') center bottom/contain no-repeat;
  filter:drop-shadow(0 10px 18px rgba(15,23,42,.20));
  animation:cpaeeAiRobotFloat 2.8s ease-in-out infinite;
  transform-origin:center bottom;
}
@keyframes cpaeeAiRobotFloat{
  0%,100%{ transform:translateY(0) scale(1); }
  50%{ transform:translateY(-5px) scale(1.015); }
}

.cpaee-ai-overlay:not(.is-fullscreen) .cpaee-ai-header{
  cursor:grab !important;
  touch-action:none !important;
  user-select:none !important;
}
.cpaee-ai-overlay:not(.is-fullscreen) .cpaee-ai-header:active{
  cursor:grabbing !important;
}

@media (max-width:782px){
  .cpaee-ai-widget{
    width:min(420px, calc(100vw - 20px));
    height:min(620px, calc(100vh - 20px));
  }
  .cpaee-ai-overlay{ right:10px; bottom:10px; }
  .cpaee-ai-launcher,
  button.cpaee-ai-launcher,
  .cpaee-ai-launcher.show,
  button.cpaee-ai-launcher.show{
    right:12px;
    bottom:10px;
    width:204px;
    height:194px;
    min-width:204px;
    min-height:194px;
  }
  .cpaee-ai-bubble-tip{
    left:0;
    bottom:86px;
    width:120px;
    min-height:120px;
    font-size:13px;
  }
  .cpaee-ai-bubble-ico,
  .cpaee-ai-bubble-robot{
    width:110px;
    height:134px;
  }
}
@media (max-width:420px){
  .cpaee-ai-titlebot{ width:24px; min-width:24px; }
  .cpaee-ai-welcome-title{ font-size:22px; }
  .cpaee-ai-welcome-sub{ font-size:18px; }
}


/* AI launcher integrated into the shared quiz side toolbar. */
.cpaee-quiz-sidebar-ai-slot {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

.cpaee-quiz-sidebar-ai-slot:empty {
  display: none;
}

.cpaee-ai-launcher.cpaee-ai-toolbar-launcher,
button.cpaee-ai-launcher.cpaee-ai-toolbar-launcher,
.cpaee-ai-launcher.cpaee-ai-toolbar-launcher.show,
button.cpaee-ai-launcher.cpaee-ai-toolbar-launcher.show {
  all: unset;
  position: relative;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  border-radius: 999px;
  color: var(--cyb-text-soft, #d7deea);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  user-select: none;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.cpaee-ai-launcher.cpaee-ai-toolbar-launcher:hover {
  background: rgba(0, 240, 255, .08);
}

.cpaee-ai-launcher.cpaee-ai-toolbar-launcher:active {
  transform: scale(.92);
}

.cpaee-ai-launcher.cpaee-ai-toolbar-launcher:focus-visible {
  outline: 2px solid var(--cyb-cyan, #00f0ff);
  outline-offset: 3px;
}

.cpaee-ai-toolbar-launcher .cpaee-ai-bubble-tip {
  display: none !important;
}

.cpaee-ai-toolbar-launcher .cpaee-ai-bubble-ico {
  position: relative;
  inset: auto;
  width: 34px;
  height: 34px;
  display: block;
}

.cpaee-ai-toolbar-launcher .cpaee-ai-bubble-robot {
  position: absolute;
  left: 50%;
  right: auto;
  top: 50%;
  bottom: auto;
  width: 34px;
  height: 38px;
  background-size: contain;
  background-position: center bottom;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, .35));
  animation: none;
  transform: translate(-50%, -50%);
}

.cpaee-ai-toolbar-launcher:hover .cpaee-ai-bubble-robot {
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, .65));
}

.cpaee-ai-toolbar-launcher[hidden] {
  display: none !important;
}

.cpaee-quiz-sidebar-ai-slot[hidden] {
  display: none !important;
}

/* ========================================================================
   v2.1.57 — Use the toolbar robot throughout the Farhat.AI chat panel
   Keeps the existing AI behavior and DOM contract; visual layer only.
   ======================================================================== */
.cpaee-quiz-ai-root,
.cpaee-ai-overlay,
.cpaee-ai-widget {
  --cyb-bg:#05070d;
  --cyb-bg-soft:#0a0e1a;
  --cyb-bg-elevated:#101828;
  --cyb-bg-sunken:#060811;
  --cyb-border:rgba(148,163,220,.12);
  --cyb-border-hi:rgba(148,163,220,.28);
  --cyb-text:#e6f0ff;
  --cyb-text-soft:#a3b0d0;
  --cyb-text-muted:#6b7899;
  --cyb-cyan:#00f0ff;
  --cyb-cyan-soft:rgba(0,240,255,.16);
  --cyb-cyan-glow:rgba(0,240,255,.48);
  --cyb-magenta:#ff2fd8;
  --cyb-magenta-soft:rgba(255,47,216,.16);
  --cyb-magenta-glow:rgba(255,47,216,.48);
  --cyb-danger:#ff4d6d;
  --cyb-radius-sm:6px;
  --cyb-radius-md:10px;
  --cyb-radius-lg:14px;
  --cyb-font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI","Inter",system-ui,sans-serif;
  --cyb-font-mono:"JetBrains Mono","SF Mono","Menlo","Consolas","Roboto Mono",monospace;
}

.cpaee-ai-overlay {
  right:20px;
  bottom:20px;
}

.cpaee-ai-widget {
  width:min(420px,calc(100vw - 24px));
  height:min(620px,calc(100vh - 40px));
  border-radius:var(--cyb-radius-lg);
  border:1px solid var(--cyb-border-hi);
  background-color:#05070d;
  background:var(--cyb-bg, #05070d);
  color:var(--cyb-text, #e6f0ff);
  font-family:var(--cyb-font-sans);
  box-shadow:0 32px 80px rgba(0,0,0,.8),0 0 0 1px var(--cyb-border-hi),0 0 80px rgba(0,240,255,.08),0 0 40px rgba(255,47,216,.04);
  background-image:radial-gradient(ellipse at top right,rgba(0,240,255,.06) 0%,transparent 50%),radial-gradient(ellipse at bottom left,rgba(255,47,216,.04) 0%,transparent 50%),linear-gradient(180deg,var(--cyb-bg, #05070d) 0%,var(--cyb-bg-sunken, #060811) 100%);
}
.cpaee-ai-widget::before {
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:1px;
  background:linear-gradient(180deg,transparent,var(--cyb-cyan) 20%,var(--cyb-magenta) 80%,transparent);
  opacity:.5;
  pointer-events:none;
  z-index:4;
}
.cpaee-ai-widget.is-fullscreen,
.cpaee-ai-overlay.is-fullscreen .cpaee-ai-widget {
  border-radius:var(--cyb-radius-lg)!important;
}

.cpaee-ai-header {
  height:72px;
  padding:18px 20px;
  background:transparent;
  border-bottom:1px solid var(--cyb-border);
  color:var(--cyb-text);
}
.cpaee-ai-header::after {
  content:"";
  position:absolute;
  left:20px;
  right:20px;
  bottom:0;
  height:1px;
  background:linear-gradient(90deg,transparent,var(--cyb-cyan) 30%,var(--cyb-magenta) 70%,transparent);
  opacity:.35;
}
.cpaee-ai-titlewrap {
  gap:10px;
  color:var(--cyb-text);
  font-family:var(--cyb-font-mono);
  font-size:13px;
  font-weight:500;
  letter-spacing:.1em;
  text-transform:uppercase;
  text-shadow:0 0 20px rgba(0,240,255,.3);
}
.cpaee-ai-titlebot {
  width:32px;
  height:32px;
  min-width:32px;
  filter:drop-shadow(0 0 8px rgba(0,240,255,.45));
}
.cpaee-ai-headerbtns { gap:8px; }
.cpaee-ai-btn {
  width:32px;
  height:32px;
  min-width:32px;
  min-height:32px;
  border:1px solid var(--cyb-border);
  border-radius:var(--cyb-radius-sm);
  background:var(--cyb-bg-soft);
  color:var(--cyb-text-soft);
  transition:background .2s ease,border-color .2s ease,color .2s ease,box-shadow .2s ease;
}
.cpaee-ai-btn:hover {
  background:var(--cyb-cyan-soft);
  border-color:var(--cyb-cyan);
  color:var(--cyb-cyan);
  box-shadow:0 0 12px var(--cyb-cyan-glow);
}
.cpaee-ai-btn:focus-visible { outline:2px solid var(--cyb-cyan); outline-offset:2px; }

.cpaee-ai-body { background:var(--cyb-bg-sunken, #060811); }
.cpaee-ai-messages {
  gap:14px;
  padding:16px;
  background-color:#060811;
  background:radial-gradient(circle at 20% 0%,rgba(0,240,255,.04) 0%,transparent 40%),radial-gradient(circle at 80% 100%,rgba(255,47,216,.04) 0%,transparent 40%),var(--cyb-bg-sunken, #060811);
  scroll-behavior:smooth;
}
.cpaee-ai-messages::-webkit-scrollbar { width:6px; }
.cpaee-ai-messages::-webkit-scrollbar-track { background:transparent; }
.cpaee-ai-messages::-webkit-scrollbar-thumb { background:var(--cyb-border-hi); border-radius:3px; }

.cpaee-ai-welcome {
  min-height:260px;
  justify-content:center;
  gap:14px;
  padding:24px;
  color:var(--cyb-text-muted);
}
.cpaee-ai-welcome::before {
  content:"";
  width:64px;
  height:64px;
  display:block;
  border-radius:var(--cyb-radius-lg);
  background:var(--cyb-bg-elevated) url('../farhat-robot-premium.png') center bottom/52px 60px no-repeat;
  border:1px solid var(--cyb-cyan);
  box-shadow:0 0 20px var(--cyb-cyan-glow),inset 0 0 20px rgba(0,240,255,.08);
}
.cpaee-ai-welcome-copy { max-width:300px; }
.cpaee-ai-welcome-title {
  color:var(--cyb-text);
  font-family:var(--cyb-font-mono);
  font-size:15px;
  font-weight:500;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.cpaee-ai-welcome-sub {
  margin-top:10px;
  color:var(--cyb-text-muted);
  font-size:13px;
  line-height:1.5;
  font-weight:400;
}
.cpaee-ai-messages.has-response .cpaee-ai-welcome {
  min-height:0;
  padding:8px 8px 16px;
  border-bottom:1px solid var(--cyb-border);
}
.cpaee-ai-messages.has-response .cpaee-ai-welcome::before { width:42px; height:42px; background-size:32px 32px; }
.cpaee-ai-messages.has-response .cpaee-ai-welcome-title { font-size:12px; }
.cpaee-ai-messages.has-response .cpaee-ai-welcome-sub { font-size:12px; color:var(--cyb-text-muted); }

.cpaee-ai-status,
.cpaee-ai-empty {
  margin:0;
  padding:12px 14px;
  border-radius:var(--cyb-radius-md);
  border:1px solid var(--cyb-border);
  background:var(--cyb-bg-elevated);
  color:var(--cyb-text-soft);
  font-family:var(--cyb-font-mono);
  font-size:12px;
  line-height:1.5;
  text-align:center;
}
.cpaee-ai-status { color:var(--cyb-cyan); border-color:rgba(0,240,255,.3); background:rgba(0,240,255,.08); }
.cpaee-ai-status.is-error { color:#ffb3c1; border-color:rgba(255,77,109,.4); background:rgba(255,77,109,.12); }

.cpaee-ai-conversation { gap:12px; margin-top:0; }
.cpaee-ai-msg {
  max-width:85%;
  padding:10px 14px 12px;
  border-radius:var(--cyb-radius-lg);
  color:var(--cyb-text);
  font-size:13.5px;
  line-height:1.55;
  box-shadow:0 1px 2px rgba(0,0,0,.5),0 0 0 1px var(--cyb-border),0 0 24px rgba(0,0,0,.3);
}
.cpaee-ai-user {
  align-self:flex-end;
  margin-left:auto;
  background:linear-gradient(135deg,rgba(0,240,255,.16),rgba(0,240,255,.08));
  border:1px solid var(--cyb-cyan);
  border-bottom-right-radius:4px;
  color:var(--cyb-text);
  box-shadow:0 0 20px rgba(0,240,255,.16),inset 0 1px 0 rgba(0,240,255,.12);
}
.cpaee-ai-assistant {
  align-self:flex-start;
  width:auto;
  max-width:92%;
  padding:12px 14px;
  background:linear-gradient(135deg,rgba(255,47,216,.12),rgba(255,47,216,.06));
  border:1px solid rgba(255,47,216,.5);
  border-bottom-left-radius:4px;
  color:var(--cyb-text);
  box-shadow:0 0 20px rgba(255,47,216,.12),inset 0 1px 0 rgba(255,47,216,.1);
}
.cpaee-ai-assistant h1,.cpaee-ai-assistant h2,.cpaee-ai-assistant h3,.cpaee-ai-assistant h4,.cpaee-ai-assistant h5,.cpaee-ai-assistant h6 { color:var(--cyb-text); }
.cpaee-ai-assistant blockquote { border-left-color:var(--cyb-cyan); background:rgba(0,240,255,.07); color:var(--cyb-text-soft); }
.cpaee-ai-assistant pre,.cpaee-ai-assistant code { color:var(--cyb-text); background:var(--cyb-bg-soft); border-color:var(--cyb-border-hi); }
.cpaee-ai-assistant th,.cpaee-ai-assistant td { border-color:var(--cyb-border-hi); }
.cpaee-ai-assistant a { color:var(--cyb-cyan); }

.cpaee-ai-actiondock {
  flex:0 0 auto;
  padding:12px;
  border-top:1px solid var(--cyb-border);
  background:var(--cyb-bg-elevated);
  position:relative;
}
.cpaee-ai-actiondock::before {
  content:"";
  position:absolute;
  left:12px;
  right:12px;
  top:0;
  height:1px;
  background:linear-gradient(90deg,transparent,var(--cyb-cyan) 30%,var(--cyb-magenta) 70%,transparent);
  opacity:.35;
}
.cpaee-ai-actions {
  justify-content:flex-start;
  gap:8px;
  padding:8px;
  border:1px solid var(--cyb-border-hi);
  border-radius:var(--cyb-radius-md);
  background:var(--cyb-bg-sunken);
}
.cpaee-ai-action-btn {
  min-height:36px;
  padding:8px 12px;
  border-radius:var(--cyb-radius-md);
  border:1px solid var(--cyb-border-hi);
  background:var(--cyb-bg-elevated);
  color:var(--cyb-text-soft);
  font-family:var(--cyb-font-mono);
  font-size:11px;
  letter-spacing:.02em;
  box-shadow:none;
}
.cpaee-ai-action-btn:hover:not(:disabled) {
  background:var(--cyb-cyan-soft);
  border-color:var(--cyb-cyan);
  color:var(--cyb-cyan);
  box-shadow:0 0 16px rgba(0,240,255,.18);
  transform:translateY(-1px);
}
.cpaee-ai-action-btn:focus-visible { outline:2px solid var(--cyb-cyan); outline-offset:2px; }

@media (max-width:640px) {
  .cpaee-ai-overlay { right:12px; bottom:12px; }
  .cpaee-ai-widget { width:calc(100vw - 24px); height:calc(100vh - 24px); max-height:calc(100vh - 24px); }
  .cpaee-ai-header { height:64px; padding:14px 16px; }
  .cpaee-ai-titlewrap { font-size:12px; }
  .cpaee-ai-messages { padding:12px; }
  .cpaee-ai-actiondock { padding:10px; }
}
