.admin-cs-dock,
.admin-cs-dock * { box-sizing: border-box; }

.admin-cs-dock {
  position: fixed;
  z-index: 3190;
  top: 50%;
  right: 16px;
  width: 72px;
  overflow: hidden;
  transform: translateY(-50%);
  border: 1px solid rgba(227, 133, 0, .18);
  border-radius: 15px;
  background: linear-gradient(160deg, #ffad21, #ef910b);
  box-shadow: 0 5px 18px rgba(142, 84, 0, .16);
  color: #fff;
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  transition: width .18s ease, box-shadow .18s ease;
}
.admin-cs-dock[hidden] { display: none; }
.admin-cs-dock.is-collapsed { width: 40px; border-radius: 13px; }
.admin-cs-tool-list { display: flex; flex-direction: column; }
.admin-cs-tool {
  display: flex;
  width: 100%;
  min-height: 74px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 10px 3px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .25);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: 500 12px/1.35 system-ui, "Microsoft YaHei", sans-serif;
  text-align: center;
  transition: background-color .15s ease;
}
.admin-cs-tool:hover { background: rgba(155, 80, 0, .14); }
.admin-cs-icon { display: grid; width: 26px; height: 26px; place-items: center; }
.admin-cs-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.admin-cs-tool-label { max-width: 100%; white-space: nowrap; }
.admin-cs-tool-hover-label { display: none; white-space: nowrap; }
.admin-cs-dock.is-wechat-open .admin-cs-tool.is-wechat .admin-cs-tool-label { display: none; }
.admin-cs-dock.is-wechat-open .admin-cs-tool.is-wechat .admin-cs-tool-hover-label { display: inline; }
.admin-cs-dock-toggle {
  display: flex;
  width: 100%;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 3px;
  border: 0;
  background: rgba(157, 83, 0, .09);
  color: #fff;
  cursor: pointer;
  font: 500 11px/1.3 system-ui, "Microsoft YaHei", sans-serif;
  transition: background-color .15s ease;
}
.admin-cs-dock-toggle:hover { background: rgba(147, 73, 0, .2); }
.admin-cs-dock-toggle svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.admin-cs-dock.is-collapsed .admin-cs-tool-list { display: none; }
.admin-cs-dock.is-collapsed .admin-cs-dock-toggle { min-height: 60px; flex-direction: column; gap: 5px; background: transparent; }
.admin-cs-dock.is-collapsed .admin-cs-dock-toggle svg { width: 20px; height: 20px; }

.admin-cs-card {
  position: fixed;
  z-index: 3191;
  top: 50%;
  right: 100px;
  display: none;
  width: min(272px, calc(100vw - 116px));
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
  overflow: auto;
  transform: translateY(-50%);
  padding: 20px;
  border: 1px solid #ece8e1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
  color: #263445;
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  text-align: center;
}
.admin-cs-card.is-open { display: block; animation: admin-cs-card-in .18s ease-out both; }
.admin-cs-card h2 { margin: 0 24px 14px; color: #263445; font-size: 16px; font-weight: 600; }
.admin-cs-card img { display: block; width: 100%; max-height: min(280px, 42dvh); object-fit: contain; }
.admin-cs-card a { display: inline-block; margin-top: 8px; color: #cc7108; font-size: 18px; font-weight: 600; text-decoration: none; }
.admin-cs-card a:hover { text-decoration: underline; }
.admin-cs-card-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f5f5f4;
  color: #687385;
  cursor: pointer;
  font: 21px/1 system-ui, sans-serif;
}
.admin-cs-card-close:hover { background: #eceae7; }
.admin-cs-dock button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.admin-cs-card button:focus-visible, .admin-cs-card a:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.admin-support-enabled .ma-launcher { cursor: grab; touch-action: none; user-select: none; }
.admin-support-enabled .ma-launcher.is-dragging { cursor: grabbing; transition: none !important; }
/* Keep the intrinsic width when dragging sets left and clears right. This also
   protects existing compiled assistant styles until their next full build. */
.admin-support-enabled .map-assistant .ma-launcher {
  width: max-content;
  min-width: 112px;
  height: 48px;
  flex-wrap: nowrap;
  justify-content: flex-start;
  white-space: nowrap;
}
.admin-support-enabled .ma-launcher-symbol { flex: none; }
.admin-support-enabled .ma-launcher > span:last-child { flex: none; white-space: nowrap; line-height: 1.4; transition: opacity .15s ease; }
.website-tool-card.is-wechat img[role="link"], .website-consultation-content img[role="link"], .admin-cs-card img[role="link"] { cursor: pointer; }
.website-tool-card.is-wechat img[role="link"]:focus-visible, .website-consultation-content img[role="link"]:focus-visible, .admin-cs-card img[role="link"]:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }
@keyframes admin-cs-card-in {
  from { opacity: 0; transform: translate(6px, -50%); }
  to { opacity: 1; transform: translate(0, -50%); }
}
@media (max-width: 600px) {
  .admin-cs-dock { right: 10px; width: 64px; border-radius: 13px; }
  .admin-cs-tool { min-height: 66px; font-size: 11px; }
  .admin-cs-icon, .admin-cs-icon svg { width: 23px; height: 23px; }
  .admin-cs-dock.is-collapsed { width: 38px; }
  .admin-cs-card { right: 86px; width: min(252px, calc(100vw - 100px)); padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-cs-dock, .admin-cs-tool, .admin-cs-dock-toggle { transition: none; }
  .admin-cs-card.is-open { animation: none; }
}
/* Edge-docked AI launcher: dropped at the left/right edge it slides out of the
   way, leaving only the logo; hover or a first tap slides it back out. */
.ma-launcher.is-docked-left,
.ma-launcher.is-docked-right { opacity: .92; transition: transform .25s ease, opacity .25s ease, box-shadow .15s !important; }
.ma-launcher.is-docked-right { transform: translateX(calc(100% - 46px)) !important; border-radius: 28px 0 0 28px; }
.ma-launcher.is-docked-left { flex-direction: row-reverse; padding: 5px 6px 5px 19px !important; transform: translateX(calc(-100% + 46px)) !important; border-radius: 0 28px 28px 0; }
.ma-launcher.is-docked-left.is-peeking,
.ma-launcher.is-docked-right.is-peeking { opacity: 1; transform: none !important; }
.ma-launcher.is-docked-left:not(.is-peeking) > span:last-child,
.ma-launcher.is-docked-right:not(.is-peeking) > span:last-child { opacity: 0; }
.ma-launcher.is-dragging.is-docked-left,
.ma-launcher.is-dragging.is-docked-right { transition: none !important; }
