/* =============================================================
   全站样式层 —— 改风格只需要动这个文件（以及模板 HTML 的结构）。
   所有颜色 / 字体 / 圆角 / 间距 / 布局尺寸都集中在下面的 :root 变量里。
   后台数据与图片完全不在这里，改风格不会影响任何已录入的内容。
   ============================================================= */

:root {
  /* 主题色 */
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-2: #eef1ec;
  --surface-3: #e7ece6;
  --ink: #171c19;
  --ink-2: #4d5651;
  --ink-3: #858e88;
  --line: #dfe4dd;
  --line-strong: #c9d1c8;
  --accent: #1f5a48;
  --accent-hover: #164536;
  --accent-soft: #e5efe9;
  --accent-2: #bd6239;
  --accent-2-soft: #f6e9e1;
  --danger: #b3402c;
  --danger-soft: #f8e8e4;
  --warning: #9a6b18;
  --warning-soft: #f7eeda;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-display: Georgia, "Times New Roman", "Songti SC", "STSong", serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* 圆角与阴影 */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --radius-pill: 999px;
  --shadow: 0 10px 34px rgba(23, 38, 30, 0.07);
  --shadow-sm: 0 3px 14px rgba(23, 38, 30, 0.06);

  /* 间距刻度 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 88px;

  /* 布局 */
  --container: 1140px;
  --container-narrow: 780px;
  --header-height: 72px;
  --sidebar-width: 232px;
  --content-max: 62ch;

  /* 动效 */
  --transition: 180ms ease;

  /* 视频播放器（改风格时只动这里与下面的 Video 段） */
  --video-aspect: 16 / 9;
  --video-overlay: rgba(18, 26, 21, 0.9);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 650; }
p { margin: 0 0 var(--sp-4); }
ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.4em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.container-narrow { width: min(100% - 40px, var(--container-narrow)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header / nav / footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-height);
  display: flex; align-items: center; gap: var(--sp-6);
}
.brand {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 700; letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 42vw;
}
.brand::before {
  content: ""; display: inline-block; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent-2);
  margin-right: 10px; vertical-align: 2px;
}
.site-nav { display: flex; align-items: center; gap: var(--sp-5); margin-left: auto; flex-wrap: nowrap; }
.site-nav a {
  font-size: 14px; color: var(--ink-2); white-space: nowrap;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: var(--transition);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.header-admin {
  font-size: 12px; color: var(--ink-3); border: 1px solid var(--line);
  padding: 5px 12px; border-radius: var(--radius-pill); white-space: nowrap;
  transition: var(--transition);
}
.header-admin:hover { color: var(--accent); border-color: var(--accent); }

.site-footer {
  margin-top: var(--sp-9); padding: var(--sp-6) 0;
  border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px;
}
.footer-inner { display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.04fr 0.96fr;
  gap: var(--sp-8); align-items: center;
  padding: var(--sp-8) 0 var(--sp-7);
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: var(--sp-5);
}
.hero-kicker::before { content: ""; width: 24px; height: 1px; background: var(--accent); }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 58px); line-height: 1.15;
  letter-spacing: -0.01em; margin-bottom: var(--sp-4);
}
.hero-tagline { font-size: 17px; color: var(--ink-2); margin-bottom: var(--sp-5); }
.hero-intro {
  color: var(--ink-2); max-width: var(--content-max);
  margin-bottom: var(--sp-6); white-space: pre-wrap;
}
.hero-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

