/**
 * Aquafish 全局功能前台组件。
 *
 * 只包含 modules/global 输出的公告弹窗、移动端 Tab、悬浮工具、二维码和分享栏。
 */
:root {
  --aq-global-pink: #f7a8bd;
  --aq-global-pink-soft: #fff0f5;
  --aq-global-blue: #7bb9ef;
  --aq-global-blue-soft: #edf7ff;
  --aq-global-ink: #172033;
  --aq-global-muted: #667085;
  --aq-global-border: #dce6f2;
  --aq-global-shadow: 0 16px 42px rgb(36 62 100 / 16%);
}

/* 全局代码块：开始 */
.aq-entry-content pre.aq-code-block {
  position: relative;
  padding: 22px;
  overflow: auto;
  color: #eef5ff;
  background: #202636;
  border: 1px solid #313a4d;
  border-radius: var(--aq-radius, 14px);
  box-shadow: 0 12px 30px rgb(20 28 45 / 14%);
  tab-size: 4;
}

.aq-entry-content pre.aq-code-block code {
  padding: 0;
  color: inherit;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.75;
}
/* 全局代码块：结束 */

/* 文章分享：开始 */
.aq-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--aq-global-pink-soft), var(--aq-global-blue-soft));
  border: 1px solid var(--aq-global-border);
  border-radius: var(--aq-radius, 14px);
}

.aq-share-bar > strong {
  color: var(--aq-global-ink);
  font-size: 14px;
}

.aq-share-bar__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.aq-share-bar a,
.aq-share-bar button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  color: #28557d;
  background: rgb(255 255 255 / 88%);
  border: 1px solid #cfe0f0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.aq-share-bar a:hover,
