/* ==========================================================================
   XAFA DESIGN [005] — 纯白无框平面设计排版 + 设计艺术学院官网头部融合
   纯白 #FFFFFF · 零卡片方框 · 官网品牌色 #15a29c + 瑞士红 #d91e18
   支持多图画册拼版与长图文混排阅览器
   ========================================================================== */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-2: #555555;
  --ink-3: #8c8c8c;
  --hairline: rgba(17, 17, 17, 0.11);
  --teal: #15a29c;   /* 设计艺术学院官网标准色 */
  --red: #d91e18;    /* 荣誉与焦点提示色 */

  --font-sans: 'Inter', 'Helvetica Neue', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1380px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}
body.reader-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; color: inherit; }

.mono { font-family: var(--font-mono); letter-spacing: 0.06em; }
.ed-wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(22px, 5vw, 72px);
}

/* --------------------------------------------------------------------------
   与官网 https://sheji.xafa.edu.cn/ 1:1 对齐的头部导航与下拉样式
   (直接复用官网 base.css 参数：font-size:16px / #333 / #15a29c / 1px底线 / subnav左对齐与text-indent)
   -------------------------------------------------------------------------- */
.site-official-header {
  position: sticky;
  top: 0;
  z-index: 300;
  background-color: #ffffff;
  padding-top: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.official-header-inner {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 clamp(20px, 3.2vw, 60px);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.official-logo {
  display: inline-flex;
  height: 56px;
  margin-right: 40px;
  flex-shrink: 0;
}
.official-logo img {
  height: 40px;
  width: auto;
  display: block;
}
.official-logo-fallback {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.official-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.nav-item {
  position: relative;
  padding: 0;
  margin: 0 0 0 clamp(18px, 2.8vw, 48px);
}
.nav-item:first-child { margin-left: 0; }

.nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #333333;
  font-weight: 700;
  line-height: 40px;
  padding-bottom: 24px;
  white-space: nowrap;
  transition: color 0.3s ease;
  font: 16px "HELVETICANEUELTPRO-THEX", Arial, "microsoft yahei";
  padding-bottom: 20px;
  font-weight: bold;
}

.nav-item::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background-color: var(--teal);
  position: absolute;
  left: 0;
  bottom: 14px;
  opacity: 0;
  transition: all 0.5s ease 0s;
}

.nav-item:hover::after{
  width: 100%;
  opacity: 1;
}

.nav-item:hover > a,
.nav-item.is-current > a,
.nav-item > a.active {
  color: var(--teal);
}

.caret {
  width: 5px;
  height: 5px;
  border-right: 1.2px solid #999999;
  border-bottom: 1.2px solid #999999;
  transform: rotate(45deg) translateY(-2px);
  display: inline-block;
  transition: border-color 0.25s ease;
  margin-top: 5px;
}
.nav-item:hover .caret,
.nav-item.is-current .caret {
  border-color: var(--teal);
}

/* 官网原版下拉子菜单：左对齐、浅灰字、无顶色条、悬停 #15a29c + text-indent:10px */
.sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 49px;
  left: 0;
  min-width: 172px;
  background: #ffffff;
  border-top: 0;
  border-bottom: 1px solid #f1f1f1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.sub-menu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 18px;
}

.nav-item:hover .sub-menu,
.nav-item:focus-within .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.sub-menu li {
  border-bottom: 1px solid transparent;
}

.sub-menu li a {
  display: block;
  background: transparent;
  color: #aeaeae;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  padding: 15px 30px 15px 20px;
  border-top: 1px solid #f2f2f2;
  white-space: nowrap;
  transition: color 0.25s ease, text-indent 0.25s ease;
}
.sub-menu li:first-child a { border-top: none; }
.sub-menu li a:hover {
  color: var(--teal);
  text-indent: 10px;
}

