/* Literary paper theme, adapted from blog-front. */
:root {
  --bg: #faf7f2;
  --surface: #f3ede3;
  --text: #2c2620;
  --text-soft: #5a4f44;
  --text-muted: #948776;
  --accent: #8b3a3a;
  --border: #e5dcce;
}

body.theme-dark {
  --bg: #1a1714;
  --surface: #251f1a;
  --text: #e8ddc9;
  --text-soft: #b8ab94;
  --text-muted: #7d7060;
  --accent: #d4a574;
  --border: #2e2620;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Serif SC", "Songti SC", STSong, "Source Han Serif SC", SimSun, serif;
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background-size .3s ease;
}

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.sans {
  font-family: "Noto Sans SC", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1;
}
.theme-toggle::before { content: "☾"; }
body.theme-dark .theme-toggle::before { content: "☀"; }
.theme-toggle:hover {
  color: var(--accent);
  transform: rotate(20deg);
}

.site-header {
  text-align: center;
  padding: 80px 0 40px;
}
.site-title {
  font-size: 36px;
  font-weight: 500;
  margin: 0 0 12px;
  letter-spacing: .4em;
  padding-left: .4em;
}
.site-title a:hover { color: var(--accent); }
.tagline {
  color: var(--text-soft);
  font-size: 14px;
  letter-spacing: .15em;
  margin: 0;
}
.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 28px;
  margin: 36px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.site-nav a {
  color: var(--text-soft);
  font-size: 14px;
  letter-spacing: .1em;
  padding: 4px 0;
  position: relative;
}
.site-nav a:hover,
.site-nav a.active { color: var(--accent); }
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 16px;
  height: 1px;
  background: var(--accent);
  transform: translateX(-50%);
}

main.container { padding: 24px 24px 80px; }

.site-footer {
  text-align: center;
  padding: 50px 24px;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: .1em;
  border-top: 1px solid var(--border);
}
.site-footer a {
  color: var(--text-soft);
  margin: 0 10px;
}
.site-footer a:hover { color: var(--accent); }
.copyright { margin-top: 12px; }

.meta {
  font-family: "Noto Sans SC", "PingFang SC", -apple-system, sans-serif;
  font-size: 12px;
  letter-spacing: .15em;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.meta .cat {
  color: var(--accent);
  font-weight: 500;
}
.meta .date::before {
  content: "·";
  margin-right: 16px;
  color: var(--text-muted);
}

.feed-item {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}
.feed-item:last-child { border-bottom: none; }
.feed-item.post h2 {
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 18px;
  line-height: 1.45;
  letter-spacing: .03em;
}
.feed-item.post h2 a,
.posts h3 a,
.cat-card h3 a {
  color: var(--text);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
}
.feed-item.post h2 a:hover,
.posts h3 a:hover,
.cat-card h3 a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}
.excerpt {
  color: var(--text-soft);
  margin: 0;
}
.excerpt p { margin: 0; text-indent: 2em; }
.read-more,
.more {
  display: inline-block;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: .1em;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}
.read-more::after,
.more::after {
  content: " ->";
  transition: margin-left .25s ease;
  display: inline-block;
}
.read-more:hover,
.more:hover { color: var(--accent); }
.read-more:hover::after,
.more:hover::after { margin-left: 4px; }

.cover {
  display: block;
  margin: 0 0 22px;
  background: var(--surface);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 7;
}
.cover img,
.thought-image img,
.figure img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(.78) brightness(.97);
}
body.theme-dark .cover img,
body.theme-dark .thought-image img,
body.theme-dark .figure img {
  filter: saturate(.78) brightness(.85);
}

