:root {
  --bg: #eceef1;
  --bg-soft: #f7f8fa;
  --paper: #ffffff;
  --paper-soft: rgba(27, 31, 36, 0.82);
  --ink: #17191d;
  --muted: #6f7782;
  --line: rgba(60, 66, 76, 0.12);
  --gold: #5f6670;
  --bronze: #8a919b;
  --mist: #d8dde3;
  --wine: #cfd5dc;
  --shadow: 0 18px 48px rgba(50, 56, 66, 0.08);
  --shadow-soft: 0 8px 20px rgba(60, 66, 76, 0.06);
  --accent-line: linear-gradient(90deg, #9fa7b2, #d9dee5 58%, transparent);
  --img-home: url("https://nie.res.netease.com/r/pic/20250717/f258a665-a17c-41a2-9e43-6e8a92f80d07.jpg");
  --img-qinghe: url("https://nie.res.netease.com/r/pic/20250717/5dc5d9c6-21e2-4f92-9e9a-e0fd759b1635.jpg");
  --img-kaifeng: url("https://nie.res.netease.com/r/pic/20250217/ee059c6b-e9ff-4754-94cc-b6a64875c772.png");
  --img-kaifeng-alt: url("https://nie.res.netease.com/r/pic/20250217/019fd10d-13f4-4ca8-9fe8-0ec7f7f6623d.jpg");
  --img-hexi: url("https://nie.res.netease.com/r/pic/20250320/b947be7e-46e4-4fef-a039-95e1d9f22edb.jpg");
  --img-hexi-alt: url("https://nie.res.netease.com/r/pic/20250320/952760e1-3184-42ed-8503-c81358e2708e.jpg");
  --img-bujianshan: url("https://nie.res.netease.com/r/pic/20250905/246a4727-214d-454d-a311-95e9ce8a8b5a.png");
  --img-bujianshan-alt: url("https://nie.res.netease.com/r/pic/20250905/6b2bae01-4976-4605-bc9b-5e5c7277be32.png");
  --img-hutuo: url("https://nie.res.netease.com/r/pic/20251208/32559738-ebe2-4146-b9b6-0b999f31a228.jpg");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.95), transparent 24%),
    linear-gradient(180deg, #f4f5f7 0%, #e8ebef 100%);
  min-height: 100vh;
}

[hidden] {
  display: none !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 78px,
      rgba(98, 106, 118, 0.03) 79px,
      transparent 80px
    );
  opacity: 0.5;
}

.page-shell {
  position: relative;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-mark {
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: var(--ink);
  font-weight: 700;
}

.brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
}

.nav-links a {
  color: #353c45;
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--ink);
}

.text-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: 16px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(70, 78, 89, 0.35);
  padding-bottom: 3px;
  font-weight: 600;
}

.text-link:hover {
  color: var(--gold);
  border-color: rgba(255, 255, 255, 0.75);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 18px;
  margin-top: 14px;
}

.subhero {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.subhero-card {
  min-height: 260px;
  padding: 34px 32px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.92) 52%, rgba(255, 255, 255, 0.66) 75%, rgba(255, 255, 255, 0.22) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.24)),
    var(--img-home) center/cover no-repeat;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  position: relative;
}

.qinghe-hero .subhero-card {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.9) 56%, rgba(255, 255, 255, 0.5) 78%, rgba(255, 255, 255, 0.16) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.2)),
    var(--img-qinghe) center/cover no-repeat;
}

.kaifeng-hero .subhero-card {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.9) 58%, rgba(255, 255, 255, 0.52) 78%, rgba(255, 255, 255, 0.18) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.22)),
    var(--img-kaifeng) center/cover no-repeat;
}

.hutuo-hero .subhero-card {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.9) 56%, rgba(255, 255, 255, 0.48) 78%, rgba(255, 255, 255, 0.16) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.2)),
    var(--img-hutuo) center/cover no-repeat;
}

.hexi-hero .subhero-card {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.9) 56%, rgba(255, 255, 255, 0.5) 78%, rgba(255, 255, 255, 0.16) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2)),
    var(--img-hexi) center/cover no-repeat;
}