.mobile-menu-btn {
  display: none;
  border: none;
  background: none;
  height: 40px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   章节通用无框节奏
   -------------------------------------------------------------------------- */
.ed-section {
  padding: clamp(40px, 5vw, 72px) 0;
}
.ed-section--top {
  padding: clamp(28px, 3.6vw, 48px) 0 clamp(20px, 2.6vw, 32px);
}
.ed-section--archive {
  padding: clamp(16px, 2.4vw, 32px) 0 clamp(56px, 7vw, 96px);
}

.ed-sec-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: clamp(24px, 3.2vw, 36px);
}
.ed-sec-bar--tight {
  margin-bottom: clamp(20px, 2.8vw, 30px);
}
.ed-sec-bar--archive {
  margin-bottom: 20px;
}
.ed-sec-left {
  display: inline-flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.ed-sec-idx { font-size: 11.5px; font-weight: 500; color: var(--ink); }
.ed-sec-sub { font-size: 12.5px; color: var(--ink-3); }
.ed-red-dot { color: var(--red); font-weight: 600; }

.ed-all-btn {
  border: none;
  background: none;
  padding: 2px 0 4px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.ed-all-btn span {
  font-size: 11px;
  color: var(--ink-3);
  margin-left: 4px;
}
.ed-all-btn:hover { color: var(--ink); }
.ed-all-btn.is-active {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--teal);
}
.ed-all-btn.is-active span { color: var(--teal); }

.ed-active-scope {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
}

/* --------------------------------------------------------------------------
   02 / 作品总览检索工具条 + 纯白画册 / 目录双视图
   -------------------------------------------------------------------------- */
.ed-archive-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.ed-search-underline {
  min-width: 240px;
  border-bottom: 1px solid var(--ink);
}
.ed-search-underline input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  padding: 6px 0;
  font-size: 13px;
}

.ed-tool-right { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.ed-result-num { font-size: 11.5px; color: var(--ink-3); }
.ed-result-num strong { color: var(--ink); }

.ed-view-links { display: inline-flex; align-items: center; gap: 8px; }
.ed-view-links button,
.ed-reset-link {
  border: none;
  background: none;
  padding: 2px 0;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
}
.ed-view-links button.is-active { color: var(--ink); font-weight: 700; }
.ed-reset-link:hover { color: var(--teal); }
.ed-slash { color: var(--ink-3); font-size: 12px; }

/* 无框纯白画册网格 */
.ed-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(36px, 4.8vw, 64px) clamp(24px, 3.2vw, 44px);
}
.ed-gallery:hover .ed-work-item:not(:hover) { opacity: 0.44; }

.ed-work-item {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity 0.26s ease;
}
.ed-work-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fafafa;
}
.ed-work-thumb canvas, .ed-work-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.ed-work-info { display: flex; flex-direction: column; gap: 4px; }
.ed-work-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--ink-3);
}
.ed-work-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  transition: color 0.16s ease;
}
.ed-work-item:hover .ed-work-name { color: var(--teal); }
.ed-work-authors { font-size: 12px; color: var(--ink-2); }

/* 极简目录列表 */
.ed-index-list { display: flex; flex-direction: column; }
.ed-index-row {
  display: grid;
  grid-template-columns: 70px 128px 1.6fr 1fr 110px 76px;
  align-items: baseline;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  font-size: 13.5px;
  transition: color 0.15s ease;
}
.ed-index-row--head {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  border-bottom-color: var(--ink);
  cursor: default;
}
.ed-index-row:not(.ed-index-row--head):hover { color: var(--teal); }

/* 极简分页 */
.ed-pager {
  margin-top: clamp(44px, 6vw, 72px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.ed-pager-nums { display: flex; gap: 14px; align-items: center; }
.ed-pg-btn {
  border: none;
  background: none;
  padding: 4px 2px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 1.5px solid transparent;
}
.ed-pg-btn.is-active {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--teal);
}
.ed-pg-btn:disabled { opacity: 0.25; cursor: not-allowed; }

/* --------------------------------------------------------------------------
   01 / 顶部历届年表与每届专业筛选矩阵 & 页脚
   -------------------------------------------------------------------------- */
.ed-chronicle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px clamp(20px, 2.8vw, 40px);
}
.ed-chr-item {
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease;
}
.ed-chr-item:hover { border-top-color: rgba(21, 162, 156, 0.55); }
.ed-chr-item.is-active {
  border-top: 2px solid var(--teal);
  padding-top: 13px;
}

.ed-chr-head {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ed-chr-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  width: 100%;
}
.ed-chr-year {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  transition: color 0.18s ease;
}
.ed-chr-head:hover .ed-chr-year,
.ed-chr-item.is-active .ed-chr-year {
  color: var(--teal);
}
.ed-chr-count {
  font-size: 11px;
  color: var(--ink-3);
}
.ed-chr-theme {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
}