.feed-item.note {
  text-align: center;
  padding: 32px 0;
}
.note-body {
  font-size: 19px;
  color: var(--text-soft);
  font-style: italic;
  margin: 0 auto;
  max-width: 32em;
  line-height: 1.8;
  white-space: pre-wrap;
}
.note-body::before,
.note-body::after {
  color: var(--text-muted);
  font-size: 28px;
  line-height: 1;
  opacity: .5;
  font-style: normal;
}
.note-body::before { content: "「"; margin-right: 4px; }
.note-body::after { content: "」"; margin-left: 4px; }
.feed-item.note .meta {
  justify-content: center;
  margin-top: 14px;
  margin-bottom: 0;
}

.page-head {
  text-align: center;
  margin-bottom: 28px;
}
.page-head h2 {
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 10px;
  letter-spacing: .3em;
  padding-left: .3em;
}
.page-sub {
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: .15em;
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}
.crumbs {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px;
  letter-spacing: .15em;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 18px;
}
.crumbs a { color: var(--text-soft); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { margin: 0 8px; }

.category-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 0 0 28px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13px;
  letter-spacing: .1em;
}
.category-strip a {
  color: var(--text-soft);
  padding: 4px 0;
}
.category-strip a:hover,
.category-strip a.active {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

.posts {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
}
.posts > li {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.posts > li:last-child { border-bottom: none; }
.posts h3 {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 10px;
  line-height: 1.5;
  letter-spacing: .03em;
}
.posts .excerpt {
  text-indent: 2em;
  font-size: 15.5px;
  line-height: 1.8;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 42px 0 0;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 13px;
  letter-spacing: .12em;
}
.page-btn {
  border: 1px solid var(--border);
  color: var(--text-soft);
  min-width: 72px;
  padding: 6px 14px;
  text-align: center;
}
.page-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.page-btn.disabled {
  color: var(--text-muted);
  opacity: .45;
  pointer-events: none;
}
.page-status {
  color: var(--text-muted);
}

.post-head {
  text-align: center;
  margin: 0 0 36px;
}
.post-head .meta {
  display: inline-flex;
  justify-content: center;
  letter-spacing: .2em;
  margin-bottom: 16px;
}
.post-head h2 {
  font-size: 32px;
  font-weight: 500;
  margin: 0 0 14px;
  line-height: 1.45;
  letter-spacing: .04em;
}
.post-head .sub {
  color: var(--text-soft);
  font-size: 15px;
  font-style: italic;
  margin: 0;
}
.ornament {
  display: block;
  text-align: center;
  margin: 22px auto 0;
  color: var(--text-muted);
  letter-spacing: 1em;
  padding-left: 1em;
  font-size: 12px;
}

.post-body p {
  margin: 0 0 1.1em;
  text-indent: 2em;
}
.post-body p:first-child::first-letter,
.bio p:first-child::first-letter {
  font-size: 1.4em;
  color: var(--accent);
}
.post-body h1,
.post-body h2,
.post-body h3 {
  font-size: 22px;
  font-weight: 500;
  margin: 2em 0 .8em;
  letter-spacing: .08em;
  text-align: center;
}
.post-body blockquote {
  margin: 1.4em 0;
  padding: 0 0 0 18px;
  border-left: 2px solid var(--accent);
  color: var(--text-soft);
  font-style: italic;
}
.post-body blockquote p {
  text-indent: 0;
  margin: 0 0 .6em;
}
.post-body a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
}
.post-body a:hover { color: var(--accent); }
.post-body code {
  font-family: "JetBrains Mono", "Source Code Pro", "PingFang SC", monospace;
  font-size: 14px;
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--accent);
}
.post-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  margin: 1.4em 0;
}
.post-body pre code {
  background: none;
  padding: 0;
  color: var(--text);
}
.post-body ul,
.post-body ol {
  padding-left: 1.5em;
  margin: 0 0 1.1em;
  color: var(--text-soft);
}
.post-body hr {
  border: none;
  text-align: center;
  margin: 2.4em 0;
}
.post-body hr::after {
  content: ". . .";
  color: var(--text-muted);
  letter-spacing: .4em;
  font-size: 14px;
}
.post-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.6em auto .6em;
  filter: saturate(.78);
}
.tags {
  margin: 40px 0 0;
  text-align: center;
  font-family: "Noto Sans SC", sans-serif;
}
.tags a {
  display: inline-block;
  margin: 0 4px 6px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-soft);
  letter-spacing: .08em;
}
.tags a:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.post-end {
  text-align: center;
  margin: 48px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: .2em;
  font-family: "Noto Sans SC", sans-serif;
}
.post-end::before,
.post-end::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--border);
  vertical-align: middle;
  margin: 0 14px;
}

