/* 江苏科技报 电子报 —— 版式参照新华日报电子报（左版面图 / 右文章），主色科技蓝 */
:root {
  --brand: #1464a5;
  --brand-dark: #0f4c7d;
  --brand-light: #e8f1f8;
  --accent: #0499f3;
  --ink: #333;
  --ink-soft: #4c4c4c;
  --muted: #888;
  --page-bg: #e8eef6;
  --border: #ddd;
  --border-soft: #ececec;
  --shell: 1500px;
  --masthead-height: 150px;
  --subbar-height: 56px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background:
    radial-gradient(1100px 460px at 88% -12%, rgba(20, 100, 165, 0.12), transparent 60%),
    radial-gradient(900px 420px at -8% 24%, rgba(4, 153, 243, 0.08), transparent 60%),
    linear-gradient(180deg, #f5f8fc 0%, #e6edf5 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { border: 0; }

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

/* ---------- 顶栏（高报头：左侧期次信息，右侧品牌） ---------- */
.topbar {
  background: var(--brand);
  border-bottom: 2px solid var(--brand-dark);
}

.topbar-inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  height: var(--masthead-height);
  padding-top: 18px;
}

.topbar .brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
  margin-right: 148px;
  padding: 12px 18px;
  background: transparent;
  line-height: 0;
}

.brand-logo { display: block; width: 640px; height: auto; }

.topbar .issue-line {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  padding-top: 14px;
}

.topbar .issue-line b { color: #fff; font-weight: normal; }
.reader-page .topbar .issue-line { display: none; }
.reader-page .rail { display: none; }
.reader-page .reader-wrap { grid-template-columns: minmax(0, 45%) minmax(0, 1fr); }
.reader-page .reader-wrap + .panel { width: 100%; }

.topbar .spacer { flex: 1 1 auto; }

.subbar {
  position: relative;
  z-index: 3;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(20, 100, 165, 0.08);
}

.subbar-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  height: var(--subbar-height);
}

.subbar .tnav { display: flex; gap: 2px; }

.subbar .tnav a {
  padding: 6px 12px;
  font-size: 15px;
  color: var(--brand);
  border-radius: 3px;
}
.subbar .tnav a:hover, .subbar .tnav a.active { background: var(--brand-light); color: var(--brand); }

.head-search { display: flex; align-items: center; }

.head-search input {
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 3px 0 0 3px;
  padding: 6px 10px;
  font-size: 13px;
  width: 150px;
  font-family: inherit;
  outline: none;
}
.head-search input:focus { border-color: var(--brand); }

.head-search button {
  border: none;
  background: var(--brand);
  color: #fff;
  padding: 7px 14px;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.head-search button:hover { background: var(--brand-dark); }

/* ---------- 阅读主区：左版面图 / 右内容 / 右图标栏 ---------- */
.reader-wrap {
  --reader-offset: calc(var(--masthead-height) + 2px + var(--subbar-height) - 32px);
  --reader-overlap: calc(0px - var(--reader-offset));
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 1fr) 74px;
  gap: 0;
  margin: var(--reader-overlap) 0 14px;
  align-items: stretch;
}

