:root {
  --night: #0b0e15;
  --night-2: #10141d;
  --night-3: #161b26;
  --rule: rgba(231, 226, 214, 0.10);
  --rule-2: rgba(231, 226, 214, 0.22);
  --xuan: #e7e2d6;
  --xuan-dim: #9b968a;
  --zhusha: #d4655a;
  --zhusha-deep: #a8342c;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "楷体", "Noto Serif CJK SC", serif;
  --song: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif;
  --hei: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --shell: 1040px;
  --rail: 262px;
  --gap: 46px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--xuan);
  font-family: var(--song);
  font-size: 17px;
  line-height: 1.95;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--zhusha); text-decoration: none; }
a:hover { color: #e88f84; }

:focus-visible { outline: 2px solid var(--zhusha); outline-offset: 3px; }

img { max-width: 100%; height: auto; }

.skip {
  position: absolute;
  left: -9999px;
  font-family: var(--hei);
  font-size: 13px;
}

.skip:focus {
  left: 18px;
  top: 14px;
  z-index: 20;
  background: var(--night-2);
  border: 1px solid var(--zhusha);
  border-radius: 2px;
  padding: 9px 15px;
  color: var(--xuan);
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 30px;
}

.masthead {
  position: relative;
  border-bottom: 1px solid var(--rule);
  background-color: var(--night);
  background-image:
    radial-gradient(1.4px 1.4px at 8% 26%, rgba(231, 226, 214, 0.55) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 19% 62%, rgba(231, 226, 214, 0.38) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 31% 18%, rgba(231, 226, 214, 0.30) 50%, transparent 51%),
    radial-gradient(1px 1px at 43% 74%, rgba(231, 226, 214, 0.34) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 57% 34%, rgba(231, 226, 214, 0.26) 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 82%, rgba(231, 226, 214, 0.30) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 79% 22%, rgba(231, 226, 214, 0.34) 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 58%, rgba(231, 226, 214, 0.28) 50%, transparent 51%),
    radial-gradient(120% 150% at 14% 0%, rgba(212, 101, 90, 0.09) 0%, transparent 62%),
    linear-gradient(180deg, #0e1320 0%, var(--night) 100%);
}

.masthead__grid {
  display: flex;
  align-items: stretch;
  gap: 38px;
  padding-top: 28px;
}

.titie {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 20px;
}

.titie::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--zhusha-deep);
  transform-origin: top;
  animation: unroll 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.titie__text {
  writing-mode: vertical-rl;
  font-family: var(--kai);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--xuan);
  transition: color 0.25s;
}

.titie:hover .titie__text { color: #fff; }

.titie__seal {
  writing-mode: vertical-rl;
  font-family: var(--kai);
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1;
  color: #f2dcd8;
  background: var(--zhusha-deep);
  border-radius: 2px;
  padding: 5px 3px;
}

.titie--logo img { max-height: 118px; width: auto; }

.masthead__aside {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.masthead__desc {
  margin: 0;
  padding-top: 6px;
  font-family: var(--hei);
  font-size: 13.5px;
  letter-spacing: 0.2em;
  color: var(--xuan-dim);
}

.masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  padding: 11px 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.nav a {
  font-family: var(--hei);
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--xuan-dim);
  padding: 3px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav a:hover { color: var(--xuan); border-bottom-color: var(--rule-2); }
.nav a.current { color: var(--xuan); border-bottom-color: var(--zhusha); }

.search {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--rule-2);
  transition: border-color 0.2s;
}

.search:focus-within { border-bottom-color: var(--zhusha); }

.search input {
  width: 158px;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--xuan);
  font-family: var(--hei);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 5px 2px;
}

.search input::placeholder { color: var(--xuan-dim); }

.search button {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--xuan-dim);
  font-family: var(--hei);
  font-size: 13px;
  letter-spacing: 0.16em;
  padding: 5px 0 5px 12px;
  transition: color 0.2s;
}

.search button:hover { color: var(--zhusha); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail);
  gap: var(--gap);
  align-items: start;
  padding-top: 46px;
  padding-bottom: 84px;
}

.stream { min-width: 0; }

.entry {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}

.entry:first-child { border-top: 0; padding-top: 4px; }

.entry__date {
  padding-top: 7px;
  font-family: var(--hei);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--xuan-dim);
}