.notes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.thought-row {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  align-items: start;
}
.thought-row:last-child { border-bottom: none; }
.day {
  text-align: right;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  color: var(--text-muted);
  padding-top: 6px;
  border-right: 1px solid var(--border);
  padding-right: 16px;
  margin-right: -8px;
}
.day .d {
  display: block;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 22px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
  font-weight: 500;
}
.day .w {
  font-size: 11px;
  letter-spacing: .1em;
}
.thought-row .body {
  font-size: 17.5px;
  line-height: 1.85;
  color: var(--text);
  white-space: pre-wrap;
  margin: 0;
}
.thought-row .body::before { content: "「"; color: var(--text-muted); margin-right: 2px; }
.thought-row .body::after { content: "」"; color: var(--text-muted); margin-left: 2px; }
.thought-row.long .body {
  font-size: 16px;
  color: var(--text-soft);
}
.thought-row .meta {
  margin-top: 10px;
  margin-bottom: 0;
  width: 100%;
}
.like-container {
  display: inline-block;
  position: relative;
}
.thought-like {
  margin-left: auto;
}
.like-summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  min-height: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  transition: color .2s ease;
}
.like-summary::marker { content: ""; }
.like-summary::-webkit-details-marker { display: none; }
.like-summary:hover {
  color: var(--accent);
  background: var(--surface);
}
.like-request {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  background-repeat: no-repeat;
}
.heart-icon-wrapper {
  position: relative;
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}
.heart-outline,
.heart-filled {
  position: absolute;
  left: 0;
  top: 0;
  width: 15px;
  height: 15px;
  overflow: visible;
  transition: transform .2s ease, opacity .2s ease;
}
.heart-outline {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.heart-filled {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(.72);
}
.like-count .count-incremented {
  display: none;
}
.like-container[open] .like-summary {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  pointer-events: none;
  cursor: default;
}
.like-container[open] .like-request {
  background-image: var(--like-url);
}
.like-container[open] .heart-outline {
  opacity: 0;
  transform: scale(.5);
}
.like-container[open] .heart-filled {
  opacity: 1;
  transform: scale(1);
}
.like-container[open] .count-default {
  display: none;
}
.like-container[open] .count-incremented {
  display: inline-block;
  animation: like-bounce .4s ease;
}
@keyframes like-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.thought-image {
  margin-top: 14px;
  background: var(--surface);
  aspect-ratio: 16 / 8;
  overflow: hidden;
}

.cat-card {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.cat-card:last-child { border-bottom: none; }
.cat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.cat-card h3 {
  font-size: 28px;
  font-weight: 500;
  margin: 0;
  letter-spacing: .18em;
  padding-left: .18em;
}
.cat-count {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--accent);
  white-space: nowrap;
}
.cat-desc {
  color: var(--text-soft);
  margin: 0 0 18px;
  text-indent: 2em;
}
.recent {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px dashed var(--border);
}
.recent li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 15.5px;
}
.recent li:last-child { border-bottom: none; }
.recent a {
  color: var(--text);
  flex: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent a::before {
  content: ".";
  color: var(--text-muted);
  flex-shrink: 0;
}
.recent a:hover { color: var(--accent); }
.recent time,
.recent-date {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: .05em;
  white-space: nowrap;
}

.seal {
  width: 72px;
  height: 72px;
  margin: 0 auto 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--bg);
  font-size: 36px;
  font-weight: 500;
  box-shadow: 0 0 0 1px var(--bg), 0 0 0 2px var(--accent);
  transform: rotate(-2deg);
}
.bio p {
  color: var(--text);
  margin: 0 0 1.2em;
  text-indent: 2em;
}
.bio em {
  font-style: normal;
  color: var(--accent);
  font-weight: 500;
}
.bio strong {
  font-weight: 600;
  border-bottom: 1px solid var(--accent);
}
.bio > h3,
.about-block,
.block {
  margin: 36px 0;
}
.bio > h3,
.about-block h3,
.block h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--accent);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .4em;
  margin: 0 0 16px;
  padding-left: .4em;
}
.bio > h3 {
  margin: 36px 0 16px;
}
.bio > h3::before,
.bio > h3::after,
.about-block h3::before,
.about-block h3::after,
.block h3::before,
.block h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.about-block p,
.block p {
  color: var(--text-soft);
  margin: 0 0 1em;
  text-indent: 2em;
}
.bio > ul,
.about-book-list,
.book-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bio > ul li,
.about-book-list li,
.book-list li {
  border-bottom: 1px dashed var(--border);
  color: var(--text-soft);
  padding: 8px 0 8px 24px;
  position: relative;
}
.bio > ul li:last-child,
.about-book-list li:last-child,
.book-list li:last-child {
  border-bottom: none;
}
.bio > ul li::before,
.about-book-list li::before,
.book-list li::before {
  content: "·";
  color: var(--accent);
  font-size: 18px;
  left: 4px;
  line-height: 1;
  opacity: .7;
  position: absolute;
  top: 14px;
}
.bio > ul em,
.about-book-list .author,
.book-list .author {
  color: var(--text-muted);
  font-size: 14px;
  font-style: normal;
  margin-left: 8px;
}
.bio > hr,
.rule {
  border: none;
  text-align: center;
  margin: 48px 0;
  position: relative;
}
.bio > hr::before,
.rule::before {
  content: "*";
  color: var(--text-muted);
  font-size: 18px;
  background: var(--bg);
  padding: 0 18px;
  position: relative;
  z-index: 1;
}
.bio > hr::after,
.rule::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}
.signature {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
  margin-top: 56px;
  padding-top: 28px;
  text-align: right;
}
.signature .name {
  color: var(--accent);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 18px;
  font-style: normal;
  margin-left: 6px;
}

