:root {
    --width: 660px;
    --font-yahei: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue",Helvetica,Arial,"PingFangSC-Regular","Hiragino Sans GB","Lantinghei SC","Microsoft Yahei","Source Han Sans CN","WenQuanYi Micro Hei",SimSun,sans-serif;
    --font-fangsong: Baskerville, "Times New Roman", "Liberation Serif", STFangsong, FangSong, FangSong_GB2312, "CWTEX\-F", serif;
    --font-songti: Georgia, "Nimbus Roman No9 L", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW\-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, serif;
    --font-scale: 1em;
    --background-color: #fff;
    --heading-color: #222;
    --text-color: #444;
    --link-color: #3273dc;
    --visited-color:  #8b6fcb;
    --code-background-color: #f2f2f2;
    --code-color: #222;
    --blockquote-color: #222;
    --gray-color: #999;
}
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #111;
        --heading-color: #eee;
        --text-color: #ddd;
        --link-color: #6ab0e5;
        --visited-color:  #8b6fcb;
        --code-background-color: #000;
        --code-color: #ddd;
        --blockquote-color: #ccc;
        --gray-color: #999;
    }
}
body {
    font-family: var(--font-yahei); /* 可替换 --font-fangsong 或 --font-songti 字体 */
    font-size: var(--font-scale);
    margin: auto;
    padding: 20px;
    max-width: var(--width);
    text-align: left;
    background-color: var(--background-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.7;
    color: var(--text-color);
}
html{scroll-behavior:smooth;}
h1,h2,h3,h4,h5,h6{color:var(--heading-color);display:inherit}
a{color:var(--link-color);cursor:pointer;text-decoration:none;border-bottom:1px solid transparent}
a:hover,nav .current{border-bottom:1px solid}
nav a{margin-right:8px}
strong,b{color:var(--heading-color)}
button{margin:0;cursor:pointer}
table{width:100%}
hr{border:0;border-top:1px dashed}
img{max-width:100%;height:auto}
time,.intro{color:var(--gray-color);}
code{font-family:monospace;padding:2px;background-color:var(--code-background-color);color:var(--code-color);border-radius:4px}
blockquote{border-left:1px solid #999;color:var(--code-color);padding-left:20px;font-style:italic}
input{border-radius:4px;border:1px solid var(--gray-color);margin:0 0 15px 0;padding:10px;width:50%}
input:focus{outline:0}
input[type="submit"]{padding:9px 10px 10px;text-align:center;width:80px;display:inline-flex;background-color:var(--heading-color);color:var(--code-background-color);border:none}
input[type="submit"]:hover{cursor:pointer;opacity:.7}
header,footer{padding:20px 0}
.title:hover{text-decoration:none;border:none}
.title h1,.title h2{font-size:1.5em}
ul.posts{list-style-type:none;padding:unset}
ul.posts li{display:flex;margin:3px 0}
ul.posts li span{flex:0 0 115px}
ul.posts li a:visited{color:var(--visited-color)}
.tags{margin-top:30px;color:var(--gray-color)}
.tags a{margin:0 5px 0 2px}

/* 保留正文中手动指定的文字颜色 */
font[color] strong,
font[color] b {
  color: inherit;
}

/* Blog archive list */
.posts li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.posts li time {
  flex: 0 0 3.5rem;
  color: #999;
}

.posts li a {
  min-width: 0;
}

/* ============================================================
   Hamburger navigation
   Desktop and mobile
   ============================================================ */


/* ------------------------------------------------------------
   Header row
   ------------------------------------------------------------ */

.site-header-row {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 2rem;
}


/* ------------------------------------------------------------
   Site title
   ------------------------------------------------------------ */

.site-title {
  margin: 0;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}


/* ------------------------------------------------------------
   Menu container
   ------------------------------------------------------------ */

.site-menu {
  position: relative;

  margin: 0;
  padding: 0;
}


/* Remove the default details arrow */

.site-menu summary {
  list-style: none;
}

.site-menu summary::-webkit-details-marker {
  display: none;
}


/* ------------------------------------------------------------
   Menu button
   ------------------------------------------------------------ */

.site-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 44px;
  height: 44px;

  margin: 0;
  padding: 0;

  cursor: pointer;
}


/* ------------------------------------------------------------
   Hamburger icon
   ------------------------------------------------------------ */

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;

  width: 24px;
  height: 2px;

  background: currentColor;

  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    background 0.2s ease;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: "";

  position: absolute;
  left: 0;
}

.menu-icon::before {
  top: -7px;
}

.menu-icon::after {
  top: 7px;
}


/* ------------------------------------------------------------
   Open state: hamburger becomes X
   ------------------------------------------------------------ */

.site-menu[open] .menu-icon {
  background: transparent;
}

