:root {
  --bg: #fff1e5;
  --paper: #fffaf4;
  --ink: #1c1917;
  --muted: #6b5e55;
  --line: #e4d5c5;
  --accent: #9f1239;
  --gold: #b45309;
  --aside: #1c1917;
  --aside-ink: #f5e6d3;
  --header-h: 4.1rem;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 47px,
      rgba(159, 18, 57, 0.035) 47px,
      rgba(159, 18, 57, 0.035) 48px
    ),
    var(--bg);
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; }

.yb-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
}
.yb-skip:focus { left: 0.75rem; top: 0.75rem; }

.yb-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #1c1917;
  border-bottom: 3px solid #c4a35a;
}

.yb-header-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.yb-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: #f5e6d3 !important;
}
.yb-brand span {
  font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-weight: 700;
  letter-spacing: 0.28em;
  font-size: clamp(1.05rem, 2.1vw, 1.32rem);
  white-space: nowrap;
}

.yb-nav-toggle {
  margin-left: auto;
  height: 2.35rem;
  padding: 0 0.85rem 0 0.7rem;
  border: 1px solid #c4a35a;
  border-radius: 0;
  background: transparent;
  color: #f5e6d3;
  display: none;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  z-index: 60;
}
.yb-nav-toggle b {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.18em;
}
.yb-nav-toggle i {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.yb-nav-toggle i span {
  width: 14px;
  height: 2px;
  background: #c4a35a;
}

.yb-nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--max), calc(100% - 2rem));
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 51;
  pointer-events: none;
}
.yb-nav > ul {
  pointer-events: auto;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.yb-nav-item { position: relative; }
.yb-nav-parent {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.05rem;
  font-weight: 650;
  letter-spacing: 0.22em;
  cursor: default;
  color: #f5e6d3;
  border-bottom: 2px solid transparent;
}
.yb-nav-item:hover .yb-nav-parent,
.yb-nav-item:focus-within .yb-nav-parent {
  color: #c4a35a;
  border-bottom-color: #c4a35a;
  background: transparent;
}
.yb-sub {
  display: none;
  position: absolute;
  top: calc(100% + 0.15rem);
  left: 0;
  min-width: 10.5rem;
  margin: 0;
  padding: 0.2rem 0;
  list-style: none;
  background: #fffaf4;
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  box-shadow: 0 12px 24px rgba(28, 25, 23, 0.12);
}
.yb-nav-item:hover .yb-sub,
.yb-nav-item:focus-within .yb-sub { display: block; }
.yb-sub a {
  display: block;
  padding: 0.55rem 0.9rem;
  color: var(--ink);
  font-size: 0.92rem;
}
.yb-sub a:hover {
  background: #fff1e5;
  color: var(--accent);
}

.yb-wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 1.35rem auto 3rem;
}
.yb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17.5rem;
  gap: 1.75rem;
  align-items: start;
}

.yb-banner {
  margin: 0 0 0.15rem;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
}
.yb-banner img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

.yb-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 0;
}