.ed-chr-studios {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
}
.ed-chr-studio {
  border: none;
  background: none;
  padding: 1px 0 3px;
  font-size: 12px;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.ed-chr-studio:hover {
  color: var(--ink);
}
.ed-chr-studio.is-active {
  color: var(--teal);
  font-weight: 700;
  border-bottom-color: var(--teal);
}

.ed-footer { padding: 48px 0 56px; border-top: 1px solid var(--hairline); }
.ed-footer-grid { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; }
.ed-foot-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.ed-foot-en { margin: 0; font-size: 10.5px; color: var(--ink-3); }
.ed-foot-info { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.ed-foot-top a { font-size: 11.5px; color: var(--ink); }
.ed-foot-top a:hover { color: var(--teal); }

/* 悬停无框预览 */
.ed-hover-preview {
  position: fixed;
  width: 280px;
  aspect-ratio: 4 / 3;
  pointer-events: none;
  z-index: 400;
  opacity: 0;
  transform: translate(22px, -50%);
  transition: opacity 0.16s ease;
  background: #ffffff;
}
.ed-hover-preview.is-show { opacity: 1; }
.ed-hover-preview canvas, .ed-hover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-hover-preview [hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   纯白无框多图图文画册阅览器 (Editorial Monograph Reader)
   左侧吸顶信息 + 右侧长图文与多图混排流
   -------------------------------------------------------------------------- */
.ed-reader {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ed-reader[hidden] { display: none !important; }

.ed-reader-top {
  height: 64px;
  flex-shrink: 0;
  padding: 0 clamp(20px, 4vw, 56px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--hairline);
  background: #ffffff;
}
.ed-reader-back,
.ed-reader-step button {
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.ed-reader-back:hover,
.ed-reader-step button:hover { color: var(--teal); }
.ed-reader-crumb { font-size: 11px; color: var(--ink-3); }
.ed-reader-step { display: flex; align-items: center; gap: 10px; }

.ed-reader-scroll {
  flex: 1;
  overflow-y: auto;
}

.ed-reader-layout {
  max-width: var(--wrap);
  width: 100%;
  margin: 0 auto;
  padding: clamp(32px, 4.5vw, 60px) clamp(20px, 4vw, 56px) 96px;
  display: grid;
  grid-template-columns: minmax(280px, 0.44fr) minmax(0, 1fr);
  gap: clamp(36px, 5.5vw, 84px);
  align-items: start;
}

.ed-reader-aside {
  align-self: stretch;
}

.ed-aside-sticky {
  position: sticky;
  top: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ed-reader-award { font-size: 12px; font-weight: 700; color: var(--red); }
.ed-reader-award:empty { display: none; }
.ed-reader-title {
  margin: 0;
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.ed-reader-meta {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ed-reader-meta div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--hairline);
  font-size: 12.5px;
}
.ed-reader-meta dt { color: var(--ink-3); font-size: 11px; }
.ed-reader-meta dd { margin: 0; font-weight: 600; text-align: right; }

/* 图版快速跳转索引 */
.ed-plate-toc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - 360px);
  overflow-y: auto;
  padding-right: 6px;
}
.ed-toc-btn {
  border: none;
  background: none;
  padding: 3px 0;
  text-align: left;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  gap: 10px;
  transition: color 0.15s ease;
}
.ed-toc-btn span { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); flex-shrink: 0; }
.ed-toc-btn:hover { color: var(--teal); }
.ed-toc-btn--video { color: var(--teal); font-weight: 600; }

.ed-notes-label { font-size: 10.5px; color: var(--ink-3); margin-bottom: 9px; }

/* --------------------------------------------------------------------------
   右侧多图图文混排画册流 (Multi-Image, Video & Rich-Text Editorial Stream)
   -------------------------------------------------------------------------- */
.ed-story-stream {
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 4.5vw, 60px);
}

.story-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.story-plate-btn {
  border: none;
  padding: 0;
  background: #f7f7f7;
  width: 100%;
  overflow: hidden;
  cursor: zoom-in;
  display: block;
}
.story-plate-btn img {
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.story-plate-btn:hover img {
  transform: scale(1.012);
}

.story-figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-3);
}
.story-figcaption strong {
  font-weight: 600;
  color: var(--ink-2);
}

/* 双图并置拼版 (Editorial Diptych，保持原画完整不裁切) */
.story-diptych {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px, 2.5vw, 32px);
  align-items: start;
}
.story-diptych .story-plate-btn {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-diptych .story-plate-btn img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

/* 作品演示视频区块 */
.story-video-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.story-video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111111;
  overflow: hidden;
}
.story-video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.story-video-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-3);
}
.story-video-bar a {
  color: var(--teal);
  font-weight: 500;
}
.story-video-bar a:hover { text-decoration: underline; }

