:root {
  --bg: #f3eee4;
  --paper: #fffcf7;
  --ink: #1a1714;
  --muted: #6d655c;
  --line: #e4d9c8;
  --accent: #b42318;
  --accent-2: #143d36;
  --card: #fffaf3;
  --shadow: 0 18px 50px rgba(26, 23, 20, 0.08);
  --radius: 18px;
  --header-h: 4.25rem;
  --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:
    radial-gradient(1200px 480px at 8% -10%, #f7d9c8 0%, transparent 55%),
    radial-gradient(900px 420px at 110% 0%, #d7e7e2 0%, transparent 50%),
    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; }

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

.fy-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(243, 238, 228, 0.86);
  border-bottom: 1px solid rgba(26, 23, 20, 0.06);
}

.fy-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;
}

.fy-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
  color: var(--ink) !important;
}
.fy-brand span {
  font-weight: 750;
  letter-spacing: 0.12em;
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  white-space: nowrap;
}

.fy-nav-toggle {
  margin-left: auto;
  height: 2.4rem;
  padding: 0 0.85rem 0 0.7rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  display: none;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  z-index: 60;
}
.fy-nav-toggle b {
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.08em;
}
.fy-nav-toggle i {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.fy-nav-toggle i span {
  width: 14px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.fy-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;
}
.fy-nav > ul { pointer-events: auto; }
.fy-nav > ul {
  display: flex;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fy-nav-item {
  position: relative;
}
.fy-nav-parent {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 650;
  cursor: default;
}
.fy-nav-item:hover .fy-nav-parent,
.fy-nav-item:focus-within .fy-nav-parent {
  background: var(--ink);
  color: #fff;
}
.fy-sub {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 10.5rem;
  margin: 0;
  padding: 0.45rem;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.fy-nav-item:hover .fy-sub,
.fy-nav-item:focus-within .fy-sub {
  display: block;
}
.fy-sub a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  color: var(--ink);
}
.fy-sub a:hover {
  background: #f3e7d8;
  color: var(--accent);
}

.fy-wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 1.25rem auto 3rem;
}

.fy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18.5rem;
  gap: 1.5rem;
  align-items: start;
}

.fy-banner {
  margin: 0 0 1.1rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.fy-banner img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.fy-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.fy-card {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.9rem;
  background: var(--card);
  border: 1px solid rgba(26, 23, 20, 0.05);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.fy-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 50px rgba(26, 23, 20, 0.12);
}
.fy-card-cover {
  overflow: hidden;
  border-radius: 14px;
  background: #ece4d6;
  min-height: 7.2rem;
}
.fy-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 7.2rem;
}
.fy-card h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  line-height: 1.4;
  font-weight: 750;
}
.fy-card h2 a { color: var(--ink); }
.fy-card h2 a:hover { color: var(--accent); }
.fy-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fy-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.fy-meta-l {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.fy-avatar {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  object-fit: cover;
}

.fy-crumb {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.fy-crumb a { color: var(--accent-2); }

.fy-pager {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.4rem 0 0.2rem;
}
.fy-pager a {
  min-width: 7.2rem;
  text-align: center;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff !important;
  font-weight: 650;
  transition: transform 0.25s var(--ease), background 0.25s;
}
.fy-pager a:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.fy-aside {
  position: sticky;
  top: calc(var(--header-h) + 0.8rem);
  display: grid;
  gap: 1rem;
}

.fy-side {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1rem 1rem 0.65rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(26, 23, 20, 0.05);
}
.fy-side h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.fy-side ul {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: n;
}
.fy-side li {
  border-top: 1px solid var(--line);
}
.fy-side li a {
  display: flex;
  gap: 0.55rem;
  padding: 0.65rem 0;
  color: var(--ink);
  font-size: 0.92rem;
}
.fy-side .fy-widlist a::before {
  counter-increment: n;
  content: counter(n, decimal-leading-zero);
  color: var(--accent);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  flex: 0 0 1.6rem;
}
.fy-topthub a {
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0;
  border: 0;
}
.fy-topthub img {
  width: 100%;
  height: 8.2rem;
  object-fit: cover;
  border-radius: 12px;
}
.fy-topthub span {
  font-weight: 650;
}

.fy-article-card {
  background: var(--paper);
  border-radius: 24px;
  padding: clamp(1.1rem, 3vw, 2.1rem);
  box-shadow: var(--shadow);
}
.fy-article-card h1 {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  line-height: 1.35;
}
.fy-bloginfo {
  display: flex;
  justify-content: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.4rem;
}
.fy-bloginfo ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fy-prose {
  font-size: clamp(1rem, 1.15vw, 1.08rem);
  line-height: 1.9;
  color: #2a2622;
  max-width: 46rem;
  margin: 0 auto;
}
.fy-prose img,
.fy-prose video,
.fy-prose iframe,
.fy-prose table {
  max-width: 100%;
}
.fy-prose table { display: block; overflow-x: auto; }
.fy-copyright {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}
.fy-pagerow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.fy-pagerow a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #f6eee3;
  font-size: 0.88rem;
  line-height: 1.45;
}
.fy-pagerow .next { text-align: right; }

.fy-footer {
  border-top: 1px solid var(--line);
  background: #ece5d8;
  padding: 1.6rem 1rem 2.4rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}
.fy-footer p { margin: 0 0 0.7rem; }
.fy-footer a { color: var(--accent-2); margin: 0 0.35rem; }

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

.fy-mask {
  display: none;
}

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

@media (max-width: 768px) {
  .fy-nav-toggle { display: inline-flex; }
  .fy-nav {
    left: auto;
    right: 0;
    top: 0;
    width: min(84vw, 20rem);
    height: 100dvh;
    margin: 0;
    display: block;
    background: var(--paper);
    box-shadow: var(--shadow);
    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 .fy-nav {
    transform: translateX(0);
    visibility: visible;
  }
  .fy-nav > ul {
    flex-direction: column;
    gap: 0.2rem;
  }
  .fy-sub {
    display: block;
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 0.4rem 0.8rem;
    background: transparent;
  }
  .fy-nav-item:hover .fy-nav-parent {
    background: transparent;
    color: var(--ink);
  }
  .fy-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(26, 23, 20, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
    z-index: 40;
  }
  body.nav-open .fy-mask {
    opacity: 1;
    pointer-events: auto;
  }
  body.nav-open { overflow: hidden; }
  .fy-card {
    grid-template-columns: 6.4rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.7rem;
  }
  .fy-card-cover,
  .fy-card-cover img { min-height: 5.4rem; }
  .fy-pagerow { grid-template-columns: 1fr; }
  .fy-pagerow .next { text-align: left; }
}

@media (max-width: 420px) {
  .fy-card {
    grid-template-columns: 1fr;
  }
  .fy-card-cover img { height: 10rem; }
}

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

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