.yb-card {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.95rem 1.05rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  box-shadow: none;
  border-radius: 0;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.yb-card:hover {
  background: #fff6ed;
  border-left-color: var(--accent);
  transform: none;
}
.yb-card-cover {
  overflow: hidden;
  background: #efe2d2;
  min-height: 4.4rem;
  height: 4.4rem;
  width: 4.4rem;
}
.yb-card-cover img {
  width: 4.4rem;
  height: 4.4rem;
  object-fit: cover;
  min-height: 4.4rem;
  filter: grayscale(0.35) contrast(1.05);
}
.yb-card:hover .yb-card-cover img { filter: none; }
.yb-card h2 {
  margin: 0 0 0.28rem;
  font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(1.02rem, 1.7vw, 1.18rem);
  line-height: 1.4;
  font-weight: 700;
}
.yb-card h2 a { color: var(--ink); }
.yb-card h2 a:hover { color: var(--accent); }
.yb-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.yb-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.yb-meta-l {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.yb-avatar {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 0;
  object-fit: cover;
  filter: grayscale(1);
}

.yb-crumb {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}
.yb-crumb a { color: var(--accent); }

.yb-pager {
  display: flex;
  justify-content: flex-start;
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--paper);
}
.yb-pager a {
  min-width: 6.5rem;
  text-align: center;
  padding: 0.85rem 1.2rem;
  background: var(--accent);
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 0.82rem;
}
.yb-pager a:hover {
  background: var(--gold);
  transform: none;
}

.yb-aside {
  position: sticky;
  top: calc(var(--header-h) + 0.8rem);
  display: grid;
  gap: 0.85rem;
}
.yb-side {
  background: var(--aside);
  color: var(--aside-ink);
  border-radius: 0;
  padding: 1rem 1rem 0.7rem;
  box-shadow: none;
  border: 0;
  border-top: 3px solid #c4a35a;
}
.yb-side h3 {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: #c4a35a;
  font-weight: 700;
}
.yb-side ul {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: n;
}
.yb-side li { border-top: 1px solid rgba(245, 230, 211, 0.12); }
.yb-side li a {
  display: flex;
  gap: 0.55rem;
  padding: 0.62rem 0;
  color: var(--aside-ink);
  font-size: 0.88rem;
}
.yb-side li a:hover { color: #c4a35a; }
.yb-side .yb-widlist a::before {
  counter-increment: n;
  content: counter(n, decimal-leading-zero);
  color: #c4a35a;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  flex: 0 0 1.5rem;
  font-size: 0.78rem;
}
.yb-topthub a {
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0;
  border: 0;
}
.yb-topthub img {
  width: 100%;
  height: 7.4rem;
  object-fit: cover;
  filter: grayscale(0.4) contrast(1.1);
}
.yb-topthub span { font-weight: 650; color: #fffaf4; }

.yb-article-card {
  background: var(--paper);
  border-radius: 0;
  padding: clamp(1.2rem, 3.4vw, 2.4rem);
  box-shadow: none;
  border: 1px solid var(--line);
}
.yb-article-card h1 {
  margin: 0 0 0.85rem;
  text-align: left;
  font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(1.4rem, 3.3vw, 2.05rem);
  line-height: 1.35;
  padding-bottom: 0.85rem;
  border-bottom: 3px double var(--accent);
}
.yb-bloginfo {
  display: flex;
  justify-content: flex-start;
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  margin-bottom: 1.4rem;
}
.yb-bloginfo ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.yb-prose {
  font-size: clamp(1rem, 1.15vw, 1.08rem);
  line-height: 1.95;
  color: #292524;
  max-width: 42rem;
}
.yb-prose img,
.yb-prose video,
.yb-prose iframe,
.yb-prose table { max-width: 100%; }
.yb-prose table { display: block; overflow-x: auto; }
.yb-copyright {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}
.yb-pagerow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.yb-pagerow a {
  display: block;
  padding: 0.85rem 1rem;
  background: #fff1e5;
  border-left: 3px solid var(--accent);
  font-size: 0.86rem;
  line-height: 1.45;
}
.yb-pagerow .next { text-align: right; border-left: 0; border-right: 3px solid var(--gold); }

.yb-footer {
  border-top: 3px solid #1c1917;
  background: #1c1917;
  padding: 1.6rem 1rem 2.4rem;
  text-align: center;
  color: #c4b5a5;
  font-size: 0.86rem;
}
.yb-footer p { margin: 0 0 0.7rem; }
.yb-footer a { color: #c4a35a; margin: 0 0.35rem; }

#go-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1.2rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}
#go-to-top::after { content: "↑"; font-size: 1.05rem; }

.yb-mask { display: none; }

@media (max-width: 980px) {
  .yb-layout { grid-template-columns: 1fr; }
  .yb-aside { position: static; }
}

@media (max-width: 768px) {
  .yb-nav-toggle { display: inline-flex; }
  .yb-nav {
    left: auto;
    right: 0;
    top: 0;
    width: min(84vw, 20rem);
    height: 100dvh;
    margin: 0;
    display: block;
    background: #fffaf4;
    box-shadow: -8px 0 28px rgba(28, 25, 23, 0.18);
    padding: 5rem 1.1rem 1.5rem;
    transform: translateX(110%);
    transition: transform 0.35s var(--ease), visibility 0.35s;
    overflow-y: auto;
    visibility: hidden;
    z-index: 55;
    pointer-events: auto;
  }
  body.nav-open .yb-nav {
    transform: translateX(0);
    visibility: visible;
  }
  .yb-nav > ul {
    flex-direction: column;
    gap: 0.2rem;
  }
  .yb-sub {
    display: block;
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 0.4rem 0.8rem;
    background: transparent;
  }
  .yb-nav-parent {
    color: var(--ink);
    border-bottom: 0;
  }
  .yb-nav-item:hover .yb-nav-parent {
    background: transparent;
    color: var(--accent);
    border-bottom-color: transparent;
  }
  .yb-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(28, 25, 23, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
    z-index: 40;
  }
  body.nav-open .yb-mask {
    opacity: 1;
    pointer-events: auto;
  }
  body.nav-open { overflow: hidden; }
  .yb-card {
    grid-template-columns: 3.6rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.8rem 0.85rem;
  }
  .yb-card-cover,
  .yb-card-cover img {
    width: 3.6rem;
    height: 3.6rem;
    min-height: 3.6rem;
  }
  .yb-pagerow { grid-template-columns: 1fr; }
  .yb-pagerow .next { text-align: left; border-right: 0; border-left: 3px solid var(--gold); }
}

@media (max-width: 420px) {
  .yb-card { grid-template-columns: 1fr; }
  .yb-card-cover,
  .yb-card-cover img {
    width: 100%;
    height: 9.5rem;
    min-height: 9.5rem;
  }
}

@media (min-width: 1440px) {
  :root { --max: 1260px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