.hero-visual {
  position: relative; aspect-ratio: 5 / 4; border-radius: var(--radius);
  overflow: hidden; background: var(--surface-3); box-shadow: var(--shadow);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-placeholder {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 78% 22%, color-mix(in srgb, var(--accent-2) 28%, transparent), transparent 46%),
    radial-gradient(circle at 18% 82%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 52%),
    linear-gradient(135deg, var(--surface-3), var(--accent-soft));
}
.hero-placeholder::after {
  content: ""; position: absolute; inset: 12%;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 50% 50% 12% 50%; transform: rotate(-12deg);
}
.hero-avatar {
  position: absolute; left: var(--sp-5); bottom: var(--sp-5);
  width: 84px; height: 84px; border-radius: 50%;
  border: 4px solid var(--surface); background: var(--accent-soft);
  overflow: hidden; box-shadow: var(--shadow-sm);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 30px; color: var(--accent);
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ---------- Sections ---------- */
.section { padding: var(--sp-7) 0; border-top: 1px solid var(--line); }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-6); flex-wrap: wrap;
}
.section-eyebrow { font-size: 12px; letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase; }
.section-title { font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); margin-top: 4px; }
.section-more { font-size: 13px; color: var(--accent); font-weight: 600; }
.section-more:hover { text-decoration: underline; }
.page-head { padding: var(--sp-7) 0 var(--sp-5); }
.page-title { font-family: var(--font-display); font-size: clamp(30px, 4vw, 44px); }
.page-desc { color: var(--ink-2); margin-top: var(--sp-3); max-width: var(--content-max); }

.grid { display: grid; gap: var(--sp-5); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-cover { aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-cover-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--surface-3), var(--accent-soft));
  display: grid; place-items: center; color: var(--accent);
  font-family: var(--font-display); font-size: 34px; opacity: 0.75;
}
.card-body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.card-meta { font-size: 12px; color: var(--ink-3); display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.card-title { font-size: 18px; font-weight: 650; line-height: 1.45; }
.card-title a:hover { color: var(--accent); }
.card-summary { color: var(--ink-2); font-size: 14px; flex: 1; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--sp-2); }
.tag {
  font-size: 11px; padding: 2px 9px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}

/* ---------- Badges & buttons ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: var(--radius-pill); border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ongoing { background: var(--accent-soft); color: var(--accent); }
.badge-upcoming { background: var(--warning-soft); color: var(--warning); }
.badge-ended { background: var(--surface-2); color: var(--ink-3); }
.badge-draft { background: var(--danger-soft); color: var(--danger); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 600; transition: var(--transition); white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--danger); border-color: var(--line); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Events ---------- */
.filter-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-6); }
.filter-chip {
  padding: 7px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; color: var(--ink-2); transition: var(--transition);
}
.filter-chip:hover { border-color: var(--accent); }
.filter-chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.event-group { margin-bottom: var(--sp-7); }
.event-group-title {
  display: flex; align-items: center; gap: var(--sp-3);
  font-size: 15px; font-weight: 650; margin-bottom: var(--sp-4);
}
.event-group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.event-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-5);
  display: grid; grid-template-columns: 1fr auto; gap: var(--sp-5);
  margin-bottom: var(--sp-3);
}
.event-item-main { min-width: 0; }
.event-item-title { font-size: 17px; font-weight: 650; margin-bottom: var(--sp-2); }
.event-item-meta { font-size: 13px; color: var(--ink-3); margin-bottom: var(--sp-3); }
.event-item-text { color: var(--ink-2); font-size: 14px; white-space: pre-wrap; }
.event-item-image { width: 132px; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.event-item-image img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Article / detail ---------- */
.article { padding: var(--sp-6) 0 var(--sp-8); }
.back-link { font-size: 13px; color: var(--ink-3); display: inline-block; margin-bottom: var(--sp-6); }
.back-link:hover { color: var(--accent); }
.article-header { max-width: var(--container-narrow); margin-bottom: var(--sp-6); }
.article-title { font-family: var(--font-display); font-size: clamp(30px, 4vw, 44px); line-height: 1.25; }
.article-meta { color: var(--ink-3); font-size: 13px; margin-top: var(--sp-4); display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.article-cover { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius); margin-bottom: var(--sp-6); background: var(--surface-2); }
.article-body { max-width: var(--container-narrow); }
.article-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); margin-top: var(--sp-6); }
.article-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }
.article-actions { margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid var(--line); }

