:root {
  --ink: #262c28;
  --muted: #53645a;
  --line: #d9e2da;
  --paper: #fcfdfb;
  --accent: #265846;
  --pale: #e9f1e9;
  --serif: "Noto Serif CJK SC", "Songti SC", SimSun, Georgia, serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.7 "Inter", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
button, input, textarea { font: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .brand { font-family: var(--serif); }
h1, h2, h3 { overflow-wrap: anywhere; }
.shell { width: min(100% - 3rem, 65rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.bar, .bar nav, .footer, .heading, .section-head {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.bar { min-height: 4.45rem; justify-content: space-between; }
.bar nav a, .brand, .footer a { text-decoration: none; }
.bar nav a:hover, .footer a:hover { text-decoration: underline; }
.nav-home, .link { font-size: .9rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-size: 1.28rem; font-weight: 700; }
.book {
  display: inline-block;
  width: .83rem;
  height: 1.05rem;
  border: 1.5px solid var(--accent);
  border-radius: 2px;
  background: linear-gradient(90deg, transparent 27%, var(--accent) 28%, var(--accent) 38%, transparent 39%);
}
.button {
  display: inline-block;
  justify-self: start;
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
  border-radius: .42rem;
  padding: .55rem .95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.button:hover { background: #1d4838; text-decoration: none; }
.button.small { font-size: .9rem; padding: .36rem .75rem; }
.button.secondary { background: transparent; color: var(--accent); border-color: #9bb5a6; }
.button.secondary:hover { background: var(--pale); }
.link { border: 0; background: none; padding: .35rem 0; color: var(--accent); cursor: pointer; }
.link:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid #357d62; outline-offset: 3px; }
.masthead {
  min-height: 17rem;
  isolation: isolate;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-top: 2.25rem;
  padding: clamp(1.6rem, 6vw, 4.4rem);
  background: linear-gradient(112deg, #edf4ea 10%, #e0ece2 100%);
  border: 1px solid #d9e6db;
  border-radius: .8rem;
}
.masthead h1 { font-size: clamp(3.15rem, 8vw, 5.7rem); line-height: 1.12; letter-spacing: -.085em; }
.period { color: #53816b; margin-left: .12em; }
.masthead p { margin-top: .8rem; color: #40564a; }
.paper-art { z-index: -1; pointer-events: none; position: absolute; width: 36%; min-width: 9rem; height: 75%; bottom: -11%; right: 11%; }
.paper-art i {
  position: absolute;
  inset: 0;
  border-radius: .8rem;
  border: 1px solid #82a494;
  opacity: .58;
  background: repeating-linear-gradient(0deg, transparent 0 1.3rem, #b8cdbf 1.3rem calc(1.3rem + 1px)), #e7f1e7;
  transform: rotate(-14deg);
}
.paper-art i:nth-child(2) { transform: translate(1.8rem, -1.35rem) rotate(-6deg); }
.paper-art i:nth-child(3) { transform: translate(3.6rem, -2.4rem) rotate(2deg); }
.journal { max-width: 53rem; margin: clamp(2.2rem, 5vw, 4.1rem) auto 5.5rem; }
.section-head {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: .8rem;
}
.section-head h2 { font-size: 1.45rem; }
.section-head span, time, .muted, .footer { color: var(--muted); }
.section-head span, time, .private { font-size: .875rem; }
.entry { display: grid; grid-template-columns: 7.25rem minmax(0, 1fr); padding: 1.45rem 0; border-bottom: 1px solid var(--line); }
.entry time { padding-top: .18rem; font-variant-numeric: tabular-nums; }
.entry h3 { font-size: clamp(1.15rem, 3vw, 1.5rem); }
.entry h3 a { color: var(--ink); text-decoration: none; }
.entry h3 a:hover { color: var(--accent); text-decoration: underline; }
.entry p { margin-top: .35rem; color: var(--muted); overflow-wrap: anywhere; }
.private { display: inline-block; margin-left: .65rem; color: #365a48; background: var(--pale); border-radius: .3rem; padding: 0 .4rem; font-family: system-ui, sans-serif; vertical-align: middle; }
.empty { padding: 2rem 0; color: var(--muted); }
.empty .button, .pagination { margin-top: .9rem; }
.pagination { display: flex; gap: .7rem; }
.footer { min-height: 5.5rem; justify-content: space-between; border-top: 1px solid var(--line); font-size: .9rem; }
.footer a { color: var(--ink); font-weight: 600; }
.narrow { width: min(100%, 26rem); }
.panel, .full-post { margin: clamp(2rem, 7vw, 5.5rem) auto; }
.panel { padding: clamp(1.15rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: .8rem; background: white; }
.panel h1 { font-size: 1.85rem; }
.panel > .button { margin-top: 1rem; }
.editor, .full-post { max-width: 48rem; }
.heading { justify-content: space-between; }
.stack, .stack label { display: grid; gap: .4rem; }
.stack { gap: 1.1rem; margin-top: 1.25rem; }
input:not([type="checkbox"]), textarea {
  width: 100%;
  color: var(--ink);
  border: 1px solid #acbdb3;
  background: var(--paper);
  border-radius: .35rem;
  padding: .55rem .65rem;
}
textarea { resize: vertical; }
.stack label.checkbox { display: flex; align-items: center; gap: .5rem; }
.checkbox input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; }
.error { margin-top: .75rem; color: #932521; }
.full-post h1 { font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.27; margin: .95rem 0 1.55rem; }
.prose { overflow-wrap: anywhere; }
.prose > * { margin-block: .95em; }
.prose pre { overflow: auto; padding: 1rem; background: var(--pale); border-radius: .4rem; }
.prose blockquote { border-left: 3px solid #9bb5a6; padding-left: 1rem; margin-left: 0; color: var(--muted); }
.prose img { max-width: 100%; height: auto; }
@media (max-width: 36rem) {
  .shell { width: calc(100% - 2rem); }
  .bar nav { gap: .75rem; }
  .masthead { margin-top: 1.4rem; min-height: 12rem; }
  .paper-art { right: 0; opacity: .53; }
  .entry { grid-template-columns: 1fr; gap: .25rem; padding: 1.1rem 0; }
}
