.neijing-page {
  --neijing-border: #d9cfc2;
  --neijing-surface: #fffcf7;
  --neijing-muted: #857a7a;
  --neijing-accent: #795548;
  --neijing-accent-hover: #6d4c41;
  --neijing-accent-soft: #f5efe6;
  --neijing-ink: #3e3e3e;
  --neijing-shadow: 0 1px 4px rgba(121, 85, 72, 0.1);
  --neijing-font: "Microsoft YaHei", "MicrosoftYaHei", sans-serif;
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding-bottom: 2.5rem;
  color: var(--neijing-ink);
}

.neijing-page .page-heading {
  margin: 0 0 10px;
  color: var(--neijing-accent-hover);
  letter-spacing: 0.02em;
}

.neijing-page-hero {
  margin-bottom: 1.25rem;
  padding: 18px 18px 16px;
  border: 1px solid var(--neijing-border);
  border-radius: 12px;
  background: var(--neijing-surface);
  box-shadow: var(--neijing-shadow);
}

.neijing-lead {
  margin: 0;
  max-width: 52em;
  font-size: 14px;
  line-height: 1.65;
  color: var(--neijing-muted);
}

.neijing-disclaimer {
  margin: 0 0 1.25rem;
  color: var(--neijing-muted);
  font-size: 14px;
}

.neijing-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.neijing-inline-anchor {
  color: var(--neijing-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.neijing-inline-anchor:hover {
  color: var(--neijing-accent-hover);
}

.neijing-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 14px;
}

.neijing-subnav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--neijing-border);
  background: #fff;
  color: #3d3834;
  text-decoration: none;
  font-size: 14px;
}

.neijing-subnav-link:hover {
  border-color: var(--neijing-accent);
  color: var(--neijing-accent);
  background: var(--neijing-accent-soft);
}

.neijing-hub-section {
  margin-bottom: 1.75rem;
}

.neijing-section-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--neijing-accent-hover);
}

.neijing-inline-link {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  color: var(--neijing-accent);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.neijing-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.neijing-hub-card {
  display: block;
  padding: 20px 18px;
  border: 1px solid var(--neijing-border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
  background: #fff;
  box-shadow: var(--neijing-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.neijing-hub-card:hover {
  border-color: var(--neijing-accent);
  box-shadow: 0 4px 14px rgba(121, 85, 72, 0.12);
}

.neijing-hub-card-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--neijing-accent);
  background: var(--neijing-accent-soft);
}

.neijing-hub-card-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: var(--neijing-accent-hover);
}

.neijing-hub-card-desc {
  margin: 0;
  color: var(--neijing-muted);
  font-size: 14px;
}

.neijing-hub-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.neijing-hub-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 44px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--neijing-border);
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--neijing-shadow);
}

.neijing-hub-link:hover {
  border-color: var(--neijing-accent);
  background: var(--neijing-accent-soft);
}

.neijing-hub-link-label {
  font-weight: 600;
  color: var(--neijing-accent-hover);
}

.neijing-hub-link-desc {
  font-size: 13px;
  color: var(--neijing-muted);
}

.neijing-catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 14px;
}

.neijing-catalog-search-wrap {
  flex: 1 1 200px;
  min-width: 0;
  max-width: 360px;
}

.neijing-catalog-search {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--neijing-border);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

.neijing-catalog-search:focus {
  outline: none;
  border-color: var(--neijing-accent);
  box-shadow: 0 0 0 2px rgba(121, 85, 72, 0.12);
}

.neijing-catalog-count {
  font-size: 13px;
  color: var(--neijing-muted);
}

.neijing-catalog-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.neijing-catalog-item {
  margin: 0;
  min-width: 0;
}

.neijing-catalog-item[hidden] {
  display: none;
}

.neijing-catalog-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--neijing-border);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: var(--neijing-ink);
  min-height: 44px;
  box-shadow: 0 1px 2px rgba(121, 85, 72, 0.06);
}