/* 富文本正文（前台展示与后台预览共用） */
.rich-text { font-size: 15.5px; color: var(--ink-2); line-height: 1.9; }
.rich-text h1, .rich-text h2, .rich-text h3 { color: var(--ink); margin: var(--sp-6) 0 var(--sp-3); }
.rich-text h1 { font-size: 26px; } .rich-text h2 { font-size: 21px; } .rich-text h3 { font-size: 17px; }
.rich-text p { margin-bottom: var(--sp-4); }
.rich-text img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: var(--sp-4) 0; }
.rich-text a { color: var(--accent); text-decoration: underline; }
.rich-text blockquote { border-left: 3px solid var(--accent); margin: var(--sp-5) 0; padding: 4px 0 4px var(--sp-4); color: var(--ink-3); }
.rich-text pre { background: var(--surface-2); padding: var(--sp-4); border-radius: var(--radius-sm); overflow-x: auto; }
.rich-text ul, .rich-text ol { padding-left: 1.5em; }

/* ---------- Long-form article typography ----------
   仅对正文里显式使用 class 的段落生效（导语 / 小标题 / 金句 / 注记等），
   不影响其它文章与作品正文；新增样式只使用 :root 里已有的变量。 */
.rich-text .article-lead {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: var(--sp-6);
}
.rich-text .section-kicker {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin: var(--sp-7) 0 var(--sp-2);
}
.rich-text .section-kicker::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.rich-text h2.article-section {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0 0 var(--sp-4);
}
.rich-text .pull-quote {
  position: relative;
  border-left: none;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: var(--sp-5) var(--sp-5) var(--sp-5) var(--sp-6);
  margin: var(--sp-6) 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.8;
}
.rich-text .pull-quote::before {
  content: '“';
  position: absolute;
  left: var(--sp-3);
  top: var(--sp-2);
  font-size: 34px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.45;
}
.rich-text .takeaways { list-style: none; padding-left: 0; margin: var(--sp-5) 0; }
.rich-text .takeaways li {
  position: relative;
  padding-left: var(--sp-6);
  margin-bottom: var(--sp-3);
}
.rich-text .takeaways li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--accent);
  font-weight: 700;
}
.rich-text .note-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-2);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-4) var(--sp-5);
  margin: var(--sp-5) 0;
}
.rich-text .note-card strong { color: var(--accent-2); display: block; margin-bottom: var(--sp-1); }
.rich-text .note-card p:last-child { margin-bottom: 0; }
.rich-text .soft-rule {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
  margin: var(--sp-7) 0;
}
.rich-text code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}
.rich-text .signature {
  text-align: right;
  color: var(--ink-3);
  font-size: 14px;
  margin-top: var(--sp-7);
}
@media (max-width: 640px) {
  .rich-text .article-lead { font-size: 17px; }
  .rich-text h2.article-section { font-size: 21px; }
  .rich-text .pull-quote { padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-5); font-size: 16px; }
}

/* ---------- Empty state ---------- */
.empty-state {
  padding: var(--sp-8) var(--sp-5); text-align: center;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  color: var(--ink-3); background: var(--surface);
}
.empty-state strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: var(--sp-2); }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: var(--sp-5);
  background:
    radial-gradient(circle at 20% 15%, var(--accent-soft), transparent 45%),
    radial-gradient(circle at 82% 85%, var(--accent-2-soft), transparent 45%), var(--bg);
}
.login-card {
  width: min(100%, 400px); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-7); box-shadow: var(--shadow);
}
.login-logo { font-family: var(--font-display); font-size: 24px; margin-bottom: 6px; }
.login-sub { color: var(--ink-3); font-size: 13px; margin-bottom: var(--sp-6); }

