.page--help {
  display: flex;
  width: 100%;
  max-width: 1710px;
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(1rem, 3vh, 2.25rem) clamp(1rem, 4vw, 4.5rem);
  overflow: hidden;
}

#help-center-mount {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
}

.help-center {
  --hc-surface: var(--d4-ink-900, #0d0e0e);
  --hc-surface-raised: var(--d4-ink-850, #121313);
  --hc-surface-deep: var(--d4-ink-950, #080909);
  --hc-text: var(--d4-bone-100, #ddd5c6);
  --hc-text-muted: var(--d4-bone-300, #b9b0a2);
  --hc-text-dim: var(--d4-bone-500, #81796f);
  --hc-bronze: var(--d4-bronze-300, #b79669);
  --hc-bronze-deep: var(--d4-bronze-700, #493723);
  --hc-blood: var(--d4-blood-600, #6f1814);
  --hc-danger: var(--d4-danger, #bd5146);
  --hc-border: var(--d4-border, rgba(183, 150, 105, 0.34));
  display: grid;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: clamp(240px, 20vw, 380px) minmax(0, 1fr);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hc-border);
  border-radius: 2px;
  color: var(--hc-text);
  background:
    linear-gradient(90deg, rgba(111, 24, 20, 0.07), transparent 24rem),
    var(--hc-surface);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.02);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.6;
  box-sizing: border-box;
}

.help-center *,
.help-center *::before,
.help-center *::after {
  box-sizing: border-box;
}

.hc-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.hc-sidebar {
  display: flex;
  width: auto;
  min-width: 240px;
  max-width: 380px;
  min-height: 0;
  flex-direction: column;
  position: relative;
  z-index: 3;
  overflow: hidden;
  border-right: 1px solid var(--hc-border);
  background:
    linear-gradient(180deg, rgba(73, 55, 35, 0.15), transparent 11rem),
    var(--hc-surface-deep);
}

.hc-sidebar::after {
  width: 1px;
  position: absolute;
  top: 0;
  right: 2px;
  bottom: 0;
  content: "";
  background: rgba(183, 150, 105, 0.08);
  pointer-events: none;
}

.hc-sidebar__header {
  flex: 0 0 auto;
  padding: 1rem;
  border-bottom: 1px solid var(--hc-border);
}

.hc-sidebar__heading-row {
  display: flex;
  min-height: 2.2rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.hc-sidebar__title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--hc-bronze);
  font-family: Georgia, "Times New Roman", "Songti SC", SimSun, serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hc-tree-actions,
.hc-toolbar {
  display: flex;
  align-items: center;
}

.hc-tree-actions {
  flex: 0 0 auto;
  gap: 0.25rem;
}

.hc-icon-button {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid var(--hc-border);
  border-radius: 1px;
  color: var(--hc-text-muted);
  background: linear-gradient(180deg, rgba(31, 29, 26, 0.96), rgba(13, 14, 14, 0.98));
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.hc-icon-button:hover:not(:disabled) {
  border-color: var(--hc-bronze);
  color: #fff4df;
  background: #211a14;
}

.hc-icon-button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.hc-icon-button:focus-visible,
.hc-search input:focus-visible,
.hc-tree__row:focus-visible,
.hc-content-scroll :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--hc-bronze);
  outline-offset: 2px;
}

.hc-search {
  display: block;
  position: relative;
}

.hc-search__icon {
  width: 0.75rem;
  height: 0.75rem;
  position: absolute;
  top: 50%;
  left: 0.8rem;
  border: 1px solid var(--hc-text-dim);
  border-radius: 50%;
  transform: translateY(-62%);
  pointer-events: none;
}

.hc-search__icon::after {
  width: 0.4rem;
  height: 1px;
  position: absolute;
  right: -0.32rem;
  bottom: -0.18rem;
  content: "";
  background: var(--hc-text-dim);
  transform: rotate(45deg);
  transform-origin: left center;
}

.hc-search input {
  width: 100%;
  height: 2.65rem;
  padding: 0.5rem 0.8rem 0.5rem 2.15rem;
  border: 1px solid rgba(183, 150, 105, 0.28);
  border-radius: 1px;
  color: var(--hc-text);
  background: rgba(5, 6, 6, 0.82);
  font: inherit;
  font-size: 0.84rem;
  letter-spacing: 0;
  outline: none;
}

.hc-search input::placeholder {
  color: var(--hc-text-dim);
  opacity: 1;
}

.hc-search input:focus {
  border-color: rgba(183, 150, 105, 0.72);
  box-shadow: inset 3px 0 var(--hc-blood);
}

.hc-tree-status,
.hc-topic-status {
  display: grid;
  min-height: 3.2rem;
  place-items: center;
  padding: 0.75rem 1rem;
  color: var(--hc-text-dim);
  font-size: 0.8rem;
  text-align: center;
}

.hc-tree-status[hidden],
.hc-topic-status[hidden] {
  display: none;
}

.hc-tree-status:not([hidden])::before,
.hc-topic-status:not([hidden])::before {
  width: 1.15rem;
  height: 1.15rem;
  margin-bottom: 0.3rem;
  border: 1px solid var(--hc-bronze-deep);
  border-top-color: var(--hc-bronze);
  border-radius: 50%;
  content: "";
  animation: hc-spin 750ms linear infinite;
}

.hc-tree-status.is-error,
.hc-topic-status.is-error {
  color: var(--hc-danger);
}

.hc-tree-status.is-error::before,
.hc-topic-status.is-error::before {
  display: none;
}

.hc-tree-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding: 0.45rem 0 1.2rem;
  scrollbar-color: var(--hc-bronze-deep) var(--hc-surface-deep);
  scrollbar-width: thin;
}

.hc-tree,
.hc-tree__children {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hc-tree__children[hidden] {
  display: none;
}

.hc-tree__row {
  display: grid;
  width: 100%;
  min-height: 2.15rem;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  align-items: start;
  gap: 0.3rem;
  padding: 0.4rem 0.8rem 0.4rem calc(0.8rem + var(--hc-tree-level) * 0.85rem);
  border: 0;
  border-left: 2px solid transparent;
  color: var(--hc-text-muted);
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: start;
  cursor: pointer;
}

.hc-tree__row:hover {
  color: #f1e7d6;
  background: linear-gradient(90deg, rgba(73, 55, 35, 0.38), transparent);
}

.hc-tree__row[aria-current="page"] {
  border-left-color: var(--hc-blood);
  color: #fff0d7;
  background: linear-gradient(90deg, rgba(111, 24, 20, 0.54), rgba(111, 24, 20, 0.03));
}

.hc-tree__marker {
  display: inline-grid;
  width: 1rem;
  height: 1rem;
  place-items: center;
  margin-top: 0.05rem;
  color: var(--hc-bronze);
  font-size: 1rem;
  line-height: 1;
  transition: transform 160ms ease;
}

.hc-tree__item[aria-expanded="true"] > .hc-tree__row .hc-tree__marker {
  transform: rotate(90deg);
}

.hc-tree__marker--leaf::before {
  width: 0.35rem;
  height: 0.35rem;
  border: 1px solid var(--hc-bronze-deep);
  content: "";
  transform: rotate(45deg);
}

.hc-tree__label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hc-empty {
  margin: 1rem;
  color: var(--hc-text-dim);
  font-size: 0.82rem;
  text-align: center;
}

.hc-main {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  position: relative;
  background:
    linear-gradient(180deg, rgba(73, 55, 35, 0.1), transparent 8rem),
    var(--hc-surface);
}

.hc-toolbar {
  min-height: 4.4rem;
  flex: 0 0 auto;
  gap: 0.45rem;
  padding: 0.65rem 1.2rem;
  border-bottom: 1px solid var(--hc-border);
  background: rgba(8, 9, 9, 0.72);
}

.hc-topic-title {
  min-width: 0;
  margin: 0 0 0 0.55rem;
  overflow: hidden;
  color: var(--hc-bronze);
  font-family: Georgia, "Times New Roman", "Songti SC", SimSun, serif;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hc-topic-title:focus {
  outline: none;
}

.hc-drawer-open,
.hc-drawer-close,
.hc-drawer-backdrop {
  display: none;
}

.hc-content-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1.25rem, 4vw, 4.25rem) 4rem;
  color: var(--hc-text);
  font-size: 0.95rem;
  line-height: 1.78;
  overflow-wrap: anywhere;
  word-break: break-word;
  scrollbar-color: var(--hc-bronze-deep) var(--hc-surface);
  scrollbar-width: thin;
}

.hc-content-scroll > :first-child {
  margin-top: 0;
}

.hc-content-scroll :where(h1, h2, h3, h4, h5, h6) {
  max-width: 66rem;
  margin: 1.8em 0 0.7em;
  color: var(--hc-bronze);
  font-family: Georgia, "Times New Roman", "Songti SC", SimSun, serif;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
}

.hc-content-scroll h1 { font-size: 1.65rem; }
.hc-content-scroll h2 { font-size: 1.38rem; }
.hc-content-scroll h3 { font-size: 1.16rem; }
.hc-content-scroll :where(h4, h5, h6) { font-size: 1rem; }

.hc-content-scroll :where(p, ul, ol, dl, table, blockquote, pre) {
  max-width: 66rem;
}

.hc-content-scroll :where(p, ul, ol, dl) {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}

.hc-content-scroll :where(ul, ol) {
  padding-inline-start: 1.55rem;
}

.hc-content-scroll li + li {
  margin-top: 0.35rem;
}

.hc-content-scroll strong {
  color: #eee1ca;
  font-weight: 650;
}

.hc-content-scroll a {
  color: #d0a86f;
  text-decoration: underline;
  text-decoration-color: rgba(208, 168, 111, 0.45);
  text-underline-offset: 0.18em;
}

.hc-content-scroll a:hover {
  color: #f0c485;
  text-decoration-color: currentColor;
}

.hc-content-scroll img {
  max-width: 100%;
  height: auto;
}

.hc-content-scroll :where(
  #winchm_template_top,
  #winchm_template_navigation,
  #winchm_template_title,
  #winchm_template_container,
  #winchm_template_content
) {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  position: static !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.hc-content-scroll :where(#winchm_template_navigation, #winchm_template_title) {
  display: none !important;
}

.hc-content-scroll blockquote {
  margin-inline: 0;
  padding: 0.85rem 1rem;
  border-left: 2px solid var(--hc-blood);
  color: var(--hc-text-muted);
  background: rgba(0, 0, 0, 0.18);
}

.hc-content-scroll :where(code, pre) {
  border: 1px solid rgba(183, 150, 105, 0.2);
  border-radius: 1px;
  color: #e5d2b5;
  background: #090a0a;
  font-family: Consolas, "SFMono-Regular", monospace;
}

.hc-content-scroll code {
  padding: 0.08rem 0.3rem;
}

.hc-content-scroll pre {
  max-width: 100%;
  padding: 1rem;
  overflow: auto;
}

.hc-content-scroll table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  color: inherit;
}

.hc-content-scroll :where(th, td) {
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(183, 150, 105, 0.22);
  text-align: start;
  vertical-align: top;
}

.hc-content-scroll th {
  color: var(--hc-bronze);
  background: rgba(73, 55, 35, 0.18);
}

.hc-image {
  display: grid;
  width: fit-content;
  max-width: 100%;
  min-width: min(18rem, 100%);
  min-height: 7.5rem;
  position: relative;
  place-items: center;
  margin: 1.35rem 0;
  overflow: hidden;
  border: 1px solid rgba(183, 150, 105, 0.28);
  border-radius: 1px;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(183, 150, 105, 0.035) 48% 52%, transparent 52%),
    #090a0a;
}

.hc-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
  border: 0;
}

.hc-image[data-image-state="loaded"] {
  width: fit-content;
  min-width: 0;
  min-height: 0;
  background: transparent;
}

.hc-image[data-zoomable="true"] img { cursor: zoom-in; }
.hc-image[data-zoomable="true"]:hover { border-color: rgba(183,150,105,.72); }

.hc-image:not([data-image-state="loaded"]) img {
  visibility: hidden;
}

.hc-image__status {
  display: grid;
  width: min(18rem, calc(100% - 2rem));
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  gap: 0.6rem;
  color: var(--hc-text-dim);
  font-size: 0.76rem;
  text-align: center;
  transform: translate(-50%, -50%);
}

.hc-image__status[hidden] {
  display: none;
}

.hc-image__progress {
  display: block;
  width: 100%;
  height: 2px;
  position: relative;
  overflow: hidden;
  background: rgba(183, 150, 105, 0.16);
}

.hc-image__progress[hidden] {
  display: none;
}

.hc-image__progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--hc-blood), var(--hc-bronze));
  transition: width 100ms linear;
}

.hc-image__progress.is-indeterminate .hc-image__progress-fill {
  width: 34%;
  animation: hc-progress 1.15s ease-in-out infinite;
}

.hc-image[data-image-state="error"] {
  min-height: 5rem;
  border-color: rgba(189, 81, 70, 0.42);
}

.hc-image[data-image-state="error"] .hc-image__status {
  color: var(--hc-danger);
}

.hc-drawer-backdrop {
  margin: 0;
  padding: 0;
  border: 0;
}

@keyframes hc-spin {
  to { transform: rotate(360deg); }
}

@keyframes hc-progress {
  from { transform: translateX(-120%); }
  to { transform: translateX(310%); }
}

@media (max-width: 768px) {
  .page--help {
    width: 100%;
    max-width: 100vw;
    height: 100%;
    min-height: 0;
    padding: 0;
  }

  .help-center {
    height: 100%;
    min-height: 0;
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .hc-sidebar {
    width: 150px;
    min-width: 140px;
    max-width: 160px;
    position: relative;
    inset: auto;
    border-right-color: var(--hc-border);
    box-shadow: none;
    transform: none;
  }

  .help-center[data-drawer-open="true"] .hc-sidebar {
    transform: none;
  }

  .hc-drawer-open,
  .hc-drawer-close {
    display: none;
  }

  .hc-drawer-backdrop {
    display: none;
  }

  .help-center[data-drawer-open="true"] .hc-drawer-backdrop {
    display: none;
  }

  .hc-sidebar__header {
    padding: 8px 10px;
  }

  .hc-sidebar__heading-row {
    min-height: 1.8rem;
    gap: 0.25rem;
    margin-bottom: 4px;
  }

  .hc-sidebar__title {
    font-size: 13px;
  }

  .hc-tree-actions {
    gap: 2px;
  }

  .hc-tree-actions .hc-icon-button {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 0.9rem;
  }

  .hc-search input {
    height: 2rem;
    padding: 4px 6px 4px 1.75rem;
    font-size: 11px;
  }

  .hc-search__icon {
    left: 0.55rem;
  }

  .hc-tree-scroll {
    padding: 2px 0;
  }

  .hc-tree__row {
    min-height: 20px;
    gap: 0.1rem;
    padding: 3px 6px 3px calc(6px + var(--hc-tree-level) * 0.55rem);
    font-size: 11px;
  }

  .hc-tree__marker {
    width: 0.8rem;
    height: 0.8rem;
    font-size: 0.85rem;
  }

  .hc-toolbar {
    min-height: 3.25rem;
    gap: 4px;
    padding: 6px 10px;
  }

  .hc-topic-title {
    margin-left: 4px;
    font-size: 13px;
  }

  .hc-content-scroll {
    padding: 12px 14px;
    font-size: 13px;
  }
}

@media (max-width: 430px) {
  .hc-toolbar {
    gap: 0.3rem;
  }

  .hc-toolbar .hc-icon-button {
    width: 2.1rem;
    height: 2.1rem;
  }

  .hc-topic-title {
    font-size: 0.86rem;
  }

  .hc-image {
    min-width: 100%;
  }

  .hc-image[data-image-state="loaded"] { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .help-center *,
  .help-center *::before,
  .help-center *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .help-center {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
    border: 0;
    color: #111;
    background: #fff;
    box-shadow: none;
  }

  .hc-sidebar,
  .hc-toolbar,
  .hc-topic-status,
  .hc-drawer-backdrop,
  .hc-image__status {
    display: none !important;
  }

  .hc-main,
  .hc-content-scroll {
    display: block;
    height: auto;
    overflow: visible;
    padding: 0;
    color: #111;
    background: #fff;
  }
}