.neijing-catalog-card:hover {
  border-color: var(--neijing-accent);
  background: var(--neijing-accent-soft);
}

.neijing-catalog-no {
  flex-shrink: 0;
  min-width: 1.6em;
  font-size: 13px;
  color: var(--neijing-muted);
}

.neijing-catalog-title {
  font-size: 1rem;
  line-height: 1.45;
  color: var(--neijing-accent-hover);
}

.neijing-catalog-hint {
  margin: 6px 0 0;
  padding-left: 2px;
  font-size: 12px;
  color: var(--neijing-muted);
}

.neijing-chapter-no {
  margin-right: 8px;
  color: var(--neijing-muted);
}

.neijing-empty,
.neijing-loading {
  color: #888;
}

.neijing-reader-page {
  padding-bottom: 2.5rem;
  --neijing-scroll-margin-top: 88px;
}

@media (max-width: 800px) {
  .neijing-reader-page {
    --neijing-scroll-margin-top: 84px;
  }
}

/* 站内固定顶栏：检索锚点、#b 段落定位时不被遮挡 */
html:has(main.neijing-reader-page) {
  scroll-padding-top: 88px;
}

@media (max-width: 800px) {
  html:has(main.neijing-reader-page) {
    scroll-padding-top: 84px;
  }
}

.neijing-reader-page .neijing-chapter-title,
.neijing-reader-page .neijing-nav-title,
.neijing-reader-page .neijing-facsimile-title,
.neijing-reader-page .neijing-text-col-title,
.neijing-reader-page .neijing-text-col-hint:empty {
  display: none;
  margin: 0;
}

.neijing-reader-page .neijing-text-col-hint,
.neijing-reader-page .neijing-facsimile-meta,
.neijing-reader-page .neijing-sentence-original,
.neijing-reader-page .neijing-sentence-translation,
.neijing-reader-page .neijing-read-label,
.neijing-reader-page .neijing-read-note,
.neijing-reader-page .neijing-read-note .neijing-annotation,
.neijing-reader-page .neijing-annotation,
.neijing-reader-page .neijing-block-text,
.neijing-reader-page .neijing-read-flow,
.neijing-reader-page .neijing-pager-indicator,
.neijing-reader-page .neijing-facsimile-stage figcaption {
  font-family: var(--neijing-font);
}

.neijing-reader-page .neijing-reader-header {
  position: static;
  z-index: auto;
  width: auto;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--neijing-border);
  border-radius: 10px;
  background: var(--neijing-surface);
  box-shadow: var(--neijing-shadow);
  background-image: none;
  backdrop-filter: none;
}

.neijing-reader-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 10px;
}

.neijing-reader-header-aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.neijing-reader-page .neijing-reader-header .neijing-chapter-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--neijing-accent-hover);
  flex: 1;
  min-width: 0;
}

.neijing-reader-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.neijing-btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--neijing-border);
  background: var(--neijing-surface);
  color: #3d3834;
  text-decoration: none;
  font-size: 14px;
}

.neijing-btn-ghost:hover {
  border-color: var(--neijing-accent);
  color: var(--neijing-accent);
}

.neijing-reader-page .neijing-btn-ghost:hover {
  background: var(--neijing-accent-soft);
}

.neijing-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  font-size: 14px;
}

.neijing-reader-page .neijing-layer-toggle {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(121, 85, 72, 0.06);
  color: var(--neijing-ink);
}

.neijing-reader-layout {
  display: grid;
  grid-template-columns: minmax(148px, 188px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.neijing-reader-workspace {
  min-width: 0;
}

.neijing-reader-product-note {
  margin: 0 0 1rem;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--neijing-muted);
  background: var(--neijing-accent-soft);
  border: 1px solid var(--neijing-border);
  border-left: 3px solid var(--neijing-accent);
  border-radius: 6px;
}

.neijing-reader-product-note summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--neijing-accent-hover);
  min-height: 32px;
  display: flex;
  align-items: center;
}

.neijing-reader-product-note p {
  margin: 10px 0 0;
}