/* ---------- Forms (后台) ---------- */
.form-field { margin-bottom: var(--sp-5); }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.form-hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.form-control {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--surface); font-size: 14px;
  transition: var(--transition);
}
.form-control:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.form-control { resize: vertical; min-height: 96px; line-height: 1.7; }
select.form-control { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.checkbox-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--accent); }

/* ---------- Admin shell ---------- */
.admin-shell { display: grid; grid-template-columns: var(--sidebar-width) 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--surface); border-right: 1px solid var(--line);
  padding: var(--sp-5) var(--sp-4); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.admin-brand { font-family: var(--font-display); font-size: 18px; padding: 0 var(--sp-2) var(--sp-5); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-4); }
.admin-brand small { display: block; font-family: var(--font-sans); font-size: 11px; color: var(--ink-3); font-weight: 500; letter-spacing: 0.08em; margin-top: 4px; }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm); font-size: 14px; color: var(--ink-2);
  border: none; background: transparent; width: 100%; text-align: left; transition: var(--transition);
}
.admin-nav-item:hover { background: var(--surface-2); color: var(--ink); }
.admin-nav-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.admin-nav-item .nav-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.admin-sidebar-foot { margin-top: auto; padding-top: var(--sp-4); border-top: 1px solid var(--line); display: grid; gap: var(--sp-2); }

.admin-main { min-width: 0; }
.admin-topbar {
  height: var(--header-height); border-bottom: 1px solid var(--line);
  background: var(--surface); display: flex; align-items: center; gap: var(--sp-4);
  padding: 0 var(--sp-6); position: sticky; top: 0; z-index: 30;
}
.admin-topbar h1 { font-size: 17px; }
.admin-topbar .spacer { flex: 1; }
.admin-content { padding: var(--sp-6); max-width: 1000px; }
.panel { display: none; }
.panel.is-active { display: block; }
.panel-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-6); margin-bottom: var(--sp-5);
}
.panel-card h2 { font-size: 17px; margin-bottom: var(--sp-2); }
.panel-card > .panel-desc { color: var(--ink-3); font-size: 13px; margin-bottom: var(--sp-5); }
.panel-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-5); }

