:root {
  --ink: #1a241c;
  --muted: #4f5f53;
  --leaf: #1e4a36;
  --line: rgba(26, 36, 28, 0.12);
  --soft: rgba(244, 247, 242, 0.92);
  --panel: rgba(255, 255, 255, 0.9);
  --white: #ffffff;
  --display: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  background-color: #e8efe4;
}

/* Full-site anime background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    url("/images/bg-anime.png") center center / cover no-repeat fixed;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(247, 250, 245, 0.78) 0%, rgba(238, 243, 234, 0.86) 55%, rgba(232, 239, 228, 0.9) 100%);
}

a { color: inherit; }

.app,
.shell {
  width: min(880px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 24px 0 40px;
}

body.has-fixed-header .app,
body.has-fixed-header .shell {
  padding-top: 0;
}

#site-header {
  position: sticky;
  top: 12px;
  z-index: 50;
  padding-top: 12px;
  margin-bottom: 8px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(26, 36, 28, 0.06);
}

.header.is-fixed {
  width: 100%;
}

.logo {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  color: var(--leaf);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
}

.nav a:hover {
  color: var(--ink);
  background: rgba(30, 74, 54, 0.08);
}

.nav a.is-active {
  color: var(--white);
  background: var(--leaf);
}

/* Views */
.main {
  flex: 1;
  padding: 28px 0;
}

.view[hidden] {
  display: none !important;
}

.view.is-active {
  display: block;
}

/* Home */
.home-panel {
  max-width: 560px;
  margin-top: 28px;
  padding: 36px 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--leaf);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(52px, 11vw, 76px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--leaf);
}

.headline {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(24px, 4.2vw, 34px);
  font-weight: 600;
  line-height: 1.35;
}

.lede {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 32em;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--leaf);
  color: var(--white);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

.btn:hover { filter: brightness(1.06); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--leaf);
  border: 1px solid rgba(30, 74, 54, 0.3);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.95);
  filter: none;
}

/* Inner pages */
.page-head {
  margin-bottom: 22px;
  padding: 22px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.page-head h1 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
}

.page-head p {
  margin: 0;
  color: var(--muted);
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1.45fr 0.9fr;
  gap: 20px;
  align-items: start;
}

.about-text {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.about-text p {
  margin: 0 0 14px;
  color: var(--muted);
}

.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--ink); }

.about-side {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  backdrop-filter: blur(10px);
}

.side-label {
  margin: 0;
  color: var(--leaf);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.side-name {
  margin: 8px 0 12px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
}

.side-meta {
  margin: 4px 0;
  color: var(--muted);
  font-size: 14px;
}

/* Path / Posts */
.path-list,
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.path-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.path-list li:last-child,
.post-list li:last-child {
  border-bottom: 0;
}

.num {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--leaf);
  padding-top: 2px;
}

.path-list h2,
.post-list h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.4;
}

.path-list h2 { font-size: 22px; }
.post-list h2 { font-size: 20px; }

.path-list p,
.post-list p {
  margin: 0;
  color: var(--muted);
}

.post-list li { border-bottom: 1px solid var(--line); }

.post-list a {
  display: block;
  padding: 22px 24px;
  text-decoration: none;
}

.post-list a:hover { background: rgba(244, 247, 242, 0.7); }

.post-list time {
  display: block;
  margin-bottom: 6px;
  color: var(--leaf);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.post-list p { font-size: 15px; }

/* Footer */
.footer {
  margin-top: auto;
  padding: 18px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.footer p { margin: 6px 0; }
.footer strong {
  font-family: var(--display);
  color: var(--ink);
}
.footer a {
  color: var(--muted);
  text-decoration: none;
}
.footer a:hover {
  color: var(--leaf);
  text-decoration: underline;
}

/* Article pages — stable layout, no fly animation */
.article {
  margin-top: 20px;
  padding: 28px 28px 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.crumb {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.crumb a {
  color: var(--muted);
  text-decoration: none;
}

.crumb a:hover { color: var(--leaf); }

.article h1 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  line-height: 1.35;
}

.article-meta {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.article h2 {
  margin: 26px 0 10px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.article p {
  margin: 0 0 14px;
  color: var(--muted);
  max-width: 40em;
}

.article ul {
  margin: 0 0 16px;
  padding-left: 1.2em;
  color: var(--muted);
  max-width: 40em;
}

.article li { margin: 6px 0; }

.back {
  display: inline-block;
  margin-top: 24px;
  color: var(--leaf);
  font-weight: 600;
  text-decoration: none;
}

.back:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .app,
  .shell {
    width: calc(100% - 24px);
    padding-top: 16px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-panel {
    padding: 24px 18px;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .path-list li {
    grid-template-columns: 48px 1fr;
    padding: 18px 16px;
  }

  .post-list a,
  .article {
    padding: 18px 16px;
  }

  body::before {
    background-attachment: scroll;
  }
}