.neijing-reader-toolbar-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.neijing-reader-search {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  max-width: 520px;
  margin-top: 4px;
}

.neijing-reader-search-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.neijing-reader-search-row .neijing-search-input {
  flex: 1;
  min-width: 0;
}

.neijing-search-scope {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.neijing-reader-search .neijing-search-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  line-height: 38px;
  padding: 0 12px;
  margin: 0;
  border: 1px solid var(--neijing-border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--neijing-ink);
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.neijing-reader-search .neijing-search-input:focus {
  outline: none;
  border-color: var(--neijing-accent);
  box-shadow: 0 0 0 2px rgba(121, 85, 72, 0.15);
}

.neijing-reader-search .neijing-search-btn {
  flex-shrink: 0;
  min-height: 38px;
  height: 38px;
  padding: 0 18px;
  margin: 0;
  border: none;
  border-radius: 6px;
  background: var(--neijing-accent);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  line-height: 38px;
  transition: background 0.15s ease;
}

.neijing-reader-search .neijing-search-btn:hover {
  background: var(--neijing-accent-hover);
}

.neijing-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.neijing-layer-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
}

.neijing-reader-main {
  min-width: 0;
}

.neijing-chapter-title {
  margin: 0 0 12px;
}

.neijing-reader-split {
  display: grid;
  grid-template-columns: minmax(0, 44%) minmax(0, 56%);
  gap: 20px;
  align-items: start;
}

.neijing-reader-page .neijing-reader-nav {
  padding: 12px 10px;
  border: 1px solid var(--neijing-border);
  border-radius: 10px;
  background: var(--neijing-surface);
  box-shadow: var(--neijing-shadow);
}

.neijing-reader-page .neijing-nav-title {
  font-size: 1rem;
  color: var(--neijing-accent-hover);
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--neijing-border);
}

.neijing-reader-page .neijing-nav-list a.is-active,
.neijing-reader-page .neijing-nav-list a:hover {
  background: var(--neijing-accent-soft);
  color: var(--neijing-accent);
}

.neijing-reader-facsimile-col {
  position: sticky;
  top: 90px;
  min-width: 0;
}

.neijing-reader-text-col {
  min-width: 0;
  padding: 14px 14px 24px;
  border: 1px solid var(--neijing-border);
  border-radius: 10px;
  background: var(--neijing-surface);
  box-shadow: var(--neijing-shadow);
}

.neijing-text-col-head {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--neijing-border);
}

.neijing-text-col-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--neijing-accent-hover);
}

.neijing-text-col-hint {
  margin: 0;
  font-size: 13px;
  color: var(--neijing-muted);
}

.neijing-facsimile-panel {
  margin-bottom: 0;
  padding: 14px;
  border: 1px solid var(--neijing-border);
  border-radius: 10px;
  background: var(--neijing-surface);
  box-shadow: var(--neijing-shadow);
}

.neijing-facsimile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.neijing-page-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.neijing-pager-btn {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--neijing-border);
  border-radius: 6px;
  background: #fff;
  color: var(--neijing-ink);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.neijing-pager-btn:hover:not(:disabled) {
  border-color: var(--neijing-accent);
  color: var(--neijing-accent);
  background: var(--neijing-accent-soft);
}

.neijing-pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.neijing-pager-indicator {
  font-size: 13px;
  color: var(--neijing-muted);
  white-space: nowrap;
}

.neijing-facsimile-missing {
  margin: 8px 0 0;
  font-size: 13px;
  color: #a67c00;
  line-height: 1.5;
}

.neijing-facsimile-panel[hidden] {
  display: none !important;
}

.neijing-facsimile-title {
  margin: 0;
  font-size: 1rem;
  color: var(--neijing-accent-hover);
}