.not-found {
  text-align: center;
  padding: 32px 0 80px;
}
.not-found-number {
  font-size: clamp(7rem, 22vw, 14rem);
  font-weight: 500;
  line-height: 1;
  color: var(--border);
  letter-spacing: -.05em;
}
.not-found h2 {
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 16px;
  letter-spacing: .18em;
  padding-left: .18em;
}
.not-found p {
  color: var(--text-soft);
  margin: 0 auto 32px;
  max-width: 24em;
}
.button-link {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13px;
  letter-spacing: .1em;
}
.button-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.empty {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 14px;
  letter-spacing: .12em;
}

@media (max-width: 640px) {
  .site-header { padding: 56px 0 24px; }
  .site-title { font-size: 28px; letter-spacing: .3em; padding-left: .3em; }
  body { font-size: 16px; line-height: 1.8; }
  .feed-item { padding: 28px 0; }
  .feed-item.post h2 { font-size: 21px; }
  .note-body { font-size: 17px; }
  .site-nav { gap: 4px 18px; }
  .theme-toggle { top: 14px; right: 14px; }
  .post-head h2 { font-size: 24px; }
  .posts h3 { font-size: 19px; }
  .thought-row { grid-template-columns: 48px 1fr; gap: 16px; padding: 22px 0; }
  .day .d { font-size: 18px; }
  .thought-row .body { font-size: 16px; }
  .cat-card { padding: 28px 0; }
  .cat-card h3 { font-size: 22px; }
  .seal { width: 60px; height: 60px; font-size: 30px; margin-bottom: 28px; }
}