.bujianshan-hero .subhero-card {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.92) 54%, rgba(255, 255, 255, 0.56) 76%, rgba(255, 255, 255, 0.18) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.22)),
    var(--img-bujianshan) center/cover no-repeat;
}

.hero-card,
.hero-note,
.section,
.afterword {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 248, 250, 0.98));
  box-shadow: var(--shadow);
}

.hero-card {
  min-height: 360px;
  padding: 34px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.94) 54%, rgba(255, 255, 255, 0.62) 76%, rgba(255, 255, 255, 0.18) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.2)),
    var(--img-home) center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

.hero-note {
  padding: 24px;
  align-self: end;
  background:
    linear-gradient(180deg, rgba(250, 251, 252, 0.96), rgba(243, 245, 247, 0.98));
}

.hero-card::after,
.section::before,
.subhero-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background: var(--accent-line);
  pointer-events: none;
}

.eyebrow,
.section-kicker,
.note-label,
.afterword-title,
.volume-no,
.fragment-place {
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow,
.section-kicker {
  color: var(--gold);
  font-size: 0.8rem;
  margin: 0 0 14px;
  font-weight: 600;
}

.hero-card h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4.5vw, 4rem);
  line-height: 1.18;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--ink);
}

.lead {
  max-width: 640px;
  margin: 18px 0 0;
  color: #2f363e;
  font-size: 1rem;
  line-height: 1.88;
}

.note-label {
  color: var(--gold);
  font-size: 0.78rem;
  margin: 0 0 16px;
}

.hero-note p:last-child {
  margin: 0;
  color: var(--paper-soft);
  line-height: 1.82;
}

.section {
  margin-top: 16px;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 248, 250, 0.98));
  position: relative;
}

.section-tight {
  padding-top: 28px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 26px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(89, 97, 108, 0.1);
}

.section-actions {
  margin-top: 6px;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(89, 97, 108, 0.18);
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(60, 66, 76, 0.08);
  border-color: rgba(89, 97, 108, 0.28);
}

.action-button-solid {
  background: #1f242b;
  color: #f8f9fb;
  border-color: #1f242b;
}

.action-button-quiet {
  background: rgba(255, 255, 255, 0.72);
}

.composer-note,
.composer-status {
  margin: 0 0 18px;
  color: #4f5762;
  line-height: 1.8;
}

.custom-journal {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: rgba(250, 251, 252, 0.94);
  box-shadow: var(--shadow-soft);
}

.custom-journal-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  font-size: 1rem;
  color: var(--ink);
  font-weight: 600;
}

.custom-journal-summary::-webkit-details-marker {
  display: none;
}

.custom-journal-meta {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
}

.custom-journal-body {
  padding: 0 20px 20px;
  border-top: 1px solid rgba(89, 97, 108, 0.08);
}

.sort-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.sort-label {
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

.sort-select {
  min-width: 144px;
  padding: 10px 12px;
  border: 1px solid rgba(89, 97, 108, 0.16);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
}

.search-input {
  min-width: 240px;
  padding: 10px 12px;
  border: 1px solid rgba(89, 97, 108, 0.16);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
  max-width: 16ch;
}

.intro-grid,
.blueprint-grid,
.reading-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.intro-grid article,
.blueprint-grid article,
.reading-grid article,
.volume-card,
.fragment,
.gallery-card {
  border: 1px solid var(--line);
  background: rgba(250, 251, 252, 0.92);
  box-shadow: var(--shadow-soft);
}

.intro-grid article,
.blueprint-grid article,
.reading-grid article {
  padding: 22px;
  position: relative;
}

.intro-grid article::before,
.blueprint-grid article::before,
.reading-grid article::before,
.volume-card::after,
.fragment::before,
.entry-card::before,
.sidebar-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(116, 124, 136, 0.34), rgba(224, 228, 234, 0.55));
}

.intro-grid h3,
.blueprint-grid h3,
.reading-grid h3,
.volume-card h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  color: var(--ink);
}

.intro-grid p,
.blueprint-grid p,
.reading-grid p,
.volume-card p,
.fragment p,
.gallery-card figcaption,
.afterword p {
  margin: 0;
  color: #464d57;
  line-height: 1.82;
}