.neijing-facsimile-meta {
  margin: 0 0 12px;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.neijing-facsimile-pages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.neijing-facsimile-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.neijing-facsimile-stage {
  margin: 0;
}

.neijing-facsimile-frame {
  display: block;
  width: 100%;
}

.neijing-facsimile-media {
  position: relative;
  display: block;
  width: 100%;
  line-height: 0;
}

.neijing-facsimile-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.neijing-facsimile-overlay-inner {
  position: absolute;
  box-sizing: border-box;
  pointer-events: none;
}

.neijing-facsimile-hit {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: rgba(121, 85, 72, 0.06);
  pointer-events: auto;
  cursor: pointer;
  min-height: 32px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.neijing-facsimile-hit:hover,
.neijing-facsimile-hit.is-active {
  border-color: rgba(121, 85, 72, 0.75);
  background: rgba(121, 85, 72, 0.18);
}

.neijing-reader-page .neijing-read-unit.is-facsimile-active {
  border-color: rgba(121, 85, 72, 0.55);
  box-shadow: 0 0 0 2px rgba(121, 85, 72, 0.12);
}

.neijing-facsimile-stage img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72vh, 720px);
  border: 1px solid var(--neijing-border);
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.neijing-reader-page .neijing-facsimile-stage figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--neijing-muted);
  text-align: center;
}

.neijing-read-flow {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.neijing-reader-page .neijing-read-unit {
  padding: 16px 14px;
  border: 1px solid var(--neijing-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(121, 85, 72, 0.06);
  scroll-margin-top: var(--neijing-scroll-margin-top);
}

.neijing-read-unit {
  padding: 16px 14px;
  border: 1px solid var(--neijing-border);
  border-radius: 10px;
  background: var(--neijing-surface);
  box-shadow: 0 1px 2px rgba(44, 40, 37, 0.04);
}

.neijing-sentence-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.neijing-sentence-pair {
  margin: 0;
  padding: 0;
  border: none;
}

.neijing-sentence-original {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--neijing-ink, #1a1a1a);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.neijing-sentence-translation {
  margin: 8px 0 0;
  padding: 10px 12px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #4a4540;
  background: var(--neijing-accent-soft);
  border-left: 3px solid var(--neijing-accent);
  border-radius: 0 6px 6px 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.neijing-read-label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.neijing-read-original .neijing-block-text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.75;
}

.neijing-read-translation,
.neijing-read-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e8e8e8;
}

.neijing-cite-excerpt {
  margin: 4px 0 0;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.neijing-facsimile-figure {
  margin: 0;
}

.neijing-facsimile-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.neijing-facsimile-figure figcaption {
  margin-top: 4px;
  font-size: 12px;
  color: #888;
}

.neijing-layer-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
}

.neijing-nav-title {
  font-size: 1rem;
  margin: 0 0 8px;
}

.neijing-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 70vh;
  overflow-y: auto;
}

.neijing-nav-list a {
  display: block;
  padding: 6px 8px;
  font-size: 13px;
  text-decoration: none;
  color: #333;
  border-radius: 4px;
}

.neijing-nav-list a.is-active,
.neijing-nav-list a:hover {
  background: var(--neijing-accent-soft);
  color: var(--neijing-accent);
}