.entry__date .y { display: block; opacity: 0.62; }
.entry__date .md { display: block; font-size: 15px; letter-spacing: 0.02em; color: var(--xuan); }

.entry__body { min-width: 0; }

.entry__title {
  margin: 0 0 10px;
  font-family: var(--kai);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--xuan);
}

.entry__title a { color: var(--xuan); transition: color 0.2s; }
.entry__title a:hover { color: var(--zhusha); }

.meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  margin: 0 0 14px;
  padding: 0;
  font-family: var(--hei);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--xuan-dim);
}

.meta li { display: flex; align-items: center; gap: 7px; margin: 0; }
.meta a { color: var(--xuan-dim); transition: color 0.2s; }
.meta a:hover { color: var(--zhusha); }

.meta .author-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule-2);
}

.entry__excerpt {
  font-size: 15.5px;
  line-height: 1.92;
  color: var(--xuan-dim);
}

.entry__excerpt p { margin: 0 0 10px; }
.entry__excerpt p:last-child { margin-bottom: 0; }

.more {
  display: inline-block;
  margin-top: 15px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(212, 101, 90, 0.35);
  font-family: var(--hei);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--zhusha);
  transition: border-color 0.2s;
}

.more:hover { border-bottom-color: var(--zhusha); }

.rail { min-width: 0; }

.widget { margin-bottom: 40px; }

.widget-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-family: var(--hei);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--xuan);
}

.widget-title::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--zhusha-deep);
  border-radius: 1px;
}

.widget-list { list-style: none; margin: 0; padding: 0; }

.widget-list li {
  padding: 9px 0;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--xuan-dim);
}

.widget-list li:first-child { border-top: 0; padding-top: 0; }
.widget-list a { color: var(--xuan-dim); transition: color 0.2s; }
.widget-list a:hover { color: var(--zhusha); }

.archive-title {
  margin: 0 0 26px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--kai);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--xuan);
}

.sheet__kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 15px;
  font-family: var(--hei);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--xuan-dim);
}

.sheet__kicker a { color: var(--xuan-dim); }
.sheet__kicker a:hover { color: var(--zhusha); }

.sheet__title {
  margin: 0 0 20px;
  font-family: var(--kai);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.06em;
  color: var(--xuan);
}


.sheet__by {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--hei);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--xuan-dim);
}

.sheet__by .author-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule-2);
}

.sheet__by a { color: var(--xuan-dim); }
.sheet__by a:hover { color: var(--zhusha); }

.sheet__body { font-size: 17.5px; line-height: 2.05; }
.sheet__body > *:first-child { margin-top: 0; }
.sheet__body p { margin: 0 0 1.15em; }

.sheet__body h1, .sheet__body h2, .sheet__body h3, .sheet__body h4 {
  font-family: var(--kai);
  font-weight: 400;
  line-height: 1.5;
  color: var(--xuan);
}

.sheet__body h2 {
  position: relative;
  margin: 2.2em 0 0.9em;
  padding-bottom: 0.42em;
  font-size: 24px;
  letter-spacing: 0.08em;
}

.sheet__body h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 34px;
  height: 1px;
  background: var(--zhusha);
}

.sheet__body h3 { margin: 1.9em 0 0.7em; font-size: 20px; letter-spacing: 0.06em; }
.sheet__body h4 { margin: 1.6em 0 0.6em; font-size: 17.5px; letter-spacing: 0.04em; color: var(--xuan-dim); }

.sheet__body a { border-bottom: 1px solid rgba(212, 101, 90, 0.35); }
.sheet__body a:hover { border-bottom-color: var(--zhusha); }

.sheet__body ul, .sheet__body ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.sheet__body li { margin: 0.32em 0; }
.sheet__body li::marker { color: var(--zhusha); }

.sheet__body blockquote {
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 22px;
  border-left: 1px solid var(--rule-2);
  font-family: var(--kai);
  font-size: 18.5px;
  line-height: 1.9;
  color: var(--xuan-dim);
}

.sheet__body blockquote p:last-child { margin-bottom: 0; }

.sheet__body code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.87em;
  background: var(--night-3);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1px 5px;
  color: #e3c39a;
}

.sheet__body pre {
  margin: 1.5em 0;
  padding: 16px 18px;
  background: var(--night-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.75;
}

.sheet__body pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.sheet__body img {
  display: block;
  margin: 1.5em 0;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.sheet__body hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--rule); }

