@import url("site-palette-v1.css?v=2");
@import url("site-typography-v1.css?v=3");

:root {
  --qjs-shell-ink: #173f3b;
  --qjs-shell-muted: #6f8580;
  --qjs-shell-line: rgba(39, 102, 89, .18);
  --qjs-shell-blue: #287e6d;
  --qjs-shell-mint: #67a694;
  --qjs-shell-paper: rgba(250, 248, 241, .97);
}

.qjs-menu-button {
  position: fixed;
  z-index: 2147483000;
  top: var(--qjs-menu-top, max(1rem, env(safe-area-inset-top)));
  right: max(1rem, env(safe-area-inset-right));
  display: grid;
  width: 3.15rem;
  height: 3.15rem;
  padding: .78rem;
  place-content: center;
  gap: .28rem;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 1rem;
  background: rgba(31, 100, 88, .94);
  box-shadow: 0 .9rem 2.2rem rgba(23, 63, 59, .18);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: top .22s ease, transform .22s ease, opacity .22s ease;
}
.qjs-menu-button span { display: block; width: 1.35rem; height: 2px; border-radius: 2px; background: #fff; transition: transform .22s ease, opacity .22s ease; }
.qjs-menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(.36rem) rotate(45deg); }
.qjs-menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.qjs-menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-.36rem) rotate(-45deg); }

/* 弹窗打开时隐藏全局汉堡菜单按钮，避免与弹窗内容重叠 */
body.qjs-modal-open > .qjs-menu-button {
  display: none !important;
}

.qjs-menu-overlay {
  position: fixed;
  z-index: 2147482990;
  inset: 0;
  display: none;
  justify-items: end;
  max-width: 100vw;
  overflow: hidden;
  visibility: hidden;
  background: rgba(20, 48, 45, .32);
  opacity: 0;
  backdrop-filter: blur(5px);
  transition: opacity .22s ease, visibility .22s ease;
}
.qjs-menu-overlay.is-open { display: grid; visibility: visible; opacity: 1; }
.qjs-menu-drawer {
  width: min(32rem, 92vw);
  height: 100%;
  padding: max(5.6rem, calc(env(safe-area-inset-top) + 4.7rem)) clamp(1rem, 4vw, 2.1rem) 2rem;
  overflow: auto;
  background: #f8f6ef;
  box-shadow: -1.2rem 0 3rem rgba(24, 65, 60, .16);
  transform: translateX(102%);
  transition: transform .28s cubic-bezier(.2,.75,.25,1);
}
.qjs-menu-overlay.is-open .qjs-menu-drawer { transform: translateX(0); }
.qjs-menu-head { padding: 0 .25rem 1.2rem; border-bottom: 1px solid var(--qjs-shell-line); }
.qjs-menu-head small { color: var(--qjs-shell-blue); font: 700 .75rem/1.2 var(--qjs-font-ui, system-ui), sans-serif; letter-spacing: .1em; }
.qjs-menu-head strong { display: block; margin-top: .45rem; color: var(--qjs-shell-ink); font: 800 clamp(1.5rem, 5vw, 2.35rem)/1.05 system-ui, sans-serif; }
.qjs-menu-groups { display: grid; gap: .65rem; padding-top: 1rem; }
.qjs-menu-group { border: 1px solid var(--qjs-shell-line); border-radius: 1rem; background: rgba(255,255,255,.72); overflow: hidden; }
.qjs-menu-main { display: flex; min-height: 3.7rem; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; color: var(--qjs-shell-ink); text-decoration: none; }
.qjs-menu-main span:first-child { display: flex; align-items: center; gap: .72rem; font-weight: 700; }
.qjs-menu-index { color: var(--qjs-shell-blue); font: 700 .75rem/1 var(--qjs-font-ui, system-ui), sans-serif; letter-spacing: .06em; }
.qjs-menu-main.is-current { background: #dcebe5; color: #1f6458; }
.qjs-menu-subs { display: flex; flex-wrap: wrap; gap: .42rem; padding: 0 .75rem .78rem; }
.qjs-menu-subs a { display: inline-flex; min-height: 2.5rem; align-items: center; padding: .48rem .66rem; border: 1px solid rgba(52,103,133,.12); border-radius: .65rem; background: rgba(244,249,251,.9); color: var(--qjs-shell-muted); font: 600 .8125rem/1.35 var(--qjs-font-ui, system-ui), sans-serif; text-decoration: none; }
.qjs-menu-subs a:hover, .qjs-menu-subs a:focus-visible { border-color: rgba(39,126,109,.46); color: var(--qjs-shell-blue); }

/* 菜单固定在标题栏右上角，标题栏统一预留点击空间，避免逐段下移后覆盖页面内容。 */
body:has(.qjs-menu-button) > header,
body:has(.qjs-menu-button) .main-nav,
body:has(.qjs-menu-button) .top-bar,
body:has(.qjs-menu-button) .mobile-header,
body:has(.qjs-menu-button) .news-topbar,
body:has(.qjs-menu-button) .strategy-topbar,
body:has(.qjs-menu-button) .ency-topbar,
body:has(.qjs-menu-button) .res-hub-topbar,
body:has(.qjs-menu-button) .article-topbar,
body:has(.qjs-menu-button) .res-detail-topbar,
body:has(.qjs-menu-button) .detail-topbar,
body:has(.qjs-menu-button) .craft-header { padding-right: max(5.25rem, calc(env(safe-area-inset-right) + 5.25rem)) !important; }

body:has(.qjs-menu-button) .res-admin-entry,
body:has(.qjs-menu-button) .quick-actions { margin-right: 4.25rem !important; }

.qjs-global-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  margin-top: clamp(3rem, 7vw, 7rem);
  padding: clamp(2.2rem, 5vw, 4rem) max(1rem, calc((100vw - 86rem)/2)) max(2rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--qjs-shell-line);
  background: #e3ece7;
  color: var(--qjs-shell-ink);
  text-align: left;
}
.qjs-footer-inner { width: min(100%, 86rem); margin: 0 auto; }
.qjs-footer-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.qjs-footer-head small { color: var(--qjs-shell-blue); font: 700 .75rem/1.3 var(--qjs-font-ui, system-ui), sans-serif; letter-spacing: .08em; }
.qjs-footer-head h2 { margin: .35rem 0 0; color: var(--qjs-shell-ink); font: 780 clamp(1.35rem, 3vw, 2.2rem)/1.1 system-ui, sans-serif; }
.qjs-footer-head p { max-width: 32rem; margin: 0; color: var(--qjs-shell-muted); font: .875rem/1.75 var(--qjs-font-ui, system-ui), sans-serif; }
.qjs-contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-top: 1.4rem; }
.qjs-contact-grid a { display: flex; min-height: 4rem; align-items: center; justify-content: space-between; gap: .8rem; padding: .85rem 1rem; border: 1px solid var(--qjs-shell-line); border-radius: .9rem; background: rgba(255,255,255,.78); color: var(--qjs-shell-ink); font: 700 .875rem/1.3 var(--qjs-font-ui, system-ui), sans-serif; text-decoration: none; }
.qjs-contact-grid a::after { content: "↗"; color: var(--qjs-shell-blue); }
.qjs-icp-reserve { min-height: 5.8rem; margin-top: 1rem; display: grid; place-items: center; border-top: 1px solid var(--qjs-shell-line); color: var(--qjs-shell-muted); font: .75rem/1.6 var(--qjs-font-ui, system-ui), sans-serif; text-align: center; }
.qjs-icp-reserve span { padding: .45rem .7rem; border: 1px dashed rgba(52,103,133,.22); border-radius: 999px; }