.neijing-chapter-title {
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

.neijing-block {
  margin-bottom: 1.25rem;
  scroll-margin-top: 80px;
}

.neijing-block-text {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.neijing-annotation {
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 14px;
  border-left: 3px solid #ddd;
  background: #fafafa;
}

.neijing-annotation--translation {
  border-left-color: #1e9fff;
}

.neijing-annotation--note {
  border-left-color: #ffb800;
}

.neijing-acupoint-term {
  display: inline;
  padding: 0 2px;
  border: none;
  background: none;
  color: #c00;
  cursor: pointer;
  font: inherit;
  text-decoration: underline dotted;
  min-height: 32px;
}

.neijing-meridian-term {
  display: inline;
  color: #1a6b4a;
  text-decoration: underline dotted;
  cursor: pointer;
}

.neijing-viewer-panel {
  width: 100%;
  height: 320px;
  background: #1a1a2e;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.neijing-3d-page .neijing-3d-header {
  margin-bottom: 14px;
}

.neijing-3d-page .page-heading {
  margin: 0 0 8px;
  font-size: 1.55rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: #1f2a37;
}

.neijing-3d-page .neijing-disclaimer {
  margin: 0;
  max-width: 52em;
  color: #5c6b7a;
  font-size: 14px;
  line-height: 1.65;
}

.neijing-3d-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 560px;
}

.neijing-3d-controls {
  flex: 0 0 176px;
  width: 176px;
  max-width: 176px;
  min-width: 176px;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.neijing-3d-side {
  flex: 0 0 240px;
  width: 240px;
  max-width: 240px;
  min-width: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  padding: 14px;
  background: #fbfcfd;
  border: 1px solid #e4e8ee;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: auto;
}

.neijing-3d-side .neijing-side-empty {
  color: #7a8794;
}

.neijing-3d-stage {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.neijing-tcm-host {
  position: relative;
  display: block;
  width: 100%;
  height: 70vh;
  min-height: 480px;
  max-height: 720px;
  box-sizing: border-box;
  cursor: default;
  border: 1px solid #e4e8ee;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.35);
}

.neijing-tcm-status {
  position: absolute;
  z-index: 3;
  left: 12px;
  top: 12px;
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 32, 52, 0.08);
  color: #334155;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.neijing-tcm-hud {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: min(280px, calc(100% - 20px));
  pointer-events: none;
}

.neijing-tcm-hud-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
  pointer-events: auto;
}

.neijing-tcm-hud .neijing-tcm-btn {
  width: auto;
  min-width: 64px;
  padding: 0 12px;
  box-shadow: 0 1px 3px rgba(20, 32, 52, 0.08);
}

.neijing-tcm-hud .neijing-tcm-meridian-select {
  width: auto;
  min-width: 120px;
  max-width: 160px;
  box-shadow: 0 1px 3px rgba(20, 32, 52, 0.08);
}

.neijing-tcm-hud .neijing-tcm-nav-tip {
  margin: 0;
  padding: 6px 10px;
  max-width: 100%;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(20, 32, 52, 0.08);
  color: #5c6b7a;
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
  word-break: break-word;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.neijing-tcm-nav-tip--mobile {
  display: none;
}

.neijing-tcm-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 70vh;
  min-height: 480px;
  padding: 12px;
  border: 1px solid #e4e8ee;
  border-radius: 10px;
  background: #fbfcfd;
  overflow-x: hidden;
  overflow-y: auto;
}

.neijing-tcm-panel-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.neijing-tcm-panel-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #445266;
  letter-spacing: 0.02em;
}

.neijing-tcm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #d5dde6;
  border-radius: 8px;
  background: #fff;
  color: #1f2a37;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.neijing-tcm-btn:hover {
  background: #f3f7fb;
  border-color: #b8c6d4;
}

.neijing-tcm-btn-reset {
  background: #eaf5ff;
  border-color: #9eccf0;
  color: #0b6cb3;
}

.neijing-tcm-btn-reset:hover {
  background: #d9efff;
  border-color: #6fb3e4;
}

.neijing-tcm-systems {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.neijing-tcm-sys {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #e1e7ee;
  background: #fff;
  color: #445266;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.neijing-tcm-sys input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

.neijing-tcm-sys-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.neijing-tcm-sys.is-on {
  color: #0b6cb3;
  background: #eaf5ff;
  border-color: #9eccf0;
}

.neijing-tcm-sys:hover {
  border-color: #b8c6d4;
  color: #1f2a37;
}

.neijing-tcm-meridian-select {
  display: inline-block;
  box-sizing: border-box;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid #d5dde6;
  background: #fff;
  color: #1f2a37;
  font-size: 12px;
  padding: 4px 8px;
}

.neijing-tcm-stage {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  cursor: default;
  touch-action: none;
}

.neijing-tcm-stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
  background: transparent;
}

.neijing-tcm-stage canvas.is-over-point {
  cursor: pointer;
}

.neijing-viewer-full.neijing-tcm-host {
  width: 100%;
  height: 70vh;
  min-height: 480px;
  max-height: 720px;
}

.neijing-viewer-panel canvas,
.neijing-viewer-full canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
}