/* ---------- Admin list / table ---------- */
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.list-count { font-size: 13px; color: var(--ink-3); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .row-title { font-weight: 600; color: var(--ink); }
.data-table .row-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.data-table .row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.readonly-id { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); background: var(--surface-2); padding: 2px 7px; border-radius: var(--radius-xs); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

/* ---------- Image uploader ---------- */
.uploader { display: flex; align-items: flex-start; gap: var(--sp-4); flex-wrap: wrap; }
.upload-preview {
  width: 148px; aspect-ratio: 4 / 3; border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong); background: var(--surface-2);
  display: grid; place-items: center; overflow: hidden; color: var(--ink-3); font-size: 12px; text-align: center; padding: 6px;
}
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.uploader-actions { display: grid; gap: var(--sp-2); align-content: start; }
.image-strip { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-3); }
.image-thumb { position: relative; width: 108px; aspect-ratio: 4/3; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.image-thumb button {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border-radius: 50%; border: none; background: rgba(23,28,25,.78); color: #fff;
  font-size: 13px; line-height: 1; display: grid; place-items: center;
}

/* ---------- Rich text editor ---------- */
.editor-wrap { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.editor-toolbar {
  display: flex; gap: 4px; flex-wrap: wrap; padding: 8px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.editor-toolbar button {
  min-width: 32px; height: 30px; padding: 0 8px; border: 1px solid transparent;
  background: transparent; border-radius: var(--radius-xs); font-size: 13px; color: var(--ink-2);
}
.editor-toolbar button:hover { background: var(--surface); border-color: var(--line); color: var(--accent); }
.editor-canvas { min-height: 220px; max-height: 480px; overflow-y: auto; padding: var(--sp-4); outline: none; }
.editor-canvas:focus { box-shadow: inset 0 0 0 2px var(--accent-soft); }
.editor-canvas img { max-width: 100%; border-radius: var(--radius-sm); margin: 8px 0; }

/* ---------- Modal / toast ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(18, 26, 21, 0.48);
  display: none; align-items: flex-start; justify-content: center; padding: var(--sp-6); overflow-y: auto;
}
.modal-mask.is-open { display: flex; }
.modal {
  width: min(100%, 760px); background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); margin: auto;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-5) var(--sp-6); border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: var(--sp-6); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--sp-3); padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--line); }
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 11px 22px; border-radius: var(--radius-pill);
  font-size: 13.5px; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: var(--transition); z-index: 200; white-space: nowrap; max-width: 90vw;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--danger); }
.inline-notice {
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px;
  background: var(--accent-soft); color: var(--accent); margin-bottom: var(--sp-4);
}
.inline-notice.is-error { background: var(--danger-soft); color: var(--danger); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: var(--sp-6); padding: var(--sp-6) 0; }
  .hero-visual { aspect-ratio: 16 / 10; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap;
    align-items: center; border-right: none; border-bottom: 1px solid var(--line);
    padding: var(--sp-3) var(--sp-4); gap: 6px;
  }
  .admin-brand { border-bottom: none; margin: 0 var(--sp-3) 0 0; padding: 0; font-size: 15px; }
  .admin-brand small { display: none; }
  .admin-nav-item { width: auto; padding: 7px 11px; font-size: 13px; }
  .admin-sidebar-foot { margin: 0 0 0 auto; padding: 0; border: none; display: flex; }
  .admin-content { padding: var(--sp-4); }
  .admin-topbar { padding: 0 var(--sp-4); }
}
@media (max-width: 640px) {
  .header-inner { gap: var(--sp-3); flex-wrap: wrap; height: auto; padding: 12px 0; }
  .brand { max-width: 100%; font-size: 16px; }
  .site-nav { margin-left: 0; gap: var(--sp-4); width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .header-admin { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .event-item { grid-template-columns: 1fr; }
  .event-item-image { width: 100%; aspect-ratio: 16 / 9; }
  .article-gallery { grid-template-columns: 1fr; }
  .section, .hero { padding-block: var(--sp-6); }
  .site-footer { margin-top: var(--sp-7); }
  .panel-card { padding: var(--sp-4); }
  .modal-body { padding: var(--sp-4); }
}

/* ---------- Video ---------- */
.video-embed { margin: var(--sp-5) 0; }
.video-caption { font-size: 13px; color: var(--ink-3); margin-bottom: var(--sp-2); }
.video-frame {
  position: relative; width: 100%; aspect-ratio: var(--video-aspect);
  border-radius: var(--radius); overflow: hidden;
  background: var(--ink); box-shadow: var(--shadow-sm);
}
.video-frame iframe, .video-frame video {
  display: block; width: 100%; height: 100%; border: 0; background: var(--ink);
}
.video-frame video { object-fit: contain; }
.video-embed.is-invalid {
  padding: var(--sp-5); border: 1px dashed var(--line-strong);
  border-radius: var(--radius); color: var(--ink-3); font-size: 13px; text-align: center;
}
.article-videos { max-width: var(--container-narrow); margin-bottom: var(--sp-6); }
.article-videos .video-embed:first-child { margin-top: 0; }

/* 富文本 / 后台编辑器里的受控占位卡片 */
.video-block {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5); margin: var(--sp-4) 0;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--ink-2); font-size: 13.5px;
  user-select: none;
}
.video-block-icon {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px;
  background: var(--accent); color: #fff; padding-left: 2px;
}
.video-block-text { min-width: 0; overflow-wrap: anywhere; }

/* 列表卡片：封面上的播放角标，点击可直接播放 */
.card-cover-wrap { position: relative; }
.card-cover { display: block; }
.card-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--surface);
  background: color-mix(in srgb, var(--ink) 78%, transparent); color: #fff;
  font-size: 18px; line-height: 1; padding-left: 3px;
  display: grid; place-items: center; z-index: 2;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.card-play:hover { background: var(--accent); transform: translate(-50%, -50%) scale(1.08); }