/* 纯白图文阐述段落（对齐真实 rich-text content 清洗排印） */
.story-essay {
  max-width: 68ch;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.story-essay-kicker {
  font-size: 11px;
  color: var(--teal);
  font-weight: 600;
}
.story-essay h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}
.story-essay p,
.story-rich p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink-2);
  text-align: justify;
  word-break: break-word;
}
.story-rich p:last-child { margin-bottom: 0; }
.story-rich h3,
.story-rich h4 {
  margin: 20px 0 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.story-rich ul,
.story-rich ol {
  margin: 0 0 12px;
  padding-left: 22px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.85;
}
.story-rich img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px 0;
  background: #f7f7f7;
  cursor: zoom-in;
}

/* 加载态、错误重试、视频标识、分页省略号 */
.ed-filter-line[hidden] { display: none !important; }
.ed-video-tag {
  color: var(--teal);
  font-weight: 600;
}
.ed-state-box {
  padding: 72px 0;
  color: var(--ink-3);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.ed-retry-btn {
  border: none;
  border-bottom: 1.5px solid var(--teal);
  background: none;
  padding: 2px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.ed-retry-btn:hover { color: var(--teal); }
.ed-pg-ellipsis {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  padding: 0 2px;
}
.ed-work-thumb { background: #f5f5f5; }

.story-quote {
  margin: 0;
  padding-left: 20px;
  border-left: 2px solid var(--teal);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.75;
  color: var(--ink);
  max-width: 54ch;
}

/* --------------------------------------------------------------------------
   单图全屏高清查看灯箱 (Fullscreen Single-Plate Zoom)
   -------------------------------------------------------------------------- */
.ed-photo-zoom {
  position: fixed;
  inset: 0;
  z-index: 750;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}
.ed-photo-zoom[hidden] { display: none !important; }

.epz-top {
  height: 58px;
  padding: 0 clamp(20px, 4vw, 48px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--hairline);
  font-size: 12.5px;
}
.epz-cap { color: var(--ink-2); }
.epz-close {
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.epz-close:hover { color: var(--teal); }

.epz-stage {
  flex: 1;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  padding: 20px;
  overflow: hidden;
}
.epz-arrow {
  border: none;
  background: none;
  font-size: 24px;
  color: var(--ink-2);
  cursor: pointer;
  height: 100%;
}
.epz-arrow:hover { color: var(--teal); }
.epz-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.epz-media canvas, .epz-media img {
  max-width: 100%;
  max-height: calc(100vh - 110px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.epz-media [hidden] { display: none !important; }

.ed-toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ed-toast { padding: 8px 14px; background: var(--ink); color: #ffffff; font-size: 12px; }

/* --------------------------------------------------------------------------
   响应式适配
   -------------------------------------------------------------------------- */
@media (max-width: 1120px) {
  .official-nav-list { gap: 14px; }
  .nav-item > a { font-size: 14px; }
  .ed-hero-grid,
  .ed-reader-layout { grid-template-columns: 1fr; }
  .ed-aside-sticky { position: static; }
  .ed-gallery { grid-template-columns: repeat(2, 1fr); }
  .ed-chronicle-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .mobile-menu-btn { display: inline-block; }
  .official-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--hairline);
    padding: 12px 24px 20px;
    display: none;
  }
  .official-nav.is-open { display: block; }
  .official-nav-list { flex-direction: column; align-items: flex-start; gap: 4px; }
  .nav-item > a { height: 42px; }
  .sub-menu { position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto; box-shadow: none; border-top: none; padding: 0 0 6px 14px; }
  .sub-menu li a { text-align: left; padding: 5px 0; }
}

@media (max-width: 680px) {
  .ed-h1-nowrap { white-space: normal; }
  .ed-gallery, .ed-chronicle-grid, .story-diptych { grid-template-columns: 1fr; }
  .ed-index-row { grid-template-columns: 56px 1fr 84px; }
  .ed-index-row > :nth-child(2), .ed-index-row > :nth-child(4), .ed-index-row > :nth-child(6) { display: none; }
}