.stage, .side-panel {
  background: #fff;
  border: 1px solid var(--border-soft);
  box-shadow: 0 6px 24px rgba(20, 60, 110, 0.08);
}
.stage { position: relative; z-index: 4; border-right: none; padding: 18px 16px 12px; }
.side-panel { display: flex; flex-direction: column; min-width: 0; }
.side-panel, .rail { margin-top: var(--reader-offset); }
#stageInner {
  min-height: clamp(620px, calc(100vh - 184px), 980px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

/* 左：整版图 + 热区 */
.page-figure {
  position: relative;
  width: 100%;
  margin: 0 auto;
  line-height: 0;
  overflow: hidden;
  background: #fff;
  transition: opacity 0.14s ease;
}
.page-figure.is-loading { opacity: 0.45; }

.page-figure .page-scan {
  width: 100%;
  height: 100%;
  display: block;
  border: 1px solid var(--border);
  object-fit: contain;
}

.hotspot {
  position: absolute;
  display: block;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.hotspot:hover, .hotspot:focus, .hotspot.current {
  background: rgba(20, 100, 165, 0.15);
  border-color: var(--brand);
  outline: none;
}

.hotspot-label {
  position: absolute;
  left: 0;
  bottom: 100%;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  line-height: 1.7;
  padding: 2px 8px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  z-index: 3;
}
.hotspot:hover .hotspot-label, .hotspot:focus .hotspot-label { opacity: 1; }

.stage-foot {
  text-align: center;
  padding-top: 12px;
}
.stage-article-nav { text-align: left; margin-top: 12px; }
.stage-article-nav-head { font-size: 14px; color: var(--brand); font-weight: bold; margin-bottom: 8px; }
.stage-article-list {
  max-height: 265px;
  overflow-y: auto;
  background: #f8fbfe;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
}
.stage-article-list a.active { background: var(--brand-light); color: var(--brand); }
.stage-turn-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
  font-size: 14px;
}
.stage-turn-group { display: flex; gap: 12px; min-width: 0; }
.stage-turn-pages { justify-content: flex-end; }
.stage-turn-group a { color: var(--brand); white-space: nowrap; }
.stage-turn-group > span { color: #aaa; white-space: nowrap; }

.btn-pdf {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  padding: 7px 18px;
  border-radius: 3px;
}
.btn-pdf:hover { background: var(--brand-dark); color: #fff; }

/* 右：面板头 */
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-soft);
  min-height: 52px;
  background: linear-gradient(180deg, #f2f7fc, #ffffff);
}

.panel-head .page-label {
  font-size: 17px;
  font-family: "STSong", "SimSun", serif;
  color: var(--brand);
  padding-left: 10px;
  border-left: 4px solid var(--brand);
}
.panel-head .date-label { font-size: 16px; color: var(--muted); margin-left: auto; }

.panel-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 18px 18px; }

.toc-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 18px;
  align-items: start;
}
.toc-split-left { min-width: 0; }
.toc-split-right {
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid var(--border-soft);
}
.toc-split-right .side-nav-section { padding-top: 14px; }
.toc-split-right .issue-calendar { padding-right: 4px; }

.side-nav-section { padding-top: 14px; }
.side-nav-section + .side-nav-section { margin-top: 16px; border-top: 1px solid var(--border-soft); }
.side-nav-section h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 8px 10px;
  background: var(--brand-light);
  border-left: 4px solid var(--brand);
  border-radius: 3px;
  font-size: 18px;
  color: var(--brand);
  box-shadow: 0 1px 3px rgba(20, 100, 165, 0.12);
}
.side-nav-section h3 .nav-icon { font-size: 18px; line-height: 1; }
.side-page-nav { height: 265px; max-height: 265px; overflow-y: auto; padding-right: 4px; }
.side-page-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.side-page-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--border);
  padding: 9px 12px;
  background: #fbfdff;
  line-height: 1.5;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(20, 60, 110, 0.05);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.side-page-link strong { color: var(--brand); font-size: 18px; flex: 0 0 auto; }
.side-page-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 17px; min-width: 0; }
.side-page-link:hover, .side-page-link.active { border-color: var(--brand); background: var(--brand-light); box-shadow: 0 2px 6px rgba(20, 100, 165, 0.15); }

/* 右：文章目录（红点列表） */
.toc-list { list-style: none; margin: 0; padding: 0; }

.toc-list li { border-bottom: 1px dotted var(--border-soft); }
.toc-list li:last-child { border-bottom: none; }

.toc-list a {
  display: block;
  padding: 13px 4px 13px 18px;
  position: relative;
  font-size: 17px;
  line-height: 1.6;
  font-family: "STSong", "SimSun", serif;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.toc-list a::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 21px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c33;
}

