.ai-operation-assistant {
  --assistant-primary: #6657df;
  --assistant-primary-strong: #5144c7;
  --assistant-secondary: #8b7cf4;
  --assistant-accent: #d95fc7;
  --assistant-ink: #282544;
  --assistant-muted: #6f6b86;
  width: 100%;
  min-width: 0;
  margin: 18px 0 24px;
  color: var(--assistant-ink);
  box-sizing: border-box;
}

.ai-operation-assistant[hidden] {
  display: none !important;
}

.ai-assistant-card,
.ai-assistant-card * {
  box-sizing: border-box;
}

.ai-assistant-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(102, 87, 223, 0.17);
  border-radius: 24px;
  background:
    radial-gradient(circle at 94% 2%, rgba(151, 137, 246, 0.22), transparent 32%),
    radial-gradient(circle at 3% 100%, rgba(229, 168, 224, 0.14), transparent 28%),
    linear-gradient(145deg, #fff 0%, #faf9ff 46%, #f5f3ff 100%);
  box-shadow: 0 18px 50px rgba(79, 65, 173, 0.1);
  padding: 24px;
}

.ai-assistant-card::before {
  position: absolute;
  top: -72px;
  right: 10%;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(115, 98, 225, 0.09);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.ai-assistant-launcher {
  display: none;
}

.ai-assistant-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.ai-assistant-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, var(--assistant-primary-strong), var(--assistant-secondary) 68%, #b67ce9);
  box-shadow: 0 9px 24px rgba(94, 77, 205, 0.27);
}

.ai-assistant-mark svg,
.ai-assistant-launcher-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-assistant-heading {
  min-width: 0;
}

.ai-assistant-eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--assistant-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ai-assistant-heading h2 {
  margin: 0;
  color: var(--assistant-ink);
  font-size: clamp(20px, 2.3vw, 28px);
  line-height: 1.2;
}

.ai-assistant-heading p {
  margin: 7px 0 0;
  max-width: 720px;
  color: var(--assistant-muted);
  font-size: 14px;
  line-height: 1.7;
}

.ai-assistant-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(102, 87, 223, 0.13);
  border-radius: 12px;
  padding: 0;
  color: #625a85;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease;
}

.ai-assistant-close:hover {
  color: var(--assistant-primary);
  background: #fff;
  transform: rotate(6deg) scale(1.04);
}

.ai-assistant-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.ai-assistant-form {
  margin-top: 20px;
}

.ai-assistant-form > label {
  display: block;
  margin-bottom: 8px;
  color: #36324f;
  font-size: 13px;
  font-weight: 750;
}

.ai-assistant-compose {
  overflow: hidden;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(102, 87, 223, 0.17);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 28px rgba(84, 70, 166, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.ai-assistant-compose:focus-within {
  border-color: rgba(102, 87, 223, 0.52);
  box-shadow: 0 0 0 4px rgba(102, 87, 223, 0.09), 0 10px 30px rgba(78, 64, 167, 0.09);
}

.ai-assistant-compose textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 92px;
  max-height: 190px;
  resize: vertical;
  border: 0;
  outline: 0;
  padding: 16px 17px 8px;
  color: #302c48;
  background: transparent;
  font: inherit;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.ai-assistant-compose textarea::placeholder {
  color: #93a099;
}

.ai-assistant-compose textarea:disabled {
  opacity: 0.72;
}

.ai-assistant-compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 9px 9px 16px;
  border-top: 1px solid rgba(102, 87, 223, 0.08);
}

.ai-assistant-compose-footer > span {
  color: #87938d;
  font-size: 12px;
}

.ai-assistant-compose-footer button,
.ai-assistant-go-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  padding: 0 17px;
  color: #fff;
  background: linear-gradient(135deg, var(--assistant-primary-strong), var(--assistant-primary) 58%, #8274ed);
  box-shadow: 0 9px 20px rgba(89, 72, 201, 0.23);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.ai-assistant-compose-footer button:hover,
.ai-assistant-go-button:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.ai-assistant-compose-footer button:disabled,
.ai-assistant-go-button:disabled {
  opacity: 0.55;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.ai-assistant-compose-footer button i {
  font-style: normal;
  font-size: 17px;
}

.ai-assistant-privacy,
.ai-assistant-status {
  margin: 9px 2px 0;
  color: #79867f;
  font-size: 12px;
  line-height: 1.55;
}

.ai-assistant-status {
  min-height: 19px;
  color: var(--assistant-primary);
  font-weight: 650;
}

.ai-assistant-status.is-error {
  color: #b33c3c;
}

.ai-operation-assistant.is-loading .ai-assistant-mark {
  animation: ai-assistant-pulse 1.25s ease-in-out infinite;
}

@keyframes ai-assistant-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.94);
    opacity: 0.72;
  }
}

