html[data-fs="lg"] { font-size: 112.5%; }
html[data-fs="xl"] { font-size: 125%; }
html[data-fs="xxl"] { font-size: 150%; }
html[data-fs]:not([data-fs="md"]) body { font-size: 1.0625rem; }
html[data-fs]:not([data-fs="md"]) .nav .menu { display: none; }
html[data-fs]:not([data-fs="md"]) .nav .burger { display: flex; }
html[data-fs]:not([data-fs="md"]) :is(.input, .select, .textarea),
html[data-fs]:not([data-fs="md"]) .yungong-content,
html[data-fs]:not([data-fs="md"]) .yungong-content p { font-size: 1rem; }

html { scroll-padding-top: calc(var(--zzwy-site-header-height, 88px) + 8px); }
.zzwy-site-header {
  position: sticky;
  top: 0;
  z-index: 900;
}
.zzwy-site-header > .header { position: relative; top: auto; z-index: auto; }
.zzwy-site-header > .zzwy-a11y-panel {
  position: absolute;
  inset: 100% 0 auto;
  max-height: max(0px, calc(100dvh - var(--zzwy-site-header-height, 88px)));
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 8px 18px #123c2b21;
}
.zzwy-a11y-skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1400;
  padding: 8px 14px;
  transform: translateY(calc(-100% - 12px));
  background: #fff;
  color: #064e3b;
  font-weight: 700;
}
.zzwy-a11y-skip:focus { transform: none; }

[data-a11y-entry] {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-inline-start: auto;
}
[data-a11y-entry] button,
.zzwy-a11y-panel button,
.zzwy-a11y-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 5px 10px;
  border: 1px solid #9fbcb1;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  line-height: 1.4;
}
[data-a11y-entry] button {
  border-color: transparent;
  background: transparent;
  color: #fff;
  white-space: nowrap;
}
[data-a11y-entry] button:hover,
[data-a11y-entry] button[aria-expanded="true"],
[data-a11y-entry] button[data-playing] { background: #1a624d; }
[data-a11y-entry] svg, .zzwy-a11y-panel svg {
  width: 17px;
  height: 17px;
  flex: none;
}
.zzwy-a11y-panel {
  padding-block: 14px 16px;
  border-bottom: 1px solid #b5cfc4;
  background: #f3faf6;
  color: #12232e;
  font-size: .94rem;
}
.zzwy-a11y-panel[hidden], .zzwy-a11y-guide[hidden] { display: none; }
.zzwy-a11y-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.zzwy-a11y-head h2 { font-size: 1.15rem; }
.zzwy-a11y-controls {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
}
.zzwy-a11y-panel button, .zzwy-a11y-panel a { background: #fff; color: #064e3b; }
.zzwy-a11y-panel .zzwy-a11y-tile {
  flex-direction: column;
  flex: 0 1 96px;
  min-height: 64px;
  max-width: 124px;
  padding: 6px 8px;
  font-size: .83rem;
  text-align: center;
}
.zzwy-a11y-tile svg { width: 24px; height: 24px; }
.zzwy-a11y-panel :is(button, a):hover { background: #e3f3eb; }
.zzwy-a11y-panel button[aria-pressed="true"] { background: #064e3b; color: #fff; }
.zzwy-a11y-panel button[aria-disabled="true"] { opacity: .55; cursor: default; }
.zzwy-a11y-size {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid #9fbcb1;
  border-radius: 8px;
  background: #fff;
}
.zzwy-a11y-size button { min-width: 44px; }
.zzwy-a11y-size output { min-width: 3.2em; text-align: center; font-variant-numeric: tabular-nums; }
.zzwy-a11y-message { margin: 8px 0 0; overflow-wrap: anywhere; }
.zzwy-a11y-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.zzwy-a11y-guide {
  position: fixed;
  z-index: 1390;
  inset-inline: 0;
  height: 36px;
  transform: translateY(-50%);
  border-block: 2px solid #ffdc55;
  box-shadow: 0 -1px #19261f, 0 1px #19261f;
  background: rgba(255, 220, 85, .12);
  pointer-events: none;
}
.zzwy-a11y-reading {
  outline: 3px solid #0b7a4b;
  outline-offset: 2px;
}

html[data-a11y-contrast] body {
  --a11y-bg: #101613;
  --a11y-text: #fff;
  --a11y-link: #ffe17a;
  --a11y-border: #a6baae;
  color-scheme: dark;
  background: var(--a11y-bg);
  color: var(--a11y-text);
}
html[data-a11y-contrast] body :not(svg, svg *, img, video, .zzwy-a11y-guide) {
  color: var(--a11y-text) !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: var(--a11y-border) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  -webkit-text-fill-color: currentColor;
}
html[data-a11y-contrast] body :is(.topbar, .header, .drawer, .dropdown, .hero, .footer, .mbar,
    .wx-box, .zzwy-a11y-skip, .zzwy-a11y-panel, .yungong-content, .mask .modal) {
  background-color: var(--a11y-bg) !important;
}
html[data-a11y-contrast] body :is(a, a :not(svg, svg *), button:not(:disabled), label a) {
  color: var(--a11y-link) !important;
}
html[data-a11y-contrast] body a { text-decoration: underline; }
html[data-a11y-contrast] :is(button, .btn, .opt, .input, select, textarea) {
  border: 1px solid var(--a11y-border) !important;
}
html[data-a11y-contrast] body :is(button[aria-pressed="true"], button[aria-expanded="true"], button[data-playing],
    .tab.on, .chip.on, .fopt.on, .opt.on, .opt.on .box, .consent.on .box) {
  border-color: var(--a11y-link) !important;
  background-color: #263a30 !important;
}
html[data-a11y-contrast] body .burger span { background-color: var(--a11y-link) !important; }
html[data-a11y-contrast] body :is(.drawer-mask, .wx-mask, .yungong-content .mask) {
  background-color: rgba(0, 0, 0, .72) !important;
}
html[data-a11y-contrast] body :is(:focus-visible, .zzwy-a11y-reading, .consent:focus-within) {
  outline: 3px solid #ffe17a;
  outline-offset: 2px;
}
html[data-a11y-contrast] body :is(input, select, textarea)::placeholder { color: #d4ddd7; opacity: 1; }

@media (max-width: 768px) {
  html { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 600px) {
  .topbar .wrap:has([data-a11y-entry]) { flex-wrap: wrap; gap: 0 5px; padding-inline: 12px; }
  .topbar .topbar-left { gap: 0; }
  .topbar .wrap:has([data-a11y-entry]) .topbar-item svg { display: none; }
  .topbar .wrap:has([data-a11y-entry]) [data-a11y-entry] button { min-height: 44px; padding-inline: 6px; }
  .zzwy-a11y-panel .wrap { padding-inline: 12px; }
  .zzwy-a11y-controls { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .zzwy-a11y-panel .zzwy-a11y-tile { grid-column: span 2; min-width: 0; max-width: none; }
  .zzwy-a11y-size { grid-column: span 2; gap: 0; padding: 1px; }
  .zzwy-a11y-size button { min-width: 44px; flex: 1; padding-inline: 4px; }
  .zzwy-a11y-size output { min-width: 0; order: 1; flex: 0 0 100%; }
  html[data-fs="xxl"] .nav:has(.yungong-auth) { flex-wrap: wrap; padding-block: 8px; }
  html[data-fs="xxl"] .nav .brand-sub { display: none; }
}

@media print {
  .zzwy-site-header { position: static; }
  .zzwy-a11y-skip, [data-a11y-entry], .zzwy-a11y-panel, .zzwy-a11y-guide { display: none !important; }
}