.volume-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.volume-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  min-height: 210px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 247, 250, 0.94));
}

.volume-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 1;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  filter: saturate(0.85);
}

.qinghe::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.76) 52%, rgba(255, 255, 255, 0.18)),
    var(--img-qinghe) center/cover no-repeat;
}

.kaifeng::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.74) 52%, rgba(255, 255, 255, 0.16)),
    var(--img-kaifeng-alt) center/cover no-repeat;
}

.hexi::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.74) 52%, rgba(255, 255, 255, 0.16)),
    var(--img-hexi-alt) center/cover no-repeat;
}

.bujianshan::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76) 54%, rgba(255, 255, 255, 0.18)),
    var(--img-bujianshan-alt) center/cover no-repeat;
}

.hutuo::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78) 54%, rgba(255, 255, 255, 0.2)),
    var(--img-hutuo) center/cover no-repeat;
}

.volume-no {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
}

.volume-card h3,
.volume-card p {
  position: relative;
  z-index: 1;
}

.volume-mood {
  margin-bottom: 12px !important;
  color: var(--muted) !important;
}

.fragment-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.fragment-list-dynamic {
  margin-bottom: 14px;
}

.fragment {
  padding: 18px;
  min-height: 148px;
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 246, 249, 0.94));
}

.fragment-place {
  display: block;
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
}

.fragment-date {
  display: block;
  margin: -6px 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.fragment h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--ink);
}

.fragment-rich {
  overflow: hidden;
  padding: 0;
}

.fragment-rich .fragment-place,
.fragment-rich h3,
.fragment-rich p {
  display: block;
  padding-left: 18px;
  padding-right: 18px;
}

.fragment-rich .fragment-place {
  padding-top: 18px;
}

.fragment-rich p {
  padding-bottom: 18px;
}

.fragment-actions {
  display: flex;
  gap: 10px;
  padding: 0 18px 18px;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(89, 97, 108, 0.16);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.mini-button-danger {
  color: #8a3434;
}

.fragment-image {
  min-height: 140px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(89, 97, 108, 0.12);
}

.fragment-empty {
  grid-column: 1 / -1;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.gallery-card {
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 246, 249, 0.94));
}

.gallery-card.tall {
  grid-row: span 2;
}

.gallery-card.wide {
  grid-column: span 2;
}

.art {
  min-height: 220px;
  background-size: cover;
  background-position: center;
  filter: saturate(0.9);
}

.tall .art {
  min-height: 468px;
}

.wide .art {
  min-height: 260px;
}

.art-1 {
  background:
    linear-gradient(180deg, rgba(18, 19, 21, 0.12), rgba(18, 19, 21, 0.46)),
    var(--img-qinghe) center/cover no-repeat;
}

.art-2 {
  background:
    linear-gradient(180deg, rgba(18, 16, 13, 0.14), rgba(18, 16, 13, 0.46)),
    var(--img-kaifeng) center/cover no-repeat;
}

.art-3 {
  background:
    linear-gradient(180deg, rgba(20, 17, 12, 0.12), rgba(20, 17, 12, 0.42)),
    var(--img-hexi) center/cover no-repeat;
}

.art-4 {
  background:
    linear-gradient(180deg, rgba(16, 17, 17, 0.12), rgba(16, 17, 17, 0.42)),
    var(--img-bujianshan-alt) center/cover no-repeat;
}

.art-5 {
  background:
    linear-gradient(180deg, rgba(20, 14, 14, 0.12), rgba(20, 14, 14, 0.44)),
    var(--img-hutuo) center/cover no-repeat;
}

.gallery-card figcaption {
  padding: 16px 18px 18px;
  color: #3f4751;
}

.afterword {
  margin-top: 24px;
  padding: 34px;
  text-align: center;
}

.afterword-title {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.82rem;
}

.afterword p {
  width: min(760px, 100%);
  margin: 0 auto;
}

.entry-list {
  display: grid;
  gap: 16px;
}

.composer-section {
  padding-bottom: 32px;
}

.admin-lock {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-lock-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  margin-bottom: 24px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 251, 0.92)),
    radial-gradient(circle at top right, rgba(31, 36, 43, 0.04), transparent 40%);
  box-shadow: var(--shadow-soft);
}