.neijing-viewer-panel.neijing-tcm-host canvas,
.neijing-viewer-full.neijing-tcm-host canvas {
  cursor: grab;
}

.neijing-viewer-panel.neijing-tcm-host canvas.is-over-point,
.neijing-viewer-full.neijing-tcm-host canvas.is-over-point {
  cursor: pointer;
}

.neijing-viewer-full {
  width: 100%;
  height: 70vh;
  min-height: 480px;
  max-height: 720px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.neijing-3d-hint {
  margin: 0 0 8px;
  font-size: 13px;
  color: #888;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.neijing-3d-toolbar {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  max-width: calc(100% - 130px);
}

.neijing-3d-search {
  min-height: 32px;
  min-width: 140px;
  flex: 1 1 140px;
  max-width: 220px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(8, 14, 28, 0.82);
  color: #f2f5f8;
  font-size: 13px;
}

.neijing-3d-btn {
  min-height: 32px;
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  background: rgba(30, 159, 255, 0.9);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.neijing-3d-btn:hover {
  background: #1e9fff;
}

.neijing-3d-btn.is-active {
  background: #0d7fd1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.neijing-3d-point-labels {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.neijing-3d-point-name {
  position: absolute;
  left: 0;
  top: 0;
  display: none;
  max-width: 7em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(6, 12, 24, 0.78);
  color: #eef3f8;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.neijing-3d-point-name.is-selected {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(30, 159, 255, 0.88);
  border-color: transparent;
}

.neijing-3d-suggest {
  position: absolute;
  left: 8px;
  bottom: 48px;
  z-index: 4;
  width: min(260px, calc(100% - 120px));
  max-height: 220px;
  overflow: auto;
  background: rgba(8, 14, 28, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 4px;
}

.neijing-3d-suggest-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #eef2f6;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
}

.neijing-3d-suggest-item span {
  opacity: 0.7;
  font-size: 11px;
}

.neijing-3d-suggest-item:hover {
  background: rgba(30, 159, 255, 0.25);
}

.neijing-3d-suggest-empty {
  padding: 10px;
  color: #aaa;
  font-size: 12px;
}

.neijing-3d-label {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  display: none;
  max-width: min(280px, 72%);
  padding: 10px 12px;
  background: rgba(6, 10, 20, 0.82);
  color: #f4f7fb;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.neijing-3d-label.is-visible {
  display: block;
}

.neijing-3d-label strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.neijing-3d-label-meridian {
  display: inline-block;
  margin-bottom: 4px;
  color: #7ec8ff;
  font-size: 12px;
}

.neijing-3d-label p {
  margin: 4px 0 0;
  opacity: 0.88;
  font-size: 12px;
}

.neijing-3d-legend {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  z-index: 2;
  width: 122px;
  overflow: auto;
  padding: 6px;
  background: rgba(6, 10, 20, 0.78);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.neijing-3d-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  min-height: 32px;
  margin: 0 0 4px;
  padding: 5px 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #e8eef5;
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  word-break: break-word;
}

.neijing-3d-legend-item.is-active {
  background: rgba(30, 159, 255, 0.32);
}

.neijing-3d-swatch {
  width: 10px;
  height: 10px;
  margin-top: 3px;
  border-radius: 50%;
  flex-shrink: 0;
}

.neijing-side-card h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  line-height: 1.4;
  color: #1f2a37;
}

.neijing-side-card .neijing-meta {
  margin: 0 0 8px;
  color: #3d7ea6;
  font-size: 13px;
}

.neijing-side-sub {
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #445266;
}

.neijing-side-loc {
  margin: 0 0 8px;
  color: #5c6b7a;
  font-size: 13px;
  line-height: 1.55;
}

.neijing-cite-list {
  margin: 0;
  padding-left: 1.15em;
  line-height: 1.65;
  color: #334155;
}

.neijing-cite-list a {
  color: #1a7fc4;
  text-decoration: none;
}

.neijing-cite-list a:hover {
  text-decoration: underline;
}

.neijing-side-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-top: 4px;
  color: #1a7fc4;
  text-decoration: none;
  font-weight: 500;
}

