/* Shared by all HTML pages; independent of the toolbar's paint containment. */
#ui_search { padding-right: 5.5rem; }
#ui_search .left { min-width: 0; overflow: hidden; }
#ui_search .right { flex-shrink: 0; }
.wechat-qr { position: fixed; top: 0; right: 0; z-index: 1001; width: 5.5rem; font-size: .85rem; }
.wechat-qr > summary { display: flex; align-items: center; justify-content: center; gap: .35rem; height: var(--search-bar-height, 2.5rem); border-left: var(--border); border-bottom: var(--border); color: var(--color-accent); background: var(--color-bg); cursor: pointer; list-style: none; }
.wechat-qr > summary::-webkit-details-marker { display: none; }
.wechat-qr > summary::after { content: '+'; }
.wechat-qr[open] > summary::after { content: '−'; }
.wechat-qr > summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -3px; }
.wechat-qr__panel { position: absolute; right: .5rem; top: calc(var(--search-bar-height, 2.5rem) + .5rem); width: 202px; max-width: calc(100vw - 1rem); max-height: calc(100dvh - var(--search-bar-height) - var(--status-bar-height) - 1rem); overflow-y: auto; padding: 12px; border: var(--border); background: var(--color-bg); color: var(--color-text); box-shadow: 0 8px 30px #0005; text-align: center; }
.wechat-qr__panel strong { display: block; margin-bottom: 10px; color: var(--color-accent); }
.wechat-qr__image-link { display: block; background: white; }
.wechat-qr__image { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: white; }
.wechat-qr__panel p { font-size: 12px; line-height: 1.6; margin: 8px 0 0; }
.wechat-qr__empty, .wechat-qr__error { padding: 1rem .25rem; color: var(--color-muted); }
.wechat-qr [hidden] { display: none !important; }
@media (max-width: 575.98px) {
  #ui_search .icon-btn { width: 1.8rem; flex-shrink: 0; }
  #ui_search .aa { display: none; }
}
@media print { .wechat-qr { display: none; } }

/* Match the document-library palette. */
.wechat-qr { font-family: Arial, "Microsoft YaHei", sans-serif; font-size:13px; }
.wechat-qr > summary { color:#a52121; }
.wechat-qr__panel { border-color:#d3cbc3; box-shadow:none; }
.wechat-qr__panel strong { color:#a52121; }