.admin-lock-copy {
  display: grid;
  align-content: start;
  gap: 12px;
}

.admin-lock-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.admin-lock-copy h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.35;
}

.admin-lock-lead {
  margin: 0;
  color: #56606d;
  line-height: 1.9;
}

.admin-lock-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(89, 97, 108, 0.12);
  background: rgba(255, 255, 255, 0.86);
}

.admin-lock-field {
  margin: 0;
}

.admin-lock-actions {
  margin-top: 4px;
}

.admin-lock-status {
  margin-bottom: 0;
  min-height: 28px;
}

.composer-shell {
  padding-top: 8px;
  border-top: 1px solid rgba(89, 97, 108, 0.12);
}

.composer-form {
  display: grid;
  gap: 18px;
}

.composer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

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

.field-label {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(89, 97, 108, 0.16);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
  box-shadow: var(--shadow-soft);
}

.field textarea {
  resize: vertical;
  min-height: 200px;
  line-height: 1.9;
}

.field-help {
  color: var(--muted);
  font-size: 0.9rem;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.preview-card {
  margin: 0;
  border: 1px solid var(--line);
  background: rgba(250, 251, 252, 0.94);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.preview-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.preview-card figcaption {
  padding: 12px 14px;
  color: #46505b;
}

.composer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.entry-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  background: rgba(250, 251, 252, 0.94);
  position: relative;
  box-shadow: var(--shadow-soft);
}

.entry-meta {
  margin: 0 0 10px;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
}

.entry-card h3 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  line-height: 1.4;
}

.entry-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.entry-card h3 a:hover {
  color: var(--gold);
}

.diary-entry {
  padding: 34px;
}

.entry-header {
  margin-bottom: 24px;
}

.entry-header h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.25;
}

.diary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.7fr);
  gap: 22px;
}

.diary-body {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.diary-body p + p {
  margin-top: 18px;
}

.diary-body p {
  color: #353b44;
  line-height: 1.92;
}

.entry-sidebar {
  display: grid;
  gap: 18px;
}

.sidebar-card {
  border: 1px solid var(--line);
  background: rgba(250, 251, 252, 0.94);
  padding: 22px;
  position: relative;
  box-shadow: var(--shadow-soft);
}

.sidebar-card ul {
  margin: 0;
  padding-left: 18px;
  color: #434a54;
  line-height: 1.9;
}

.art-panel {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.art-panel-qinghe {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.82)),
    var(--img-qinghe) center/cover no-repeat;
}

.art-panel-kaifeng {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.82)),
    var(--img-kaifeng-alt) center/cover no-repeat;
}

.art-panel-hutuo {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.84)),
    var(--img-hutuo) center/cover no-repeat;
}

.art-panel-hexi {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.82)),
    var(--img-hexi-alt) center/cover no-repeat;
}

.art-panel-bujianshan {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.84)),
    var(--img-bujianshan) center/cover no-repeat;
}

.intro-grid article:hover,
.blueprint-grid article:hover,
.reading-grid article:hover,
.volume-card:hover,
.fragment:hover,
.entry-card:hover,
.gallery-card:hover,
.sidebar-card:hover {
  transform: translateY(-2px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  box-shadow: 0 12px 28px rgba(60, 66, 76, 0.1);
  border-color: rgba(90, 98, 110, 0.18);
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .fragment-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro-grid,
  .blueprint-grid,
  .reading-grid,
  .volume-list {
    grid-template-columns: 1fr;
  }

  .diary-layout {
    grid-template-columns: 1fr;
  }

  .composer-grid,
  .image-preview-grid {
    grid-template-columns: 1fr;
  }

  .admin-lock-card {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .sort-row,
  .filter-row,
  .composer-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-input,
  .sort-select {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 1200px);
    padding-top: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-card,
  .section,
  .afterword,
  .hero-note {
    padding: 20px;
  }

  .hero-card {
    min-height: 280px;
  }

  .fragment-list,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card.tall,
  .gallery-card.wide {
    grid-row: auto;
    grid-column: auto;
  }

  .tall .art,
  .wide .art,
  .art {
    min-height: 220px;
  }
}