.aq-share-bar button:hover {
  color: #fff;
  background: var(--aq-color-primary, #2563eb);
  border-color: var(--aq-color-primary, #2563eb);
}
/* 文章分享：结束 */

/* 右侧悬浮工具：开始 */
.aq-floating-tools {
  position: fixed;
  z-index: 60;
  right: 20px;
  bottom: 86px;
  display: grid;
  gap: 9px;
}

.aq-floating-tools a,
.aq-floating-tools button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #2f618d;
  background: rgb(255 255 255 / 94%);
  border: 1px solid #d7e4f0;
  border-radius: 13px;
  box-shadow: 0 8px 24px rgb(31 63 98 / 13%);
  cursor: pointer;
  font: inherit;
  font-size: 20px;
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: transform .18s ease, color .18s ease, background .18s ease;
}

.aq-floating-tools a:hover,
.aq-floating-tools button:hover {
  color: #fff;
  background: linear-gradient(145deg, var(--aq-global-blue), var(--aq-color-primary, #2563eb));
  transform: translateY(-2px);
}

.aq-floating-tools [data-aq-global-back-top] {
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
}

.aq-floating-tools [data-aq-global-back-top].is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
/* 右侧悬浮工具：结束 */

/* 手机底部 Tab：开始 */
.aq-mobile-tab {
  display: none;
}

@media (max-width: 782px) {
  body.aq-has-mobile-tab {
    padding-bottom: 76px;
  }

  .aq-mobile-tab {
    position: fixed;
    z-index: 70;
    right: 10px;
    bottom: 10px;
    left: 10px;
    display: grid;
    min-height: 62px;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: center;
    padding: 7px;
    background: rgb(255 255 255 / 94%);
    border: 1px solid #d8e3ef;
    border-radius: 19px;
    box-shadow: 0 16px 42px rgb(27 54 86 / 18%);
    backdrop-filter: blur(16px);
  }

  .aq-mobile-tab a {
    display: grid;
    min-width: 0;
    min-height: 48px;
    place-items: center;
    align-content: center;
    gap: 2px;
    color: var(--aq-global-muted);
    border-radius: 14px;
    text-decoration: none;
  }

  .aq-mobile-tab a > span {
    font-size: 21px;
    line-height: 1;
  }

  .aq-mobile-tab a > small {
    overflow: hidden;
    max-width: 100%;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .aq-mobile-tab a.is-active {
    color: var(--aq-color-primary, #2563eb);
    background: var(--aq-global-blue-soft);
  }

  .aq-mobile-tab__primary {
    color: #fff !important;
    background: linear-gradient(145deg, var(--aq-global-pink), #e86e9c) !important;
    box-shadow: 0 8px 18px rgb(232 110 156 / 25%);
  }

  .aq-floating-tools {
    right: 14px;
    bottom: 92px;
  }
}
/* 手机底部 Tab：结束 */

/* 公告弹窗与二维码弹窗：开始 */
.aq-global-popup,
.aq-qr-modal,
.aq-share-qr-modal {
  position: fixed;
  z-index: 100001;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.aq-global-popup[hidden],
.aq-qr-modal[hidden],
.aq-share-qr-modal[hidden] {
  display: none;
}

.aq-global-popup__backdrop,
.aq-qr-modal__backdrop,
.aq-share-qr-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgb(18 27 43 / 58%);
  border: 0;
  cursor: pointer;
}

.aq-global-popup__dialog,
.aq-qr-modal__dialog,
.aq-share-qr-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  padding: 30px;
  color: var(--aq-global-ink);
  background: #fff;
  border: 1px solid #d9e5f0;
  border-radius: 22px;
  box-shadow: var(--aq-global-shadow);
}

.aq-qr-modal__dialog,
.aq-share-qr-modal__dialog {
  width: min(100%, 360px);
  text-align: center;
}

.aq-global-popup__close,
.aq-qr-modal__close,
.aq-share-qr-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #5d6a7d;
  background: #f2f6fb;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
}

.aq-global-popup__eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;
  color: #a74269;
  background: var(--aq-global-pink-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.aq-global-popup__dialog h2,
.aq-qr-modal__dialog h2,
.aq-share-qr-modal__dialog h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.aq-global-popup__content,
.aq-qr-modal__dialog p,
.aq-share-qr-modal__dialog p {
  color: var(--aq-global-muted);
  line-height: 1.8;
}

.aq-global-popup__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.aq-global-popup__primary,
.aq-qr-modal__copy,
.aq-share-qr-modal__copy {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(145deg, var(--aq-global-blue), var(--aq-color-primary, #2563eb));
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.aq-qr-modal__dialog img,
.aq-share-qr-modal__dialog img {
  display: block;
  width: 280px;
  max-width: 100%;
  height: auto;
  margin: 18px auto;
  background: #fff;
  border: 10px solid #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgb(27 54 86 / 10%);
}
/* 公告弹窗与二维码弹窗：结束 */

.aq-copy-toast {
  position: fixed;
  z-index: 100002;
  left: 50%;
  bottom: 34px;
  padding: 11px 16px;
  color: #fff;
  background: #172033;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 22%);
  transform: translateX(-50%);
}

@media (max-width: 640px) {
  .aq-share-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .aq-share-bar__buttons {
    justify-content: flex-start;
  }

  .aq-global-popup__dialog,
  .aq-qr-modal__dialog,
  .aq-share-qr-modal__dialog {
    padding: 24px 20px;
    border-radius: 18px;
  }
}

/* 全局品牌图像：开始 */
.aq-global-logo-link,
.aq-global-logo-link picture {
  display: inline-flex;
  align-items: center;
}

.aq-global-logo-link img {
  display: block;
  width: auto;
  max-width: 220px;
  height: 48px;
  object-fit: contain;
}

.aq-footer-logo {
  display: inline-flex;
  flex: 0 0 auto;
}

.aq-footer-logo img {
  display: block;
  width: auto;
  max-width: 180px;
  max-height: 46px;
  object-fit: contain;
}

/* 全局品牌图像：结束 */

/* Aquafish V0.7.89：品牌几何与深色组件补齐。 */
.aq-global-logo-link,
.aq-global-logo-link picture {
  inline-size: clamp(138px, 14vw, 180px);
  block-size: 46px;
  flex: 0 0 auto;
}

.aq-global-logo-link img {
  inline-size: 100%;
  block-size: 100%;
  max-width: none;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.aq-footer-logo {
  inline-size: 160px;
  block-size: 44px;
}

.aq-footer-logo img {
  inline-size: 100%;
  block-size: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: left center;
}


body.aq-theme-dark .aq-floating-tools a,
body.aq-theme-dark .aq-floating-tools button,
body.aq-theme-dark .aq-mobile-tab,
body.aq-theme-dark .aq-global-popup__dialog,
body.aq-theme-dark .aq-qr-modal__dialog,
body.aq-theme-dark .aq-share-qr-modal__dialog {
  color: var(--aq-color-text, #f1f5f9);
  background: color-mix(in srgb, var(--aq-color-surface, #151c2b) 94%, transparent);
  border-color: var(--aq-color-border, #2c374a);
}

body.aq-theme-dark .aq-share-bar {
  background: linear-gradient(135deg, color-mix(in srgb, var(--aq-color-primary, #e8749b) 10%, var(--aq-color-surface, #151c2b)), var(--aq-color-surface-soft, #1d2637));
  border-color: var(--aq-color-border, #2c374a);
}

body.aq-theme-dark .aq-share-bar > strong,
body.aq-theme-dark .aq-global-popup__dialog,
body.aq-theme-dark .aq-qr-modal__dialog,
body.aq-theme-dark .aq-share-qr-modal__dialog {
  color: var(--aq-color-text, #f1f5f9);
}

@media (prefers-color-scheme: dark) {
  body.aq-theme-system .aq-floating-tools a,
  body.aq-theme-system .aq-floating-tools button,
  body.aq-theme-system .aq-mobile-tab,
  body.aq-theme-system .aq-global-popup__dialog,
  body.aq-theme-system .aq-qr-modal__dialog,
  body.aq-theme-system .aq-share-qr-modal__dialog {
    color: var(--aq-color-text, #f1f5f9);
    background: color-mix(in srgb, var(--aq-color-surface, #151c2b) 94%, transparent);
    border-color: var(--aq-color-border, #2c374a);
  }

  body.aq-theme-system .aq-share-bar {
    background: linear-gradient(135deg, color-mix(in srgb, var(--aq-color-primary, #e8749b) 10%, var(--aq-color-surface, #151c2b)), var(--aq-color-surface-soft, #1d2637));
    border-color: var(--aq-color-border, #2c374a);
  }

  body.aq-theme-system .aq-share-bar > strong,
  body.aq-theme-system .aq-global-popup__dialog,
  body.aq-theme-system .aq-qr-modal__dialog,
  body.aq-theme-system .aq-share-qr-modal__dialog {
    color: var(--aq-color-text, #f1f5f9);
  }
}

@media (max-width: 980px) {
  .aq-global-logo-link,
  .aq-global-logo-link picture {
    inline-size: 148px;
    block-size: 42px;
  }
}

@media (max-width: 520px) {
  .aq-global-logo-link,
  .aq-global-logo-link picture {
    inline-size: 126px;
    block-size: 40px;
  }

  .aq-footer-logo {
    inline-size: 138px;
    block-size: 40px;
  }
}
