/* Reader chrome only: authored book pages retain their coordinates and type sizes. */
/* The reader uses the shared legal footer without the larger contextual columns. */
.mfc-manual #mfc-page-footer { position: relative; margin: 0; border-top: 1px solid #e2e7ee; padding-block: 1rem; background: #fff; color: #647084; font-family: var(--mfc-reader-font); }
.mfc-manual #mfc-page-footer .mfc-container { width: calc(100% - 2rem); max-width: 112rem; margin-inline: auto; }
.mfc-manual #mfc-page-footer .mfc-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; }
.mfc-manual #mfc-page-footer .mfc-footer-pages { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; }
.mfc-manual #mfc-page-footer .mfc-footer-pages a { display: inline-flex; align-items: center; min-height: 2.75rem; color: #526174; font-size: .8125rem; line-height: 1.5; text-decoration: none; }
.mfc-manual #mfc-page-footer .mfc-footer-pages a:hover { color: var(--mfc-reader-brand); text-decoration: underline; }
.mfc-manual #mfc-page-footer .copyright { margin: 0; color: #647084; font-size: .75rem; line-height: 1.8; }

body.mfc-manual {
  --mfc-reader-header: 64px;
  --mfc-reader-brand: #c82025;
  --mfc-reader-ink: #243043;
  --mfc-reader-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  margin: 0;
  min-height: 100vh;
  background: #f4f6f9;
  color: var(--mfc-reader-ink);
}

.mfc-manual .mfc-manual-header {
  position: relative;
  z-index: 1002;
  height: var(--mfc-reader-header);
  box-sizing: border-box;
  background: #fff;
  border-bottom: 1px solid #e2e7ee;
  font-family: var(--mfc-reader-font);
}

.mfc-manual .mfc-manual-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-sizing: border-box;
  width: calc(100% - 2rem);
  max-width: 200rem;
  height: 100%;
  margin-inline: auto;
}

.mfc-manual .mfc-manual-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--mfc-reader-ink);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.mfc-manual .mfc-manual-brand img {
  display: block;
  width: auto;
  max-width: 180px;
  max-height: 38px;
  object-fit: contain;
}

.mfc-manual .mfc-manual-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 0 0 auto;
}

.mfc-manual .mfc-manual-home,
.mfc-manual .mfc-manual-actions > .menu > .dropdown.item {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  min-height: 44px;
  box-sizing: border-box;
  padding: .625rem .875rem;
  border-radius: .625rem;
  background: transparent;
  color: var(--mfc-reader-ink);
  font-size: .875rem;
  line-height: 1.4;
  text-decoration: none;
}

.mfc-manual .mfc-manual-home:hover,
.mfc-manual .mfc-manual-actions > .menu > .dropdown.item:hover {
  color: var(--mfc-reader-brand);
  background: #fff1f2;
}

.mfc-manual .mfc-manual-actions > .menu {
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-family: var(--mfc-reader-font);
}

.mfc-manual #langmenumanual {
  right: 0;
  left: auto;
  min-width: 10rem;
  padding: .375rem;
  border: 1px solid #e2e7ee;
  border-radius: .75rem;
  background: #fff;
  color: var(--mfc-reader-ink);
  box-shadow: 0 12px 36px rgba(36, 48, 67, .14);
}

.mfc-manual #langmenumanual > .item {
  min-height: 44px;
  box-sizing: border-box;
  padding: .75rem;
  border-radius: .5rem;
  color: var(--mfc-reader-ink);
}

.mfc-manual #page > .mfc-content {
  min-width: 0;
}

/* The plugin measures this container during responsiveUpdater(). Its own
   centerLightbox() writes top/height, so reserve the fixed header explicitly. */
.mfc-manual .mfcbook-lightbox,
.mfc-manual .mfcbook-lightbox-overlay {
  top: var(--mfc-reader-header) !important;
  height: calc(100% - var(--mfc-reader-header)) !important;
  background: #f4f6f9 !important;
}

.mfc-manual .mfcbook-lightbox.fullscreen,
.mfc-manual .mfcbook-lightbox:fullscreen {
  top: 0 !important;
  height: 100% !important;
}

.mfc-manual .mfcbook-toolbar {
  max-width: 100vw;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.mfc-manual .mfcbook-controls {
  width: auto;
  white-space: nowrap;
  border: 0;
  border-radius: .875rem;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e2e7ee, 0 8px 28px rgba(36, 48, 67, .1);
}

.mfc-manual .mfcbook-control,
.mfc-manual .mfcbook-control:visited,
.mfc-manual .mfcbook-control:active,
.mfc-manual .mfcbook-control.remove-sticky-hover-style:hover {
  min-width: 44px;
  color: var(--mfc-reader-ink);
  background: transparent;
}

.mfc-manual .mfcbook-control:hover,
.mfc-manual .mfcbook-control:focus-visible {
  color: var(--mfc-reader-brand);
  background: #fff1f2;
}

.mfc-manual .mfcbook-toc {
  max-width: min(22rem, 90vw);
  border-color: #e2e7ee;
  background: #fff;
  color: var(--mfc-reader-ink);
  box-shadow: 8px 0 32px rgba(36, 48, 67, .12);
  font-family: var(--mfc-reader-font);
}

.mfc-manual .mfcbook-toc :is(h1, .mfcbook-close),
.mfc-manual .mfcbook-toc-item a,
.mfc-manual .mfcbook-toc-item a:visited,
.mfc-manual .mfcbook-toc-item a:active {
  color: var(--mfc-reader-ink);
}

.mfc-manual .mfcbook-toc a {
  min-height: 44px;
  box-sizing: border-box;
  padding-block: .75rem;
  border-top: 1px solid #eef1f5;
  box-shadow: none;
  line-height: 1.5;
}

.mfc-manual .mfcbook-toc a:hover {
  color: var(--mfc-reader-brand);
  background: #fff1f2;
}

.mfc-manual .mfcbook-thumbnails {
  border-color: #e2e7ee;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -8px 28px rgba(36, 48, 67, .08);
}

.mfc-manual :where(a, button, input, [tabindex]):focus-visible {
  outline: 3px solid #2269b3;
  outline-offset: 2px;
}

@media (min-width: 64rem) {
  .mfc-manual .mfc-manual-nav {
    width: calc(100% - 4rem);
  }
}

@media (max-width: 30rem) {
  .mfc-manual .mfc-manual-nav {
    width: calc(100% - 1rem);
    gap: .5rem;
  }

  .mfc-manual .mfc-manual-brand img {
    max-width: 122px;
    max-height: 32px;
  }

  .mfc-manual .mfc-manual-home,
  .mfc-manual .mfc-manual-actions > .menu > .dropdown.item {
    padding-inline: .5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mfc-manual .mfc-manual-header * {
    transition-duration: .01ms !important;
  }
}
