/* ============ 基础 ============ */
:root {
  color-scheme: light;
  --paper: #f6f2e9;
  --paper-2: #fffdf8;
  --ink: #33302b;
  --ink-2: #57514a;
  --muted: #736b5d;
  --line: #e6ddcd;
  --brand: #2f5d8a;
  --brand-soft: #4a7aa8;
  --link: #3f6f9f;
  --accent: #b64330;
  --radius: 22px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--paper);
  background-image:
    radial-gradient(900px 420px at 50% -8%, #fffdf6 0%, rgba(255, 253, 246, 0) 62%),
    radial-gradient(rgba(120, 95, 70, 0.05) 1px, transparent 1px);
  background-size: auto, 24px 24px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(47, 93, 138, 0.16); }

button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 6px;
}

.page {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 44px 24px 56px;
}

/* ============ 顶栏 ============ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--brand);
  color: #fff7ec;
  font-size: 13px;
  font-weight: 800;
  transform: rotate(-4deg);
}

.brand-name {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.1em;
}

.brand-sub {
  padding-left: 9px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  letter-spacing: 0.14em;
}

.today { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============ 运势卡 ============ */
.card {
  position: relative;
  padding: 46px 54px 38px;
  border: 1px solid #ece2d1;
  border-radius: var(--radius);
  background-color: var(--paper-2);
  background-image:
    radial-gradient(rgba(120, 90, 60, 0.05) 0.6px, transparent 0.7px),
    linear-gradient(180deg, #fffdf8 0%, #fdf8ee 100%);
  background-size: 3px 3px, auto;
  box-shadow:
    0 30px 70px -44px rgba(45, 55, 65, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.seal {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  place-items: center;
  width: 60px;
  height: 60px;
  padding: 5px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff7ec;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  opacity: 0.92;
  transform: rotate(4deg);
  box-shadow:
    inset 0 0 0 2px rgba(255, 247, 236, 0.28),
    0 6px 16px -8px rgba(30, 55, 85, 0.5);
}

.headline {
  margin: 2px 0 6px;
  padding: 0 40px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--ink-2);
}

.who {
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 0.16s ease, background 0.16s ease;
}

.who:hover { color: #39618e; background: rgba(74, 118, 168, 0.08); }
.who:focus-visible { border-radius: 4px; }

.headline-rest { color: var(--ink-2); }
.headline-rest::before { content: "\2009"; }

/* 大字：小吉 */
.fortune {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.14em;
  margin: 6px 0 2px;
  line-height: 0.98;
  user-select: none;
}

.fortune .word {
  color: var(--accent);
  font-size: clamp(76px, 15vw, 128px);
  font-weight: 900;
  letter-spacing: 0.04em;
  animation: stamp 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.fortune .orn {
  color: var(--accent);
  font-size: clamp(34px, 6.4vw, 56px);
  font-weight: 700;
  opacity: 0.9;
  transform: rotate(-10deg) translateY(-6%);
}

.fortune .orn:last-child { transform: rotate(10deg) translateY(-6%); }

@keyframes stamp {
  0% { opacity: 0; transform: scale(1.55) rotate(-5deg); }
  62% { opacity: 1; transform: scale(0.965) rotate(0.6deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.quip {
  min-height: 1.6em;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  letter-spacing: 0.05em;
  text-align: center;
}

.rule {
  height: 1px;
  margin: 26px 0 24px;
  background: linear-gradient(90deg, transparent, var(--line) 14%, var(--line) 86%, transparent);
}

/* ============ 宜 / 忌 ============ */
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
}

.col { min-width: 0; }

.items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.item {
  text-align: center;
  animation: rise 0.5s ease both;
  animation-delay: calc(var(--i, 0) * 70ms + 120ms);
}

.item-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 2px;
}

.item .tag {
  font-size: clamp(19px, 2.3vw, 25px);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.item .tag::after { content: "："; margin-right: 0.12em; }

.item .item-text {
  font-size: clamp(19px, 2.3vw, 25px);
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.col-yi .item { color: #b5432f; }

.col-ji .item { color: #7f3b34; }

.item-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

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

/* ============ 幸运信息 ============ */
.lucky {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 22px;
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.lucky b {
  margin-left: 0.4em;
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 0.45em;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  vertical-align: -1px;
}

/* ============ 卡片页脚 ============ */
.card-foot {
  margin-top: 26px;
  text-align: center;
}

.streak {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.streak b {
  margin: 0 3px;
  color: var(--brand);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.streak .sep { margin: 0 7px; color: #c9c0b1; }
.streak .refresh { white-space: nowrap; }
.streak .countdown { color: var(--ink-2); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 17px;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font-size: 13px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease,
    transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:active { transform: translateY(1px); }

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover {
  border-color: #d8c9b2;
  background: #fffef9;
  box-shadow: 0 6px 16px -12px rgba(45, 60, 75, 0.55);
}

.btn-line {
  border: 1px solid rgba(47, 93, 138, 0.38);
  background: rgba(47, 93, 138, 0.05);
  color: var(--brand);
}

.btn-line:hover {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff7ec;
}

.btn-plain {
  border: 1px solid transparent;
  color: var(--muted);
}

.btn-plain:hover {
  background: rgba(120, 95, 70, 0.07);
  color: var(--ink-2);
}

.btn-solid {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff7ec;
}

.btn-solid:hover { background: #244a70; border-color: #244a70; }

/* ============ 传送门 ============ */
.links { margin-top: 46px; }

.links-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.links-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.links-head h2::before {
  content: "";
  width: 5px;
  height: 17px;
  border-radius: 2px;
  background: var(--brand);
}

.links-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.links-tools { display: flex; gap: 7px; }

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.link-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.72);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: #dbccb5;
  background: #fffdf8;
  box-shadow: 0 12px 26px -20px rgba(45, 60, 75, 0.6);
}

.link-main {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
}

.link-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(120, 95, 70, 0.08);
  background: color-mix(in srgb, var(--c, #8d8578) 15%, #fffdf8);
  color: var(--c, #8d8578);
  font-size: 15px;
  font-weight: 800;
}

.link-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.link-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-tag {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-tools-mini {
  position: absolute;
  top: 7px;
  right: 7px;
  display: none;
  gap: 4px;
}

.link-grid.managing .link-card { border-style: dashed; border-color: #d9cab3; }
.link-grid.managing .link-tools-mini { display: flex; }
.link-grid.managing .link-main { padding-right: 56px; }

.mini-btn {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fffdf8;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: 0.16s ease;
}

.mini-btn:hover { color: var(--ink); border-color: #d8c9b2; }
.mini-btn.danger:hover { color: #fff; background: var(--brand); border-color: var(--brand); }

.links-empty {
  margin: 16px 0 0;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.links-manage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.link-text-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 12px;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ============ 页脚 ============ */
.colophon {
  margin-top: 52px;
  color: #998f80;
  font-size: 11.5px;
  line-height: 1.9;
  letter-spacing: 0.05em;
  text-align: center;
}

.colophon p { margin: 0; }

.colophon .blessing {
  margin-top: 10px;
  color: #4f6275;
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "SimSun", serif;
  font-size: 14px;
  letter-spacing: 0.12em;
}

.noscript {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px dashed #d8c9b2;
  border-radius: 12px;
  color: var(--brand);
  font-size: 13px;
  text-align: center;
}

/* ============ 弹窗 ============ */
.dlg {
  width: min(420px, calc(100vw - 36px));
  padding: 0;
  border: 1px solid #ece2d1;
  border-radius: 18px;
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: 0 40px 90px -30px rgba(40, 50, 60, 0.5);
}

.dlg::backdrop {
  background: rgba(35, 42, 52, 0.36);
  backdrop-filter: blur(3px);
}

.dlg form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 26px 22px;
}

.dlg h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.dlg-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.field em {
  margin-left: 4px;
  color: #b9b0a2;
  font-size: 11px;
  font-style: normal;
}

.field input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input::placeholder { color: #c3bbae; }

.field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 93, 138, 0.12);
}

.dlg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 4px;
}

/* ============ 提示 ============ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 60;
  max-width: calc(100vw - 36px);
  padding: 11px 20px;
  border-radius: 999px;
  background: #33302b;
  color: #f6f2e9;
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ 响应式 ============ */
@media (max-width: 820px) {
  .card { padding: 40px 34px 30px; }
  .cols { gap: 0 24px; }
}

@media (max-width: 640px) {
  .page { padding: 24px 15px 40px; }

  .topbar {
    margin-bottom: 16px;
    font-size: 11.5px;
  }

  .brand-sub { display: none; }

  .card {
    padding: 30px 20px 26px;
    border-radius: 18px;
  }

  .seal { display: none; }

  .headline {
    padding: 0;
    font-size: 16px;
  }

  .fortune .word { font-size: clamp(68px, 21vw, 92px); }
  .fortune .orn { font-size: clamp(28px, 9vw, 38px); }

  .rule { margin: 22px 0 20px; }

  .cols { grid-template-columns: 1fr; gap: 0; }

  .col + .col {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px dashed var(--line);
  }

  .items { gap: 20px; }

  .item .tag,
  .item .item-text { font-size: 21px; }

  .item-sub { font-size: 12.5px; }

  .links { margin-top: 34px; }
  .links-head { align-items: flex-start; }
  .links-tools { width: 100%; justify-content: space-between; }
  .links-tools .btn { flex: 0 0 auto; }

  .streak .refresh { display: block; margin-top: 1px; }
  .streak .sep { display: none; }

  .link-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

  .colophon { margin-top: 38px; }
}

@media (max-width: 380px) {
  .item .tag,
  .item .item-text { font-size: 19px; }
  .lucky { gap: 4px 16px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============ 导航 ============ */
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand { color: inherit; text-decoration: none; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 4px 9px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}
.nav a:hover { background: rgba(47, 93, 138, 0.06); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--brand); background: rgba(47, 93, 138, 0.07); }

/* ============ 首页板块 ============ */
.home-section { margin-top: 46px; }
.home-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.home-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.home-head h2::before {
  content: "";
  width: 5px;
  height: 17px;
  border-radius: 2px;
  background: var(--brand);
}
.home-sub { margin: 6px 0 0; color: var(--muted); font-size: 12px; letter-spacing: 0.03em; }
.section-more {
  padding-bottom: 2px;
  border-bottom: 1px dotted rgba(47, 93, 138, 0.45);
  color: var(--brand);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.section-more:hover { border-bottom-style: solid; }

.about-card { margin-top: 16px; padding: 28px 34px; }
.about-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.95;
  letter-spacing: 0.02em;
}
.about-card p + p { margin-top: 10px; }
.about-card .about-sign { margin-top: 14px; color: var(--muted); font-size: 12.5px; letter-spacing: 0.1em; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.post-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.72);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover {
  transform: translateY(-2px);
  border-color: #dbccb5;
  background: #fffdf8;
  box-shadow: 0 12px 26px -20px rgba(45, 60, 75, 0.6);
}
.post-meta { color: var(--muted); font-size: 11.5px; letter-spacing: 0.06em; }
.post-title { margin: 0; color: var(--ink); font-size: 15.5px; font-weight: 800; line-height: 1.5; letter-spacing: 0.02em; }
.post-summary { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.post-tags { margin-top: auto; padding-top: 4px; color: var(--brand); font-size: 11.5px; letter-spacing: 0.03em; opacity: 0.85; }
.home-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ============ 文章列表 ============ */
.wiki-hero { margin: 4px 0 0; }
.wiki-hero h1 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: 0.04em; }
.wiki-hero p { margin: 8px 0 0; color: var(--muted); font-size: 13px; letter-spacing: 0.03em; }
.wiki-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.search-input {
  flex: 1 1 240px;
  min-width: 200px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 93, 138, 0.1); }
.tag-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.tag-chip:hover { border-color: #d8c9b2; color: var(--ink); }
.tag-chip.active { background: var(--brand); border-color: var(--brand); color: #fff7ec; }
.wiki-empty {
  margin: 22px 0 0;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ============ 文章页 ============ */
.article-card { padding: 44px 54px 38px; }
.article-head { max-width: 700px; margin: 0 auto; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.article-kicker { margin: 0 0 10px; color: var(--brand); font-size: 11px; letter-spacing: 0.22em; }
.article-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.article-meta { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; letter-spacing: 0.03em; }
.article-body {
  max-width: 700px;
  margin: 28px auto 0;
  color: #3b3731;
  font-size: 15.5px;
  line-height: 1.95;
  letter-spacing: 0.01em;
}
.article-body > :first-child { margin-top: 0; }
.article-body p { margin: 0 0 15px; }
.article-body h2 {
  margin: 34px 0 12px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.article-body h2::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 16px;
  margin-right: 10px;
  border-radius: 2px;
  background: var(--brand);
  vertical-align: -2px;
}
.article-body h3 { margin: 26px 0 10px; font-size: 17px; font-weight: 800; }
.article-body ul, .article-body ol { margin: 0 0 15px; padding-left: 22px; }
.article-body li { margin: 5px 0; }
.article-body a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.article-body code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(120, 95, 70, 0.09);
  font-family: var(--mono);
  font-size: 0.9em;
}
.article-body pre {
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 10px;
  background: #2f2a26;
  color: #f6f2e9;
  overflow: auto;
  line-height: 1.7;
}
.article-body pre code { padding: 0; background: none; color: inherit; font-size: 13px; }
.article-body blockquote {
  margin: 20px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--brand-soft);
  background: rgba(47, 93, 138, 0.045);
  color: var(--ink-2);
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body hr { height: 1px; margin: 28px 0; border: 0; background: var(--line); }
.article-body table { width: 100%; margin: 0 0 18px; border-collapse: collapse; font-size: 14px; }
.article-body th, .article-body td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; }
.article-body th { background: rgba(120, 95, 70, 0.05); font-weight: 700; }
.article-body img { max-width: 100%; height: auto; border-radius: 10px; }
.toc {
  max-width: 700px;
  margin: 24px auto 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.6);
}
.toc-title { margin: 0 0 6px; color: var(--brand); font-size: 11px; letter-spacing: 0.18em; }
.toc ul { margin: 0; padding-left: 18px; }
.toc li { margin: 3px 0; font-size: 13px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand); }
.toc .toc-h3 { margin-left: 10px; }
.article-back { max-width: 700px; margin: 30px auto 0; font-size: 12.5px; }
.article-back a { color: var(--brand); text-decoration: none; }
.article-back a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .today { display: none; }
}

@media (max-width: 640px) {
  .topbar-left { gap: 8px; }
  .nav a { padding: 4px 7px; font-size: 11.5px; }
  .home-section { margin-top: 34px; }
  .about-card { padding: 22px 20px; }
  .about-card p { font-size: 14px; }
  .post-grid { grid-template-columns: 1fr; }
  .article-card { padding: 28px 20px 26px; }
  .article-head h1 { font-size: 25px; }
  .article-body { font-size: 15px; }
  .wiki-hero h1 { font-size: 24px; }
  .wiki-controls { gap: 8px; }
  .search-input { flex: 1 1 100%; min-width: 0; }
}
/* 关于卡片里的「现在」 */
.about-card {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}
.about-now {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0 0 0 28px;
  border-left: 1px solid var(--line);
}
.about-now div { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.6; }
.about-now dt { flex: none; width: 34px; color: var(--muted); letter-spacing: 0.08em; }
.about-now dd { margin: 0; color: var(--ink-2); }

@media (max-width: 640px) {
  .about-card { display: block; }
  .about-now {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-top: 18px;
    padding: 16px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
/* 首页文章区：四篇时两列 */
#homePosts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* 原文模式 */
.raw-text {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  font-size: 15.5px;
  line-height: 2.05;
  letter-spacing: 0.01em;
}
.raw-note {
  margin: 0 0 18px;
  padding: 9px 14px;
  border-left: 3px solid var(--brand-soft);
  background: rgba(47, 93, 138, 0.04);
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  #homePosts { grid-template-columns: 1fr; }
}
/* 文章列表：两列 */
.wiki-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 640px) {
  .wiki-grid { grid-template-columns: 1fr; }
}
/* ============ 抽签前 ============ */
.draw-state { padding: 22px 0 6px; text-align: center; }
.draw-orb {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: 6px auto 18px;
  border: 1px dashed rgba(47, 93, 138, 0.45);
  border-radius: 50%;
  background: rgba(47, 93, 138, 0.04);
  color: var(--brand);
  font-size: 40px;
  font-weight: 800;
  transform: rotate(-4deg);
}
.draw-hint { margin: 0 0 16px; color: var(--muted); font-size: 14px; letter-spacing: 0.06em; }
.btn-draw {
  padding: 12px 36px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff7ec;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  cursor: pointer;
  box-shadow: 0 14px 26px -16px rgba(30, 55, 85, 0.8);
  transition: transform 0.16s ease, background 0.16s ease;
}
.btn-draw:hover { background: #264d73; transform: translateY(-1px); }
.btn-draw:active { transform: translateY(1px); }
.draw-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }

.result-state { animation: reveal 0.4s ease both; }
@keyframes reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 640px) {
  .draw-state { padding: 16px 0 4px; }
  .draw-orb { width: 76px; height: 76px; font-size: 34px; }
  .btn-draw { padding: 11px 30px; }
}