.ai-assistant-result {
  margin-top: 18px;
}

.ai-assistant-answer-card {
  overflow: hidden;
  border: 1px solid rgba(102, 87, 223, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 34px rgba(78, 63, 165, 0.08);
}

.ai-assistant-answer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  color: #fff;
  background: linear-gradient(135deg, #5143bd, #6d5dde 58%, #8a79ee);
}

.ai-assistant-answer-kicker {
  display: block;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.09em;
}

.ai-assistant-answer-head h3 {
  margin: 0;
  color: inherit;
  font-size: 21px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ai-assistant-confidence {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 750;
}

.ai-assistant-degraded {
  margin: 0;
  padding: 11px 20px;
  color: #8c5d1d;
  background: #fff7e8;
  font-size: 13px;
  line-height: 1.55;
}

.ai-assistant-answer-section {
  min-width: 0;
  padding: 17px 20px;
  border-bottom: 1px solid rgba(102, 87, 223, 0.08);
}

.ai-assistant-answer-section h4 {
  margin: 0 0 9px;
  color: #34304d;
  font-size: 14px;
}

.ai-assistant-answer-section > p {
  margin: 0;
  color: #69657e;
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.ai-assistant-material-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-assistant-material-grid .ai-assistant-answer-section:first-child {
  border-right: 1px solid rgba(102, 87, 223, 0.08);
}

.ai-assistant-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: #656178;
  font-size: 14px;
  line-height: 1.6;
}

.ai-assistant-list li {
  padding-left: 2px;
  overflow-wrap: anywhere;
}

.ai-assistant-list li::marker {
  color: var(--assistant-primary);
  font-weight: 750;
}

.ai-assistant-empty-line {
  color: #8a9690 !important;
  font-size: 13px !important;
}

.ai-assistant-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.ai-assistant-section-head h4 {
  margin: 0;
}

.ai-assistant-copy-button {
  flex: 0 0 auto;
  border: 1px solid rgba(102, 87, 223, 0.18);
  border-radius: 9px;
  padding: 6px 11px;
  color: var(--assistant-primary-strong);
  background: #f6f4ff;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.ai-assistant-prompt {
  white-space: pre-wrap;
  border-radius: 12px;
  padding: 13px 14px;
  color: #49445e !important;
  background: #f6f4ff;
  font-family: inherit;
}

.ai-assistant-alternatives {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-assistant-alternatives li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.ai-assistant-alternatives strong {
  flex: 0 0 auto;
  color: #46405f;
  font-size: 13px;
}

.ai-assistant-alternatives span {
  color: #718078;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ai-assistant-answer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
}

.ai-assistant-answer-footer small {
  color: #7d8b84;
  font-size: 12px;
}

.ai-assistant-question {
  margin: 0;
  padding: 22px 20px 14px;
  color: #2e4236;
  font-size: 17px;
  font-weight: 680;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.ai-assistant-clarification-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 16px;
}

.ai-assistant-clarification-choices button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid rgba(102, 87, 223, 0.14);
  border-radius: 999px;
  padding: 7px 12px;
  color: #5b50b8;
  background: #f6f4ff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.ai-assistant-clarification-choices button:hover {
  border-color: rgba(102, 87, 223, 0.36);
  color: #fff;
  background: linear-gradient(135deg, var(--assistant-primary-strong), var(--assistant-primary));
  box-shadow: 0 7px 16px rgba(89, 72, 201, 0.2);
  transform: translateY(-1px);
}

.ai-assistant-clarification-choices button:focus-visible {
  outline: 3px solid rgba(102, 87, 223, 0.2);
  outline-offset: 2px;
}

.ai-assistant-clarification-choices button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.ai-assistant-followup-note {
  margin: 0;
  padding: 13px 20px;
  color: #718078;
  background: #f7faf8;
  font-size: 12px;
  line-height: 1.6;
}

html[data-theme="dark"] .ai-operation-assistant {
  color: #edf5ef;
}

html[data-theme="dark"] .ai-assistant-card {
  border-color: rgba(151, 137, 246, 0.2);
  background:
    radial-gradient(circle at 92% 2%, rgba(105, 88, 219, 0.23), transparent 34%),
    linear-gradient(145deg, #232136, #191827);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .ai-assistant-heading h2,
html[data-theme="dark"] .ai-assistant-form > label,
html[data-theme="dark"] .ai-assistant-answer-section h4 {
  color: #eef7f1;
}

html[data-theme="dark"] .ai-assistant-heading p,
html[data-theme="dark"] .ai-assistant-privacy {
  color: #aaa6bc;
}

html[data-theme="dark"] .ai-assistant-compose,
html[data-theme="dark"] .ai-assistant-answer-card {
  border-color: rgba(151, 137, 246, 0.16);
  background: rgba(31, 29, 46, 0.94);
}

html[data-theme="dark"] .ai-assistant-compose textarea,
html[data-theme="dark"] .ai-assistant-answer-section > p,
html[data-theme="dark"] .ai-assistant-list {
  color: #d5e1d9;
}

html[data-theme="dark"] .ai-assistant-prompt {
  color: #dce8e0 !important;
  background: #29263c;
}

html[data-theme="dark"] .ai-assistant-close {
  color: #d2cdef;
  border-color: rgba(151, 137, 246, 0.2);
  background: rgba(46, 42, 68, 0.92);
}

html[data-theme="dark"] .ai-assistant-launcher {
  color: #f6f4ff;
  border-color: rgba(164, 151, 255, 0.26);
  background:
    radial-gradient(circle at 12% 0%, rgba(180, 141, 238, 0.24), transparent 38%),
    linear-gradient(135deg, #2d2949, #211f37);
}

body:is(.works-focus-mode, .library-focus-mode) .ai-operation-assistant {
  display: none !important;
}

body:is(.works-focus-mode, .library-focus-mode) .ai-operation-assistant.ai-assistant-global-entry {
  display: block !important;
}

body.feature-focus-mode .ai-operation-assistant,
.ai-operation-assistant.ai-assistant-feature-context {
  position: fixed;
  z-index: 96;
  right: 24px;
  bottom: 24px;
  width: min(540px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

body.feature-focus-mode .ai-operation-assistant:not(.is-feature-expanded),
.ai-operation-assistant.ai-assistant-feature-context:not(.is-feature-expanded) {
  width: min(390px, calc(100vw - 48px));
  overflow: visible;
}

@media (min-width: 761px) {
  .ai-operation-assistant.ai-assistant-global-entry.ai-assistant-awaiting-sidebar-anchor:not(.has-sidebar-launcher-anchor) {
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

body.feature-focus-mode .ai-operation-assistant:not(.is-feature-expanded) .ai-assistant-card,
.ai-operation-assistant.ai-assistant-feature-context:not(.is-feature-expanded) .ai-assistant-card {
  display: none;
}

body.feature-focus-mode .ai-operation-assistant:not(.is-feature-expanded) .ai-assistant-launcher,
.ai-operation-assistant.ai-assistant-feature-context:not(.is-feature-expanded) .ai-assistant-launcher {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 82px;
  overflow: hidden;
  border: 1px solid rgba(112, 94, 224, 0.2);
  border-radius: 23px;
  padding: 13px 14px;
  color: var(--assistant-ink);
  background:
    radial-gradient(circle at 5% 0%, rgba(203, 170, 246, 0.28), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(147, 183, 255, 0.2), transparent 40%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 244, 255, 0.98));
  box-shadow: 0 16px 42px rgba(69, 54, 156, 0.2), 0 2px 8px rgba(83, 67, 176, 0.08);
  text-align: left;
  cursor: pointer;
  transform-origin: right bottom;
  animation: ai-assistant-launcher-enter 420ms cubic-bezier(0.2, 0.82, 0.25, 1) both;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

body.feature-focus-mode .ai-operation-assistant:not(.is-feature-expanded) .ai-assistant-launcher:hover,
.ai-operation-assistant.ai-assistant-feature-context:not(.is-feature-expanded) .ai-assistant-launcher:hover {
  border-color: rgba(102, 87, 223, 0.34);
  box-shadow: 0 20px 48px rgba(69, 54, 156, 0.25), 0 3px 10px rgba(83, 67, 176, 0.1);
  transform: translateY(-3px);
}

.ai-assistant-launcher:focus-visible,
.ai-assistant-close:focus-visible {
  outline: 3px solid rgba(102, 87, 223, 0.23);
  outline-offset: 3px;
}

.ai-assistant-launcher-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 17px;
  color: #fff;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.28), transparent 34%),
    linear-gradient(145deg, #5547cf, #7663ea 58%, #a06de0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 24px rgba(91, 72, 204, 0.28);
}

.ai-assistant-launcher-icon::before {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(119, 101, 230, 0.18);
  border-radius: 21px;
  content: "";
  animation: ai-assistant-support-ring 2.6s ease-out infinite;
}

.ai-assistant-launcher-icon i {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #4bd49b;
  box-shadow: 0 0 0 3px rgba(75, 212, 155, 0.18);
}

.ai-assistant-icon-spark {
  fill: currentColor;
  stroke-width: 1.2;
}

.ai-assistant-launcher-copy {
  min-width: 0;
}

.ai-assistant-launcher-copy strong {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-assistant-launcher-copy small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--assistant-primary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-assistant-launcher-shine {
  position: absolute;
  z-index: -1;
  top: -70%;
  left: -35%;
  width: 34%;
  height: 240%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transform: rotate(18deg);
  animation: ai-assistant-shine 4.8s ease-in-out infinite;
}

body.feature-focus-mode .ai-operation-assistant.is-feature-expanded .ai-assistant-card,
.ai-operation-assistant.ai-assistant-feature-context.is-feature-expanded .ai-assistant-card {
  display: block;
  animation: ai-assistant-panel-open 300ms cubic-bezier(0.2, 0.82, 0.25, 1) both;
}

body.feature-focus-mode .ai-operation-assistant.is-feature-expanded .ai-assistant-header,
.ai-operation-assistant.ai-assistant-feature-context.is-feature-expanded .ai-assistant-header {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

body.feature-focus-mode .ai-operation-assistant.is-feature-expanded .ai-assistant-close,
.ai-operation-assistant.ai-assistant-feature-context.is-feature-expanded .ai-assistant-close {
  display: inline-flex;
}

@media (min-width: 761px) {
  body .ai-operation-assistant.ai-assistant-global-entry.has-sidebar-launcher-anchor {
    position: fixed;
    z-index: 96;
    inset: 0 auto auto 0;
    width: 0;
    height: 0;
    max-width: none;
    max-height: none;
    margin: 0;
    overflow: visible;
    pointer-events: none;
  }

  body .ai-operation-assistant.ai-assistant-global-entry.has-sidebar-launcher-anchor .ai-assistant-launcher,
  body .ai-operation-assistant.ai-assistant-global-entry.has-sidebar-launcher-anchor.is-feature-expanded .ai-assistant-launcher {
    position: fixed;
    z-index: 2;
    top: var(--ai-assistant-sidebar-top);
    left: var(--ai-assistant-sidebar-left);
    isolation: isolate;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    width: var(--ai-assistant-sidebar-width);
    height: var(--ai-assistant-sidebar-height);
    min-height: var(--ai-assistant-sidebar-height);
    overflow: hidden;
    border: 1px solid rgba(112, 94, 224, 0.2);
    border-radius: var(--ai-assistant-sidebar-radius);
    padding: 13px 14px;
    color: var(--assistant-ink);
    background:
      radial-gradient(circle at 5% 0%, rgba(203, 170, 246, 0.28), transparent 38%),
      radial-gradient(circle at 100% 100%, rgba(147, 183, 255, 0.2), transparent 40%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 244, 255, 0.98));
    box-shadow: 0 16px 42px rgba(69, 54, 156, 0.2), 0 2px 8px rgba(83, 67, 176, 0.08);
    text-align: left;
    pointer-events: auto;
    cursor: pointer;
    transform-origin: center;
    animation: none;
  }

  body .ai-operation-assistant.ai-assistant-global-entry.has-sidebar-launcher-anchor.is-feature-expanded .ai-assistant-launcher {
    border-color: rgba(102, 87, 223, 0.36);
    box-shadow: 0 18px 44px rgba(69, 54, 156, 0.24), 0 0 0 3px rgba(102, 87, 223, 0.08);
  }

  body .ai-operation-assistant.ai-assistant-global-entry.has-sidebar-launcher-anchor .ai-assistant-launcher-copy strong {
    display: block;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body .ai-operation-assistant.ai-assistant-global-entry.has-sidebar-launcher-anchor.is-feature-expanded .ai-assistant-card {
    position: fixed;
    z-index: 1;
    right: auto;
    bottom: var(--ai-assistant-panel-bottom);
    left: var(--ai-assistant-panel-left);
    display: block;
    width: var(--ai-assistant-panel-width);
    max-width: calc(100vw - var(--ai-assistant-panel-left) - 16px);
    max-height: calc(100vh - var(--ai-assistant-panel-bottom) - 16px);
    max-height: calc(100dvh - var(--ai-assistant-panel-bottom) - 16px);
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    pointer-events: auto;
    scrollbar-width: thin;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  body .ai-operation-assistant.ai-assistant-global-entry.has-sidebar-launcher-anchor .ai-assistant-launcher {
    gap: 8px;
    padding: 8px 9px;
  }

  body .ai-operation-assistant.ai-assistant-global-entry.has-sidebar-launcher-anchor .ai-assistant-launcher-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  body .ai-operation-assistant.ai-assistant-global-entry.has-sidebar-launcher-anchor .ai-assistant-launcher-copy strong {
    font-size: 14px;
  }
}

@keyframes ai-assistant-launcher-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}

@keyframes ai-assistant-panel-open {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

@keyframes ai-assistant-support-ring {
  0%,
  35% {
    opacity: 0.72;
    transform: scale(0.9);
  }
  78%,
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes ai-assistant-shine {
  0%,
  58% {
    left: -35%;
  }
  78%,
  100% {
    left: 125%;
  }
}

@media (max-width: 760px) {
  .ai-operation-assistant.ai-assistant-feature-context:not(.is-feature-expanded) {
    display: none !important;
  }

  .ai-operation-assistant {
    width: 100%;
    max-width: 100%;
    margin: 12px 0 18px;
    scroll-margin-top: 12px;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .ai-assistant-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 19px;
    padding: 17px 14px;
  }

  .ai-assistant-header {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
  }

  .ai-assistant-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .ai-assistant-heading h2 {
    font-size: 21px;
  }

  .ai-assistant-heading p {
    font-size: 13px;
    line-height: 1.6;
  }

  .ai-assistant-form {
    margin-top: 15px;
  }

  .ai-assistant-compose textarea {
    min-height: 100px;
    max-height: 170px;
    padding: 14px 13px 7px;
    font-size: 16px;
  }

  .ai-assistant-compose-footer {
    padding: 7px 7px 7px 12px;
  }

  .ai-assistant-compose-footer button {
    min-height: 40px;
    padding: 0 13px;
    white-space: nowrap;
  }

  .ai-assistant-answer-head {
    align-items: flex-start;
    padding: 15px;
  }

  .ai-assistant-answer-head h3 {
    font-size: 19px;
  }

  .ai-assistant-confidence {
    padding: 5px 8px;
  }

  .ai-assistant-material-grid {
    grid-template-columns: 1fr;
  }

  .ai-assistant-material-grid .ai-assistant-answer-section:first-child {
    border-right: 0;
  }

  .ai-assistant-answer-section {
    padding: 15px;
  }

  .ai-assistant-answer-footer {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 15px 15px;
  }

  .ai-assistant-go-button {
    width: 100%;
  }

  .ai-assistant-alternatives li {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  body.feature-focus-mode .ai-operation-assistant,
  .ai-operation-assistant.ai-assistant-feature-context {
    right: 10px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px) + var(--ai-assistant-keyboard-inset, 0px));
    left: 10px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 100px - var(--ai-assistant-keyboard-inset, 0px));
    max-height: calc(100dvh - 100px - var(--ai-assistant-keyboard-inset, 0px));
    padding-bottom: 0;
  }

  body.feature-focus-mode .ai-operation-assistant:not(.is-feature-expanded),
  .ai-operation-assistant.ai-assistant-feature-context:not(.is-feature-expanded) {
    right: 10px;
    bottom: calc(154px + env(safe-area-inset-bottom, 0px) + var(--ai-assistant-keyboard-inset, 0px));
    left: auto;
    width: min(360px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
  }

  body.feature-focus-mode .ai-operation-assistant:not(.is-feature-expanded) .ai-assistant-launcher,
  .ai-operation-assistant.ai-assistant-feature-context:not(.is-feature-expanded) .ai-assistant-launcher {
    min-height: 72px;
    border-radius: 20px;
    padding: 11px 12px;
  }

  .ai-assistant-launcher-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
  }

  .ai-assistant-launcher-copy strong {
    font-size: 15px;
  }

  .ai-assistant-launcher-copy small {
    margin-top: 3px;
  }

  body.feature-focus-mode .ai-operation-assistant.is-feature-expanded .ai-assistant-card,
  .ai-operation-assistant.ai-assistant-feature-context.is-feature-expanded .ai-assistant-card {
    padding: 14px 12px;
  }

  body.feature-focus-mode .ai-operation-assistant.is-feature-expanded .ai-assistant-header,
  .ai-operation-assistant.ai-assistant-feature-context.is-feature-expanded .ai-assistant-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  body.feature-focus-mode .ai-operation-assistant.is-feature-expanded .ai-assistant-heading,
  .ai-operation-assistant.ai-assistant-feature-context.is-feature-expanded .ai-assistant-heading {
    grid-column: 2;
    grid-row: 1;
  }

  body.feature-focus-mode .ai-operation-assistant.is-feature-expanded .ai-assistant-close,
  .ai-operation-assistant.ai-assistant-feature-context.is-feature-expanded .ai-assistant-close {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-assistant-launcher,
  .ai-assistant-launcher-icon::before,
  .ai-assistant-launcher-shine,
  .ai-operation-assistant.is-loading .ai-assistant-mark,
  body.feature-focus-mode .ai-operation-assistant.is-feature-expanded .ai-assistant-card,
  .ai-operation-assistant.ai-assistant-feature-context.is-feature-expanded .ai-assistant-card {
    animation: none !important;
  }

  .ai-assistant-launcher,
  .ai-assistant-close {
    transition: none !important;
  }
}