img { text-rendering: optimizeLegibility; }
img[loading="lazy"] { content-visibility: auto; }

@media (max-width: 48rem) {
  .qjs-menu-button { top: var(--qjs-menu-top, max(.65rem, env(safe-area-inset-top))); right: max(.65rem, env(safe-area-inset-right)); width: 2.8rem; height: 2.8rem; border-radius: .85rem; }
  .qjs-menu-overlay { align-items: start; padding: .55rem; }
  .qjs-menu-drawer { width: min(20.5rem, calc(100vw - 3.4rem)); height: min(84svh, 44rem); margin-left: auto; padding: 4.25rem .75rem 1rem; border: 1px solid rgba(255,255,255,.78); border-radius: 1.35rem; }
  .qjs-menu-head { padding: 0 .35rem .8rem; }
  .qjs-menu-head strong { margin-top: .28rem; font-size: 1.4rem; }
  .qjs-menu-groups { gap: .45rem; padding-top: .7rem; }
  .qjs-menu-group { border-radius: .78rem; }
  .qjs-menu-main { min-height: 2.85rem; padding: .58rem .72rem; font-size: .86rem; }
  .qjs-menu-subs { gap: .32rem; padding: 0 .58rem .58rem; }
  .qjs-menu-subs a { min-height: 2.75rem; padding: .48rem .62rem; font-size: .8125rem; }
  .qjs-footer-head { align-items: start; flex-direction: column; gap: .7rem; }
  .qjs-contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qjs-global-footer { padding-right: 1rem; padding-left: 1rem; }
}

/* 弹窗本身已有关闭键，隐藏全站菜单按钮，避免两个右上角控件互相遮挡。 */
body:has(.community-announcement-modal.show) .qjs-menu-button,
body:has(.site-guide-modal.show) .qjs-menu-button,
body:has(.guide-modal.show) .qjs-menu-button { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .qjs-menu-button span, .qjs-menu-overlay, .qjs-menu-drawer { transition: none; }
}