.sheet__body table {
  width: 100%;
  margin: 1.5em 0;
  border-collapse: collapse;
  font-family: var(--hei);
  font-size: 14.5px;
}

.sheet__body th, .sheet__body td {
  padding: 9px 13px;
  border: 1px solid var(--rule);
  text-align: left;
}

.sheet__body th { background: var(--night-2); font-weight: 600; color: var(--xuan); }

.tags {
  margin: 38px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-family: var(--hei);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--xuan-dim);
}

.tags a {
  padding-bottom: 1px;
  border-bottom: 1px solid var(--rule-2);
  color: var(--xuan-dim);
}

.tags a:hover { color: var(--zhusha); }

.post-near {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 26px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--rule);
  font-family: var(--hei);
  font-size: 13px;
  color: var(--xuan-dim);
}

.post-near li:last-child { text-align: right; }
.post-near a { color: var(--xuan); }
.post-near a:hover { color: var(--zhusha); }

#comments {
  margin-top: 58px;
  padding-top: 34px;
  border-top: 1px solid var(--rule);
}

#comments h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  font-family: var(--hei);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--xuan);
}

#comments h3::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--zhusha-deep);
  border-radius: 1px;
}

.comment-list, .comment-list ol { list-style: none; margin: 0; padding: 0; }

.comment-list li {
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}

.comment-list > li:first-child { border-top: 0; padding-top: 0; }

.comment-list ol {
  margin-top: 4px;
  padding-left: 20px;
  border-left: 1px solid var(--rule);
}

.comment-author { display: block; margin-bottom: 3px; }

.comment-author cite {
  font-family: var(--song);
  font-size: 15px;
  font-style: normal;
  font-weight: 700;
  color: var(--xuan);
}

.comment-author .avatar {
  float: left;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 50%;
  border: 1px solid var(--rule-2);
}

.comment-meta { font-family: var(--hei); font-size: 11.5px; color: var(--xuan-dim); }
.comment-meta a { color: var(--xuan-dim); font-size: inherit; }
.comment-meta a:hover { color: var(--zhusha); }

.comment-content {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.92;
  color: var(--xuan);
}

.comment-content p { margin: 0 0 0.7em; }
.comment-content p:last-child { margin-bottom: 0; }
.comment-at { color: var(--zhusha); }

.comment-reply { margin-top: 8px; text-align: right; }
.comment-reply a { font-family: var(--hei); font-size: 12px; letter-spacing: 0.1em; color: var(--zhusha); }

.comment-list .respond { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--rule); }

#respond { margin-top: 38px; }

.cancel-comment-reply {
  margin-bottom: 12px;
  font-family: var(--hei);
  font-size: 12px;
  text-align: right;
}

#comment-form { display: flex; flex-direction: column; gap: 16px; }
#comment-form p { margin: 0; }
#comment-form > p:first-child { font-family: var(--hei); font-size: 13px; color: var(--xuan-dim); }

#comment-form label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--hei);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--xuan-dim);
}

#comment-form .required::after { content: " *"; color: var(--zhusha); }

#comment-form input, #comment-form textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--night-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  outline: none;
  color: var(--xuan);
  font-family: var(--song);
  font-size: 15px;
  line-height: 1.8;
  transition: border-color 0.18s, box-shadow 0.18s;
}

#comment-form input:focus, #comment-form textarea:focus {
  border-color: var(--zhusha);
  box-shadow: 0 0 0 3px rgba(212, 101, 90, 0.12);
}

#comment-form textarea { min-height: 150px; resize: vertical; }

#comment-form .submit {
  align-self: flex-start;
  padding: 11px 32px;
  background: transparent;
  border: 1px solid var(--zhusha);
  border-radius: 2px;
  color: var(--zhusha);
  font-family: var(--hei);
  font-size: 13px;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

#comment-form .submit:hover { background: var(--zhusha); color: var(--night); }

.page-navigator {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 44px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--rule);
}

.page-navigator li { margin: 0; }

.page-navigator li a, .page-navigator li span {
  display: inline-block;
  min-width: 40px;
  padding: 7px 11px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  text-align: center;
  font-family: var(--hei);
  font-size: 13px;
  color: var(--xuan-dim);
  transition: color 0.2s, border-color 0.2s;
}

.page-navigator li a:hover { color: var(--zhusha); border-color: var(--zhusha); }