.neijing-side-link:hover {
  text-decoration: underline;
}

.neijing-side-back {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.neijing-3d-side-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
}

.neijing-3d-side-tab {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid #d5dde6;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font: inherit;
}

.neijing-3d-side-tab.is-active {
  border-color: #1a7fc4;
  color: #1a7fc4;
  background: #f3f9fd;
}

.neijing-3d-acupoint-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 420px;
  overflow: auto;
}

.neijing-3d-acupoint-item {
  display: block;
  width: 100%;
  min-height: 32px;
  margin: 0 0 4px;
  padding: 6px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font: inherit;
  color: #1f2a37;
  cursor: pointer;
  word-break: break-word;
}

.neijing-3d-acupoint-item.is-active,
.neijing-3d-acupoint-item:hover {
  background: #eef6fb;
  color: #1a7fc4;
}

@media (max-width: 800px) {
  .neijing-3d-layout {
    flex-direction: column;
    min-height: 0;
  }

  .neijing-3d-controls {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .neijing-3d-stage {
    order: 2;
    flex: 1 1 auto;
    width: 100%;
  }

  .neijing-3d-side {
    order: 3;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }

  .neijing-tcm-toolbar {
    max-height: none;
    min-height: 0;
    height: auto;
  }

  .neijing-tcm-host,
  .neijing-viewer-full,
  .neijing-viewer-full.neijing-tcm-host {
    min-height: 420px;
    height: 58vh;
    max-height: none;
  }

  .neijing-tcm-systems {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .neijing-tcm-sys {
    width: auto;
    max-width: 100%;
    flex: 0 1 auto;
  }

  .neijing-tcm-hud {
    top: 8px;
    right: 8px;
    max-width: calc(100% - 16px);
  }

  .neijing-tcm-hud-actions {
    justify-content: flex-end;
  }

  .neijing-tcm-hud .neijing-tcm-meridian-select {
    min-width: 110px;
    max-width: 140px;
    flex: 0 1 auto;
  }

  .neijing-tcm-nav-tip--desktop {
    display: none;
  }

  .neijing-tcm-nav-tip--mobile {
    display: block;
  }

  .neijing-tcm-hud .neijing-tcm-nav-tip {
    font-size: 10px;
    text-align: left;
  }

  .neijing-3d-legend {
    width: 96px;
  }

  .neijing-3d-legend-item {
    font-size: 10px;
    min-height: 30px;
  }

  .neijing-3d-toolbar {
    max-width: none;
  }

  .neijing-3d-search {
    min-width: 110px;
  }

  .neijing-3d-point-name {
    font-size: 10px;
    max-width: 5.5em;
    padding: 2px 4px;
  }
}

.neijing-viewer-2d svg {
  width: 100%;
  height: auto;
  max-height: 280px;
}

.neijing-citation-panel {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.neijing-citation-hint {
  color: #888;
  margin: 0;
}

.neijing-panel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.neijing-tab {
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.neijing-tab.is-active {
  border-color: #1e9fff;
  color: #1e9fff;
}

.neijing-search-results {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 8px;
}

.neijing-reader-page .neijing-search-results {
  border-color: var(--neijing-border);
  background: var(--neijing-surface);
  box-shadow: var(--neijing-shadow);
  scroll-margin-top: var(--neijing-scroll-margin-top);
}

.neijing-reader-page .neijing-search-results a {
  color: var(--neijing-accent);
}

.neijing-reader-page .neijing-search-results a:hover {
  color: var(--neijing-accent-hover);
}

.neijing-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 8px;
  background: var(--neijing-accent);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.neijing-btn-primary:hover {
  background: var(--neijing-accent-hover);
  color: #fff;
}

.neijing-acupoint-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--neijing-border);
  border-radius: 10px;
  background: var(--neijing-surface);
}

.neijing-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.neijing-filter-field--grow {
  flex: 1 1 160px;
}

.neijing-filter-label {
  font-size: 12px;
  color: var(--neijing-muted);
}

.neijing-filter-input {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--neijing-border);
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  width: 100%;
  max-width: 280px;
}

.neijing-filter-field--grow .neijing-filter-input {
  max-width: none;
}

.neijing-acupoint-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.neijing-acupoint-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--neijing-border);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(121, 85, 72, 0.06);
}

