:root {
  --paper: #f3f4f6;
  --paper-soft: #f9fafb;
  --white: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-deep: #1d4ed8;
  --green: #1f2937;
  --green-soft: #eef2f6;
  --gold: #9ca3af;
  --card-shadow: 0 1px 3px rgba(17, 24, 39, 0.08);
}

html[data-theme="dark"] {
  --paper: #111827;
  --paper-soft: #1f2937;
  --white: #1f2937;
  --ink: #f9fafb;
  --muted: #9ca3af;
  --line: #374151;
  --accent: #60a5fa;
  --accent-deep: #3b82f6;
  --green: #111827;
  --green-soft: #273244;
  --gold: #d1d5db;
  --card-shadow: 0 1px 4px rgba(0, 0, 0, 0.24);
}

body {
  background: var(--paper);
  font-size: 16px;
  line-height: 1.7;
}

.ao3-shell {
  width: min(100%, 1320px);
  background: var(--white);
  box-shadow: 0 2px 14px rgba(17, 24, 39, 0.05);
}

.ao3-skip {
  border-radius: 4px;
  color: #fff;
  background: #111827;
}

.ao3-statusbar {
  min-height: 36px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.ao3-statusbar b {
  color: var(--ink);
}

.ao3-header {
  border-bottom: 1px solid var(--line);
  background: var(--white);
  box-shadow: none;
}

html[data-theme="dark"] .ao3-header {
  background: var(--white);
}

.ao3-brand-copy,
.ao3-hero h1,
.ao3-section-head h2,
.ao3-help-intro h2,
.ao3-modal-panel h2,
.ao3-desk-heading h2,
.ao3-screen-read h3,
.ao3-work-copy h3,
.ao3-query h3 {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
}

.ao3-brand-copy {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.ao3-brand-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.ao3-logo {
  width: 70px;
  height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.ao3-nav {
  gap: 26px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}

.ao3-nav a {
  color: #374151;
}

.ao3-nav a:hover {
  color: var(--accent);
}

.ao3-nav-actions {
  display: none;
}

.ao3-icon-button,
.ao3-ghost-button,
.ao3-button {
  min-height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #374151;
  background: var(--white);
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.ao3-icon-button {
  width: 42px;
  height: 42px;
}

.ao3-icon-button:hover,
.ao3-ghost-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ao3-button-solid {
  border-color: #111827;
  color: #fff;
  background: #ff0000;
}

.ao3-button-solid:hover {
  border-color: #374151;
  background: #374151;
}

.ao3-menu {
  border-radius: 6px;
}

.ao3-hero {
  min-height: auto;
  background: var(--paper-soft);
}

.ao3-hero-copy {
  padding: 56px 7% 52px;
  border-right: 1px solid var(--line);
}

.ao3-eyebrow {
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.ao3-hero h1 {
  margin: 12px 0 16px;
  color: var(--ink);
  font-size: 44px;
  line-height: 1.2;
  text-shadow: none;
}

.ao3-hero h1 span {
  display: block;
  margin-top: 10px;
  color: #4b5563;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
}

.ao3-lead {
  border-left: 0;
  color: #4b5563;
  background: transparent;
  box-shadow: none;
  font-size: 16px;
  font-weight: 400;
}

.ao3-hero-actions {
  margin-top: 28px;
}

.ao3-hero-meta {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ao3-hero-meta dd {
  color: var(--ink);
  font-size: 28px;
}

.ao3-hero-meta dt {
  color: var(--muted);
  font-size: 13px;
}

.ao3-desk {
  padding: 48px 7% 56px;
}

.ao3-desk-top {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: 0;
}

.ao3-desk-top b {
  color: var(--ink);
  font-size: 17px;
}

.ao3-desk-work {
  margin-top: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.ao3-rating {
  border: 1px solid #d1d5db;
  border-radius: 4px;
  color: #374151;
  background: var(--white);
  box-shadow: none;
}

.ao3-desk-heading h2 {
  color: var(--ink);
  font-size: 18px;
}

.ao3-desk-heading p {
  color: var(--muted);
  font-size: 13px;
}

.ao3-progress-track {
  border: 0;
  border-radius: 4px;
  background: #e5e7eb;
}

.ao3-progress-track i {
  border-radius: 4px;
  background: var(--accent);
}

.ao3-progress span {
  color: var(--muted);
  font-size: 13px;
}

.ao3-desk-actions {
  color: var(--muted);
  font-size: 13px;
}

.ao3-desk-actions button,
.ao3-work-meta button {
  min-height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #374151;
  background: var(--white);
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
}

.ao3-desk-actions button:hover,
.ao3-work-meta button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ao3-desk-stats {
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.ao3-desk-stats div {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ao3-desk-stats span {
  color: var(--muted);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 12px;
}

.ao3-desk-stats b {
  color: var(--ink);
  font-size: 14px;
}

.ao3-desk-stats small {
  color: var(--muted);
  font-size: 12px;
}

.ao3-desk-stats em {
  color: var(--accent);
  font-size: 14px;
}

.ao3-section {
  padding: 72px 28px;
}

.ao3-section-head {
  margin-bottom: 30px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.ao3-section-head h2 {
  color: var(--ink);
  font-size: 32px;
  font-weight: 700;
  text-shadow: none;
}

.ao3-section-head p {
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}

.ao3-features {
  border: 0;
  background: var(--white);
}

.ao3-features .ao3-section-head {
  border-color: var(--line);
}

.ao3-product {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.ao3-product img {
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.ao3-product figcaption {
  border-radius: 0;
  color: var(--ink);
  background: var(--white);
}

.ao3-product figcaption b {
  font-size: 14px;
}

.ao3-product figcaption span {
  color: var(--muted);
  font-size: 12px;
}

.ao3-reading {
  border: 0;
  background: var(--paper-soft);
}

.ao3-tabs {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.ao3-tabs strong,
.ao3-tab {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
  font-weight: 500;
}

.ao3-tab {
  font-size: 14px;
}

.ao3-tab:hover {
  background: var(--paper-soft);
}

.ao3-tab.ao3-active {
  color: #fff;
  background: #111827;
}

.ao3-work {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.ao3-work:hover {
  border-color: #9ca3af;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
}

.ao3-work-copy h3 {
  color: var(--ink);
  font-size: 16px;
}

.ao3-work-copy p {
  color: var(--muted);
  font-size: 14px;
}

.ao3-tags span {
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #4b5563;
  background: var(--paper-soft);
  font-size: 12px;
  font-weight: 400;
}

.ao3-work-meta {
  color: var(--muted);
  font-size: 12px;
}

.ao3-work-meta b {
  color: var(--ink);
  font-size: 13px;
}

.ao3-saved {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: #f3f4f6;
}

.ao3-saved .ao3-section-head {
  border-color: var(--line);
}

.ao3-saved .ao3-section-head h2 {
  color: var(--ink);
}

.ao3-saved .ao3-section-head p {
  color: var(--muted);
}

.ao3-saved .ao3-eyebrow {
  color: var(--muted);
}

.ao3-query {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.ao3-query-index {
  color: var(--muted);
  font-weight: 600;
}

.ao3-query h3 {
  color: var(--ink);
  font-size: 16px;
}

.ao3-query p {
  color: var(--muted);
  font-size: 14px;
}

.ao3-query footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.ao3-query footer b {
  color: var(--ink);
  font-size: 16px;
}

.ao3-help {
  border: 0;
  background: var(--white);
}

.ao3-help-intro h2 {
  color: var(--ink);
  font-size: 32px;
  font-weight: 700;
  text-shadow: none;
}

.ao3-help-intro p {
  color: var(--muted);
  font-size: 15px;
}

.ao3-faq-list {
  border-top: 1px solid var(--line);
}

.ao3-faq {
  border-bottom: 1px solid var(--line);
}

.ao3-faq-toggle span {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.ao3-faq-toggle strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.ao3-faq-body p {
  color: var(--muted);
  font-size: 14px;
}

.ao3-reviews {
  border: 0;
  background: var(--paper-soft);
}

.ao3-reviews .ao3-section-head {
  border-color: var(--line);
}

.ao3-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.ao3-note-head {
  color: var(--muted);
  font-size: 12px;
}

.ao3-note p {
  color: #374151;
  font-size: 14px;
}

.ao3-note a {
  color: var(--accent);
  font-weight: 500;
}

.ao3-note a:hover {
  text-decoration: underline;
}

.ao3-note footer {
  border-top: 1px solid var(--line);
}

.ao3-avatar {
  border: 0;
  border-radius: 999px;
  color: #374151;
  background: #e5e7eb;
  font-weight: 600;
}

.ao3-note footer b {
  color: var(--ink);
  font-size: 13px;
}

.ao3-note footer div span {
  color: var(--muted);
  font-size: 12px;
}

.ao3-footer {
  border-top: 0;
  color: #fff;
  background: #111827;
}

.ao3-footer nav a {
  color: #d1d5db;
}

.ao3-footer nav a:hover {
  color: #fff;
  text-decoration: underline;
}

.ao3-footer .ao3-logo {
  border-color: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  box-shadow: none;
}

.ao3-footer > span {
  color: rgba(255, 255, 255, 0.65);
}

.ao3-feedback {
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #111827;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.15);
}

.ao3-modal-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.14);
}

.ao3-modal-kicker {
  color: var(--muted);
}

.ao3-download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 24px;
}

.ao3-download-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 128px;
  padding: 18px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #111827;
  background: #ffffff;
  cursor: pointer;
  text-decoration: none;
}

.ao3-download-option:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.ao3-download-option svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ao3-download-option b {
  font-size: 16px;
}

.ao3-download-option small {
  color: #6b7280;
  font-size: 13px;
}

.ao3-modal-actions {
  display: flex;
  justify-content: flex-end;
}

.ao3-product-img {
  cursor: zoom-in;
}

.ao3-lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.ao3-lightbox.ao3-open {
  visibility: visible;
  opacity: 1;
}

.ao3-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.82);
}

.ao3-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.88);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.ao3-lightbox-close:hover,
.ao3-lightbox-close:focus-visible {
  border-color: #ffffff;
  color: #ffffff;
  background: #111827;
}

.ao3-lightbox-close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.ao3-lightbox-figure {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  margin: 0;
  text-align: center;
}

.ao3-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.ao3-lightbox-caption {
  margin-top: 12px;
  color: #ffffff;
  font-size: 15px;
}

body.ao3-lightbox-open {
  overflow: hidden;
}

.ao3-toast {
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #111827;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.15);
}

@media (max-width: 920px) {
  .ao3-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 95;
    width: 100%;
    padding: 10px 14px 14px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--white);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.1);
  }

  .ao3-nav > a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
  }

  .ao3-nav > a:last-of-type {
    border-bottom: 0;
  }

  .ao3-nav > a:hover,
  .ao3-nav > a:focus-visible {
    color: var(--accent);
    background: var(--paper-soft);
  }

  .ao3-nav-actions {
    display: grid;
    gap: 8px;
    padding: 14px 0 4px;
    border-top: 1px solid var(--line);
  }

  .ao3-nav-actions .ao3-ghost-button,
  .ao3-nav-actions .ao3-button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .ao3-nav-actions a {
    text-decoration: none;
  }

  .ao3-nav-actions svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .ao3-nav-actions .ao3-button-solid {
    color: #fff;
  }

  .ao3-nav-actions .ao3-button-solid:hover,
  .ao3-nav-actions .ao3-button-solid:focus-visible {
    border-color: #374151;
    color: #fff;
    background: #374151;
  }

  .ao3-nav-actions .ao3-ghost-button:hover,
  .ao3-nav-actions .ao3-ghost-button:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
  }

  .ao3-hero {
    min-height: auto;
  }

  .ao3-hero-copy {
    border-right: 0;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .ao3-lightbox {
    padding: 14px;
  }

  .ao3-lightbox-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .ao3-lightbox-caption {
    font-size: 13px;
  }

  .ao3-download-grid {
    grid-template-columns: 1fr;
  }

  .ao3-section {
    padding: 48px 18px;
  }

  .ao3-hero h1 {
    font-size: 32px;
  }

  .ao3-hero h1 span {
    font-size: 16px;
  }

  .ao3-section-head h2 {
    font-size: 26px;
  }

  .ao3-help-intro h2 {
    font-size: 26px;
  }
}