.site-menu[open] .menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.site-menu[open] .menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}


/* ------------------------------------------------------------
   Menu panel
   ------------------------------------------------------------ */

.menu-panel {
  display: flex;
  flex-direction: column;

  gap: 0.75rem;
}

.menu-panel a {
  display: block;

  width: max-content;

  text-decoration: none;
}

.menu-panel a.current {
  text-decoration: underline;
}


/* ============================================================
   Desktop
   ============================================================ */

@media (min-width: 768px) {

  .menu-panel {
    position: absolute;

    top: calc(100% + 0.5rem);
    right: 0;

    min-width: 180px;

    padding: 1rem 1.25rem;

    background: var(--background-color, #fff);

    border: 1px solid rgba(0, 0, 0, 0.08);

    box-shadow:
      0 10px 30px rgba(0, 0, 0, 0.08);

    z-index: 1000;
  }

}


/* ============================================================
   Mobile
   ============================================================ */

@media (max-width: 767px) {

  .site-header-row {
    align-items: flex-start;
  }

  .site-title {
    max-width: calc(100% - 60px);
  }

  .menu-panel {
    position: absolute;

    top: calc(100% + 0.5rem);
    right: 0;

    min-width: 160px;

    padding: 1rem 1.25rem;

    background: var(--background-color, #fff);

    border: 1px solid rgba(0, 0, 0, 0.08);

    box-shadow:
      0 10px 30px rgba(0, 0, 0, 0.08);

    z-index: 1000;
  }

}

/* ============================================================
   Wider desktop layout
   Mobile keeps the original width
   ============================================================ */

@media (min-width: 1024px) {

  body {
    max-width: 1100px !important;
    width: calc(100% - 80px) !important;
  }

  header,
  main,
  footer {
    max-width: none !important;
    width: 100% !important;
  }
}

/* ============================================================
   Homepage image
   ============================================================ */

@media (min-width: 1024px) {


  main > p:first-child img {
    display: block;

    width: 100% !important;
    max-width: 720px !important;
    height: auto !important;

    margin-left: auto;
    margin-right: auto;

    border-radius: 10px;
  }

}

/* ============================================================
   Comments
   ============================================================ */

.comments-area {
  margin-top: 5rem;
  padding-top: 3rem;

  border-top: 1px solid rgba(127, 127, 127, 0.18);
}


/* ============================================================
   Header
   ============================================================ */

.comments-header {
  margin-bottom: 2rem;
}

.comments-header h2,
.comment-respond h2 {
  margin-top: 0;
  margin-bottom: 0;
}


/* ============================================================
   Comment list
   ============================================================ */

.comment-list {
  margin: 0;
  padding: 0;

  list-style: none;
}

.comment-list .comment-list {
  margin-top: 1rem;
}


/* ============================================================
   Comment item
   ============================================================ */

.comment-body {
  margin: 0 0 1.5rem;
  padding: 0;

  list-style: none;
}

.comment-card {
  padding: 1.25rem;

  border: 1px solid rgba(127, 127, 127, 0.18);
  border-radius: 12px;
}


/* ============================================================
   Author header
   ============================================================ */

.comment-card-header {
  display: flex;
  align-items: center;

  gap: 0.9rem;

  margin-bottom: 1rem;
}


/* ============================================================
   Avatar
   ============================================================ */

.comment-avatar {
  flex: 0 0 48px;

  width: 48px;
  height: 48px;
}

.comment-avatar img {
  display: block;

  width: 48px !important;
  height: 48px !important;

  margin: 0 !important;

  border-radius: 50%;

  object-fit: cover;
}


/* ============================================================
   Author info
   ============================================================ */

.comment-author-block {
  min-width: 0;

  flex: 1;
}

.comment-author-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 0.5rem;
}

.comment-author-name {
  font-weight: 600;
}

.comment-author-name a {
  color: inherit;
}


/* ============================================================
   Author badge
   ============================================================ */

.comment-author-badge {
  display: inline-flex;

  padding: 0.1rem 0.45rem;

  border: 1px solid currentColor;
  border-radius: 999px;

  font-size: 0.72rem;
  line-height: 1.3;

  opacity: 0.65;
}


/* ============================================================
   Floor
   ============================================================ */

.comment-floor {
  margin-left: auto;

  font-size: 0.78rem;

  opacity: 0.45;
}


/* ============================================================
   Comment date
   ============================================================ */

.comment-date {
  display: inline-block;

  margin-top: 0.2rem;

  font-size: 0.8rem;

  text-decoration: none;

  opacity: 0.5;
}


/* ============================================================
   Comment content
   ============================================================ */

.comment-content {
  line-height: 1.65;

  overflow-wrap: anywhere;
}

.comment-content > :first-child {
  margin-top: 0;
}

.comment-content > :last-child {
  margin-bottom: 0;
}


/* ============================================================
   Actions
   ============================================================ */

.comment-actions {
  margin-top: 0.9rem;

  font-size: 0.85rem;
}

.comment-actions a {
  opacity: 0.6;
}

.comment-actions a:hover {
  opacity: 1;
}


/* ============================================================
   Author comments
   ============================================================ */

.comment-by-author > .comment-card {
  border-left-width: 3px;
}


/* ============================================================
   Nested comments
   ============================================================ */

.comment-children {
  margin-top: 1rem;
  margin-left: 2rem;
}

.comment-children .comment-card {
  background: rgba(127, 127, 127, 0.025);
}

.comment-children .comment-children {
  margin-left: 2rem;
}


/* ============================================================
   Moderation
   ============================================================ */

.comment-awaiting-moderation {
  margin: 0 0 1rem;

  font-size: 0.85rem;
  font-style: italic;

  opacity: 0.6;
}


/* ============================================================
   Pagination
   ============================================================ */

.comment-pagination {
  margin-top: 2rem;
}

.comment-pagination ol,
.comment-pagination ul {
  display: flex;
  flex-wrap: wrap;

  gap: 0.75rem;

  margin: 0;
  padding: 0;

  list-style: none;
}


/* ============================================================
   Respond form
   ============================================================ */

.comment-respond {
  margin-top: 4rem;
}

.cancel-comment-reply {
  margin-bottom: 1rem;

  font-size: 0.85rem;
}


/* ============================================================
   Form fields
   ============================================================ */

.comment-form {
  margin-top: 1.5rem;
}

.comment-fields {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 1rem;
}

.comment-field,
.comment-textarea-field {
  margin: 0 0 1.25rem;
}

.comment-field label,
.comment-textarea-field label {
  display: block;

  margin-bottom: 0.4rem;

  font-size: 0.85rem;
  font-weight: 600;
}

.comment-form input,
.comment-form textarea {
  box-sizing: border-box;

  width: 100%;

  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 8px;

  background: transparent;

  color: inherit;
  font: inherit;
}

.comment-form input {
  height: 44px;

  padding: 0 0.75rem;
}

.comment-form textarea {
  min-height: 160px;

  padding: 0.75rem;

  resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}


/* ============================================================
   Submit button
   ============================================================ */

.comment-submit-row {
  margin: 0;
}

.comment-submit {
  min-height: 42px;

  padding: 0.55rem 1.1rem;

  border: 1px solid currentColor;
  border-radius: 8px;

  background: transparent;

  color: inherit;

  font: inherit;
  font-weight: 600;

  cursor: pointer;
}

.comment-submit:hover {
  background: rgba(127, 127, 127, 0.08);
}


/* ============================================================
   Login status / closed
   ============================================================ */

.comment-login-status,
.comments-closed {
  font-size: 0.9rem;

  opacity: 0.7;
}


/* ============================================================
   Tablet
   ============================================================ */

@media (max-width: 900px) {

  .comment-fields {
    grid-template-columns: 1fr;
  }

}


/* ============================================================
   Mobile
   ============================================================ */

@media (max-width: 600px) {

  .comments-area {
    margin-top: 3.5rem;
    padding-top: 2rem;
  }

  .comment-card {
    padding: 1rem;
  }

  .comment-avatar,
  .comment-avatar img {
    width: 40px !important;
    height: 40px !important;
  }

  .comment-avatar {
    flex-basis: 40px;
  }

  /*
   * 手机端减少嵌套缩进，
   * 防止多级回复越来越窄。
   */

  .comment-children,
  .comment-children .comment-children {
    margin-left: 0.75rem;
  }

  .comment-floor {
    margin-left: 0;
  }

}

/* ============================================================

   Colored site header

   ============================================================ */

.site-header {

  position: relative;

  z-index: 100;

  padding: 1.15rem 0;

  /* Header 本体透明 */

  background: transparent;

}

/* 单独用伪元素铺满屏幕背景，

   不会裁掉展开菜单 */

.site-header::before {

  content: "";

  position: absolute;

  z-index: -1;

  top: 0;

  bottom: 0;

  left: 50%;

  width: 100vw;

  transform: translateX(-50%);

  background: #087faf;

}

/* Website title */

.site-title a {

  color: #fff !important;

  text-decoration: none;

}

.site-title a:hover {

  color: rgba(255, 255, 255, 0.82) !important;

}

/* Hamburger icon */

.site-menu summary {

  color: #fff;

}

/* 展开的菜单 */

.site-menu {

  position: relative;

  z-index: 200;

}

.menu-panel {

  z-index: 1000;

  background: #fff !important;

  color: #333;

}

/* Mobile */

@media (max-width: 767px) {

  .site-header {

    padding: 1rem 0;

  }

}