/* 卡片直接播放弹窗 */
.video-modal-mask {
  position: fixed; inset: 0; z-index: 150; background: var(--video-overlay);
  display: grid; place-items: center; padding: var(--sp-5);
}
.video-modal {
  width: min(100%, 960px); background: var(--surface);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.video-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2);
}
.video-modal .video-frame { border-radius: 0; box-shadow: none; }

/* 后台：作品视频列表 */
.video-list { display: grid; gap: var(--sp-3); }
.video-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: var(--sp-4); background: var(--surface-2);
}
.video-item .form-field { margin-bottom: 0; }
.video-item-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); margin-top: var(--sp-3);
}
.video-status { font-size: 12px; color: var(--danger); overflow-wrap: anywhere; }
.video-status.is-ok { color: var(--accent); }

@media (max-width: 640px) {
  .card-play { width: 48px; height: 48px; font-size: 16px; }
  .video-modal-mask { padding: var(--sp-3); }
}

/* ---------- 文章列表（紧凑行式，数量多时比卡片省空间） ---------- */
.article-list {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.article-row {
  display: grid;
  grid-template-columns: auto 100px minmax(0, 1fr) auto 18px;
  grid-template-areas: "thumb date main tags arrow";
  align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line);
  transition: background var(--transition);
}
.article-row:last-child { border-bottom: none; }
.article-row:hover { background: var(--surface-2); }
.article-row-thumb {
  grid-area: thumb; width: 64px; aspect-ratio: 4 / 3;
  border-radius: var(--radius-xs); overflow: hidden; background: var(--surface-2);
}
.article-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-row-date {
  grid-area: date; font-size: 12.5px; color: var(--ink-3);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.article-row-main { grid-area: main; min-width: 0; display: grid; gap: 2px; }
.article-row-title {
  font-size: 15.5px; font-weight: 620; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.article-row:hover .article-row-title { color: var(--accent); }
.article-row-summary {
  font-size: 13px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.article-row-tags { grid-area: tags; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.article-row-arrow { grid-area: arrow; color: var(--ink-3); font-size: 15px; }

/* 首页「最新文章」：更紧凑，单行、不显示简介 */
.article-list.is-compact .article-row {
  padding: 11px var(--sp-5);
  grid-template-columns: 100px minmax(0, 1fr) auto 18px;
  grid-template-areas: "date main tags arrow";
}
.article-list.is-compact .article-row-title { font-size: 15px; }
.article-list.is-compact .article-row-thumb { display: none; }

.list-tools { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.list-tools .form-control { max-width: 420px; }
.list-tools .filter-row { margin-bottom: 0; }
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-4); margin-top: var(--sp-5); flex-wrap: wrap;
}
.pagination-info { font-size: 13px; color: var(--ink-3); }

/* 后台：栏目类型徽标、操作列 */
.col-type {
  font-size: 11px; padding: 2px 9px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--ink-2);
  border: 1px solid var(--line); white-space: nowrap;
}
.col-type.is-articles { background: var(--accent-soft); color: var(--accent); }

@media (max-width: 700px) {
  .article-row {
    grid-template-columns: minmax(0, 1fr) 18px;
    grid-template-areas: "date arrow" "main arrow" "tags arrow";
    gap: 2px var(--sp-3); padding: 12px var(--sp-4); align-items: start;
  }
  .article-row-thumb { display: none; }
  .article-row-arrow { align-self: center; }
  .article-row-tags { justify-content: flex-start; }
  .article-list.is-compact .article-row {
    grid-template-columns: minmax(0, 1fr) 18px;
    grid-template-areas: "date arrow" "main arrow";
    padding: 10px var(--sp-4);
  }
  .article-list.is-compact .article-row-tags { display: none; }
}
