:root {
  --blue: #1668c8;
  --blue-deep: #0b3d91;
  --blue-light: #e8f1fc;
  --ink: #1c2333;
  --muted: #6b7487;
  --line: #e3e8f0;
  --bg: #f5f7fb;
  --card: #ffffff;
  --danger: #d43a3a;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(11, 61, 145, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); line-height: 1.65; }
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; }
.wrap { width: min(1180px, 94vw); margin: 0 auto; }
.muted { color: var(--muted); font-size: 14px; }
[hidden] { display: none !important; }

/* 顶栏 */
.topbar { background: linear-gradient(90deg, var(--blue-deep), var(--blue)); color: #fff; font-size: 13px; padding: 6px 0; }
.topbar .wrap { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.topbar-label { background: rgba(255,255,255,.18); border-radius: 4px; padding: 1px 8px; flex: none; }
.topbar-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .95; }

/* 头部 */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header.scrolled { box-shadow: var(--shadow); }
.header-in { display: flex; align-items: center; gap: 24px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-mark { width: 46px; height: 46px; object-fit: contain; }
.brand-txt strong { display: block; font-size: 17px; color: var(--blue-deep); letter-spacing: 1px; }
.brand-txt span { font-size: 12px; color: var(--muted); letter-spacing: 3px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 16px; border-radius: 8px; color: var(--ink); font-size: 15px; }
.nav a:hover { background: var(--blue-light); color: var(--blue); }
.nav a.on { background: var(--blue); color: #fff; }
.user-box { display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.user-chip b { color: var(--blue-deep); }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 8px; padding: 9px 20px; font-size: 14px; cursor: pointer; transition: all .18s; font-family: inherit; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-pdf { background: var(--danger); color: #fff; padding: 7px 18px; }
.btn-pdf:hover { background: #b52f2f; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Hero */
.hero { background: linear-gradient(135deg, #0b3d91 0%, #1668c8 55%, #4a9ae8 100%); color: #fff; padding: 64px 0; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.hero-txt h1 { font-size: 38px; line-height: 1.3; margin-bottom: 14px; }
.hero-sub { opacity: .92; font-size: 16px; max-width: 560px; margin-bottom: 24px; }
.hero-btns { display: flex; gap: 12px; margin-bottom: 32px; }
.hero-btns .btn-ghost { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); color: #fff; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.stat b { display: block; font-size: 30px; font-family: Georgia, serif; }
.stat span { font-size: 13px; opacity: .85; }
.hero-card { background: #fff; border-radius: 20px; padding: 40px; box-shadow: 0 20px 60px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; }
.hero-card img { width: 100%; }

/* 区块 */
.section { padding: 48px 0 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.sec-head h2 { font-size: 24px; color: var(--blue-deep); position: relative; padding-left: 14px; }
.sec-head h2::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px; border-radius: 3px; background: linear-gradient(var(--blue), var(--blue-deep)); }
.sec-head h3 { font-size: 19px; color: var(--blue-deep); }
.more { font-size: 14px; }

/* 最新一期卡片 */
.latest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.latest-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s; cursor: pointer; }
.latest-card:hover { transform: translateY(-4px); }
.latest-cover { height: 150px; background: linear-gradient(135deg, var(--blue), var(--blue-deep)); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.latest-cover .lc-name { font-size: 22px; font-weight: 700; letter-spacing: 2px; }
.latest-cover .lc-type { font-size: 12px; opacity: .85; }
.latest-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.latest-body h3 { font-size: 16px; }
.latest-body .muted { font-size: 13px; }
.lc-tags { display: flex; gap: 8px; margin-top: auto; }
.tag { font-size: 12px; border-radius: 20px; padding: 2px 10px; }
.tag-free { background: #e6f6ec; color: #1c8c4d; }
.tag-sub { background: #fdf0e6; color: #c26a1c; }
.tag-lock { background: #fbe9e9; color: var(--danger); }

/* 公告 */
.ann-list { display: flex; flex-direction: column; gap: 10px; }
.ann-item { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; padding: 12px 16px; }
.ann-item b { color: var(--blue-deep); margin-right: 10px; }
.ann-item time { float: right; color: var(--muted); font-size: 13px; }
.ann-item p { font-size: 14px; color: #3d4658; margin-top: 4px; }

/* FAQ / 联系 */
.faq-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 26px; }
.faq-card h3 { font-size: 17px; color: var(--blue-deep); margin-bottom: 12px; }
.faq-card ol { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; color: #3d4658; }
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.contact-item { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.contact-item span { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
.contact-item b { font-size: 15px; color: var(--ink); word-break: break-all; }

/* 报刊列表 */
.pub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pub-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.pub-card-cover { height: 120px; background: linear-gradient(135deg, var(--blue), var(--blue-deep)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; letter-spacing: 3px; }
.pub-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.pub-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pub-card-body h3 { font-size: 17px; color: var(--blue-deep); }
.pub-card-body p { font-size: 13.5px; color: var(--muted); flex: 1; }
.pub-card-foot { display: flex; align-items: center; gap: 10px; }
.issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 6px; }
.issue-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; cursor: pointer; transition: all .18s; }
.issue-card:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.issue-card b { display: block; font-size: 15px; margin-bottom: 4px; }
.issue-card .muted { font-size: 12.5px; }

/* 阅览室 */
.reader-head { text-align: center; padding: 34px 0 6px; }
.reader-title { font-size: 28px; color: var(--blue-deep); letter-spacing: 2px; }
.reader-tabs { display: inline-flex; gap: 0; margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.reader-tabs button { border: none; background: transparent; padding: 10px 26px; font-size: 15px; cursor: pointer; font-family: inherit; color: var(--ink); border-right: 1px solid var(--line); }
.reader-tabs button:last-child { border-right: none; }
.reader-tabs button.on { background: var(--blue); color: #fff; }
.reader-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.reader-bar select { min-width: 320px; }
.reader-lock { background: #fff7e8; border: 1px solid #f2d9a4; color: #8a6116; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.reader-lock a { font-weight: 600; }
.reader-body { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.reader-left { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.page-viewer { background: #f0f2f6; border: 1px solid var(--line); border-radius: 8px; min-height: 420px; display: flex; align-items: center; justify-content: center; overflow: auto; position: relative; }
.page-viewer img { max-height: 640px; object-fit: contain; display: block; }
.page-viewer img.noimg { display: none; }
.page-viewer-empty { position: absolute; color: var(--muted); font-size: 14px; }
.page-meta { display: flex; align-items: center; justify-content: space-between; padding: 14px 2px 8px; }
.page-name { font-size: 17px; color: var(--blue-deep); font-weight: 600; }
.page-nav { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.page-nav button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 12px; font-size: 13px; cursor: pointer; font-family: inherit; }
.page-nav button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.page-nav button:hover:not(.on) { border-color: var(--blue); color: var(--blue); }
.reader-right { display: flex; flex-direction: column; gap: 16px; }
.page-grid { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.page-grid h4 { font-size: 14px; color: var(--muted); font-weight: 400; margin-bottom: 10px; }
.pg-cells { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pg-cell { background: var(--blue); color: #fff; border-radius: 6px; padding: 8px 10px; font-size: 13px; text-align: center; cursor: pointer; border: none; font-family: inherit; transition: background .15s; }
.pg-cell:hover { background: var(--blue-deep); }
.pg-cell.on { background: var(--blue-deep); outline: 2px solid #f2b01e; }
.article-list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.article-list h3 { font-size: 15px; color: var(--blue-deep); margin-bottom: 10px; }
.article-list ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.article-list li { display: flex; align-items: baseline; gap: 8px; font-size: 14px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.article-list li:hover { background: var(--blue-light); }
.article-list li::before { content: "·"; color: var(--blue); font-weight: 700; }
.article-list li .al-page { margin-left: auto; flex: none; font-size: 12px; color: var(--muted); }
.article-list li .al-lock { color: var(--muted); font-size: 12px; flex: none; }
.copyright-note { margin: 26px 0 40px; background: var(--card); border-radius: var(--radius); padding: 18px 22px; border-top: 3px solid var(--blue); }
.copyright-note h3 { font-size: 15px; color: var(--blue-deep); margin-bottom: 8px; }
.copyright-note p { font-size: 13px; color: var(--muted); }

/* 搜索 */
.search-bar { display: flex; gap: 10px; margin-bottom: 12px; }
.search-bar .input { flex: 1; }
.search-results { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.sr-item { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: 14px 18px; cursor: pointer; }
.sr-item h4 { color: var(--blue-deep); font-size: 16px; }
.sr-item p { font-size: 13.5px; color: var(--muted); margin: 4px 0; }
.sr-item .sr-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }

/* 页脚 */
.footer { background: #0e1830; color: #aab3c8; margin-top: 56px; padding: 40px 0 0; }
.footer-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; padding-bottom: 28px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-col a, .footer-col span { display: block; font-size: 13.5px; color: #aab3c8; padding: 3px 0; }
.footer-col a:hover { color: #fff; }
.footer-bar { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.footer-brand { letter-spacing: 2px; }

/* 弹窗 */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(10, 18, 38, .55); }
.modal-dialog { position: relative; background: #fff; border-radius: 14px; width: min(430px, 92vw); max-height: 86vh; overflow: auto; box-shadow: 0 24px 80px rgba(0,0,0,.3); }
.modal-lg { width: min(760px, 94vw); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; color: var(--blue-deep); }
.modal-x { border: none; background: none; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font-size: 14px; font-family: inherit; background: #fff; color: var(--ink); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,104,200,.12); }
select.input, textarea.input { font-family: inherit; }
textarea.input { resize: vertical; min-height: 90px; }
.form-err { color: var(--danger); font-size: 13px; min-height: 18px; }
.am-meta { font-size: 13px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; border-bottom: 1px dashed var(--line); padding-bottom: 10px; }
.am-content { font-size: 15.5px; line-height: 1.9; color: #2a3247; white-space: pre-wrap; word-break: break-word; }
.am-lock { text-align: center; background: var(--blue-light); border-radius: 10px; padding: 26px; color: var(--blue-deep); display: flex; flex-direction: column; gap: 14px; align-items: center; }

/* 骨架屏 / toast */
.skel { background: linear-gradient(90deg, #eceff5 25%, #f7f9fc 40%, #eceff5 55%); background-size: 300% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
.skel-card { height: 180px; }
.skel-line { height: 52px; }
@keyframes sk { to { background-position: -150% 0; } }
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: rgba(16,24,44,.92); color: #fff; padding: 10px 22px; border-radius: 30px; font-size: 14px; z-index: 200; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.toast.err { background: var(--danger); }

/* 响应式 */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-card { display: none; }
  .latest-grid, .pub-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .reader-body { grid-template-columns: 1fr; }
  .nav { display: none; }
}
@media (max-width: 560px) {
  .latest-grid, .pub-grid { grid-template-columns: 1fr; }
  .hero-txt h1 { font-size: 28px; }
  .hero-stats { gap: 22px; }
  .reader-bar select { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skel { animation: none; }
  * { transition: none !important; }
}