.toc-list a:hover { color: var(--brand); background: linear-gradient(90deg, rgba(20, 100, 165, 0.07), transparent 75%); }
.toc-list .t-eyebrow, .toc-list .t-sub {
  display: block;
  font-size: 17px;
  color: var(--muted);
  font-family: "Microsoft YaHei", sans-serif;
}
.toc-list .t-eyebrow { margin-bottom: 2px; }
.toc-list .t-sub { margin-top: 3px; }

/* 右：文章详情 */
.art-tools { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.article-bottom-turn {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}
.article-bottom-turn a, .article-bottom-turn > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}
.article-bottom-turn .next { text-align: right; align-items: flex-end; }
.article-bottom-turn small { color: #777; font-size: 12px; }
.article-bottom-turn strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.article-bottom-turn > span strong { color: #aaa; font-weight: 400; }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #c33;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.btn-back:hover { background: #a82727; color: #fff; }

.font-ctrl button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 3px;
  padding: 3px 9px;
  margin-left: 4px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.font-ctrl button:hover, .font-ctrl button.active { border-color: var(--brand); color: var(--brand); }

.art-eyebrow, .art-subtitle {
  text-align: center;
  font-size: 19px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}
.art-eyebrow { margin-bottom: 8px; }
.art-subtitle { margin-top: 10px; }

.art-title {
  text-align: center;
  font-family: "STSong", "SimSun", serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
  color: var(--ink);
}

.art-source {
  margin: 18px 0 0;
  padding: 9px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  color: var(--muted);
}
.art-source span { margin-right: 20px; }

.art-body {
  margin-top: 18px;
  font-size: 15px;
  line-height: 27px;
  color: var(--ink-soft);
}
.art-body p { margin: 10px 0; text-indent: 2em; }
.art-body img { max-height: 450px !important; max-width: 100% !important; width: auto !important; height: auto !important; display: block; margin: 14px auto; }

/* ---------- 右侧竖排图标栏 ---------- */
.rail { display: flex; flex-direction: column; }

.rail-item { position: relative; }

.rail-btn {
  width: 100%;
  border: none;
  color: #fff;
  padding: 12px 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  display: block;
}
.rail-btn .ico { display: block; font-size: 18px; margin-bottom: 3px; }
.rail-btn:hover { filter: brightness(1.1); }

.rail-item:nth-child(1) .rail-btn { background: #c0392b; }
.rail-item:nth-child(2) .rail-btn { background: #2b7bc0; }
.rail-item:nth-child(3) .rail-btn { background: #7b52ab; }
.rail-item:nth-child(4) .rail-btn { background: #d97a1a; }

.rail-pop {
  display: none;
  position: absolute;
  right: 100%;
  top: 0;
  z-index: 40;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(0,0,0,0.15);
  padding: 12px;
  text-align: left;
}
.rail-item.open .rail-pop { display: block; }

.rail-pop h4 { margin: 0 0 8px; font-size: 13px; color: var(--brand); }
.issue-calendar {
  margin-bottom: 9px;
  padding: 10px;
  border: 1px solid #d8e6f2;
  border-radius: 8px;
  background: linear-gradient(180deg, #f4f9fd, #ecf3fa);
}
.issue-calendar-head { display: flex; gap: 4px; align-items: center; margin-bottom: 7px; }
.issue-calendar-head select {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
  border-radius: 3px;
  padding: 0 4px;
}
.issue-calendar-head button {
  width: 32px; height: 32px; padding: 0; border: 1px solid var(--border);
  background: #fff; color: var(--brand); cursor: pointer; font-size: 22px; line-height: 1;
}
.issue-calendar-head button:disabled { color: #ccc; cursor: default; }
.issue-calendar-week, .issue-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.issue-calendar-week { margin-bottom: 3px; color: #777; font-size: 15px; text-align: center; }
.issue-calendar-week { color: #5a7894; font-weight: 600; }
.calendar-day, .calendar-blank {
  display: grid; place-items: center; aspect-ratio: 1; min-width: 0; font-size: 16px;
}
.calendar-day { color: #a9b6c3; }
.calendar-day.has-issue { background: var(--brand); color: #fff; font-weight: 700; }
.calendar-day.has-issue:hover { background: var(--brand-dark); }
.calendar-day.has-issue.current { background: #c0392b; }
.issue-calendar-legend { display: flex; gap: 14px; margin-top: 7px; color: #666; font-size: 15px; }
.issue-calendar-legend span { display: inline-flex; align-items: center; gap: 4px; }
.issue-calendar-legend i { width: 10px; height: 10px; background: var(--brand); }
.issue-calendar-legend i.current { background: #c0392b; }
.issue-calendar-week, .issue-calendar-grid { row-gap: 4px; }
.rail-pop .pop-list a {
  display: block;
  padding: 6px;
  font-size: 15px;
  border-bottom: 1px dotted var(--border-soft);
}
.rail-pop .pop-list a:hover { background: var(--brand-light); }
.rail-pop .pop-list a.active { color: var(--brand); font-weight: bold; }
.rail-pop .hint { font-size: 12px; color: var(--muted); line-height: 1.8; }
.rail-pop input[type=text] {
  width: 100%; font-size: 12px; padding: 5px;
  border: 1px solid var(--border); font-family: inherit;
}
.rail-pop .mini-btn {
  margin-top: 6px; padding: 5px 12px; font-size: 12px; cursor: pointer;
  font-family: inherit; border: 1px solid var(--border); background: #fff; border-radius: 3px;
}

/* ---------- 版面缩略图导航 ---------- */
.panel {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border-soft);
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(20, 60, 110, 0.08);
}
.reader-wrap + .panel { width: calc(100% - 74px); }
.panel > h2 {
  margin: 0;
  padding: 11px 16px;
  font-size: 16px;
  font-family: "STSong", "SimSun", serif;
  color: var(--brand);
  border-bottom: 1px solid var(--border-soft);
}
.panel .panel-inner { padding: 16px; }
.reader-page .panel .panel-inner { background: linear-gradient(180deg, #fbfdff, #f2f7fc); }

.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  padding: 10px 18px;
}
.overview-head h2 { margin: 0; font-size: 19px; color: #fff; }
.overview-head a { color: #fff; font-size: 16px; font-weight: bold; }
.overview-head a:hover { color: #fff; text-decoration: underline; }

.issue-overview-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 24px; }
.issue-overview-item {
  display: block;
  min-width: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(20, 60, 110, 0.06);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.issue-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 2467 / 3600;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--page-bg);
  border-radius: 4px;
}
.issue-cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
.issue-cover-empty { padding: 12px; color: var(--muted); font-size: 12px; text-align: center; }
.issue-overview-meta { display: flex; flex-direction: column; align-items: center; gap: 1px; padding-top: 7px; text-align: center; }
.issue-overview-meta strong { color: var(--ink); font-size: 17px; font-weight: normal; }
.issue-overview-meta > span { color: var(--ink-soft); font-size: 14px; white-space: nowrap; }
.issue-overview-item:hover .issue-cover { border-color: var(--brand); }
.issue-overview-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(20, 100, 165, 0.14);
  border-color: rgba(20, 100, 165, 0.35);
}
.issue-overview-item.active .issue-cover { border-color: #d33; }
.issue-overview-item.active .issue-overview-meta strong,
.issue-overview-item.active .issue-overview-meta > span { color: #d22; }

/* 归档/搜索页沿用 .panel-head + .panel-body 的组合 */
.panel > .panel-head h2 {
  margin: 0;
  font-size: 16px;
  font-family: "STSong", "SimSun", serif;
  color: var(--brand);
  border-left: 4px solid var(--brand);
  padding-left: 10px;
  line-height: 1.3;
}
.panel > .panel-head .sub { font-size: 12px; color: var(--muted); }
.panel > .panel-body { overflow: visible; padding: 16px; }

.page-nav-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }

.page-nav-item { display: block; text-align: center; font-size: 12px; color: var(--ink-soft); }
.page-nav-item img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border); margin-bottom: 5px; background: #fff;
}
.page-nav-item:hover img { border-color: var(--brand); }
.page-nav-item.active img { border-color: var(--brand); border-width: 2px; }
.page-nav-item.active span { color: var(--brand); font-weight: bold; }

/* ---------- 手机端全屏文章浮层 ---------- */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #fff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-overlay.open { display: block; }

.mo-bar {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  z-index: 2;
}
.mo-body { padding: 18px 16px 40px; }

/* ---------- 归档 / 搜索 / 页脚 ---------- */
.archive-breadcrumb {
  margin: 14px 0;
  padding: 7px 18px;
  background: #edf4f8;
  border-top: 1px solid #dce8ef;
  border-bottom: 1px solid #dce8ef;
  color: var(--ink-soft);
}
.archive-breadcrumb a { color: var(--brand); }
.archive-gallery { background: #fff; border: 1px solid var(--border); padding: 16px; }
.archive-cover-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 28px 34px; }
.archive-cover-item { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.archive-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 2467 / 3600;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--page-bg);
}
.archive-cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
.archive-cover-empty { padding: 10px; color: var(--muted); font-size: 12px; }
.archive-cover-item strong { margin-top: 7px; color: var(--ink); font-size: 16px; font-weight: normal; line-height: 1.4; }
.archive-cover-item .archive-date { color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
.archive-cover-item:hover .archive-cover { border-color: var(--brand); }
.archive-cover-item:hover strong { color: var(--brand); }
.archive-pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 5px; margin: 12px 0 20px; }
.archive-pager a, .archive-pager span, .archive-pager strong { padding: 2px 6px; font-size: 13px; font-weight: normal; }
.archive-pager a { color: var(--ink-soft); }
.archive-pager a:hover, .archive-pager strong { color: #d22; }
.archive-pager span { color: #aaa; }

.year-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.year-tabs a { padding: 4px 14px; border: 1px solid var(--border); border-radius: 3px; font-size: 13px; }
.year-tabs a.active, .year-tabs a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

.cal-months { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.cal-month { border: 1px solid var(--border-soft); }
.cal-month h4 {
  margin: 0; padding: 7px 10px; font-size: 16px;
  background: var(--brand-light); color: var(--brand); font-weight: normal;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; padding: 8px; }
.cal-grid .dow { font-size: 13px; color: var(--muted); text-align: center; padding: 2px 0; }
.cal-grid .day { text-align: center; font-size: 14px; padding: 5px 0; color: #bbb; border-radius: 3px; }
.cal-grid a.day { color: #fff; background: var(--brand); font-weight: bold; }
.cal-grid a.day:hover { background: var(--brand-dark); color: #fff; }

.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li { padding: 14px 0; border-bottom: 1px dotted var(--border); }
.result-list li:last-child { border-bottom: none; }
.result-list .r-title { font-size: 16px; font-family: "STSong", "SimSun", serif; line-height: 1.5; }
.result-list .r-meta { font-size: 12px; color: var(--muted); margin: 4px 0; }
.result-list .r-snippet { font-size: 13px; color: var(--ink-soft); line-height: 1.8; }
.result-list mark { background: #fff2a8; color: inherit; padding: 0 1px; }

.empty-hint { color: var(--muted); text-align: center; padding: 40px 10px; font-size: 14px; }

.site-footer {
  background: linear-gradient(180deg, #f2f6fb, #e4ebf3);
  border-top: 2px solid var(--brand);
  margin-top: 8px;
  padding: 16px 0 24px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 2;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .reader-wrap { grid-template-columns: minmax(0, 38%) minmax(0, 1fr) 68px; }
  .reader-page .reader-wrap { grid-template-columns: minmax(0, 45%) minmax(0, 1fr); }
  .reader-wrap + .panel { width: calc(100% - 68px); }
  .reader-page .reader-wrap + .panel { width: 100%; }
  .page-nav-grid { grid-template-columns: repeat(6, 1fr); }
  .issue-overview-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
  .archive-cover-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
}

@media (max-width: 1024px) {
  .brand-logo { width: 380px; }
  .issue-overview-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
  .page-nav-grid { grid-template-columns: repeat(5, 1fr); gap: 10px; }
}

@media (max-width: 1024px) {
  .topbar-inner { height: auto; flex-wrap: wrap; align-items: center; padding: 8px 0; }
  .topbar .issue-line { padding-top: 0; }
  .subbar-inner { height: auto; flex-wrap: wrap; padding: 8px 0; }
  /* 无右栏：版面图占满，文章走全屏浮层 */
  .reader-page .reader-wrap { grid-template-columns: 1fr; margin: 14px 0; }
  .reader-wrap { grid-template-columns: 1fr; margin: 14px 0; }
  .side-panel, .rail { margin-top: 0; }
  .reader-page .reader-wrap + .panel { width: 100%; }
  .reader-wrap + .panel { width: 100%; }
  .stage { border-right: 1px solid var(--border-soft); padding: 12px; }
  #stageInner { min-height: min(82vh, 720px); }
  .side-panel { border-top: none; }
  .rail { flex-direction: row; }
  .rail-item { flex: 1; }
  .rail-pop { right: auto; left: 0; top: 100%; width: min(270px, 90vw); }
  .rail-item:nth-last-child(-n+2) .rail-pop { right: 0; left: auto; }
  .page-nav-grid { grid-template-columns: repeat(4, 1fr); }
  .issue-overview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .archive-cover-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .cal-months { grid-template-columns: 1fr; }
  .hotspot-label { display: none; }
  .side-panel { margin-top: 14px; }
  .toc-split { display: block; }
  .toc-split-right {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--border-soft);
    padding-top: 14px;
    margin-top: 14px;
  }
  .toc-split-left .side-nav-section, .toc-split-right .side-nav-section {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 14px;
  }
  .toc-split-left .side-nav-section + .side-nav-section { margin-top: 0; }
  .toc-split-right .side-nav-section { margin-bottom: 0; }
}

@media (max-width: 820px) {
  .toc-split-right { display: none; }
  .toc-split { grid-template-columns: 1fr; }
  .toc-split-right {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--border-soft);
    padding-top: 14px;
    margin-top: 14px;
  }
  .issue-overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .page-nav-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}

@media (max-width: 700px) {
  .shell { padding: 0 10px; }
  .stage { padding: 8px; }
  .toc-split { grid-template-columns: 1fr; }
  .toc-split-right {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--border-soft);
    padding-top: 14px;
    margin-top: 14px;
  }
  .topbar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    height: auto;
    padding: 8px 0 10px;
  }
  .topbar .brand { order: -1; margin-left: 0; padding: 6px 10px; }
  .brand-logo { width: 180px; }
  .topbar .issue-line {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    padding-top: 0;
  }
  .topbar .spacer { display: none; }
  .subbar-inner { flex-wrap: wrap; justify-content: flex-end; height: auto; padding: 8px 0; gap: 8px; }
  .subbar .tnav a { padding: 5px 7px; font-size: 13px; }
  .head-search { flex: 1 1 100%; width: 100%; }
  .head-search input { flex: 1; width: auto; }
  .head-search input, .head-search button { padding-top: 6px; padding-bottom: 6px; }
  .art-title { font-size: 24px; }
  .toc-list a { font-size: 15px; }
  .issue-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .archive-gallery { padding: 12px; }
  .archive-cover-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
}

@media (max-width: 480px) {
  .shell { padding: 0 6px; }
  .brand-logo { width: 150px; }
  .topbar-inner { padding: 6px 0 8px; }
  .stage { padding: 6px; }
  .panel .panel-inner { padding: 8px; }
  .issue-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .issue-overview-item { padding: 6px; }
  .issue-overview-meta strong { font-size: 14px; }
  .page-nav-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .toc-list a { padding: 11px 4px 11px 16px; font-size: 15px; }
  .art-title { font-size: 22px; }
  .art-tools { flex-wrap: wrap; gap: 8px; }
}

