/* ===== 无障碍工具条 ===== */
.a11y-bar {
  position: fixed;
  top: 100px;
  right: 0;
  z-index: 1000;
  background: var(--gov-blue);
  color: #fff;
  border-radius: 4px 0 0 4px;
  padding: 8px 4px;
  box-shadow: -2px 2px 8px rgba(0,0,0,.15);
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 56px;
  font-size: 11px;
}
.a11y-bar.active { display: flex; }
.a11y-bar button {
  color: #fff;
  text-align: center;
  padding: 6px 2px;
  border-radius: 2px;
  font-size: 11px;
  line-height: 1.3;
}
.a11y-bar button:hover, .a11y-bar button.on {
  background: rgba(255,255,255,.18);
}
.a11y-bar .a11y-icon {
  display: block;
  font-size: 18px;
  margin-bottom: 2px;
  font-weight: 700;
}
.a11y-close {
  border-top: 1px solid rgba(255,255,255,.2);
  margin-top: 4px;
  padding-top: 8px !important;
}

/* 字号档位 */
body.fs-large { --fz-base: 18px; }
body.fs-xlarge { --fz-base: 20px; }

/* 高对比度模式 */
body.high-contrast {
  --gov-red: #d10000;
  --gov-blue: #003a8c;
  --text-1: #000;
  --text-2: #000;
  --text-3: #1a1a1a;
  --bg-page: #fff;
  --bg-card: #fff;
  --bg-section: #f0f0f0;
  --border-1: #000;
  --border-2: #000;
}
body.high-contrast a { text-decoration: underline; }
body.high-contrast .card { border-width: 2px; }
body.high-contrast img { filter: contrast(1.2); }

/* 阅读模式：去除背景、专注主要文字 */
body.reading-mode .topbar,
body.reading-mode .friend-links,
body.reading-mode .a11y-bar,
body.reading-mode aside { display: none !important; }

/* 移动端无障碍按钮 */
@media (max-width: 768px) {
  .a11y-bar {
    top: auto;
    bottom: 16px;
    width: auto;
    flex-direction: row;
    border-radius: 24px;
    padding: 4px;
    right: 12px;
  }
  .a11y-bar button { padding: 6px 8px; }
  .a11y-bar .a11y-icon { display: inline; margin: 0 2px 0 0; font-size: 14px; }
}