.page-navigator li.current a, .page-navigator li.current span {
  color: var(--xuan);
  border-color: var(--rule-2);
  background: var(--night-2);
}

.site-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 26px 0 44px;
  border-top: 1px solid var(--rule);
  font-family: var(--hei);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--xuan-dim);
}

.site-foot a { color: var(--xuan-dim); transition: color 0.2s; }
.site-foot a:hover { color: var(--zhusha); }

.error-page { padding: 40px 0 20px; }
.error-page .sheet__title { font-size: 30px; }
.error-page p { font-size: 15.5px; color: var(--xuan-dim); }

.error-page form {
  display: flex;
  gap: 12px;
  max-width: 380px;
  margin-top: 24px;
}

.error-page input[type="text"] {
  flex: 1;
  padding: 11px 14px;
  background: var(--night-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  outline: none;
  color: var(--xuan);
  font-family: var(--song);
  font-size: 15px;
}

.error-page input[type="text"]:focus { border-color: var(--zhusha); }

.error-page .submit {
  padding: 11px 24px;
  background: transparent;
  border: 1px solid var(--zhusha);
  border-radius: 2px;
  color: var(--zhusha);
  font-family: var(--hei);
  font-size: 13px;
  letter-spacing: 0.16em;
  cursor: pointer;
}

.error-page .submit:hover { background: var(--zhusha); color: var(--night); }

.stream--wide { grid-column: 1 / -1; }



@keyframes unroll {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

::selection { background: rgba(212, 101, 90, 0.3); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb { background: #242a38; border: 2px solid var(--night); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--zhusha-deep); }

@media (max-width: 1020px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .rail { margin-top: 58px; padding-top: 38px; border-top: 1px solid var(--rule); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .shell { padding: 0 18px; }
  .masthead__grid { flex-direction: column; gap: 12px; padding-top: 18px; }
  .titie { flex-direction: row; align-items: center; gap: 12px; padding: 0 0 0 14px; }
  .titie__text { writing-mode: horizontal-tb; font-size: 27px; letter-spacing: 0.16em; }
  .titie__seal { writing-mode: horizontal-tb; font-size: 10.5px; padding: 3px 5px; }
  .masthead__desc { padding-top: 0; letter-spacing: 0.14em; }
  .masthead__row { gap: 10px; padding: 9px 0; }
  .nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 14px;
    width: 100%;
  }
  .nav a { font-size: 13px; border-bottom: 0; }
  .search input { width: 104px; }
  .layout { padding-top: 30px; padding-bottom: 60px; }
  .entry { grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 24px 0; }
  .entry:first-child { padding-top: 0; }
  .entry__date { display: flex; align-items: baseline; gap: 8px; padding-top: 0; }
  .entry__date .y, .entry__date .md { display: inline; }
  .entry__date .md { font-size: 13px; }
  .entry__title { font-size: 19px; }
  .sheet__title { font-size: 26px; }
  .sheet__body { font-size: 16.5px; line-height: 2; }
  .sheet__body h2 { font-size: 21px; }
  .sheet__body h3 { font-size: 18.5px; }
  .post-near { grid-template-columns: minmax(0, 1fr); }
  .post-near li:last-child { text-align: left; }
  .site-foot { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
.masthead { overflow: hidden; }

.masthead__scene {
  position: absolute;
  left: 0;
  right: 0;
  top: 18%;
  width: 100%;
  height: 60%;
  pointer-events: none;
}

.masthead__grid {
  position: relative;
  z-index: 1;
}

.masthead__scene .ridge--far { fill: rgba(111, 134, 168, 0.14); }
.masthead__scene .ridge--mid { fill: rgba(111, 134, 168, 0.22); }
.masthead__scene .ridge--near { fill: var(--night); }

.masthead::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 44%;
  height: 96px;
  pointer-events: none;
  background: radial-gradient(46% 100% at 26% 100%, rgba(212, 101, 90, 0.11), transparent 72%);
}

.sheet__rt,
.entry__date .md,
.meta,
.sheet__kicker time { font-variant-numeric: tabular-nums; }

.entry__title,
.sheet__title,
.archive-title,
.sheet__body h1,
.sheet__body h2,
.sheet__body h3 { text-wrap: balance; }

.sheet__body p { text-wrap: pretty; }

.sheet__body h2,
.sheet__body h3 { scroll-margin-top: 30px; }

.widget--toc { position: sticky; top: 20px; }

.toc-list li { padding: 0; border-top: 0; }

.toc-list a {
  position: relative;
  display: block;
  padding: 5px 0 5px 14px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--xuan-dim);
  transition: color 0.2s;
}

.toc-list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 6px;
  height: 1px;
  background: var(--rule-2);
  transition: width 0.2s, background 0.2s;
}

.toc-list .toc-h3 a { padding-left: 26px; font-size: 13px; }

.toc-list a:hover { color: var(--zhusha); }
.toc-list a:hover::before { background: var(--zhusha); }

.toc-list a.is-current { color: var(--xuan); }
.toc-list a.is-current::before { width: 10px; background: var(--zhusha); }

.scroll-edge {
  position: fixed;
  left: 34px;
  top: 50%;
  z-index: 4;
  display: none;
  align-items: center;
  gap: 15px;
  transform: translateY(-50%);
  pointer-events: none;
}

.scroll-edge__track {
  position: relative;
  display: block;
  width: 1px;
  height: 208px;
  background: var(--rule-2);
}

.scroll-edge__fill {
  position: absolute;
  left: -0.5px;
  top: 0;
  display: block;
  width: 2px;
  height: 0;
  background: var(--zhusha);
}

.scroll-edge__label {
  display: block;
  max-height: 208px;
  overflow: hidden;
  writing-mode: vertical-rl;
  font-family: var(--kai);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--xuan-dim);
  white-space: nowrap;
}

.progress-bar {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 11;
  display: none;
  width: 0;
  height: 2px;
  background: var(--zhusha);
}

.progress-bar.is-on { display: block; }

.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 9;
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  background: rgba(16, 20, 29, 0.86);
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  color: var(--xuan-dim);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.to-top.is-on { display: grid; }
.to-top:hover { color: var(--zhusha); border-color: var(--zhusha); }

.sheet__body img.zoomable { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 5vh 5vw;
  background: rgba(6, 8, 12, 0.94);
}

.lightbox.is-open { display: grid; }

.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

.lightbox__figure img {
  max-width: 100%;
  max-height: 82vh;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
}

.lightbox__cap {
  margin-top: 14px;
  font-family: var(--hei);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--xuan-dim);
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 38px;
  height: 38px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  color: var(--xuan-dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.lightbox__close:hover { color: var(--zhusha); border-color: var(--zhusha); }

.code-wrap { position: relative; }

.code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 4px 10px;
  background: rgba(11, 14, 21, 0.88);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--xuan-dim);
  font-family: var(--hei);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, border-color 0.2s;
}

.code-wrap:hover .code-copy,
.code-copy:focus-visible { opacity: 1; }

.code-copy:hover { color: var(--zhusha); border-color: var(--zhusha); }

@media (min-width: 1260px) {
  .scroll-edge { display: flex; }
  .progress-bar.is-on { display: none; }
}

@media (max-width: 720px) {
  .masthead__scene { top: 6%; height: 78%; opacity: 0.55; }
  .masthead::after { display: none; }
  .to-top { right: 16px; bottom: 16px; width: 36px; height: 36px; }
  .lightbox__figure img { max-height: 76vh; }
}

@media print {
  .masthead__scene,
  .masthead::after,
  .masthead__row,
  .scroll-edge,
  .progress-bar,
  .to-top,
  .lightbox,
  .code-copy,
  .rail,
  #comments,
  .post-near,
  .skip { display: none !important; }

  body { background: #fff; color: #111; font-size: 11pt; line-height: 1.85; }
  .shell { max-width: none; padding: 0; }
  .layout { display: block; padding: 0; }
  .masthead { background: none; border-bottom: 1px solid #ccc; }
  .titie__text { color: #111; }
  .titie__seal { color: #fff; background: #666; }
  .titie::before { background: #666; }
  .masthead__desc,
  .sheet__kicker,
  .sheet__by,
  .tags,
  .entry__excerpt { color: #555; }
  .sheet__title,
  .sheet__body h1,
  .sheet__body h2,
  .sheet__body h3 { color: #111; }
  .sheet__body { font-size: 11pt; line-height: 1.85; }
  .sheet__body h2::after { background: #111; }
  .sheet__body a { color: #111; border-bottom: 0; }
  .sheet__body code,
  .sheet__body pre { background: #f4f4f4; border-color: #ddd; color: #111; }
  .sheet__body img { border-color: #ddd; }
  .entry { border-top-color: #ddd; }
}

.sticky-mark {
  margin-left: 8px;
  color: var(--zhusha);
  font-family: var(--hei);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.12em;
  vertical-align: 0.16em;
  white-space: nowrap;
}

.form-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.form-fields p { margin: 0; }

.form-identity {
  font-family: var(--hei);
  font-size: 13px;
  color: var(--xuan-dim);
}

.form-identity strong { color: var(--xuan); font-weight: 600; }
.form-identity a { color: var(--zhusha); }

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-hint {
  font-family: var(--hei);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--xuan-dim);
  opacity: 0.75;
}

.form-smilies { margin: 8px 0 2px; }

.form-smilies #smiliesbox {
  display: flex !important;
  flex-wrap: wrap;
  gap: 3px;
  width: auto !important;
  padding: 0;
}

.form-smilies #smiliesbox > span { line-height: 0; }

.form-smilies img {
  margin: 0 !important;
  max-width: 20px;
  border: 0;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.form-smilies img:hover { opacity: 1; }

#comment-form .submit:disabled {
  opacity: 0.5;
  cursor: default;
  background: transparent;
  color: var(--zhusha);
}

@media (max-width: 720px) {
  .form-fields { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

.book-head { margin-bottom: 26px; }

.book-crumb {
  margin: 0 0 10px;
  font-family: var(--hei);
  font-size: 12.5px;
  letter-spacing: 0.1em;
}

.book-crumb a { color: var(--xuan-dim); }
.book-crumb a:hover { color: var(--zhusha); }

.book-intro {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--xuan-dim);
}

.book-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.book-card {
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}

.book-card:first-child { border-top: 0; padding-top: 6px; }

.book-card__title {
  margin: 0 0 8px;
  font-family: var(--kai);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.book-card__title a { color: var(--xuan); }
.book-card__title a:hover { color: var(--zhusha); }

.book-card__desc {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--xuan-dim);
}

.book-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  font-family: var(--hei);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--xuan-dim);
  font-variant-numeric: tabular-nums;
}

.book-card__meta a { color: var(--xuan-dim); border-bottom: 1px solid var(--rule-2); }
.book-card__meta a:hover { color: var(--zhusha); }

.shelf-empty {
  margin: 0;
  padding: 26px 0;
  font-size: 15px;
  line-height: 1.9;
  color: var(--xuan-dim);
  border-top: 1px solid var(--rule);
}

.chapter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

.chapter-item { border-top: 1px solid var(--rule); }
.chapter-item:first-child { border-top: 0; }

.chapter-item a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  color: var(--xuan);
  transition: color 0.2s;
}

.chapter-item a:hover { color: var(--zhusha); }

.chapter-item__n {
  flex: none;
  min-width: 2.2em;
  font-family: var(--hei);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--xuan-dim);
  font-variant-numeric: tabular-nums;
}

.chapter-item__t {
  font-size: 16px;
  line-height: 1.7;
}

.chapter-nav {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.chapter-nav__links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.chapter-nav__btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 16px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--xuan);
  transition: border-color 0.2s, background 0.2s;
}

.chapter-nav__btn:hover {
  border-color: var(--zhusha);
  background: rgba(212, 101, 90, 0.06);
}

.chapter-nav__btn--next { text-align: right; align-items: flex-end; }

.chapter-nav__btn.is-disabled {
  color: var(--xuan-dim);
  opacity: 0.55;
  cursor: default;
}

.chapter-nav__btn.is-disabled:hover {
  border-color: var(--rule);
  background: transparent;
}

.chapter-nav__dir {
  font-family: var(--hei);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--zhusha);
}

.chapter-nav__btn.is-disabled .chapter-nav__dir { color: var(--xuan-dim); }

.chapter-nav__name {
  font-family: var(--kai);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.chapter-nav__back {
  margin: 14px 0 0;
  text-align: center;
  font-family: var(--hei);
  font-size: 12.5px;
  letter-spacing: 0.12em;
}

.chapter-nav__back a { color: var(--xuan-dim); }
.chapter-nav__back a:hover { color: var(--zhusha); }

.widget--booktoc .toc-list {
  max-height: 52vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

@media (max-width: 720px) {
  .chapter-nav__links { grid-template-columns: minmax(0, 1fr); }
  .chapter-nav__btn--next { text-align: left; align-items: flex-start; }
  .book-card__title { font-size: 19px; }
}