/* filing-and-mobile-reading-v12 */
.qjs-icp-reserve a { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; gap: .58rem; padding: .52rem .86rem; border: 1px solid rgba(39,102,89,.2); border-radius: 999px; background: rgba(255,255,255,.62); color: var(--qjs-shell-ink); font-weight: 700; text-decoration: none; }
.qjs-icp-reserve a:hover, .qjs-icp-reserve a:focus-visible { border-color: var(--qjs-shell-blue); color: var(--qjs-shell-blue); }
.qjs-icp-reserve img { width: 1.35rem; height: 1.35rem; object-fit: contain; }

@media (max-width: 48rem) {
  body main :where(section, article, div, header, footer, nav, aside) { min-inline-size: 0; }
  body main :where(p, li, dd, figcaption, blockquote, h1, h2, h3, h4, h5, h6, td, th) { max-inline-size: none !important; text-wrap: wrap !important; word-break: normal; overflow-wrap: break-word; }
  body main :where(p, li, dd, figcaption, blockquote) { hyphens: none; }
}

/* static-filing-badge-v13 */
.qjs-icp-badge { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; gap: .58rem; padding: .52rem .86rem; border: 1px solid rgba(39,102,89,.2); border-radius: 999px; background: rgba(255,255,255,.62); color: var(--qjs-shell-ink); font-weight: 700; cursor: default; user-select: text; }


/* homepage-fixed-filing-v14 */
body.community-stream .qjs-global-footer .qjs-icp-reserve {
  position: fixed; z-index: 18; left: max(.8rem, env(safe-area-inset-left)); bottom: max(.7rem, env(safe-area-inset-bottom));
  min-height: 0; margin: 0; border: 0; place-items: start; pointer-events: none;
}
body.community-stream .qjs-global-footer .qjs-icp-badge {
  min-height: 2.35rem; padding: .38rem .7rem; border-style: solid;
  background: rgba(239, 246, 243, .9); box-shadow: 0 .55rem 1.6rem rgba(39, 76, 66, .14); backdrop-filter: blur(14px);
  color: #31594f; font-size: .7rem; user-select: text;
}
body.community-stream .qjs-global-footer .qjs-icp-badge img { width: 1.1rem; height: 1.1rem; }
@media (max-width: 48rem) {
  body.community-stream .qjs-global-footer .qjs-icp-reserve { left: max(.55rem, env(safe-area-inset-left)); bottom: max(.5rem, env(safe-area-inset-bottom)); }
  body.community-stream .qjs-global-footer .qjs-icp-badge { min-height: 2.1rem; padding: .3rem .55rem; font-size: .64rem; }
}


/* homepage-mobile-filing-safe-area-v15 */
@media (max-width: 48rem) {
  body.community-stream.entry-snap-mode { --qjs-filing-clearance: 3.15rem; }
  body.community-stream.entry-snap-mode .qjs-global-footer .qjs-icp-reserve {
    right: 0; left: 0; bottom: 0; display: flex; min-height: var(--qjs-filing-clearance);
    align-items: center; justify-content: center; padding: .3rem max(.55rem, env(safe-area-inset-right)) max(.3rem, env(safe-area-inset-bottom)) max(.55rem, env(safe-area-inset-left));
    background: linear-gradient(180deg, rgba(238,246,243,0), rgba(238,246,243,.94) 34%);
  }
  body.community-stream.entry-snap-mode .qjs-global-footer .qjs-icp-badge {
    min-height: 1.95rem; padding: .25rem .55rem; box-shadow: 0 .35rem 1rem rgba(39,76,66,.12);
  }
  body.community-stream.entry-snap-mode .entry-copy {
    bottom: calc(var(--qjs-filing-clearance) + .9rem + env(safe-area-inset-bottom)) !important;
  }
  body.community-stream.entry-snap-mode .home-section .hero-content {
    padding-bottom: calc(var(--qjs-filing-clearance) + .9rem + env(safe-area-inset-bottom)) !important;
  }
}

/* HOME MOBILE ACTION GRID 20260822 */
@media (max-width: 768px) {
  body.community-stream.entry-snap-mode .home-section .hero-buttons {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 21rem) !important;
    gap: .58rem !important;
  }
  body.community-stream.entry-snap-mode .home-section .hero-buttons .btn-primary,
  body.community-stream.entry-snap-mode .home-section .hero-buttons .btn-secondary {
    width: 100% !important;
    min-width: 0;
    min-height: 2.85rem !important;
    padding: .68rem .5rem !important;
    font-size: .78rem !important;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
  }
}
