/* 水墨宋韵共享基础：纸、墨、青黛、朱砂、旧金。页面主题仍可在各自样式中细化。 */
:root {
  --hy-paper: #f4efe3;
  --hy-paper-deep: #e9dfce;
  --hy-ink: #26312e;
  --hy-ink-soft: #53615b;
  --hy-celadon: #6f887c;
  --hy-celadon-deep: #3f6258;
  --hy-cinnabar: #a44d3f;
  --hy-gold: #b4935a;
  --hy-line: rgba(58, 67, 61, .22);
  --hy-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --hy-kai: "Kaiti SC", "STKaiti", "KaiTi", var(--hy-serif);
  --hy-sans: "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.hy-ink-theme {
  color: var(--hy-ink);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(111, 136, 124, .12), transparent 34rem),
    radial-gradient(ellipse at 92% 12%, rgba(164, 77, 63, .07), transparent 28rem),
    linear-gradient(115deg, rgba(255,255,255,.34), transparent 32%, rgba(190,172,140,.08) 78%, transparent),
    var(--hy-paper);
  font-family: var(--hy-sans);
}

body.hy-ink-theme::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: .16;
  background-image: radial-gradient(rgba(38,49,46,.28) .45px, transparent .55px);
  background-size: 7px 7px;
  mask-image: linear-gradient(120deg, transparent, #000 22%, transparent 84%);
}

.hy-ink-theme :where(h1, h2, h3, h4, .brand, .site-title, .hero-title) {
  font-family: var(--hy-serif);
  font-weight: 500;
  letter-spacing: .035em;
}

.hy-ink-theme :where(.eyebrow, .label, .meta, small, .hint, .subtitle) {
  letter-spacing: .08em;
}

.hy-ink-theme :where(a) {
  color: var(--hy-celadon-deep);
  text-underline-offset: .22em;
}

.hy-ink-theme :where(button, input, select, textarea) {
  font-family: var(--hy-sans);
  border-radius: 13px 7px 15px 9px;
}

.hy-ink-theme :where(button) {
  color: var(--hy-paper);
  background: var(--hy-celadon-deep);
  border: 1px solid rgba(42, 69, 61, .5);
  box-shadow: 0 7px 18px rgba(48, 61, 54, .13), inset 0 1px rgba(255,255,255,.16);
}

.hy-ink-theme :where(button:hover) {
  background: var(--hy-cinnabar);
  border-color: var(--hy-cinnabar);
}

.hy-ink-theme :where(input, select, textarea) {
  color: var(--hy-ink);
  background: rgba(255, 252, 244, .72);
  border: 1px solid var(--hy-line);
  box-shadow: inset 0 1px 2px rgba(48, 45, 36, .04);
}

.hy-ink-theme :where(input, select, textarea):focus-visible,
.hy-ink-theme :where(a, button):focus-visible {
  outline: 2px solid var(--hy-cinnabar);
  outline-offset: 3px;
}

.hy-ink-theme :where(.card, .panel, .module, .tool-card, .directory-link, .notice, .dialog, dialog) {
  border-color: var(--hy-line);
  border-radius: 22px 9px 19px 11px;
  box-shadow: 0 18px 44px rgba(53, 58, 49, .09);
}

.hy-ink-theme :where(.section-head, .panel-heading, .editor-head) {
  border-bottom-color: var(--hy-line);
}

.hy-ink-theme :where(.brand-mark, .brand-seal, .mark) {
  background: var(--hy-cinnabar);
  border-radius: 11px 4px 12px 6px;
  box-shadow: 3px 4px 0 rgba(63, 98, 88, .12);
}

@media (prefers-reduced-motion: reduce) {
  .hy-ink-theme *, .hy-ink-theme *::before, .hy-ink-theme *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