.neijing-acupoint-card:hover {
  border-color: var(--neijing-accent);
  background: var(--neijing-accent-soft);
}

.neijing-acupoint-card-name {
  font-weight: 600;
  color: var(--neijing-accent-hover);
}

.neijing-acupoint-card-meta {
  font-size: 12px;
  color: var(--neijing-muted);
}

.neijing-meta {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--neijing-muted);
}

.neijing-meta-label {
  display: inline-block;
  min-width: 2.5em;
  margin-right: 6px;
  color: var(--neijing-muted);
}

.neijing-detail-card {
  margin-bottom: 1.25rem;
  padding: 16px;
  border: 1px solid var(--neijing-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--neijing-shadow);
}

.neijing-detail-card .neijing-section-title {
  margin-top: 0;
}

.neijing-location {
  margin: 0;
  line-height: 1.65;
}

.neijing-acupoint-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1.25rem;
}

.neijing-acupoint-detail-page .neijing-btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--neijing-border);
  background: #fff;
  color: #3d3834;
  text-decoration: none;
  font-size: 14px;
}

.neijing-acupoint-detail-page .neijing-btn-ghost:hover {
  border-color: var(--neijing-accent);
  color: var(--neijing-accent);
  background: var(--neijing-accent-soft);
}

.neijing-citation-list {
  padding-left: 0;
  list-style: none;
  margin: 0;
}

.neijing-citation-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.neijing-citation-card {
  padding: 12px 14px;
  border: 1px solid var(--neijing-border);
  border-radius: 8px;
  background: var(--neijing-accent-soft);
}

.neijing-citation-quote {
  margin: 8px 0;
  padding-left: 12px;
  border-left: 3px solid var(--neijing-accent);
  font-size: 15px;
  line-height: 1.65;
  color: var(--neijing-ink);
}

.neijing-citation-source {
  margin: 0;
  font-size: 13px;
}

.neijing-citation-source a {
  color: var(--neijing-accent);
  text-decoration: none;
}

.neijing-citation-source a:hover {
  text-decoration: underline;
}

.neijing-citation-tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 6px;
  background: #f0f0f0;
  border-radius: 4px;
  margin-right: 6px;
}

@media (max-width: 800px) {
  .neijing-page-hero {
    padding: 14px 12px;
  }

  .neijing-catalog-grid {
    grid-template-columns: 1fr;
  }

  .neijing-hub-links {
    grid-template-columns: 1fr;
  }

  .neijing-acupoint-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .neijing-filter-input {
    max-width: none;
  }

  .neijing-reader-layout {
    grid-template-columns: 1fr;
  }

  .neijing-reader-workspace {
    order: 1;
  }

  .neijing-reader-nav {
    order: 2;
  }

  .neijing-reader-search {
    max-width: none;
  }

  .neijing-reader-split {
    grid-template-columns: 1fr;
  }

  .neijing-page-pager {
    width: 100%;
    justify-content: space-between;
  }

  .neijing-reader-facsimile-col {
    position: static;
    top: auto;
  }

  .neijing-reader-page .neijing-reader-text-col {
    padding: 12px 10px 20px;
  }

  .neijing-reader-page .neijing-reader-header {
    padding: 12px;
  }

  .neijing-reader-page .neijing-reader-header-aside {
    width: 100%;
    justify-content: flex-start;
  }

  .neijing-facsimile-stage img {
    max-height: 50vh;
  }
}
