body {
  margin: 0;
  line-height: 1.5em;
  background: #fafafa;
  color: #333; /* 稍微加深文字颜色提高可读性 */
}
.header div, .container, .copyright, .menu {
  max-width: 1100px;
  margin: auto;
  padding: 0 15px;
}
.page .header div, .page .container, .page .copyright, .page .menu { max-width: 900px; }
.container { hyphens: auto; }
@media (max-width: 930px) {
  .page .container { padding: 0; }
}
main { margin-bottom: 15px; }

/* header and footer areas */
.header {
  border-top: 5px solid #666;
  border-bottom: 4px double #666;
  text-align: center;
  padding: 15px 0 5px;
}
.head-meta, .menu {
  display: flex;
  justify-content: space-between;
}
.header, .list section, article { background: #fff; }
.banner { font-size: 4em; }
.banner .text {
  display: block;
  line-height: 1em;
}
.list {
  display: flex;
  flex-wrap: wrap;
  margin-left: -15px;
}
.list section {
  flex: 1 0 350px;
  box-sizing: border-box;
  box-shadow: 0 0 8px #ccc;
  margin: 1em 0 0 15px;
  padding: 1em;
  overflow-x: hidden;
}
@media (max-width: 380px) {
  .list section { flex: auto; }
}
@media (min-width: 715px) {
  .list section { max-width: calc(50% - 15px); }
  .article-list h1 {
    overflow-x: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .article-list h1:hover { white-space: inherit; }
}
@media (min-width: 1080px) {
  .list section { max-width: calc(33.33333% - 15px); }
}
.article-list a, .banner a { color: #000; }
.categories a {
  font-size: .9em;
  font-weight: bolder;
  text-transform: uppercase;
  color: #666;
}
h1 a:hover { text-decoration: underline; }
.article-list h1 { margin: .2em auto .2em 0; }
article { padding: 1em; }

/* 调整 metadata 风格 */
.article-meta {
  text-decoration: none;
  background: #eee;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9em;
}
.menu, .article-meta, footer, .post-nav { text-align: center; }
.article-footer { text-align: left; }
.title { font-size: 1.2em; }
.article-list h1, .title { line-height: 1.2em; }
.article-list a, .header a, footer a, .categories a, .active a, .comments a { text-decoration: none; }

.pagination { text-align: center; padding: 1em 0; list-style: none; }
.pagination li { display: inline; }
.pagination a { padding: 0 .5em; color: #666; }

.footer {
  background: #666;
  padding: 1em 0;
  margin-top: 2em;
}
.footer, .footer a { color: #fff; }
.copyright, .copyright a { color: #ccc; }
.footer .menu {
  justify-content: center;
  gap: 10px;
}
.footer .menu a {
  color: #fff;
}
.footer .menu a:hover {
  color: #000;
  background: #fff;
}
.menu {
  margin-bottom: .5em;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
}
.menu li {
  display: inline-block;
  font-weight: bolder;
}
.menu a { padding: .5em; color: #666; }
.menu a:hover {
  color: #000;
  background: #fff;
}
.back-home {
  color: #222;
  font-weight: 600;
  letter-spacing: 0.02em;
  position: relative;
  text-decoration: none;
  transition: color 0.2s ease;
}
.back-home:hover {
  color: #000;
}
.back-home::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.back-home:hover::after {
  transform: scaleX(1);
}

hr {
  border: 0;
  border-top: 1px dashed #ddd;
  margin: 1em 0;
}

/* --- 之前的其他样式保持不变 --- */
pre {
  border: 1px solid #ddd;
  box-shadow: 5px 5px 5px #eee;
  overflow-x: auto;
}
code { background: #f9f9f9; }
pre code {
  background: none;
  padding: .5em;
  display: block;
}
img, iframe, video { max-width: 100%; }
blockquote {
  background: #f9f9f9;
  border-left: 5px solid #ccc;
  padding: 3px 1em 3px;
}
table {
  margin: 1em auto auto;
  border-top: 1px solid #666;
  border-bottom: 1px solid #666;
}
tr:nth-child(even) { background: #eee }
.thumbnail {
  height: 5.1em;
  width: 6.8em;
  float: left;
  overflow: hidden;
  margin: 5px 8px 5px 0;
  box-shadow: 0 0 8px #666;
}
.post-nav {
  margin: .5em 0;
  display: flex;
  justify-content: space-between;
}
p img {
  display: block;
  margin: 0 auto;
  max-width: 75%;
}
.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
p, ul, ol, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

/* --- Modern terms page --- */
body.terms-body .terms-page {
  --terms-ink: #1f1f1f;
  --terms-muted: #5f5f5f;
  --terms-accent: #19647e;
  --terms-wash: #f4f6f1;
  --terms-card: #fffdf8;
}

body.terms-body .terms-page .terms-grid {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 3em !important;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

body.terms-body .terms-page .terms-grid > li {
  list-style: none !important;
}

body.terms-body .terms-page .terms-card {
  background: var(--terms-card);
  border-radius: 14px;
  border: 1px solid #eee2d1;
  box-shadow: 0 10px 18px rgba(40, 35, 25, 0.08);
  transform: translateY(0);
  animation: terms-rise 0.6s ease both;
}

.terms-card:nth-child(2) { animation-delay: 0.04s; }
.terms-card:nth-child(3) { animation-delay: 0.08s; }
.terms-card:nth-child(4) { animation-delay: 0.12s; }
.terms-card:nth-child(5) { animation-delay: 0.16s; }
.terms-card:nth-child(6) { animation-delay: 0.2s; }

body.terms-body .terms-page .terms-card-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  text-decoration: none !important;
  color: var(--terms-ink) !important;
}

body.terms-body .terms-page .terms-card-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.terms-body .terms-page .terms-name {
  font-size: 1.05em;
  font-weight: 700;
}

body.terms-body .terms-page .terms-count {
  font-size: 0.85em;
  color: var(--terms-muted);
  background: var(--terms-wash);
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  width: fit-content;
  letter-spacing: 0.02em;
}

body.terms-body .terms-page .terms-cta {
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--terms-accent);
  border: 1px solid rgba(25, 100, 126, 0.3);
  padding: 6px 10px;
  border-radius: 999px;
  background: #f6fbfb;
  transition: all 0.25s ease;
}

body.terms-body .terms-page .terms-card:hover {
  transform: translateY(-4px);
  border-color: #d8c8b0;
  box-shadow: 0 16px 26px rgba(40, 35, 25, 0.12);
}

body.terms-body .terms-page .terms-card:hover .terms-cta {
  background: var(--terms-accent);
  color: #fff;
}

ruby rt {
  font-size: 0.9em;
}

@keyframes terms-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.terms-body .terms-page .terms-card {
    animation: none;
  }
}

@media (max-width: 700px) {
  body.terms-body .terms-page .terms-card-link {
    padding: 16px 14px;
  }
}
